/* ========================================================
   Choosewise ATS — app.css
   Design: Navy + Amber | Plus Jakarta Sans
   ======================================================== */

/* ── CSS Variables ─────────────────────────────────────── */
:root {
  --sidebar-w: 260px;
  --topbar-h: 60px;

  --c-navy:    #1C2B3A;
  --c-navy-d:  #111f33;
  --c-navy-l:  #253f61;
  --c-amber:   #E8860A;
  --c-amber-l: #F5A623;
  --c-teal:    #0d9488;
  --c-slate:   #64748b;
  --c-light:   #f1f5f9;
  --c-border:  #e2e8f0;
  --c-white:   #ffffff;
  --c-text:    #1e293b;
  --c-muted:   #64748b;

  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow:    0 4px 16px rgba(0,0,0,.1);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.15);

  --transition: all .2s ease;
}

/* ── Reset / Base ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body.ats-body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--c-light);
  color: var(--c-text);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  font-weight: 500;
}

/* ── Layout ────────────────────────────────────────────── */
.ats-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ───────────────────────────────────────────── */
.ats-sidebar {
  width: var(--sidebar-w);
  background: var(--c-navy);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 1040;
  transition: transform .25s cubic-bezier(.4,0,.2,1),
              width .22s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand-link {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--c-white);
}
.brand-icon {
  width: 36px; height: 36px;
  background: var(--c-amber);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: var(--c-navy-d); font-weight: 800;
}
.brand-text {
  font-size: 1.05rem; font-weight: 800; letter-spacing: -.3px;
  line-height: 1;
}
.brand-text small {
  display: block; font-size: .65rem; font-weight: 500;
  color: var(--c-amber); letter-spacing: .05em; text-transform: uppercase;
}

.sidebar-toggle { background: none; border: none; color: rgba(255,255,255,.6); font-size: 1.1rem; }

.sidebar-nav {
  flex: 1;
  padding: 12px 12px;
  overflow-y: auto;
}
.nav-section-label {
  font-size: .65rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: rgba(255,255,255,.35);
  padding: 12px 10px 4px;
}
.sidebar-nav .nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,.75);
  text-decoration: none;
  font-size: .92rem; font-weight: 600;
  transition: var(--transition);
  position: relative;
  margin-bottom: 2px;
}
.sidebar-nav .nav-link i { font-size: 1rem; width: 18px; flex-shrink: 0; }
.sidebar-nav .nav-link:hover { background: rgba(255,255,255,.08); color: var(--c-white); }
.sidebar-nav .nav-link.active {
  background: var(--c-amber);
  color: var(--c-navy-d);
  font-weight: 700;
}
.sidebar-nav .nav-link.active i { color: var(--c-navy-d); }
.nav-badge {
  margin-left: auto;
  background: var(--c-amber);
  color: var(--c-navy-d);
  font-size: .65rem; font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
}
.sidebar-nav .nav-link.active .nav-badge { background: var(--c-navy-d); color: var(--c-amber); }

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 8px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.06);
}
.user-avatar {
  width: 34px; height: 34px;
  background: var(--c-amber);
  color: var(--c-navy-d);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 800;
  flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name { font-size: .85rem; font-weight: 700; color: var(--c-white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: .74rem; color: rgba(255,255,255,.45); }
.user-actions { display: flex; gap: 6px; }
.user-actions a { color: rgba(255,255,255,.5); font-size: 1rem; transition: var(--transition); }
.user-actions a:hover { color: var(--c-amber); }

/* ── Main Content ──────────────────────────────────────── */
.ats-main {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
}

/* ── Topbar ────────────────────────────────────────────── */
.ats-topbar {
  height: var(--topbar-h);
  background: var(--c-white);
  border-bottom: 1px solid var(--c-border);
  display: flex; align-items: center; gap: 12px;
  padding: 0 24px;
  position: sticky; top: 0; z-index: 100;
}
.topbar-menu-btn { background: none; border: none; font-size: 1.3rem; color: var(--c-slate); }
.topbar-breadcrumb { flex: 1; }
.topbar-title { font-size: 1rem; font-weight: 700; color: var(--c-navy); }
.topbar-right { display: flex; gap: 8px; }
.ats-topbar-clock {
  display: flex; align-items: center; gap: 2px;
  font-size: .82rem; color: var(--c-muted);
  white-space: nowrap;
  user-select: none;
}
.ats-topbar-clock .clock-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .02em;
}

/* ── Flash ─────────────────────────────────────────────── */
.flash-container { padding: 12px 24px 0; }
.flash-container .alert { border-radius: var(--radius); border: none; font-size: .9375rem; }

/* ── Content area ──────────────────────────────────────── */
.ats-content { padding: 24px; flex: 1; }

/* ── Cards ─────────────────────────────────────────────── */
.card {
  border: none !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-sm);
  background: var(--c-white);
}
.card-header {
  background: transparent !important;
  border-bottom: 1px solid var(--c-border) !important;
  padding: 16px 20px;
  font-weight: 700;
  font-size: .95rem;
}

