:root {
  --bg: #060b10;
  --bg-elev: #0b141b;
  --bg-card: #0f1b24;
  --bg-card-hover: #14232e;
  --border: rgba(229, 184, 105, 0.18);
  --border-soft: rgba(255, 255, 255, 0.08);
  --gold: #e5b869;
  --gold-bright: #f6d79a;
  --teal: #4ecdc4;
  --emerald: #10b981;
  --amber: #f59e0b;
  --danger: #ef4444;
  --text: #eef3f5;
  --text-muted: #8ea1a8;
  --font-sans: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-display: "Outfit", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* Scrollbars elegantes Obsidian & Gold (elimina barra branca grossa do Windows) */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(7, 13, 17, 0.5); }
::-webkit-scrollbar-thumb { background: rgba(229, 184, 105, 0.28); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(229, 184, 105, 0.55); }

html, body {
  background: radial-gradient(circle at 20% 0%, #0d1d26 0%, var(--bg) 55%);
  color: var(--text);
  font-family: var(--font-sans);
  height: 100%;
  overflow: hidden;
}

.hidden { display: none !important; }
.gold { color: var(--gold); }
.full-w { width: 100%; }

.app-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.workspace-body {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.left-rail {
  width: 58px;
  background: rgba(8, 15, 20, 0.94);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 8px;
  gap: 6px;
  flex-shrink: 0;
  overflow-y: auto;
  overflow-x: hidden;
  transition: width 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.left-rail.is-expanded {
  width: 210px;
  align-items: stretch;
  padding: 10px 10px;
}

.rail-btn {
  width: 40px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 16px;
  font-family: var(--font-sans);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.16s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.left-rail.is-expanded .rail-btn {
  width: 100%;
  justify-content: flex-start;
  padding: 0 11px;
}

.rail-ico {
  width: 22px;
  text-align: center;
  flex-shrink: 0;
  font-size: 16px;
}

.rail-lbl {
  display: none;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
}

.left-rail.is-expanded .rail-lbl {
  display: inline;
}

.rail-toggle {
  color: var(--gold);
  border-color: rgba(229, 184, 105, 0.22);
  background: rgba(229, 184, 105, 0.06);
}

.topbar-right button { white-space: nowrap; }

.rail-btn:hover {
  background: rgba(229, 184, 105, 0.12);
  color: var(--gold-bright);
  border-color: rgba(229, 184, 105, 0.28);
}

.rail-btn.is-active {
  background: linear-gradient(135deg, rgba(229, 184, 105, 0.24), rgba(201, 150, 62, 0.14));
  color: var(--gold-bright);
  border-color: rgba(229, 184, 105, 0.55);
  box-shadow: 0 0 12px rgba(229, 184, 105, 0.18);
}

.rail-sep {
  width: 100%;
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

.workspace-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@media (max-width: 820px) {
  .left-rail { width: 46px; padding: 8px 4px; }
  .rail-btn { width: 34px; height: 34px; font-size: 15px; }
}

/* CLARIX 3D HOLOGRAPHIC STAGE & EDITORIAL HUB HERO */
.hub-hero-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1.15fr) minmax(260px, 0.85fr);
  gap: 24px;
  align-items: center;
  margin-bottom: 22px;
  padding: 24px 28px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(13, 25, 34, 0.92), rgba(7, 13, 18, 0.96));
  border: 1px solid rgba(229, 184, 105, 0.22);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(246, 215, 154, 0.12);
}

.hub-hero-grid .hub-hero {
  text-align: left;
  margin-bottom: 0;
}

.hub-hero-grid .hub-hero h1 {
  font-size: clamp(24px, 2.8vw, 36px);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.clarix-hub-stage {
  position: relative;
  width: 100%;
  height: 280px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(78, 205, 196, 0.28);
  background: radial-gradient(circle at 50% 45%, rgba(14, 165, 233, 0.14), rgba(6, 11, 16, 0.95) 75%);
  box-shadow: inset 0 0 38px rgba(78, 205, 196, 0.08);
}

.clarix-hub-stage::after {
  content: "SIMPLIFIQUE IA · ASSISTENTE ATIVO";
  position: absolute;
  bottom: 10px;
  right: 12px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: rgba(246, 215, 154, 0.88);
  background: rgba(6, 11, 16, 0.72);
  border: 1px solid rgba(229, 184, 105, 0.35);
  padding: 3px 8px;
  border-radius: 999px;
  pointer-events: none;
}

.hub-robot-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 54% 28%;
  display: block;
}

.hub-sound-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  background: rgba(6, 11, 16, 0.72);
  border: 1px solid rgba(229, 184, 105, 0.35);
  color: var(--gold-bright);
  width: 30px;
  height: 30px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
}

@media (max-width: 900px) {
  .hub-hero-grid { grid-template-columns: 1fr; padding: 18px; }
  .clarix-hub-stage { height: 220px; }
}

/* TOPBAR */
.topbar {
  height: 60px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: rgba(8, 15, 20, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  flex-shrink: 0;
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  object-fit: cover;
  border: 1px solid rgba(229, 184, 105, 0.45);
  box-shadow: 0 0 14px rgba(229, 184, 105, 0.22);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-display); font-size: 14px; font-weight: 700; letter-spacing: 0.12em; }
.brand-sub { font-size: 10px; color: var(--text-muted); letter-spacing: 0.04em; }

.module-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-soft);
  padding: 4px;
  border-radius: 11px;
}

