@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Bricolage+Grotesque:wght@600;700;800&display=swap');

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

:root {
  --bg:          #0a0c12;
  --bg2:         #0d1018;
  --surface:     #111520;
  --surface2:    #161b27;
  --border:      rgba(255,255,255,0.06);
  --border-h:    rgba(99,102,241,0.35);
  --accent:      #6366f1;
  --accent-l:    #818cf8;
  --accent-dim:  rgba(99,102,241,0.12);
  --teal:        #14b8a6;
  --teal-dim:    rgba(20,184,166,0.1);
  --amber:       #f59e0b;
  --text:        #e8eaf0;
  --text2:       #a0a8b8;
  --text3:       #5a6278;
  --green:       #10b981;
  --red:         #ef4444;
  --radius:      14px;
  --radius-sm:   8px;
  --sidebar-w:   240px;
}

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.012) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none; z-index: 0;
}


/* ── SIDEBAR ─────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 0;
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto; flex-shrink: 0; z-index: 10;
}

.sidebar-logo {
  padding: 22px 18px 18px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}

.logo-mark {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 14px; font-weight: 800; color: white;
}

.logo-text {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 16px; font-weight: 700; color: var(--text);
}

.sidebar-nav { padding: 14px 10px; flex: 1; }

.nav-label {
  font-size: 10px; font-weight: 700; color: var(--text3);
  text-transform: uppercase; letter-spacing: 1.2px;
  padding: 8px 10px 5px; margin-top: 6px;
}

.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--text2); text-decoration: none;
  font-size: 13.5px; font-weight: 500;
  transition: all 0.18s; margin-bottom: 2px; position: relative;
}

.nav-link:hover { background: rgba(255,255,255,0.04); color: var(--text); }

.nav-link.active {
  background: var(--accent-dim); color: var(--accent-l);
}

.nav-link.active::before {
  content: ''; position: absolute;
  left: 0; top: 6px; bottom: 6px;
  width: 3px; background: var(--accent);
  border-radius: 0 3px 3px 0;
}

.nav-icon { font-size: 15px; width: 18px; text-align: center; flex-shrink: 0; }

.sidebar-user {
  border-top: 1px solid var(--border); padding: 10px;
}

.user-pill {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 10px; border-radius: var(--radius-sm);
  cursor: pointer; transition: background 0.18s;
}

.user-pill:hover { background: rgba(255,255,255,0.04); }

.u-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, #312e81, #4f46e5);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: white; overflow: hidden;
  border: 1.5px solid rgba(99,102,241,0.4); flex-shrink: 0;
}

.u-avatar img { width: 100%; height: 100%; object-fit: cover; }
.u-name { font-size: 12.5px; font-weight: 600; color: var(--text); }
.u-sub  { font-size: 11px; color: var(--text3); }


/* ── MAIN ─────────────────────────── */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; z-index: 1; }


/* ── TOPNAV ──────────────────────── */
.topnav {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 28px;
  border-bottom: 1px solid var(--border);
  background: rgba(10,12,18,0.85);
  backdrop-filter: blur(16px);
  position: sticky; top: 0; z-index: 9;
}

.page-title-nav {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 18px; font-weight: 700; color: var(--text);
  white-space: nowrap;
}

.topnav-search {
  flex: 1; position: relative; max-width: 420px;
}

.topnav-search input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 16px 10px 40px;
  color: var(--text); font-size: 14px;
  font-family: 'Outfit', sans-serif;
  outline: none; transition: all 0.2s;
}

.topnav-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.topnav-search input::placeholder { color: var(--text3); }

.tsearch-icon {
  position: absolute; left: 13px; top: 50%;
  transform: translateY(-50%); font-size: 15px;
  color: var(--text3); pointer-events: none;
}

.jobs-count-badge {
  padding: 5px 14px;
  background: var(--accent-dim);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 20px;
  font-size: 13px; font-weight: 600; color: var(--accent-l);
  white-space: nowrap;
}


/* ── CONTENT ─────────────────────── */
.content { display: flex; flex: 1; min-height: 0; }


/* ── FILTER PANEL ────────────────── */
.filter-panel {
  width: 230px; flex-shrink: 0;
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  overflow-y: auto;
}

