/* =====================================================================
   ShiftLink — App CSS
   Theme: Deep Slate + Electric Teal
   ===================================================================== */

/* ── Reset ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #0A0F1E;
    color: #E2E8F0;
    font-size: 14px;
    line-height: 1.6;
}

/* ── CSS Variables ──────────────────────────────────────────────────── */
:root {
    --bg-base:       #0A0F1E;
    --bg-surface:    #111827;
    --bg-card:       #1A2235;
    --bg-card-hover: #1E293B;
    --border:        rgba(0, 212, 170, 0.12);
    --border-strong: rgba(0, 212, 170, 0.25);

    --teal:          #00D4AA;
    --teal-dark:     #00A882;
    --teal-glow:     rgba(0, 212, 170, 0.15);
    --indigo:        #6366F1;
    --indigo-dark:   #4F46E5;
    --gold:          #F59E0B;
    --gold-dark:     #D97706;

    --text-primary:  #F1F5F9;
    --text-muted:    #94A3B8;
    --text-dim:      #64748B;

    --success:       #10B981;
    --danger:        #EF4444;
    --warning:       #F59E0B;
    --info:          #3B82F6;

    --radius-sm:     6px;
    --radius-md:     10px;
    --radius-lg:     14px;
    --radius-xl:     20px;
    --radius-pill:   999px;

    --shadow-sm:  0 2px 8px rgba(0,0,0,0.3);
    --shadow-md:  0 6px 24px rgba(0,0,0,0.4);
    --shadow-lg:  0 12px 40px rgba(0,0,0,0.5);
    --shadow-teal: 0 0 20px rgba(0,212,170,0.15);
}

/* ── Layout ─────────────────────────────────────────────────────────── */
.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-header {
    background: linear-gradient(90deg, #080E1A 0%, #0D1529 100%);
    border-bottom: 1px solid var(--border);
    padding: 0 20px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.brand-mark {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, var(--teal) 0%, var(--indigo) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 900;
    color: #fff;
    letter-spacing: -1px;
    box-shadow: var(--shadow-teal);
}

.brand-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.02em;
}

.brand-name span { color: var(--teal); }

.header-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ── Nav groups / links ─────────────────────────────────────────────── */
.nav-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    border: 1px solid transparent;
    transition: all 0.15s;
}
.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-card);
    border-color: var(--border);
}
.nav-link-accent {
    background: rgba(0,212,170,0.12);
    color: var(--teal);
    border-color: rgba(0,212,170,0.25);
}
.nav-link-accent:hover {
    background: rgba(0,212,170,0.22);
    color: var(--teal);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 8px;
    padding-left: 10px;
    border-left: 1px solid var(--border);
}

.user-chip {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    padding: 4px 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    white-space: nowrap;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Hamburger button ───────────────────────────────────────────────── */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 38px;
    height: 38px;
    padding: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    z-index: 110;
    transition: background 0.15s;
}
.nav-toggle:hover { background: var(--bg-card-hover); }
.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-muted);
    border-radius: 2px;
    transition: all 0.25s;
    transform-origin: center;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* .header-user replaced by .nav-user + .user-chip */

.tier-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.tier-badge.gold  { background: rgba(245,158,11,0.15); color: var(--gold); border: 1px solid rgba(245,158,11,0.3); }
.tier-badge.free  { background: rgba(148,163,184,0.1); color: var(--text-muted); border: 1px solid var(--border); }