.mod-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  padding: 7px 13px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.16s;
  white-space: nowrap;
}
.mod-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.mod-btn.is-active {
  background: rgba(229, 184, 105, 0.16);
  border-color: rgba(229, 184, 105, 0.48);
  color: var(--gold-bright);
}

.topbar-right { display: flex; align-items: center; gap: 10px; }

.ws-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 6px 10px;
}
.ws-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 8px var(--emerald); }
.ws-picker select {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}
.ws-picker select option { background: #0c151b; color: var(--text); }

/* BUTTONS */
.btn-gold, .btn-gold-sm {
  background: linear-gradient(135deg, #e5b869, #c9963e);
  color: #091014;
  border: none;
  font-weight: 700;
  font-size: 12px;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: filter 0.15s;
}
.btn-gold:hover, .btn-gold-sm:hover { filter: brightness(1.08); }
.btn-gold-sm { padding: 6px 10px; font-size: 11px; }

.btn-teal, .btn-teal-sm {
  background: rgba(78, 205, 196, 0.16);
  color: #7eeae2;
  border: 1px solid rgba(78, 205, 196, 0.45);
  font-weight: 600;
  font-size: 12px;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.btn-teal:hover, .btn-teal-sm:hover { background: rgba(78, 205, 196, 0.25); }
.btn-teal-sm { padding: 6px 10px; font-size: 11px; }

.btn-outline-gold {
  background: rgba(229, 184, 105, 0.08);
  color: var(--gold-bright);
  border: 1px solid rgba(229, 184, 105, 0.45);
  font-weight: 600;
  font-size: 11.5px;
  padding: 7px 11px;
  border-radius: 8px;
  cursor: pointer;
}
.btn-outline-gold:hover { background: rgba(229, 184, 105, 0.18); }
.btn-outline-gold.is-paused {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fca5a5;
}

.btn-danger-sm {
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  font-size: 11.5px;
  padding: 7px 11px;
  border-radius: 8px;
  cursor: pointer;
}

/* MODULE VIEWS */
.module-view {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* HUB */
.hub-container {
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
  padding: 28px 20px;
  overflow-y: auto;
}
.hub-hero { text-align: center; margin-bottom: 24px; }
.hub-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--teal);
  background: rgba(78, 205, 196, 0.1);
  border: 1px solid rgba(78, 205, 196, 0.3);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.hub-hero h1 { font-family: var(--font-display); font-size: 28px; margin-bottom: 6px; }
.hub-hero p { color: var(--text-muted); font-size: 14px; }

.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
}
.kpi-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.kpi-value { font-family: var(--font-display); font-size: 22px; font-weight: 700; margin-top: 4px; color: var(--gold-bright); }
.kpi-sub { font-size: 11px; color: var(--teal); margin-top: 2px; }

.hub-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.hub-card {
  text-align: left;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.18s;
  color: var(--text);
}
.hub-card:hover {
  border-color: rgba(229, 184, 105, 0.55);
  transform: translateY(-2px);
  background: var(--bg-card-hover);
}
.hub-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 19px;
  margin-bottom: 10px;
}
.gold-bg { background: rgba(229, 184, 105, 0.16); }
.teal-bg { background: rgba(78, 205, 196, 0.16); }
.emerald-bg { background: rgba(16, 185, 129, 0.16); }
.purple-bg { background: rgba(168, 85, 247, 0.18); }
.hub-card h3 { font-family: var(--font-display); font-size: 16px; margin-bottom: 5px; }
.hub-card p { font-size: 12.5px; color: var(--text-muted); line-height: 1.45; }

/* CRM VENDAS */
.crm-kpi-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: rgba(12, 21, 27, 0.72);
  border-bottom: 1px solid var(--border-soft);
  flex-wrap: wrap;
}
.mini-kpi {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 9px;
  padding: 6px 12px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.mini-kpi strong { font-family: var(--font-mono); color: var(--gold-bright); }
.mini-kpi.is-online { border-color: rgba(16, 185, 129, 0.4); color: #6ee7b7; }

.crm-split {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 365px;
}

.kanban-area {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 12px 14px;
}
.kanban-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.kanban-title-wrap { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.kanban-title-wrap h2 { font-family: var(--font-display); font-size: 16px; }
.muted-tag { font-size: 11px; color: var(--gold); font-weight: 500; margin-left: 6px; }

.search-input {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  color: var(--text);
  border-radius: 8px;
  padding: 7px 11px;
  font-size: 12px;
  width: 240px;
  outline: none;
}
.search-input:focus { border-color: var(--gold); }

.kanban-board {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(156px, 1fr));
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.tasks-kanban { grid-template-columns: repeat(4, minmax(220px, 1fr)); }

.kb-col {
  background: rgba(12, 21, 27, 0.85);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 10px;
}
.kb-col.drag-over { border-color: var(--gold); background: rgba(229, 184, 105, 0.06); }

.kb-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3px;
}
.kb-col-title { font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.kb-count {
  font-family: var(--font-mono);
  font-size: 10.5px;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 7px;
  border-radius: 999px;
  color: var(--text-muted);
}
.kb-col-sum {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gold);
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-soft);
}

.kb-cards {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 2px;
}

.lead-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 9px;
  cursor: pointer;
  transition: all 0.15s;
}
.lead-card:hover { border-color: rgba(229, 184, 105, 0.42); background: var(--bg-card-hover); }
.lead-card.is-selected {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(229, 184, 105, 0.45), 0 8px 20px rgba(0, 0, 0, 0.4);
}