/* ── Stat Cards ────────────────────────────────────────── */
.stat-card {
  background: var(--c-white);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex; align-items: center; gap: 16px;
  transition: var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.stat-icon {
  width: 52px; height: 52px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; flex-shrink: 0;
}
.stat-icon.navy { background: rgba(26,46,74,.1); color: var(--c-navy); }
.stat-icon.amber { background: rgba(240,165,0,.15); color: var(--c-amber); }
.stat-icon.teal  { background: rgba(13,148,136,.12); color: var(--c-teal); }
.stat-icon.rose  { background: rgba(244,63,94,.1); color: #f43f5e; }
.stat-num { font-size: 1.8rem; font-weight: 800; color: var(--c-navy); line-height: 1; }
.stat-label { font-size: .82rem; color: var(--c-muted); font-weight: 600; margin-top: 2px; }
@media (max-width: 575px) {
  .stat-card { flex-wrap: wrap; padding: 14px; gap: 4px 10px; }
  .stat-body { display: contents; } /* flatten wrapper: icon+num stay row, label drops below */
  .stat-num { font-size: 1.5rem; }
  .stat-label { flex: 0 0 100%; margin-top: 0; }
  .stat-icon { width: 40px; height: 40px; font-size: 1.2rem; }
}

/* ── Tables ────────────────────────────────────────────── */
.table { font-size: .9rem; }
.table thead th {
  background: var(--c-light);
  border-bottom: 2px solid var(--c-border);
  font-size: .76rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--c-muted);
  padding: 8px 12px; white-space: nowrap;
}
.table tbody td { padding: 10px 12px; border-color: var(--c-border); vertical-align: middle; }
.table tbody tr:hover { background: rgba(26,46,74,.02); }
.table-responsive { border-radius: var(--radius-lg); overflow: hidden; }

/* ── Buttons ───────────────────────────────────────────── */
.btn-primary {
  background: var(--c-navy) !important;
  border-color: var(--c-navy) !important;
  font-weight: 600;
}
.btn-primary:hover { background: var(--c-navy-l) !important; border-color: var(--c-navy-l) !important; }
.btn-amber { background: var(--c-amber); border-color: var(--c-amber); color: var(--c-navy-d); font-weight: 700; }
.btn-amber:hover { background: var(--c-amber-l); border-color: var(--c-amber-l); color: var(--c-navy-d); }
.btn { border-radius: var(--radius-sm) !important; font-weight: 600; }

/* ── Forms ─────────────────────────────────────────────── */
.form-label { font-size: .85rem; font-weight: 700; color: var(--c-navy); margin-bottom: 4px; }
.form-control, .form-select {
  border-color: var(--c-border);
  border-radius: var(--radius-sm) !important;
  font-size: .9rem;
  padding: 8px 12px;
}
.form-control:focus, .form-select:focus {
  border-color: var(--c-navy);
  box-shadow: 0 0 0 3px rgba(26,46,74,.1);
}
/* ── Placeholder visibility ──────────────────────────── */
.form-control::placeholder,
.form-select::placeholder {
  color: rgba(30, 41, 59, 0.35); /* c-text at 35% — clearly lighter than real input text */
  opacity: 1;                     /* Firefox resets this without the override */
}
.form-section-title {
  font-size: .7rem; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--c-amber);
  padding: 16px 0 8px;
  border-bottom: 1px solid var(--c-border);
  margin-bottom: 16px;
}