.app-main {
    flex: 1;
    padding: 24px 20px;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

/* ── Cards ──────────────────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.card-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ── Stats Grid ─────────────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.stat-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-teal); }

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--teal), var(--indigo));
}

.stat-icon {
    font-size: 22px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ── Buttons ────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    border: none;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.15s ease;
    line-height: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
    color: #0A0F1E;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0,212,170,0.3);
}
.btn-primary:hover { filter: brightness(1.1); box-shadow: 0 4px 16px rgba(0,212,170,0.4); }

.btn-indigo {
    background: linear-gradient(135deg, var(--indigo) 0%, var(--indigo-dark) 100%);
    color: #fff;
    box-shadow: 0 2px 10px rgba(99,102,241,0.3);
}
.btn-indigo:hover { filter: brightness(1.1); }

.btn-gold {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: #0A0F1E;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(245,158,11,0.3);
}
.btn-gold:hover { filter: brightness(1.1); }

.btn-outline {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-strong);
}
.btn-outline:hover { background: var(--bg-card-hover); color: var(--text-primary); }

.btn-danger {
    background: rgba(239,68,68,0.15);
    color: #F87171;
    border: 1px solid rgba(239,68,68,0.3);
}
.btn-danger:hover { background: rgba(239,68,68,0.25); }

.btn-success {
    background: rgba(16,185,129,0.15);
    color: #34D399;
    border: 1px solid rgba(16,185,129,0.3);
}
.btn-success:hover { background: rgba(16,185,129,0.25); }

.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-lg { padding: 12px 28px; font-size: 15px; }

/* ── Forms ──────────────────────────────────────────────────────────── */
.form-grid { display: grid; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

.form-group { display: flex; flex-direction: column; gap: 5px; }

label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

input, select, textarea {
    width: 100%;
    padding: 9px 12px;
    background: var(--bg-surface);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 2px rgba(0,212,170,0.15);
}

input::placeholder, textarea::placeholder { color: var(--text-dim); }
select option { background: var(--bg-surface); color: var(--text-primary); }
textarea { min-height: 80px; resize: vertical; }

.form-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    padding-top: 8px;
}

/* ── Tables ─────────────────────────────────────────────────────────── */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

thead tr {
    background: rgba(0,212,170,0.05);
    border-bottom: 1px solid var(--border);
}

thead th {
    padding: 11px 14px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

tbody tr {
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background 0.1s;
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: rgba(255,255,255,0.03); }

td {
    padding: 11px 14px;
    color: var(--text-primary);
    vertical-align: middle;
}

td.muted { color: var(--text-muted); }

/* ── Status Badges ──────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.badge-OPEN, .badge-open           { background: rgba(0,212,170,0.12);  color: var(--teal);    border: 1px solid rgba(0,212,170,0.25); }
.badge-FILLED, .badge-filled       { background: rgba(99,102,241,0.12); color: #818CF8;        border: 1px solid rgba(99,102,241,0.25); }
.badge-IN_PROGRESS                 { background: rgba(245,158,11,0.12); color: #FCD34D;        border: 1px solid rgba(245,158,11,0.25); }
.badge-COMPLETED, .badge-completed { background: rgba(16,185,129,0.12); color: var(--success); border: 1px solid rgba(16,185,129,0.25); }
.badge-CANCELLED, .badge-cancelled { background: rgba(239,68,68,0.12);  color: #F87171;        border: 1px solid rgba(239,68,68,0.25); }
.badge-DRAFT, .badge-draft         { background: rgba(148,163,184,0.1); color: var(--text-muted); border: 1px solid var(--border); }
.badge-PENDING, .badge-pending     { background: rgba(245,158,11,0.1);  color: #FCD34D;        border: 1px solid rgba(245,158,11,0.2); }
.badge-CONFIRMED, .badge-confirmed { background: rgba(0,212,170,0.1);   color: var(--teal);    border: 1px solid rgba(0,212,170,0.2); }
.badge-REJECTED, .badge-rejected   { background: rgba(239,68,68,0.1);   color: #F87171;        border: 1px solid rgba(239,68,68,0.2); }
.badge-WORKER_CONFIRMED            { background: rgba(16,185,129,0.12); color: var(--success); border: 1px solid rgba(16,185,129,0.25); }
.badge-WORKER_DISPATCHED           { background: rgba(99,102,241,0.12); color: #818CF8;        border: 1px solid rgba(99,102,241,0.2); }
.badge-COORDINATOR_PAID            { background: rgba(245,158,11,0.12); color: #FCD34D;        border: 1px solid rgba(245,158,11,0.2); }

/* ── Alerts / Flash messages ────────────────────────────────────────── */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 13px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.alert-success { background: rgba(16,185,129,0.1);  color: #34D399; border: 1px solid rgba(16,185,129,0.25); }
.alert-error   { background: rgba(239,68,68,0.1);   color: #F87171; border: 1px solid rgba(239,68,68,0.25); }
.alert-info    { background: rgba(59,130,246,0.1);  color: #60A5FA; border: 1px solid rgba(59,130,246,0.25); }
.alert-warning { background: rgba(245,158,11,0.1);  color: #FCD34D; border: 1px solid rgba(245,158,11,0.25); }

/* ── Page header ────────────────────────────────────────────────────── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}

.page-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ── Navigation sidebar (desktop) / bottom (mobile) ────────────────── */
.nav-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.nav-tab {
    padding: 7px 14px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    border: 1px solid transparent;
    transition: all 0.15s;
}
.nav-tab:hover { color: var(--text-primary); background: var(--bg-card); }
.nav-tab.active { background: rgba(0,212,170,0.12); color: var(--teal); border-color: rgba(0,212,170,0.25); }

/* ── Job card (worker browse view) ─────────────────────────────────── */
.jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.job-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
    cursor: default;
}
.job-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-teal); transform: translateY(-2px); }

.job-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.job-category-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 500;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
}

.job-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.35;
}

.job-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: var(--text-muted);
}

