/* ==========================================================================
   Auth drawer — social login inayofunguka pembeni (kulia; kushoto kwa RTL)
   Inatumia CSS variables za gold-black.css (dark + light theme).
   ========================================================================== */

/* --- Kitufe cha header --- */
.auth-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1.5px solid var(--gold);
    background: var(--gold-subtle);
    color: var(--gold);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
    cursor: pointer;
    transition: background-color .2s, color .2s, border-color .2s;
}
.auth-trigger:focus-visible,
.auth-close:focus-visible,
.auth-provider:focus-visible,
.auth-logout:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; }

.auth-trigger--user { width: 38px; padding: 0; justify-content: center; overflow: hidden; }
.auth-trigger-avatar { width: 100%; height: 100%; object-fit: cover; }
.auth-trigger-initial { font-weight: 800; font-size: 15px; }

/* --- Backdrop --- */
.auth-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: radial-gradient(120% 80% at 100% 0%, rgba(226, 232, 240, 0.10), transparent 60%), rgba(5, 8, 12, 0.6);
    backdrop-filter: blur(6px) saturate(120%);
    -webkit-backdrop-filter: blur(6px) saturate(120%);
    opacity: 0;
    transition: opacity .35s ease;
}
.auth-backdrop.is-open { opacity: 1; }

/* --- Drawer --- */
.auth-drawer {
    --auth-ease: cubic-bezier(.16, 1, .3, 1);
    --auth-hero-bg:
        radial-gradient(90% 70% at 85% 0%, rgba(224, 200, 104, 0.22), transparent 60%),
        radial-gradient(70% 60% at 0% 100%, rgba(16, 185, 129, 0.10), transparent 65%),
        linear-gradient(160deg, #0a3552 0%, #07293f 100%);
    --auth-hero-text: #fef8ec;
    --auth-hero-muted: rgba(254, 248, 236, 0.62);
    position: fixed;
    top: 0;
    bottom: 0;
    inset-inline-end: 0;
    z-index: 1001;
    width: min(440px, 100vw);
    display: flex;
    flex-direction: column;
    background: var(--bg-surface);
    border-inline-start: 1px solid var(--border-color);
    box-shadow: -30px 0 80px -20px rgba(0, 0, 0, 0.55);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform .5s var(--auth-ease), visibility 0s linear .5s;
    outline: none;
    overflow: hidden;
}
[data-theme="light"] .auth-drawer {
    --auth-hero-bg:
        radial-gradient(90% 70% at 85% 0%, rgba(15, 23, 42, 0.06), transparent 60%),
        radial-gradient(70% 60% at 0% 100%, rgba(15, 23, 42, 0.04), transparent 65%),
        linear-gradient(160deg, #ffffff 0%, #f1f5f9 100%);
    --auth-hero-text: #0f172a;
    --auth-hero-muted: rgba(15, 23, 42, 0.6);
    box-shadow: -30px 0 80px -20px rgba(15, 23, 42, 0.15);
}
[dir="rtl"] .auth-drawer { transform: translateX(-100%); }
.auth-drawer.is-open,
[dir="rtl"] .auth-drawer.is-open {
    transform: translateX(0);
    visibility: visible;
    transition: transform .5s var(--auth-ease), visibility 0s;
}

/* --- Hero (juu) --- */
.auth-hero {
    position: relative;
    flex: 0 0 auto;
    padding: 18px 22px 30px;
    background: var(--auth-hero-bg);
    color: var(--auth-hero-text);
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
    isolation: isolate;
}
.auth-hero::after {
    /* mstari wa dhahabu chini */
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold) 30%, var(--gold-light) 50%, var(--gold) 70%, transparent);
    opacity: .7;
}
.auth-hero-pattern {
    position: absolute;
    inset: -40px;
    z-index: -1;
    background-color: var(--gold);
    opacity: .09;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23000' stroke-width='1.1'%3E%3Cpath d='M28 6l6.4 15.6L50 28l-15.6 6.4L28 50l-6.4-15.6L6 28l15.6-6.4z'/%3E%3Cpath d='M12.4 12.4h31.2v31.2H12.4z'/%3E%3Ccircle cx='28' cy='28' r='5'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 56px 56px;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23000' stroke-width='1.1'%3E%3Cpath d='M28 6l6.4 15.6L50 28l-15.6 6.4L28 50l-6.4-15.6L6 28l15.6-6.4z'/%3E%3Cpath d='M12.4 12.4h31.2v31.2H12.4z'/%3E%3Ccircle cx='28' cy='28' r='5'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 56px 56px;
    animation: auth-drift 60s linear infinite;
}
.auth-hero-glow {
    position: absolute;
    z-index: -1;
    width: 260px;
    height: 260px;
    top: -120px;
    inset-inline-end: -80px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(241, 245, 249, 0.2), transparent 70%);
    filter: blur(10px);
    animation: auth-breathe 7s ease-in-out infinite;
}

