/* AAGGS Auth Pages — matches enterprise landing theme */

:root {
    --navy-950: #060e1a;
    --navy-900: #0a1628;
    --navy-800: #0f2340;
    --navy-700: #152d4f;
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-400: #94a3b8;
    --gray-600: #475569;
    --gray-700: #334155;
    --blue-500: #2563eb;
    --blue-accent: #00b4ff;
    --blue-glow: rgba(0, 180, 255, 0.22);
    --shadow-md: 0 4px 24px rgba(10, 22, 40, 0.08);
    --shadow-lg: 0 16px 48px rgba(10, 22, 40, 0.12);
    --radius: 12px;
    --radius-lg: 16px;
    --max-width: 1280px;
    --header-height: 96px;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Plus Jakarta Sans', var(--font-sans);
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--gray-700);
    background: var(--gray-50);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

/* ── Header ── */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--gray-200);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.brand-logo-img {
    display: block;
    height: 72px;
    width: auto;
    max-width: min(480px, 58vw);
    object-fit: contain;
    object-position: left center;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

.nav-link {
    position: relative;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--gray-700);
    padding: 0.625rem 1.125rem;
    border-radius: 8px;
    transition: color 0.25s;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0.25rem;
    left: 1.125rem;
    right: 1.125rem;
    height: 2px;
    background: var(--blue-accent);
    border-radius: 2px;
    transform: scaleX(0);
    transition: transform 0.3s var(--ease-out);
}

.nav-link:hover { color: var(--navy-900); }
.nav-link:hover::after { transform: scaleX(1); }

.nav-link.active {
    color: var(--navy-900);
    font-weight: 600;
}

.nav-link.active::after {
    transform: scaleX(1);
}

.nav-cta-wrap { margin-left: 0.75rem; }

.btn-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--white);
    background: linear-gradient(135deg, var(--blue-500) 0%, var(--blue-accent) 100%);
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 16px var(--blue-glow);
    transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}

.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0, 180, 255, 0.38);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: none;
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    cursor: pointer;
    padding: 10px;
}

.menu-toggle span {
    display: block;
    height: 2px;
    background: var(--navy-900);
    border-radius: 2px;
    transition: transform 0.25s, opacity 0.25s;
}

.menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 1.25rem 1.5rem 1.75rem;
    flex-direction: column;
    gap: 0.25rem;
    z-index: 999;
    box-shadow: var(--shadow-lg);
}

.mobile-nav.open { display: flex; }

.mobile-nav .nav-link {
    padding: 0.875rem 1rem;
    width: 100%;
}

.mobile-nav .nav-link::after { display: none; }

.mobile-nav .btn-cta {
    margin-top: 0.75rem;
    width: 100%;
    text-align: center;
    padding: 0.875rem 1rem;
}

/* ── Auth page layout ── */

.auth-page {
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
    background:
        linear-gradient(135deg, var(--navy-950) 0%, var(--navy-900) 45%, var(--navy-800) 100%);
    padding: 4rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.auth-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 50% at 80% 20%, rgba(0, 180, 255, 0.1) 0%, transparent 55%),
        radial-gradient(ellipse 50% 40% at 10% 80%, rgba(37, 99, 235, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

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

.auth-card {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    padding: 3rem 2.5rem;
    box-shadow: var(--shadow-lg);
}

.auth-card-narrow {
    max-width: 480px;
    margin: 0 auto;
}

.auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-header-logo {
    display: block;
    height: 80px;
    width: auto;
    margin: 0 auto 1.5rem;
    object-fit: contain;
}

.auth-title {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    font-size: 1.0625rem;
    color: rgba(255, 255, 255, 0.72);
}

/* ── Staff portal cards ── */

.staff-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.staff-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: background 0.35s var(--ease-out), border-color 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}

.staff-card:hover {
    background: rgba(0, 180, 255, 0.1);
    border-color: rgba(0, 180, 255, 0.35);
    transform: translateY(-4px);
}

.staff-card-logo {
    height: 64px;
    width: auto;
    margin: 0 auto 1.25rem;
    object-fit: contain;
    display: block;
}

.staff-card-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.staff-card-desc {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.55;
}

/* ── Form ── */

.form-group {
    margin-bottom: 1.25rem;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.5rem;
}

.form-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-family: var(--font-sans);
    color: var(--white);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-group input:focus {
    outline: none;
    border-color: rgba(0, 180, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(0, 180, 255, 0.15);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
    background: linear-gradient(135deg, var(--blue-500) 0%, var(--blue-accent) 100%);
    padding: 0.9375rem 1.875rem;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px var(--blue-glow);
    transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
    margin-top: 0.5rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 180, 255, 0.38);
}

.flash {
    padding: 0.875rem 1rem;
    border-radius: 10px;
    margin-bottom: 1.25rem;
    font-size: 0.9375rem;
    text-align: left;
}

.flash.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fecaca;
}

.flash:not(.error) {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #bbf7d0;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 2rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--blue-accent);
    transition: gap 0.25s, color 0.25s;
}

.back-link:hover {
    color: var(--white);
    gap: 0.625rem;
}

.auth-footer-link {
    text-align: center;
}

/* ── Responsive ── */

@media (max-width: 768px) {
    :root { --header-height: 80px; }

    .header-inner { padding: 0 1.25rem; }
    .nav-actions { display: none; }
    .menu-toggle { display: flex; }
    .brand-logo-img { height: 56px; max-width: min(360px, 52vw); }

    .auth-page { padding: 3rem 1.25rem; }
    .auth-card { padding: 2rem 1.5rem; }
    .staff-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .brand-logo-img { height: 48px; max-width: min(280px, 70vw); }
    .auth-header-logo { height: 64px; }
}
