/* ============================================================
   HIRING HUB — Design Tokens & Base Styles
   Palette:
     --navy     #0a1628  (primary / sidebar)
     --surface  #f4f6f8  (page background)
     --card     #ffffff
     --ink      #1c2b3a  (body text)
     --muted    #7c8a9b
     --line     #e7ecf1
     --green    #00c875  (Approved / Active)
     --amber    #fdab3d  (For Approval / Pending)
     --red      #df2f4a  (Disapproved / On Hold)
     --teal     #4eccc6  (accent / focus)
   Type:
     Display  -> 'Sora'           (headings, nav, labels)
     Body     -> 'Inter'          (paragraphs, inputs)
     Data     -> 'JetBrains Mono' (Position IDs, timestamps, codes)
   ============================================================ */

:root {
    --navy:    #0a1628;
    --navy-2:  #142337;
    --surface: #f4f6f8;
    --card:    #ffffff;
    --ink:     #1c2b3a;
    --muted:   #7c8a9b;
    --line:    #e7ecf1;
    --green:   #00c875;
    --green-bg:#e6faf2;
    --amber:   #fdab3d;
    --amber-bg:#fff6e9;
    --red:     #df2f4a;
    --red-bg:  #fde8ec;
    --teal:    #4eccc6;
    --radius:  10px;
    --shadow:  0 2px 12px rgba(10, 22, 40, 0.06);
    --shadow-lg: 0 8px 32px rgba(10, 22, 40, 0.14);
}

* { box-sizing: border-box; }

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

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

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

a { color: inherit; }

button { font-family: inherit; }

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
}

@media (max-width: 860px) {
    .login-shell { grid-template-columns: 1fr; }
    .login-art { display: none; }
}

.login-art {
    background: var(--navy);
    color: #fff;
    padding: 56px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.login-art::before {
    content: "";
    position: absolute;
    inset: -40% -40% auto auto;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(78,204,198,0.18), transparent 70%);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 18px;
    z-index: 1;
}

.brand .logo-mark {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: var(--teal);
    display: flex; align-items: center; justify-content: center;
}

.route-track {
    z-index: 1;
    font-family: 'Sora', sans-serif;
}

.route-track h1 {
    color: #fff;
    font-size: 38px;
    line-height: 1.25;
    margin: 0 0 14px;
    max-width: 420px;
}

.route-track p {
    color: rgba(255,255,255,0.6);
    font-size: 15px;
    max-width: 380px;
    line-height: 1.7;
}

.route-pipeline {
    display: flex;
    align-items: center;
    gap: 0;
    margin-top: 36px;
    z-index: 1;
}

.route-pipeline .stop {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: rgba(255,255,255,0.55);
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.route-pipeline .dot {
    width: 12px; height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    border: 2px solid rgba(255,255,255,0.3);
}

.route-pipeline .stop.active .dot {
    background: var(--teal);
    border-color: var(--teal);
    box-shadow: 0 0 0 4px rgba(78,204,198,0.18);
}

.route-pipeline .stop.active { color: #fff; }

.route-pipeline .seg {
    width: 64px; height: 2px;
    background: rgba(255,255,255,0.18);
    margin: 0 6px;
    margin-bottom: 22px;
}

.login-foot {
    color: rgba(255,255,255,0.35);
    font-size: 12px;
    z-index: 1;
}

.login-form-side {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.login-box {
    width: 100%;
    max-width: 380px;
}

.login-box h2 {
    font-size: 26px;
    margin-bottom: 8px;
}

.login-box .sub {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 32px;
    line-height: 1.6;
}

.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 20px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 15px;
    color: var(--ink);
    cursor: pointer;
    text-decoration: none;
    transition: box-shadow .15s ease, border-color .15s ease;
}

.google-btn:hover {
    box-shadow: var(--shadow);
    border-color: var(--teal);
}

.alert {
    margin-top: 18px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.6;
}

.alert.error {
    background: var(--red-bg);
    color: #a91d36;
    border: 1px solid rgba(223,47,74,0.2);
}

.login-note {
    margin-top: 28px;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.7;
}

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

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

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

.sidebar .brand {
    margin-bottom: 40px;
}

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

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 8px;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-size: 14px;
    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.06); color: #fff; }
.nav-link.active { background: rgba(78,204,198,0.14); color: var(--teal); }

.sidebar-spacer { flex: 1; }

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

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

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

.logout-link {
    display: block;
    text-align: center;
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
}
.logout-link:hover { color: #fff; border-color: rgba(255,255,255,0.25); }

/* Main content */
.main {
    padding: 36px 44px;
    max-width: 980px;
}

@media (max-width: 700px) {
    .main { padding: 24px 20px; }
}

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-head h1 { font-size: 26px; margin: 0 0 6px; }
.page-head .desc { color: var(--muted); font-size: 14px; max-width: 460px; }

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

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

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

.card .card-sub {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 22px;
}

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

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

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

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

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    color: var(--ink);
    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(--teal);
    box-shadow: 0 0 0 3px rgba(78,204,198,0.15);
}

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

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

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

.btn {
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 14px;
    padding: 12px 26px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: transform .1s ease, box-shadow .15s ease, opacity .15s ease;
}

.btn-primary {
    background: var(--navy);
    color: #fff;
}
.btn-primary:hover { box-shadow: var(--shadow-lg); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

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

.form-msg {
    font-size: 13px;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 18px;
    display: none;
}
.form-msg.show { display: block; }
.form-msg.success { background: var(--green-bg); color: #06794f; }
.form-msg.error { background: var(--red-bg); color: #a91d36; }

/* ============================================================
   REQUISITION TRACKER LIST
   ============================================================ */
.req-list { display: flex; flex-direction: column; gap: 14px; }

.req-row {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px 20px;
    background: var(--card);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    align-items: center;
}

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

.req-main .title { font-family: 'Sora', sans-serif; font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.req-main .meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--muted);
    display: flex; gap: 14px; flex-wrap: wrap;
}

/* Pipeline tracker — signature element */
.tracker {
    display: flex;
    align-items: center;
}

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

.tracker .leg .label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    white-space: nowrap;
}

.tracker .leg.done .label,
.tracker .leg.current .label { color: var(--navy); font-weight: 600; }

.tracker .leg.rejected .label { color: var(--red); font-weight: 600; }

.tracker .node {
    width: 14px; height: 14px;
    border-radius: 50%;
    background: var(--line);
    border: 2px solid var(--line);
}

.tracker .leg.done .node { background: var(--green); border-color: var(--green); }
.tracker .leg.current .node {
    background: var(--amber); border-color: var(--amber);
    box-shadow: 0 0 0 4px var(--amber-bg);
}
.tracker .leg.rejected .node {
    background: var(--red); border-color: var(--red);
    box-shadow: 0 0 0 4px var(--red-bg);
}

.tracker .rail {
    width: 36px; height: 2px;
    background: var(--line);
}
.tracker .rail.done { background: var(--green); }

/* Status pill */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.pill.pending { background: var(--amber-bg); color: #a35c00; }
.pill.approved { background: var(--green-bg); color: #06794f; }
.pill.disapproved { background: var(--red-bg); color: #a91d36; }

.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: var(--muted);
}
.empty-state .icon { font-size: 36px; margin-bottom: 12px; }
.empty-state p { font-size: 14px; }

.loading-spinner {
    display: inline-block;
    width: 16px; height: 16px;
    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: 76px;
    border-radius: var(--radius);
    background: linear-gradient(90deg, var(--card) 25%, #eef1f4 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; } }
