:root {
    --glass: rgba(18, 22, 32, 0.55);
    --glass-border: rgba(255, 255, 255, 0.12);
    --text: #f4f6fb;
    --muted: rgba(244, 246, 251, 0.65);
    --accent: #7eb8ff;
    --error: #ff8a8a;
    --success: #8dffb0;
    --warn: #ffd27e;
    --tile-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

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

html,
body {
    height: 100%;
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
    color: var(--text);
    background: #0b0f16;
}

.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-scrim {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: linear-gradient(125deg, #1a2a4a 0%, #2d1f4a 40%, #0f2740 100%);
    animation: hueShift 24s ease-in-out infinite alternate;
}

@keyframes hueShift {
    0% { filter: hue-rotate(0deg) saturate(1.1); }
    100% { filter: hue-rotate(35deg) saturate(1.25); }
}

.auth-scrim::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 120% 80% at 50% 40%, rgba(10, 14, 24, 0.25), rgba(6, 8, 14, 0.82));
}

.auth-shell {
    position: relative;
    z-index: 1;
    width: min(440px, 92vw);
    padding: clamp(1.25rem, 4vw, 2rem);
}

.auth-brand {
    text-align: center;
    margin-bottom: 1.25rem;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
}

.auth-brand h1 {
    margin: 0 0 0.35rem;
    font-weight: 650;
    font-size: clamp(1.5rem, 4vw, 2rem);
}

.auth-tagline {
    margin: 0;
    color: var(--muted);
}

.auth-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: var(--tile-shadow);
    padding: clamp(1.25rem, 3vw, 1.75rem);
}

.auth-card__title {
    margin: 0 0 1rem;
    font-size: 1.2rem;
}

.auth-muted {
    color: var(--muted);
    margin: 0 0 1rem;
    font-size: 0.95rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

.auth-field__label {
    font-size: 0.9rem;
    color: var(--muted);
}

.auth-field input {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.25);
    color: var(--text);
    font-size: 1rem;
}

.auth-field input:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.auth-field__password {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.auth-field__password input {
    flex: 1;
}

.auth-field__otp {
    display: flex;
    align-items: center;
    gap: 0.15rem;
}

.auth-otp-prefix {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 0.5rem;
    border-radius: 10px 0 0 10px;
    border: 1px solid var(--glass-border);
    border-right: none;
    background: rgba(126, 184, 255, 0.1);
    color: var(--accent);
    font-size: 1rem;
    font-weight: 600;
    min-width: 3.2rem;
    text-align: center;
    flex-shrink: 0;
}

.auth-otp-sep {
    color: var(--muted);
    font-size: 1.1rem;
    padding: 0 0.1rem;
    flex-shrink: 0;
}

.auth-otp-suffix {
    border-radius: 0 10px 10px 0 !important;
    flex: 1;
    min-width: 0;
    width: auto;
    letter-spacing: 0.25em;
}

.auth-toggle {
    flex-shrink: 0;
    padding: 0 0.75rem;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: rgba(126, 184, 255, 0.15);
    color: var(--accent);
    cursor: pointer;
    font-size: 0.85rem;
}

.auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1rem;
    border: none;
    border-radius: 10px;
    background: var(--accent);
    color: #0b0f16;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
}

.auth-btn--secondary {
    background: rgba(126, 184, 255, 0.2);
    color: var(--accent);
    border: 1px solid rgba(126, 184, 255, 0.35);
}

.auth-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.auth-alert {
    margin: 0 0 1rem;
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    font-size: 0.95rem;
}

.auth-alert--error {
    color: var(--error);
    background: rgba(255, 80, 80, 0.12);
    border: 1px solid rgba(255, 138, 138, 0.35);
}

.auth-alert--success {
    color: var(--success);
    background: rgba(80, 255, 140, 0.08);
    border: 1px solid rgba(141, 255, 176, 0.3);
}

.auth-alert--warn {
    color: var(--warn);
    background: rgba(255, 200, 80, 0.1);
    border: 1px solid rgba(255, 210, 126, 0.35);
}

.auth-links {
    margin: 1rem 0 0;
    text-align: center;
}

.auth-links a {
    color: var(--accent);
}

.auth-fieldset {
    border: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.auth-fieldset__legend {
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 0.25rem;
}

.auth-radio {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.65rem;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: background 0.15s;
}

.auth-radio:hover {
    background: rgba(126, 184, 255, 0.1);
}

.auth-radio input[type="radio"] {
    accent-color: var(--accent);
    width: 1rem;
    height: 1rem;
    margin: 0.15rem 0 0;
    flex-shrink: 0;
}

.auth-radio span {
    overflow-wrap: anywhere;
    line-height: 1.45;
}
