/* ═══════════════════════════════════════════════════════
   JunkHive Pros — Contractor Portal Styles
   ═══════════════════════════════════════════════════════ */

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

:root {
  --p-bg:       #080d16;
  --p-surface:  #0f1824;
  --p-surface2: #172030;
  --p-surface3: #1e2a3d;
  --p-border:   rgba(255,255,255,0.13);
  --p-green:    #16a34a;
  --p-green2:   #4ade80;
  --p-amber:    #f59e0b;
  --p-amber2:   #fcd34d;
  --p-blue:     #3b82f6;
  --p-red:      #ef4444;
  --p-text:     #f1f5f9;
  --p-muted:    #94a3b8;
  --p-muted2:   #64748b;
  --p-sb-w:     260px;
  --p-hdr-h:    64px;
  --radius:     10px;
  --radius-lg:  16px;
  --shadow:     0 4px 24px rgba(0,0,0,0.5);
}

html, body { height: 100%; font-family: 'Inter', sans-serif; background: var(--p-bg); color: var(--p-text); font-size: 14px; line-height: 1.6; }
a { text-decoration: none; color: inherit; }
input, select, textarea, button { font-family: inherit; font-size: 14px; }
button { cursor: pointer; border: none; background: none; }
.hidden { display: none !important; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--p-surface); }
::-webkit-scrollbar-thumb { background: var(--p-surface3); border-radius: 3px; }

