@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --fg:           #172b4d;
  --muted:        #6b7280;
  --subtle:       #8a94a6;
  --border:       #e5e7eb;
  --bg:           #f7fafc;
  --card:         #ffffff;
  --primary:      #2490ef;
  --primary-weak: #eaf5ff;
  --primary-mid:  #135ea8;
  --success:      #1f7a4d;
  --success-weak: #eaf7f0;
  --warning:      #b7791f;
  --warning-weak: #fff7e6;
  --danger:       #c53030;
  --danger-weak:  #fff0f0;
  --teal:         #0f766e;
  --teal-weak:    #ebfffb;
  --shadow:       0 1px 2px rgba(16,24,40,.04), 0 8px 24px rgba(16,24,40,.06);
  --radius:       16px;
  --tap:          52px;   /* minimum touch target */
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.5;
}
a { text-decoration: none; color: inherit; }

/* ── Header ── */
.header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(180%) blur(8px);
}
.header-inner { max-width: 1360px; margin: 0 auto; padding: 16px 24px; }
.header-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(135deg, #2490ef, #53b0ff);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 18px; box-shadow: var(--shadow);
}
.header h1 { margin: 0; font-size: 22px; letter-spacing: -0.02em; font-weight: 700; }
.header p  { margin: 3px 0 0; color: var(--muted); font-size: 13px; }