.lc-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.avatar-sq {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #071015;
  flex-shrink: 0;
}
.lc-name { font-size: 12.5px; font-weight: 600; color: var(--text); line-height: 1.2; }
.lc-company { font-size: 10.5px; color: var(--text-muted); }
.lc-service { font-size: 11px; color: #b9cad0; margin-bottom: 7px; }
.lc-bottom { display: flex; align-items: center; justify-content: space-between; gap: 5px; flex-wrap: wrap; }
.lc-val { font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; color: var(--gold-bright); }

.badge-ai {
  font-size: 9.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(78, 205, 196, 0.16);
  color: #7eeae2;
  border: 1px solid rgba(78, 205, 196, 0.35);
  white-space: nowrap;
  flex-shrink: 0;
}
.badge-paused {
  font-size: 9.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.35);
  white-space: nowrap;
  flex-shrink: 0;
}
.badge-won {
  font-size: 9.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
  white-space: nowrap;
  flex-shrink: 0;
}

/* LEAD DRAWER (RIGHT PANEL) */
.lead-drawer {
  background: rgba(10, 18, 24, 0.96);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.drawer-header {
  padding: 14px 16px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--border-soft);
}
.drawer-lead-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.drawer-lead-id h3 { font-size: 14.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drawer-sub { font-size: 11px; color: var(--gold); }
.drawer-score-pill {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 4px 8px;
  border-radius: 999px;
  flex-shrink: 0;
}

.drawer-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--border-soft);
}
.dtab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 600;
  padding: 9px 4px;
  cursor: pointer;
}
.dtab.is-active { color: var(--gold-bright); border-bottom-color: var(--gold); background: rgba(229, 184, 105, 0.06); }

.dtab-pane {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 12px 14px;
  overflow-y: auto;
}

