/* PAC Sistema — app shell styles */
/* Built on top of tokens.css */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; overflow: hidden; }
body {
  background: var(--pac-off-white);
  color: var(--pac-black);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
#root { height: 100vh; width: 100vw; overflow: hidden; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }
a { color: inherit; }

/* ============ App shell ============ */
.app {
  display: grid;
  grid-template-columns: 232px 1fr;
  height: 100vh;
  width: 100vw;
}

/* ============ Sidebar ============ */
.sb {
  background: var(--pac-navy);
  color: rgba(255,255,255,.86);
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(0,0,0,.06);
}
.sb-brand {
  padding: 22px 22px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sb-brand img { height: 28px; width: auto; display: block; }
.sb-section {
  padding: 16px 18px 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: rgba(255,255,255,.42);
}
.sb-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 14px;
  margin: 1px 10px;
  border-radius: 4px;
  font-size: 13px;
  color: rgba(255,255,255,.78);
  cursor: pointer;
  transition: background 180ms cubic-bezier(.2,.6,.2,1), color 180ms;
  position: relative;
}
.sb-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.sb-item.active {
  background: rgba(255,255,255,.10);
  color: #fff;
}
.sb-item .ic { width: 16px; height: 16px; flex-shrink: 0; opacity: .85; }
.sb-item .count {
  margin-left: auto;
  font-size: 11px;
  color: rgba(255,255,255,.55);
  font-variant-numeric: tabular-nums;
}
.sb-item.active .count { color: var(--pac-neon); }

.sb-foot {
  margin-top: auto;
  padding: 16px 18px;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}
.sb-foot .av {
  width: 30px; height: 30px; border-radius: 999px;
  background: var(--pac-neon); color: var(--pac-dark-purple);
  display: grid; place-items: center;
  font-weight: 700; font-size: 11px;
}
.sb-foot .name { color: #fff; font-weight: 600; line-height: 1.2; }
.sb-foot .role { color: rgba(255,255,255,.5); font-size: 10.5px; }

/* ============ Main column ============ */
.main {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--pac-off-white);
}

/* Topbar */
.tb {
  height: 56px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  background: var(--pac-off-white);
  border-bottom: 1px solid var(--border);
}
.tb-crumb {
  font-size: 12.5px;
  color: var(--fg-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.tb-crumb b { color: var(--pac-navy); font-weight: 700; }
.tb-search {
  flex: 1;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  color: var(--fg-muted);
  cursor: text;
  font-size: 12.5px;
  transition: border-color 180ms, box-shadow 180ms;
}
.tb-search:hover { border-color: rgba(13,13,107,.25); }
.tb-search kbd {
  margin-left: auto;
  background: var(--pac-off-white);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 6px;
  font-size: 10.5px;
  color: var(--fg-muted);
  font-family: var(--font-sans);
}
.tb-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.tb-ic-btn {
  width: 34px; height: 34px;
  border: 0; background: transparent;
  border-radius: 4px;
  display: grid; place-items: center;
  color: var(--pac-navy);
  position: relative;
  transition: background 180ms;
}
.tb-ic-btn:hover { background: rgba(13,13,107,.06); }
.tb-ic-btn .dot {
  position: absolute; top: 8px; right: 8px;
  width: 7px; height: 7px; border-radius: 999px; background: var(--pac-neon);
  border: 1.5px solid var(--pac-off-white);
}

/* View */
.view {
  flex: 1;
  overflow: auto;
  position: relative;
}

/* ============ Generic ============ */
.eyebrow {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--pac-navy);
}
.eyebrow.muted { color: var(--fg-muted); }
.section-title { font-size: 14px; font-weight: 700; color: var(--pac-navy); letter-spacing: -.005em; }
.muted { color: var(--fg-muted); }
.divider { height: 1px; background: var(--border); border: 0; margin: 0; }

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.card.active { border-left: 2px solid var(--pac-neon); }

.av {
  width: 28px; height: 28px; border-radius: 999px;
  display: inline-grid; place-items: center;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.av.sm { width: 22px; height: 22px; font-size: 9.5px; }
.av.xs { width: 18px; height: 18px; font-size: 8.5px; }
.av.lg { width: 44px; height: 44px; font-size: 14px; }

.client-mark {
  width: 28px; height: 28px;
  border-radius: 4px;
  color: #fff;
  display: inline-grid; place-items: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  flex-shrink: 0;
}
.client-mark.sm { width: 22px; height: 22px; font-size: 9px; }
.client-mark.lg { width: 56px; height: 56px; font-size: 16px; border-radius: 6px; }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 9px;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--pac-navy);
  background: #fff;
  white-space: nowrap;
}
.chip.navy { background: var(--pac-navy); color: #fff; border-color: var(--pac-navy); }
.chip.neon { background: var(--pac-neon); color: var(--pac-dark-purple); border-color: var(--pac-neon); }
.chip.dark { background: var(--pac-dark-purple); color: var(--pac-neon); border-color: var(--pac-dark-purple); }
.chip.soft { background: rgba(13,13,107,.06); border-color: transparent; }
.chip .dot { width: 5px; height: 5px; border-radius: 999px; background: currentColor; }

.btn {
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--pac-navy);
  background: var(--pac-navy);
  color: #fff;
  border-radius: 4px;
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: background 180ms;
}
.btn:hover { background: #1a1a85; }
.btn.ghost { background: transparent; color: var(--pac-navy); }
.btn.ghost:hover { background: rgba(13,13,107,.06); }
.btn.neon { background: var(--pac-neon); border-color: var(--pac-neon); color: var(--pac-dark-purple); }
.btn.neon:hover { box-shadow: inset 0 -2px 0 var(--pac-navy); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn.icon { width: 34px; padding: 0; justify-content: center; }

.tab-row {
  display: flex; align-items: center; gap: 2px;
  border-bottom: 1px solid var(--border);
}
.tab {
  padding: 9px 14px;
  font-size: 12.5px;
  color: var(--fg-muted);
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
  font-weight: 600;
  letter-spacing: -.005em;
}
.tab:hover { color: var(--pac-navy); }
.tab.active { color: var(--pac-navy); }
.tab.active::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px;
  background: var(--pac-navy);
}

/* Priority dots / status indicators */
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 999px; }
.dot.alta { background: #C2253E; }
.dot.media { background: #D49A1A; }
.dot.baixa { background: #5C8C5E; }

/* Scrollbar */
.view::-webkit-scrollbar, .scroll::-webkit-scrollbar { width: 10px; height: 10px; }
.view::-webkit-scrollbar-track, .scroll::-webkit-scrollbar-track { background: transparent; }
.view::-webkit-scrollbar-thumb, .scroll::-webkit-scrollbar-thumb {
  background: rgba(13,13,107,.16);
  border-radius: 999px;
  border: 2px solid var(--pac-off-white);
  background-clip: content-box;
}
.view::-webkit-scrollbar-thumb:hover, .scroll::-webkit-scrollbar-thumb:hover { background: rgba(13,13,107,.32); background-clip: content-box; border: 2px solid var(--pac-off-white); }

/* ============ Dashboard ============ */
.dash {
  padding: 28px 32px 80px;
  max-width: 1400px;
  margin: 0 auto;
}
.dash-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 24px;
  gap: 24px;
}
.dash-head h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  color: var(--pac-navy);
  letter-spacing: -.01em;
}
.dash-head .sub { color: var(--fg-muted); font-size: 13px; margin-top: 2px; }
.dash-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  align-items: start;
}
.dash-col { display: flex; flex-direction: column; gap: 20px; }

.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.kpi {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 92px;
}
.kpi .lbl {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--fg-muted);
  font-weight: 600;
}
.kpi .val {
  font-size: 24px;
  font-weight: 700;
  color: var(--pac-navy);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
  line-height: 1;
}
.kpi .delta { font-size: 11px; color: var(--fg-muted); }
.kpi .delta.up { color: #2E6E40; }
.kpi .delta.down { color: #C2253E; }

.panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.panel-head {
  padding: 14px 18px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.panel-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--pac-navy);
  letter-spacing: -.005em;
}
.panel-head .right { display: flex; align-items: center; gap: 8px; }
.panel-body { padding: 14px 18px; }
.panel-body.tight { padding: 6px 0; }
.task-list { padding: 4px 0; }
.task-item { display: flex; align-items: center; gap: 10px; padding: 9px 18px; border-bottom: 1px solid var(--border); }
.task-item:last-child { border-bottom: 0; }

.list-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
  cursor: pointer;
  transition: background 180ms;
}
.list-row:last-child { border-bottom: 0; }
.list-row:hover { background: rgba(13,13,107,.03); }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .ttl { color: var(--pac-navy); font-weight: 600; }
.list-row .ttl .strike { text-decoration: line-through; color: var(--fg-muted); font-weight: 500; }
.list-row .meta { color: var(--fg-muted); font-size: 11.5px; margin-top: 2px; }
.list-row .right { display: flex; align-items: center; gap: 10px; color: var(--fg-muted); font-size: 11.5px; }