.fp-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 13px; font-weight: 700;
  color: var(--text2); text-transform: uppercase;
  letter-spacing: 0.8px; margin-bottom: 18px;
}

.fp-section { margin-bottom: 24px; }

.fp-label {
  font-size: 12px; font-weight: 600; color: var(--text3);
  text-transform: uppercase; letter-spacing: 0.6px;
  margin-bottom: 10px; display: block;
}

.fp-option {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: var(--radius-sm);
  cursor: pointer; transition: background 0.15s;
  margin-bottom: 3px;
}

.fp-option:hover { background: rgba(255,255,255,0.04); }

.fp-option input[type="radio"],
.fp-option input[type="checkbox"] {
  accent-color: var(--accent); width: 14px; height: 14px;
  cursor: pointer; flex-shrink: 0;
}

.fp-option label {
  font-size: 13.5px; color: var(--text2); cursor: pointer;
  font-weight: 500; line-height: 1;
}

.fp-option.active label { color: var(--accent-l); }

.fp-select {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  color: var(--text); font-size: 13px;
  font-family: 'Outfit', sans-serif;
  outline: none; cursor: pointer;
  transition: border-color 0.2s;
}

.fp-select:focus { border-color: var(--accent); }
.fp-select option { background: var(--surface2); }

.clear-btn {
  width: 100%; padding: 9px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text3); font-size: 13px;
  font-family: 'Outfit', sans-serif;
  cursor: pointer; transition: all 0.2s;
  margin-top: 4px;
}

.clear-btn:hover {
  border-color: var(--red);
  color: #f87171;
}


/* ── JOBS LIST ───────────────────── */
.jobs-panel { flex: 1; padding: 24px; overflow-y: auto; }

.sort-row {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.sort-label { font-size: 13px; color: var(--text3); }

.sort-select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  color: var(--text); font-size: 13px;
  font-family: 'Outfit', sans-serif;
  outline: none; cursor: pointer;
}

.sort-select option { background: var(--surface2); }


/* Job card */
.job-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 12px;
  display: flex; gap: 18px; align-items: flex-start;
  transition: all 0.2s; cursor: pointer;
  text-decoration: none;
  position: relative;
}

.job-card:hover {
  border-color: var(--border-h);
  background: var(--surface2);
  transform: translateX(2px);
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}

.job-card.saved { border-color: rgba(20,184,166,0.3); }

/* Company logo */
.jc-logo {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--accent-dim);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 18px; font-weight: 800; color: var(--accent-l);
  flex-shrink: 0; overflow: hidden;
}

.jc-logo img { width: 100%; height: 100%; object-fit: cover; }

/* Job info */
.jc-info { flex: 1; min-width: 0; }

.jc-top {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 12px;
  margin-bottom: 6px;
}

.jc-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 16px; font-weight: 700; color: var(--text);
  line-height: 1.3;
}

.jc-company {
  font-size: 13px; color: var(--accent-l);
  font-weight: 500; margin-bottom: 10px;
  display: flex; align-items: center; gap: 6px;
}

.verified-badge {
  background: rgba(16,185,129,0.1);
  color: var(--green);
  border: 1px solid rgba(16,185,129,0.2);
  font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: 0.4px;
}

.jc-tags {
  display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 10px;
}

.jc-tag {
  padding: 4px 11px; border-radius: 20px;
  font-size: 12px; font-weight: 500;
  background: rgba(255,255,255,0.05); color: var(--text2);
}

.jc-tag.type  { background: var(--accent-dim); color: var(--accent-l); }
.jc-tag.teal  { background: var(--teal-dim);   color: var(--teal); }
.jc-tag.amber { background: rgba(245,158,11,0.1); color: var(--amber); }

.jc-desc {
  font-size: 13px; color: var(--text3); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}

/* Actions */
.jc-actions {
  display: flex; flex-direction: column;
  align-items: flex-end; gap: 8px; flex-shrink: 0;
}

.jc-date {
  font-size: 11px; color: var(--text3);
  white-space: nowrap;
}

