/* Account pages (sign in / sign up / forgot / reset / verify) — AFCON 2027, Outfit, calm. */

:root {
    --pitch: #096b3c;
    --pitch-deep: #06482a;
    --pitch-soft: #0c8349;
    --ivory: #faf6ec;
    --paper: #fffdf8;
    --gold: #fb8916;
    --gold-bright: #ffa53d;
    --ink: #1c1a16;
    --ink-soft: #4a463d;
    --muted: #7a7366;
    --rule: #e3d8bf;
    --danger: #b42318;
    --ok: #15803d;
    --font: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    min-height: 100%;
}

body.auth-body {
    font-family: var(--font);
    background: var(--ivory);
    color: var(--ink);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--pitch); }

.afcon-icon {
    width: 1.2em;
    height: 1.2em;
    flex: 0 0 auto;
    vertical-align: -0.2em;
}

/* ---------- Frame ---------- */
.auth-frame {
    display: grid;
    grid-template-columns: minmax(340px, 44%) 1fr;
    min-height: 100vh;
}

.auth-side {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2rem;
    padding: 2.5rem 3rem;
    color: var(--ivory);
    background:
        radial-gradient(ellipse at 80% 10%, rgba(12, 131, 73, 0.95), transparent 60%),
        linear-gradient(165deg, var(--pitch) 0%, var(--pitch-deep) 80%);
}

/* faint pitch markings */
.auth-pitch {
    position: absolute;
    right: -160px;
    bottom: -160px;
    width: 460px;
    height: 460px;
    border: 2px solid rgba(250, 246, 236, 0.08);
    border-radius: 50%;
    pointer-events: none;
}

.auth-pitch::after {
    content: '';
    position: absolute;
    left: 50%;
    top: -400px;
    bottom: -400px;
    border-left: 2px solid rgba(250, 246, 236, 0.06);
}

.auth-logo img {
    height: 34px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.95;
}

.auth-side__copy {
    position: relative;
    max-width: 30rem;
}

.auth-side__eyebrow {
    margin: 0 0 1rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gold-bright);
}

