
:root {
    color-scheme: dark;
    font-family: 'Barlow', "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    font-size: 18px;
    line-height: 1.65;
    color: #e4eff6;
    background-color: #081624;
    --bg: #081624;
    --surface: #0d2137;
    --surface-raised: #122944;
    --text: #e4eff6;
    --muted: #7a9fb5;
    --border: rgba(255, 255, 255, 0.08);
    --accent: #00b4d8;
    --accent-gold: #f0c040;
    --accent-soft: rgba(0, 180, 216, 0.12);
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    --radius: 18px;
    --radius-sm: 12px;
    --max-width: 1140px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background: radial-gradient(circle at top right, rgba(0, 180, 216, 0.04), transparent 40%),
        var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img,
svg {
    max-width: 100%;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover,
a:focus-visible {
    text-decoration: underline;
}

button,
input,
select,
textarea {
    font: inherit;
}

.container {
    width: min(100% - 2rem, var(--max-width));
    margin: 0 auto;
}

header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(8, 22, 36, 0.92);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    width: min(100% - 2rem, var(--max-width));
    margin: 0 auto;
}

.nav-container h1 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--accent);
}

.nav-container h1 a {
    color: var(--accent);
    text-decoration: none;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.nav-links a {
    padding: 0.75rem 1.15rem;
    border-radius: 999px;
    background: rgba(0, 180, 216, 0.08);
    color: var(--text);
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
    background: rgba(0, 180, 216, 0.18);
    color: var(--accent);
    text-decoration: none;
}

.login-btn,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.95rem 1.6rem;
    font-size: 1rem;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn {
    min-height: 48px;
}

.btn:hover,
.btn:focus-visible {
    transform: translateY(-2px);
    text-decoration: none;
}

.btn-primary,
.login-btn {
    background-color: var(--accent);
    color: #081624;
    box-shadow: 0 8px 24px rgba(0, 180, 216, 0.25);
}

.btn-primary:hover,
.login-btn:hover {
    background-color: #22c6e8;
    box-shadow: 0 12px 32px rgba(0, 180, 216, 0.4);
    color: #081624;
}

.btn-secondary {
    background-color: transparent;
    border: 1.5px solid var(--accent);
    color: var(--accent);
}

.btn-secondary:hover {
    background-color: rgba(0, 180, 216, 0.1);
    color: var(--accent);
}

main {
    padding: 0 0 3.5rem;
}

/* ── Hero ──────────────────────────────────────────────────── */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: flex-end;
    background-image: url('../images/zviScatterHero.png');
    background-size: cover;
    background-position: center;
    padding-bottom: 5rem;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(8, 22, 36, 0.45) 0%,
        rgba(8, 22, 36, 0.65) 50%,
        rgba(8, 22, 36, 0.88) 100%
    );
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero-content {
    display: grid;
    gap: 1.25rem;
    max-width: 820px;
}

.hero-subtitle {
    font-family: 'Barlow', sans-serif;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin-top: 0;
}

.hero-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(4rem, 10vw, 8rem);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 0.9;
    color: #ffffff;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
}

/* ── Welcome / inner sections ──────────────────────────────── */

.welcome {
    padding-top: 3rem;
}

.welcome .section-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2.5rem;
}

.page-title,
h2,
h3,
h4 {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text);
    line-height: 1.15;
}

.page-title {
    font-size: clamp(2rem, 3vw, 3rem);
}

.section-subtitle,
.welcome p {
    color: var(--muted);
    font-size: 1.05rem;
    max-width: 62rem;
    margin-top: 1rem;
}

.card,
.dashboard-card,
.form-container,
.auth-form,
.alert-section,
.crew-table,
.certificate-thumb {
    border-radius: var(--radius);
}

.success-message,
.error-message {
    border-radius: 14px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    font-size: 0.99rem;
}

.success-message {
    background: rgba(0, 200, 120, 0.1);
    color: #4ade9b;
    border: 1px solid rgba(0, 200, 120, 0.2);
}

.error-message {
    background: rgba(220, 50, 50, 0.1);
    color: #f87171;
    border: 1px solid rgba(220, 50, 50, 0.2);
}

footer {
    padding: 1.75rem 0;
    border-top: 1px solid var(--border);
}

footer .container {
    display: flex;
    justify-content: center;
    align-items: center;
}

footer p {
    color: var(--muted);
    font-size: 0.98rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 600;
    color: var(--text);
    font-size: 1rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.1rem;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--surface-raised);
    color: var(--text);
    font-size: 1rem;
    -webkit-appearance: none;
    appearance: none;
}

/* Override Chrome's autofill background, which ignores background-color on dark themes */
.form-group input:-webkit-autofill,
.form-group input:-webkit-autofill:hover,
.form-group input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px var(--surface-raised) inset;
    -webkit-text-fill-color: var(--text);
    caret-color: var(--text);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--muted);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.2);
}

/* ── Tables ────────────────────────────────────────────────── */

.table-wrapper {
    overflow-x: auto;
}

.crew-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    box-shadow: var(--shadow);
    margin-top: 1.5rem;
}

.crew-table th,
.crew-table td {
    padding: 1rem 1.1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.crew-table th {
    background: var(--surface-raised);
    color: var(--muted);
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.crew-table tr:hover {
    background: rgba(0, 180, 216, 0.05);
}

/* ── Status badges ─────────────────────────────────────────── */

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.88rem;
    font-family: 'Barlow Condensed', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-active    { background: rgba(0, 200, 120, 0.12);  color: #4ade9b; border: 1px solid rgba(0, 200, 120, 0.25); }
.status-inactive  { background: rgba(220, 50, 50, 0.12);   color: #f87171; border: 1px solid rgba(220, 50, 50, 0.25); }
.status-sabbatical{ background: rgba(240, 192, 64, 0.12);  color: #f0c040; border: 1px solid rgba(240, 192, 64, 0.25); }
.status-retired   { background: rgba(122, 159, 181, 0.12); color: #7a9fb5; border: 1px solid rgba(122, 159, 181, 0.25); }

/* ── Responsive ────────────────────────────────────────────── */

@media (max-width: 920px) {
    .nav-container {
        padding: 1rem 1rem;
    }
}

@media (max-width: 720px) {
    .nav-container {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .nav-links {
        justify-content: center;
    }

    .btn,
    .nav-links a {
        width: 100%;
    }

    .hero {
        align-items: center;
        padding-bottom: 0;
        padding-top: 6rem;
    }
}

@media (max-width: 520px) {
    :root {
        font-size: 16px;
    }

    .hero-title {
        font-size: clamp(3rem, 16vw, 5rem);
    }
}
