/*
 * Sign-in pages in Daylight, the calm way (owner's reference): a plain
 * light page, a 360px column with no card around it, Athar as the mark,
 * a short heading, Google first, then a simple form and one dark button.
 * Isolated from the legacy dark rules in site.css by the .mk-auth scope.
 */
.mk-auth {
    --a-bg: #f5f6f3;
    --a-ink: #0f1d17;
    --a-ink-2: #2c3b34;
    --a-mute: #5d6d65;
    --a-line: #d9dfd9;
    --a-field: #ffffff;
    --a-focus: #2e9e73;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--a-bg);
    color: var(--a-ink);
    font: 400 15px/1.6 'basgro Readex', 'Segoe UI', Tahoma, system-ui, sans-serif;
}
.mk-auth * { box-sizing: border-box; }
.mk-auth :is(a, button, input):focus-visible { outline: 2px solid var(--a-focus); outline-offset: 3px; }

/* Top bar: the logo at the start, the language at the end. */
.mk-auth-top { width: min(100% - 40px, 1120px); margin: 0 auto; padding-block: 20px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.mk-auth-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--a-ink); text-decoration: none; font-weight: 700; font-size: 20px; }
.mk-auth-brand svg { width: 22px; height: 26px; }
.mk-auth .auth-tools { display: flex; gap: 2px; padding: 0; background: none; box-shadow: none; }
.mk-auth .auth-tools form { margin: 0; }
.mk-auth .auth-tools button { min-height: 34px; padding: 6px 10px; border: 0; border-radius: 8px; background: none; color: var(--a-mute); font: inherit; font-size: 13.5px; cursor: pointer; }
.mk-auth .auth-tools button:hover { color: var(--a-ink); }
.mk-auth .auth-tools button.is-active { color: var(--a-ink); font-weight: 600; }

/* The column */
.mk-auth-center { flex: 1; display: grid; place-items: center; padding: 24px 20px 64px; }
.mk-auth-card { width: min(100%, 360px); overflow-wrap: anywhere; }
.mk-auth-athar { display: block; width: 44px; height: 44px; margin-bottom: 20px; border-radius: 50%; background: #04140f; }
.mk-auth-card h1 { margin: 0; font-family: 'basgro Head', 'basgro Readex', 'Segoe UI', Tahoma, system-ui, sans-serif; font-size: 28px; line-height: 1.3; font-weight: 600; letter-spacing: 0; }
.mk-auth-card h1:lang(en) { letter-spacing: -.025em; }
.mk-auth-card .intro { margin: 6px 0 28px; color: var(--a-mute); font-size: 14px; }

/* Google first, full width, then "or". */
.mk-auth .google-sign-in { display: block; min-height: 44px; margin-bottom: 18px; }
.mk-auth .g_id_signin, .mk-auth .g_id_signin > div { width: 100%; max-width: 100%; }
.mk-auth .google-error { margin: 8px 0 0; color: #9b2920; font-size: 13px; }
.mk-auth .mk-auth-divider { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; color: var(--a-mute); font-size: 12px; text-transform: uppercase; }
.mk-auth .mk-auth-divider::before, .mk-auth .mk-auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--a-line); }