/* ── Pipeline Board ────────────────────────────────────── */
.pipeline-board { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 12px; min-height: 500px; }
.pipeline-col {
  min-width: 240px; max-width: 260px; flex-shrink: 0;
  background: var(--c-light);
  border-radius: var(--radius);
  padding: 12px;
  display: flex; flex-direction: column;
}
.pipeline-col-header {
  display: flex; align-items: center; gap: 8px;
  padding-bottom: 10px; border-bottom: 2px solid; margin-bottom: 10px;
  font-size: .82rem; font-weight: 800;
}
.pipeline-col-header .stage-dot {
  width: 10px; height: 10px; border-radius: 50%;
}
.pipeline-count {
  margin-left: auto;
  background: rgba(0,0,0,.1);
  border-radius: 20px;
  padding: 1px 8px;
  font-size: .7rem;
}
.pipeline-cards { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.pipeline-card {
  background: var(--c-white);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: var(--transition);
  border-left: 3px solid transparent;
}
.pipeline-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.pipeline-card .cand-name { font-size: .9rem; font-weight: 700; color: var(--c-navy); }
.pipeline-card .cand-meta { font-size: .8rem; color: var(--c-muted); margin-top: 4px; }
.pipeline-card .cand-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.cand-tag { font-size: .68rem; font-weight: 600; padding: 2px 7px; border-radius: 20px; background: var(--c-light); color: var(--c-slate); }

/* ── Candidate Avatar ──────────────────────────────────── */
.cand-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--c-navy);
  color: var(--c-white);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 800;
  flex-shrink: 0;
}

.cand-avatar--success { background: #198754; }
.cand-avatar--warning { background: var(--c-amber); color: #1C2B3A; }
.cand-avatar--danger  { background: #dc3545; }

/* ── Badge overrides ───────────────────────────────────── */
.badge { font-size: .7rem !important; padding: 4px 8px !important; border-radius: 5px !important; font-weight: 600 !important; }
/* ── Taxonomy selection pills (skills / roles / quality tags) ── */
.tax-pill {
  background: rgba(26, 46, 74, 0.08) !important;
  color: var(--c-navy) !important;
  border-color: rgba(26, 46, 74, 0.22) !important;
  cursor: pointer;
  user-select: none;
  font-size: .78rem !important;
  padding: 4px 10px !important;
  border-radius: 20px !important;
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.tax-pill.active {
  background: #f59e0b !important;   /* amber — clearly distinct from unselected */
  color: #1a2e4a !important;        /* c-navy — WCAG AA compliant on amber */
  border-color: #d97706 !important;
}

/* ── Page header ───────────────────────────────────────── */
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
}
.page-header-left h1 { font-size: 1.3rem; font-weight: 800; color: var(--c-navy); margin: 0; }
.page-header-left p { font-size: .875rem; color: var(--c-muted); margin: 4px 0 0; }

/* ── Search / Filter bar ───────────────────────────────── */
.filter-bar {
  background: var(--c-white);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
}
@media (max-width: 767px) {
  .filter-bar .collapse.show {
    display: flex !important;
    flex-direction: column;
    gap: .5rem;
    padding-top: .5rem;
  }
}

/* ── Timeline (history) ────────────────────────────────── */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: ''; position: absolute; left: 10px; top: 0; bottom: 0;
  width: 2px; background: var(--c-border);
}
.timeline-item { position: relative; margin-bottom: 16px; }
.timeline-dot {
  position: absolute; left: -22px; top: 4px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--c-amber); border: 2px solid var(--c-white);
  box-shadow: 0 0 0 2px var(--c-amber);
}
.timeline-text { font-size: .875rem; }
.timeline-time { font-size: .76rem; color: var(--c-muted); }

/* ── Resume Parse box ──────────────────────────────────── */
.parse-drop-zone {
  border: 2px dashed var(--c-border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}
.parse-drop-zone:hover, .parse-drop-zone.drag-over {
  border-color: var(--c-navy);
  background: rgba(26,46,74,.03);
}
.parse-drop-zone i { font-size: 2.5rem; color: var(--c-slate); }
.parse-drop-zone p { font-size: .85rem; color: var(--c-muted); margin: 8px 0 0; }

/* ── Config builder (screening/interview) ──────────────── */
.config-param-row {
  display: grid;
  grid-template-columns: 1fr 140px 80px auto;
  gap: 8px; align-items: center;
  background: var(--c-light);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin-bottom: 6px;
}
.config-param-row input { background: var(--c-white); }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 991.98px) {
  .ats-sidebar { transform: translateX(-100%); width: var(--sidebar-w) !important; transition: transform .25s cubic-bezier(.4,0,.2,1); }
  .ats-sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .ats-main { margin-left: 0; }
  .ats-main.sidebar-collapsed { margin-left: 0; }
  .ats-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 1039; }
  .ats-overlay.visible { display: block; }
}