.sdr-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.chat-mode-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.chat-mode-label { font-size: 10.5px; color: var(--text-muted); }

.seg-toggle {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 2px;
}
.seg-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
}
.seg-btn.is-active { background: rgba(229, 184, 105, 0.2); color: var(--gold-bright); }

.chat-stream {
  flex: 1;
  min-height: 180px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  background: rgba(5, 10, 14, 0.72);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  margin-bottom: 10px;
}
.bubble {
  max-width: 88%;
  padding: 8px 11px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.45;
}
.bubble.lead {
  align-self: flex-start;
  background: #17232c;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.bubble.ai {
  align-self: flex-end;
  background: rgba(20, 62, 58, 0.82);
  border: 1px solid rgba(78, 205, 196, 0.35);
}
.bubble.human {
  align-self: flex-end;
  background: rgba(74, 56, 22, 0.78);
  border: 1px solid rgba(229, 184, 105, 0.45);
}
.bubble-meta {
  font-size: 9.5px;
  color: var(--text-muted);
  margin-top: 3px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.chat-composer { display: flex; gap: 6px; }
.chat-composer input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 9px 11px;
  font-size: 12px;
  outline: none;
}

/* FORMS & PROPOSALS */
.drawer-form { display: flex; flex-direction: column; gap: 10px; }
.drawer-form label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--text-muted); }
.drawer-form input, .drawer-form textarea, .drawer-form select {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  font-family: var(--font-sans);
  outline: none;
}
.drawer-form input:focus, .drawer-form textarea:focus { border-color: var(--gold); }
.toggle-row { display: flex; gap: 8px; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.form-actions { display: flex; gap: 8px; align-items: center; justify-content: space-between; }

.proposal-box {
  background: rgba(15, 26, 33, 0.8);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
}
.proposal-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.prop-kicker { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.14em; color: var(--teal); }
.prop-total { font-family: var(--font-mono); font-size: 16px; font-weight: 700; color: var(--gold-bright); }
.prop-items { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.prop-item-row {
  display: grid;
  grid-template-columns: 1fr 78px 26px;
  gap: 6px;
  align-items: center;
}
.prop-item-row input {
  background: var(--bg);
  border: 1px solid var(--border-soft);
  color: var(--text);
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 11.5px;
}

.docs-section { margin-bottom: 16px; }
.docs-section h4 { font-size: 12px; color: var(--gold); margin-bottom: 8px; }
.pill-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.doc-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 11.5px;
}
.inline-add { display: flex; gap: 6px; }
.inline-add select, .inline-add input {
  flex: 1;
  min-width: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  color: var(--text);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 11.5px;
}

/* TASKS MODULE */
.tasks-layout { flex: 1; min-height: 0; display: grid; grid-template-columns: 220px 1fr; }
.sectors-sidebar {
  background: rgba(10, 18, 24, 0.9);
  border-right: 1px solid var(--border-soft);
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidebar-kicker { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; color: var(--text-muted); margin-bottom: 8px; }
.sector-btn {
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sector-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.sector-btn.is-active { background: rgba(229, 184, 105, 0.14); border-color: rgba(229, 184, 105, 0.4); color: var(--gold-bright); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.tasks-board-wrap { padding: 14px; min-height: 0; display: flex; flex-direction: column; }

/* FINANCE & N8N */
.fin-container, .n8n-container {
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
  padding: 22px 20px;
  overflow-y: auto;
}
.fin-card, .n8n-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
}
.fin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.table-wrap { overflow-x: auto; }
.fin-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.fin-table th, .fin-table td { padding: 10px 8px; text-align: left; border-bottom: 1px solid var(--border-soft); }
.fin-table th { color: var(--text-muted); font-size: 11px; text-transform: uppercase; }
.muted-p { color: var(--text-muted); font-size: 13px; line-height: 1.5; margin-top: 6px; }

.charts-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 14px; }
.bar-row { margin-bottom: 11px; }
.bar-meta { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 4px; }
.bar-track { height: 10px; border-radius: 999px; background: rgba(255,255,255,0.06); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; transition: width 0.4s ease; }
.meeting-pill {
  font-size: 10px;
  color: var(--gold-bright);
  background: rgba(229,184,105,0.14);
  border: 1px solid rgba(229,184,105,0.38);
  padding: 2px 6px;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 6px;
}

/* MODAL */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 8, 12, 0.78);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90;
  padding: 16px;
}
.modal-card {
  width: 100%;
  max-width: 540px;
  background: #0d171e;
  border: 1px solid rgba(229, 184, 105, 0.45);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
}
.modal-header {
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-soft);
}
.icon-close {
  background: transparent;
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 7px;
  cursor: pointer;
}
.modal-body { padding: 16px 18px; max-height: 78vh; overflow-y: auto; }