/* ══════════════ LOGIN ══════════════ */
#login-screen {
  min-height: 100vh;
  align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.lc-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(22,163,74,.12) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(245,158,11,.08) 0%, transparent 50%),
              linear-gradient(135deg, #07090f 0%, #0f1923 100%);
}
.login-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 420px;
  background: var(--p-surface);
  border: 1px solid var(--p-border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow), 0 0 0 1px rgba(22,163,74,.06);
}
.lc-logo { display: flex; flex-direction: column; align-items: flex-start; margin-bottom: 28px; }
.lc-logo-img { height: 56px; width: auto; object-fit: contain; }
.lc-sub { font-size: .75rem; color: var(--p-green); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.lc-h1 { font-size: 1.6rem; font-weight: 800; margin-bottom: 6px; }
.lc-p { color: var(--p-muted); margin-bottom: 28px; font-size: .85rem; }
.lf-group { margin-bottom: 16px; }
.lf-label { display: block; font-size: .75rem; font-weight: 600; color: #94a3b8; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.lf-input { width: 100%; padding: 11px 14px; background: var(--p-surface2); border: 1px solid rgba(255,255,255,0.18); border-radius: var(--radius); color: var(--p-text); outline: none; transition: border-color .2s; }
.lf-input:focus { border-color: var(--p-green); }
.lf-pw-wrap { position: relative; }
.lf-pw-wrap .lf-input { padding-right: 44px; }
.lf-eye { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--p-muted); cursor: pointer; }
.lf-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; font-size: .82rem; color: var(--p-muted); }
.lf-check-lbl { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.lf-forgot { color: var(--p-green); }
.lf-error { background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.3); color: #f87171; padding: 10px 14px; border-radius: var(--radius); margin-bottom: 14px; font-size: .82rem; }
.lf-btn { width: 100%; padding: 13px; background: var(--p-green); color: white; font-weight: 700; font-size: .95rem; border-radius: var(--radius); transition: opacity .2s, transform .15s; }
.lf-btn:hover { opacity: .9; transform: translateY(-1px); }
.lc-demo { margin-top: 24px; padding: 12px 16px; background: var(--p-surface2); border-radius: var(--radius); font-size: .78rem; color: var(--p-muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lc-demo code { background: var(--p-surface3); color: var(--p-green); padding: 2px 8px; border-radius: 4px; font-family: monospace; cursor: pointer; }

/* ══════════════ PORTAL LAYOUT ══════════════ */
#portal-app { min-height: 100vh; }

/* ── Sidebar ── */
.sidebar {
  width: var(--p-sb-w); min-height: 100vh;
  background: var(--p-surface);
  border-right: 1px solid var(--p-border);
  display: flex; flex-direction: column;
  position: fixed; left: 0; top: 0; bottom: 0;
  z-index: 100; transition: transform .3s;
}
.sb-brand { display: flex; align-items: center; justify-content: center; padding: 16px 20px; border-bottom: 1px solid var(--p-border); }
.sb-logo-img { height: 48px; width: auto; object-fit: contain; }
.sb-name { font-weight: 800; font-size: .95rem; }
.sb-role { font-size: .68rem; color: var(--p-green); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.sb-contractor { padding: 16px 20px; border-bottom: 1px solid var(--p-border); display: flex; align-items: center; gap: 12px; }
.sb-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--p-green), var(--p-amber)); color: white; font-weight: 800; font-size: .85rem; display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.sb-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sb-cname { font-weight: 700; font-size: .9rem; }
.sb-status-row { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.sb-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--p-muted2); }
.sb-dot.available { background: var(--p-green2); box-shadow: 0 0 6px var(--p-green2); }
.sb-dot.busy { background: var(--p-amber); }
.sb-cstatus { font-size: .72rem; color: var(--p-muted); }
.sb-nav { flex: 1; padding: 12px 0; overflow-y: auto; }
.sb-link { display: flex; align-items: center; gap: 12px; padding: 11px 20px; color: #94a3b8; font-weight: 500; transition: all .2s; position: relative; cursor: pointer; }
.sb-link:hover { color: var(--p-text); background: var(--p-surface2); }
.sb-link.active { color: var(--p-green2); background: rgba(74,222,128,.08); border-right: 3px solid var(--p-green2); font-weight: 600; }
.sb-icon { font-size: 1rem; width: 20px; text-align: center; }
.sb-badge { margin-left: auto; font-size: .68rem; font-weight: 700; padding: 2px 7px; border-radius: 100px; min-width: 20px; text-align: center; }
.sb-badge.green { background: rgba(22,163,74,.2); color: var(--p-green2); }
.sb-badge.amber { background: rgba(245,158,11,.2); color: var(--p-amber2); }
.sb-badge.red { background: rgba(239,68,68,.2); color: #f87171; }
.sb-footer { padding: 16px 20px; border-top: 1px solid var(--p-border); }
.sb-back { display: block; color: var(--p-muted); font-size: .8rem; margin-bottom: 8px; transition: color .2s; }
.sb-back:hover { color: var(--p-text); }
.sb-logout { display: block; width: 100%; padding: 9px; background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.2); color: #f87171; border-radius: var(--radius); font-weight: 600; font-size: .82rem; transition: all .2s; margin-bottom: 8px; }
.sb-logout:hover { background: rgba(239,68,68,.2); }
.sb-version { font-size: .68rem; color: var(--p-muted2); text-align: center; }

/* ── Main wrap ── */
.portal-wrap { margin-left: var(--p-sb-w); flex: 1; display: flex; flex-direction: column; min-height: 100vh; }

/* ── Header ── */
.portal-hdr {
  height: var(--p-hdr-h); padding: 0 24px;
  background: var(--p-surface); border-bottom: 1px solid var(--p-border);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
}
.hdr-left { display: flex; align-items: center; gap: 16px; }
.hdr-menu-btn { display: none; background: none; border: none; color: var(--p-muted); font-size: 1.2rem; cursor: pointer; }
.hdr-title { font-size: 1.1rem; font-weight: 700; }
.hdr-bc { font-size: .72rem; color: var(--p-muted); }
.hdr-right { display: flex; align-items: center; gap: 16px; }
.avail-wrap { display: flex; align-items: center; gap: 8px; }
.avail-lbl { font-size: .72rem; color: var(--p-muted); font-weight: 500; }
.avail-btn { padding: 5px 12px; border-radius: 100px; font-size: .75rem; font-weight: 700; border: 1px solid; transition: all .2s; }
.avail-btn.available { background: rgba(22,163,74,.15); color: var(--p-green2); border-color: rgba(22,163,74,.3); }
.avail-btn.busy { background: rgba(245,158,11,.15); color: var(--p-amber2); border-color: rgba(245,158,11,.3); }
.notif-wrap { position: relative; }
.notif-btn { position: relative; background: var(--p-surface2); border: 1px solid var(--p-border); padding: 7px 10px; border-radius: var(--radius); font-size: .95rem; color: var(--p-muted); transition: all .2s; }
.notif-btn:hover { color: var(--p-text); }
.notif-dot { position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; background: var(--p-red); border-radius: 50%; border: 2px solid var(--p-surface); }
.notif-panel { position: absolute; right: 0; top: calc(100% + 8px); width: 320px; max-height: 420px; overflow-y: auto; background: var(--p-surface); border: 1px solid var(--p-border); border-radius: var(--radius-lg); box-shadow: var(--shadow); z-index: 200; }
.np-hdr { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--p-border); font-weight: 600; font-size: .85rem; }
.np-hdr button { font-size: .75rem; color: var(--p-muted); text-decoration: underline; }
.np-list { max-height: 300px; overflow-y: auto; }
.np-item { padding: 12px 16px; border-bottom: 1px solid var(--p-border); }
.np-item:last-child { border-bottom: none; }
.np-item-title { font-weight: 600; font-size: .82rem; margin-bottom: 2px; }
.np-item-sub { font-size: .75rem; color: var(--p-muted); }
.np-empty { padding: 20px 16px; text-align: center; color: var(--p-muted); font-size: .82rem; }
.hdr-avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg,var(--p-green),var(--p-amber)); color: white; font-weight: 800; font-size: .75rem; display: flex; align-items: center; justify-content: center; overflow: hidden; }

