/* ============================================================
   CaseCommand — Design Tokens & Global Styles
   PI & Legal Operations Platform
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700;900&family=IBM+Plex+Mono:wght@300;400;600&family=IBM+Plex+Sans:wght@300;400;500;600;700&display=swap');

:root {
  /* Background */
  --bg:        #08090b;
  --surface:   #0f1116;
  --surface2:  #161a22;
  --surface3:  #1c2130;
  --surface4:  #222840;

  /* Borders */
  --border:    #1e2436;
  --border2:   #2a3252;
  --border3:   #374070;

  /* Brand Gold */
  --gold:      #c9a84c;
  --gold2:     #e8c97a;
  --gold-dim:  rgba(201,168,76,.14);
  --gold-dim2: rgba(201,168,76,.07);
  --gold-dim3: rgba(201,168,76,.04);

  /* Semantic */
  --red:     #e05050;
  --red-dim: rgba(224,80,80,.13);
  --green:   #3db87a;
  --grn-dim: rgba(61,184,122,.13);
  --blue:    #4a8fdd;
  --blu-dim: rgba(74,143,221,.13);
  --purple:  #9b72dd;
  --pur-dim: rgba(155,114,221,.13);
  --orange:  #e07a30;
  --org-dim: rgba(224,122,48,.13);
  --teal:    #2dc4c4;
  --tel-dim: rgba(45,196,196,.13);

  /* Text */
  --text:  #dde0ea;
  --text2: #8892a8;
  --text3: #50597a;
  --text4: #323b55;

  /* Layout */
  --sidebar-w: 248px;
  --topbar-h:  52px;
  --radius:    6px;
  --radius-lg: 10px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,.4);
  --shadow-md: 0 4px 20px rgba(0,0,0,.5);
  --shadow-lg: 0 8px 40px rgba(0,0,0,.6);
  --shadow-gold: 0 0 24px rgba(201,168,76,.15);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body {
  font-family: 'IBM Plex Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold2); }
img { display: block; max-width: 100%; }
input, select, textarea, button { font-family: inherit; }
ul, ol { list-style: none; }

/* ── SCROLLBARS ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border3); }

/* ── TYPOGRAPHY HELPERS ── */
.font-mono  { font-family: 'IBM Plex Mono', monospace; }
.font-serif { font-family: 'Playfair Display', serif; }
.text-xs    { font-size: 10px; }
.text-sm    { font-size: 12px; }
.text-base  { font-size: 14px; }
.text-lg    { font-size: 16px; }
.text-xl    { font-size: 20px; }
.text-2xl   { font-size: 28px; }
.text-muted  { color: var(--text2); }
.text-faint  { color: var(--text3); }
.text-gold   { color: var(--gold); }
.text-red    { color: var(--red); }
.text-green  { color: var(--green); }
.text-blue   { color: var(--blue); }
.text-upper  { text-transform: uppercase; letter-spacing: .1em; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

/* ── LAYOUT ── */
.app-shell {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}
.page-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}
.scroll-area {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

/* ── GRID HELPERS ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.flex   { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.ml-auto { margin-left: auto; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }

/* ── BADGES / TAGS ── */
.tag {
  display: inline-flex; align-items: center;
  font-size: 10px; font-family: 'IBM Plex Mono', monospace;
  text-transform: uppercase; letter-spacing: .07em;
  padding: 2px 7px; border-radius: 3px; white-space: nowrap;
  font-weight: 400;
}
.tag-gold   { background: var(--gold-dim);  color: var(--gold); }
.tag-red    { background: var(--red-dim);   color: var(--red); }
.tag-green  { background: var(--grn-dim);   color: var(--green); }
.tag-blue   { background: var(--blu-dim);   color: var(--blue); }
.tag-purple { background: var(--pur-dim);   color: var(--purple); }
.tag-orange { background: var(--org-dim);   color: var(--orange); }
.tag-teal   { background: var(--tel-dim);   color: var(--teal); }
.tag-gray   { background: rgba(80,89,122,.25); color: var(--text2); }

/* ── STATUS DOTS ── */
.dot {
  display: inline-block; border-radius: 50%;
  width: 7px; height: 7px; flex-shrink: 0;
}
.dot-gold   { background: var(--gold); }
.dot-red    { background: var(--red); }
.dot-green  { background: var(--green); }
.dot-blue   { background: var(--blue); }
.dot-purple { background: var(--purple); }
.dot-orange { background: var(--orange); }
.dot-gray   { background: var(--text3); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: none; border-radius: var(--radius);
  font-size: 12px; font-weight: 500; font-family: 'IBM Plex Sans', sans-serif;
  padding: 7px 14px; cursor: pointer; transition: all .15s;
  white-space: nowrap; line-height: 1;
}
.btn-primary { background: var(--gold); color: #0a0800; }
.btn-primary:hover { background: var(--gold2); box-shadow: var(--shadow-gold); }
.btn-ghost   { background: transparent; color: var(--text2); border: 1px solid var(--border2); }
.btn-ghost:hover { background: var(--surface2); color: var(--text); border-color: var(--border3); }
.btn-danger  { background: var(--red-dim); color: var(--red); border: 1px solid rgba(224,80,80,.25); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-sm { padding: 5px 10px; font-size: 11px; }
.btn-icon { padding: 6px; border-radius: var(--radius); background: transparent; border: 1px solid var(--border); color: var(--text3); cursor: pointer; transition: all .15s; }
.btn-icon:hover { color: var(--text); border-color: var(--border2); background: var(--surface2); }

/* ── PANEL ── */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.panel-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.panel-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px; text-transform: uppercase;
  letter-spacing: .13em; color: var(--text3);
}

/* ── TABLES ── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  font-family: 'IBM Plex Mono', monospace; font-size: 9px;
  text-transform: uppercase; letter-spacing: .12em; color: var(--text3);
  padding: 9px 14px; text-align: left; border-bottom: 1px solid var(--border);
  white-space: nowrap; font-weight: 400;
}
.data-table td { padding: 9px 14px; font-size: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr { cursor: pointer; transition: background .1s; }
.data-table tbody tr:hover td { background: var(--gold-dim3); }
.data-table .mono { font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: var(--text3); }

/* ── FORM ELEMENTS ── */
.form-row { margin-bottom: 14px; }
.form-label {
  display: block; font-size: 10px; font-family: 'IBM Plex Mono', monospace;
  text-transform: uppercase; letter-spacing: .1em; color: var(--text3);
  margin-bottom: 5px;
}
.form-input, .form-select, .form-textarea {
  width: 100%; background: var(--surface2); border: 1px solid var(--border2);
  border-radius: var(--radius); padding: 8px 11px;
  font-size: 13px; color: var(--text); font-family: 'IBM Plex Sans', sans-serif;
  outline: none; transition: border-color .15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-dim);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text3); }
.form-select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2350597a'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px; }
.form-textarea { resize: vertical; min-height: 80px; line-height: 1.6; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; padding-top: 12px; border-top: 1px solid var(--border); margin-top: 4px; }

/* ── MODAL ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.75); backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center;
  z-index: 2000; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: var(--radius-lg); width: 640px; max-width: 100%;
  max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg);
  animation: modalIn .2s cubic-bezier(.22,1,.36,1);
}
.modal-sm { width: 440px; }
.modal-lg { width: 800px; }
@keyframes modalIn {
  from { transform: scale(.96) translateY(12px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}
.modal-header {
  padding: 20px 22px 16px; border-bottom: 1px solid var(--border);
  display: flex; align-items: flex-start; justify-content: space-between;
}
.modal-title { font-family: 'Playfair Display', serif; font-size: 20px; font-weight: 700; }
.modal-body { padding: 20px 22px; }
.modal-close {
  background: none; border: none; color: var(--text3); cursor: pointer;
  font-size: 16px; line-height: 1; padding: 2px; transition: color .15s; margin-left: 16px;
}
.modal-close:hover { color: var(--text); }

/* ── PROGRESS BAR ── */
.progress-wrap { height: 4px; background: var(--surface3); border-radius: 2px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 2px; background: var(--gold); transition: width .4s; }

/* ── AVATAR ── */
.avatar {
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 700; flex-shrink: 0;
}
.avatar-sm { width: 24px; height: 24px; font-size: 9px; }
.avatar-md { width: 32px; height: 32px; font-size: 12px; }
.avatar-lg { width: 44px; height: 44px; font-size: 16px; }
.av-gold   { background: linear-gradient(135deg,var(--gold),#7a5a1a); color: #000; }
.av-blue   { background: linear-gradient(135deg,#4a8fdd,#1a4f8b); color: #fff; }
.av-purple { background: linear-gradient(135deg,#9b72dd,#4a2a8b); color: #fff; }
.av-green  { background: linear-gradient(135deg,#3db87a,#1a6040); color: #fff; }
.av-red    { background: linear-gradient(135deg,#e05050,#8b1a1a); color: #fff; }
.av-orange { background: linear-gradient(135deg,#e07a30,#7a3010); color: #fff; }

/* ── TOOLTIP ── */
[data-tip] { position: relative; }
[data-tip]::after {
  content: attr(data-tip);
  position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: var(--surface4); border: 1px solid var(--border2); border-radius: 4px;
  padding: 4px 8px; font-size: 11px; white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity .15s; z-index: 100; color: var(--text);
}
[data-tip]:hover::after { opacity: 1; }

/* ── TOAST ── */
#toast-container {
  position: fixed; bottom: 20px; right: 20px;
  display: flex; flex-direction: column; gap: 8px; z-index: 9999;
}
.toast {
  background: var(--surface2); border: 1px solid var(--border2);
  border-radius: var(--radius); padding: 10px 16px;
  font-size: 12px; box-shadow: var(--shadow-md);
  display: flex; align-items: center; gap: 10px;
  animation: toastIn .25s ease; min-width: 240px;
}
.toast.toast-success { border-left: 3px solid var(--green); }
.toast.toast-error   { border-left: 3px solid var(--red); }
.toast.toast-info    { border-left: 3px solid var(--blue); }
.toast.toast-warn    { border-left: 3px solid var(--gold); }
@keyframes toastIn {
  from { transform: translateX(20px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* ── EMPTY STATE ── */
.empty-state {
  text-align: center; padding: 60px 20px; color: var(--text3);
}
.empty-state .empty-icon { font-size: 40px; margin-bottom: 12px; opacity: .5; }
.empty-state h3 { font-size: 14px; color: var(--text2); margin-bottom: 6px; }
.empty-state p  { font-size: 12px; }

/* ── INLINE SEARCH ── */
.search-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0 12px; height: 33px;
  transition: border-color .15s;
}
.search-box:focus-within { border-color: var(--border3); }
.search-box input {
  background: none; border: none; outline: none;
  font-size: 12px; color: var(--text); width: 200px;
}
.search-box input::placeholder { color: var(--text3); }

/* ── STAT CARD ── */
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 18px 20px;
  position: relative; overflow: hidden;
}
.stat-card::after {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
}
.stat-card.c-gold::after   { background: var(--gold); }
.stat-card.c-red::after    { background: var(--red); }
.stat-card.c-green::after  { background: var(--green); }
.stat-card.c-blue::after   { background: var(--blue); }
.stat-card.c-purple::after { background: var(--purple); }
.stat-label { font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--text3); font-family: 'IBM Plex Mono', monospace; margin-bottom: 6px; }
.stat-value { font-family: 'Playfair Display', serif; font-size: 34px; font-weight: 700; line-height: 1; }
.stat-sub   { font-size: 11px; color: var(--text3); margin-top: 4px; }

/* ── CONFIDENTIAL BANNER ── */
.confidential-bar {
  background: var(--red-dim); border: 1px solid rgba(224,80,80,.2);
  border-radius: var(--radius); padding: 9px 14px;
  font-family: 'IBM Plex Mono', monospace; font-size: 10px;
  letter-spacing: .1em; color: var(--red); text-transform: uppercase;
  display: flex; align-items: center; gap: 8px;
}

/* ── VIEW TABS ── */
.view-tabs { display: flex; gap: 2px; }
.vtab {
  padding: 6px 12px; border-radius: var(--radius); font-size: 11px;
  cursor: pointer; color: var(--text3); border: 1px solid transparent;
  transition: all .15s; font-family: 'IBM Plex Mono', monospace;
  text-transform: uppercase; letter-spacing: .08em;
}
.vtab:hover { color: var(--text2); background: var(--surface2); }
.vtab.active { color: var(--gold); border-color: var(--border2); background: var(--gold-dim); }

/* ── DETAIL TABS ── */
.dtabs { display: flex; border-bottom: 1px solid var(--border); padding: 0 2px; }
.dtab {
  padding: 10px 16px; font-size: 12px; cursor: pointer; color: var(--text3);
  border-bottom: 2px solid transparent; transition: all .15s; white-space: nowrap;
}
.dtab:hover { color: var(--text2); }
.dtab.active { color: var(--gold); border-bottom-color: var(--gold); }

/* ── ACTIVITY FEED ── */
.activity-item {
  display: flex; gap: 12px; padding: 11px 0;
  border-bottom: 1px solid var(--border);
}
.activity-item:last-child { border-bottom: none; }
.activity-body { font-size: 12px; line-height: 1.5; }
.activity-time { font-size: 10px; color: var(--text3); font-family: 'IBM Plex Mono', monospace; margin-top: 2px; }

/* ── NOTIFICATION ITEM ── */
.notif-item {
  display: flex; gap: 12px; padding: 13px 18px;
  border-bottom: 1px solid var(--border); cursor: pointer; transition: background .1s;
}
.notif-item:hover { background: var(--gold-dim3); }
.notif-item:last-child { border-bottom: none; }
.notif-item.unread { border-left: 2px solid var(--gold); }
.notif-icon { font-size: 18px; flex-shrink: 0; }
.notif-title { font-size: 12px; font-weight: 500; }
.notif-body  { font-size: 11px; color: var(--text2); margin-top: 2px; }
.notif-time  { font-size: 10px; color: var(--text3); font-family: 'IBM Plex Mono', monospace; white-space: nowrap; margin-left: auto; }

/* ── KANBAN ── */
.kanban-wrap { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; }
.kanban-col {
  min-width: 260px; max-width: 260px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.kanban-col-header {
  padding: 12px 14px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.kanban-col-title { font-size: 11px; font-family: 'IBM Plex Mono', monospace; text-transform: uppercase; letter-spacing: .1em; display: flex; align-items: center; gap: 8px; }
.kanban-col-count { font-size: 10px; color: var(--text3); padding: 1px 6px; background: var(--surface2); border-radius: 10px; }
.kanban-cards { padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 60px; }

/* ── CASE CARD ── */
.case-card {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px; cursor: pointer;
  transition: all .15s; user-select: none;
}
.case-card:hover { border-color: var(--border2); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.case-card-id { font-family: 'IBM Plex Mono', monospace; font-size: 9px; color: var(--text3); letter-spacing: .08em; margin-bottom: 5px; }
.case-card-name { font-size: 13px; font-weight: 500; line-height: 1.35; margin-bottom: 8px; }
.case-card-due { font-size: 10px; font-family: 'IBM Plex Mono', monospace; color: var(--text3); margin-top: 8px; display: flex; align-items: center; gap: 4px; }
.case-card-due.urgent { color: var(--red); }

/* ── GANTT ── */
.gantt-header { display: flex; align-items: center; }
.gantt-label-col { width: 220px; min-width: 220px; padding: 8px 14px; font-size: 9px; font-family: 'IBM Plex Mono', monospace; text-transform: uppercase; letter-spacing: .1em; color: var(--text3); border-bottom: 1px solid var(--border); }
.gantt-months { flex: 1; display: flex; border-bottom: 1px solid var(--border); }
.gantt-month { flex: 1; text-align: center; font-size: 9px; font-family: 'IBM Plex Mono', monospace; text-transform: uppercase; letter-spacing: .1em; color: var(--text3); padding: 8px 0; border-left: 1px solid var(--border); }
.gantt-row { display: flex; align-items: center; border-bottom: 1px solid var(--border); }
.gantt-row:last-child { border-bottom: none; }
.gantt-row-label { width: 220px; min-width: 220px; padding: 8px 14px; }
.gantt-track { flex: 1; position: relative; height: 34px; }
.gantt-bar {
  position: absolute; top: 7px; height: 20px; border-radius: 3px;
  display: flex; align-items: center; padding: 0 8px;
  font-size: 10px; white-space: nowrap; overflow: hidden; font-weight: 500;
}

/* ── CALENDAR ── */
.cal-grid { display: grid; grid-template-columns: repeat(7,1fr); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; gap: 0; }
.cal-day-header { background: var(--surface2); padding: 8px 4px; text-align: center; font-size: 9px; font-family: 'IBM Plex Mono', monospace; text-transform: uppercase; letter-spacing: .1em; color: var(--text3); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.cal-day-header:last-child { border-right: none; }
.cal-day { background: var(--surface); min-height: 96px; padding: 8px; cursor: pointer; transition: background .1s; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.cal-day:nth-child(7n) { border-right: none; }
.cal-day:nth-last-child(-n+7) { border-bottom: none; }
.cal-day:hover { background: var(--surface2); }
.cal-day.today { background: var(--gold-dim); }
.cal-day-num { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--text3); margin-bottom: 4px; }
.cal-day.today .cal-day-num { color: var(--gold); font-weight: 600; }
.cal-event { font-size: 10px; padding: 2px 5px; border-radius: 3px; margin-bottom: 2px; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── EVIDENCE GRID ── */
.evidence-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(160px,1fr)); gap: 12px; }
.evidence-card {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 12px; cursor: pointer;
  transition: all .15s; text-align: center;
}
.evidence-card:hover { border-color: var(--border2); box-shadow: var(--shadow-sm); }
.ev-icon { font-size: 30px; margin-bottom: 8px; }
.ev-name { font-size: 11px; font-weight: 500; word-break: break-all; line-height: 1.4; }
.ev-meta { font-size: 10px; color: var(--text3); font-family: 'IBM Plex Mono', monospace; margin-top: 5px; }

/* ── CONTACTS ── */
.contacts-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(240px,1fr)); gap: 14px; }
.contact-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 18px; cursor: pointer; transition: all .15s;
}
.contact-card:hover { border-color: var(--border2); box-shadow: var(--shadow-sm); }
.contact-name { font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.contact-role { font-size: 10px; font-family: 'IBM Plex Mono', monospace; color: var(--text3); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px; }
.contact-info { font-size: 11px; color: var(--text2); line-height: 2; }

/* ── BILLING ── */
.invoice-status { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; }

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  .sidebar { display: none; }
  .grid-2, .grid-3, .grid-4, .form-grid-2 { grid-template-columns: 1fr; }
  .scroll-area { padding: 16px; }
  .topbar { padding: 0 16px; }
}
