/* ============================================================
   SKY GROUP OF COMPANIES — HIRING HUB
   Design system grounded in the compass-rose crest:
   navigation, bearings, manifest — not a generic SaaS look.

   Palette
     --navy      #0d1b2e   crest body / primary surface
     --slate     #1c2e44   panels, sidebar
     --steel     #5b6b80   muted text, hairlines on dark
     --paper     #eef1f5   page background
     --card      #ffffff   card surface
     --line      #dde3ea   hairline on light
     --brass     #c9a86a   gold ring accent — dividers, active state
     --crest-red #b6121f   the one warm accent — CTAs, alerts only
     --red-bg    #fbe9eb
     --pine      #2f6f4f   approved/active (muted, not neon green)
     --pine-bg   #e9f3ee

   Type
     Display  -> 'Spectral'        (headings, wordmark, signature numerals)
     Body     -> 'Inter'           (paragraphs, inputs, UI labels)
     Manifest -> 'JetBrains Mono'  (position IDs, dates, log lines)
   ============================================================ */

:root {
    --navy:      #0d1b2e;
    --slate:     #1c2e44;
    --slate-2:   #243a55;
    --steel:     #5b6b80;
    --paper:     #ffffff;
    --surface:   #f7f8fa;
    --card:      #ffffff;
    --line:      #e2e6eb;
    --brass:     #c9a86a;
    --brass-dim: #e3d4b3;
    --crest-red: #b6121f;
    --red-bg:    #fbe9eb;
    --pine:      #2f6f4f;
    --pine-bg:   #e9f3ee;
    --amber:     #a66a1f;
    --amber-bg:  #f7ecd9;
    --radius:    8px;
    --shadow:    0 1px 2px rgba(13,27,46,0.05), 0 4px 16px rgba(13,27,46,0.04);
    --shadow-lg: 0 12px 40px rgba(13,27,46,0.16);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background: var(--surface);
    color: var(--navy);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .display {
    font-family: 'Spectral', serif;
    color: var(--navy);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.mono {
    font-family: 'JetBrains Mono', monospace;
}

a { color: inherit; }
button { font-family: inherit; }

/* ============================================================
   LOGIN — single centered card. No hero, no marketing copy,
   no split-screen. A manifest seal, a wordmark, one control.
   ============================================================ */
.login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--navy);
    background-image:
        radial-gradient(circle at 50% 0%, rgba(201,168,106,0.07), transparent 55%);
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 360px;
    text-align: center;
}

.login-card .seal {
    width: 64px;
    height: 64px;
    margin: 0 auto 22px;
    display: block;
}

.login-card .wordmark {
    font-family: 'Spectral', serif;
    font-size: 22px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.01em;
    margin-bottom: 6px;
}

.login-card .tagline {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brass-dim);
    margin-bottom: 36px;
}

.login-card .rule {
    width: 36px;
    height: 1px;
    background: rgba(201,168,106,0.4);
    margin: 0 auto 36px;
}

.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 13px 20px;
    background: #fff;
    border: none;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: var(--navy);
    cursor: pointer;
    text-decoration: none;
    transition: transform .12s ease;
}
.google-btn:hover { transform: translateY(-1px); }
.google-btn:active { transform: translateY(0); }

.alert {
    margin-top: 16px;
    padding: 11px 15px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.6;
    background: rgba(182,18,31,0.12);
    color: #f3b8be;
    border: 1px solid rgba(182,18,31,0.25);
    text-align: left;
}

.login-foot {
    margin-top: 28px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.28);
}

/* ============================================================
   APP SHELL
   ============================================================ */
.app-shell {
    display: grid;
    grid-template-columns: 248px 1fr;
    min-height: 100vh;
}

@media (max-width: 900px) {
    .app-shell { grid-template-columns: 1fr; }
}

.sidebar {
    background: var(--navy);
    color: #fff;
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    padding: 0 8px;
}

.sidebar .brand img {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
}

.sidebar .brand .word {
    font-family: 'Spectral', serif;
    font-weight: 600;
    font-size: 15px;
    color: #fff;
    line-height: 1.25;
}

.sidebar .brand .word small {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.1em;
    color: var(--brass-dim);
    text-transform: uppercase;
    font-weight: 400;
}

.sidebar-rule {
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin: 16px 8px 18px;
}

.nav-section {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255,255,255,0.32);
    margin: 18px 0 8px;
    padding: 0 10px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: 6px;
    color: rgba(255,255,255,0.68);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: 'Inter', sans-serif;
    transition: background .15s ease, color .15s ease;
}

