:root {
    --brand-teal: #20d3a6;
    --brand-blue: #3aa0ff;
    --brand-gradient: linear-gradient(to right, #0694f9 0%, #69c797 50%, #cefb34 100%);
    --brand-navy: #0f1c24;
    --brand-slate: #5a6b7a;
    --brand-muted: #8b9aab;
    --surface: #071D2B;
    --surface-muted: #f4f7fb;
    --border: #d8e2ec;
    --border-focus: #3aa0ff;
    --danger-bg: #fef2f2;
    --danger-border: #fecaca;
    --danger-text: #b91c1c;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 18px 48px rgba(15, 28, 36, 0.08), 0 4px 12px rgba(15, 28, 36, 0.04);
}

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

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

body.auth-body {
    font-family: 'Nunito', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--brand-navy);
    background: var(--surface-muted);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.auth-page {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    position: relative;
    overflow: hidden;
}

.auth-page__backdrop {
    position: absolute;
    inset: 0;
    background: #081621;
    z-index: 0;
}

.auth-card {
    position: relative;
    z-index: 1;
    width: min(100%, 420px);
    background: #071C2B;
    border: 3px solid #004D8780;
    border-radius: calc(var(--radius) + 2px);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.auth-card__accent {
    height: 5px;
    background: var(--brand-gradient);
}

.auth-card__inner {
    background: #071C2B;
    padding: 36px 32px 28px;
}

@media (max-width: 480px) {
    .auth-card__inner {
        padding: 28px 22px 22px;
    }
}

.auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 18px;
}

.auth-brand__logo {
    width: min(72%, 200px);
    height: auto;
    margin-bottom: 20px;
}

.auth-brand__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(32, 211, 166, 0.12);
    color: #0d7a62;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.auth-brand__badge svg {
    flex-shrink: 0;
}

.auth-brand__title {
    margin: 0 0 8px;
    font-size: clamp(1.35rem, 4vw, 1.55rem);
    font-weight: 800;
    line-height: 1.25;
    color: #fff;
}

.auth-brand__subtitle {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--brand-slate);
    max-width: 32ch;
}

.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    margin-bottom: 20px;
    border-radius: var(--radius-sm);
    background: var(--danger-bg);
    border: 1px solid var(--danger-border);
    color: var(--danger-text);
    font-size: 0.9rem;
    line-height: 1.45;
}

.auth-alert svg {
    flex-shrink: 0;
    margin-top: 1px;
}

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

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.auth-field label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #e3e3e3;
}

.auth-input-wrap {
    position: relative;
}

.auth-input-wrap svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    pointer-events: none;
}

.auth-input {
    width: 100%;
    padding: 13px 14px 13px 42px;
    border: 1.5px solid #004D87;
    border-radius: var(--radius-sm);
    background: #081621;
    color: #fff;
    font: inherit;
    font-size: 1rem;
    line-height: 1.2;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-input--code {
    padding-left: 14px;
    text-align: center;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.35em;
    font-variant-numeric: tabular-nums;
}

.auth-input:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(58, 160, 255, 0.18);
}

.auth-input::placeholder {
    color: var(--brand-muted);
    letter-spacing: normal;
    font-weight: 400;
}

.auth-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.auth-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    accent-color: var(--brand-blue);
    flex-shrink: 0;
    cursor: pointer;
}

.auth-check__label {
    font-size: 0.9rem;
    line-height: 1.45;
    color:#fff;
}

.auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 18px;
    margin-top: 18px;
    border: 2px solid transparent;
    border-radius: 9999px;
    background:
        linear-gradient(var(--surface), var(--surface)) padding-box,
        var(--brand-gradient) border-box;
    color: #fff;
    font: inherit;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: transform 0.1s ease, opacity 0.15s ease;
}

.auth-btn:hover:not(:disabled) {
    transform: scale(1.02);
}

.auth-btn:active:not(:disabled) {
    transform: scale(1);
}

.auth-btn:disabled {
    background:
        linear-gradient(var(--surface), var(--surface)) padding-box,
        linear-gradient(to right, rgba(6, 148, 249, 0.5), rgba(105, 199, 151, 0.5), rgba(206, 251, 52, 0.5)) border-box;
    color: var(--brand-muted);
    cursor: not-allowed;
}

.auth-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin-top: 12px;
    padding: 10px;
    border: none;
    background: none;
    color: #e3e3e3;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: color 0.15s ease, background 0.15s ease;
}

.auth-footer {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.auth-security {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--brand-muted);
}

.auth-security svg {
    flex-shrink: 0;
    margin-top: 1px;
    color: var(--brand-teal);
}

.auth-provider-switch {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: var(--surface-muted);
    font-size: 0.875rem;
    color: var(--brand-slate);
    line-height: 1.45;
}

.auth-provider-switch a {
    color: var(--brand-blue);
    font-weight: 700;
    text-decoration: none;
}

.auth-provider-switch a:hover {
    text-decoration: underline;
}