.auth-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.auth-drawer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--auth-hero-text);
    font-family: 'Amiri', serif;
    font-size: 19px;
    font-weight: 700;
    text-decoration: none;
}
.auth-brand-badge {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: transparent;
    border: none;
    box-shadow: none;
}
.auth-brand-badge img {
    border-radius: 0;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35));
}
.auth-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(226, 232, 240, 0.3);
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--auth-hero-text);
    cursor: pointer;
    transition: transform .3s var(--auth-ease, ease), background-color .2s, border-color .2s;
}

.auth-verse { margin: 26px 0 0; text-align: center; }
.auth-verse-ar {
    margin: 0;
    font-family: 'Amiri', serif;
    font-size: 34px;
    line-height: 1.5;
    font-weight: 700;
    background: linear-gradient(120deg, var(--gold-light) 0%, var(--gold) 40%, #ffffff 55%, var(--gold) 70%, var(--gold-dark) 100%);
    background-size: 220% 100%;
    -webkit-background-clip: text;
            background-clip: text;
    color: transparent;
    animation: auth-shimmer 6s ease-in-out infinite;
}
[data-theme="light"] .auth-verse-ar {
    background-image: linear-gradient(120deg, var(--gold-dark) 0%, var(--gold) 40%, #ffffff 55%, var(--gold) 70%, var(--gold-dark) 100%);
}
.auth-verse figcaption {
    margin-top: 6px;
    font-size: 12px;
    font-style: italic;
    letter-spacing: .2px;
    color: var(--auth-hero-muted);
}

/* Kichwa kinaonekana kwenye "Umesahau nenosiri?" tu. */
.auth-intro h2 { margin-top: 0; }
.auth-drawer:not([data-auth-mode="forgot"]) .auth-intro { margin: 0; }
.auth-drawer[data-auth-mode="forgot"] .auth-intro { margin-bottom: 20px; }
.auth-intro .auth-lead { margin: 0; }
.auth-drawer .sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* --- Mwili --- */
.auth-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 26px 24px 32px;
    scrollbar-width: thin;
}

.auth-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2.4px;
    color: var(--gold);
}
.auth-eyebrow::before {
    content: "";
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--gold-gradient);
}
.auth-drawer-body h2 {
    margin: 8px 0 8px;
    font-family: 'Amiri', serif;
    font-size: 32px;
    line-height: 1.15;
    color: var(--text-primary);
}
.auth-lead {
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-muted);
}

/* --- Faida (perks) --- */
.auth-perks {
    list-style: none;
    margin: 0 0 22px;
    padding: 6px;
    display: grid;
    gap: 2px;
    border-radius: 16px;
    background: var(--gold-subtle);
    border: 1px solid var(--border-color);
}
.auth-perks li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 10px;
    border-radius: 11px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-secondary);
}
.auth-perk-icon {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: var(--bg-surface);
    color: var(--gold);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04), 0 0 0 1px var(--border-color);
}