/* AI insight card */
.ai-insight {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.ai-insight:last-child { border-bottom: 0; }
.ai-insight .ic-w {
  width: 28px; height: 28px;
  border-radius: 4px;
  background: rgba(13,13,107,.06);
  display: grid; place-items: center;
  color: var(--pac-navy);
  flex-shrink: 0;
}
.ai-insight.alert .ic-w { background: rgba(194,37,62,.08); color: #C2253E; }
.ai-insight.opp .ic-w { background: rgba(200,255,0,.18); color: #4A5C00; }
.ai-insight.risk .ic-w { background: rgba(212,154,26,.12); color: #A06B00; }
.ai-insight .txt { font-size: 12px; line-height: 1.45; color: var(--pac-black); }
.ai-insight .lnk { font-size: 11px; color: var(--pac-navy); font-weight: 600; margin-top: 4px; display: inline-block; }

/* Revenue chart */
.spark {
  display: flex; align-items: flex-end; gap: 4px;
  height: 64px; padding: 0 18px 14px;
}
.spark .bar {
  flex: 1; background: var(--pac-navy);
  border-radius: 2px 2px 0 0;
  opacity: .15;
  transition: opacity 180ms;
}
.spark .bar.cur { opacity: 1; }
.spark .bar.up { background: var(--pac-neon); opacity: 1; }

/* Workload bar */
.wload {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 14px 18px;
}
.wload-row {
  display: grid;
  grid-template-columns: 130px 1fr 40px;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}
.wload-row .who { display: flex; align-items: center; gap: 8px; color: var(--pac-navy); font-weight: 600; }
.wload-row .bar-bg {
  position: relative;
  height: 6px; border-radius: 999px;
  background: rgba(13,13,107,.08);
  overflow: hidden;
}
.wload-row .bar-fl {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--pac-navy);
  border-radius: 999px;
}
.wload-row .bar-fl.over { background: #C2253E; }
.wload-row .num { font-variant-numeric: tabular-nums; color: var(--fg-muted); font-size: 11.5px; text-align: right; }

/* Activity feed */
.feed-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.feed-row:last-child { border-bottom: 0; }
.feed-row .av { margin-top: 1px; }
.feed-row .when { color: var(--fg-muted); font-size: 11px; margin-left: auto; flex-shrink: 0; }
.feed-row .who { font-weight: 700; color: var(--pac-navy); }
.feed-row .tgt { color: var(--pac-navy); font-weight: 600; }

/* ============ Kanban ============ */
.kb {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
.kb-head {
  padding: 20px 28px 14px;
  display: flex; align-items: center; gap: 16px;
  border-bottom: 1px solid var(--border);
  background: var(--pac-off-white);
}
.kb-head h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: var(--pac-navy);
  letter-spacing: -.01em;
}
.kb-head .count {
  font-size: 11px;
  color: var(--fg-muted);
  background: rgba(13,13,107,.06);
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 600;
}
.kb-filter {
  display: flex; align-items: center; gap: 8px;
  margin-left: auto;
}
.kb-board {
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 18px 28px 28px;
  display: flex;
  gap: 14px;
  scroll-snap-type: x proximity;
}
.kb-col {
  width: 286px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: rgba(13,13,107,.035);
  border-radius: 6px;
  border: 1px solid transparent;
  scroll-snap-align: start;
}
.kb-col.drag-over { background: rgba(200,255,0,.10); border-color: var(--pac-neon); }
.kb-col-head {
  padding: 12px 14px 10px;
  display: flex; align-items: center; gap: 8px;
  position: sticky; top: 0;
}
.kb-col-head .lbl { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--pac-navy); }
.kb-col-head .num { font-size: 10.5px; color: var(--fg-muted); font-variant-numeric: tabular-nums; }
.kb-col-head .swatch { width: 8px; height: 8px; border-radius: 999px; background: var(--pac-navy); opacity: .35; }
.kb-col-list {
  padding: 0 10px 10px;
  display: flex; flex-direction: column; gap: 8px;
  flex: 1;
  overflow-y: auto;
}
.kb-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 11px 12px;
  cursor: grab;
  user-select: none;
  display: flex; flex-direction: column; gap: 8px;
  transition: box-shadow 180ms, transform 90ms, border-color 180ms;
  position: relative;
}
.kb-card:hover { border-color: rgba(13,13,107,.22); box-shadow: 0 2px 8px rgba(13,13,107,.05); }
.kb-card:active { cursor: grabbing; }
.kb-card.dragging { opacity: .35; }
.kb-card .ttl {
  font-size: 13px;
  font-weight: 600;
  color: var(--pac-navy);
  line-height: 1.3;
  letter-spacing: -.005em;
}
.kb-card .meta-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.kb-card .meta-row.bottom {
  margin-top: 2px; padding-top: 8px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.kb-card .ic-meta { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--fg-muted); }
.kb-card .ic-meta svg { display: block; }
.kb-card .priority-bar {
  position: absolute; left: 0; top: 8px; bottom: 8px;
  width: 2px; border-radius: 999px;
}
.kb-card .priority-bar.alta { background: #C2253E; }
.kb-card .priority-bar.media { background: #D49A1A; }
.kb-card .priority-bar.baixa { background: transparent; }
.kb-card .tag-mini {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(13,13,107,.06);
  color: var(--pac-navy);
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.kb-card .progress-mini {
  flex: 1;
  height: 3px; border-radius: 999px;
  background: rgba(13,13,107,.08);
  overflow: hidden;
}
.kb-card .progress-mini > div {
  height: 100%; background: var(--pac-navy);
  border-radius: 999px;
}

/* Task timer */
.timer {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px 0 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
  background: rgba(13,13,107,.06);
  color: var(--pac-navy);
  border: 0;
  cursor: pointer;
  transition: background 180ms;
  white-space: nowrap;
}
.timer:hover { background: rgba(13,13,107,.12); }
.timer .play-ic {
  width: 14px; height: 14px;
  border-radius: 999px;
  display: grid; place-items: center;
  color: var(--pac-navy);
}
.timer.running {
  background: var(--pac-dark-purple);
  color: var(--pac-neon);
}
.timer.running:hover { background: #2a1547; }
.timer.running .play-ic { color: var(--pac-neon); }
.timer.running .live-dot {
  width: 6px; height: 6px;
  border-radius: 999px;
  background: var(--pac-neon);
  box-shadow: 0 0 0 0 rgba(200,255,0,.6);
  animation: timer-pulse 1.6s ease-out infinite;
}
@keyframes timer-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(200,255,0,.7); }
  70%  { box-shadow: 0 0 0 6px rgba(200,255,0,0); }
  100% { box-shadow: 0 0 0 0 rgba(200,255,0,0); }
}
.timer.idle { color: var(--fg-muted); background: transparent; padding-left: 0; }
.timer.idle:hover { background: rgba(13,13,107,.06); padding-left: 6px; color: var(--pac-navy); }

/* Kanban — list/row mode */
.kb.rows .kb-board { flex-direction: column; gap: 0; padding: 0 28px 28px; overflow-x: visible; overflow-y: auto; }
.kb.rows .kb-col { width: 100%; background: transparent; border: 0; }
.kb.rows .kb-col-head { padding: 18px 0 8px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.kb.rows .kb-col-list { display: grid; grid-template-columns: 1fr; gap: 0; padding: 0; }
.kb.rows .kb-card {
  display: grid; grid-template-columns: 1.6fr 140px 100px 90px 110px 28px;
  align-items: center; gap: 14px;
  border-radius: 0; border: 0; border-bottom: 1px solid var(--border);
  padding: 10px 12px;
}
.kb.rows .kb-card .meta-row { display: contents; }
.kb.rows .kb-card .meta-row.bottom { display: contents; border: 0; padding: 0; margin: 0; }
.kb.rows .kb-card .priority-bar { top: 0; bottom: 0; }

/* Floating add */
.fab {
  position: fixed;
  right: 28px; bottom: 28px;
  height: 48px; padding: 0 18px;
  border-radius: 999px;
  background: var(--pac-navy);
  color: #fff;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600;
  border: 0;
  box-shadow: 0 8px 24px rgba(13,13,107,.20);
  z-index: 20;
  transition: transform 180ms, box-shadow 180ms;
}
.fab:hover { transform: translateY(-1px); box-shadow: 0 12px 32px rgba(13,13,107,.28); }

/* ============ CRM client ============ */
.crm {
  display: grid;
  grid-template-columns: 280px 1fr;
  height: 100%;
  overflow: hidden;
}
.crm-list {
  border-right: 1px solid var(--border);
  background: #fff;
  display: flex;
  flex-direction: column;
}
.crm-list-head { padding: 18px 18px 10px; display: flex; flex-direction: column; gap: 8px; border-bottom: 1px solid var(--border); }
.crm-list-head h2 { margin: 0; font-size: 16px; color: var(--pac-navy); font-weight: 700; }
.crm-list-search {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--pac-off-white);
  font-size: 12px;
  color: var(--fg-muted);
}
.crm-list-search input { border: 0; background: transparent; outline: 0; flex: 1; font-size: 12px; color: var(--pac-black); }
.crm-list-body { overflow-y: auto; flex: 1; }
.crm-list-item {
  padding: 12px 18px;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 180ms;
}
.crm-list-item:hover { background: rgba(13,13,107,.03); }
.crm-list-item.active { background: rgba(13,13,107,.06); border-left: 2px solid var(--pac-neon); padding-left: 16px; }
.crm-list-item .nm { font-size: 12.5px; font-weight: 600; color: var(--pac-navy); line-height: 1.25; }
.crm-list-item .sub { font-size: 11px; color: var(--fg-muted); margin-top: 1px; }

.crm-detail {
  overflow-y: auto;
  background: var(--pac-off-white);
}
.crm-detail-head {
  padding: 28px 32px 20px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.crm-detail-head .top { display: flex; align-items: flex-start; gap: 18px; }
.crm-detail-head h1 { margin: 0; font-size: 22px; color: var(--pac-navy); font-weight: 700; letter-spacing: -.01em; }
.crm-detail-head .meta-line { color: var(--fg-muted); font-size: 12.5px; margin-top: 4px; }
.crm-detail-tabs { padding: 14px 32px 0; background: #fff; border-bottom: 1px solid var(--border); }
.crm-detail-body { padding: 24px 32px 80px; max-width: 1100px; }
.crm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.crm-field { display: flex; flex-direction: column; gap: 3px; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.crm-field .lbl { font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--fg-muted); font-weight: 700; }
.crm-field .val { font-size: 13px; color: var(--pac-black); }

/* AI memory chat */
.ai-chat {
  background: var(--pac-dark-purple);
  color: #fff;
  border-radius: 6px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ai-chat .head { display: flex; align-items: center; gap: 10px; }
.ai-chat .head .ttl { font-size: 13px; font-weight: 700; }
.ai-chat .head .sub { color: rgba(255,255,255,.5); font-size: 11px; }
.ai-chat .bubble {
  font-size: 12.5px;
  line-height: 1.5;
  background: rgba(255,255,255,.06);
  border-radius: 4px;
  padding: 12px 14px;
  border-left: 2px solid var(--pac-neon);
}
.ai-chat .bubble .you { color: rgba(255,255,255,.5); font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 4px; }
.ai-chat .bubble strong { color: var(--pac-neon); font-weight: 600; }
.ai-chat .composer {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.08);
  border-radius: 4px;
  padding: 10px 14px;
}
.ai-chat .composer input { flex: 1; background: transparent; border: 0; outline: 0; color: #fff; font-size: 12.5px; }
.ai-chat .composer input::placeholder { color: rgba(255,255,255,.45); }
.ai-chat .composer .send {
  background: var(--pac-neon); color: var(--pac-dark-purple);
  width: 28px; height: 28px; border-radius: 4px;
  display: grid; place-items: center; border: 0;
}
.ai-chat .suggestion {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,.06);
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  color: rgba(255,255,255,.85);
  cursor: pointer;
}
.ai-chat .suggestion:hover { background: rgba(255,255,255,.12); }

/* ============ Case workspace ============ */
.cw {
  display: grid;
  grid-template-columns: 280px 1fr 340px;
  height: 100%;
  overflow: hidden;
}
.cw.ai-floating { grid-template-columns: 280px 1fr; }
.cw-left, .cw-right { background: #fff; border-right: 1px solid var(--border); overflow-y: auto; }
.cw-right { border-right: 0; border-left: 1px solid var(--border); }
.cw-mid { overflow-y: auto; padding: 24px 32px 80px; }
.cw-left { padding: 22px 22px 40px; }

.cw-left h2 { margin: 0 0 6px; font-size: 16px; color: var(--pac-navy); font-weight: 700; letter-spacing: -.005em; line-height: 1.25; }
.cw-left .pn { font-size: 11px; color: var(--fg-muted); letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.cw-left .field { display: flex; flex-direction: column; gap: 4px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.cw-left .field .lbl { font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--fg-muted); font-weight: 700; }
.cw-left .field .val { font-size: 12.5px; color: var(--pac-black); }

.cw-mid h1 { margin: 0 0 6px; font-size: 22px; color: var(--pac-navy); font-weight: 700; letter-spacing: -.01em; }
.cw-mid .sub { color: var(--fg-muted); font-size: 13px; margin-bottom: 22px; }

.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ''; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 1px; background: var(--border); }
.tl-item { position: relative; padding-bottom: 18px; }
.tl-item::before {
  content: ''; position: absolute; left: -24px; top: 6px;
  width: 9px; height: 9px; border-radius: 999px;
  background: #fff; border: 2px solid var(--pac-navy);
}
.tl-item.neon::before { background: var(--pac-neon); border-color: var(--pac-navy); }
.tl-item .when { font-size: 11px; color: var(--fg-muted); text-transform: uppercase; letter-spacing: .12em; font-weight: 600; }
.tl-item .ttl { font-size: 13.5px; color: var(--pac-navy); font-weight: 600; margin: 2px 0 4px; }
.tl-item .body { font-size: 12.5px; color: var(--pac-black); line-height: 1.5; }
.tl-item .att {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--pac-off-white);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 8px 12px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--pac-navy);
  font-weight: 600;
}

.cw-right { padding: 22px 22px 40px; background: var(--pac-dark-purple); color: #fff; border-left: 0; }
.cw-right h3 { margin: 0; font-size: 13px; color: #fff; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.cw-right h3 .sub { color: rgba(255,255,255,.5); font-weight: 500; font-size: 11px; margin-left: auto; }
.cw-right .prompt {
  background: rgba(255,255,255,.06);
  border-radius: 4px;
  padding: 12px 14px;
  font-size: 12.5px;
  line-height: 1.5;
  border-left: 2px solid var(--pac-neon);
}
.cw-right .quick {
  display: flex; flex-direction: column; gap: 6px;
  margin-top: 10px;
}
.cw-right .quick button {
  text-align: left;
  background: transparent;
  color: rgba(255,255,255,.85);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 4px;
  padding: 9px 11px;
  font-size: 12px;
  font-weight: 500;
  display: flex; align-items: center; gap: 8px;
  transition: background 180ms, border-color 180ms;
}
.cw-right .quick button:hover { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.20); }
.cw-right .composer {
  margin-top: 16px;
  background: rgba(255,255,255,.08);
  border-radius: 4px;
  padding: 10px 12px;
  display: flex; align-items: center; gap: 8px;
}
.cw-right .composer input { flex: 1; background: transparent; border: 0; outline: 0; color: #fff; font-size: 12.5px; }
.cw-right .composer input::placeholder { color: rgba(255,255,255,.45); }

/* AI floating panel */
.ai-floating-btn {
  position: fixed; right: 28px; bottom: 28px;
  z-index: 30;
  width: 52px; height: 52px;
  border-radius: 999px;
  background: var(--pac-dark-purple);
  color: var(--pac-neon);
  border: 0;
  display: grid; place-items: center;
  box-shadow: 0 8px 24px rgba(26,10,46,.30);
  cursor: pointer;
}
.ai-floating-panel {
  position: fixed; right: 28px; bottom: 92px;
  z-index: 30;
  width: 360px;
  max-height: 540px;
  background: var(--pac-dark-purple);
  color: #fff;
  border-radius: 8px;
  box-shadow: 0 24px 64px rgba(26,10,46,.40);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ============ Calendar ============ */
.cal {
  padding: 24px 28px 60px;
  max-width: 1400px;
  margin: 0 auto;
}
.cal-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.cal-head h1 { margin: 0; font-size: 22px; color: var(--pac-navy); font-weight: 700; letter-spacing: -.01em; }
.cal-head .ctl { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.cal-seg {
  display: flex; align-items: center; gap: 0;
  border: 1px solid var(--border); border-radius: 4px;
  overflow: hidden; background: #fff;
}
.cal-seg button {
  border: 0; background: transparent; padding: 7px 14px;
  font-size: 12px; color: var(--fg-muted); font-weight: 600;
}
.cal-seg button.active { background: var(--pac-navy); color: #fff; }
.cal-seg button + button { border-left: 1px solid var(--border); }
.cal-seg button.active + button { border-left-color: var(--pac-navy); }

.cal-week-grid {
  display: grid;
  grid-template-columns: 60px repeat(5, 1fr);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.cal-col-head {
  padding: 12px 14px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-size: 11px; text-transform: uppercase; letter-spacing: .12em;
  color: var(--fg-muted); font-weight: 700;
  display: flex; flex-direction: column; gap: 2px;
}
.cal-col-head .num { font-size: 18px; color: var(--pac-navy); font-weight: 700; letter-spacing: 0; text-transform: none; line-height: 1; }
.cal-col-head.today .num { color: var(--pac-navy); }
.cal-col-head.today { background: rgba(200,255,0,.10); }

.cal-time { position: relative; border-right: 1px solid var(--border); }
.cal-time-cell {
  height: 56px;
  border-bottom: 1px solid var(--border);
  font-size: 10.5px;
  text-align: right;
  padding: 4px 8px 0 0;
  color: var(--fg-muted);
  letter-spacing: .04em;
}
.cal-day { position: relative; border-right: 1px solid var(--border); min-height: 560px; }
.cal-day:last-child { border-right: 0; }
.cal-day-cell { height: 56px; border-bottom: 1px solid var(--border); }
.cal-event {
  position: absolute;
  left: 4px; right: 4px;
  border-radius: 4px;
  padding: 6px 8px;
  font-size: 11px;
  line-height: 1.3;
  color: #fff;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(13,13,107,.10);
  transition: transform 180ms, box-shadow 180ms;
}
.cal-event:hover { transform: translateX(1px); box-shadow: 0 3px 8px rgba(13,13,107,.18); }
.cal-event.meeting { background: var(--pac-navy); }
.cal-event.hearing { background: #C2253E; }
.cal-event.deadline { background: var(--pac-dark-purple); }
.cal-event.signing { background: var(--pac-neon); color: var(--pac-dark-purple); }
.cal-event.internal { background: rgba(13,13,107,.85); }
.cal-event .ev-time { font-size: 10px; opacity: .85; margin-top: 2px; }

.cal-now {
  position: absolute; left: 0; right: 0;
  height: 1.5px; background: #C2253E;
  z-index: 5;
}
.cal-now::before {
  content: ''; position: absolute; left: -4px; top: -3px;
  width: 8px; height: 8px; border-radius: 999px; background: #C2253E;
}

/* Monthly mini calendar */
.cal-month-mini {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 18px;
}
.cal-month-mini h4 { margin: 0 0 12px; font-size: 13px; color: var(--pac-navy); font-weight: 700; }
.cal-month-mini .grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  font-size: 11px; gap: 1px;
}
.cal-month-mini .dow { color: var(--fg-muted); text-align: center; padding: 6px 0; font-weight: 600; }
.cal-month-mini .d {
  text-align: center; padding: 6px 0;
  border-radius: 4px;
  color: var(--pac-black);
  cursor: pointer;
  font-variant-numeric: tabular-nums;
  position: relative;
}
.cal-month-mini .d.off { color: rgba(0,0,0,.25); }
.cal-month-mini .d.today { background: var(--pac-navy); color: #fff; font-weight: 700; }
.cal-month-mini .d.has::after {
  content: ''; position: absolute; left: 50%; bottom: 2px;
  transform: translateX(-50%);
  width: 3px; height: 3px; border-radius: 999px; background: var(--pac-neon);
}
.cal-month-mini .d.today.has::after { background: var(--pac-neon); }

/* ============ Modals & drawers ============ */
.scrim {
  position: fixed; inset: 0; background: rgba(26,10,46,.40);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  z-index: 100;
  display: grid; place-items: center;
  animation: fade 180ms cubic-bezier(.2,.6,.2,1);
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--pac-off-white);
  width: 864px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(26,10,46,.30);
  display: flex; flex-direction: column;
  animation: pop 220ms cubic-bezier(.2,.6,.2,1);
}
@keyframes pop {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-head { padding: 18px 22px 14px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--border); background: #fff; }
.modal-head h2 { margin: 0; font-size: 17px; color: var(--pac-navy); font-weight: 700; letter-spacing: -.005em; }
.modal-head .x { margin-left: auto; width: 32px; height: 32px; border: 0; background: transparent; color: var(--fg-muted); border-radius: 4px; display: grid; place-items: center; }
.modal-head .x:hover { background: rgba(13,13,107,.06); color: var(--pac-navy); }
.modal-body { padding: 22px; overflow-y: auto; flex: 1; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--border); background: #fff; display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* Drop zone */
.drop {
  border: 1.5px dashed rgba(13,13,107,.30);
  border-radius: 6px;
  padding: 28px;
  text-align: center;
  background: #fff;
  transition: border-color 180ms, background 180ms;
}
.drop.over { border-color: var(--pac-neon); background: rgba(200,255,0,.06); }
.drop .ttl { font-size: 14px; color: var(--pac-navy); font-weight: 600; margin-top: 10px; }
.drop .sub { font-size: 12px; color: var(--fg-muted); margin-top: 4px; }
.drop .types { display: flex; justify-content: center; gap: 8px; margin-top: 14px; font-size: 11px; color: var(--fg-muted); }

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.field-w { display: flex; flex-direction: column; gap: 5px; }
.field-w label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; color: var(--pac-navy); }
.field-w select, .field-w input {
  font: inherit; font-size: 13px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  color: var(--pac-black);
  outline: 0;
}
.field-w select:focus, .field-w input:focus {
  border-color: var(--pac-navy);
  box-shadow: 0 0 0 3px rgba(13,13,107,.10);
}
.ai-suggest {
  background: rgba(200,255,0,.10);
  border: 1px solid rgba(13,13,107,.10);
  border-left: 2px solid var(--pac-neon);
  border-radius: 4px;
  padding: 10px 12px;
  font-size: 12px;
  color: var(--pac-black);
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.ai-suggest .acc { color: var(--pac-navy); font-weight: 700; cursor: pointer; }

/* Drawer */
.drawer {
  position: fixed;
  top: 0; right: 0;
  width: 480px; height: 100vh;
  background: var(--pac-off-white);
  box-shadow: -24px 0 64px rgba(26,10,46,.20);
  z-index: 100;
  display: flex; flex-direction: column;
  animation: slide 240ms cubic-bezier(.2,.6,.2,1);
}
@keyframes slide { from { transform: translateX(40px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Command palette */
.cmdk {
  width: 640px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 24px 64px rgba(26,10,46,.30);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 70vh;
}
.cmdk-input {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.cmdk-input input {
  flex: 1; border: 0; outline: 0; background: transparent;
  font-size: 16px; color: var(--pac-navy);
}
.cmdk-input input::placeholder { color: rgba(13,13,107,.40); }
.cmdk-list { overflow-y: auto; padding: 8px 0; }
.cmdk-group-lbl { padding: 8px 20px 4px; font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--fg-muted); font-weight: 700; }
.cmdk-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 20px;
  font-size: 13px;
  cursor: pointer;
  color: var(--pac-black);
}
.cmdk-item:hover, .cmdk-item.sel { background: rgba(13,13,107,.06); }
.cmdk-item .ic { width: 18px; height: 18px; color: var(--fg-muted); }
.cmdk-item .grow { flex: 1; }
.cmdk-item .kbd { font-size: 10px; color: var(--fg-muted); border: 1px solid var(--border); padding: 1px 6px; border-radius: 3px; }
.cmdk-foot {
  padding: 9px 20px; border-top: 1px solid var(--border);
  font-size: 11px; color: var(--fg-muted);
  display: flex; align-items: center; gap: 16px;
}
.cmdk-foot kbd { background: var(--pac-off-white); border: 1px solid var(--border); padding: 1px 6px; border-radius: 3px; font-family: inherit; font-size: 10.5px; }
.cmdk-ai {
  background: linear-gradient(135deg, rgba(13,13,107,.04), rgba(26,10,46,.04));
  border-radius: 4px;
  margin: 4px 16px 8px;
  padding: 10px 12px;
  font-size: 12px;
  color: var(--pac-black);
  border-left: 2px solid var(--pac-neon);
}

/* ============ Reports builder ============ */
.rep {
  display: grid;
  grid-template-columns: 360px 1fr;
  height: 100%;
  overflow: hidden;
}
.rep-cfg { background: #fff; border-right: 1px solid var(--border); overflow-y: auto; padding: 24px 24px 60px; }
.rep-cfg h2 { margin: 0; font-size: 16px; color: var(--pac-navy); font-weight: 700; }
.rep-cfg .sub { font-size: 12px; color: var(--fg-muted); margin: 4px 0 22px; }
.rep-cfg .group { margin-bottom: 20px; }
.rep-cfg .group .lbl { font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--fg-muted); font-weight: 700; margin-bottom: 8px; }
.rep-template {
  display: flex; flex-direction: column; gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  margin-bottom: 6px;
  background: #fff;
  transition: border-color 180ms, background 180ms;
}
.rep-template:hover { border-color: rgba(13,13,107,.25); }
.rep-template.sel { border-color: var(--pac-navy); border-left-width: 2px; background: rgba(13,13,107,.02); }
.rep-template .nm { font-size: 13px; color: var(--pac-navy); font-weight: 600; }
.rep-template .ds { font-size: 11.5px; color: var(--fg-muted); }
.rep-toggle { display: flex; align-items: center; justify-content: space-between; padding: 7px 0; font-size: 12.5px; }
.rep-toggle .label { color: var(--pac-black); }
.rep-toggle .sw {
  width: 32px; height: 18px;
  background: rgba(13,13,107,.20);
  border-radius: 999px; position: relative;
  cursor: pointer; transition: background 180ms;
}
.rep-toggle .sw::after {
  content: ''; position: absolute; left: 2px; top: 2px;
  width: 14px; height: 14px; border-radius: 999px;
  background: #fff;
  transition: left 180ms;
}
.rep-toggle .sw.on { background: var(--pac-navy); }
.rep-toggle .sw.on::after { left: 16px; }

.rep-preview { background: var(--pac-off-white); overflow-y: auto; padding: 32px; display: flex; justify-content: center; }
.rep-page {
  width: 720px;
  min-height: 1020px;
  background: #fff;
  padding: 64px 64px 72px;
  box-shadow: 0 8px 32px rgba(13,13,107,.10);
  position: relative;
  font-size: 11px;
}
.rep-page h1 { margin: 0 0 4px; font-size: 22px; color: var(--pac-navy); font-weight: 700; letter-spacing: -.01em; }
.rep-page h2 { font-size: 12px; color: var(--pac-navy); font-weight: 700; text-transform: uppercase; letter-spacing: .14em; border-bottom: 2px solid var(--pac-navy); padding-bottom: 6px; margin-top: 28px; margin-bottom: 12px; }
.rep-page .meta { color: var(--fg-muted); font-size: 11px; margin: 4px 0 18px; }
.rep-page .ex {
  background: rgba(13,13,107,.04);
  border-left: 2px solid var(--pac-neon);
  padding: 14px 18px;
  font-size: 12px;
  line-height: 1.55;
  margin: 14px 0;
}
.rep-page p { line-height: 1.55; color: var(--pac-black); margin: 6px 0; font-size: 11.5px; }
.rep-page .stat-row { display: flex; gap: 24px; margin: 10px 0 16px; }
.rep-page .stat-row .s .n { font-size: 18px; color: var(--pac-navy); font-weight: 700; letter-spacing: -.01em; }
.rep-page .stat-row .s .l { font-size: 10px; color: var(--fg-muted); text-transform: uppercase; letter-spacing: .12em; font-weight: 600; }
.rep-page .rep-logo { position: absolute; top: 36px; right: 64px; height: 24px; }
.rep-page .rep-foot { position: absolute; bottom: 36px; left: 64px; right: 64px; font-size: 10px; color: var(--fg-muted); display: flex; justify-content: space-between; border-top: 1px solid var(--border); padding-top: 8px; }

/* ============ Notifications ============ */
.notif-pop {
  position: absolute;
  top: 50px; right: 16px;
  width: 360px;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 24px 64px rgba(26,10,46,.18);
  border: 1px solid var(--border);
  z-index: 50;
  overflow: hidden;
  animation: pop 220ms cubic-bezier(.2,.6,.2,1);
}
.notif-pop .head { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.notif-pop .head h4 { margin: 0; font-size: 13px; color: var(--pac-navy); font-weight: 700; }
.notif-item { padding: 12px 16px; display: flex; gap: 10px; border-bottom: 1px solid var(--border); cursor: pointer; font-size: 12px; }
.notif-item:hover { background: rgba(13,13,107,.03); }
.notif-item:last-child { border-bottom: 0; }
.notif-item .av { margin-top: 2px; }
.notif-item .ttl { color: var(--pac-navy); font-weight: 600; }
.notif-item .ts { color: var(--fg-muted); font-size: 11px; margin-top: 1px; }
.notif-item.unread { background: rgba(200,255,0,.05); }
.notif-item.unread::before { content: ''; display: block; width: 5px; height: 5px; border-radius: 999px; background: var(--pac-neon); margin-top: 6px; flex-shrink: 0; }

/* Empty state */
.empty { padding: 60px 28px; text-align: center; color: var(--fg-muted); }
.empty .icon { width: 48px; height: 48px; margin: 0 auto 12px; opacity: .35; color: var(--pac-navy); }
.empty .ttl { font-size: 15px; color: var(--pac-navy); font-weight: 700; margin-bottom: 4px; }
.empty .ds { font-size: 12px; }

/* ============================================================
   Mobile — max-width 768px
   ============================================================ */

/* Slide-up para modais em telas pequenas */
@keyframes slide-up-mobile {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* Hamburger — oculto no desktop, aparece no mobile */
.tb-hamburger { display: none !important; }

@media (max-width: 768px) {

  /* ── App grid ── */
  .app { grid-template-columns: 1fr; }

  /* ── Sidebar: drawer deslizante ── */
  .sb {
    position: fixed;
    left: 0; top: 0; bottom: 0; height: 100dvh;
    width: 280px;
    z-index: 300;
    transform: translateX(-100%);
    transition: transform 220ms cubic-bezier(.2,.6,.2,1);
    will-change: transform;
  }
  .sb.open {
    transform: translateX(0);
    box-shadow: 8px 0 48px rgba(0,0,0,.35);
  }

  /* ── Hamburger ── */
  .tb-hamburger { display: grid !important; }

  /* ── Topbar ── */
  .tb { padding: 0 12px; gap: 8px; height: 52px; }
  .tb-crumb { display: none; }
  .tb-search { max-width: none; flex: 1; padding: 6px 10px; font-size: 12px; }
  .tb-search span { display: none; }
  .tb-search kbd { display: none; }

  /* ── Login ── */
  .login-layout { grid-template-columns: 1fr !important; }
  .login-brand  { display: none !important; }
  .login-form   { padding: 40px 24px !important; }

  /* ── Dashboard ── */
  .dash { padding: 16px 14px 100px; }
  .dash-head { margin-bottom: 14px; flex-direction: column; align-items: flex-start; }
  .dash-head h1 { font-size: 20px; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .dash-grid { grid-template-columns: 1fr; }

  /* ── Kanban ── */
  .kb-head { padding: 12px 14px 10px; flex-wrap: wrap; gap: 8px; }
  .kb-filter { margin-left: 0; width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
  .kb-board { padding: 12px 14px 80px; }

  /* ── Calendário ── */
  .cal { padding: 14px 12px 80px; }
  .cal-head { flex-wrap: wrap; row-gap: 8px; }
  .cal-head h1 { font-size: 18px; }
  .cal-head .ctl {
    margin-left: 0;
    width: 100%;
    overflow-x: auto;
    flex-shrink: 0;
    padding-bottom: 2px;
  }

  /* ── CRM / Clientes ── */
  .crm { grid-template-columns: 1fr; height: auto; min-height: 100%; }
  .crm-list { max-height: 44vh; border-right: 0; border-bottom: 1px solid var(--border); }
  .crm-detail-head { padding: 18px 16px 12px; }
  .crm-detail-tabs { padding: 10px 16px 0; }
  .crm-detail-body { padding: 16px 16px 80px; }
  .crm-grid { grid-template-columns: 1fr; }

  /* ── Casos (workspace 3 colunas) ── */
  .cw { grid-template-columns: 1fr; height: auto; }
  .cw.ai-floating { grid-template-columns: 1fr; }
  .cw-left {
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding: 18px 16px 24px;
  }
  .cw-mid { padding: 18px 16px 80px; }
  .cw-right {
    border-left: 0;
    border-top: 1px solid var(--border);
    padding: 18px 16px 80px;
  }

  /* ── Relatórios ── */
  .rep { grid-template-columns: 1fr; height: auto; }
  .rep-preview { padding: 16px; }
  .rep-page { width: 100%; min-width: 0; padding: 32px 20px; }

  /* ── Modais ── */
  .modal { max-width: calc(100vw - 16px); }
  .modal-body { padding: 16px; }
  .modal-head { padding: 14px 16px 12px; }
  .modal-foot { padding: 12px 16px; }

  /* ── Drawer (upload etc.) ── */
  .drawer { width: 100%; }

  /* ── FAB ── */
  .fab { right: 16px; bottom: 20px; }
}

/* ── Telas muito pequenas (< 480px) ── */
@media (max-width: 480px) {
  /* Modal sobe da base da tela */
  .scrim { align-items: flex-end; }
  .modal {
    max-width: 100vw;
    border-radius: 12px 12px 0 0;
    max-height: 92vh;
    animation: slide-up-mobile 220ms cubic-bezier(.2,.6,.2,1);
  }
  .cmdk {
    width: 100vw;
    border-radius: 0;
    max-height: 80vh;
  }
  /* KPIs em 2 colunas mesmo em telas pequenas */
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
}
