/* ==========================================================================
   Aviation News Careers — Design system
   Palette:
     --navy       #0B1F35  (night-sky navy, primary background/dark surfaces)
     --navy-2     #122A46  (elevated navy surface)
     --sky        #2E6F9E  (daytime sky blue, primary accent/links)
     --amber      #F5A623  (runway/beacon amber, calls to action)
     --paper      #F7F5F1  (light background, off-white)
     --ink        #101418  (body text on light backgrounds)
     --mist       #6B7686  (secondary text)
     --line       #E3E1DA  (hairline borders on light bg)
   Type:
     Display  — "Space Grotesk" (geometric, instrument-panel feel)
     Body     — "Inter"
     Data/mono— "IBM Plex Mono" (used for stats, like an airport departures board)
   Signature: departures-board style stat readouts + a horizon line motif.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500;600&display=swap');

:root {
    --navy: #0B1F35;
    --navy-2: #122A46;
    --navy-3: #1B3B60;
    --sky: #2E6F9E;
    --sky-light: #6FA8D6;
    --amber: #F5A623;
    --amber-dark: #D98C0F;
    --paper: #F7F5F1;
    --ink: #101418;
    --mist: #6B7686;
    --line: #E3E1DA;
    --green: #1F9D66;
    --red: #C7433F;

    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;

    --radius: 8px;
    --shadow: 0 4px 20px rgba(11, 31, 53, 0.08);
    --shadow-lg: 0 12px 40px rgba(11, 31, 53, 0.16);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--paper);
    color: var(--ink);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    line-height: 1.15;
    margin: 0 0 0.5em;
    letter-spacing: -0.01em;
}

a { color: var(--sky); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Top nav ---------- */
.site-header {
    background: var(--navy);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
    color: #fff;
}
.brand:hover { text-decoration: none; }
.brand .beacon {
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--amber);
    box-shadow: 0 0 10px 2px rgba(245,166,35,0.7);
    flex-shrink: 0;
}
.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a {
    color: rgba(255,255,255,0.82);
    font-weight: 500;
    font-size: 0.95rem;
}
.main-nav a:hover { color: #fff; text-decoration: none; }
.nav-actions { display: flex; align-items: center; gap: 12px; }

.nav-toggle { display: none; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.92rem;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: var(--font-body);
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn:hover { text-decoration: none; }
.btn-amber { background: var(--amber); color: var(--navy); }
.btn-amber:hover { background: var(--amber-dark); color: var(--navy); transform: translateY(-1px); }
.btn-outline { background: transparent; border-color: rgba(255,255,255,0.4); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,0.1); color: #fff; }
.btn-sky { background: var(--sky); color: #fff; }
.btn-sky:hover { background: #275e86; color: #fff; }
.btn-ghost { background: transparent; color: var(--sky); border-color: var(--line); }
.btn-ghost:hover { background: rgba(46,111,158,0.08); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #a3322e; color: #fff; }
.btn-sm { padding: 7px 14px; font-size: 0.82rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 65%, var(--navy-3) 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
    padding: 96px 0 64px;
}
.hero::after {
    /* horizon line motif */
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(245,166,35,0.7), transparent);
}
.hero .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--amber);
    background: rgba(245,166,35,0.12);
    border: 1px solid rgba(245,166,35,0.35);
    padding: 6px 12px;
    border-radius: 100px;
    margin-bottom: 22px;
}
.hero h1 {
    font-size: clamp(2.2rem, 4vw, 3.4rem);
    max-width: 780px;
    color: #fff;
}
.hero p.lead {
    max-width: 620px;
    font-size: 1.15rem;
    color: rgba(255,255,255,0.78);
    margin-bottom: 32px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Departures-board style stat readout */
.board {
    margin-top: 64px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: var(--radius);
    overflow: hidden;
    background: rgba(0,0,0,0.18);
}
.board .cell {
    padding: 20px 18px;
    border-right: 1px solid rgba(255,255,255,0.1);
}
.board .cell:last-child { border-right: none; }
.board .cell .num {
    font-family: var(--font-mono);
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--amber);
    letter-spacing: 0.02em;
}
.board .cell .label {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 4px;
}

/* ---------- Sections ---------- */
.section { padding: 80px 0; }
.section-tight { padding: 48px 0; }
.section-alt { background: #fff; }
.section-navy { background: var(--navy); color: #fff; }
.section-header { max-width: 640px; margin: 0 0 48px; }
.section-header .kicker {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--sky);
    margin-bottom: 10px;
    display: block;
}
.section-header p { color: var(--mist); font-size: 1.05rem; }

/* Two-track cards (agency vs candidate) */
.tracks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}
.track-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 36px;
    position: relative;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}
.track-card .tag {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--sky);
    margin-bottom: 14px;
}
.track-card h3 { font-size: 1.5rem; margin-bottom: 10px; }
.track-card p { color: var(--mist); margin-bottom: 24px; flex-grow: 1; }
.track-card.agency { border-top: 4px solid var(--sky); }
.track-card.candidate { border-top: 4px solid var(--amber); }