.nav-link:hover { background: rgba(255,255,255,0.05); color: #fff; }
.nav-link.active {
    background: rgba(201,168,106,0.12);
    color: var(--brass);
}
.nav-link .ico { width: 15px; text-align: center; opacity: 0.85; font-size: 13px; }

.sidebar-spacer { flex: 1; }

.routing-card {
    padding: 12px 12px 4px;
    font-size: 11.5px;
    color: rgba(255,255,255,0.4);
    line-height: 1.8;
    font-family: 'JetBrains Mono', monospace;
}
.routing-card strong { color: rgba(255,255,255,0.85); font-weight: 500; }
.routing-card .to { color: var(--brass); }

.user-card {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px;
    border-radius: 8px;
    background: rgba(255,255,255,0.04);
    margin-top: 14px;
    margin-bottom: 10px;
}

.user-card img {
    width: 32px; height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-card .meta { overflow: hidden; }
.user-card .meta .name { font-size: 12.5px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-card .meta .email { font-size: 10.5px; color: rgba(255,255,255,0.4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.logout-link {
    display: block;
    text-align: center;
    font-size: 12.5px;
    color: rgba(255,255,255,0.45);
    text-decoration: none;
    padding: 9px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.08);
}
.logout-link:hover { color: #fff; border-color: rgba(255,255,255,0.2); }

/* Mobile: collapse the sidebar into a compact horizontal top bar
   instead of a tall stacked navy block. Placed after the base
   .sidebar rules above so it correctly overrides them at this
   breakpoint (equal-specificity selectors are order-dependent). */
@media (max-width: 900px) {
    .sidebar {
        position: sticky;
        top: 0;
        height: auto;
        flex-direction: row;
        align-items: center;
        padding: 12px 16px;
        gap: 14px;
        z-index: 50;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .sidebar .brand { margin-bottom: 0; flex-shrink: 0; }
    .sidebar .brand .word small { display: none; }
    .sidebar-rule { display: none; }
    .nav-section { display: none; }
    .routing-card { display: none; }
    .sidebar-spacer { display: none; }
    .user-card { display: none; }
    .logout-link { flex-shrink: 0; white-space: nowrap; margin-left: auto; }

    .nav-link {
        flex-shrink: 0;
        padding: 8px 12px;
        white-space: nowrap;
    }
    .nav-link .ico { display: none; }
}

@media (max-width: 540px) {
    .sidebar .brand .word { font-size: 13px; }
    .nav-link { font-size: 12.5px; padding: 7px 10px; }
    .logout-link { font-size: 11.5px; padding: 7px 10px; }
}

/* Main content */
.main {
    padding: 32px 40px 60px;
    width: 100%;
}

@media (max-width: 700px) {
    .main { padding: 18px 14px 40px; }
}

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 26px;
    flex-wrap: wrap;
    gap: 14px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.page-head .eyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--steel);
    margin-bottom: 6px;
}

.page-head h1 { font-size: 23px; margin: 0 0 6px; }
.page-head .desc { color: var(--steel); font-size: 13.5px; max-width: 460px; line-height: 1.6; }

.badge-dept {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    padding: 6px 12px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--navy);
    white-space: nowrap;
    letter-spacing: 0.04em;
}

/* Card / Form */
.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
    padding: 26px;
    margin-bottom: 24px;
}

.card h2 {
    font-size: 15px;
    margin: 0 0 4px;
}

.card .card-sub {
    color: var(--steel);
    font-size: 12.5px;
    margin-bottom: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-grid .full { grid-column: 1 / -1; }

.admin-filter-grid { grid-template-columns: 2fr 1fr 1fr; }
@media (max-width: 700px) {
    .admin-filter-grid { grid-template-columns: 1fr; }
}

@media (min-width: 1200px) {
    .form-grid:not(.admin-filter-grid) { grid-template-columns: 1fr 1fr 1fr; }
}

@media (max-width: 600px) {
    .form-grid { grid-template-columns: 1fr; }
}

.field label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 7px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    font-size: 13.5px;
    font-family: 'Inter', sans-serif;
    color: var(--navy);
    background: #fcfdfe;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--brass);
    box-shadow: 0 0 0 3px rgba(201,168,106,0.18);
}

.field textarea { resize: vertical; min-height: 86px; }

.field .hint {
    font-size: 11.5px;
    color: var(--steel);
    margin-top: 6px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.btn {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 13.5px;
    padding: 11px 24px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: transform .1s ease, opacity .15s ease;
}

.btn-primary {
    background: var(--navy);
    color: #fff;
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn-ghost {
    background: transparent;
    color: var(--steel);
    border: 1px solid var(--line);
}
.btn-ghost:hover { color: var(--navy); border-color: var(--steel); }

.form-msg {
    font-size: 12.5px;
    padding: 11px 15px;
    border-radius: 6px;
    margin-top: 16px;
    display: none;
    line-height: 1.6;
}
.form-msg.show { display: block; }
.form-msg.success { background: var(--pine-bg); color: var(--pine); }
.form-msg.error { background: var(--red-bg); color: var(--crest-red); }

/* ============================================================
   REQUISITION TRACKER — bearing indicator replaces generic
   dot-stepper. Reads like a compass: N (filed) through the
   needle's current heading.
   ============================================================ */
.req-list { display: flex; flex-direction: column; gap: 12px; }

.req-row {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 17px 19px;
    background: var(--card);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
    transition: border-color .15s ease;
}
.req-row:hover { border-color: var(--brass); }

@media (max-width: 700px) {
    .req-row { grid-template-columns: 1fr; }
}

.req-main .title { font-family: 'Spectral', serif; font-weight: 600; font-size: 15px; margin-bottom: 5px; color: var(--navy); }
.req-main .meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    color: var(--steel);
    display: flex; gap: 13px; flex-wrap: wrap;
    align-items: center;
}

/* Bearing indicator */
.bearing {
    display: flex;
    align-items: center;
    gap: 0;
}

.bearing .leg {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 68px;
}

.bearing .leg .tick-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9.5px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--steel);
    white-space: nowrap;
}

.bearing .leg.done .tick-label,
.bearing .leg.current .tick-label { color: var(--navy); font-weight: 600; }
.bearing .leg.rejected .tick-label { color: var(--crest-red); font-weight: 600; }

.bearing .tick {
    width: 9px; height: 9px;
    border: 2px solid var(--line);
    background: var(--card);
    transform: rotate(45deg);
}

.bearing .leg.done .tick { background: var(--pine); border-color: var(--pine); }
.bearing .leg.current .tick {
    background: var(--brass); border-color: var(--brass);
    box-shadow: 0 0 0 4px var(--amber-bg);
}
.bearing .leg.rejected .tick {
    background: var(--crest-red); border-color: var(--crest-red);
    box-shadow: 0 0 0 4px var(--red-bg);
}

.bearing .rail {
    width: 30px; height: 1px;
    background: var(--line);
}
.bearing .rail.done { background: var(--pine); }

/* Status pill */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: 'JetBrains Mono', monospace;
}
.pill.pending { background: var(--amber-bg); color: var(--amber); }
.pill.approved { background: var(--pine-bg); color: var(--pine); }
.pill.disapproved { background: var(--red-bg); color: var(--crest-red); }