.btn-save {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 14px;
  font-size: 12px; font-weight: 600;
  color: var(--text3); cursor: pointer;
  font-family: 'Outfit', sans-serif;
  transition: all 0.2s; white-space: nowrap;
}

.btn-save:hover, .btn-save.saved {
  border-color: var(--teal);
  color: var(--teal);
  background: var(--teal-dim);
}

.btn-apply {
  background: var(--accent);
  border: none; border-radius: var(--radius-sm);
  padding: 8px 18px;
  font-size: 12px; font-weight: 700;
  color: white; cursor: pointer;
  font-family: 'Outfit', sans-serif;
  transition: all 0.2s; white-space: nowrap;
  text-decoration: none; display: inline-block;
}

.btn-apply:hover {
  background: #4f46e5;
  transform: translateY(-1px);
}


/* Empty / Loading */
.jobs-empty {
  text-align: center; padding: 60px 20px;
  color: var(--text3);
}

.jobs-empty .emoji { font-size: 48px; margin-bottom: 16px; }
.jobs-empty h3 { font-size: 18px; color: var(--text2); margin-bottom: 8px; }
.jobs-empty p  { font-size: 14px; }

.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-card {
  height: 110px; margin-bottom: 12px;
  border-radius: var(--radius);
}


/* Pagination */
.pagination {
  display: flex; align-items: center;
  justify-content: center; gap: 8px;
  padding: 24px 0 8px;
}

.page-btn {
  min-width: 36px; height: 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text2); font-size: 14px;
  font-family: 'Outfit', sans-serif;
  cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
  padding: 0 10px;
}

.page-btn:hover { border-color: var(--accent); color: var(--accent-l); }

.page-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white; font-weight: 700;
}

.page-btn:disabled {
  opacity: 0.3; cursor: not-allowed;
}


/* Footer */
.dash-footer {
  border-top: 1px solid var(--border);
  padding: 18px 28px;
  display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: 10px;
}

.footer-copy { font-size: 12px; color: var(--text3); }

.footer-links { display: flex; gap: 18px; }

.footer-links a {
  font-size: 12px; color: var(--text3);
  text-decoration: none; transition: color 0.15s;
}

.footer-links a:hover { color: var(--text2); }


/* Mobile topbar */
.mob-topbar {
  display: none; align-items: center;
  justify-content: space-between;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
}

.hamburger {
  width: 34px; height: 34px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface);
  cursor: pointer; display: flex; align-items: center;
  justify-content: center; font-size: 17px; color: var(--text);
}

.mob-logo {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 17px; font-weight: 700; color: var(--text);
}

.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.6); z-index: 9;
}

.sidebar-overlay.show { display: block; }


@media(max-width: 1024px) {
  .filter-panel { width: 200px; }
}

@media(max-width: 768px) {
  body { display: block; }

  .sidebar {
    position: fixed; left: -100%; top: 0;
    height: 100vh; z-index: 10; width: 250px;
    transition: left 0.3s ease;
  }

  .sidebar.mob-open { left: 0; }
  .mob-topbar { display: flex; }
  .content { flex-direction: column; }
  .filter-panel { width: 100%; border-right: none; border-bottom: 1px solid var(--border);}

  .jc-actions { flex-direction: row; align-items: center; }
  .jc-top { flex-direction: column; }
}

/* ═══════ LIGHT MODE (issue #8) ═══════ */
html.light-mode {
  --bg:         #f0f2f7;
  --bg2:        #e8ebf2;
  --surface:    #ffffff;
  --surface2:   #f5f7fa;
  --border:     #e2e6ef;
  --border-h:   #c8cfe0;
  --text:       #0f1724;
  --text2:      #374151;
  --text3:      #6b7280;
}
html.light-mode .sidebar,
html.light-mode .topnav,
html.light-mode .mob-topbar,
html.light-mode .card { background:#ffffff; border-color:#e2e6ef; }
html.light-mode input, html.light-mode textarea, html.light-mode select {
  background:#f9fafc; border-color:#d1d5db; color:#0f1724;
}
html.light-mode .nav-link:hover, html.light-mode .nav-link.active {
  background:rgba(99,102,241,0.08); color:#4f46e5;
}