/* ── Login page ────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  background: linear-gradient(135deg, var(--c-navy-d) 0%, var(--c-navy) 60%, var(--c-navy-l) 100%);
}
.login-left {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
}
.login-box {
  background: var(--c-white);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%; max-width: 420px;
  box-shadow: var(--shadow-lg);
}
.login-logo { text-align: center; margin-bottom: 32px; }
.login-logo .logo-icon {
  width: 56px; height: 56px; background: var(--c-amber);
  border-radius: 14px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.6rem; color: var(--c-navy-d);
}
.login-logo h1 { font-size: 1.5rem; font-weight: 800; color: var(--c-navy); margin: 12px 0 4px; }
.login-logo p { font-size: .82rem; color: var(--c-muted); }
.login-right {
  flex: 1; display: none;
  flex-direction: column; align-items: center; justify-content: center;
  padding: 60px;
  color: rgba(255,255,255,.8);
}
@media (min-width: 992px) { .login-right { display: flex; } }
.login-right h2 { font-size: 2rem; font-weight: 800; color: var(--c-white); margin-bottom: 16px; }

/* ── Utilities ─────────────────────────────────────────── */
.text-navy { color: var(--c-navy) !important; }
.text-amber { color: var(--c-amber) !important; }
.bg-navy { background: var(--c-navy) !important; }
.bg-amber { background: var(--c-amber) !important; }
.fw-700 { font-weight: 700 !important; }
.fw-800 { font-weight: 800 !important; }
.fs-sm { font-size: .85rem; }
.fs-xs { font-size: .79rem; }
.mono { font-family: 'JetBrains Mono', monospace; }
.rounded-lg { border-radius: var(--radius-lg) !important; }
.detail-label { font-size: .79rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--c-muted); }
.detail-value { font-size: .95rem; color: var(--c-text); font-weight: 500; }
.scrollable-x { overflow-x: auto; }
/* ═══════════════════════════════════════════════════════════
   INCREMENT: Resume Builder CSS
   APPEND these styles to the END of assets/css/app.css
   ═══════════════════════════════════════════════════════════ */

/* ── Resume Builder Layout ──────────────────────────────── */
#resumeBuilderRoot .card { transition: var(--transition); }

/* Collapsible exp/edu blocks */
.exp-block, .edu-block {
  position: relative;
  background: var(--c-white);
  transition: background .15s;
}
.exp-block:hover, .edu-block:hover { background: #fafcff; }
.exp-block:last-child, .edu-block:last-child { border-bottom: none !important; }

/* builder save spinner overlay */
#builderFormPanel { position: relative; }

/* Template code editor dark theme overrides */
#htmlEditor {
  tab-size: 2;
  -moz-tab-size: 2;
}
#htmlEditor:focus { outline: 2px solid var(--c-amber) !important; }

/* Quick insert variable buttons */
.insert-var:hover {
  background: var(--c-navy) !important;
  color: var(--c-amber) !important;
  border-color: var(--c-navy) !important;
}

/* Preview frame container */
#resumePreviewFrame {
  box-shadow: inset 0 0 20px rgba(0,0,0,.05);
}

/* Sticky preview card on large screens */
@media (min-width: 992px) {
  #resumeBuilderRoot .col-lg-7 .card:first-child {
    position: sticky;
    top: 70px;
  }
}

/* bg-navy utility (used in builder) */
.bg-navy { background: var(--c-navy) !important; }
.bg-amber { background: var(--c-amber) !important; }

/* Flatpickr calendar must sit above Bootstrap modals (z-index 1055) */
.flatpickr-calendar { z-index: 9999 !important; }

