/* 🎨 IMPORT DESIGN SYSTEM - MUST BE FIRST! */
@import url('design-tokens.css');

/* ═══════════════════════════════════════════════════════
   AUTH PAGE — styles shared by login.html + reset-password.html
   ═══════════════════════════════════════════════════════ */

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-6);
    position: relative;
    font-family: var(--font-sans);

    /* Background image (kept as-is) */
    background-image: url('/assets/login-background1-2.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Subtle 3-step gradient overlay — lets the stones show through */
.auth-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(20, 184, 166, 0.18) 0%,
        rgba(14, 165, 233, 0.10) 45%,
        rgba(99, 102, 241, 0.18) 100%);
    z-index: 0;
    pointer-events: none;
}

.auth-container > * {
    position: relative;
    z-index: 1;
}

/* ─── Glass card ─────────────────────────────────────── */

.auth-box {
    position: relative;
    width: 100%;
    max-width: 440px;
    padding: 48px 40px 36px;
    border-radius: var(--radius-2xl);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(var(--blur-xl)) saturate(140%);
    -webkit-backdrop-filter: blur(var(--blur-xl)) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow:
        0 20px 60px -15px rgba(20, 184, 166, 0.22),
        0 8px 24px -8px rgba(99, 102, 241, 0.12),
        0 2px 4px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    animation: authFadeIn 0.6s var(--ease-smooth);
}

/* Gradient strip at the top of the card */
.auth-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg,
        #14b8a6 0%,
        #0ea5e9 60%,
        #6366f1 100%);
}

@keyframes authFadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─── Brand header ───────────────────────────────────── */

.auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 22px;
    position: relative;
}

/* Soft radial glow behind the icon */
.auth-brand::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 160px;
    height: 90px;
    background: radial-gradient(ellipse at center,
        rgba(20, 184, 166, 0.32) 0%,
        rgba(14, 165, 233, 0.14) 40%,
        transparent 72%);
    filter: blur(22px);
    z-index: 0;
    pointer-events: none;
}

.auth-brand-icon {
    width: 72px;
    height: 72px;
    display: block;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 6px 14px rgba(20, 184, 166, 0.22));
}

.auth-brand-name {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.1;
    position: relative;
    z-index: 1;

    /* Gradient text — falls back to solid teal */
    color: var(--color-primary);
    background: linear-gradient(135deg, #14b8a6 0%, #0ea5e9 55%, #6366f1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ─── Welcome heading ────────────────────────────────── */

.auth-welcome {
    text-align: center;
    margin-bottom: 26px;
}

.auth-heading {
    margin: 0 0 6px;
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 500;
    color: var(--color-warm-800);
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.auth-subtitle {
    margin: 0;
    font-size: 14px;
    font-weight: 400;
    color: var(--color-warm-600);
    line-height: 1.45;
}

/* ─── Tabs (pill-style segmented control) ────────────── */

.auth-tabs {
    display: flex;
    gap: 2px;
    padding: 4px;
    margin-bottom: 24px;
    background: var(--color-warm-100);
    border-radius: var(--radius-full);
    border: 1px solid var(--color-warm-200);
}

.auth-tab {
    flex: 1;
    padding: 10px 16px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-warm-600);
    background: transparent;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: color 200ms var(--ease-smooth),
                background 250ms var(--ease-smooth),
                box-shadow 250ms var(--ease-smooth);
    letter-spacing: 0.01em;
}

.auth-tab:hover:not(.active) {
    color: var(--color-warm-800);
}

.auth-tab.active {
    color: var(--color-primary-dark);
    background: white;
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.06),
        0 1px 2px rgba(20, 184, 166, 0.08);
}

/* ─── Forms ──────────────────────────────────────────── */

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: authFormFade 0.3s var(--ease-smooth);
}

.auth-form-panel {
    animation: authFormFade 0.3s var(--ease-smooth);
}