.mobile-menu-btn {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  border: 1px solid rgba(229, 184, 105, 0.35);
  background: rgba(229, 184, 105, 0.1);
  color: var(--gold-bright);
  font-size: 19px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rail-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 8, 12, 0.68);
  backdrop-filter: blur(4px);
  z-index: 65;
}

@media (max-width: 1080px) {
  html, body { overflow-y: auto; overflow-x: hidden; height: auto; }
  .app-shell { height: auto; min-height: 100vh; }
  .workspace-body, .workspace-main { overflow: visible; height: auto; }
  .topbar { flex-wrap: wrap; height: auto; padding: 10px 12px; gap: 10px; }
  .module-nav { order: 3; width: 100%; overflow-x: auto; }
  .crm-split { grid-template-columns: 1fr; }
  .lead-drawer { border-left: none; border-top: 1px solid var(--border); min-height: 520px; }
  .kpi-row, .hub-grid { grid-template-columns: 1fr 1fr; }
  .tasks-layout { grid-template-columns: 1fr; }
  .charts-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .mobile-menu-btn { display: inline-flex; }
  .topbar {
    position: sticky;
    top: 0;
    z-index: 60;
    flex-wrap: nowrap;
    justify-content: space-between;
    padding: 10px 12px;
    gap: 8px;
  }
  .brand-sub { display: none; }
  .brand-name { font-size: 13px; }
  .module-nav { display: none; }
  .topbar-right { gap: 6px; }
  .ws-picker { display: none; }
  #new-ws-btn { display: none; }
  #logout-btn { padding: 7px 10px; font-size: 11.5px; }

  /* Menu lateral vira Drawer deslizante no celular */
  .left-rail {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 240px !important;
    padding: 16px 12px !important;
    align-items: stretch !important;
    z-index: 75;
    transform: translateX(-105%);
    transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 16px 0 48px rgba(0, 0, 0, 0.72);
  }
  .left-rail.is-mobile-open { transform: translateX(0); }
  .left-rail .rail-btn {
    width: 100% !important;
    height: 42px !important;
    justify-content: flex-start !important;
    padding: 0 12px !important;
  }
  .left-rail .rail-lbl { display: inline !important; font-size: 13.5px; }
  .rail-toggle { display: none !important; }

  /* Conteúdo fluido para telas de 360px–430px */
  .hub-container, .fin-container, .n8n-container { padding: 14px 12px; }
  .hub-hero-grid { padding: 16px; gap: 14px; }
  .clarix-hub-stage { height: 200px; }
  .kpi-row, .hub-grid, .grid-2 { grid-template-columns: 1fr !important; gap: 10px; }
  .crm-kpi-strip { padding: 10px 12px; gap: 8px; overflow-x: auto; flex-wrap: nowrap; }
  .mini-kpi { white-space: nowrap; flex-shrink: 0; }
  .kanban-area { padding: 12px; }
  .kanban-toolbar { flex-direction: column; align-items: stretch; gap: 8px; }
  .kanban-title-wrap { flex-direction: column; align-items: stretch; gap: 8px; }
  .search-input { width: 100%; }
  .kanban-board {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 10px;
    scroll-snap-type: x proximity;
  }
  .kanban-col, .kb-col { min-width: 265px; flex-shrink: 0; scroll-snap-align: start; }
  .sectors-sidebar {
    flex-direction: row;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-soft);
    padding: 10px;
  }
  .sidebar-kicker { display: none; }
  .sector-btn { white-space: nowrap; flex-shrink: 0; }
  .fin-table-wrap, .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .fin-table { min-width: 560px; }
  .drawer-tabs { overflow-x: auto; }
  .dtab { white-space: nowrap; }
}