/* --- Vitufe vya providers --- */
.auth-providers { display: grid; gap: 10px; }
.auth-provider {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 54px;
    padding: 8px 18px 8px 8px;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    background: var(--bg-surface-elevated);
    color: var(--text-primary);
    font-size: 14.5px;
    font-weight: 700;
    text-decoration: none;
    overflow: hidden;
    isolation: isolate;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    transition: transform .25s var(--auth-ease, ease), box-shadow .25s, border-color .2s, background-color .2s;
}
[dir="rtl"] .auth-provider { padding: 8px 8px 8px 18px; }
.auth-provider::before {
    /* mng'ao unaopita juu ya kitufe */
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.28) 50%, transparent 65%);
    transform: translateX(-120%);
    transition: transform .7s var(--auth-ease, ease);
}
.auth-provider:active { transform: translateY(0) scale(.99); }
.auth-provider-icon {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 10px;
}
.auth-provider > span[data-i18n] { flex: 1; }
.auth-provider-arrow {
    flex: 0 0 auto;
    opacity: .45;
    transition: transform .3s var(--auth-ease, ease), opacity .2s;
}
[dir="rtl"] .auth-provider-arrow { transform: scaleX(-1); }

.auth-provider--google { background: #ffffff; color: #1f1f1f; border-color: #dadce0; }
.auth-provider--google .auth-provider-icon { background: #f1f3f4; }
.auth-provider--google::before { background: linear-gradient(105deg, transparent 35%, rgba(66, 133, 244, 0.12) 50%, transparent 65%); }
.auth-provider--facebook { background: linear-gradient(135deg, #1877f2, #0f5fd1); color: #ffffff; border-color: transparent; }
.auth-provider--facebook .auth-provider-icon { background: rgba(255, 255, 255, 0.16); }
.auth-provider--x { background: #000000; color: #ffffff; border-color: #2f3336; }
.auth-provider--x .auth-provider-icon { background: rgba(255, 255, 255, 0.1); }

.auth-fineprint {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 22px 0 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--emerald-subtle);
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-muted);
}
.auth-fineprint svg { flex: 0 0 auto; margin-top: 2px; color: var(--emerald); }

/* --- Mwendo wa kufunguka (staggered) --- */
.auth-drawer.is-open .auth-verse,
.auth-drawer.is-open .auth-drawer-body > * {
    animation: auth-rise .6s var(--auth-ease) both;
}
.auth-drawer.is-open .auth-verse { animation-delay: .12s; }
.auth-drawer.is-open .auth-drawer-body > :nth-child(1) { animation-delay: .18s; }
.auth-drawer.is-open .auth-drawer-body > :nth-child(2) { animation-delay: .24s; }
.auth-drawer.is-open .auth-drawer-body > :nth-child(3) { animation-delay: .30s; }
.auth-drawer.is-open .auth-drawer-body > :nth-child(4) { animation-delay: .36s; }
.auth-drawer.is-open .auth-drawer-body > :nth-child(5) { animation-delay: .42s; }
.auth-drawer.is-open .auth-provider { animation: auth-rise .55s var(--auth-ease) both; }
.auth-drawer.is-open .auth-provider:nth-child(1) { animation-delay: .34s; }
.auth-drawer.is-open .auth-provider:nth-child(2) { animation-delay: .40s; }
.auth-drawer.is-open .auth-provider:nth-child(3) { animation-delay: .46s; }

@keyframes auth-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes auth-drift { to { transform: translate(56px, 56px); } }
@keyframes auth-breathe { 0%, 100% { opacity: .7; transform: scale(1); } 50% { opacity: 1; transform: scale(1.12); } }
@keyframes auth-shimmer { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0 0; } }

/* ==========================================================================
   Ingia | Jisajili — tabs + fomu ya email
   ========================================================================== */
.auth-drawer:not([data-auth-mode="login"]) .auth-when-login,
.auth-drawer:not([data-auth-mode="register"]) .auth-when-register,
.auth-drawer:not([data-auth-mode="forgot"]) .auth-when-forgot,
.auth-drawer[data-auth-mode="forgot"] .auth-hide-forgot { display: none !important; }

.auth-tabs {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 0 0 20px;
    padding: 4px;
    border-radius: 14px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
}
.auth-tab {
    position: relative;
    z-index: 1;
    height: 40px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text-muted);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: color .25s;
}
.auth-tab[aria-selected="true"] { color: var(--text-primary); }
.auth-tab:focus-visible { outline: 2px solid var(--border-focus); outline-offset: -2px; }
.auth-tabs-thumb {
    position: absolute;
    top: 4px;
    bottom: 4px;
    inset-inline-start: 4px;
    width: calc(50% - 4px);
    border-radius: 10px;
    background: var(--bg-surface);
    box-shadow: 0 2px 10px -2px rgba(0, 0, 0, 0.35), inset 0 0 0 1px var(--border-color);
    transition: transform .4s var(--auth-ease, ease);
}
.auth-drawer[data-auth-mode="register"] .auth-tabs-thumb { transform: translateX(100%); }
[dir="rtl"] .auth-drawer[data-auth-mode="register"] .auth-tabs-thumb { transform: translateX(-100%); }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0 16px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-dim);
}
.auth-divider::before,
.auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border-color); }

