/* ==========================================================================
   Auth screens (mobile-first) — player login/register + admin login.
   Standalone pages: not part of the app/admin shell.
   ========================================================================== */

:root {
    --auth-green: #6d5efc;
    --auth-green-dark: #6d5efc;
    --auth-primary-2: #9b5cff;
    --auth-navy: #1b1c33;
    --auth-muted: #6b6f8d;
    --auth-border: #e6e7f2;
    --auth-field: #f8f9ff;
    --auth-bg: #f4f5fb;
}

* { box-sizing: border-box; }

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

body.auth-body {
    font-family: 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
    background: var(--auth-bg);
    color: var(--auth-navy);
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.auth-shell {
    width: 100%;
    max-width: 460px;
    min-height: 100vh;
    background: #fff;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 40px rgba(0, 0, 0, .06);
}

/* ---- Dark header with logo ---- */
.auth-header {
    position: relative;
    background: linear-gradient(135deg, #6d5efc 0%, #9b5cff 55%, #c86dd7 100%);
    padding: 34px 20px 46px;
    text-align: center;
    overflow: hidden;
}
.auth-header::before {
    content: "";
    position: absolute;
    top: -60px;
    right: -40px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .04);
}
.auth-header::after {
    content: "";
    position: absolute;
    left: -70px;
    bottom: -70px;
    width: 170px;
    height: 170px;
    border: 1px dashed rgba(255, 255, 255, .12);
    border-radius: 50%;
}

.auth-back {
    position: absolute;
    top: 18px;
    left: 18px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #14233a;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
    z-index: 2;
}
.auth-back svg { width: 18px; height: 18px; }

.auth-logo {
    position: relative;
    z-index: 1;
    width: 128px;
    height: 128px;
    margin: 4px auto 0;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 35%, #9b5cff, #6d5efc 70%);
    border: 4px solid rgba(255, 255, 255, .9);
    box-shadow: 0 8px 26px rgba(45, 30, 120, .35), 0 0 0 6px rgba(255, 255, 255, .12);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
}
.auth-logo .auth-logo-k {
    font-size: 46px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 1px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, .25);
}
.auth-logo .auth-logo-name {
    margin-top: 4px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, .9);
}

/* ---- White card ---- */
.auth-card {
    position: relative;
    margin-top: -22px;
    background: #fff;
    border-radius: 22px 22px 0 0;
    padding: 26px 22px 34px;
    flex: 1;
}

.auth-title {
    text-align: center;
    font-size: 26px;
    font-weight: 800;
    margin: 4px 0 4px;
    color: var(--auth-navy);
}
.auth-subtitle {
    text-align: center;
    color: var(--auth-muted);
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 22px;
}

/* ---- Fields ---- */
.auth-field {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--auth-field);
    border: 1px solid var(--auth-border);
    border-radius: 14px;
    padding: 0 14px;
    height: 56px;
    margin-bottom: 16px;
    transition: border-color .15s, box-shadow .15s;
}
.auth-field:focus-within {
    border-color: var(--auth-green);
    box-shadow: 0 0 0 3px rgba(109, 94, 252, .15);
}
.auth-field .auth-ico {
    color: #9aa3af;
    display: flex;
    flex-shrink: 0;
}
.auth-field .auth-ico svg { width: 20px; height: 20px; }
.auth-field input {
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 15px;
    color: var(--auth-navy);
    height: 100%;
}
.auth-field input::placeholder { color: #9aa3af; }

.auth-row {
    display: flex;
    gap: 12px;
}
.auth-row .auth-field { flex: 1; }

/* Country code selector */
.auth-cc {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--auth-field);
    border: 1px solid var(--auth-border);
    border-radius: 14px;
    padding: 0 12px;
    height: 56px;
    margin-bottom: 16px;
    font-weight: 700;
    font-size: 15px;
    white-space: nowrap;
}
.auth-cc .auth-flag {
    width: 22px;
    height: 15px;
    border-radius: 2px;
    overflow: hidden;
    display: inline-block;
    background: linear-gradient(180deg, #ff9933 0 33%, #fff 33% 66%, #138808 66% 100%);
    position: relative;
    flex-shrink: 0;
}
.auth-cc .auth-flag::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    border: 1px solid #0a3d8f;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}
.auth-cc .auth-caret { color: #9aa3af; font-size: 11px; }

.auth-eye {
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
    color: #9aa3af;
    display: flex;
}
.auth-eye svg { width: 20px; height: 20px; }

.auth-forgot {
    text-align: right;
    margin: -4px 0 18px;
}
.auth-forgot a {
    color: var(--auth-green-dark);
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
}

/* ---- Buttons ---- */
.auth-btn {
    display: block;
    width: 100%;
    border: 0;
    border-radius: 16px;
    padding: 17px;
    background: linear-gradient(135deg, #6d5efc 0%, #9b5cff 55%, #c86dd7 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: .5px;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(109, 94, 252, .32);
    transition: transform .05s ease, box-shadow .15s;
}
.auth-btn:hover { box-shadow: 0 12px 26px rgba(109, 94, 252, .42); }
.auth-btn:active { transform: translateY(1px); }

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

.auth-support {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    border: 1px solid var(--auth-border);
    border-radius: 14px;
    padding: 15px;
    background: #fff;
    color: var(--auth-navy);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}
.auth-support b { font-weight: 800; }
.auth-support svg { width: 18px; height: 18px; color: #14233a; }

.auth-secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 22px 0 10px;
    color: #4b5563;
    font-size: 13px;
    font-weight: 700;
}
.auth-secure svg { width: 16px; height: 16px; color: var(--auth-green); }

.auth-foot {
    text-align: center;
    color: var(--auth-muted);
    font-size: 14px;
}
.auth-foot a {
    color: var(--auth-navy);
    font-weight: 800;
    text-decoration: none;
}

/* ---- Alerts ---- */
.auth-alert {
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 16px;
}
.auth-alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}
.auth-alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
}
.auth-alert ul { margin: 0; padding-left: 18px; }

/* ==========================================================================
   Admin login — centered desktop card (own indigo theme, not the reference
   screenshot's colours).
   ========================================================================== */
:root {
    --adm-indigo: #4f46e5;
    --adm-indigo-dark: #4338ca;
    --adm-ink: #1f2a44;
    --adm-muted: #6b7280;
    --adm-border: #e5e7eb;
}

body.adm-login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
    background: #f4f6fb;
    font-family: 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
    color: var(--adm-ink);
}