@keyframes authFormFade {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.auth-panel-intro {
    margin: 0 0 18px;
    font-size: 14px;
    color: var(--color-warm-700);
    line-height: 1.5;
    text-align: center;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-warm-700);
    letter-spacing: 0.01em;
}

.form-group input {
    width: 100%;
    padding: 13px 16px;
    font-family: inherit;
    font-size: 15px;
    color: var(--color-warm-800);
    background: rgba(255, 255, 255, 0.75);
    border: 1.5px solid var(--color-warm-300);
    border-radius: var(--radius-lg);
    transition: all 180ms var(--ease-smooth);
    box-sizing: border-box;
}

.form-group input::placeholder {
    color: var(--color-warm-500);
}

.form-group input:hover:not(:focus) {
    border-color: var(--color-warm-400);
}

.form-group input:focus {
    outline: none;
    background: white;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.14);
}

/* ─── Submit button (3-step gradient) ────────────────── */

.auth-submit {
    width: 100%;
    margin-top: 8px;
    padding: 14px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    color: white;
    letter-spacing: 0.01em;

    background: linear-gradient(135deg,
        #14b8a6 0%,
        #0ea5e9 60%,
        #6366f1 100%);
    background-size: 150% 150%;
    background-position: 0% 0%;

    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    box-shadow:
        0 6px 18px rgba(20, 184, 166, 0.32),
        0 2px 6px rgba(99, 102, 241, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
    transition: all 260ms var(--ease-smooth);
}

.auth-submit:hover {
    background-position: 100% 100%;
    transform: translateY(-1px);
    box-shadow:
        0 10px 26px rgba(20, 184, 166, 0.38),
        0 4px 10px rgba(99, 102, 241, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.auth-submit:active {
    transform: translateY(0);
    box-shadow:
        0 4px 12px rgba(20, 184, 166, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.auth-submit:disabled {
    background: var(--color-warm-300);
    color: var(--color-warm-500);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* ─── Helper link row ────────────────────────────────── */

.auth-helper {
    margin: 16px 0 0;
    text-align: center;
    font-size: 13px;
    color: var(--color-warm-600);
}

.auth-helper a {
    color: var(--color-primary-dark);
    font-weight: 500;
    text-decoration: none;
    transition: color 150ms;
}

.auth-helper a:hover {
    color: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ─── Message banners ────────────────────────────────── */

.error-message,
.success-message {
    display: none;
    padding: 12px 14px;
    margin-bottom: 18px;
    border-radius: var(--radius-md);
    font-size: 13px;
    line-height: 1.4;
}

.error-message {
    background: #fef2f2;
    color: #991b1b;
    border-left: 3px solid #ef4444;
}

.success-message {
    background: #ecfdf5;
    color: #065f46;
    border-left: 3px solid #10b981;
}

.error-message.show,
.success-message.show {
    display: block;
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════ */

@media (max-width: 640px) {
    .auth-container {
        padding: var(--space-4);
        background-position: right center;
    }

    .auth-box {
        padding: 36px 22px 28px;
        border-radius: var(--radius-xl);
        max-width: 100%;
    }

    .auth-brand {
        margin-bottom: 18px;
    }

    .auth-brand::before {
        width: 130px;
        height: 72px;
    }

    .auth-brand-icon {
        width: 60px;
        height: 60px;
    }

    .auth-brand-name {
        font-size: 20px;
    }

    .auth-welcome {
        margin-bottom: 22px;
    }

    .auth-heading {
        font-size: 22px;
    }

    .auth-subtitle {
        font-size: 13px;
    }

    .auth-tabs {
        margin-bottom: 20px;
    }

    .form-group input {
        padding: 12px 14px;
        font-size: 16px; /* 16px prevents iOS zoom-on-focus */
    }

    .auth-submit {
        padding: 13px;
        font-size: 15px;
    }
}

@media (max-width: 380px) {
    .auth-box {
        padding: 30px 18px 24px;
    }

    .auth-tab {
        padding: 9px 10px;
        font-size: 12px;
    }
}