.empty-state {
    text-align: center;
    padding: 56px 20px;
    color: var(--steel);
}
.empty-state .icon { font-size: 30px; margin-bottom: 14px; opacity: 0.5; }
.empty-state p { font-size: 13.5px; }

.loading-spinner {
    display: inline-block;
    width: 14px; height: 14px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
    vertical-align: -2px;
    margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
    height: 72px;
    border-radius: var(--radius);
    background: linear-gradient(90deg, var(--card) 25%, #e6eaf0 37%, var(--card) 63%);
    background-size: 400% 100%;
    animation: shimmer 1.4s ease infinite;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* Admin row */
.req-row.admin-row {
    grid-template-columns: 1fr auto;
    align-items: flex-start;
}
.req-row.admin-row .req-main .meta strong { color: var(--navy); font-weight: 600; }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    flex-wrap: wrap;
}

.pagination .page-info {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11.5px;
    color: var(--steel);
}

.pagination .page-info strong { color: var(--navy); font-weight: 600; }

.pagination .page-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}

.page-btn {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid var(--line);
    background: var(--card);
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--navy);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color .15s ease, background .15s ease;
}

.page-btn:hover:not(:disabled) { border-color: var(--brass); background: var(--amber-bg); }
.page-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.page-btn.active { background: var(--navy); color: #fff; border-color: var(--navy); }

.page-size-select {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11.5px;
    padding: 6px 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--card);
    color: var(--navy);
}