/* mode badge on header */
.mode-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: .02em;
}
.mode-site   { background: #eaf7f0; color: #1f7a4d; border: 1px solid #b6e4cc; }
.mode-office { background: var(--primary-weak); color: var(--primary-mid); border: 1px solid #cfe6ff; }

/* ── Nav tabs ── */
.navtabs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.tab {
  padding: 9px 14px; border-radius: 999px; border: 1px solid var(--border);
  background: #fff; color: var(--muted); font-size: 13px; font-weight: 500;
  white-space: nowrap; transition: all .15s;
}
.tab:hover { border-color: #c0cfe8; color: var(--fg); }
.tab.active { background: var(--primary-weak); border-color: #cfe6ff; color: var(--primary-mid); font-weight: 600; }
.tab.site-tab.active { background: #eaf7f0; border-color: #b6e4cc; color: #1f7a4d; }

/* ── Container ── */
.container { max-width: 1360px; margin: 0 auto; padding: 20px 24px 80px; }

/* ── Grid layouts ── */
.grid   { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: 1.2fr .8fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ── Cards ── */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow);
}
.card h2, .card h3 { margin: 0 0 12px; letter-spacing: -0.02em; }
.card h2 { font-size: 18px; font-weight: 700; }
.card h3 { font-size: 15px; font-weight: 600; }
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.card-head h2 { margin: 0; }

/* ── KPI cards ── */
.kpi {
  background: #fff; border: 1px solid var(--border);
  border-radius: 18px; padding: 18px; box-shadow: var(--shadow);
}
.kpi .label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--subtle); font-weight: 600; }
.kpi .value { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; margin: 6px 0 4px; }
.kpi .sub   { font-size: 12px; color: var(--muted); }

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
}
.b-blue   { background: var(--primary-weak);  color: var(--primary-mid); }
.b-amber  { background: var(--warning-weak);  color: #8a5a15; }
.b-green  { background: var(--success-weak);  color: var(--success); }
.b-red    { background: var(--danger-weak);   color: var(--danger); }
.b-teal   { background: var(--teal-weak);     color: var(--teal); }
.b-gray   { background: #f3f4f6;              color: #4b5563; }

/* ── Tables ── */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 11px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.table th { font-size: 11px; text-transform: uppercase; color: var(--subtle); font-weight: 600; letter-spacing: .04em; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: #fafcff; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 42px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--border);
  background: #fff; font-size: 14px; font-weight: 600; color: var(--fg);
  cursor: pointer; transition: all .15s; white-space: nowrap;
  font-family: inherit;
}
.btn:hover  { border-color: #c0cfe8; }
.btn:active { transform: scale(.97); }
.btn.primary  { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn.primary:hover { background: #1a7fd4; }
.btn.secondary{ background: var(--primary-weak); border-color: #cfe6ff; color: var(--primary-mid); }
.btn.success  { background: var(--success); color: #fff; border-color: var(--success); }
.btn.warn     { background: var(--warning-weak); border-color: #f5e1b7; color: #8a5a15; }
.btn.danger   { background: var(--danger-weak); border-color: #f0c3c3; color: #a12a2a; }
.btn.teal     { background: var(--teal-weak); border-color: #a3d8d4; color: var(--teal); }
.btn-row      { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

/* ── Form fields (office — smaller inputs) ── */
.formgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.field {
  border: 1px solid var(--border); border-radius: 14px; padding: 12px; background: #fff;
}
.field label {
  display: block; font-size: 11px; text-transform: uppercase; color: var(--subtle);
  margin-bottom: 5px; font-weight: 600; letter-spacing: .04em;
}
.field .input {
  background: #fafcff; border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; min-height: 44px; font-size: 14px; width: 100%;
  font-family: inherit; color: var(--fg);
}
.field .input:focus { outline: none; border-color: var(--primary); }
.field .input.readonly { background: #f3f6fa; color: var(--muted); cursor: default; }
.field-locked { position: relative; }
.field-locked::after {
  content: '🔒'; position: absolute; top: 10px; right: 10px;
  font-size: 11px; opacity: .5;
}

/* ── SITE tap-choice buttons ── */
/* Large tap targets for checklist OK/NOK/NA — interactive */
.choice-row { display: flex; gap: 8px; flex-wrap: wrap; }
.choice {
  min-height: var(--tap); min-width: 72px; padding: 0 14px;
  border: 2px solid var(--border); border-radius: 12px;
  font-weight: 700; font-size: 14px; text-align: center;
  background: #fff; color: var(--muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .12s; user-select: none;
  font-family: inherit;
}
.choice:active { transform: scale(.95); }
/* selected states */
.choice.sel-ok  { background: var(--success-weak); color: var(--success); border-color: #7ecba4; }
.choice.sel-nok { background: var(--danger-weak);  color: var(--danger);  border-color: #f0a0a0; }
.choice.sel-na  { background: #f3f4f6;             color: #4b5563;        border-color: #c0c8d0; }
/* static colored (for display) */
.choice.ok  { background: var(--success-weak); color: var(--success); border-color: #7ecba4; }
.choice.no  { background: var(--danger-weak);  color: var(--danger);  border-color: #f0a0a0; }
.choice.na  { background: #f3f4f6;             color: #4b5563;        border-color: #c0c8d0; }

/* tap-selector (weather, curing method etc) */
.tap-group { display: flex; gap: 8px; flex-wrap: wrap; }
.tap-opt {
  min-height: var(--tap); flex: 1; min-width: 80px;
  border: 2px solid var(--border); border-radius: 14px;
  background: #fff; cursor: pointer; transition: all .12s;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; padding: 8px 6px; font-size: 12px; font-weight: 600; color: var(--muted);
  font-family: inherit; user-select: none;
}
.tap-opt .icon { font-size: 22px; line-height: 1; }
.tap-opt:active { transform: scale(.95); }
.tap-opt.sel { border-color: var(--primary); background: var(--primary-weak); color: var(--primary-mid); }
.tap-opt.sel-green { border-color: #7ecba4; background: var(--success-weak); color: var(--success); }

/* ── Site form — large readable inputs ── */
.site-field { margin-bottom: 14px; }
.site-field label {
  display: block; font-size: 12px; text-transform: uppercase; color: var(--subtle);
  font-weight: 600; letter-spacing: .05em; margin-bottom: 6px;
}
.site-input {
  width: 100%; min-height: var(--tap); border: 2px solid var(--border); border-radius: 14px;
  padding: 12px 16px; font-size: 16px; color: var(--fg); background: #fff;
  font-family: inherit; -webkit-appearance: none; appearance: none;
}
.site-input:focus { outline: none; border-color: var(--primary); }
.site-input.locked { background: #f3f6fa; color: var(--muted); }

/* ── Checklist table (site) ── */
.check-table { width: 100%; border-collapse: collapse; }
.check-table thead tr { background: #f3f6fa; }
.check-table th {
  font-size: 11px; text-transform: uppercase; color: var(--subtle); font-weight: 600;
  padding: 10px 12px; border-bottom: 2px solid var(--border); letter-spacing: .04em;
}
.check-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.check-table tr:last-child td { border-bottom: none; }
.check-table tr.nok-row td { background: #fff8f8; }
.check-table tr.ok-row  td { background: #f6fef9; }
.check-table .check-item { font-size: 14px; font-weight: 500; }
.check-table .is-ref { font-size: 11px; color: var(--primary-mid); font-family: monospace; background: var(--primary-weak); padding: 1px 5px; border-radius: 4px; margin-left: 6px; }
.remark-input {
  width: 100%; min-height: 40px; border: 1.5px solid var(--border); border-radius: 10px;
  padding: 8px 12px; font-size: 14px; color: var(--fg); background: #fff;
  font-family: inherit;
}
.remark-input:focus { outline: none; border-color: var(--primary); }
.remark-input.nok { border-color: #f0a0a0; background: #fff8f8; }

/* ── Expandable section ── */
.expand-trigger {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; cursor: pointer; border-top: 1px solid var(--border);
  font-size: 14px; font-weight: 600; color: var(--primary-mid);
  user-select: none; background: var(--primary-weak); border-radius: 0 0 12px 12px;
}
.expand-trigger .arrow { transition: transform .2s; font-size: 12px; }
.expand-trigger.open .arrow { transform: rotate(180deg); }
.expandable { display: none; }
.expandable.open { display: block; }

/* ── Workflow timeline ── */
.wf-bar { display: flex; gap: 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); margin-bottom: 16px; }
.wf-step {
  flex: 1; padding: 13px 10px; text-align: center; background: #fff;
  border-right: 1px solid var(--border); position: relative;
}
.wf-step:last-child { border-right: none; }
.wf-step::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--border); }
.wf-step.done::before { background: var(--success); }
.wf-step.active::before { background: var(--primary); }
.wf-step.post::before { background: var(--teal); }
.wf-dot {
  width: 28px; height: 28px; border-radius: 50%;
  margin: 0 auto 5px; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}
.wf-dot.done   { background: var(--success); color: #fff; }
.wf-dot.active { background: var(--primary); color: #fff; }
.wf-dot.wait   { background: var(--border); color: var(--subtle); }
.wf-dot.post   { background: var(--teal); color: #fff; }
.wf-label { font-size: 11px; font-weight: 600; color: var(--muted); }
.wf-name  { font-size: 12px; font-weight: 700; color: var(--fg); margin-top: 1px; }
.wf-time  { font-size: 10px; color: var(--subtle); margin-top: 1px; }

/* ── Sticky phonebar ── */
.phonebar {
  position: sticky; bottom: 0; z-index: 30;
  background: rgba(255,255,255,.97); backdrop-filter: blur(8px);
  padding: 12px 20px; border-top: 1px solid var(--border);
  display: flex; gap: 10px; flex-wrap: wrap;
}

/* ── IS note pill ── */
.is-note {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--primary-weak); color: var(--primary-mid);
  border: 1px solid #cfe6ff; border-radius: 6px;
  font-size: 11px; font-weight: 600; padding: 2px 7px; font-family: monospace;
}

/* ── Sidebar/info note ── */
.sidebar-note {
  padding: 12px 14px; border-radius: 14px; background: var(--warning-weak);
  border: 1px solid #f5e1b7; color: #8a5a15; font-size: 13px; line-height: 1.5;
}
.info-note {
  padding: 12px 14px; border-radius: 14px; background: var(--primary-weak);
  border: 1px solid #cfe6ff; color: var(--primary-mid); font-size: 13px; line-height: 1.5;
}
.success-note {
  padding: 12px 14px; border-radius: 14px; background: var(--success-weak);
  border: 1px solid #b6e4cc; color: var(--success); font-size: 13px; line-height: 1.5;
}

/* ── Progress bar ── */
.progress { height: 8px; background: #edf2f7; border-radius: 999px; overflow: hidden; margin-top: 6px; }
.progress > div { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #2490ef, #5fb5ff); }
.progress.warn > div { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.progress.danger > div { background: linear-gradient(90deg, #ef4444, #f87171); }

/* ── BOQ strip ── */
.boq-strip {
  display: flex; gap: 0; border: 1px solid var(--border); border-radius: 14px;
  overflow: hidden; background: #fff; margin-bottom: 14px;
}
.boq-cell { flex: 1; padding: 10px 12px; border-right: 1px solid var(--border); }
.boq-cell:last-child { border-right: none; }
.boq-cell .label { font-size: 10px; text-transform: uppercase; color: var(--subtle); font-weight: 600; letter-spacing: .05em; margin-bottom: 3px; }
.boq-cell .val   { font-size: 14px; font-weight: 700; color: var(--fg); }
.boq-cell .val.green { color: var(--success); }
.boq-cell .val.amber { color: var(--warning); }

/* ── Alert banner ── */
.alert { display: flex; gap: 12px; padding: 12px 14px; border-radius: 14px; margin-bottom: 14px; align-items: flex-start; }
.alert .icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.alert .body .title { font-weight: 700; font-size: 14px; margin-bottom: 2px; }
.alert .body p { font-size: 13px; margin: 0; }
.alert.danger  { background: var(--danger-weak); border: 1px solid #f0c3c3; color: var(--danger); }
.alert.warning { background: var(--warning-weak); border: 1px solid #f5e1b7; color: #8a5a15; }
.alert.success { background: var(--success-weak); border: 1px solid #b6e4cc; color: var(--success); }
.alert.info    { background: var(--primary-weak); border: 1px solid #cfe6ff; color: var(--primary-mid); }

/* ── Section title ── */
.section-title { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--subtle); margin-bottom: 12px; font-weight: 600; }

/* ── Top chip ── */
.top-chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; background: #f8fafc; border: 1px solid var(--border); font-size: 13px; font-weight: 600; color: #475467; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .formgrid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .formgrid { grid-template-columns: 1fr 1fr; }
  .header h1 { font-size: 18px; }
}
@media (max-width: 480px) {
  .formgrid { grid-template-columns: 1fr; }
  .wf-bar { flex-wrap: wrap; }
  .wf-step { min-width: 45%; border-bottom: 1px solid var(--border); }
}

/* ═══════════════════════════════════════════════════════════
   LEFT SIDEBAR LAYOUT — Office Mode & Overview
   Site Mode keeps top-nav (.site-layout class on body)
   ═══════════════════════════════════════════════════════════ */

/* App shell wrapper */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ── Top bar (brand only — no nav tabs) ── */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  height: 56px;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(180%) blur(8px);
  display: flex; align-items: center;
  padding: 0 20px; gap: 16px;
}
.topbar-brand { display:flex; align-items:center; gap:10px; flex:0 0 auto; }
.topbar-brand .brand-mark {
  width:34px; height:34px; border-radius:10px;
  background:linear-gradient(135deg,#2490ef,#53b0ff);
  color:#fff; display:flex; align-items:center; justify-content:center;
  font-weight:800; font-size:16px; box-shadow:var(--shadow); flex-shrink:0;
}
.topbar-brand h1 { margin:0; font-size:16px; font-weight:700; letter-spacing:-.01em; white-space:nowrap; }
.topbar-brand p  { display:none; }
.topbar-right { margin-left:auto; display:flex; align-items:center; gap:10px; }
.topbar-pagetitle {
  font-size:14px; font-weight:600; color:var(--muted);
  border-left:1px solid var(--border); padding-left:14px; white-space:nowrap;
  overflow:hidden; text-overflow:ellipsis; max-width:360px;
}

/* Hamburger toggle */
.sidebar-toggle {
  width:34px; height:34px; border-radius:8px; border:1px solid var(--border);
  background:#fff; cursor:pointer; display:flex; flex-direction:column;
  align-items:center; justify-content:center; gap:4px; padding:0; flex-shrink:0;
}
.sidebar-toggle span {
  display:block; width:16px; height:2px; background:var(--muted);
  border-radius:2px; transition:all .2s;
}

/* ── Left sidebar ── */
.left-nav {
  position: fixed; top: 56px; left: 0; bottom: 0;
  width: 220px;
  background: #fff;
  border-right: 1px solid var(--border);
  overflow-y: auto; overflow-x: hidden;
  z-index: 20;
  display: flex; flex-direction: column;
  transition: width .2s ease, transform .2s ease;
}
.left-nav.collapsed { width: 56px; }

/* Nav section groups */
.nav-group { padding: 16px 0 8px; }
.nav-group-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: .08em;
  font-weight: 700; color: var(--subtle);
  padding: 0 16px; margin-bottom: 4px;
  white-space: nowrap; overflow: hidden;
  transition: opacity .15s;
}
.left-nav.collapsed .nav-group-label { opacity: 0; }

/* Nav items */
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 16px; margin: 1px 8px; border-radius: 10px;
  font-size: 13px; font-weight: 500; color: var(--muted);
  text-decoration: none; cursor: pointer; transition: all .12s;
  white-space: nowrap; overflow: hidden;
}
.nav-item:hover { background: var(--bg); color: var(--fg); }
.nav-item.active {
  background: var(--primary-weak); color: var(--primary-mid);
  font-weight: 700;
}
.nav-item.active.site-item {
  background: #eaf7f0; color: #1f7a4d;
}
.nav-item .nav-icon {
  font-size: 16px; flex-shrink: 0; width: 22px; text-align: center;
}
.nav-item .nav-label { transition: opacity .15s; }
.left-nav.collapsed .nav-item .nav-label { opacity: 0; width: 0; overflow: hidden; }
.left-nav.collapsed .nav-item { padding: 9px 0; justify-content: center; margin: 1px 6px; }

/* Nav divider */
.nav-divider { height: 1px; background: var(--border); margin: 8px 12px; }

/* ── Main content area ── */
.main-content {
  margin-left: 220px;
  margin-top: 56px;
  min-height: calc(100vh - 56px);
  padding: 24px 28px 80px;
  transition: margin-left .2s ease;
  max-width: 100%;
}
.main-content.expanded { margin-left: 56px; }

/* ── Responsive sidebar ── */
@media (max-width: 1024px) {
  .left-nav { transform: translateX(-100%); width: 220px; }
  .left-nav.mobile-open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .main-content.expanded { margin-left: 0; }
  .topbar-pagetitle { display: none; }
}

/* ── Site layout — top nav retained ── */
body.site-layout .app-shell { display: block; }
body.site-layout .left-nav  { display: none; }
body.site-layout .main-content { margin: 0; padding: 0; }
body.site-layout .topbar { display: none; }

/* ── Shared modal (used by M-Book, NCR, RA Bill) ── */
.modal-overlay { display:none; position:fixed; inset:0; background:rgba(16,24,40,.4); z-index:200; align-items:center; justify-content:center; padding:20px; }
.modal-overlay.open { display:flex; }
.modal-box { background:#fff; border-radius:20px; padding:24px; width:620px; max-width:100%; box-shadow:0 24px 64px rgba(16,24,40,.2); max-height:90vh; overflow-y:auto; }
.modal-box h3 { margin:0 0 16px; font-size:17px; font-weight:700; }
.modal-close { float:right; background:none; border:none; font-size:20px; cursor:pointer; color:var(--muted); margin-top:-4px; }

/* ── List view (M-Book list, RA Bill list) ── */
.list-row { display:flex; align-items:center; gap:12px; padding:13px 16px; border-bottom:1px solid var(--border); cursor:pointer; transition:background .12s; }
.list-row:last-child { border-bottom:none; }
.list-row:hover { background:#fafcff; }
.list-row .lr-ref { font-weight:700; font-size:14px; min-width:110px; }
.list-row .lr-meta { font-size:12px; color:var(--muted); flex:1; }
.list-row .lr-amount { font-weight:700; font-size:14px; text-align:right; min-width:90px; }
.list-row .lr-actions { display:flex; gap:6px; flex-shrink:0; }

/* ── Section pill (M-Book / RA Bill tabs) ── */
.screen-tabs { display:flex; gap:6px; margin-bottom:18px; border-bottom:2px solid var(--border); padding-bottom:0; }
.screen-tab { padding:9px 18px; font-size:13px; font-weight:600; color:var(--muted); cursor:pointer; border-bottom:2px solid transparent; margin-bottom:-2px; background:none; border-top:none; border-left:none; border-right:none; font-family:inherit; transition:all .15s; }
.screen-tab:hover { color:var(--fg); }
.screen-tab.active { color:var(--primary-mid); border-bottom-color:var(--primary); }

/* ── Cube entry row ── */
.cube-grade-pill { display:inline-flex; align-items:center; padding:2px 8px; border-radius:5px; font-size:11px; font-weight:700; background:#f3f4f6; color:#374151; }