.auth-side__title {
    margin: 0 0 1rem;
    font-size: clamp(2.2rem, 3.6vw, 3.2rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.02em;
}

.auth-side__text {
    margin: 0;
    font-size: 1.05rem;
    color: rgba(250, 246, 236, 0.78);
}

.auth-hosts {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin: 0;
    padding: 1.25rem 0 0;
    list-style: none;
    border-top: 1px solid rgba(250, 246, 236, 0.14);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(250, 246, 236, 0.75);
}

.auth-hosts li {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-flag {
    display: inline-block;
    width: 22px;
    height: 14px;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.auth-flag--ug { background: linear-gradient(180deg, #000 0 16.6%, #fcdc04 16.6% 33.3%, #d90000 33.3% 50%, #000 50% 66.6%, #fcdc04 66.6% 83.3%, #d90000 83.3% 100%); }
.auth-flag--ke { background: linear-gradient(180deg, #000 0 30%, #fff 30% 35%, #bb0000 35% 65%, #fff 65% 70%, #006600 70% 100%); }
.auth-flag--tz { background: linear-gradient(146deg, #1eb53a 0 38%, #fcd116 38% 42%, #000 42% 58%, #fcd116 58% 62%, #00a3dd 62% 100%); }

/* ---------- Main column ---------- */
.auth-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1.5rem 2.5rem;
}

.auth-topbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    max-width: 440px;
    min-height: 44px;
}

.auth-logo--mobile {
    display: none;
}

.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 44px;
    padding: 0 0.25rem;
    color: var(--ink-soft);
    font-weight: 600;
    text-decoration: none;
}

.auth-stripe {
    display: none;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    margin: auto 0;
    padding: 2.5rem 0 1rem;
}

.auth-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: 1.25rem;
    border-radius: 16px;
    background: rgba(251, 137, 22, 0.14);
    color: var(--pitch);
}

.auth-card__icon .afcon-icon {
    width: 28px;
    height: 28px;
}

.auth-card__title {
    margin: 0 0 0.5rem;
    font-size: clamp(1.9rem, 4vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.auth-card__lead {
    margin: 0 0 2rem;
    color: var(--muted);
    font-size: 1.05rem;
}

/* ---------- Fields ---------- */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.auth-field label {
    font-weight: 600;
    font-size: 0.95rem;
}

.auth-field small {
    color: var(--muted);
    font-size: 0.85rem;
}

.auth-field input[type="email"],
.auth-field input[type="text"],
.auth-field input[type="password"] {
    width: 100%;
    min-height: 56px;
    padding: 0 1rem;
    border: 1.5px solid var(--rule);
    border-radius: 12px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 1.08rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-field input:focus {
    outline: none;
    border-color: var(--pitch);
    box-shadow: 0 0 0 4px rgba(9, 107, 60, 0.12);
}

.auth-field input.email-valid { border-color: var(--ok); }
.auth-field input.email-invalid { border-color: var(--danger); }
.auth-field input.email-checking { border-color: var(--gold); }

.auth-pass {
    position: relative;
}

.auth-pass input {
    padding-right: 4.75rem !important;
}

.auth-pass__toggle {
    position: absolute;
    top: 50%;
    right: 0.5rem;
    transform: translateY(-50%);
    min-width: 60px;
    min-height: 40px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--pitch);
    font: inherit;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
}

.auth-pass__toggle:hover {
    background: rgba(9, 107, 60, 0.06);
}

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.95rem;
}

.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 44px;
    color: var(--ink-soft);
    cursor: pointer;
}

.auth-check input {
    width: 20px;
    height: 20px;
    accent-color: var(--pitch);
}

.auth-link {
    color: var(--pitch);
    font-weight: 600;
    text-decoration: none;
}

.auth-link:hover { text-decoration: underline; }

/* ---------- Buttons ---------- */
.auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    min-height: 58px;
    padding: 0 1.5rem;
    border: 0;
    border-radius: 12px;
    background: var(--pitch);
    color: var(--ivory);
    font: inherit;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.1s ease;
}

.auth-btn:hover { background: var(--pitch-soft); }
.auth-btn:active { transform: translateY(1px); }
.auth-btn:disabled { opacity: 0.6; cursor: default; }
.auth-btn.is-busy { opacity: 0.75; }

.auth-btn--gold {
    background: var(--gold);
    color: var(--pitch-deep);
}

.auth-btn--gold:hover { background: var(--gold-bright); }

.auth-btn--ghost {
    background: #fff;
    color: var(--ink);
    border: 1.5px solid var(--rule);
}

.auth-btn--ghost:hover { background: var(--paper); border-color: #cfc3a6; }

.auth-btn--google svg { width: 20px; height: 20px; }

.auth-or {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--muted);
    font-size: 0.85rem;
}

.auth-or::before,
.auth-or::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--rule);
}

.auth-foot {
    margin: 1.75rem 0 0;
    text-align: center;
    color: var(--muted);
}

/* ---------- Messages ---------- */
.auth-alert {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    margin: 0 0 1.5rem;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    font-size: 0.98rem;
    line-height: 1.45;
}

.auth-alert .afcon-icon { margin-top: 0.1rem; }
.auth-alert a { font-weight: 700; color: inherit; }
.auth-alert--error { background: #fdecea; color: #8a1c13; }
.auth-alert--success { background: #e6f4ea; color: #14532d; }
.auth-alert--info { background: #fff6dc; color: #6b4e00; }

/* Email chip shown on verify */
.auth-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    max-width: 100%;
    margin: -1rem 0 1.75rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--rule);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---------- 6-digit code ---------- */
.verify-otp-group {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.6rem;
}

.verify-otp-box {
    width: 100%;
    aspect-ratio: 1 / 1.15;
    min-height: 56px;
    border: 1.5px solid var(--rule);
    border-radius: 12px;
    background: #fff;
    text-align: center;
    font: inherit;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--ink);
}

.verify-otp-box:focus {
    outline: none;
    border-color: var(--pitch);
    box-shadow: 0 0 0 4px rgba(9, 107, 60, 0.12);
}

.verify-timer {
    margin: 0;
    color: var(--muted);
    text-align: center;
}

.verify-timer.expired { color: var(--danger); }

.verify-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.verify-actions form { margin: 0; }

.verify-link-btn {
    min-height: 44px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--pitch);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.verify-link-btn:disabled { color: var(--muted); cursor: default; }

/* Password strength hint */
.auth-meter {
    height: 6px;
    border-radius: 999px;
    background: var(--rule);
    overflow: hidden;
}

.auth-meter span {
    display: block;
    height: 100%;
    width: 0;
    background: var(--danger);
    transition: width 0.2s ease, background-color 0.2s ease;
}

.auth-help {
    margin: 1.5rem 0 0;
    text-align: center;
}

.auth-help a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--muted);
    font-size: 0.92rem;
    text-decoration: none;
}

/* ---------- Phones ---------- */
@media (max-width: 900px) {
    .auth-frame {
        grid-template-columns: 1fr;
    }

    .auth-side {
        display: none;
    }

    .auth-main {
        padding: 0 1.25rem 2rem;
        align-items: stretch;
    }

    .auth-topbar {
        justify-content: space-between;
        max-width: none;
        margin: 0 -1.25rem;
        padding: 0.75rem 1.25rem;
        width: auto;
        background: var(--pitch);
    }

    .auth-logo--mobile {
        display: inline-flex;
    }

    .auth-logo--mobile img {
        height: 30px;
        filter: brightness(0) invert(1);
    }

    .auth-back {
        color: var(--ivory);
    }

    .auth-stripe {
        display: flex;
        height: 5px;
        margin: 0 -1.25rem;
    }

    .auth-stripe span { flex: 1; }
    .auth-stripe span:nth-child(1) { background: linear-gradient(90deg, #000 0 33.3%, #fcdc04 33.3% 66.6%, #d90000 66.6%); }
    .auth-stripe span:nth-child(2) { background: linear-gradient(90deg, #000 0 33.3%, #bb0000 33.3% 66.6%, #006600 66.6%); }
    .auth-stripe span:nth-child(3) { background: linear-gradient(90deg, #1eb53a 0 25%, #fcd116 25% 50%, #000 50% 75%, #00a3dd 75%); }

    .auth-card {
        max-width: 480px;
        margin: 0 auto;
        padding-top: 2rem;
    }

    .auth-card__lead {
        margin-bottom: 1.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}

[hidden] {
    display: none !important;
}

/* ===== Ticket feel (matches the site's ticket kit) ===== */
body.auth-body { background: #f1eee6; }

.auth-card {
    position: relative;
    background: #fff;
    border-radius: 20px;
    padding: 2rem 1.75rem 1.5rem;
    margin: auto 0;
    box-shadow: 0 1px 2px rgba(6, 72, 42, .06), 0 18px 34px -22px rgba(6, 72, 42, .45);
}

.auth-card::after {
    content: "";
    display: block;
    height: 9px;
    margin: 1.25rem 0 0;
    opacity: .18;
    background: repeating-linear-gradient(90deg, #096b3c 0 1px, #0000 1px 3px, #096b3c 3px 5px, #0000 5px 6px, #096b3c 6px 7px, #0000 7px 10px, #096b3c 10px 13px, #0000 13px 15px);
}

/* the last line of the card becomes a stub behind a perforation */
.auth-foot,
.verify-actions {
    position: relative;
    margin: 1.5rem -1.75rem 0 !important;
    padding: 1.15rem 1.75rem 0;
}

.auth-foot::before,
.verify-actions::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -10px;
    height: 20px;
    background:
        radial-gradient(circle 10px at 0 50%, #f1eee6 9.5px, #0000 10px),
        radial-gradient(circle 10px at 100% 50%, #f1eee6 9.5px, #0000 10px),
        repeating-linear-gradient(90deg, #d9d2c2 0 6px, #0000 6px 11px) center / calc(100% - 34px) 2px no-repeat;
}

/* ticket buttons: side notches + dashed inner edge */
.auth-btn {
    --n: 6px;
    -webkit-mask:
        radial-gradient(circle var(--n) at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat,
        radial-gradient(circle var(--n) at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat;
    mask:
        radial-gradient(circle var(--n) at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat,
        radial-gradient(circle var(--n) at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat;
    outline: 1px dashed color-mix(in srgb, currentColor 40%, transparent);
    outline-offset: -5px;
}

.auth-btn--ghost {
    border: 0;
    outline-color: #d9d2c2;
    box-shadow: inset 0 0 0 1.5px #e7e2d6;
}

.auth-card__icon {
    border: 1.5px dashed #d9d2c2;
    background: #faf6ec;
}

.auth-card__title { font-size: clamp(1.6rem, 3.4vw, 2rem); }
.auth-card__lead { margin-bottom: 1.5rem; font-size: .98rem; }

.auth-field input[type="email"],
.auth-field input[type="text"],
.auth-field input[type="password"] { min-height: 52px; }

.auth-btn { min-height: 54px; }

@media (max-width: 900px) {
    .auth-card {
        margin: 1.25rem auto 0;
        padding: 1.5rem 1.25rem 1.25rem;
    }

    .auth-foot,
    .verify-actions {
        margin: 1.25rem -1.25rem 0 !important;
        padding: 1rem 1.25rem 0;
    }
}

/* Log in / Create account tabs */
.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin: 0 0 1.25rem;
    padding: 4px;
    border-radius: 12px;
    background: #f1eee6;
}

.auth-tab {
    min-height: 44px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #77746a;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.auth-tab[aria-selected="true"] {
    background: #fff;
    color: #096b3c;
    box-shadow: 0 1px 3px rgba(6, 72, 42, .12);
}

/* ==========================================================================
   Baris brand: real logo, tickets art and the AFCON 2027 lockup on the panel
   ========================================================================== */
:root {
    --ivory: #ffffff;
    --paper: #ffffff;
    --rule: #dbe4da;
    --ink: #15241b;
    --ink-soft: #3c4a41;
    --muted: #6b776f;
}

body.auth-body { background: #f4f6f2; }

.auth-logo img.auth-logo__brand {
    height: 64px;
    margin: -8px 0 0 -6px;
    filter: none;
    opacity: 1;
}

.auth-side { border-right: 5px solid var(--gold); }

.auth-side__copy,
.auth-hosts,
.auth-logo { position: relative; z-index: 1; }

.auth-pitch { display: none; }

.auth-side__tickets {
    position: absolute;
    right: -70px;
    bottom: -60px;
    width: auto;
    height: 46%;
    opacity: 0.9;
    transform: rotate(8deg);
    pointer-events: none;
}

.auth-side__afcon {
    position: absolute;
    top: 2rem;
    right: 2.25rem;
    display: grid;
    place-items: center;
    width: 118px;
    aspect-ratio: 3 / 4.5;
    padding: 12px 16px;
    border-radius: 50%;
    background: #026e4c;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25), 0 14px 24px -14px rgba(0, 0, 0, 0.55);
}

.auth-side__afcon img {
    display: block;
    width: auto;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.auth-card__icon {
    background: var(--pitch) url("../brand/tickets.png") center / 62% no-repeat;
    border-color: transparent;
}

.auth-card__icon .afcon-icon { display: none; }

@media (max-width: 900px) {
    .auth-topbar { background: #fff; border-bottom: 1px solid var(--rule); }

    .auth-logo--mobile img.auth-logo__brand {
        height: 46px;
        margin: -4px 0 -6px -4px;
        filter: none;
    }

    .auth-back { color: var(--pitch); }
}