/* Industry chip grid */
.chip-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
    display: inline-flex;
    align-items: center;
    padding: 9px 16px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 100px;
    font-size: 0.88rem;
    color: var(--ink);
}

/* ---------- Forms ---------- */
.form-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 40px;
    box-shadow: var(--shadow);
}
.form-group { margin-bottom: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
label {
    display: block;
    font-weight: 600;
    font-size: 0.88rem;
    margin-bottom: 6px;
    color: var(--ink);
}
input[type="text"], input[type="email"], input[type="password"],
input[type="tel"], input[type="date"], input[type="number"],
select, textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: var(--font-body);
    background: #fff;
    color: var(--ink);
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--sky);
    box-shadow: 0 0 0 3px rgba(46,111,158,0.15);
}
textarea { resize: vertical; min-height: 120px; }
.field-error { color: var(--red); font-size: 0.82rem; margin-top: 6px; }
.field-hint { color: var(--mist); font-size: 0.8rem; margin-top: 6px; }
.checkbox-row { display: flex; align-items: center; gap: 8px; }
.checkbox-row input { width: auto; }

/* Auth layout */
.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}
.auth-side {
    background: linear-gradient(160deg, var(--navy) 0%, var(--navy-3) 100%);
    color: #fff;
    padding: 56px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.auth-side .quote { max-width: 380px; }
.auth-side .quote p { font-family: var(--font-display); font-size: 1.4rem; line-height: 1.35; }
.auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}
.auth-box { width: 100%; max-width: 440px; }
.auth-box .form-card { padding: 36px; }
.auth-links { text-align: center; margin-top: 20px; font-size: 0.92rem; color: var(--mist); }