.auth-form { display: grid; gap: 14px; }
.auth-drawer.is-open .auth-form { animation: auth-rise .45s var(--auth-ease) both; }
.auth-field { display: grid; gap: 6px; }
.auth-field label {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-secondary);
}
.auth-field input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-surface-elevated);
    color: var(--text-primary);
    font: inherit;
    font-size: 15px;
    transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.auth-field input::placeholder { color: var(--text-dim); }
.auth-field input:focus {
    outline: none;
    border-color: var(--gold);
    background: var(--bg-surface);
    box-shadow: 0 0 0 4px var(--gold-subtle);
}
.auth-field input[aria-invalid="true"] { border-color: #dc2626; box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12); }
.auth-field-error { margin: 0; font-size: 12.5px; line-height: 1.5; color: #ef4444; }
[data-theme="light"] .auth-field-error { color: #b91c1c; }

.auth-input-wrap { position: relative; }
.auth-input-wrap input { padding-inline-end: 48px; }
.auth-eye {
    position: absolute;
    top: 50%;
    inset-inline-end: 6px;
    transform: translateY(-50%);
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--text-dim);
    cursor: pointer;
}
.auth-eye:focus-visible { outline: 2px solid var(--border-focus); }
.auth-eye .i-hide,
.auth-eye[aria-pressed="true"] .i-show { display: none; }
.auth-eye[aria-pressed="true"] .i-hide { display: block; }

.auth-strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: -6px; }
.auth-strength span { height: 4px; border-radius: 4px; background: var(--border-subtle); transition: background-color .3s; }
.auth-strength[data-level="1"] span:nth-child(-n+1) { background: #ef4444; }
.auth-strength[data-level="2"] span:nth-child(-n+2) { background: #f59e0b; }
.auth-strength[data-level="3"] span:nth-child(-n+3) { background: var(--gold); }
.auth-strength[data-level="4"] span { background: var(--emerald); }

.auth-check {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
}
.auth-check input { width: 18px; height: 18px; accent-color: var(--gold); }

.auth-submit {
    position: relative;
    height: 50px;
    margin-top: 4px;
    border: 0;
    border-radius: 14px;
    background: var(--gold-gradient);
    color: #1a1206;
    font: inherit;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .2px;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 10px 24px -10px rgba(226, 232, 240, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    transition: transform .25s var(--auth-ease, ease), box-shadow .25s, filter .2s;
}
[data-theme="light"] .auth-submit { color: #ffffff; box-shadow: 0 10px 24px -10px rgba(15, 23, 42, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.auth-submit:active { transform: none; }
.auth-submit:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 3px; }
.auth-submit.is-loading { pointer-events: none; color: transparent; }
.auth-submit.is-loading::after {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2.5px solid rgba(26, 18, 6, 0.25);
    border-top-color: #1a1206;
    animation: auth-spin .7s linear infinite;
}
[data-theme="light"] .auth-submit.is-loading::after { border-color: rgba(255, 255, 255, 0.35); border-top-color: #fff; }
@keyframes auth-spin { to { transform: rotate(360deg); } }

.auth-switch { margin: 2px 0 0; text-align: center; font-size: 13px; color: var(--text-muted); }
.auth-switch button {
    padding: 0;
    border: 0;
    background: none;
    color: var(--gold);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: transparent;
    transition: text-decoration-color .2s;
}

.auth-perks.auth-when-register { margin: 20px 0 0; }

/* --- Umesahau nenosiri --- */
.auth-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.auth-forgot-link {
    padding: 0;
    border: 0;
    background: none;
    color: var(--gold);
    font: inherit;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
}
.auth-forgot-link:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; border-radius: 4px; }
#auth-panel-forgot { display: grid; gap: 14px; }
.auth-drawer.is-open #auth-panel-forgot { animation: auth-rise .45s var(--auth-ease) both; }
.auth-sent {
    padding: 22px 20px;
    border-radius: 16px;
    text-align: center;
    background: var(--emerald-subtle);
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.auth-sent-icon {
    display: inline-grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin-bottom: 10px;
    border-radius: 50%;
    background: var(--bg-surface);
    color: var(--emerald);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.12);
}
.auth-sent h3 { margin: 0 0 6px; font-family: 'Amiri', serif; font-size: 22px; color: var(--text-primary); }
.auth-sent p { margin: 0; font-size: 13.5px; line-height: 1.65; color: var(--text-secondary); }
.auth-sent strong { color: var(--text-primary); overflow-wrap: anywhere; }
.auth-sent .auth-sent-hint { margin-top: 8px; font-size: 12px; color: var(--text-muted); }

/* --- Ukurasa wa kuweka nenosiri jipya --- */
.auth-page {
    --auth-ease: cubic-bezier(.16, 1, .3, 1);
    --auth-hero-bg:
        radial-gradient(90% 70% at 85% 0%, rgba(224, 200, 104, 0.22), transparent 60%),
        linear-gradient(160deg, #0a3552 0%, #07293f 100%);
    display: grid;
    place-items: center;
    min-height: calc(100vh - 160px);
    padding: 40px 16px 64px;
}
[data-theme="light"] .auth-page {
    --auth-hero-bg:
        radial-gradient(90% 70% at 85% 0%, rgba(15, 23, 42, 0.06), transparent 60%),
        linear-gradient(160deg, #ffffff 0%, #f1f5f9 100%);
}
.auth-card {
    width: min(440px, 100%);
    border-radius: 22px;
    overflow: hidden;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    animation: auth-rise .6s var(--auth-ease) both;
}
.auth-hero--compact { display: grid; place-items: center; padding: 30px 20px; }
.auth-hero--compact .auth-brand-badge { width: 56px; height: 56px; border-radius: 16px; }
.auth-hero--compact .auth-brand-badge img { width: 40px; height: 40px; }
.auth-card-body { padding: 26px 24px 30px; }
.auth-card-body h1 { margin: 8px 0; font-family: 'Amiri', serif; font-size: 30px; line-height: 1.2; color: var(--text-primary); }

/* --- Ujumbe --- */
.auth-alert {
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
}
.auth-alert--error {
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.35);
    color: #dc2626;
}

.auth-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 1002;
    transform: translateX(-50%);
    max-width: calc(100vw - 32px);
    padding: 12px 18px;
    border-radius: 12px;
    background: var(--bg-surface);
    border: 1.5px solid var(--gold);
    box-shadow: var(--card-shadow);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    transition: opacity .4s, transform .4s;
}
.auth-toast.is-hidden { opacity: 0; transform: translate(-50%, 12px); pointer-events: none; }

/* --- Profaili (ameingia) --- */
.auth-profile { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.auth-profile-avatar {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gold);
}
.auth-profile-initial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--gold-subtle);
    color: var(--gold);
    font-size: 24px;
    font-weight: 800;
}
.auth-profile-text { min-width: 0; }
.auth-profile-text h2 { margin: 0; font-size: 24px; }
.auth-profile-text p { margin: 2px 0 0; font-size: 13px; color: var(--text-muted); overflow-wrap: anywhere; }
.supporter-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 999px;
    margin-top: 6px;
    background: rgba(226, 232, 240, 0.15);
    color: var(--gold, #f1f5f9);
    border: 1px solid rgba(226, 232, 240, 0.4);
    letter-spacing: 0.3px;
}
.supporter-badge-gold {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.28), rgba(226, 232, 240, 0.18));
    color: #f1f5f9;
    border-color: rgba(226, 232, 240, 0.55);
}
.supporter-badge-silver {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
    border-color: rgba(148, 163, 184, 0.45);
}