.adm-login-card {
    width: 100%;
    max-width: 520px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 18px 50px rgba(31, 42, 68, .12);
    overflow: hidden;
}

.adm-login-head {
    position: relative;
    background: linear-gradient(135deg, #eef2ff 0%, #f3f0ff 100%);
    padding: 26px 26px 30px;
    min-height: 132px;
}
.adm-login-head h1 {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 800;
    color: var(--adm-indigo-dark);
}
.adm-login-head h1 span { color: var(--adm-indigo); }
.adm-login-head p {
    margin: 0;
    max-width: 62%;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    line-height: 1.4;
}
.adm-login-illus {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 150px;
    height: 108px;
    pointer-events: none;
}
.adm-login-illus svg { width: 100%; height: 100%; }

.adm-login-badge {
    width: 84px;
    height: 84px;
    margin: -42px auto 0;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 8px 20px rgba(31, 42, 68, .16);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}
.adm-login-emblem {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 40%, #123c33, #0a2019);
    border: 2px solid #e9c46a;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #e9c46a;
    line-height: 1;
}
.adm-login-emblem b { font-size: 20px; font-weight: 800; }
.adm-login-emblem small { font-size: 7px; font-weight: 700; letter-spacing: 1px; margin-top: 2px; }

.adm-login-inner { padding: 20px 40px 40px; }

.adm-login-label {
    display: block;
    margin: 16px 0 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--adm-ink);
}
.adm-login-input {
    width: 100%;
    height: 50px;
    border: 1px solid var(--adm-border);
    border-radius: 10px;
    padding: 0 14px;
    font-size: 15px;
    color: var(--adm-ink);
    outline: 0;
    transition: border-color .15s, box-shadow .15s;
}
.adm-login-input::placeholder { color: #9aa3af; }
.adm-login-input:focus {
    border-color: var(--adm-indigo);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, .12);
}

.adm-login-btn {
    width: 100%;
    margin-top: 26px;
    border: 0;
    border-radius: 10px;
    padding: 15px;
    background: linear-gradient(180deg, #5b52ec, #4338ca);
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(67, 56, 202, .28);
    transition: transform .05s ease, box-shadow .15s;
}
.adm-login-btn:hover { box-shadow: 0 12px 26px rgba(67, 56, 202, .36); }
.adm-login-btn:active { transform: translateY(1px); }

.adm-login-back {
    display: block;
    text-align: center;
    margin-top: 18px;
    color: var(--adm-muted);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}
.adm-login-back:hover { color: var(--adm-indigo); }

@media (max-width: 520px) {
    .adm-login-head p { max-width: 100%; }
    .adm-login-illus { opacity: .25; }
    .adm-login-inner { padding: 20px 24px 34px; }
}
