/* ============================================================
   ArchiSearch — Auth Module — Login Page Styles
   File: public/css/auth/login.css
   ============================================================ */

/* ---------- Design Tokens ---------- */
:root {
    --auth-bg-start:   #0d1b4b;
    --auth-bg-end:     #1a3a8f;
    --primary:         #2563eb;
    --primary-hover:   #1d4ed8;
    --primary-focus:   rgba(37, 99, 235, 0.15);
    --card-bg:         #ffffff;
    --text-dark:       #0f172a;
    --text-main:       #1e293b;
    --text-muted:      #64748b;
    --text-light:      #94a3b8;
    --border-color:    #e2e8f0;
    --glass-bg:        rgba(255, 255, 255, 0.08);
    --glass-border:    rgba(255, 255, 255, 0.18);
    --hero-accent:     #60a5fa;
    --radius-card:     20px;
    --radius-input:    10px;
    --shadow-card:     0 24px 60px rgba(0, 0, 0, 0.45);
    --transition:      0.2s ease;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, var(--auth-bg-start) 0%, var(--auth-bg-end) 100%);
    min-height: 100vh;
    color: #fff;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* ---------- Page Wrapper ---------- */
.auth-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ---------- Top Brand Bar ---------- */
.auth-brand {
    padding: 1.5rem 2.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.auth-brand__logo {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(6px);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.03em;
    flex-shrink: 0;
}

.auth-brand__name {
    font-size: 1.15rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: -0.01em;
}

/* ---------- Main Content ---------- */
.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 2.5rem 3rem;
}

/* ---------- Hero (Left) ---------- */
.auth-hero {
    flex: 1;
    min-width: 0;
}

.auth-hero__title {
    font-size: clamp(2.25rem, 4vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.25rem;
    color: #fff;
}

.auth-hero__title .accent {
    color: var(--hero-accent);
}

.auth-hero__desc {
    font-size: 1rem;
    color: #cbd5e1;
    line-height: 1.65;
    margin-bottom: 2.5rem;
    max-width: 440px;
}

/* Stats row */
.auth-hero__stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.stat-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.1rem 1.25rem;
    backdrop-filter: blur(6px);
    min-width: 100px;
    flex: 1;
}

.stat-card__value {
    display: block;
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.25rem;
}

.stat-card__label {
    display: block;
    font-size: 0.78rem;
    color: var(--text-light);
    white-space: nowrap;
}

/* ---------- Login Card (Right) ---------- */
.auth-card-wrapper {
    width: 100%;
    max-width: 460px;
    flex-shrink: 0;
}

.auth-card {
    background: var(--card-bg);
    border-radius: var(--radius-card);
    padding: 2.5rem 2.75rem;
    box-shadow: var(--shadow-card);
    color: var(--text-main);
}

.auth-card__title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.35rem;
    letter-spacing: -0.02em;
}

.auth-card__subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* ---------- Form Groups ---------- */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.form-group__label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-main);
}

.form-group__forgot {
    font-size: 0.825rem;
    font-weight: 500;
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}

.form-group__forgot:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* ---------- Input Wrapper ---------- */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    padding: 0.75rem 2.75rem;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-input);
    font-size: 0.925rem;
    font-family: inherit;
    color: var(--text-main);
    background: #fff;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.input-wrapper input::placeholder {
    color: var(--text-light);
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-focus);
}

.input-icon {
    position: absolute;
    left: 0.85rem;
    color: var(--text-light);
    pointer-events: none;
    display: flex;
    align-items: center;
}

.password-toggle {
    position: absolute;
    right: 0.85rem;
    color: var(--text-light);
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    transition: color var(--transition);
}

.password-toggle:hover {
    color: var(--text-muted);
}

/* ---------- Remember Me ---------- */
.form-options {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.remember-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
}

.remember-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border: 1.5px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    accent-color: var(--primary);
    flex-shrink: 0;
}

/* ---------- Submit Button ---------- */
.submit-btn {
    width: 100%;
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 0.9rem;
    border-radius: var(--radius-input);
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
    letter-spacing: 0.01em;
}

.submit-btn:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

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

/* ---------- Security Notice ---------- */
.security-info {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #f1f5f9;
    color: var(--text-light);
    font-size: 0.8rem;
    line-height: 1.5;
}

.security-info__icon {
    flex-shrink: 0;
    margin-top: 1px;
    color: var(--text-light);
}

/* ---------- Footer ---------- */
.auth-footer {
    padding: 1.5rem 2.5rem;
    flex-shrink: 0;
}

.auth-footer__text {
    font-size: 0.82rem;
    color: #475569;
}

/* ============================================================
   Responsive — Tablet (≤ 1024px)
   ============================================================ */
@media (max-width: 1024px) {
    .auth-main {
        flex-direction: column;
        align-items: center;
        padding: 2rem 2rem 3rem;
        gap: 2.5rem;
    }

    .auth-hero {
        text-align: center;
        width: 100%;
    }

    .auth-hero__desc {
        margin-left: auto;
        margin-right: auto;
    }

    .auth-hero__stats {
        justify-content: center;
    }

    .auth-card-wrapper {
        max-width: 500px;
        width: 100%;
    }
}

/* ============================================================
   Responsive — Mobile (≤ 640px)
   ============================================================ */
@media (max-width: 640px) {
    .auth-brand {
        padding: 1.25rem 1.25rem;
    }

    .auth-main {
        padding: 1.5rem 1.25rem 2.5rem;
        gap: 2rem;
    }

    .auth-hero__title {
        font-size: 2rem;
    }

    .auth-hero__stats {
        gap: 0.75rem;
    }

    .stat-card {
        padding: 0.875rem 1rem;
    }

    .auth-card {
        padding: 1.75rem 1.5rem;
    }

    .auth-card-wrapper {
        max-width: 100%;
    }

    .auth-footer {
        padding: 1.25rem 1.25rem;
    }
}

/* ============================================================
   Responsive — Small Mobile (≤ 400px)
   ============================================================ */
@media (max-width: 400px) {
    .auth-hero__title {
        font-size: 1.75rem;
    }

    .stat-card__value {
        font-size: 1.15rem;
    }

    .auth-card {
        padding: 1.5rem;
    }
}