.auth-links { display: grid; gap: 8px; margin-bottom: 18px; }
.auth-links a {
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}
.auth-links a { transition: border-color .2s, transform .2s; }
.auth-logout {
    width: 100%;
    min-height: 46px;
    border-radius: 12px;
    border: 1.5px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

body.auth-drawer-open { overflow: hidden; }

/* --- Simu --- */
@media (max-width: 640px) {
    .auth-trigger { width: 38px; padding: 0; justify-content: center; }
    .auth-trigger-label { display: none; }
    .site-header .language select { max-width: 104px; }
    .auth-drawer { width: 100vw; border-inline-start: 0; }
    .auth-drawer-body { padding: 22px 18px 28px; }
    .auth-drawer-body h2 { font-size: 28px; }
    .auth-hero { padding: 14px 18px 24px; }
    .auth-verse { margin-top: 18px; }
    .auth-verse-ar { font-size: 30px; }
}
@media (max-width: 430px) {
    .site-header .brand small { display: none; }
    .site-header .nav-controls { gap: 5px; }
    .site-header .language select { max-width: 100px; padding: 6px 2px 6px 8px; }
}

@media (prefers-reduced-motion: reduce) {
    .auth-drawer, .auth-backdrop, .auth-toast, .auth-provider, .auth-close, .auth-tabs-thumb, .auth-submit { transition: none; }
    .auth-drawer.is-open .auth-form, .auth-drawer.is-open #auth-panel-forgot, .auth-card { animation: none; }
    .auth-hero-pattern, .auth-hero-glow, .auth-verse-ar,
    .auth-drawer.is-open .auth-verse,
    .auth-drawer.is-open .auth-drawer-body > *,
    .auth-drawer.is-open .auth-provider { animation: none; }
}

/* Nafasi kati ya kitufe cha Google na "Huna akaunti?" */
.auth-providers + .auth-switch,
.auth-social-actions + .auth-switch { margin-top: 18px; }
.auth-social-actions { margin: 0; }

/* "Nikumbuke" (kushoto) + "Umesahau nenosiri?" (kulia) chini ya nenosiri */
.auth-row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: -4px;
}
.auth-row-between .auth-forgot-link { font-size: 13px; }