/* Fields */
.mk-auth .auth-form { display: grid; gap: 14px; margin: 0; }
.mk-auth .field-group { display: grid; gap: 6px; min-width: 0; }
.mk-auth .field-group label { color: var(--a-ink-2); font-weight: 500; font-size: 14px; }
.mk-auth .field-shell { display: flex; align-items: center; gap: 6px; min-height: 46px; padding-inline: 14px; background: var(--a-field); border: 1px solid var(--a-line); border-radius: 12px; transition: border-color .15s, box-shadow .15s; }
.mk-auth .field-shell:hover { border-color: #b9c4bc; }
.mk-auth .field-shell:focus-within { border-color: var(--a-focus); box-shadow: 0 0 0 3px rgba(46, 158, 115, .14); }
.mk-auth .field-shell:has(input[aria-invalid="true"]) { border-color: #b42318; }
.mk-auth .field-shell input { flex: 1; min-width: 0; width: 100%; min-height: 44px; padding: 0; border: 0; outline: none; background: transparent; color: var(--a-ink); font: inherit; font-size: 15px; box-shadow: none; }
.mk-auth .field-shell input::placeholder { color: #8b9891; }
.mk-auth .field-shell input:-webkit-autofill { -webkit-text-fill-color: var(--a-ink); box-shadow: 0 0 0 1000px var(--a-field) inset; }
.mk-auth .field-icon { display: none; }
.mk-auth .password-toggle { flex: none; margin-inline-end: -8px; min-width: 40px; min-height: 40px; border: 0; border-radius: 10px; background: none; color: var(--a-mute); cursor: pointer; }
.mk-auth .password-toggle:hover { color: var(--a-ink); }
.mk-auth .field-hint { margin: 0; color: var(--a-mute); font-size: 12.5px; }

/* The one dark button */
.mk-auth .auth-submit { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 46px; margin-top: 4px; padding: 10px 20px; border: 0; border-radius: 999px; background: var(--a-ink); color: #fff; font: 600 15px/1.5 'basgro Readex', 'Segoe UI', Tahoma, sans-serif; cursor: pointer; box-shadow: 0 1px 2px rgba(4, 20, 15, .2), inset 0 1px 0 rgba(255, 255, 255, .08); }
.mk-auth .auth-submit:hover { background: #24362d; }
.mk-auth .auth-submit[disabled] { opacity: .7; cursor: progress; }

/* Links and small print */
.mk-auth .auth-alt { margin: 16px 0 0; text-align: center; color: var(--a-mute); font-size: 14px; }
.mk-auth .auth-alt + .auth-alt { margin-top: 8px; }
.mk-auth .auth-alt a, .mk-auth .auth-link, .mk-auth .auth-legal a { color: var(--a-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.mk-auth .auth-link { padding: 0; border: 0; background: none; font: inherit; cursor: pointer; }
.mk-auth .auth-legal { margin: 0; color: var(--a-mute); font-size: 12.5px; line-height: 1.8; }
.mk-auth .auth-security { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 24px 0 0; padding-top: 16px; border-top: 1px solid var(--a-line); color: var(--a-mute); font-size: 12.5px; }
.mk-auth .auth-security::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--a-focus); }

/* Messages */
.mk-auth .auth-status, .mk-auth .auth-error { margin: 0 0 18px; padding: 11px 14px; border-radius: 12px; font-size: 13.5px; }
.mk-auth .auth-status p, .mk-auth .auth-error p { margin: 0; }
.mk-auth .auth-status { background: #e8f5ec; color: #145338; }
.mk-auth .auth-error { background: #fdecea; color: #9b2920; }
.mk-auth .auth-honeypot { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip-path: inset(50%) !important; white-space: nowrap !important; }

@media (max-width: 480px) {
    .mk-auth-top { width: calc(100% - 32px); padding-block: 14px; }
    .mk-auth-center { place-items: start center; padding: 28px 16px 40px; }
}
@media (prefers-reduced-motion: reduce) {
    .mk-auth *, .mk-auth *::before, .mk-auth *::after { animation: none !important; transition: none !important; }
}

/* Split like the owner's reference: the form on the reading side, the field with Athar on the other. */
.mk-auth-split { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.mk-auth-side { display: flex; flex-direction: column; min-width: 0; }
.mk-auth-side .mk-auth-top { width: calc(100% - 64px); }
.mk-auth-show { position: relative; margin: 16px; border-radius: 24px; overflow: hidden; display: grid; place-items: center; isolation: isolate; background:
    radial-gradient(45% 50% at 50% 12%, #fbfcf9 0%, transparent 70%),
    radial-gradient(55% 45% at 15% 40%, #7fd4ae 0%, transparent 70%),
    radial-gradient(50% 45% at 90% 35%, #2e9e73 0%, transparent 70%),
    radial-gradient(60% 50% at 20% 95%, #d9b44a 0%, transparent 70%),
    radial-gradient(55% 50% at 85% 95%, #0b4e3b 0%, transparent 70%),
    linear-gradient(180deg, #dff3e9 0%, #7fd4ae 55%, #2e9e73 100%); }
.mk-auth-ask { position: relative; z-index: 1; display: flex; align-items: center; gap: 4px; width: min(78%, 460px); min-height: 72px; padding: 14px 14px 14px 18px; border-radius: 18px; background: rgba(255, 255, 255, .78); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 20px 50px rgba(4, 20, 15, .18); font-size: 16px; color: var(--a-ink); }
[dir="rtl"] .mk-auth-ask { padding: 14px 18px 14px 14px; }
.mk-auth-typed { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mk-auth-caret { flex: none; width: 2px; height: 20px; background: #2e9e73; animation: mk-auth-blink 1s steps(1) infinite; }
.mk-auth-ask b { flex: none; margin-inline-start: auto; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--a-ink); color: #fff; }
[dir="rtl"] .mk-auth-ask .flip { transform: scaleX(-1); }
.mk-auth-wave { position: absolute; z-index: 1; bottom: 0; inset-inline-end: 8%; width: min(30%, 220px); height: auto; filter: drop-shadow(0 24px 30px rgba(4, 20, 15, .3)); animation: mk-auth-bob 4s ease-in-out infinite; }
@keyframes mk-auth-blink { 50% { opacity: 0; } }
@keyframes mk-auth-bob { 50% { transform: translateY(-8px); } }
@media (max-width: 960px) {
    .mk-auth-split { grid-template-columns: minmax(0, 1fr); }
    .mk-auth-show { display: none; }
    .mk-auth-side .mk-auth-top { width: min(100% - 40px, 1120px); }
}
@media (max-width: 480px) { .mk-auth-side .mk-auth-top { width: calc(100% - 32px); } }

/* Email first, then the rest (basgro.js, data-steps). */
.mk-auth [hidden] { display: none !important; }
.mk-auth .field-shell.is-locked { background: #eef2ee; }
.mk-auth .field-shell.is-locked input { color: var(--a-mute); }
.mk-auth .auth-edit { flex: none; padding: 4px 8px; border: 0; background: none; color: var(--a-ink); font: inherit; font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.mk-auth .pw-rules { margin-top: 4px; color: var(--a-mute); font-size: 13px; }
.mk-auth .pw-rules p { margin: 0 0 4px; font-weight: 500; }
.mk-auth .pw-rules ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.mk-auth .pw-rules li { display: flex; align-items: center; gap: 8px; }
.mk-auth .pw-rules li::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: #a9b5ae; }
.mk-auth .pw-rules li.is-met { color: #156b42; }
.mk-auth .pw-rules li.is-met::before { width: 14px; height: 14px; background: #2e9e73 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 10px no-repeat; }

/* First-run steps after sign-up (the look, email, kind of business). */
.mk-auth .ob-steps { list-style: none; margin: 0 0 18px; padding: 0; display: flex; justify-content: center; gap: 6px; }
.mk-auth .ob-steps li { width: 26px; height: 5px; border-radius: 999px; background: var(--a-line); }
.mk-auth .ob-steps li.done { background: #2e9e73; opacity: .5; }
.mk-auth .ob-steps li.now { background: #2e9e73; width: 40px; }
.mk-auth .ob-form { display: grid; gap: 14px; }
.mk-auth .ob-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mk-auth .ob-choice { position: relative; display: grid; justify-items: center; gap: 8px; padding: 14px 10px; border: 1.5px solid var(--a-line); border-radius: 16px; background: var(--a-field); cursor: pointer; text-align: center; transition: border-color .15s, box-shadow .15s; color: var(--a-ink); }
.mk-auth .ob-choice input { position: absolute; opacity: 0; pointer-events: none; }
.mk-auth .ob-choice b { font-size: 14px; font-weight: 600; }
.mk-auth .ob-choice.small { padding: 12px 8px; }
.mk-auth .ob-choice.small b { font-size: 13px; font-weight: 500; }
.mk-auth .ob-choice svg { color: #1f7a57; }
.mk-auth .ob-choice:has(input:checked) { border-color: #2e9e73; box-shadow: 0 0 0 3px rgba(46, 158, 115, .18); }
.mk-auth .ob-choice:has(input:focus-visible) { outline: 2px solid var(--a-focus); outline-offset: 2px; }
.mk-auth .ob-theme { display: grid; grid-template-rows: 10px 1fr 1fr; gap: 6px; width: 100%; aspect-ratio: 4 / 3; padding: 10px; border-radius: 12px; }
.mk-auth .ob-theme i { display: block; border-radius: 6px; }
.mk-auth .ob-theme.light { background: #f6f8f5; border: 1px solid #e1e7e1; }
.mk-auth .ob-theme.light i { background: #dfe7e1; } .mk-auth .ob-theme.light i:first-child { background: #2e9e73; width: 40%; }
.mk-auth .ob-theme.dark { background: #0e1512; border: 1px solid #1f2b25; }
.mk-auth .ob-theme.dark i { background: #1c2722; } .mk-auth .ob-theme.dark i:first-child { background: #2e9e73; width: 40%; }
.mk-auth .ob-check { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1.5px solid var(--a-line); border-radius: 16px; background: var(--a-field); cursor: pointer; text-align: start; }
.mk-auth .ob-check input { width: 20px; height: 20px; margin-top: 2px; accent-color: #1f7a57; flex-shrink: 0; }
.mk-auth .ob-check span { display: grid; gap: 4px; }
.mk-auth .ob-check b { font-size: 14.5px; color: var(--a-ink); }
.mk-auth .ob-check small { font-size: 13px; color: var(--a-mute); line-height: 1.6; }
.mk-auth .ob-note { margin: 0; font-size: 12.5px; color: var(--a-mute); text-align: start; }
.mk-auth .ob-skip { margin-top: 10px; text-align: center; }
.mk-auth .ob-skip button { border: 0; background: none; color: var(--a-mute); font: inherit; font-size: 14px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 520px) { .mk-auth .ob-choices:not(.two) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
