/* ==========================================================================
   User auth screens (mobile-first)
   Login/Register visuals match the shared app reference.
   ========================================================================== */

:root {
    --auth-blue: #2137b4;
    --auth-blue-deep: #122882;
    --auth-blue-soft: #2d47cc;
    --auth-ink: #142553;
    --auth-muted: #7b849e;
    --auth-line: #ccd4e3;
    --auth-bg: #f5f8ff;
    --auth-danger: #c62828;
}

* { box-sizing: border-box; }

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

.d-none { display: none !important; }

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

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

.auth-band {
    position: relative;
    min-height: 156px;
    background: linear-gradient(180deg, var(--auth-blue-deep) 0%, var(--auth-blue) 100%);
    padding: 22px 22px 30px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.auth-band::before {
    content: "";
    position: absolute;
    width: 210px;
    height: 210px;
    right: -80px;
    top: -60px;
    transform: rotate(26deg);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.08);
}

.auth-band h1 {
    position: relative;
    z-index: 1;
    margin: 0;
    color: #fff;
    font-size: clamp(2rem, 4.4vw, 2.55rem);
    font-weight: 800;
    letter-spacing: 0.01em;
}

.auth-back {
    position: absolute;
    left: 16px;
    top: 16px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid #dfebff;
    background: #fff;
    color: #112650;
    display: grid;
    place-items: center;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(18, 32, 84, 0.16);
    z-index: 2;
}

.auth-back svg { width: 18px; height: 18px; }