.job-meta-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.job-pay {
    font-size: 20px;
    font-weight: 700;
    color: var(--teal);
}
.job-pay small { font-size: 12px; font-weight: 400; color: var(--text-muted); }

.job-spots {
    font-size: 11px;
    color: var(--text-muted);
    padding: 2px 8px;
    background: rgba(255,255,255,0.04);
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
}

/* ── Auth pages ─────────────────────────────────────────────────────── */
.auth-page {
    background: radial-gradient(ellipse at top, #0D1A2E 0%, #080E1A 60%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-frame {
    width: 100%;
    max-width: 420px;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 36px 32px;
    box-shadow: var(--shadow-lg), 0 0 60px rgba(0,212,170,0.06);
}

.auth-logo {
    text-align: center;
    margin-bottom: 24px;
}

.auth-logo .logo-mark {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--teal) 0%, var(--indigo) 100%);
    border-radius: var(--radius-lg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 900;
    color: #fff;
    box-shadow: 0 0 30px rgba(0,212,170,0.3);
    margin-bottom: 12px;
}

.auth-logo h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}
.auth-logo h1 span { color: var(--teal); }

.auth-logo p {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.auth-card h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    text-align: center;
}

.auth-form { display: grid; gap: 14px; }

.auth-form .btn-primary {
    width: 100%;
    padding: 11px;
    font-size: 15px;
    margin-top: 4px;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-muted);
}
.auth-footer a { color: var(--teal); text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; }

/* ── Gold upsell banner ─────────────────────────────────────────────── */
.gold-banner {
    background: linear-gradient(135deg, rgba(245,158,11,0.1) 0%, rgba(217,119,6,0.05) 100%);
    border: 1px solid rgba(245,158,11,0.25);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.gold-banner .gold-text h3 { color: var(--gold); font-size: 15px; font-weight: 600; }
.gold-banner .gold-text p  { color: var(--text-muted); font-size: 13px; margin-top: 3px; }

/* ── Payment summary card ───────────────────────────────────────────── */
.payment-summary {
    background: linear-gradient(135deg, rgba(0,212,170,0.06) 0%, rgba(99,102,241,0.04) 100%);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.payment-ref {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: var(--text-dim);
    background: rgba(255,255,255,0.04);
    padding: 2px 6px;
    border-radius: 4px;
}

.pay-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    font-size: 13px;
}
.pay-row:last-child { border-bottom: none; }
.pay-row .label { color: var(--text-muted); }
.pay-row .value { color: var(--text-primary); font-weight: 500; }
.pay-row.total  { border-top: 1px solid var(--border-strong); margin-top: 6px; padding-top: 10px; }
.pay-row.total .label { color: var(--text-primary); font-weight: 600; }
.pay-row.total .value { color: var(--teal); font-size: 17px; font-weight: 700; }
.pay-row.fee   .value { color: var(--danger); }

/* ── Responsive nav actions ─────────────────────────────────────────── */
.btn-logout {
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    background: rgba(239,68,68,0.1);
    color: #F87171;
    border: 1px solid rgba(239,68,68,0.2);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s;
}
.btn-logout:hover { background: rgba(239,68,68,0.2); }

/* ── Dividers and spacing ───────────────────────────────────────────── */
.section-gap { margin-bottom: 24px; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }

/* ── Empty state ────────────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 36px; margin-bottom: 12px; opacity: 0.5; }
.empty-state p { font-size: 14px; }

/* ── Accounting totals ──────────────────────────────────────────────── */
.totals-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.total-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    text-align: center;
}
.total-item .t-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.total-item .t-value { font-size: 24px; font-weight: 700; color: var(--teal); }
.total-item.danger .t-value { color: var(--danger); }
.total-item.gold .t-value { color: var(--gold); }