/* ==========================================================================
   Google-First Luxury Auth Box & Benefits
   ========================================================================== */
.auth-welcome-title {
    font-size: 21px !important;
    font-weight: 800 !important;
    color: var(--text-primary) !important;
    margin: 0 0 8px !important;
    letter-spacing: -0.3px;
}

.auth-welcome-lead {
    font-size: 13.5px !important;
    color: var(--text-muted) !important;
    line-height: 1.6 !important;
    margin: 0 0 20px !important;
}

.auth-google-box {
    margin: 8px 0 20px;
    padding: 22px 18px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(226, 232, 240, 0.09) 0%, rgba(226, 232, 240, 0.02) 100%);
    border: 1.5px solid rgba(226, 232, 240, 0.35);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
    text-align: center;
}

.auth-google-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 9999px;
    background: rgba(226, 232, 240, 0.15);
    border: 1px solid rgba(226, 232, 240, 0.3);
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.8px;
    color: var(--gold);
    text-transform: uppercase;
    margin-bottom: 16px;
}

.auth-google-action-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 18px !important;
    border-radius: 14px !important;
    background: #ffffff !important;
    color: #1f1f1f !important;
    border: 1.5px solid #dadce0 !important;
    text-decoration: none !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15) !important;
    position: relative !important;
    overflow: hidden !important;
}

.auth-clean-head {
    margin: 0 0 16px;
    text-align: center;
}

.auth-title-clean {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}

.auth-google-icon-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #f8f9fa;
    flex-shrink: 0;
}

.auth-google-text {
    flex: 1;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    color: #1f1f1f;
    letter-spacing: 0.2px;
}

.auth-google-arrow {
    font-size: 16px;
    font-weight: 800;
    color: #0a3f66;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.auth-benefits-list {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px dashed rgba(226, 232, 240, 0.25);
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
}

[dir="rtl"] .auth-benefits-list {
    text-align: right;
}

.auth-benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.auth-benefit-item strong {
    color: var(--text-primary);
}

.benefit-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: rgba(226, 232, 240, 0.2);
    color: var(--gold);
    font-size: 10.5px;
    font-weight: 900;
    flex-shrink: 0;
    margin-top: 2px;
}