/* ── Sortable table headers ─────────────────────────────── */
th.sort-th { cursor: pointer; user-select: none; white-space: nowrap; }
th.sort-th:hover { color: var(--c-navy) !important; background: #e8edf2 !important; }
th.sort-th[data-sort-dir="asc"],
th.sort-th[data-sort-dir="desc"] { color: var(--c-navy) !important; background: rgba(26,46,74,.07) !important; }
th.sort-th .sort-icon { font-size: .65rem; vertical-align: middle; pointer-events: none; }

/* ── Sidebar collapse (desktop) ─────────────────────────── */
:root { --sidebar-collapsed-w: 62px; }

.sidebar-collapse-btn {
  background: none; border: none; color: rgba(255,255,255,.5);
  font-size: 1rem; padding: 4px 6px; border-radius: var(--radius-sm);
  display: none; align-items: center; justify-content: center;
  transition: var(--transition); cursor: pointer; flex-shrink: 0;
}
.sidebar-collapse-btn:hover { color: var(--c-white); background: rgba(255,255,255,.1); }
@media (min-width: 992px) { .sidebar-collapse-btn { display: flex; } }

/* Collapsed sidebar */
.ats-sidebar.collapsed { width: var(--sidebar-collapsed-w); overflow-x: hidden; }
.ats-sidebar.collapsed .sidebar-brand { justify-content: center; }
.ats-sidebar.collapsed .brand-text { display: none; }
.ats-sidebar.collapsed .sidebar-nav { padding: 12px 8px; }
.ats-sidebar.collapsed .sidebar-nav .nav-link { justify-content: center; padding: 10px; gap: 0; }
.ats-sidebar.collapsed .sidebar-nav .nav-link span { display: none; }
.ats-sidebar.collapsed .nav-section-label { display: none; }
.ats-sidebar.collapsed .nav-badge { display: none; }
.ats-sidebar.collapsed .sidebar-footer { padding: 8px; }
.ats-sidebar.collapsed .user-info,
.ats-sidebar.collapsed .user-actions { display: none; }
.ats-sidebar.collapsed .sidebar-user { justify-content: center; }

/* Main content margin adjustment */
.ats-main { transition: margin-left .22s cubic-bezier(.4,0,.2,1); }
.ats-main.sidebar-collapsed { margin-left: var(--sidebar-collapsed-w); }

/* ── MultiCheckSelect ────────────────────────────────────── */
.mcs-wrapper { position: relative; display: inline-block; }
.mcs-btn {
  min-width: 120px; max-width: 200px; height: 31px;
  padding: 3px 28px 3px 10px; font-size: .8125rem;
  color: var(--c-text); background-color: #fff;
  border: 1px solid var(--c-border); border-radius: var(--radius-sm);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat; background-position: right 8px center; background-size: 12px;
  text-overflow: ellipsis; overflow: hidden; white-space: nowrap;
  cursor: pointer; transition: border-color .15s;
}
.mcs-btn:hover { border-color: var(--c-slate); }
.mcs-dropdown {
  position: absolute; top: calc(100% + 3px); left: 0; z-index: 1050;
  min-width: 220px; max-height: 300px;
  background: #fff; border: 1px solid var(--c-border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow);
  display: none; flex-direction: column;
}
.mcs-dropdown.open { display: flex; }
.mcs-search { padding: 8px; border-bottom: 1px solid var(--c-border); flex-shrink: 0; }
.mcs-search input { width: 100%; }
.mcs-actions {
  padding: 4px 10px; display: flex; gap: 12px;
  font-size: .72rem; border-bottom: 1px solid var(--c-border); flex-shrink: 0;
}
.mcs-actions a { color: var(--c-amber); text-decoration: none; }
.mcs-actions a:hover { text-decoration: underline; }
.mcs-list { overflow-y: auto; flex: 1; padding: 4px 0; }
.mcs-item {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 12px; cursor: pointer; font-size: .8125rem;
  user-select: none;
}
.mcs-item:hover { background: var(--c-light); }
.mcs-item input[type=checkbox] { accent-color: var(--c-amber); flex-shrink: 0; }
.mcs-item.hidden { display: none; }

/* ── List Card View ──────────────────────────────────────── */
.list-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
}
.list-card {
  background: var(--c-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--c-border);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  overflow: hidden;
  cursor: pointer;
}
.list-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: rgba(26,46,74,.15); }
.list-card-body { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.list-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.list-card-title { font-size: .95rem; font-weight: 700; color: var(--c-navy); line-height: 1.3; text-decoration: none; }
.list-card-title:hover { color: var(--c-amber); }
.list-card-code { font-size: .72rem; color: var(--c-muted); font-family: 'JetBrains Mono', monospace; margin-top: 2px; }
.list-card-divider { border-top: 1px solid var(--c-border); margin: 2px 0; }
.list-card-meta { font-size: .8rem; color: var(--c-muted); display: flex; align-items: center; gap: 5px; min-height: 0; }
.list-card-meta i { color: var(--c-slate); font-size: .85rem; flex-shrink: 0; }
.list-card-meta a { color: inherit; text-decoration: none; }
.list-card-meta a:hover { color: var(--c-navy); text-decoration: underline; }
.list-card-footer {
  padding: 10px 16px; border-top: 1px solid var(--c-border);
  background: var(--c-light); display: flex; gap: 6px; flex-wrap: wrap; align-items: center;
}
/* View toggle pill */
.view-toggle { border: 1px solid var(--c-border); border-radius: var(--radius-sm); overflow: hidden; display: inline-flex; background: var(--c-white); }
.view-toggle .vt-btn { padding: 5px 10px; background: none; border: none; color: var(--c-muted); cursor: pointer; font-size: .85rem; line-height: 1; transition: var(--transition); }
.view-toggle .vt-btn:hover { background: var(--c-light); color: var(--c-navy); }
.view-toggle .vt-btn.active { background: var(--c-navy); color: #fff; }