.auth-sheet {
    margin-top: -2px;
    background: #fff;
    border-radius: 42px 42px 0 0;
    padding: 20px 22px 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.auth-step {
    width: 100%;
    max-width: 540px;
    margin: 0 auto;
    min-height: calc(100vh - 200px);
    display: flex;
    flex-direction: column;
}

.auth-phone-art {
    width: 128px;
    height: 128px;
    margin: 18px auto 20px;
}

.auth-phone-art svg {
    width: 100%;
    height: 100%;
    display: block;
}

.auth-form-stack {
    width: 100%;
    max-width: 540px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.auth-line-field {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    border-bottom: 2px solid var(--auth-line);
}

.auth-line-icon {
    width: 26px;
    height: 26px;
    color: #1c305b;
    flex: 0 0 26px;
    display: grid;
    place-items: center;
}

.auth-line-icon svg { width: 22px; height: 22px; }

.auth-line-field input {
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    color: #6f7482;
    font-size: 1.05rem;
    font-weight: 600;
    min-width: 0;
    padding: 0;
}

.auth-line-field input::placeholder {
    color: #8a8f9a;
}

.auth-inline-error {
    min-height: 18px;
    margin-top: 8px;
    color: var(--auth-danger);
    font-size: 0.82rem;
    font-weight: 600;
}

.auth-link-row {
    text-align: right;
    margin: 10px 0 16px;
}

.auth-link-row.compact {
    margin-top: 2px;
}

.auth-link-row a {
    color: var(--auth-blue);
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
}

.auth-primary-btn {
    width: 100%;
    min-height: 56px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(180deg, #2847d2 0%, #1d35b0 100%);
    color: #fff;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(34, 55, 176, 0.22);
}

.auth-primary-btn:active { transform: translateY(1px); }

.auth-register-btn {
    margin-top: 14px;
}

.auth-bottom-note {
    margin-top: 16px;
    padding-top: 0;
    text-align: center;
    color: #798197;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.35;
}

.auth-bottom-note a {
    color: var(--auth-blue);
    font-weight: 800;
    text-decoration: none;
}

.auth-strip {
    height: 18px;
    background: var(--auth-blue);
    margin-top: 8px;
}

/* Step 2 (enter password) */
.auth-pass-mode .auth-band {
    display: none;
}

.auth-pass-mode .auth-sheet {
    border-radius: 0;
    padding-top: 22px;
}

.auth-pass-mode .auth-step {
    max-width: 420px;
    min-height: calc(100vh - 26px);
}

.auth-mini-logo {
    width: 86px;
    height: 86px;
    border-radius: 20px;
    border: 1px solid #ffe2bc;
    background: #fff;
    box-shadow: 0 8px 20px rgba(23, 44, 137, 0.08);
    margin: 10px auto 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 3.2rem;
    font-weight: 900;
    line-height: 1;
}

.auth-mini-logo span {
    display: block;
    line-height: 1;
}

.auth-mini-b { color: #ff6f00; }
.auth-mini-m { color: #13883d; }

.auth-pass-title {
    margin: 0;
    text-align: center;
    color: #121f45;
    font-size: 2rem;
    font-weight: 800;
}

.auth-pass-sub {
    margin: 6px 0 16px;
    text-align: center;
    color: #6f7d9d;
    font-size: 1rem;
    font-weight: 600;
}

.auth-pass-sub span {
    color: #1c2f86;
    font-weight: 700;
}

.auth-box-field {
    border: 1px solid #dce6ff;
    border-radius: 12px;
    background: #f7faff;
    min-height: 54px;
    padding: 0 12px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-pass-mode form {
    width: 100%;
}

.auth-box-ico {
    width: 22px;
    height: 22px;
    color: #1f38b6;
    flex: 0 0 22px;
    display: grid;
    place-items: center;
}

.auth-box-ico svg { width: 20px; height: 20px; }

.auth-box-field input {
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    color: #131313;
    font-size: 1rem;
    min-width: 0;
}

.auth-box-field input::placeholder {
    color: #969fb4;
}

.auth-box-field input[readonly] {
    color: #141b2e;
}

.auth-box-action {
    border: 0;
    background: transparent;
    color: #1f37b4;
    padding: 0;
    cursor: pointer;
    display: grid;
    place-items: center;
}

.auth-box-action svg { width: 18px; height: 18px; }

.auth-back-phone {
    width: 100%;
    margin-top: 12px;
    border: 0;
    background: transparent;
    color: #6c7898;
    font-size: 0.92rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
}

.auth-back-phone svg { width: 16px; height: 16px; }

/* Alerts */
.auth-alert {
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 0.84rem;
    font-weight: 600;
    margin-bottom: 14px;
}

.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;
}

@media (max-width: 575.98px) {
    .auth-shell {
        max-width: 100%;
        box-shadow: none;
    }

    .auth-band {
        min-height: 148px;
        padding: 18px 16px 26px;
    }

    .auth-band h1 {
        font-size: 1.62rem;
    }

    .auth-sheet {
        border-radius: 34px 34px 0 0;
        padding: 16px 16px 8px;
    }

    .auth-step {
        max-width: none;
        min-height: calc(100vh - 184px);
    }

    .auth-phone-art {
        width: 116px;
        height: 116px;
        margin-top: 14px;
    }

    .auth-line-field {
        min-height: 54px;
    }

    .auth-line-field input {
        font-size: 0.98rem;
    }

    .auth-primary-btn {
        min-height: 52px;
        font-size: 1.78rem;
    }

    .auth-bottom-note {
        margin-top: 14px;
        padding-top: 0;
        font-size: 0.86rem;
    }

    .auth-pass-mode .auth-step {
        max-width: none;
    }
}

/* ==========================================================================
   Register screen v2 (matches provided orange/white UI reference)
   ========================================================================== */

body.auth-body.auth-v2-body {
    display: block;
    background: #fff;
    color: #161d2e;
    font-family: "Poppins", "Segoe UI", system-ui, -apple-system, sans-serif;
}

.auth-v2-shell {
    width: 100%;
    max-width: 768px;
    min-height: 100vh;
    margin: 0 auto;
    background: #fff;
}

.auth-v2-band {
    min-height: 126px;
    padding: 22px 20px 30px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    text-align: center;
    background: #ffbe71;
    border-radius: 0 0 34px 34px;
}

.auth-v2-band h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(2rem, 4.8vw, 3.15rem);
    font-weight: 700;
    letter-spacing: 0.01em;
}

.auth-v2-main {
    padding: 16px 26px 28px;
}

.auth-v2-step {
    width: 100%;
    min-height: calc(100vh - 194px);
    display: flex;
    flex-direction: column;
}

.auth-v2-logo-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 76px 0 68px;
}

.auth-v2-logo-wrap-compact {
    margin: 14px 0 34px;
}

.auth-v2-brand-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 76px 0 68px;
}

.auth-v2-brand-wrap-compact {
    margin: 14px 0 34px;
}

.auth-v2-brand {
    text-align: center;
    line-height: 1;
    user-select: none;
}

.auth-v2-brand-top {
    font-size: clamp(2.6rem, 7.2vw, 5.45rem);
    font-weight: 800;
    letter-spacing: 0.02em;
}

.auth-v2-brand-dp {
    color: #f91582;
}

.auth-v2-brand-rest {
    color: #0d1119;
}

.auth-v2-brand-sub {
    margin-top: 6px;
    font-size: clamp(0.82rem, 2.5vw, 1.55rem);
    font-weight: 700;
    color: #0d1119;
    letter-spacing: 0.16em;
}

.auth-v2-logo {
    width: min(320px, 66vw);
    max-width: 100%;
    height: auto;
    display: block;
}

.auth-v2-intro {
    margin: 12px 0 14px;
    text-align: center;
    color: #0f1627;
    font-size: clamp(1.22rem, 3.2vw, 2.15rem);
    font-weight: 500;
    letter-spacing: 0.01em;
}

.auth-v2-line-field {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 22px;
    padding: 0 0 12px;
    border-bottom: 4px solid #dc9d33;
}

.auth-v2-line-icon {
    width: 52px;
    height: 52px;
    color: #76808b;
    display: grid;
    place-items: center;
    flex: 0 0 52px;
}

.auth-v2-line-icon svg {
    width: 45px;
    height: 45px;
}

.auth-v2-line-field input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #101520;
    font-size: clamp(1.38rem, 3.85vw, 2.35rem);
    font-weight: 500;
    padding: 0;
}

.auth-v2-line-field input::placeholder {
    color: #151b2a;
}

.auth-v2-inline-error {
    min-height: 22px;
    margin: 12px 22px 0;
    color: #c62828;
    font-size: 0.9rem;
    font-weight: 600;
}

.auth-v2-form-stack {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.auth-v2-box-field {
    width: 100%;
    min-height: 70px;
    display: flex;
    align-items: center;
    border: 2px solid #eceff3;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(17, 24, 39, 0.08);
    padding: 0 24px;
    margin-bottom: 18px;
}

.auth-v2-box-field input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #111827;
    font-size: clamp(1.14rem, 3vw, 1.85rem);
    font-weight: 500;
    padding: 0;
}

.auth-v2-box-field input::placeholder {
    color: #8f949c;
}

.auth-v2-form-error {
    margin-top: 2px;
    margin-bottom: 6px;
}

.auth-v2-primary-btn {
    width: calc(100% - 44px);
    margin: 20px auto 0;
    min-height: 66px;
    border: 0;
    border-radius: 999px;
    background: #ffbe71;
    color: #fff;
    font-size: clamp(1.9rem, 4.9vw, 3.05rem);
    font-weight: 600;
    letter-spacing: 0.01em;
    box-shadow: 0 14px 30px rgba(255, 190, 113, 0.36);
    cursor: pointer;
}

.auth-v2-primary-btn:disabled {
    opacity: 0.68;
    cursor: not-allowed;
}

.auth-v2-primary-btn:active {
    transform: translateY(1px);
}

.auth-v2-link-btn {
    margin: 10px auto 0;
    border: 0;
    background: transparent;
    color: #283048;
    font-size: 0.98rem;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

@media (max-width: 575.98px) {
    .auth-v2-band {
        min-height: 106px;
        padding: 18px 16px 24px;
        border-radius: 0 0 22px 22px;
    }

    .auth-v2-main {
        padding: 12px 14px 22px;
    }

    .auth-v2-step {
        min-height: calc(100vh - 166px);
    }

    .auth-v2-logo-wrap {
        margin: 44px 0 42px;
    }

    .auth-v2-logo-wrap-compact {
        margin: 8px 0 22px;
    }

    .auth-v2-brand-wrap {
        margin: 44px 0 42px;
    }

    .auth-v2-brand-wrap-compact {
        margin: 8px 0 22px;
    }

    .auth-v2-brand-top {
        font-size: clamp(2rem, 12.2vw, 3.05rem);
    }

    .auth-v2-brand-sub {
        margin-top: 4px;
        font-size: clamp(0.7rem, 3.5vw, 0.95rem);
    }

    .auth-v2-logo {
        width: min(250px, 76vw);
    }

    .auth-v2-line-field {
        margin: 0 10px;
        border-bottom-width: 3px;
    }

    .auth-v2-line-icon {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
    }

    .auth-v2-line-icon svg {
        width: 28px;
        height: 28px;
    }

    .auth-v2-inline-error {
        margin: 8px 10px 0;
        min-height: 18px;
        font-size: 0.82rem;
    }

    .auth-v2-box-field {
        min-height: 56px;
        border-radius: 16px;
        padding: 0 16px;
        margin-bottom: 14px;
    }

    .auth-v2-primary-btn {
        width: calc(100% - 20px);
        min-height: 54px;
        margin-top: 14px;
    }

    .auth-v2-link-btn {
        margin-top: 8px;
        font-size: 0.86rem;
    }
}

/* ==========================================================================
   Admin login - centered desktop card (kept separate)
   ========================================================================== */

: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, 0.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, 0.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 0.15s, box-shadow 0.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, 0.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, 0.28);
    transition: transform 0.05s ease, box-shadow 0.15s;
}

.adm-login-btn:hover { box-shadow: 0 12px 26px rgba(67, 56, 202, 0.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: 0.25; }
    .adm-login-inner { padding: 20px 24px 34px; }
}