/* ── Main content ── */
.portal-main { flex: 1; padding: 28px 28px 40px; overflow-y: auto; }
.portal-page { display: none; }
.portal-page.active { display: block; }

/* ── Page topbar ── */
.pg-topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.pg-h { font-size: 1.4rem; font-weight: 800; }
.pg-sub { color: var(--p-muted); font-size: .85rem; margin-top: 2px; }

/* ── Buttons ── */
.btn-p { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border-radius: var(--radius); font-weight: 600; font-size: .82rem; transition: all .2s; border: 1px solid transparent; }
.btn-p.green { background: var(--p-green); color: white; }
.btn-p.green:hover { opacity: .88; }
.btn-p.outline { background: transparent; border-color: var(--p-border); color: var(--p-text); }
.btn-p.outline:hover { background: var(--p-surface2); }
.btn-p.amber { background: var(--p-amber); color: #000; font-weight: 700; }
.btn-p.sm { padding: 6px 12px; font-size: .75rem; }
.btn-p.red { background: rgba(239,68,68,.15); border-color: rgba(239,68,68,.3); color: #f87171; }

/* ── KPI Cards ── */
.kpi-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 24px; }
.kpi-card { background: var(--p-surface); border: 1px solid rgba(255,255,255,0.15); border-radius: var(--radius-lg); padding: 20px; display: flex; align-items: center; gap: 16px; transition: border-color .2s; }
.kpi-card:hover { border-color: rgba(255,255,255,.28); }
.kpi-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; }
.kpi-num { font-size: 1.6rem; font-weight: 800; line-height: 1; }
.kpi-lbl { font-size: .72rem; color: #94a3b8; margin-top: 4px; font-weight: 500; }

/* ── Dashboard ── */
.dash-row { display: grid; grid-template-columns: 1fr 340px; gap: 20px; margin-bottom: 20px; }
.dash-chart-card, .dash-activity-card, .dash-card { background: var(--p-surface); border: 1px solid var(--p-border); border-radius: var(--radius-lg); padding: 20px; }
.card-hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-title { font-weight: 700; font-size: .9rem; }
.card-sub { font-size: .75rem; color: var(--p-muted); }
.card-link { font-size: .78rem; color: var(--p-green); cursor: pointer; }

.activity-list { display: flex; flex-direction: column; gap: 12px; }
.activity-item { display: flex; align-items: flex-start; gap: 10px; font-size: .8rem; }
.act-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
.act-time { font-size: .72rem; color: var(--p-muted2); white-space: nowrap; }
.empty-msg { color: var(--p-muted); font-size: .82rem; text-align: center; padding: 24px 0; }
.empty-msg a { color: var(--p-green); cursor: pointer; text-decoration: underline; }

/* ── Job Board ── */
.jb-refresh-row { display: flex; align-items: center; gap: 10px; }
.jb-ts { font-size: .72rem; color: var(--p-muted2); }
.jb-filters { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 12px; margin-bottom: 16px; background: var(--p-surface); border: 1px solid var(--p-border); border-radius: var(--radius-lg); padding: 16px; }
.jbf label { display: block; font-size: .7rem; color: var(--p-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 5px; }
.jbf-input, .jbf-sel { width: 100%; padding: 8px 11px; background: var(--p-surface2); border: 1px solid rgba(255,255,255,0.18); border-radius: 8px; color: var(--p-text); outline: none; transition: border-color .2s; }
.jbf-input:focus, .jbf-sel:focus { border-color: var(--p-green); }
.jb-meta-row { margin-bottom: 12px; color: var(--p-muted); font-size: .8rem; }
.jb-list { display: flex; flex-direction: column; gap: 12px; }

.job-card { background: var(--p-surface); border: 1px solid rgba(255,255,255,0.15); border-radius: var(--radius-lg); padding: 18px 20px; display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; transition: border-color .2s; }
.job-card:hover { border-color: rgba(74,222,128,.4); }
.jc-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.jc-id { font-size: .72rem; color: var(--p-muted2); font-family: monospace; }
.jc-type { font-weight: 700; font-size: .9rem; }
.badge { display: inline-flex; padding: 3px 10px; border-radius: 100px; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.badge.size-sm { background: rgba(59,130,246,.15); color: #93c5fd; }
.badge.size-md { background: rgba(245,158,11,.15); color: var(--p-amber2); }
.badge.size-lg { background: rgba(239,68,68,.15); color: #fca5a5; }
.badge.green { background: rgba(22,163,74,.15); color: var(--p-green2); }
.badge.amber { background: rgba(245,158,11,.15); color: var(--p-amber2); }
.badge.blue { background: rgba(59,130,246,.15); color: #93c5fd; }
.badge.red { background: rgba(239,68,68,.15); color: #fca5a5; }
.badge.gray { background: rgba(100,116,139,.15); color: var(--p-muted); }
.badge.inprogress { background: rgba(59,130,246,.15); color: #93c5fd; }
.badge.pending { background: rgba(245,158,11,.15); color: var(--p-amber2); }
.badge.completed { background: rgba(22,163,74,.15); color: var(--p-green2); }
.jc-meta { display: flex; gap: 16px; font-size: .78rem; color: var(--p-muted); flex-wrap: wrap; }
.jc-meta span { display: flex; align-items: center; gap: 4px; }
.jc-desc { font-size: .82rem; color: var(--p-muted); margin-top: 6px; }
.jc-right { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.jc-payout { font-size: 1.4rem; font-weight: 800; color: var(--p-green2); }
.jc-hrs { font-size: .72rem; color: var(--p-muted); }

/* ── My Jobs ── */
.mj-tabs { display: flex; gap: 4px; margin-bottom: 16px; background: var(--p-surface); border: 1px solid var(--p-border); border-radius: var(--radius); padding: 4px; width: fit-content; }
.mj-tab { padding: 7px 18px; border-radius: 7px; font-weight: 600; font-size: .8rem; color: var(--p-muted); transition: all .2s; }
.mj-tab.active { background: var(--p-surface3); color: var(--p-text); }
.mj-list { display: flex; flex-direction: column; gap: 12px; }

.mj-card { background: var(--p-surface); border: 1px solid var(--p-border); border-radius: var(--radius-lg); padding: 18px 20px; }
.mj-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; flex-wrap: wrap; gap: 8px; }
.mj-card-body { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 16px; align-items: center; }
.mj-field label { font-size: .68rem; color: var(--p-muted2); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.mj-field-val { font-weight: 600; font-size: .85rem; margin-top: 2px; }
.mj-status-sel { padding: 7px 11px; background: var(--p-surface2); border: 1px solid var(--p-border); border-radius: 8px; color: var(--p-text); font-size: .8rem; font-weight: 600; cursor: pointer; }
.mj-actions { display: flex; gap: 8px; }

/* ── Schedule ── */
.sched-nav-row { display: flex; align-items: center; gap: 12px; }
.sched-label { font-weight: 700; font-size: .9rem; min-width: 180px; text-align: center; }
.sched-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 12px; }
.sched-day { background: var(--p-surface); border: 1px solid var(--p-border); border-radius: var(--radius-lg); padding: 14px; min-height: 140px; }
.sched-day.today { border-color: rgba(22,163,74,.4); }
.sd-hdr { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--p-muted); margin-bottom: 4px; }
.sd-date { font-size: 1.2rem; font-weight: 800; margin-bottom: 10px; }
.sched-day.today .sd-date { color: var(--p-green2); }
.sd-job { background: rgba(22,163,74,.1); border: 1px solid rgba(22,163,74,.2); border-radius: 7px; padding: 6px 8px; margin-bottom: 6px; font-size: .72rem; }
.sd-job-type { font-weight: 700; color: var(--p-green2); }
.sd-job-time { color: var(--p-muted); }
.sd-empty { font-size: .72rem; color: var(--p-muted2); }

/* ── Earnings ── */
.earn-kpi-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 20px; }
.earn-kpi { padding: 20px; border-radius: var(--radius-lg); border: 1px solid; }
.earn-kpi.green { background: rgba(74,222,128,.1);  border-color: rgba(74,222,128,.28); }
.earn-kpi.amber { background: rgba(245,158,11,.1);  border-color: rgba(245,158,11,.28); }
.earn-kpi.blue  { background: rgba(59,130,246,.1);  border-color: rgba(59,130,246,.28); }
.earn-kpi.red   { background: rgba(239,68,68,.1);   border-color: rgba(239,68,68,.28); }
.ek-lbl { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--p-muted); margin-bottom: 6px; }
.ek-num { font-size: 1.6rem; font-weight: 800; }
.earn-kpi.green .ek-num { color: var(--p-green2); }
.earn-kpi.amber .ek-num { color: var(--p-amber2); }
.earn-kpi.blue .ek-num { color: #93c5fd; }
.earn-kpi.red .ek-num { color: #fca5a5; }
.ep-btns { display: flex; gap: 4px; }
.ep-btn { padding: 7px 14px; border-radius: 8px; font-weight: 600; font-size: .78rem; color: var(--p-muted); background: var(--p-surface); border: 1px solid var(--p-border); transition: all .2s; }
.ep-btn.active { background: var(--p-surface3); color: var(--p-text); }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.data-table th { padding: 10px 14px; text-align: left; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--p-muted); border-bottom: 1px solid var(--p-border); font-weight: 600; }
.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--p-border); }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--p-surface2); }

/* ── Profile ── */
.profile-layout { display: grid; grid-template-columns: 240px 1fr; gap: 20px; }
.pav-card { background: var(--p-surface); border: 1px solid var(--p-border); border-radius: var(--radius-lg); padding: 28px 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.pav-photo-wrap { position: relative; display: inline-block; cursor: pointer; border-radius: 50%; }
.pav-circle { width: 100px; height: 100px; border-radius: 50%; background: linear-gradient(135deg, var(--p-green), var(--p-amber)); color: white; font-weight: 800; font-size: 1.8rem; display: flex; align-items: center; justify-content: center; overflow: hidden; border: 3px solid var(--p-border); transition: border-color .2s; }
.pav-photo-wrap:hover .pav-circle { border-color: var(--p-green); }
.pav-circle img { width: 100%; height: 100%; object-fit: cover; }
.pav-photo-overlay { position: absolute; inset: 0; border-radius: 50%; background: rgba(0,0,0,0.55); display: flex; flex-direction: column; align-items: center; justify-content: center; color: white; font-size: .72rem; font-weight: 700; line-height: 1.4; opacity: 0; transition: opacity .2s; text-align: center; }
.pav-photo-wrap:hover .pav-photo-overlay { opacity: 1; }
.pav-photo-hint { font-size: .7rem; color: var(--p-muted2); margin-top: 6px; }
.pav-name { font-weight: 800; font-size: 1rem; }
.pav-since { font-size: .75rem; color: var(--p-muted); }
.pav-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.pav-tag { padding: 3px 10px; border-radius: 100px; font-size: .7rem; font-weight: 700; }
.pav-tag.green { background: rgba(22,163,74,.15); color: var(--p-green2); }
.pav-tag.amber { background: rgba(245,158,11,.15); color: var(--p-amber2); }

.pf-form { background: var(--p-surface); border: 1px solid var(--p-border); border-radius: var(--radius-lg); padding: 28px; }
.pf-section { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--p-green); border-bottom: 1px solid var(--p-border); padding-bottom: 8px; margin-bottom: 16px; }
.pf-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.pf-g { margin-bottom: 14px; }
.pf-g label { display: block; font-size: .72rem; color: var(--p-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.pf-inp { width: 100%; padding: 9px 12px; background: var(--p-surface2); border: 1px solid rgba(255,255,255,0.18); border-radius: 8px; color: var(--p-text); outline: none; transition: border-color .2s; }
.pf-inp:focus { border-color: var(--p-green); }
.pf-checks { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.pf-checks label { display: flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--p-muted); cursor: pointer; }
.pf-actions { display: flex; gap: 10px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--p-border); }

/* ── Documents ── */
.docs-alert { background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.3); color: var(--p-amber2); padding: 12px 16px; border-radius: var(--radius); margin-bottom: 20px; font-size: .85rem; font-weight: 600; }
.docs-alert.hidden { display: none; }
.docs-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(300px,1fr)); gap: 16px; }
.doc-card { background: var(--p-surface); border: 1px solid var(--p-border); border-radius: var(--radius-lg); padding: 20px; display: flex; align-items: flex-start; gap: 14px; transition: border-color .2s; }
.doc-card:hover { border-color: rgba(255,255,255,.15); }
.doc-icon { font-size: 1.8rem; flex-shrink: 0; }
.doc-info { flex: 1; }
.doc-name { font-weight: 700; font-size: .9rem; margin-bottom: 2px; }
.doc-desc { font-size: .75rem; color: var(--p-muted); margin-bottom: 8px; }
.doc-status { font-size: .75rem; font-weight: 700; }
.doc-status.missing { color: #f87171; }
.doc-status.pending { color: var(--p-amber2); }
.doc-status.verified { color: var(--p-green2); }
.doc-actions { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }

/* ── Modal ── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.7); display: flex; align-items: center; justify-content: center; z-index: 500; padding: 20px; backdrop-filter: blur(4px); }
.modal-card { background: var(--p-surface); border: 1px solid var(--p-border); border-radius: var(--radius-lg); width: 100%; max-width: 540px; max-height: 90vh; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.modal-hdr { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--p-border); }
.modal-hdr h3 { font-weight: 800; font-size: 1rem; }
.modal-close { color: var(--p-muted); font-size: 1.1rem; transition: color .2s; }
.modal-close:hover { color: var(--p-text); }
.modal-body { padding: 22px; overflow-y: auto; flex: 1; }
.modal-footer { padding: 16px 22px; border-top: 1px solid var(--p-border); display: flex; gap: 10px; justify-content: flex-end; }
.modal-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--p-border); font-size: .85rem; }
.modal-row:last-child { border-bottom: none; }
.modal-row-lbl { color: var(--p-muted); font-weight: 500; }
.modal-row-val { font-weight: 600; text-align: right; }
.modal-notes { background: var(--p-surface2); border-radius: 8px; padding: 12px; font-size: .82rem; color: var(--p-muted); margin-top: 12px; }

/* ── Toast ── */
.p-toast { position: fixed; bottom: 28px; right: 28px; background: var(--p-surface); border: 1px solid var(--p-border); color: var(--p-text); padding: 12px 20px; border-radius: var(--radius); box-shadow: var(--shadow); font-weight: 600; font-size: .85rem; z-index: 999; max-width: 340px; animation: slideUp .3s ease; }
.p-toast.success { border-color: rgba(22,163,74,.5); background: rgba(22,163,74,.1); color: var(--p-green2); }
.p-toast.error { border-color: rgba(239,68,68,.5); background: rgba(239,68,68,.1); color: #fca5a5; }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ── Screen management ── */
.p-screen { display: none; }

/* ── Global spinner ── */
#portal-spinner {
  position: fixed; inset: 0;
  background: rgba(11,15,25,0.92);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  z-index: 9999; gap: 16px;
}
.spinner-ring {
  width: 48px; height: 48px;
  border: 3px solid rgba(22,163,74,0.2);
  border-top-color: var(--p-green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.spinner-msg { color: var(--p-muted); font-size: .85rem; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Auth tabs (login / signup) ── */
.auth-tabs { display: flex; gap: 4px; margin-bottom: 24px; background: var(--p-surface2); border-radius: 8px; padding: 4px; }
.auth-tab { flex: 1; padding: 8px; border-radius: 6px; font-weight: 600; font-size: .82rem; color: var(--p-muted); text-align: center; transition: all .2s; cursor: pointer; }
.auth-tab.active { background: var(--p-surface3); color: var(--p-text); }

/* ── Auth success ── */
.lf-success { background: rgba(22,163,74,.1); border: 1px solid rgba(22,163,74,.3); color: var(--p-green2); padding: 10px 14px; border-radius: var(--radius); margin-bottom: 14px; font-size: .82rem; }

/* ── Portal app layout ── */
#portal-app { display: flex; min-height: 100vh; }

/* ── Status dot variants ── */
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--p-muted2); }
.status-dot.online  { background: var(--p-green2); box-shadow: 0 0 6px var(--p-green2); }
.status-dot.offline { background: var(--p-muted2); }

/* ── Sidebar brand text ── */
.sb-name-brand { font-weight: 800; font-size: .95rem; }

.notif-panel.open { display: block !important; }
.notif-panel-actions { display: flex; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--p-border); }
.notif-item { padding: 12px 16px; border-bottom: 1px solid var(--p-border); }
.notif-item:last-child { border-bottom: none; }
.notif-item.unread { background: rgba(22,163,74,.04); }
.notif-title { font-weight: 600; font-size: .82rem; margin-bottom: 2px; }
.notif-body { font-size: .75rem; color: var(--p-muted); margin-bottom: 4px; }
.notif-time { font-size: .68rem; color: var(--p-muted2); }

/* ── Job tags ── */
.job-tag { display: inline-flex; padding: 3px 10px; border-radius: 100px; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.tag-blue  { background: rgba(59,130,246,.22);  color: #93c5fd; }
.tag-amber { background: rgba(245,158,11,.22);  color: var(--p-amber2); }
.tag-green { background: rgba(74,222,128,.18);  color: var(--p-green2); }
.tag-red   { background: rgba(239,68,68,.22);   color: #fca5a5; }

/* ── Empty state ── */
.empty-state { color: var(--p-muted); font-size: .85rem; text-align: center; padding: 32px 16px; }

/* ── Buttons ── */
.btn-primary { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: var(--radius); font-weight: 600; font-size: .82rem; background: var(--p-green); color: white; border: 1px solid transparent; transition: opacity .2s; cursor: pointer; }
.btn-primary:hover { opacity: .88; }
.btn-ghost { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: var(--radius); font-weight: 600; font-size: .82rem; background: transparent; color: #94a3b8; border: 1px solid rgba(255,255,255,0.18); transition: all .2s; cursor: pointer; }
.btn-ghost:hover { background: var(--p-surface2); color: var(--p-text); }
.btn-sm { padding: 5px 11px !important; font-size: .76rem !important; }

/* ── Dashboard recent jobs list ── */
.dash-job-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--p-border); font-size: .82rem; }
.dash-job-row:last-child { border-bottom: none; }
.dash-job-id   { font-family: monospace; font-size: .72rem; color: var(--p-muted2); min-width: 72px; }
.dash-job-type { flex: 1; color: var(--p-text); }
.dash-job-pay  { font-weight: 700; color: var(--p-green2); white-space: nowrap; }

/* ── Job board cards (new structure) ── */
.job-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.job-id     { font-family: monospace; font-size: .72rem; color: var(--p-muted2); }
.job-title  { font-weight: 700; font-size: .95rem; margin-bottom: 6px; }
.job-meta   { display: flex; gap: 14px; font-size: .78rem; color: var(--p-muted); flex-wrap: wrap; margin-bottom: 6px; }
.job-desc   { font-size: .8rem; color: var(--p-muted); margin-bottom: 10px; }
.job-footer { display: flex; align-items: center; justify-content: space-between; }
.job-payout { font-size: 1.3rem; font-weight: 800; color: var(--p-green2); }

/* ── My jobs cards ── */
.myjob-card { background: var(--p-surface); border: 1px solid var(--p-border); border-radius: var(--radius-lg); padding: 18px 20px; margin-bottom: 12px; }
.myjob-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.myjob-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.job-completed-date { font-size: .75rem; color: var(--p-muted2); margin-top: 4px; }

/* ── Schedule new classes ── */
.sched-day-hdr  { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--p-muted); margin-bottom: 4px; }
.sched-day-body { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.sched-today    { border-color: rgba(22,163,74,.4) !important; }
.sched-job-block { background: rgba(22,163,74,.1); border: 1px solid rgba(22,163,74,.2); border-radius: 7px; padding: 6px 8px; font-size: .72rem; }
.sched-job-time  { display: block; color: var(--p-muted); font-size: .68rem; }
.sched-job-name  { display: block; font-weight: 700; color: var(--p-green2); }
.sched-empty     { font-size: .72rem; color: var(--p-muted2); }

/* ── Documents new classes ── */
.doc-file    { font-size: .78rem; color: var(--p-muted); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.doc-date    { font-size: .72rem; color: var(--p-muted2); }
.doc-missing { font-size: .78rem; color: #f87171; }
.doc-upload-btn { cursor: pointer; }

/* ── Avatar initials (profile) ── */
.avatar-initials      { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-weight: 800; font-size: 1.5rem; color: white; }
.avatar-initials.large { font-size: 2rem; }

/* ── Toast ── */
.toast { position: fixed; bottom: 28px; right: 28px; background: var(--p-surface); border: 1px solid var(--p-border); color: var(--p-text); padding: 12px 20px; border-radius: var(--radius); box-shadow: var(--shadow); font-weight: 600; font-size: .85rem; z-index: 999; max-width: 340px; transform: translateY(20px); opacity: 0; transition: all .3s; pointer-events: none; }
.toast.show { transform: translateY(0); opacity: 1; pointer-events: auto; display: block !important; }
.toast.success { border-color: rgba(22,163,74,.5); background: rgba(22,163,74,.1); color: var(--p-green2); }
.toast.error   { border-color: rgba(239,68,68,.5); background: rgba(239,68,68,.1); color: #fca5a5; }
.toast.info    { border-color: rgba(59,130,246,.5); background: rgba(59,130,246,.1); color: #93c5fd; }

/* ── Responsive ── */
@media (max-width: 1100px) {
  .kpi-grid, .earn-kpi-grid { grid-template-columns: repeat(2,1fr); }
  .dash-row { grid-template-columns: 1fr; }
  .sched-grid { grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 860px) {
  :root { --p-sb-w: 0px; }
  .sidebar { transform: translateX(-260px); width: 260px; }
  .sidebar.open { transform: translateX(0); }
  .portal-wrap { margin-left: 0; }
  .hdr-menu-btn { display: block; }
  .hdr-right { gap: 8px; }
  .jb-filters { grid-template-columns: 1fr 1fr; }
  .mj-card-body { grid-template-columns: 1fr 1fr; }
  .profile-layout { grid-template-columns: 1fr; }
  .pf-row2 { grid-template-columns: 1fr; }
  .notif-panel { width: 290px; right: -10px; }
}
@media (max-width: 540px) {
  .kpi-grid, .earn-kpi-grid { grid-template-columns: 1fr; }
  .jb-filters { grid-template-columns: 1fr; }
  .sched-grid { grid-template-columns: 1fr 1fr; }
  .portal-main { padding: 14px 12px; }
  .hdr-right { gap: 6px; }
  .avail-lbl { display: none; }
  .avail-wrap { gap: 4px; }
  .avail-btn { padding: 5px 10px; font-size: .72rem; }
  .notif-panel { width: calc(100vw - 32px); right: 0; }
  .modal-card { max-height: 95vh; }
  .modal-overlay { padding: 10px; align-items: flex-end; }
  .modal-card { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .toast { right: 12px; left: 12px; bottom: 16px; max-width: 100%; }
  .mj-card-body { grid-template-columns: 1fr; }
}
@media (max-width: 400px) {
  .sched-grid { grid-template-columns: 1fr; }
  .hdr-avatar { width: 30px; height: 30px; font-size: .68rem; }
  .portal-hdr { padding: 0 12px; }
  .portal-main { padding: 12px 10px; }
}