/* ── Accordion / collapsible ────────────────────────────────────────── */
details summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    color: var(--text-primary);
    font-weight: 500;
}
details summary::-webkit-details-marker { display: none; }
details[open] summary::after { content: '▲'; font-size: 10px; color: var(--text-dim); }
details:not([open]) summary::after { content: '▼'; font-size: 10px; color: var(--text-dim); }

/* ── Field validation states ─────────────────────────────────────────── */
input.field-valid, select.field-valid, textarea.field-valid {
    border-color: var(--teal) !important;
    box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.12);
}
input.field-invalid, select.field-invalid, textarea.field-invalid {
    border-color: var(--danger) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}
.field-hint {
    display: block;
    font-size: 11px;
    margin-top: 4px;
    line-height: 1.4;
}

/* ── Password strength bar ──────────────────────────────────────────── */
.pw-strength-bar {
    height: 4px;
    border-radius: 2px;
    background: var(--border);
    margin-top: 6px;
    overflow: hidden;
}
.pw-strength-fill {
    height: 100%;
    width: 0;
    border-radius: 2px;
    transition: width 0.25s ease, background-color 0.25s ease;
}
.pw-strength-fill.pw-weak   { background: var(--danger); }
.pw-strength-fill.pw-fair   { background: #f59e0b; }
.pw-strength-fill.pw-good   { background: #84cc16; }
.pw-strength-fill.pw-strong { background: var(--teal); }

/* ── Two-column responsive layouts ─────────────────────────────────── */
.col-2   { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.col-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .app-main { padding: 14px 12px; }
    .form-row  { grid-template-columns: 1fr; }
    .form-row-3 { grid-template-columns: 1fr; }
    .col-2, .col-2-1 { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .page-header { flex-direction: column; align-items: flex-start; }
    .app-header { padding: 0 12px; }
    .auth-card { padding: 28px 20px; }
    .jobs-grid { grid-template-columns: 1fr; }
    td, th { padding: 8px 10px; }
    .gold-banner { flex-direction: column; align-items: flex-start; }

    /* Show hamburger, hide desktop nav */
    .nav-toggle { display: flex; }

    .header-nav {
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        position: absolute;
        top: 60px;
        right: 0;
        left: 0;
        background: #0D1529;
        border-bottom: 1px solid var(--border);
        padding: 12px 16px 16px;
        z-index: 105;
        box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    }

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

    .nav-group {
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding-bottom: 10px;
        margin-bottom: 10px;
        border-bottom: 1px solid var(--border);
    }

    .nav-link {
        padding: 10px 14px;
        font-size: 14px;
        border-radius: var(--radius-md);
    }

    .nav-user {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        padding-top: 4px;
    }

    .user-chip {
        max-width: none;
        text-align: center;
    }

    .btn-logout {
        display: block;
        text-align: center;
        padding: 10px 14px;
    }

    .brand-name { display: none; }
}

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

/* ── Scrollbar ──────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-surface); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }
