/* Auth — dashboard dark teal + pill inputs */

:root {
    --auth-bg: #0B1120;
    --auth-card: #151D2E;
    --auth-text: #F1F5F9;
    --auth-muted: #94A3B8;
    --auth-primary: #22D3EE;
    --auth-grad: linear-gradient(90deg, #00D084 0%, #22D3EE 50%, #06B6D4 100%);
    --auth-glass: linear-gradient(145deg, rgba(34, 211, 238, 0.1) 0%, rgba(21, 29, 46, 0.72) 45%, rgba(15, 23, 42, 0.88) 100%);
    --auth-glass-blur: blur(22px) saturate(175%);
    --auth-border: rgba(255, 255, 255, 0.12);
    --auth-field-bg: rgba(15, 23, 42, 0.55);
    --auth-glow: rgba(34, 211, 238, 0.35);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    min-height: 100%;
    background: var(--auth-bg) !important;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--auth-text);
    -webkit-font-smoothing: antialiased;
}
body {
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(34, 211, 238, 0.08), transparent 60%),
        radial-gradient(ellipse 50% 40% at 100% 80%, rgba(6, 182, 212, 0.06), transparent 50%) !important;
    background-attachment: fixed;
}

.auth-page {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding:
        calc(env(safe-area-inset-top, 0px) + 24px)
        18px
        calc(env(safe-area-inset-bottom, 0px) + 24px);
    overflow: hidden;
}

.auth-blob {
    position: absolute;
    pointer-events: none;
    z-index: 0;
    filter: blur(1px);
    opacity: 0.55;
}
.auth-blob--tr {
    top: -60px;
    right: -70px;
    width: min(240px, 58vw);
    height: min(240px, 58vw);
    background: radial-gradient(circle, rgba(34, 211, 238, 0.35), rgba(6, 182, 212, 0.12) 55%, transparent 70%);
    border-radius: 42% 58% 65% 35% / 38% 42% 58% 62%;
}
.auth-blob--bl {
    bottom: -50px;
    left: -60px;
    width: min(200px, 50vw);
    height: min(200px, 50vw);
    background: radial-gradient(circle, rgba(0, 208, 132, 0.28), rgba(14, 116, 144, 0.1) 55%, transparent 70%);
    border-radius: 58% 42% 35% 65% / 62% 38% 62% 38%;
}

.auth-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
}

/* Header: logo + title */
.auth-top {
    position: relative;
    text-align: center;
    margin-bottom: 26px;
    padding: 0 44px;
}
.auth-close {
    position: absolute;
    top: 0;
    right: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--auth-muted);
    font-size: 18px;
    text-decoration: none;
    border-radius: 12px;
    border: 1px solid var(--auth-border);
    background: rgba(255, 255, 255, 0.04);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.auth-close:hover {
    color: var(--auth-primary);
    border-color: rgba(34, 211, 238, 0.35);
    background: rgba(34, 211, 238, 0.1);
}

.auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding-top: 32px;
}
.auth-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 20px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--auth-border);
    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}
.auth-top h1 {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--auth-text);
    line-height: 1.2;
}

.auth-ref {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: -8px 0 18px;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.08);
    border: 1px solid rgba(34, 211, 238, 0.2);
    font-size: 12px;
    font-weight: 700;
    color: var(--auth-muted);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}
.auth-ref i { color: var(--auth-primary); }
.auth-ref b { color: var(--auth-primary); font-weight: 800; }

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-field {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 54px;
    padding: 0 8px 0 16px;
    background: var(--auth-glass);
    border-radius: 999px;
    border: 1px solid var(--auth-border);
    -webkit-backdrop-filter: var(--auth-glass-blur);
    backdrop-filter: var(--auth-glass-blur);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.auth-field:focus-within {
    border-color: rgba(34, 211, 238, 0.4);
    box-shadow:
        0 8px 28px rgba(34, 211, 238, 0.12),
        0 0 0 3px rgba(34, 211, 238, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.auth-field-ico {
    flex-shrink: 0;
    width: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--auth-primary);
    font-size: 15px;
}

.auth-field-input {
    flex: 1;
    min-width: 0;
    height: 52px;
    padding: 0 10px;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    color: var(--auth-text);
    outline: none;
    -webkit-appearance: none;
}
.auth-field-input::placeholder {
    color: #64748B;
    font-weight: 500;
    font-size: 15px;
}

.auth-field--pw { padding-right: 46px; }
.auth-eye {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--auth-primary);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.auth-eye:active {
    background: rgba(34, 211, 238, 0.12);
}

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 2px 2px 4px;
    flex-wrap: wrap;
}
.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--auth-muted);
    cursor: pointer;
}
.auth-check input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: var(--auth-primary);
    cursor: pointer;
}
.auth-forgot {
    font-size: 13px;
    font-weight: 700;
    color: var(--auth-muted);
    text-decoration: none;
}
.auth-forgot:hover { color: var(--auth-primary); }

.auth-btn {
    width: 100%;
    height: 54px;
    margin-top: 6px;
    border: none;
    border-radius: 999px;
    background: var(--auth-grad);
    color: #0B1120;
    font-family: inherit;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 12px 28px var(--auth-glow);
    transition: transform 0.15s, box-shadow 0.15s;
}
.auth-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 32px var(--auth-glow);
}
.auth-btn:active { transform: scale(0.98); }

.auth-switch {
    margin: 26px 0 0;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--auth-muted);
    line-height: 1.55;
}
.auth-switch a {
    color: var(--auth-primary);
    font-weight: 800;
    text-decoration: none;
}
.auth-switch a:hover { text-decoration: underline; }

@media (max-width: 479px) {
    .auth-page {
        padding-top: calc(env(safe-area-inset-top, 0px) + 20px);
    }
    .auth-brand {
        padding-top: 40px;
    }
    .auth-top {
        margin-bottom: 24px;
    }
    .auth-logo {
        width: min(72vw, 168px);
        height: min(72vw, 168px);
        padding: 8px;
        border-radius: 24px;
    }
}

@media (min-width: 480px) {
    .auth-page {
        align-items: center;
        padding-top: calc(env(safe-area-inset-top, 0px) + 40px);
    }
    .auth-brand {
        padding-top: 12px;
    }
    .auth-logo {
        width: 92px;
        height: 92px;
        padding: 12px;
        border-radius: 22px;
    }
    .auth-top h1 { font-size: 30px; }
    .auth-top { margin-bottom: 28px; }
}

@media (max-width: 360px) {
    .auth-page { padding-left: 14px; padding-right: 14px; }
    .auth-brand { padding-top: 36px; gap: 10px; }
    .auth-field { min-height: 50px; }
    .auth-field-input { height: 48px; font-size: 15px; }
    .auth-btn { height: 50px; font-size: 14px; }
    .auth-top { padding: 0 40px; margin-bottom: 22px; }
    .auth-logo {
        width: min(68vw, 152px);
        height: min(68vw, 152px);
        padding: 8px;
        border-radius: 22px;
    }
    .auth-top h1 { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
    .auth-btn,
    .auth-field { transition-duration: 0.01ms !important; }
}