/* Alerts */
.alert {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.92rem;
    border: 1px solid transparent;
}
.alert-success { background: #E9F7EF; color: #1F6D45; border-color: #BFE6CE; }
.alert-error { background: #FBEBEA; color: #8C2B27; border-color: #F2C6C3; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: rgba(255,255,255,0.65); padding: 56px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
.footer-grid h4 { color: #fff; font-size: 0.95rem; }
.footer-grid a { color: rgba(255,255,255,0.65); font-size: 0.9rem; display: block; margin-bottom: 10px; }
.footer-grid a:hover { color: #fff; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    flex-wrap: wrap;
    gap: 10px;
}

/* ---------- Admin layout ---------- */
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 260px;
    background: var(--navy);
    color: #fff;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}
.admin-sidebar .brand { padding: 24px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.admin-nav { padding: 16px 12px; flex-grow: 1; overflow-y: auto; }
.admin-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 6px;
    color: rgba(255,255,255,0.75);
    font-size: 0.92rem;
    font-weight: 500;
    margin-bottom: 2px;
}
.admin-nav a:hover { background: rgba(255,255,255,0.06); color: #fff; text-decoration: none; }
.admin-nav a.active { background: rgba(245,166,35,0.14); color: var(--amber); }
.admin-nav .nav-section-label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.35);
    padding: 18px 14px 6px;
}
.admin-sidebar-footer { padding: 16px; border-top: 1px solid rgba(255,255,255,0.08); }
.admin-main { flex-grow: 1; min-width: 0; }
.admin-topbar {
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 18px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.admin-content { padding: 32px; }

.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 32px; }
.stat-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 22px;
}
.stat-card .num { font-family: var(--font-mono); font-size: 1.9rem; font-weight: 600; color: var(--navy); }
.stat-card .label { color: var(--mist); font-size: 0.85rem; margin-top: 4px; }

.panel { background: #fff; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 28px; }
.panel-header { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.panel-header h3 { font-size: 1.05rem; margin: 0; }
.panel-body { padding: 22px; }

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table th {
    text-align: left;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--mist);
    padding: 10px 16px;
    border-bottom: 2px solid var(--line);
}
table td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table tr:last-child td { border-bottom: none; }
table tr:hover td { background: #FAFAF8; }

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.76rem;
    font-weight: 600;
    text-transform: capitalize;
}
.badge-green { background: #E9F7EF; color: #1F6D45; }
.badge-amber { background: #FEF3E1; color: #92600C; }
.badge-red { background: #FBEBEA; color: #8C2B27; }
.badge-gray { background: #EEEDE9; color: var(--mist); }

.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; gap: 16px; flex-wrap: wrap; }
.search-box { display: flex; gap: 8px; }
.search-box input { min-width: 260px; }

.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 24px; }
.pagination a, .pagination span {
    padding: 8px 14px; border: 1px solid var(--line); border-radius: 6px; font-size: 0.88rem; color: var(--ink);
}
.pagination a:hover { background: #F1EFEA; text-decoration: none; }
.pagination .current { background: var(--navy); color: #fff; border-color: var(--navy); }

.empty-state { text-align: center; padding: 60px 20px; color: var(--mist); }

/* Utility */
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.text-mist { color: var(--mist); }
.small { font-size: 0.85rem; }

/* ---------- Message thread ---------- */
.thread { display: flex; flex-direction: column; gap: 14px; margin-bottom: 24px; }
.msg { max-width: 70%; padding: 12px 16px; border-radius: 12px; background: #F1EFEA; }
.msg .meta { font-size: 0.72rem; color: var(--mist); margin-bottom: 4px; }
.msg.mine { align-self: flex-end; background: var(--sky); color: #fff; }
.msg.mine .meta { color: rgba(255,255,255,0.75); }

/* ---------- Job cards (public listing) ---------- */
.job-card {
    background: #fff; border: 1px solid var(--line); border-radius: 10px;
    padding: 24px; margin-bottom: 16px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.job-card h3 { font-size: 1.15rem; margin-bottom: 6px; }
.job-card .company { color: var(--sky); font-weight: 600; font-size: 0.92rem; margin-bottom: 10px; }
.job-card .meta-row { display: flex; gap: 10px; flex-wrap: wrap; font-size: 0.82rem; color: var(--mist); }
.job-card .meta-row span { display: inline-flex; align-items: center; gap: 4px; }

.filter-bar {
    background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 18px;
    display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; align-items: flex-end;
}
.filter-bar .form-group { margin-bottom: 0; min-width: 160px; flex: 1; }

.file-drop {
    border: 2px dashed var(--line); border-radius: 8px; padding: 20px; text-align: center;
    color: var(--mist); font-size: 0.88rem; background: #FAFAF8;
}
.logo-preview { width: 72px; height: 72px; border-radius: 8px; object-fit: cover; border: 1px solid var(--line); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-side { display: none; }
    .tracks { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .stat-cards { grid-template-columns: 1fr 1fr; }
    .board { grid-template-columns: 1fr 1fr; }
    .admin-sidebar { position: fixed; left: -280px; z-index: 100; transition: left 0.2s ease; box-shadow: var(--shadow-lg); }
    .admin-sidebar.open { left: 0; }
}
@media (max-width: 700px) {
    .main-nav { display: none; }
    .form-row { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .admin-content { padding: 18px; }
    .admin-topbar { padding: 14px 18px; }
}
