*, *::before, *::after { box-sizing:border-box; margin:0; padding:0; }
:root {
  --purple:#812189; --purple-dark:#5e1764; --purple-soft:#f0e6f2; --purple-mid:#c889cc;
  --green:#81C530; --green-dark:#5e9222; --green-soft:#edf7d9;
  --orange:#e67e22; --orange-soft:#fef3e2;
  --blue:#2980b9; --blue-soft:#e8f4fd;
  --red:#c0392b; --red-soft:#fde8e8;
  --gray:#58595B;
  --bg:#F5F4F0; --surface:#FFFFFF;
  --border:#E2E0DA; --border2:#CCC9C1;
  --text:#2A2928; --text2:#58595B; --text3:#9B998F;
  --shadow:0 2px 8px rgba(0,0,0,.08),0 6px 20px rgba(0,0,0,.05);
  --shadow-sm:0 1px 3px rgba(0,0,0,.07);
  --radius:10px; --radius-sm:6px;
}
body { background:var(--bg); color:var(--text); font-family:'Nunito Sans',sans-serif; font-size:24px; min-height:100vh; }
button { cursor:pointer; font-family:inherit; border:none; outline:none; }
input,select,textarea { font-family:inherit; outline:none; }
::-webkit-scrollbar { width:5px; height:5px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:var(--border2); border-radius:3px; }

.app-wrap { display:flex; flex-direction:column; height:100vh; overflow:hidden; }
.view-area { flex:1; overflow:hidden; display:flex; flex-direction:column; }

/* Header */
.header { background:rgba(255,255,255,.95); border-bottom:1px solid var(--border); padding:6px 24px; min-height:64px; display:flex; align-items:center; gap:20px; position:sticky; top:0; z-index:50; box-shadow:var(--shadow-sm); flex-shrink:0; backdrop-filter:blur(12px); }
.logo-wrap { display:flex; align-items:center; gap:14px; flex-shrink:0; }
.brand-lockup { display:flex; align-items:center; gap:14px; text-decoration:none; color:inherit; }
.brand-lockup.compact { gap:12px; }
.brand-symbol { width:44px; height:44px; object-fit:contain; flex-shrink:0; filter:drop-shadow(0 8px 16px rgba(129,33,137,.14)); }
.brand-wordmark { width:min(150px, 18vw); height:auto; object-fit:contain; display:block; }
.brand-copy { display:flex; flex-direction:column; gap:2px; }
.mobile-module-shell { display:none; }
.mobile-bottom-nav { display:none; }
.mobile-action-fab { display:none; }
.mobile-prod-view-fab { display:none; }
.desktop-prod-view-fab { display:none; }
.desktop-prod-legend-fab { display:none; }
.global-search-fab { display:none; }
.seg-mobile-search-fab { display:none; }
.main-nav-shell { flex:1; min-width:0; display:flex; align-items:center; justify-content:center; }
.main-nav-stack { width:100%; max-width:760px; min-width:0; display:flex; flex-direction:column; gap:6px; }
.main-nav-frame { position:relative; min-width:0; }
.main-nav { display:flex; justify-content:center; gap:4px; min-width:0; overflow-x:auto; overflow-y:hidden; padding:0 2px 2px; -webkit-overflow-scrolling:touch; scrollbar-width:none; -ms-overflow-style:none; }
.main-nav::-webkit-scrollbar { display:none; }
.nav-tab { padding:10px 22px; border-radius:24px; font-size:13px; font-weight:700; color:var(--text2); background:transparent; transition:all .15s; display:flex; align-items:center; justify-content:center; gap:0; flex:0 0 auto; white-space:nowrap; text-align:center; }
.nav-tab:hover { background:var(--bg); color:var(--text); }
.nav-tab.active { background:var(--purple); color:#fff; }
.nav-scroll-btn { width:32px; height:32px; border-radius:999px; border:1px solid var(--border); background:var(--surface); color:var(--purple); font-size:18px; font-weight:900; display:flex; align-items:center; justify-content:center; box-shadow:var(--shadow-sm); transition:all .15s; flex-shrink:0; }
.nav-scroll-btn:hover:not(:disabled) { background:var(--purple-soft); border-color:var(--purple-mid); transform:translateY(-1px); }
.nav-scroll-btn:disabled { opacity:.35; cursor:default; box-shadow:none; }
.nav-scroll-shadow { position:absolute; top:0; bottom:0; width:28px; opacity:0; pointer-events:none; transition:opacity .15s; }
.nav-scroll-shadow.left { left:0; background:linear-gradient(90deg, rgba(255,255,255,.96), rgba(255,255,255,0)); }
.nav-scroll-shadow.right { right:0; background:linear-gradient(270deg, rgba(255,255,255,.96), rgba(255,255,255,0)); }
.nav-scroll-shadow.visible { opacity:1; }
.nav-scroll-meter { height:4px; opacity:0; transition:opacity .15s; }
.nav-scroll-meter.visible { opacity:1; }
.nav-scroll-track { width:100%; height:100%; background:var(--border); border-radius:999px; overflow:hidden; }
.nav-scroll-fill { height:100%; border-radius:999px; background:linear-gradient(90deg, var(--purple), var(--green)); transition:transform .15s ease-out, width .15s ease-out; }
.header-actions { display:flex; align-items:center; gap:10px; flex-shrink:0; }
.header-search-btn {
  width:44px;
  min-width:44px;
  min-height:44px;
  height:44px;
  padding:0;
  border-radius:50%;
  background:var(--purple);
  border:none;
  color:#fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  box-shadow:var(--shadow-sm);
  transition:all .15s;
}
.header-search-btn:hover {
  background:var(--purple-dark);
}
.header-search-btn svg {
  width:18px;
  height:18px;
  stroke:currentColor;
  fill:none;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.header-period-controls .commercial-period-picker { width:auto; }
.header-period-controls .commercial-period-trigger {
  width:44px;
  min-width:44px;
  height:44px;
  min-height:44px;
  padding:0;
  border-radius:50%;
  border:none;
  background:var(--green);
  color:#fff;
  box-shadow:var(--shadow-sm);
  justify-content:center;
}
.header-period-controls .commercial-period-trigger:hover,
.header-period-controls .commercial-period-trigger.open { background:var(--green-dark); border:none; }
.header-period-controls .commercial-period-trigger-caret { display:none; }
.header-period-controls .commercial-period-trigger-label { display:none; }
.header-period-controls .commercial-period-trigger-icon { color:#fff; margin:0; font-size:18px; display:inline-flex; align-items:center; justify-content:center; }
.commercial-period-calendar { width:24px; height:26px; border-radius:8px; overflow:hidden; background:#fff; color:var(--green-dark); display:inline-flex; flex-direction:column; align-items:center; justify-content:flex-start; box-shadow:0 3px 8px rgba(39,80,16,.16); }
.commercial-period-calendar-icon { position:relative; }
.commercial-period-calendar-top { width:100%; height:8px; background:rgba(94,146,34,.18); display:flex; align-items:flex-end; justify-content:center; gap:5px; padding-bottom:1px; }
.commercial-period-calendar-ring { width:3px; height:4px; border-radius:999px; background:var(--green-dark); opacity:.92; }
.commercial-period-calendar-day { flex:1; display:flex; align-items:center; justify-content:center; font-family:'Nunito',sans-serif; font-size:13px; font-weight:900; line-height:1; }
.settings-wrap { position:relative; }
.settings-btn { width:44px; height:44px; border-radius:50%; background:var(--bg); border:1.5px solid var(--border); color:var(--purple); display:flex; align-items:center; justify-content:center; transition:all .15s; box-shadow:var(--shadow-sm); }
.settings-btn:hover { background:var(--purple-soft); border-color:var(--purple-mid); transform:translateY(-1px); }
.settings-btn svg { width:22px; height:22px; fill:currentColor; display:block; }
.notification-btn { position:relative; }
.notification-badge { position:absolute; top:-2px; right:-2px; min-width:19px; height:19px; padding:0 5px; border-radius:999px; background:var(--red); color:#fff; font-size:10px; font-weight:900; display:flex; align-items:center; justify-content:center; box-shadow:0 4px 12px rgba(192,57,43,.28); }
.settings-menu { position:absolute; top:calc(100% + 10px); right:0; width:260px; background:var(--surface); border:1px solid var(--border); border-radius:16px; box-shadow:0 14px 40px rgba(45,35,46,.16); padding:8px; z-index:120; }
.settings-menu::before { content:''; position:absolute; top:-7px; right:16px; width:12px; height:12px; background:var(--surface); border-left:1px solid var(--border); border-top:1px solid var(--border); transform:rotate(45deg); }
.settings-user { padding:12px 12px 10px; border-bottom:1px solid var(--border); margin-bottom:6px; display:flex; flex-direction:column; gap:2px; }
.settings-user strong { font-family:'Nunito',sans-serif; font-size:14px; color:var(--text); }
.settings-user span { font-size:12px; color:var(--text3); }
.settings-item { width:100%; text-align:left; background:transparent; color:var(--text2); border-radius:10px; padding:10px 12px; font-size:14px; font-weight:800; transition:all .12s; }
.settings-item:hover { background:var(--purple-soft); color:var(--purple); }
.settings-item.danger:hover { background:var(--red-soft); color:var(--red); }
.notifications-menu { width:360px; max-height:min(72vh, 580px); display:flex; flex-direction:column; }
.notifications-list { display:flex; flex-direction:column; gap:8px; max-height:440px; overflow:auto; padding:4px 2px 2px; }
.notifications-empty { color:var(--text3); background:var(--bg); border:1px dashed var(--border); border-radius:12px; padding:16px; text-align:center; }
.notification-item { border:1px solid var(--border); border-radius:14px; padding:12px; display:flex; flex-direction:column; gap:6px; background:#fff; }
.notification-item.pending { background:var(--purple-soft); border-color:var(--purple-mid); }
.notification-top { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.notification-module { font-size:11px; font-weight:900; color:var(--purple); background:rgba(129,33,137,.12); border-radius:999px; padding:3px 8px; }
.notification-status { font-size:11px; font-weight:900; color:var(--green-dark); background:var(--green-soft); border-radius:999px; padding:3px 8px; }
.notification-status.pending { color:var(--purple); background:#fff; border:1px solid var(--purple-mid); }
.notification-item strong { font-family:'Nunito',sans-serif; font-size:14px; color:var(--text); line-height:1.25; }
.notification-item span { color:var(--text2); }
.notification-item p { color:var(--text2); line-height:1.4; }
.notification-meta small { color:var(--text3); font-weight:800; }
.notification-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-top:2px; }
.global-search-modal {
  width:min(980px, calc(100vw - 48px));
  max-height:min(84vh, 760px);
}
.global-search-controls {
  display:grid;
  grid-template-columns:minmax(0, 1fr);
  gap:12px;
}
.global-search-input {
  width:100%;
  min-height:48px;
  border:1.5px solid var(--border);
  border-radius:14px;
  padding:0 16px;
  background:var(--bg);
  color:var(--text);
  font-size:14px;
}
.global-search-input:focus {
  border-color:var(--purple-mid);
  background:#fff;
}
.global-search-scope {
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.global-search-scope-btn {
  min-height:40px;
  padding:0 14px;
  border-radius:999px;
  background:var(--bg);
  border:1px solid var(--border);
  color:var(--text2);
  font-size:13px;
  font-weight:800;
}
.global-search-scope-btn.active {
  background:var(--purple);
  border-color:var(--purple);
  color:#fff;
}
.global-search-summary {
  margin-top:14px;
  color:var(--text3);
  font-size:13px;
  font-weight:700;
}
.global-search-results {
  margin-top:16px;
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px;
  max-height:min(56vh, 500px);
  overflow:auto;
  padding-right:2px;
}
.global-search-result {
  width:100%;
  text-align:left;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:16px;
  padding:14px;
  display:flex;
  flex-direction:column;
  gap:7px;
  transition:all .15s;
}
.global-search-result:hover {
  border-color:var(--purple-mid);
  box-shadow:0 10px 24px rgba(129,33,137,.08);
  transform:translateY(-1px);
}
.global-search-result-top {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.global-search-module,
.global-search-type {
  font-size:11px;
  font-weight:900;
  padding:4px 8px;
  border-radius:999px;
}
.global-search-module {
  background:var(--purple-soft);
  color:var(--purple);
}
.global-search-type {
  background:var(--green-soft);
  color:var(--green-dark);
}
.global-search-result strong {
  font-family:'Nunito',sans-serif;
  font-size:15px;
  color:var(--text);
  line-height:1.3;
}
.global-search-subtitle {
  color:var(--text2);
  font-size:13px;
  line-height:1.35;
}
.global-search-result p {
  color:var(--text3);
  font-size:13px;
  line-height:1.45;
}
.global-search-empty {
  grid-column:1 / -1;
  border:1px dashed var(--border);
  border-radius:16px;
  background:var(--bg);
  color:var(--text3);
  padding:20px;
  text-align:center;
}

/* Sub-tabs */
.sub-tabs-bar { margin:10px 24px 0; padding:8px 14px; min-height:60px; background:var(--surface); border:1px solid var(--border); border-radius:18px; box-shadow:var(--shadow-sm); display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); align-items:center; gap:14px; flex-shrink:0; }
.sub-tabs-side { min-width:0; }
.sub-tabs-side-left { display:flex; justify-content:flex-start; align-items:center; }
.sub-tabs-side-right { display:flex; justify-content:flex-end; align-items:center; gap:10px; flex-wrap:wrap; }
.sub-tabs { display:flex; justify-content:center; align-items:center; gap:4px; }
.sub-tab { padding:10px 18px; font-size:13px; font-weight:700; color:var(--text3); border-bottom:2px solid transparent; transition:all .15s; cursor:pointer; background:transparent; display:flex; align-items:center; justify-content:center; gap:5px; text-align:center; min-width:132px; }
.sub-tab:hover { color:var(--text); }
.sub-tab.active { color:var(--purple); border-bottom-color:var(--purple); }
.btn-add { background:var(--purple); color:#fff; padding:7px 16px; border-radius:20px; font-size:13px; font-weight:700; transition:background .15s; display:flex; align-items:center; gap:5px; }
.btn-add:hover { background:var(--purple-dark); }

/* Stats bar */
.stats-bar { background:var(--surface); border-bottom:1px solid var(--border); padding:0 32px; display:flex; align-items:center; gap:32px; height:78px; overflow-x:auto; flex-shrink:0; }
.stat-item { display:flex; align-items:center; gap:7px; white-space:nowrap; }
.stat-dot { width:9px; height:9px; border-radius:50%; }
.stat-val { font-family:'Nunito',sans-serif; font-size:19px; font-weight:800; }
.stat-val { color:var(--text); }
.stat-lbl { font-size:11px; color:var(--text3); }
.stat-sep { width:1px; height:22px; background:var(--border); }
.pipeline-period-controls { margin-left:0; display:flex; align-items:center; gap:10px; padding-left:0; }
.pipeline-period-group { display:flex; flex-direction:column; gap:0; min-width:138px; }
.pipeline-period-group-single { min-width:180px; }
.sub-tabs-period-controls { margin-left:0; padding-left:0; }
.commercial-subtabs-bar { grid-template-columns:minmax(0,1fr) auto; justify-items:stretch; }
.commercial-subtabs-side-left { justify-content:flex-start; }
.commercial-subtabs-nav { justify-content:flex-start; }
.commercial-subtabs-side-right { width:auto; justify-content:flex-end; }
.mobile-pipeline-toolbar,
.mobile-pipeline-board { display:none; }
.commercial-subtabs-period-controls .commercial-period-picker { width:auto; }
.commercial-subtabs-period-controls .commercial-period-trigger { min-width:0; min-height:44px; height:44px; padding:9px 17px; border-radius:18px; border:none; background:var(--green); color:#fff; box-shadow:none; }
.commercial-subtabs-period-controls .commercial-period-trigger:hover,
.commercial-subtabs-period-controls .commercial-period-trigger.open { background:var(--green-dark); border:none; }
.commercial-subtabs-period-controls .commercial-period-trigger-label,
.commercial-subtabs-period-controls .commercial-period-trigger-caret { color:#fff; }
.commercial-period-picker { position:relative; }
.commercial-period-trigger {
  min-width:192px;
  background:var(--bg);
  border:1.5px solid var(--border);
  border-radius:12px;
  color:var(--text);
  padding:8px 12px;
  display:inline-flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  box-shadow:var(--shadow-sm);
  transition:all .15s;
}
.commercial-period-trigger:hover,
.commercial-period-trigger.open {
  background:#fff;
  border-color:var(--purple-mid);
}
.commercial-period-trigger-label {
  font-weight:800;
  white-space:nowrap;
}
.commercial-period-trigger-icon {
  font-size:18px;
  line-height:1;
}
.commercial-period-trigger-caret {
  color:var(--purple);
  font-size:13px;
  flex-shrink:0;
}
.commercial-period-menu {
  position:fixed;
  background:var(--surface);
  border:1.5px solid var(--border);
  border-radius:16px;
  box-shadow:0 16px 36px rgba(45,35,46,.16);
  padding:12px;
  display:flex;
  flex-direction:column;
  gap:12px;
  z-index:320;
  overflow:auto;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
}
.commercial-period-head {
  display:flex;
  flex-direction:column;
  gap:2px;
}
.commercial-period-head strong {
  font-family:'Nunito',sans-serif;
  color:var(--text);
}
.commercial-period-head span {
  color:var(--text3);
}
.commercial-period-years {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:6px;
}
.commercial-period-year-btn,
.commercial-period-add-year-btn {
  min-width:62px;
  padding:7px 10px;
  border-radius:10px;
  border:1px solid var(--border);
  background:var(--bg);
  color:var(--text2);
  font-weight:800;
  transition:all .12s;
}
.commercial-period-year-btn:hover,
.commercial-period-add-year-btn:hover,
.commercial-period-year-btn.active {
  background:var(--purple-soft);
  border-color:var(--purple-mid);
  color:var(--purple);
}
.commercial-period-add-year-btn {
  min-width:38px;
  font-size:18px !important;
  line-height:1;
}
.commercial-period-month-grid {
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:6px;
}
.commercial-period-month-btn {
  padding:7px 8px;
  border-radius:10px;
  border:1px solid var(--border);
  background:transparent;
  color:var(--text2);
  font-weight:700;
  font-size:14px !important;
  line-height:1.1;
  text-align:center;
  transition:all .12s;
}
.commercial-period-month-btn:hover,
.commercial-period-month-btn.active {
  background:var(--purple);
  border-color:var(--purple);
  color:#fff;
}
.pipeline-year-group { min-width:92px; align-items:flex-start; }
.pipeline-year-picker { position:relative; width:100%; }
.pipeline-year-trigger { background:var(--bg); border:1.5px solid var(--border); border-radius:var(--radius-sm); color:var(--text); padding:7px 32px 7px 10px; font-size:13px; width:100%; cursor:pointer; display:flex; align-items:center; text-align:left; }
.pipeline-year-trigger.open { border-color:var(--purple-mid); background:#fff; }
.pipeline-year-menu { position:fixed; background:var(--surface); border:1.5px solid var(--border); border-radius:12px; box-shadow:var(--shadow); padding:6px; display:flex; flex-direction:column; gap:4px; z-index:320; overflow:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; }
.pipeline-year-option { width:100%; text-align:left; background:transparent; border:1px solid transparent; border-radius:8px; padding:7px 9px; font-size:13px; color:var(--text2); transition:all .12s; }
.pipeline-year-option:hover,
.pipeline-year-option.active { background:var(--purple-soft); color:var(--purple); border-color:var(--purple-mid); }
.pipeline-add-year { width:100%; height:28px; border-radius:8px; border:1.5px dashed var(--border2); background:transparent; color:var(--purple); font-size:16px; font-weight:800; transition:all .12s; }
.pipeline-add-year:hover { background:var(--purple-soft); border-color:var(--purple-mid); }

/* Kanban */
.kanban-wrap { padding:20px 28px; overflow:auto; flex:1; }
.kanban-board { display:flex; gap:12px; min-width:max-content; align-items:flex-start; }
.kanban-col { width:380px; flex-shrink:0; }
.col-header { display:flex; align-items:center; justify-content:space-between; padding:9px 12px; margin-bottom:9px; border-radius:var(--radius); background:var(--surface); border:1px solid var(--border); }
.pipeline-col-header { width:100%; min-height:44px !important; padding:9px 16px !important; border-radius:22px !important; background:#fff; border:1px solid var(--border); box-shadow:var(--shadow-sm); white-space:nowrap; align-self:stretch; }
.pipeline-col-header-main { display:flex; align-items:center; justify-content:space-between; gap:10px; width:100%; }
.pipeline-col-header .col-title { gap:0; color:var(--text2); font-size:13px; }
.pipeline-col-header .col-title > span:first-child { display:none !important; }
.pipeline-col-header .col-count { min-width:auto; background:transparent; padding:0; border-radius:0; font-family:'Nunito',sans-serif; font-size:22px; font-weight:900; color:var(--text); line-height:1; }
.col-title { font-family:'Nunito',sans-serif; font-size:12px; font-weight:800; display:flex; align-items:center; gap:6px; white-space:nowrap; }
.col-count { font-size:11px; font-weight:700; padding:2px 7px; border-radius:10px; background:var(--bg); color:var(--text2); }
.col-cards { display:flex; flex-direction:column; gap:8px; min-height:60px; }
.add-card-btn { border:1.5px dashed var(--border); background:transparent; border-radius:8px; padding:7px; font-size:12px; color:var(--text3); transition:all .12s; width:100%; font-weight:600; }
.add-card-btn:hover { border-color:var(--purple-mid); color:var(--purple); background:var(--purple-soft); }

/* Cards */
.card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:12px 13px; box-shadow:var(--shadow-sm); cursor:pointer; transition:all .15s; position:relative; overflow:hidden; }
.card:hover { transform:translateY(-1px); box-shadow:var(--shadow); border-color:var(--border2); }
.card-stripe { position:absolute; left:0; top:0; bottom:0; width:3px; border-radius:3px 0 0 3px; }
.card-title { font-family:'Nunito',sans-serif; font-size:13px; font-weight:800; margin-bottom:2px; line-height:1.3; }
.card-empresa { font-size:11px; color:var(--purple); font-weight:600; margin-bottom:6px; }
.card-contact { font-size:11px; color:var(--text2); margin-top:-2px; margin-bottom:6px; }
.card-priority-tag { display:inline-flex; align-items:center; width:max-content; padding:3px 9px; border-radius:999px; font-size:10px; font-weight:800; margin-bottom:6px; }
.card-value { font-family:'Nunito',sans-serif; font-size:15px; font-weight:800; color:var(--green-dark); margin-bottom:5px; }
.card-row { display:flex; align-items:center; gap:5px; font-size:11px; color:var(--text2); margin-top:3px; }
.tag { padding:2px 7px; border-radius:10px; font-size:10px; font-weight:700; }
.card-actions { display:flex; gap:5px; margin-top:9px; border-top:1px solid var(--border); padding-top:7px; }
.btn-move { flex:1; padding:4px 0; border-radius:5px; font-size:10px; font-weight:700; background:var(--bg); color:var(--text2); border:1px solid var(--border); transition:all .12s; }
.btn-move:hover { background:var(--purple-soft); color:var(--purple); border-color:var(--purple-mid); }
.pipeline-mobile-empty { color:var(--text3); background:var(--bg); border:1px dashed var(--border); border-radius:12px; padding:18px 14px; text-align:center; }

/* Pendientes */
.pending-wrap { flex:1; overflow:auto; padding:10px 24px 18px; display:flex; flex-direction:column; gap:16px; }
.pending-hero { min-height:60px; background:var(--surface); border:1px solid var(--border); border-radius:18px; padding:8px 14px; display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:14px; box-shadow:var(--shadow-sm); }
.pending-controls { display:flex; align-items:center; justify-content:flex-end; gap:10px; flex-wrap:wrap; }
.pending-selected-user { display:flex; align-items:center; justify-content:center; min-height:44px; padding:0 17px; border-radius:18px; background:var(--purple-soft); color:var(--purple); font-weight:800; border:1px solid var(--purple-mid); }
.pending-totals { display:flex; gap:11px; flex-wrap:wrap; justify-content:flex-start; min-width:0; }
.pending-summary-card { min-width:188px; }
.board-sync-scroll { min-width:0; overflow-x:auto; overflow-y:hidden; scrollbar-width:none; -ms-overflow-style:none; }
.board-sync-scroll::-webkit-scrollbar { display:none; }
.filter-dropdown { position:relative; }
.filter-dropdown-trigger { min-width:220px; min-height:44px; height:44px; padding:9px 17px; border-radius:18px; border:none; display:inline-flex; align-items:center; gap:10px; font-weight:800; font-size:18px; box-shadow:var(--shadow-sm); transition:background .15s, transform .15s, box-shadow .15s; cursor:pointer; }
.filter-dropdown-trigger.green { background:var(--green); color:#fff; }
.filter-dropdown-trigger.green:hover,
.filter-dropdown-trigger.green.open { background:var(--green-dark); }
.filter-dropdown-trigger.purple { background:var(--purple); color:#fff; }
.filter-dropdown-trigger.purple:hover,
.filter-dropdown-trigger.purple.open { background:var(--purple-dark); }
.filter-dropdown-label { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; flex:1 1 auto; min-width:0; text-align:left; }
.filter-dropdown-meta { flex-shrink:0; min-width:22px; text-align:right; font-family:'Nunito',sans-serif; font-size:15px; font-weight:900; color:inherit; opacity:.95; }
.filter-dropdown-caret { color:inherit; flex-shrink:0; }
.filter-dropdown-menu { position:fixed; z-index:240; background:#fff; border:1px solid var(--border); border-radius:16px; padding:8px; box-shadow:0 18px 36px rgba(42,41,40,.18); display:flex; flex-direction:column; gap:4px; overflow:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; }
.filter-dropdown-option { width:100%; text-align:left; padding:10px 12px; border-radius:12px; background:transparent; color:var(--text); font-weight:700; transition:background .12s, color .12s; display:flex; align-items:center; gap:10px; }
.filter-dropdown-option:hover,
.filter-dropdown-option.active { background:var(--purple-soft); color:var(--purple); }
.filter-dropdown-option-label { flex:1 1 auto; min-width:0; }
.filter-dropdown-option-meta { flex-shrink:0; font-family:'Nunito',sans-serif; font-size:14px; font-weight:900; color:inherit; opacity:.9; }
.pending-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(310px, 1fr)); gap:14px; align-items:start; }
.pending-grid-single { display:grid; grid-template-columns:repeat(auto-fit, minmax(280px, 1fr)); gap:14px; align-items:start; }
.pending-user-card { background:var(--surface); border:1px solid var(--border); border-radius:18px; padding:14px; display:flex; flex-direction:column; gap:11px; box-shadow:var(--shadow-sm); }
.pending-module-card { min-width:0; width:auto; }
.pending-user-card.empty { opacity:.72; }
.pending-user-head { display:flex; align-items:center; gap:10px; }
.pending-module-head { align-items:center; }
.pending-module-mark { width:12px; height:12px; border-radius:50%; flex-shrink:0; }
.pending-user-head h2 { font-family:'Nunito',sans-serif; font-size:18px !important; line-height:1.15; color:var(--text); }
.pending-user-head span { color:var(--text3); }
.pending-count { margin-left:auto; min-width:34px; height:34px; border-radius:50%; background:var(--purple-soft); color:var(--purple); display:flex; align-items:center; justify-content:center; font-family:'Nunito',sans-serif; font-weight:900; }
.pending-alert { color:var(--red); background:var(--red-soft); border:1px solid #f5c0c0; border-radius:12px; padding:6px 10px; font-weight:800; }
.pending-alert.soft { color:var(--purple); background:var(--purple-soft); border-color:var(--purple-mid); }
.pending-list { display:flex; flex-direction:column; gap:8px; }
.pending-empty { color:var(--text3); background:var(--bg); border:1px dashed var(--border); border-radius:12px; padding:12px; text-align:center; }
.pending-task { border:1px solid var(--border); border-radius:14px; padding:11px 12px; display:flex; flex-direction:column; gap:5px; background:#fff; }
.pending-task.overdue { border-color:#f5c0c0; background:#fffafa; }
.pending-task.awaiting-acceptance { border-color:var(--purple-mid); background:linear-gradient(180deg, rgba(240,230,242,.7), #fff); }
.pending-task-top { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.pending-task-top-actions { display:flex; align-items:center; gap:8px; margin-left:auto; }
.pending-module { border-radius:999px; padding:3px 8px; font-weight:900; }
.pending-state { border-radius:999px; padding:3px 8px; background:var(--bg); color:var(--text2); border:1px solid var(--border); font-weight:800; }
.pending-state.acceptance { background:var(--purple-soft); color:var(--purple); border-color:var(--purple-mid); }
.pending-due { color:var(--text3); font-weight:800; }
.pending-task strong { font-family:'Nunito',sans-serif; color:var(--text); line-height:1.25; }
.pending-task span { color:var(--text2); }
.pending-task p { color:var(--text2); line-height:1.35; }
.pending-subtasks { margin-top:6px; padding-top:8px; border-top:1px dashed var(--border); display:flex; flex-direction:column; gap:8px; }
.pending-subtask { border:1px solid var(--border); border-radius:12px; background:var(--bg); padding:9px 10px; display:flex; flex-direction:column; gap:6px; }
.pending-subtask.overdue { border-color:#f5c0c0; background:#fff7f7; }
.pending-subtask.awaiting-acceptance { border-color:var(--purple-mid); background:linear-gradient(180deg, rgba(240,230,242,.55), var(--bg)); }
.pending-subtask-top { display:flex; align-items:flex-start; justify-content:space-between; gap:8px; }
.pending-subtask-copy { min-width:0; display:flex; flex-direction:column; gap:4px; }
.pending-subtask-copy strong { font-family:'Nunito',sans-serif; font-size:13px; color:var(--text); line-height:1.25; }
.pending-subtask-copy p { font-size:12px; color:var(--text2); line-height:1.35; }
.pending-subtask-meta { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.pending-subtask-kind { display:inline-flex; align-items:center; border-radius:999px; padding:2px 8px; background:var(--purple-soft); color:var(--purple); font-size:10px; font-weight:900; }
.pending-subtask-actions { display:flex; align-items:center; gap:8px; flex-shrink:0; }
.pending-task-actions { display:flex; justify-content:flex-end; margin-top:4px; }
.pending-task-open { width:34px; height:34px; border-radius:999px; border:none; background:var(--green); color:#fff; display:flex; align-items:center; justify-content:center; padding:0; }
.pending-task-open:hover { background:var(--green-dark); color:#fff; }
.pending-task-open svg { width:17px; height:17px; stroke:currentColor; fill:none; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; }
.pending-task-accept-btn { padding:6px 12px; font-size:12px; border-radius:10px; }

/* Metricas comerciales */
.metrics-wrap { flex:1; overflow:auto; padding:18px 24px; display:flex; flex-direction:column; gap:16px; background:var(--bg); }
.metrics-hero { background:linear-gradient(135deg, rgba(129,33,137,.12), rgba(129,197,48,.1)); border:1px solid var(--border); border-radius:18px; padding:18px 20px; display:flex; align-items:center; justify-content:space-between; gap:18px; box-shadow:var(--shadow-sm); }
.metrics-hero h1 { font-family:'Nunito',sans-serif; font-size:26px !important; margin-bottom:4px; color:var(--text); }
.metrics-hero p { color:var(--text2); line-height:1.4; }
.metrics-card-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(180px, 1fr)); gap:12px; }
.metrics-card { background:var(--surface); border:1px solid var(--border); border-radius:16px; padding:14px 16px; display:flex; flex-direction:column; gap:5px; box-shadow:var(--shadow-sm); }
.metrics-card span { color:var(--text3); font-weight:800; }
.metrics-card strong { font-family:'Nunito',sans-serif; font-size:25px !important; color:var(--purple); line-height:1.05; }
.metrics-card small { color:var(--text2); font-weight:700; }
.metrics-card.accent strong { color:var(--text); }
.metrics-card.accent-green strong { color:var(--green-dark); }
.metrics-layout { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:14px; align-items:start; }
.metrics-panel { background:var(--surface); border:1px solid var(--border); border-radius:18px; padding:16px; display:flex; flex-direction:column; gap:14px; box-shadow:var(--shadow-sm); }
.metrics-panel-wide { grid-column:1 / -1; }
.metrics-panel-head { display:flex; justify-content:space-between; gap:12px; align-items:center; }
.metrics-panel-head h2 { font-family:'Nunito',sans-serif; font-size:20px !important; color:var(--text); line-height:1.1; margin:0; }
.metrics-panel-head p { color:var(--text3); margin-top:2px; }
.metrics-toggle-group { display:flex; align-items:center; gap:6px; background:var(--bg); border:1px solid var(--border); border-radius:999px; padding:4px; }
.metrics-toggle-btn { min-height:30px; padding:6px 12px; border:none; background:transparent; border-radius:999px; color:var(--text2); font-size:12px; font-weight:800; white-space:nowrap; }
.metrics-toggle-btn.active { background:var(--purple); color:#fff; }
.metrics-status-grid { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:10px; }
.metrics-status-card { border:1px solid var(--border); background:var(--bg); border-radius:14px; padding:12px; display:flex; flex-direction:column; gap:6px; }
.metrics-status-card.soft { background:#fff; }
.metrics-status-top { display:flex; align-items:center; justify-content:space-between; gap:10px; color:var(--text2); }
.metrics-status-dot { width:9px; height:9px; border-radius:50%; flex-shrink:0; }
.metrics-status-count { font-family:'Nunito',sans-serif; font-size:18px !important; font-weight:900; color:var(--text); flex-shrink:0; }
.metrics-status-value { color:var(--green-dark); font-weight:900; }
.metrics-status-meta { color:var(--text2); font-weight:800; }
.metrics-chart-grid { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:8px; }
.metrics-chart-groups { display:flex; flex-direction:column; gap:14px; }
.metrics-chart-group { display:flex; flex-direction:column; gap:8px; }
.metrics-chart-group-title { font-family:'Nunito',sans-serif; font-size:15px !important; font-weight:900; color:var(--text2); }
.metrics-chart-grid-two { grid-template-columns:repeat(2, minmax(0, 1fr)); }
.metrics-summary-grid { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:10px; }
.metrics-chart-card { border:1px solid var(--border); border-radius:14px; padding:10px; background:var(--bg); display:flex; flex-direction:column; gap:8px; min-width:0; }
.metrics-summary-card { gap:10px; }
.metrics-chart-head { display:flex; align-items:flex-start; justify-content:space-between; gap:8px; }
.metrics-chart-head strong { font-family:'Nunito',sans-serif; font-size:13px !important; color:var(--text); line-height:1.15; }
.metrics-chart-head span { color:var(--text2); font-weight:800; font-size:11px; text-align:right; }
.metrics-summary-table { display:flex; flex-direction:column; gap:4px; height:100%; }
.metrics-summary-head,
.metrics-summary-row { display:grid; grid-template-columns:minmax(0, 1fr) 132px 110px; gap:12px; align-items:center; }
.metrics-summary-head { color:var(--text3); font-size:10px; font-weight:900; text-transform:uppercase; letter-spacing:.04em; padding-bottom:5px; border-bottom:1px solid rgba(220, 216, 207, .8); }
.metrics-summary-head strong { color:var(--text2); font-size:12px; text-transform:none; letter-spacing:0; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.metrics-summary-body { display:flex; flex-direction:column; gap:4px; flex:1; }
.metrics-summary-row { padding:6px 0; border-bottom:1px solid rgba(220, 216, 207, .55); }
.metrics-summary-row-action { cursor:pointer; border-radius:10px; padding-left:8px; padding-right:8px; margin-left:-8px; margin-right:-8px; transition:background .12s, border-color .12s; }
.metrics-summary-row-action:hover { background:var(--purple-soft); }
.metrics-summary-row-action:focus-visible { outline:none; background:var(--purple-soft); box-shadow:0 0 0 2px rgba(129,33,137,.16); }
.metrics-summary-row:last-child { border-bottom:none; padding-bottom:0; }
.metrics-summary-row strong { color:var(--text2); font-size:12px; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.metrics-summary-row span,
.metrics-summary-row b,
.metrics-summary-head span { justify-self:end; text-align:right; }
.metrics-summary-row span { color:var(--text2); font-size:12px; }
.metrics-summary-row b { color:var(--green-dark); font-size:12px !important; }
.metrics-summary-row-filler { color:transparent; }
.metrics-summary-row-filler strong,
.metrics-summary-row-filler span,
.metrics-summary-row-filler b { color:transparent; }
.metrics-summary-total { margin-top:4px; padding-top:8px; border-top:1.5px solid var(--border2); border-bottom:none; }
.metrics-summary-total strong,
.metrics-summary-total span,
.metrics-summary-total b { font-weight:900; }
.metrics-detail-modal { width:min(100vw - 28px, 1180px); max-width:1180px; }
.metrics-cultivo-detail-grid { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:14px; align-items:start; }
.metrics-cultivo-detail-card { background:var(--bg); border:1px solid var(--border); border-radius:16px; padding:16px; display:flex; flex-direction:column; gap:12px; min-width:0; }
.metrics-cultivo-detail-head { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.metrics-cultivo-detail-head strong { font-family:'Nunito',sans-serif; font-size:15px; color:var(--text); }
.metrics-cultivo-detail-head span { color:var(--text3); font-weight:800; }
.metrics-cultivo-detail-list { display:flex; flex-direction:column; gap:8px; }
.metrics-cultivo-detail-row,
.metrics-cultivo-business-btn { display:flex; align-items:center; justify-content:space-between; gap:14px; border:1px solid var(--border); background:#fff; border-radius:12px; padding:12px 14px; min-width:0; }
.metrics-cultivo-detail-row strong,
.metrics-cultivo-business-btn strong { font-family:'Nunito',sans-serif; font-size:13px; color:var(--text); line-height:1.25; }
.metrics-cultivo-detail-row span,
.metrics-cultivo-business-btn span { font-size:12px; color:var(--text2); }
.metrics-cultivo-detail-values { flex-shrink:0; min-width:92px; display:flex; flex-direction:column; align-items:flex-end; gap:3px; text-align:right; }
.metrics-cultivo-detail-values b,
.metrics-cultivo-business-btn b { color:var(--green-dark); font-size:12px; }
.metrics-cultivo-detail-copy { flex:1; min-width:0; display:flex; flex-direction:column; gap:4px; text-align:left; }
.metrics-cultivo-business-btn { width:100%; cursor:pointer; transition:all .12s; }
.metrics-cultivo-business-btn:hover { background:var(--purple-soft); border-color:var(--purple-mid); }
.metrics-donut-wrap { display:flex; align-items:center; justify-content:center; }
.metrics-donut { width:92px; height:92px; }
.metrics-donut-track { fill:none; stroke:var(--border); stroke-width:18; }
.metrics-donut-total { fill:var(--text); font-family:'Nunito',sans-serif; font-size:15px; font-weight:900; }
.metrics-donut-sub { fill:var(--text3); font-size:8px; font-weight:800; }
.metrics-legend { display:flex; flex-direction:column; gap:4px; }
.metrics-legend-dense { margin-top:2px; }
.metrics-legend-item { display:grid; grid-template-columns:minmax(0, 1fr) auto; gap:6px; align-items:center; border-top:1px solid rgba(220, 216, 207, .75); padding-top:5px; }
.metrics-legend-copy { display:flex; align-items:center; gap:6px; min-width:0; }
.metrics-legend-copy strong { color:var(--text2); font-size:11px; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.metrics-legend-dot { width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.metrics-legend-item b { color:var(--green-dark); font-size:11px !important; }
.metrics-sublist { display:flex; flex-direction:column; gap:10px; }
.metrics-sublist-title { color:var(--text2); font-weight:900; font-size:15px; }
.metrics-delivery-list { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:10px; }
.metrics-delivery-column { display:flex; flex-direction:column; gap:10px; }
.metrics-delivery-card { border:1px solid var(--border); border-radius:14px; background:var(--bg); overflow:hidden; }
.metrics-delivery-card.open { background:#fff; }
.metrics-delivery-toggle { width:100%; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 14px; background:transparent; border:none; text-align:left; }
.metrics-delivery-toggle.disabled { cursor:default; }
.metrics-delivery-copy { display:flex; align-items:center; gap:8px; min-width:0; flex-wrap:wrap; }
.metrics-delivery-copy strong { font-family:'Nunito',sans-serif; font-size:14px !important; color:var(--text); }
.metrics-delivery-count-chip { color:var(--text3); font-size:11px; font-weight:800; }
.metrics-delivery-side { display:flex; align-items:center; gap:12px; flex-shrink:0; }
.metrics-delivery-side b { color:var(--green-dark); font-size:13px !important; }
.metrics-delivery-caret { width:24px; height:24px; border-radius:50%; background:rgba(129, 33, 137, .08); color:var(--purple); display:flex; align-items:center; justify-content:center; font-size:16px; font-weight:900; }
.metrics-delivery-caret.disabled { background:rgba(88, 89, 91, .08); color:var(--text3); }
.metrics-delivery-details { border-top:1px solid var(--border); padding:6px 14px 12px; display:flex; flex-direction:column; gap:6px; }
.metrics-delivery-detail { display:grid; grid-template-columns:minmax(0, 1fr) auto; gap:10px; align-items:center; padding:8px 0; border-bottom:1px solid rgba(220, 216, 207, .65); }
.metrics-delivery-detail:last-child { border-bottom:none; padding-bottom:0; }
.metrics-delivery-detail-copy { display:flex; flex-direction:column; gap:2px; min-width:0; }
.metrics-delivery-detail-copy strong { color:var(--text2); font-size:12px; }
.metrics-delivery-detail-copy span { color:var(--text3); font-size:11px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.metrics-delivery-detail b { color:var(--green-dark); font-size:12px !important; }
.metrics-product-list { display:flex; flex-direction:column; gap:9px; }
.metrics-product-row { border:1px solid var(--border); border-radius:14px; padding:11px 12px; display:flex; align-items:center; justify-content:space-between; gap:12px; background:var(--bg); }
.metrics-product-row strong { font-family:'Nunito',sans-serif; color:var(--text); }
.metrics-product-row span,
.metrics-product-values small { color:var(--text3); font-weight:700; }
.metrics-product-values { display:flex; flex-direction:column; align-items:flex-end; gap:2px; text-align:right; }
.metrics-product-values b { color:var(--green-dark); font-size:16px !important; }
.metrics-empty { color:var(--text3); background:var(--bg); border:1px dashed var(--border); border-radius:12px; padding:14px; text-align:center; }
.metrics-table-wrap { overflow:auto; border:1px solid var(--border); border-radius:14px; }
.metrics-table { width:100%; border-collapse:collapse; min-width:760px; background:#fff; }
.metrics-table th,
.metrics-table td { padding:10px 12px; border-bottom:1px solid var(--border); text-align:left; white-space:nowrap; }
.metrics-table th { background:var(--bg); color:var(--text3); font-weight:900; }
.metrics-table td { color:var(--text2); font-weight:700; }
.metrics-table tr.active td { background:var(--purple-soft); color:var(--purple); }
.metrics-table tr.metrics-table-total td { background:var(--bg); font-weight:900; color:var(--text); }
.metrics-table tr:last-child td { border-bottom:none; }

/* Clients */
.clients-wrap { flex:1; overflow:auto; padding:20px 28px; display:flex; gap:16px; }
.clients-list { width:460px; flex-shrink:0; display:flex; flex-direction:column; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; align-self:flex-start; max-height:calc(100vh - 175px); }
.clients-search { padding:10px 14px; border-bottom:1px solid var(--border); }
.clients-search input { width:100%; background:var(--bg); border:1px solid var(--border); border-radius:6px; padding:7px 10px; font-size:13px; color:var(--text); }
.clients-search input:focus { border-color:var(--purple); background:#fff; }
.clients-filter-row { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:8px; margin-top:10px; }
.clients-filter-dropdown,
.clients-filter-dropdown .filter-dropdown-trigger { width:100%; min-width:0; }
.clients-filter-dropdown .filter-dropdown-trigger { height:40px; min-height:40px; padding:8px 14px; border-radius:14px; font-size:15px; }
.client-item { padding:10px 14px; border-bottom:1px solid var(--border); cursor:pointer; transition:background .1s; display:flex; align-items:center; gap:10px; }
.client-item:last-child { border-bottom:none; }
.client-item:hover { background:var(--bg); }
.client-item.selected { background:var(--purple-soft); }
.client-avatar { width:34px; height:34px; border-radius:50%; background:var(--purple); display:flex; align-items:center; justify-content:center; color:#fff; font-family:'Nunito',sans-serif; font-size:12px; font-weight:800; flex-shrink:0; }
.client-name { font-family:'Nunito',sans-serif; font-size:13px; font-weight:700; }
.client-sub { font-size:11px; color:var(--text3); }
.clients-scroll { overflow-y:auto; flex:1; }
.clients-empty-state { padding:18px 16px; color:var(--text3); font-size:12px; text-align:center; }
.client-detail { flex:1; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; display:flex; flex-direction:column; max-height:calc(100vh - 175px); }
.client-detail-hdr { padding:16px 20px 13px; border-bottom:1px solid var(--border); display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.client-detail-body { padding:16px 20px; overflow-y:auto; flex:1; display:flex; flex-direction:column; gap:14px; }
.detail-section { display:flex; flex-direction:column; gap:9px; }
.section-title { font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.1em; color:var(--text3); padding-bottom:6px; border-bottom:1px solid var(--border); }
.detail-grid { display:grid; grid-template-columns:1fr 1fr; gap:9px; }
.detail-field { display:flex; flex-direction:column; gap:3px; }
.detail-label { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.08em; color:var(--text3); }
.detail-value { font-size:13px; color:var(--text); }
.detail-value.empty { color:var(--text3); font-style:italic; }
.sub-items { display:flex; flex-direction:column; gap:7px; }
.sub-item { background:var(--bg); border:1px solid var(--border); border-radius:var(--radius-sm); padding:8px 11px; display:flex; align-items:flex-start; justify-content:space-between; gap:8px; }
.sub-item-info { flex:1; display:flex; flex-direction:column; gap:2px; }
.sub-item-name { font-size:13px; font-weight:700; font-family:'Nunito',sans-serif; }
.sub-item-meta { font-size:11px; color:var(--text2); }
.btn-icon { width:24px; height:24px; border-radius:5px; background:transparent; border:none; color:var(--text3); font-size:12px; display:flex; align-items:center; justify-content:center; transition:all .12s; cursor:pointer; }
.btn-icon:hover { background:var(--border); color:var(--text); }
.btn-del:hover { background:var(--red-soft); color:var(--red); }
.no-client-selected { flex:1; display:flex; align-items:center; justify-content:center; color:var(--text3); font-size:13px; flex-direction:column; gap:10px; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); }
.info-chip { background:rgba(129,33,137,.1); color:var(--purple); border-radius:5px; padding:2px 8px; font-size:10px; font-weight:600; }

/* ── SEGUIMIENTO ───────────────────────────────────── */
.seg-layout { flex:1; overflow:hidden; display:flex; gap:16px; padding:20px 28px; }

/* Left panel — entity selector */
.seg-left { width:280px; flex-shrink:0; border:1px solid var(--border); border-radius:var(--radius); display:flex; flex-direction:column; background:var(--surface); overflow:hidden; align-self:flex-start; max-height:calc(100vh - 175px); }
.seg-left-header { padding:12px 16px; border-bottom:1px solid var(--border); }
.seg-search-shell { display:block; }
.seg-search { width:100%; background:var(--bg); border:1.5px solid var(--border); border-radius:6px; padding:7px 10px; font-size:13px; color:var(--text); transition:border .15s; }
.seg-search:focus { border-color:var(--purple); background:#fff; }
.seg-filter-row { display:flex; gap:5px; margin-top:8px; }
.seg-filter-btn { flex:1; padding:4px 0; border-radius:5px; font-size:11px; font-weight:700; border:1px solid var(--border); background:transparent; color:var(--text2); transition:all .12s; }
.seg-filter-btn.active { background:var(--green); color:#fff; border-color:var(--green); }
.seg-list { overflow-y:auto; flex:1; }
.seg-entity { padding:11px 16px; border-bottom:1px solid var(--border); cursor:pointer; transition:background .1s; }
.seg-entity:hover { background:var(--bg); }
.seg-entity.selected { background:var(--purple-soft); }
.seg-entity-type { font-size:9px; font-weight:800; text-transform:uppercase; letter-spacing:.08em; margin-bottom:3px; }
.seg-entity-name { font-family:'Nunito',sans-serif; font-size:13px; font-weight:700; }
.seg-entity-sub { font-size:11px; color:var(--text3); margin-top:2px; display:flex; align-items:center; gap:6px; }
.seg-badge { font-size:9px; font-weight:700; padding:1px 6px; border-radius:10px; }

/* Right panel — timeline */
.seg-right { flex:1; display:flex; flex-direction:column; overflow:hidden; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); max-height:calc(100vh - 175px); }
.seg-right-header { padding:14px 20px 12px; border-bottom:1px solid var(--border); display:flex; align-items:center; justify-content:space-between; flex-shrink:0; background:var(--surface); }
.seg-entity-title { font-family:'Nunito',sans-serif; font-weight:800; font-size:15px; }
.seg-entity-crumb { font-size:11px; color:var(--text3); margin-top:2px; }

/* Quick add */
.seg-quick-add { padding:14px 20px; border-bottom:1px solid var(--border); background:var(--bg); flex-shrink:0; }
.seg-quick-row { display:flex; gap:8px; align-items:flex-end; }
.seg-type-pills { display:flex; gap:5px; margin-bottom:8px; }
.seg-type-pill { padding:4px 12px; border-radius:20px; font-size:11px; font-weight:700; border:1.5px solid; cursor:pointer; transition:all .12s; }
.qa-input { flex:1; background:#fff; border:1.5px solid var(--border); border-radius:7px; padding:8px 12px; font-size:13px; color:var(--text); transition:border .15s; }
.qa-input:focus { border-color:var(--purple); }
.qa-input::placeholder { color:var(--text3); }
.qa-extras { display:flex; gap:8px; margin-top:8px; }
.qa-extra-input { background:#fff; border:1.5px solid var(--border); border-radius:6px; padding:6px 10px; font-size:12px; color:var(--text); flex:1; transition:border .15s; }
.qa-extra-input:focus { border-color:var(--purple); }
.btn-submit { background:var(--purple); color:#fff; padding:8px 16px; border-radius:7px; font-size:13px; font-weight:700; transition:background .12s; white-space:nowrap; }
.btn-submit:hover { background:var(--purple-dark); }
.negocio-seg-quick-add { width:100%; }
.negocio-seg-compose { display:flex; flex-direction:column; gap:8px; width:100%; }
.negocio-seg-type-pills { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:8px; }
.negocio-seg-type-pill { width:100%; min-height:46px; display:flex; align-items:center; justify-content:center; text-align:center; padding:6px 10px; }
.negocio-seg-title-input { width:100%; min-height:110px; resize:vertical; line-height:1.45; }
.negocio-seg-meta-grid { display:flex; flex-wrap:wrap; gap:8px; align-items:flex-end; }
.negocio-seg-meta-grid > .qa-extra-input:first-child { flex:1 1 100%; }
.negocio-seg-meta-grid > .qa-extra-input[type="date"] { flex:0 0 160px; }
.negocio-seg-action-row { display:grid; grid-template-columns:minmax(0, 1fr) auto; gap:8px; align-items:end; flex:1 1 300px; min-width:0; }
.negocio-seg-responsable { min-width:0; width:100%; }
.negocio-seg-add-btn { min-width:104px; min-height:46px; display:inline-flex; align-items:center; justify-content:center; }

/* Timeline */
.seg-timeline { flex:1; overflow-y:auto; padding:16px 20px; display:flex; flex-direction:column; gap:0; }
.seg-date-group { margin-bottom:16px; }
.seg-date-label { font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.1em; color:var(--text3); margin-bottom:8px; display:flex; align-items:center; gap:8px; }
.seg-date-label::after { content:''; flex:1; height:1px; background:var(--border); }
.seg-entry { display:flex; gap:12px; margin-bottom:8px; position:relative; }
.seg-entry-icon { width:32px; height:32px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:14px; flex-shrink:0; margin-top:2px; }
.seg-entry-body { flex:1; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:11px 14px; transition:border .12s; cursor:pointer; }
.seg-entry-body:hover { border-color:var(--border2); }
.seg-entry-body.done { opacity:.6; }
.seg-entry-top { display:flex; align-items:flex-start; justify-content:space-between; gap:8px; margin-bottom:4px; }
.seg-entry-title { font-family:'Nunito',sans-serif; font-size:13px; font-weight:700; line-height:1.3; }
.seg-entry-title.done-text { text-decoration:line-through; color:var(--text3); }
.seg-entry-actions { display:flex; gap:4px; align-items:center; flex-shrink:0; }
.seg-entry-desc { font-size:12px; color:var(--text2); line-height:1.5; margin-bottom:5px; }
.seg-entry-meta { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.seg-meta-item { font-size:10px; color:var(--text3); display:flex; align-items:center; gap:3px; }
.seg-meta-item.overdue { color:var(--red); font-weight:700; }
.seg-check { width:18px; height:18px; border-radius:50%; border:2px solid; cursor:pointer; display:flex; align-items:center; justify-content:center; transition:all .15s; flex-shrink:0; margin-top:7px; }
.seg-check:disabled { cursor:default; opacity:.6; }
.seg-check-placeholder { width:18px; flex-shrink:0; }
.type-tag { padding:2px 8px; border-radius:10px; font-size:10px; font-weight:700; }
.seg-inline-action { padding:4px 10px; border-radius:999px; border:1px solid var(--border); background:#fff; color:var(--purple); font-size:10px; font-weight:800; transition:all .12s; }
.seg-inline-action:hover { border-color:var(--purple-mid); background:var(--purple-soft); }
.seg-inline-action:disabled { opacity:.6; cursor:default; }
.seg-empty { flex:1; display:flex; align-items:center; justify-content:center; flex-direction:column; gap:10px; color:var(--text3); font-size:13px; padding:40px; text-align:center; }
.seg-no-entity { flex:1; display:flex; align-items:center; justify-content:center; flex-direction:column; gap:10px; color:var(--text3); font-size:13px; }

/* I+D & Prod */
.phase-wrap { padding:20px 28px; overflow:auto; flex:1; }
.phase-board { display:flex; gap:12px; min-width:max-content; align-items:flex-start; }
.phase-col { width:245px; flex-shrink:0; }
.gantt-page { flex:1; overflow:auto; }
.gantt-wrap { min-width:860px; padding-bottom:24px; }
.gantt-toolbar { padding:14px 28px 0; display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.month-nav { display:flex; align-items:center; gap:8px; }
.nav-btn { width:28px; height:28px; border-radius:50%; background:var(--surface); border:1px solid var(--border); color:var(--text); font-size:14px; display:flex; align-items:center; justify-content:center; transition:all .12s; }
.nav-btn:hover { background:var(--purple-soft); border-color:var(--purple-mid); color:var(--purple); }
.month-lbl { font-family:'Nunito',sans-serif; font-weight:800; font-size:14px; min-width:136px; text-align:center; }
.g-header { display:flex; background:var(--surface); border-bottom:2px solid var(--border); position:sticky; top:0; z-index:10; margin:0 28px; border-radius:var(--radius) var(--radius) 0 0; overflow:hidden; }
.g-label-col { width:210px; flex-shrink:0; padding:9px 14px; font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.09em; color:var(--text3); border-right:1px solid var(--border); }
.g-days { flex:1; display:flex; }
.g-day { flex:1; text-align:center; padding:9px 0; font-size:10px; font-weight:600; color:var(--text3); border-right:1px solid var(--border); font-family:'Nunito',sans-serif; }
.g-day.g-today { color:var(--purple); font-weight:800; }
.g-day.g-weekend { color:#C8C5BC; }
.g-body { margin:0 28px; border:1px solid var(--border); border-top:none; border-radius:0 0 var(--radius) var(--radius); overflow:hidden; background:var(--surface); }
.g-row { display:flex; border-bottom:1px solid var(--border); min-height:44px; align-items:center; transition:background .1s; cursor:pointer; }
.g-row:last-child { border-bottom:none; }
.g-row:hover { background:#faf9f7; }
.g-info { width:210px; flex-shrink:0; padding:7px 14px; border-right:1px solid var(--border); display:flex; flex-direction:column; gap:3px; overflow:hidden; }
.g-title { font-size:12px; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-family:'Nunito',sans-serif; }
.g-bars { flex:1; position:relative; height:44px; }
.g-daybg { position:absolute; top:0; bottom:0; border-right:1px solid rgba(226,224,218,.6); }
.g-daybg.wknd { background:rgba(0,0,0,.012); }
.g-daybg.tod { border-right:1px solid rgba(129,33,137,.25); }
.g-todayline { position:absolute; top:0; bottom:0; width:1.5px; background:var(--purple); opacity:.4; z-index:3; }
.g-bar { position:absolute; top:9px; bottom:9px; border-radius:5px; display:flex; align-items:center; padding:0 7px; overflow:hidden; cursor:pointer; transition:filter .12s; min-width:5px; }
.g-bar:hover { filter:brightness(1.07); }
.g-bar-lbl { font-size:10px; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color:#fff; }
.g-bar-prog { position:absolute; bottom:0; left:0; height:3px; border-radius:0 0 5px 5px; background:rgba(255,255,255,.5); }

/* ── I+D Drawer ───────────────────────────────────── */
.id-toolbar { margin:10px 24px 0; background:var(--surface); border:1px solid var(--border); border-radius:18px; box-shadow:var(--shadow-sm); padding:8px 20px; min-height:60px; display:grid; grid-template-columns:minmax(0, 1fr) auto; gap:14px; align-items:center; flex-shrink:0; }
.id-period-controls { width:auto; justify-content:flex-end; }
.id-period-controls .commercial-period-picker { width:auto; }
.id-period-controls .commercial-period-trigger { min-width:0; min-height:44px; height:44px; padding:9px 17px; border-radius:18px; border:none; background:var(--green); color:#fff; box-shadow:none; }
.id-period-controls .commercial-period-trigger:hover,
.id-period-controls .commercial-period-trigger.open { background:var(--green-dark); border:none; }
.id-period-controls .commercial-period-trigger-label,
.id-period-controls .commercial-period-trigger-caret { color:#fff; }
.id-toolbar-actions { display:flex; justify-content:flex-end; align-items:center; gap:10px; flex-wrap:wrap; }
.inventory-choice-modal { max-width:420px; }
.inventory-choice-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.inventory-choice-btn {
  min-height:108px;
  border-radius:18px;
  border:1.5px solid var(--border);
  background:var(--bg);
  font-family:'Nunito',sans-serif;
  font-size:18px;
  font-weight:800;
  color:var(--text);
  transition:transform .15s, border-color .15s, box-shadow .15s, background .15s;
}
.inventory-choice-btn:hover { transform:translateY(-1px); box-shadow:var(--shadow-sm); }
.inventory-choice-btn.add { background:var(--purple-soft); border-color:var(--purple-mid); color:var(--purple); }
.inventory-choice-btn.discard { background:#fff4f3; border-color:#f2b7b1; color:var(--red); }
.inventory-choice-footer { justify-content:center; }
.id-summary-grid { display:grid; grid-template-columns:repeat(5, 188px); gap:11px; justify-content:flex-start; }
.id-summary-card { min-height:44px; background:var(--bg); border:1px solid var(--border); border-radius:18px; padding:9px 14px; display:flex; align-items:center; justify-content:space-between; gap:10px; box-shadow:var(--shadow-sm); white-space:nowrap; }
.id-summary-label { color:var(--text2); font-weight:800; font-size:13px; line-height:1; overflow:hidden; text-overflow:ellipsis; }
.id-summary-card strong { font-family:'Nunito',sans-serif; font-size:22px; line-height:1; flex-shrink:0; color:var(--text); }
.id-layout { flex:1; display:flex; overflow:hidden; }
.id-kanban-area { flex:1; overflow:auto; padding:16px 20px; }
.id-board { display:grid; grid-template-columns:repeat(5, 188px); gap:11px; justify-content:flex-start; min-width:max-content; align-items:start; margin:0; }
.id-col { width:188px; flex-shrink:0; display:flex; flex-direction:column; }
.id-card { background:var(--surface); border:1.5px solid var(--border); border-radius:var(--radius); padding:11px 12px; box-shadow:var(--shadow-sm); cursor:pointer; transition:all .15s; position:relative; overflow:hidden; margin-bottom:8px; }
.id-card:hover { transform:translateY(-1px); box-shadow:var(--shadow); border-color:var(--border2); }
.id-card.active { border-color:var(--purple); box-shadow:0 0 0 2px var(--purple-soft),var(--shadow); }
.id-card-stripe { position:absolute; left:0; top:0; bottom:0; width:3px; border-radius:3px 0 0 3px; }
.id-card-title { font-family:'Nunito',sans-serif; font-size:12px; font-weight:800; line-height:1.3; margin-bottom:4px; }
.id-card-obj { font-size:10px; color:var(--text2); line-height:1.4; margin-bottom:6px; }
.id-card-footer { display:flex; align-items:center; justify-content:space-between; gap:4px; }
.cepa-fields { display:flex; flex-direction:column; gap:10px; }
.cepa-vials { display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; }
.cepa-function-picker { display:flex; flex-direction:column; gap:10px; }
.cepa-function-options { display:flex; flex-wrap:wrap; gap:8px; }
.cepa-function-select-row { display:flex; gap:8px; align-items:center; }
.cepa-function-select-row select { flex:1; min-width:0; }
.cepa-function-chip { padding:8px 12px; border-radius:999px; border:1.5px solid var(--border); background:var(--bg); color:var(--text2); font-size:12px; font-weight:700; transition:all .12s; }
.cepa-function-chip.active { background:var(--green-soft); border-color:#b8d994; color:var(--green-dark); }
.cepa-function-chip:disabled { opacity:.6; cursor:default; }
.cepa-function-add { display:flex; gap:8px; align-items:center; }
.cepa-function-add input { flex:1; min-width:0; }
.cepa-function-plus { width:42px; height:42px; flex-shrink:0; border-radius:14px; border:1.5px dashed var(--purple-mid); background:var(--purple-soft); color:var(--purple); font-size:24px; font-weight:800; line-height:1; transition:all .12s; }
.cepa-function-plus:hover:not(:disabled) { background:#fff; border-color:var(--purple); }
.cepa-function-plus:disabled { opacity:.45; cursor:default; }
.cepario-toolbar { margin:10px 24px 0; background:var(--surface); border:1px solid var(--border); border-radius:18px; box-shadow:var(--shadow-sm); padding:12px 18px; display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap; }
.cepario-tabs { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.cepario-toolbar-actions { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-left:auto; }
.cepario-tab { min-height:50px; padding:10px 14px; border-radius:16px; border:1.5px solid var(--border); background:var(--bg); display:flex; align-items:center; gap:10px; font-family:'Nunito',sans-serif; font-size:13px; font-weight:800; color:var(--text2); transition:all .15s; }
.cepario-tab span { line-height:1.25; text-align:left; }
.cepario-tab strong { font-size:20px; line-height:1; color:var(--text); }
.cepario-tab:hover { border-color:var(--purple-mid); color:var(--text); }
.cepario-tab.active { background:var(--purple-soft); border-color:var(--purple-mid); color:var(--purple); box-shadow:0 0 0 2px rgba(129,33,137,.08); }
.cepario-filter-select { min-width:220px; height:44px; border-radius:16px; border:1.5px solid var(--border); background:var(--bg); color:var(--text); font-size:13px; font-weight:700; padding:0 38px 0 14px; appearance:none; -webkit-appearance:none; background-image:linear-gradient(45deg, transparent 50%, var(--text2) 50%), linear-gradient(135deg, var(--text2) 50%, transparent 50%); background-position:calc(100% - 18px) 50%, calc(100% - 12px) 50%; background-size:6px 6px, 6px 6px; background-repeat:no-repeat; }
.cepario-table-shell { flex:1; min-width:0; overflow:hidden; padding:16px 20px; }
.cepario-table-wrap { width:100%; height:100%; overflow:auto; background:var(--surface); border:1px solid var(--border); border-radius:20px; box-shadow:var(--shadow-sm); }
.cepario-table { width:max-content; min-width:100%; border-collapse:separate; border-spacing:0; }
.cepario-table thead th { position:sticky; top:0; z-index:2; background:#f7f5f1; color:var(--text2); font-size:11px; font-weight:800; letter-spacing:.04em; text-transform:none; padding:14px 12px; text-align:left; border-bottom:1px solid var(--border); white-space:normal; vertical-align:bottom; }
.cepario-table tbody td { padding:12px; font-size:13px; line-height:1.45; border-bottom:1px solid rgba(226,224,218,.9); color:var(--text); background:var(--surface); vertical-align:top; }
.cepario-table tbody tr { cursor:pointer; transition:background .15s; }
.cepario-table tbody tr:hover td { background:#faf8f4; }
.cepario-table tbody tr.active td { background:var(--purple-soft); }
.cepario-table tbody tr:last-child td { border-bottom:none; }
.cepario-code-cell { font-family:'Nunito',sans-serif; font-weight:800; white-space:nowrap; }
.cepario-empty-cell { text-align:center; color:var(--text3); font-style:italic; padding:24px 16px !important; }
.id-hito-bar { height:3px; border-radius:2px; background:var(--border); overflow:hidden; margin-top:6px; }
.id-hito-bar-fill { height:100%; border-radius:2px; background:var(--green); transition:width .4s; }

/* Drawer */
.id-drawer { width:460px; flex-shrink:0; border-left:1px solid var(--border); background:var(--surface); display:flex; flex-direction:column; overflow:hidden; transition:width .2s; }
.id-drawer.closed { width:0; border:none; }
.id-drawer-hdr { padding:14px 18px 0; border-bottom:1px solid var(--border); flex-shrink:0; }
.id-drawer-top { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; margin-bottom:10px; }
.id-drawer-title { font-family:'Nunito',sans-serif; font-weight:800; font-size:15px; line-height:1.3; }
.id-drawer-tabs { display:flex; gap:0; }
.id-dtab { padding:8px 14px; font-size:12px; font-weight:700; color:var(--text3); border-bottom:2px solid transparent; cursor:pointer; background:transparent; transition:all .12s; white-space:nowrap; }
.id-dtab:hover { color:var(--text); }
.id-dtab.active { color:var(--purple); border-bottom-color:var(--purple); }
.id-drawer-body { flex:1; overflow-y:auto; padding:16px 18px; display:flex; flex-direction:column; gap:14px; }
.id-drawer-body.hitos-open { padding-bottom:180px; overflow-x:visible; }

/* Info tab */
.id-info-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.id-field { display:flex; flex-direction:column; gap:4px; }
.id-label { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.08em; color:var(--text3); }
.id-val { font-size:13px; color:var(--text); }
.id-val.empty { color:var(--text3); font-style:italic; }
.id-input { background:var(--bg); border:1.5px solid var(--border); border-radius:var(--radius-sm); color:var(--text); padding:6px 9px; font-size:13px; transition:border .15s; width:100%; min-height:42px; font-family:'Nunito Sans',sans-serif; }
.id-input:focus { border-color:var(--purple); background:#fff; }
.id-select { appearance:none; -webkit-appearance:none; background:var(--bg); border:1.5px solid var(--border); border-radius:var(--radius-sm); color:var(--text); padding:6px 32px 6px 9px; font-size:13px; width:100%; height:42px; line-height:1.2; font-family:'Nunito Sans',sans-serif; background-image:linear-gradient(45deg, transparent 50%, var(--text2) 50%), linear-gradient(135deg, var(--text2) 50%, transparent 50%); background-position:calc(100% - 18px) 50%, calc(100% - 12px) 50%; background-size:6px 6px, 6px 6px; background-repeat:no-repeat; }
.id-textarea { background:var(--bg); border:1.5px solid var(--border); border-radius:var(--radius-sm); color:var(--text); padding:6px 9px; font-size:13px; width:100%; min-height:160px; resize:vertical; font-family:'Nunito Sans',sans-serif; }
.id-textarea:focus,.id-input:focus { border-color:var(--purple); background:#fff; outline:none; }
.id-notes-field { flex:1; min-height:190px; }
.id-notes-field .notes-textarea { flex:1; min-height:100%; }
.adm-type-picker { display:flex; flex-direction:column; gap:8px; }
.adm-type-select-row { display:flex; gap:8px; align-items:center; }
.adm-type-select-row select,
.adm-type-select-row .id-select { flex:1; }
.adm-type-add-btn { width:42px; height:42px; flex-shrink:0; border-radius:var(--radius-sm); border:1.5px dashed var(--purple-mid); background:var(--purple-soft); color:var(--purple); font-size:22px; font-weight:800; line-height:1; transition:all .12s; }
.adm-type-add-btn:hover:not(:disabled) { background:#fff; border-color:var(--purple); }
.adm-type-add-btn:disabled { opacity:.55; cursor:default; }
.adm-type-add-row { display:flex; flex-direction:column; gap:8px; width:100%; }
.adm-type-add-row .id-input { width:100%; min-width:0; min-height:46px; }
.adm-type-inline-actions { display:flex; justify-content:flex-end; gap:8px; flex-wrap:wrap; }
.adm-type-inline-btn { min-height:42px; min-width:110px; white-space:nowrap; }
.adm-toolbar { margin:10px 24px 0; background:var(--surface); border:1px solid var(--border); border-radius:18px; box-shadow:var(--shadow-sm); padding:8px 20px; min-height:60px; display:grid; grid-template-columns:minmax(0, 1fr) auto; gap:14px; align-items:center; flex-shrink:0; }
.adm-summary-grid { display:grid; grid-template-columns:repeat(3, 188px); gap:11px; justify-content:flex-start; }
.adm-summary-card { min-height:44px; background:var(--bg); border:1px solid var(--border); border-radius:18px; padding:9px 14px; display:flex; align-items:center; justify-content:space-between; gap:10px; box-shadow:var(--shadow-sm); white-space:nowrap; }
.adm-summary-label { color:var(--text2); font-weight:800; font-size:13px; line-height:1; overflow:hidden; text-overflow:ellipsis; }
.adm-summary-card strong { font-family:'Nunito',sans-serif; font-size:22px; line-height:1; flex-shrink:0; color:var(--text); }
.adm-toolbar-actions { display:flex; justify-content:flex-end; align-items:center; gap:10px; flex-wrap:wrap; }
.sala-shell { flex:1; display:grid; grid-template-columns:320px minmax(0, 1fr); gap:16px; padding:16px 24px 24px; min-height:0; }
.sala-thread-list,
.sala-panel { background:var(--surface); border:1px solid var(--border); border-radius:22px; box-shadow:var(--shadow-sm); min-height:0; display:flex; flex-direction:column; overflow:hidden; }
.sala-thread-list-head,
.sala-panel-head { padding:14px 16px; border-bottom:1px solid var(--border); display:flex; align-items:center; justify-content:space-between; gap:12px; }
.sala-thread-list-head strong,
.sala-panel-head strong { font-family:'Nunito',sans-serif; font-size:15px; color:var(--text); }
.sala-thread-list-head span,
.sala-panel-head span { display:block; font-size:12px; color:var(--text3); margin-top:3px; }
.sala-thread-list-scroll { flex:1; overflow:auto; padding:12px; display:flex; flex-direction:column; gap:10px; }
.sala-thread-item { width:100%; text-align:left; background:var(--bg); border:1px solid var(--border); border-radius:16px; padding:12px 13px; display:flex; flex-direction:column; gap:6px; transition:all .12s; }
.sala-thread-item:hover,
.sala-thread-item.active { background:#fff; border-color:var(--purple-mid); box-shadow:var(--shadow-sm); }
.sala-thread-item-top { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.sala-thread-item-top strong { font-family:'Nunito',sans-serif; font-size:13px; color:var(--text); line-height:1.3; }
.sala-thread-unread { min-width:22px; height:22px; border-radius:999px; background:var(--purple); color:#fff; font-size:11px; font-weight:800; display:inline-flex; align-items:center; justify-content:center; padding:0 6px; }
.sala-thread-preview { font-size:12px; color:var(--text2); line-height:1.45; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.sala-thread-item small { color:var(--text3); font-size:11px; }
.sala-thread-ref-label { font-size:11px; color:var(--green-dark); font-weight:700; }
.sala-messages { flex:1; overflow:auto; padding:16px; display:flex; flex-direction:column; gap:12px; background:linear-gradient(180deg, #fcfbfd 0%, #f8f7fb 100%); }
.sala-message { display:flex; flex-direction:column; gap:4px; max-width:78%; }
.sala-message.mine { align-self:flex-end; }
.sala-message-meta { display:flex; align-items:center; gap:8px; font-size:11px; color:var(--text3); }
.sala-message-meta strong { font-size:12px; color:var(--text2); }
.sala-thread-ref-pill { display:inline-flex; align-items:center; gap:6px; margin-top:6px; padding:5px 10px; border-radius:999px; background:var(--green-soft); color:var(--green-dark); border:1px solid var(--green-border); font-size:11px; font-weight:700; }
.sala-thread-ref-pill.inline { margin-top:0; margin-bottom:4px; }
.sala-message-bubble { padding:11px 13px; border-radius:16px; background:#fff; border:1px solid var(--border); color:var(--text); line-height:1.5; white-space:pre-wrap; word-break:break-word; }
.sala-message.mine .sala-message-bubble { background:var(--purple-soft); border-color:var(--purple-mid); }
.sala-compose { padding:14px 16px; border-top:1px solid var(--border); display:flex; flex-direction:column; gap:10px; background:var(--surface); }
.sala-compose textarea { width:100%; min-height:96px; border-radius:14px; border:1.5px solid var(--border); background:var(--bg); color:var(--text); padding:12px 13px; resize:vertical; font-family:'Nunito Sans',sans-serif; font-size:14px; }
.sala-compose textarea:focus { outline:none; border-color:var(--purple); background:#fff; }
.sala-compose-actions { display:flex; justify-content:flex-end; }
.sala-audience-switch { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.sala-audience-btn { min-height:42px; border-radius:14px; border:1px solid var(--border); background:var(--bg); color:var(--text2); font-weight:800; transition:all .12s; }
.sala-audience-btn.active { background:var(--purple); border-color:var(--purple); color:#fff; }
.sala-user-picker { display:flex; flex-direction:column; gap:8px; max-height:260px; overflow:auto; }
.sala-user-option { display:flex; align-items:center; gap:10px; border:1px solid var(--border); border-radius:14px; background:var(--bg); padding:10px 12px; color:var(--text2); }
.sala-user-option.active { border-color:var(--purple-mid); background:var(--purple-soft); color:var(--purple); }
.sala-user-option input { width:16px; height:16px; accent-color:var(--purple); margin:0; }
.sala-reference-picker { display:flex; flex-direction:column; gap:8px; max-height:220px; overflow:auto; margin-top:10px; }
.sala-reference-summary { font-size:11px; color:var(--text3); font-weight:700; padding:2px 2px 0; }
.sala-reference-option { width:100%; text-align:left; border:1px solid var(--border); border-radius:14px; background:var(--bg); padding:10px 12px; display:flex; flex-direction:column; gap:4px; color:var(--text2); }
.sala-reference-option strong { font-size:13px; color:var(--text); }
.sala-reference-option span { font-size:11px; color:var(--text3); }
.sala-reference-option small { font-size:11px; color:var(--text2); line-height:1.4; }
.sala-reference-option.active { border-color:var(--green-border); background:var(--green-soft); }
.sala-reference-option-actions { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.adm-period-controls { width:auto; justify-content:flex-end; }
.adm-period-controls .commercial-period-picker { width:auto; }
.adm-period-controls .commercial-period-trigger { min-width:0; min-height:44px; height:44px; padding:9px 17px; border-radius:18px; border:none; background:var(--green); color:#fff; box-shadow:none; }
.adm-period-controls .commercial-period-trigger:hover,
.adm-period-controls .commercial-period-trigger.open { background:var(--green-dark); border:none; }
.adm-period-controls .commercial-period-trigger-label,
.adm-period-controls .commercial-period-trigger-caret { color:#fff; }
.prod-toolbar { margin:10px 24px 0; background:var(--surface); border:1px solid var(--border); border-radius:18px; box-shadow:var(--shadow-sm); padding:8px 20px; min-height:60px; display:grid; grid-template-columns:minmax(0, 1fr) auto; gap:14px; align-items:center; flex-shrink:0; }
.prod-summary-toolbar { grid-template-columns:minmax(0, 1fr) auto; }
.prod-summary-grid { display:grid; grid-template-columns:repeat(3, 188px); gap:11px; justify-content:flex-start; }
.prod-summary-grid-wide { grid-template-columns:repeat(4, 188px); }
.prod-summary-card { min-width:188px; }
.prod-toolbar-actions { display:flex; flex-direction:column; justify-content:center; align-items:flex-end; gap:8px; flex-wrap:nowrap; }
.prod-view-switch { display:inline-flex; align-items:center; gap:6px; padding:4px; border:1px solid rgba(94, 146, 34, .24); border-radius:16px; background:var(--green-soft); }
.prod-view-switch-btn { min-height:36px; padding:7px 14px; border-radius:12px; font-size:12px; font-weight:800; color:var(--green-dark); background:transparent; transition:all .12s; }
.prod-view-switch-btn.active { background:var(--green); color:#fff; box-shadow:var(--shadow-sm); }
.prod-bottom-controls {
  position:fixed;
  left:24px;
  right:24px;
  bottom:24px;
  z-index:46;
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto minmax(0, 1fr);
  align-items:end;
  gap:12px;
  pointer-events:none;
}
.prod-bottom-controls.cards { grid-template-columns:minmax(0, 1fr) auto; }
.prod-bottom-controls > * { pointer-events:auto; }
.desktop-prod-view-fab {
  position:fixed;
  right:24px;
  bottom:24px;
  z-index:45;
  align-items:center;
  gap:6px;
  padding:4px;
  border:1px solid rgba(94, 146, 34, .24);
  border-radius:18px;
  background:var(--green-soft);
  box-shadow:0 12px 24px rgba(42, 41, 40, .12);
}
.desktop-prod-view-fab-btn {
  min-height:40px;
  padding:8px 16px;
  border-radius:14px;
  font-size:12px;
  font-weight:800;
  color:var(--green-dark);
  background:transparent;
  transition:all .12s;
}
.desktop-prod-view-fab-btn.active {
  background:var(--green);
  color:#fff;
  box-shadow:var(--shadow-sm);
}
.desktop-prod-legend-fab {
  position:fixed;
  left:24px;
  bottom:24px;
  z-index:45;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  max-width:min(56vw, 760px);
  padding:10px 14px;
  border:1px solid var(--border);
  border-radius:18px;
  background:rgba(255,255,255,.96);
  box-shadow:0 12px 24px rgba(42, 41, 40, .10);
  backdrop-filter:blur(6px);
}
.prod-bottom-controls .desktop-prod-legend-fab,
.prod-bottom-controls .desktop-prod-view-fab,
.prod-bottom-controls .prod-gantt-status-fab {
  position:static;
  transform:none;
}
.prod-bottom-controls .desktop-prod-legend-fab {
  justify-self:start;
  max-width:100%;
}
.prod-bottom-controls .prod-gantt-status-fab { justify-self:center; }
.prod-bottom-controls .desktop-prod-view-fab { justify-self:end; }
.desktop-prod-legend-item {
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:12px;
  font-weight:700;
  color:var(--text2);
  white-space:nowrap;
}
.desktop-prod-legend-dot {
  width:10px;
  height:10px;
  border-radius:50%;
  flex-shrink:0;
}
.prod-gantt-status-fab {
  position:fixed;
  left:50%;
  bottom:24px;
  z-index:46;
  transform:translateX(-50%);
  display:flex;
  align-items:center;
  gap:7px;
  padding:7px;
  border:1px solid var(--border);
  border-radius:18px;
  background:rgba(255,255,255,.96);
  box-shadow:0 12px 24px rgba(42,41,40,.12);
  backdrop-filter:blur(6px);
}
.prod-gantt-status-item {
  min-height:40px;
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:7px 10px;
  border-radius:13px;
  background:var(--bg);
  color:var(--text2);
  white-space:nowrap;
  font-weight:700;
}
.prod-gantt-status-item strong {
  min-width:20px;
  color:var(--text);
  font-family:'Nunito',sans-serif;
  font-size:18px !important;
  line-height:1;
  text-align:center;
}
.prod-gantt-status-dot {
  width:9px;
  height:9px;
  border-radius:50%;
  flex-shrink:0;
}
.prod-gantt-status-dot.completed { background:var(--green); }
.prod-gantt-status-dot.progress { background:#e0b20b; }
.prod-gantt-status-dot.pending { background:var(--red); }
.prod-period-controls { width:auto; justify-content:flex-end; }
.prod-period-controls .commercial-period-picker { width:auto; }
.prod-period-controls .commercial-period-trigger { min-width:0; min-height:44px; height:44px; padding:9px 17px; border-radius:18px; border:none; background:var(--green); color:#fff; box-shadow:none; }
.prod-period-controls .commercial-period-trigger:hover,
.prod-period-controls .commercial-period-trigger.open { background:var(--green-dark); border:none; }
.prod-period-controls .commercial-period-trigger-label,
.prod-period-controls .commercial-period-trigger-caret { color:#fff; }
.prod-gantt-head { padding:12px 20px 0; margin-bottom:8px; display:flex; align-items:center; justify-content:flex-end; gap:10px; }
.prod-gantt-legend { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.prod-module-shell { flex:1; min-height:0; display:flex; flex-direction:column; overflow:hidden; }
.prod-subtabs-bar { grid-template-columns:minmax(0,1fr) auto; }
.prod-floating-layout { margin:16px 24px 24px; background:var(--surface); border:1px solid var(--border); border-radius:22px; box-shadow:var(--shadow-sm); overflow:hidden; min-height:0; }
.prod-card-layout { padding:18px; overflow:auto; }
.prod-card-board { display:grid; grid-template-columns:repeat(3, minmax(260px, 1fr)); gap:14px; justify-content:stretch; align-items:start; min-width:0; }
.prod-card-col { width:auto; display:flex; flex-direction:column; gap:10px; min-width:0; }
.prod-card-col-header { min-height:44px; background:var(--bg); border:1px solid var(--border); border-radius:18px; padding:9px 14px; display:flex; align-items:center; justify-content:space-between; gap:10px; box-shadow:var(--shadow-sm); }
.prod-card-col-title { display:flex; align-items:center; gap:8px; font-size:13px; font-weight:800; color:var(--text2); }
.prod-card-col-dot { width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.prod-card-col-header strong { font-family:'Nunito',sans-serif; font-size:22px; line-height:1; color:var(--text); }
.prod-card-col-body { display:flex; flex-direction:column; gap:10px; }
.prod-card-item { background:var(--surface); border:1.5px solid var(--border); border-radius:16px; padding:12px 13px; box-shadow:var(--shadow-sm); display:flex; flex-direction:column; gap:8px; cursor:pointer; transition:all .15s; }
.prod-card-item:hover { transform:translateY(-1px); box-shadow:var(--shadow); border-color:var(--border2); }
.prod-card-item-top { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.prod-card-item-title { font-family:'Nunito',sans-serif; font-size:13px; font-weight:800; color:var(--text); line-height:1.3; }
.prod-card-item-subtitle { margin-top:3px; font-size:11px; color:var(--text3); line-height:1.35; }
.prod-card-item-meta { display:flex; justify-content:space-between; gap:10px; font-size:11px; color:var(--text2); line-height:1.4; }
.prod-card-progress { height:6px; display:flex; gap:2px; border-radius:999px; background:transparent; overflow:hidden; }
.prod-card-progress-stage { flex:1 1 0; height:100%; transition:background .25s ease; }
.prod-card-empty { background:var(--bg); border:1px dashed var(--border); border-radius:16px; padding:18px 14px; text-align:center; font-size:12px; color:var(--text3); }
.prod-gantt-card { flex:1; min-width:0; min-height:0; background:var(--surface); display:flex; flex-direction:column; }
.prod-gantt-empty { margin:18px 20px 0; }
.prod-split-shell { flex:1; min-height:0; margin:16px 24px 24px; display:grid; grid-template-columns:minmax(0, 1fr) minmax(0, 1fr); gap:16px; }
.prod-side-panel,
.prod-detail-panel,
.prod-metrics-window { background:var(--surface); border:1px solid var(--border); border-radius:22px; box-shadow:var(--shadow-sm); overflow:hidden; min-height:0; }
.prod-side-panel { display:flex; flex-direction:column; }
.prod-side-panel-header { padding:16px 18px 13px; border-bottom:1px solid var(--border); display:flex; flex-direction:column; gap:4px; }
.prod-side-panel-header strong { font-family:'Nunito',sans-serif; font-size:15px; color:var(--text); }
.prod-side-panel-header span { font-size:12px; color:var(--text3); line-height:1.4; }
.prod-side-panel-header.slim { flex-direction:row; align-items:center; justify-content:space-between; gap:10px; }
.prod-panel-toggle-strip { padding-top:12px; padding-bottom:12px; }
.prod-side-panel-scroll { flex:1; min-height:0; overflow-y:auto; padding:10px; display:flex; flex-direction:column; gap:10px; }
.prod-side-item { width:100%; text-align:left; background:var(--bg); border:1px solid var(--border); border-radius:16px; padding:12px 14px; display:flex; flex-direction:column; gap:7px; transition:all .15s; }
.prod-side-item-button { appearance:none; -webkit-appearance:none; font:inherit; color:inherit; cursor:pointer; }
.prod-side-item-open { width:100%; appearance:none; -webkit-appearance:none; background:transparent; border:none; padding:0; margin:0; text-align:left; font:inherit; color:inherit; cursor:pointer; display:flex; flex-direction:column; gap:7px; }
.prod-side-item:hover { background:#fff; border-color:var(--purple-mid); }
.prod-side-item.active { background:var(--purple-soft); border-color:var(--purple-mid); }
.prod-side-item-top { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.prod-side-item-badges { display:flex; align-items:center; justify-content:flex-end; gap:6px; flex-wrap:wrap; }
.prod-side-item-top strong { font-family:'Nunito',sans-serif; font-size:14px; line-height:1.35; color:var(--text); }
.prod-side-item-sub { display:flex; justify-content:space-between; gap:12px; font-size:12px; color:var(--text2); line-height:1.4; }
.prod-delivery-check { display:flex; align-items:center; gap:8px; font-size:12px; font-weight:800; color:var(--text2); cursor:pointer; }
.prod-delivery-check input { width:16px; height:16px; accent-color:var(--purple); flex-shrink:0; }
.prod-detail-panel { display:flex; flex-direction:column; }
.prod-detail-header { padding:18px 20px 14px; border-bottom:1px solid var(--border); display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.prod-detail-title { font-family:'Nunito',sans-serif; font-size:18px; font-weight:800; color:var(--text); line-height:1.25; }
.prod-detail-subtitle { margin-top:4px; font-size:13px; color:var(--text2); font-weight:700; }
.prod-detail-sub { font-size:12px; color:var(--text3); margin-top:4px; }
.prod-detail-body { flex:1; overflow-y:auto; padding:18px 20px 20px; display:flex; flex-direction:column; gap:16px; }
.prod-side-empty { flex:1; display:flex; align-items:center; justify-content:center; flex-direction:column; gap:10px; text-align:center; color:var(--text3); font-size:13px; padding:28px 22px; }
.prod-inline-empty { background:var(--bg); border:1px dashed var(--border); border-radius:14px; padding:14px 16px; color:var(--text3); font-size:12px; line-height:1.5; }
.prod-inline-empty.compact { padding:10px 12px; font-size:11px; }
.prod-requirement-list,
.prod-inventory-stage-list { display:flex; flex-direction:column; gap:12px; }
.prod-requirement-card,
.prod-inventory-stage-card { background:var(--bg); border:1px solid var(--border); border-radius:16px; padding:14px 15px; display:flex; flex-direction:column; gap:10px; }
.prod-requirement-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.prod-requirement-title-group { display:flex; align-items:center; gap:8px; min-width:0; }
.prod-stage-dot { width:10px; height:10px; border-radius:50%; flex-shrink:0; }
.prod-requirement-title-group strong { font-family:'Nunito',sans-serif; font-size:14px; color:var(--text); }
.prod-requirement-meta { display:flex; flex-wrap:wrap; gap:8px 14px; font-size:12px; color:var(--text2); }
.prod-requirement-inline-detail { display:flex; flex-direction:column; gap:12px; padding-top:6px; border-top:1px solid rgba(129, 33, 137, .12); }
.prod-chip-list { display:flex; flex-wrap:wrap; gap:8px; }
.prod-chip { background:#fff; border:1px solid var(--border); border-radius:999px; padding:6px 10px; font-size:11px; color:var(--text2); line-height:1.2; }
.prod-chip.muted { background:var(--bg); color:var(--text3); }
.prod-chip-button { cursor:pointer; transition:all .12s; }
.prod-chip-button.urgent { background:var(--green-soft); border-color:rgba(94, 146, 34, .45); color:var(--green-dark); }
.prod-chip-button:hover:not(:disabled) { border-color:var(--purple-mid); background:var(--purple-soft); color:var(--purple); }
.prod-chip-button.urgent:hover:not(:disabled) { border-color:var(--green); background:#dff0bf; color:var(--green-dark); }
.prod-chip-button:disabled { cursor:default; opacity:.75; }
.prod-mini-summary-grid { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:10px; }
.prod-mini-summary-grid-compact { grid-template-columns:repeat(2, minmax(0, 1fr)); }
.prod-mini-summary-card { background:var(--bg); border:1px solid var(--border); border-radius:16px; padding:12px 14px; display:flex; flex-direction:column; gap:6px; }
.prod-mini-summary-card span { font-size:12px; color:var(--text2); line-height:1.35; }
.prod-mini-summary-card strong { font-family:'Nunito',sans-serif; font-size:20px; color:var(--text); line-height:1; }
.prod-inline-status-row { display:flex; align-items:center; justify-content:space-between; gap:12px; background:var(--bg); border:1px solid var(--border); border-radius:14px; padding:12px 14px; }
.prod-balance-ok { color:var(--green-dark); }
.prod-balance-alert { color:var(--red); }
.prod-inventory-grid { display:flex; flex-direction:column; gap:10px; }
.prod-inventory-row { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:10px; background:#fff; border:1px solid var(--border); border-radius:12px; padding:11px 12px; }
.prod-inventory-row > div { display:flex; flex-direction:column; gap:4px; min-width:0; }
.prod-inventory-header { align-items:center; }
.prod-inventory-editor { display:flex; flex-direction:column; gap:10px; }
.prod-inventory-editor-row { display:grid; grid-template-columns:minmax(170px, 1.1fr) minmax(200px, 1fr) 130px 130px; gap:10px; align-items:center; background:var(--bg); border:1px solid var(--border); border-radius:16px; padding:12px 14px; }
.prod-inventory-editor-main { display:flex; align-items:center; min-width:0; }
.prod-inventory-editor-main strong { font-family:'Nunito',sans-serif; font-size:14px; color:var(--text); line-height:1.3; }
.prod-inventory-editor-field,
.prod-inventory-editor-stat { display:flex; align-items:center; gap:8px; min-width:0; }
.prod-inventory-editor-field { justify-content:flex-start; }
.prod-inventory-editor-field .detail-label,
.prod-inventory-editor-stat .detail-label { flex-shrink:0; margin:0; }
.prod-inventory-editor-field strong { font-family:'Nunito',sans-serif; font-size:15px; color:var(--text); line-height:1.2; }
.prod-inventory-editor-stat strong { font-family:'Nunito',sans-serif; font-size:15px; color:var(--text); line-height:1.2; }
.prod-metrics-shell { flex:1; min-height:0; display:flex; flex-direction:column; overflow:hidden; }
.prod-metrics-window { margin:16px 24px 24px; padding:18px; overflow:auto; }
.prod-metrics-panels { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:16px; align-items:start; }
.prod-metrics-card { background:var(--surface); border:1px solid var(--border); border-radius:18px; overflow:hidden; min-width:0; }
.info-chip.priority { background:var(--green-soft); color:var(--green-dark); }
.priority-card { border-color:rgba(94, 146, 34, .22); }
.priority-rank { width:24px; height:24px; border-radius:50%; background:var(--green); color:#fff; display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:800; flex-shrink:0; }
.inline-check-toggle { display:flex; align-items:center; gap:8px; font-size:13px; color:var(--text2); font-weight:700; margin-top:10px; padding:10px 12px; border-radius:12px; border:1px solid var(--border); background:var(--bg); transition:all .12s; }
.inline-check-toggle:hover { border-color:var(--green); background:var(--green-soft); color:var(--green-dark); }
.inline-check-toggle.active { border-color:var(--green); background:var(--green-soft); color:var(--green-dark); }
.inline-check-toggle-box { width:18px; height:18px; border-radius:6px; border:1.5px solid currentColor; display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:900; flex-shrink:0; }
.negocio-delivery-check { justify-content:flex-start; width:100%; }
.adm-board { display:grid; grid-template-columns:repeat(3, 188px); gap:11px; justify-content:flex-start; min-width:max-content; align-items:start; margin:0; }
.adm-col { width:188px; flex-shrink:0; display:flex; flex-direction:column; }
.adm-card-progress { display:flex; align-items:center; gap:8px; margin-top:8px; color:var(--text3); font-size:11px; }
.adm-progress-track { flex:1; height:7px; border-radius:999px; background:var(--border); overflow:hidden; }
.adm-progress-fill { height:100%; border-radius:999px; background:linear-gradient(90deg, var(--purple) 0%, var(--green) 100%); transition:width .25s ease; }
.adm-checklist { display:flex; flex-direction:column; gap:10px; border:1px solid var(--border); border-radius:12px; background:var(--bg); padding:12px; }
.adm-checklist-head { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.adm-checklist-copy { display:flex; flex-direction:column; gap:3px; }
.adm-checklist-copy strong { font-family:'Nunito',sans-serif; font-size:13px; color:var(--text); }
.adm-checklist-percent { font-family:'Nunito',sans-serif; font-size:13px; font-weight:800; color:var(--purple); white-space:nowrap; }
.adm-checklist-list { display:flex; flex-direction:column; gap:8px; }
.adm-checklist-row { display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:8px; }
.adm-checklist-row input[type="checkbox"] { width:17px; height:17px; accent-color:var(--purple); margin:0; }
.adm-checklist-input { width:100%; min-height:40px; border-radius:10px; border:1.5px solid var(--border); background:#fff; color:var(--text); padding:8px 10px; font-size:13px; font-family:'Nunito Sans',sans-serif; }
.adm-checklist-input:focus { outline:none; border-color:var(--purple); }
.adm-checklist-add { align-self:flex-start; }

/* Phase stepper */
.id-phase-stepper { display:flex; gap:0; border:1px solid var(--border); border-radius:7px; overflow:hidden; }
.id-phase-step { flex:1; padding:5px 4px; font-size:9px; font-weight:700; text-align:center; cursor:pointer; transition:all .12s; border-right:1px solid var(--border); color:var(--text3); background:transparent; }
.id-phase-step:last-child { border-right:none; }
.id-phase-step.active { color:#fff; }

/* Hitos */
.hito-list { display:flex; flex-direction:column; gap:8px; }
.hito-item { background:var(--bg); border:1px solid var(--border); border-radius:var(--radius-sm); padding:10px 12px; display:flex; gap:10px; align-items:flex-start; }
.hito-item.focused { border-color:var(--purple-mid); box-shadow:0 0 0 2px rgba(129,33,137,.14); background:#fff; }
.hito-check { width:20px; height:20px; border-radius:50%; border:2px solid; cursor:pointer; display:flex; align-items:center; justify-content:center; flex-shrink:0; transition:all .15s; margin-top:1px; }
.hito-body { flex:1; }
.hito-name { font-family:'Nunito',sans-serif; font-size:13px; font-weight:700; }
.hito-name.done { text-decoration:line-through; color:var(--text3); }
.hito-desc { font-size:11px; color:var(--text2); margin-top:2px; line-height:1.4; }
.hito-meta { display:flex; gap:8px; margin-top:5px; align-items:center; flex-wrap:wrap; }
.hito-date { font-size:10px; color:var(--text3); display:flex; align-items:center; gap:3px; }
.hito-date.overdue { color:var(--red); font-weight:700; }
.hito-add-row { display:flex; gap:6px; flex-direction:column; background:var(--bg); border:1.5px dashed var(--border); border-radius:7px; padding:10px 12px; }
.hito-add-inputs { display:flex; gap:6px; }
.hito-add-textarea { min-height:90px; resize:vertical; }
.hito-status-sel { font-size:10px; padding:3px 7px; border-radius:5px; border:1px solid var(--border); background:#fff; color:var(--text); font-family:'Nunito Sans',sans-serif; }
.prog-summary { background:var(--green-soft); border:1px solid #c5e89a; border-radius:7px; padding:9px 12px; display:flex; align-items:center; gap:12px; }
.prog-bar { flex:1; height:6px; background:var(--border); border-radius:3px; overflow:hidden; }
.prog-bar-fill { height:100%; border-radius:3px; background:var(--green); transition:width .5s; }
.prog-pct { font-family:'Nunito',sans-serif; font-weight:800; font-size:14px; color:var(--green-dark); white-space:nowrap; }
.etapa-item.focused { box-shadow:0 0 0 2px rgba(129,33,137,.14); background:#fff; }
.new-id-hitos { display:flex; flex-direction:column; gap:10px; border:1px solid var(--border); border-radius:12px; background:var(--bg); padding:12px; }
.new-id-hito-card { display:flex; flex-direction:column; gap:8px; border:1px solid var(--border); border-radius:12px; background:#fff; padding:10px; }
.new-id-hito-grid { display:grid; grid-template-columns:1.35fr 1fr 1fr; gap:8px; }

/* Evidencias */
.evid-pane { display:flex; flex-direction:column; gap:14px; min-width:0; }
.evid-add-panel { display:flex; flex-direction:column; gap:12px; min-width:0; }
.evid-list { display:flex; flex-direction:column; gap:10px; padding-top:2px; min-width:0; }
.evid-item { background:var(--bg); border:1px solid var(--border); border-radius:var(--radius-sm); padding:11px 12px; display:flex; align-items:flex-start; gap:12px; min-width:0; }
.evid-icon { width:32px; height:32px; border-radius:6px; display:flex; align-items:center; justify-content:center; font-size:16px; flex-shrink:0; }
.evid-info { flex:1; overflow:hidden; }
.evid-name { font-size:13px; font-weight:700; font-family:'Nunito',sans-serif; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.evid-meta { font-size:10px; color:var(--text3); margin-top:4px; line-height:1.45; }
.evid-link { color:var(--blue); text-decoration:none; font-size:11px; }
.evid-link:hover { text-decoration:underline; }
.evid-add-tabs { display:flex; gap:8px; margin-bottom:0; }
.evid-add-tab { flex:1; padding:8px 10px; border-radius:10px; font-size:12px; font-weight:700; border:1.5px solid var(--border); background:transparent; color:var(--text2); transition:all .12s; }
.evid-add-tab.active { background:var(--purple-soft); color:var(--purple); border-color:var(--purple-mid); }
.file-drop { width:100%; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; border:2px dashed var(--border); border-radius:12px; padding:24px 20px; min-height:160px; text-align:center; cursor:pointer; transition:all .15s; background:var(--bg); }
.file-drop:hover { border-color:var(--purple-mid); background:var(--purple-soft); }
.file-drop input { display:none; }
.file-drop-text { font-size:12px; color:var(--text3); margin-top:0; max-width:320px; line-height:1.45; }
.evid-link-form { display:flex; flex-direction:column; gap:10px; }
.evid-link-row { display:flex; gap:8px; align-items:center; }
.evid-empty { text-align:center; padding:24px 18px; color:var(--text3); font-size:12px; line-height:1.5; background:var(--bg); border:1px dashed var(--border); border-radius:12px; }

/* ── Producción Drawer ────────────────────────────── */
.prod-layout { flex:1; min-height:0; display:flex; overflow:hidden; }
.prod-gantt-layout { display:flex; flex-direction:column; }
.prod-gantt-area { flex:1; min-width:0; min-height:0; max-height:calc(100vh - 240px); overflow:auto; overscroll-behavior:contain; }
.prod-drawer-modal-shell { width:min(1040px, calc(100vw - 48px)); max-height:calc(100vh - 48px); display:flex; }
.prod-drawer-modal-shell .id-drawer { width:100%; max-height:calc(100vh - 48px); border:none; border-radius:22px; box-shadow:var(--shadow); }
.prod-drawer-modal-shell .id-drawer-body { min-height:0; }
.etapa-list { display:flex; flex-direction:column; gap:0; }
.etapa-item { border:1.5px solid var(--border); border-radius:var(--radius); overflow:hidden; margin-bottom:8px; transition:border-color .15s; }
.etapa-item.etapa-open { border-color:var(--purple-mid); }
.etapa-header { display:flex; align-items:center; gap:10px; padding:11px 14px; cursor:pointer; background:var(--surface); transition:background .12s; user-select:none; }
.etapa-header:hover { background:var(--bg); }
.etapa-num { width:24px; height:24px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:800; font-family:'Nunito',sans-serif; flex-shrink:0; }
.etapa-name { font-family:'Nunito',sans-serif; font-size:13px; font-weight:800; flex:1; }
.etapa-status-pill { font-size:10px; font-weight:700; padding:2px 9px; border-radius:10px; white-space:nowrap; }
.etapa-chevron { font-size:11px; color:var(--text3); transition:transform .15s; flex-shrink:0; }
.etapa-chevron.open { transform:rotate(180deg); }
.etapa-body { padding:14px 14px; border-top:1px solid var(--border); background:var(--bg); display:flex; flex-direction:column; gap:11px; }
.etapa-grid { display:grid; grid-template-columns:1fr 1fr; gap:9px; }
.etapa-field { display:flex; flex-direction:column; gap:3px; }
.etapa-lbl { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.08em; color:var(--text3); }
.etapa-status-row { display:flex; gap:5px; }
.etapa-status-btn { flex:1; padding:5px 3px; border-radius:6px; font-size:10px; font-weight:700; border:1.5px solid; cursor:pointer; transition:all .12s; text-align:center; }
.params-section { display:flex; flex-direction:column; gap:6px; }
.param-row { display:flex; gap:6px; align-items:center; background:#fff; border:1px solid var(--border); border-radius:6px; padding:5px 8px; }
.param-key { font-size:12px; font-weight:600; color:var(--text2); flex:1; }
.param-val { font-size:12px; color:var(--text); flex:1; }
.param-add-row { display:flex; gap:6px; background:rgba(255,255,255,.6); border:1.5px dashed var(--border); border-radius:6px; padding:7px 9px; }
.fermentador-section { display:flex; flex-direction:column; gap:10px; }
.fermentador-empty { color:var(--text3); background:rgba(255,255,255,.6); border:1.5px dashed var(--border); border-radius:8px; padding:12px; text-align:center; font-size:12px; }
.fermentador-card,
.fermentador-add-card { background:#fff; border:1px solid var(--border); border-radius:10px; padding:10px; display:flex; flex-direction:column; gap:10px; }
.fermentador-add-card { border-style:dashed; background:rgba(255,255,255,.7); }
.fermentador-card-head { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.fermentador-card-head strong { font-family:'Nunito',sans-serif; font-size:13px; color:var(--text); }
.fermentador-grid { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:9px; }
.fermentador-add-actions { display:flex; justify-content:flex-end; }
.g-stage-strip { display:flex; gap:2px; margin-top:3px; }
.g-stage-dot { height:4px; border-radius:2px; flex:1; }
.prod-prog-strip { display:flex; gap:2px; height:5px; border-radius:3px; overflow:hidden; margin-top:6px; }
.prod-prog-seg { flex:1; transition:background .3s; }

/* Modal */
.overlay { position:fixed; inset:0; background:rgba(40,30,42,.45); z-index:200; display:flex; align-items:center; justify-content:center; padding:20px; backdrop-filter:blur(2px); }
.pending-quick-overlay { align-items:center; justify-content:center; }
.pending-quick-drawer-shell { width:min(470px, calc(100vw - 32px)); max-height:min(calc(100dvh - 32px), calc(100vh - 32px)); display:flex; overflow:hidden; border-radius:18px; box-shadow:0 20px 48px rgba(33,24,35,.22); }
.pending-quick-drawer-shell .id-drawer { width:100%; max-width:none; border-left:none; background:var(--surface); }
.pending-quick-drawer-shell .id-drawer-body { overscroll-behavior:contain; }
.modal { background:var(--surface); border-radius:14px; width:100%; max-width:520px; max-height:92vh; overflow-y:auto; box-shadow:0 8px 40px rgba(0,0,0,.18); }
.modal.modal-lg { max-width:640px; }
.modal.modal-xl { max-width:980px; }
.modal-hdr { padding:20px 22px 14px; border-bottom:1px solid var(--border); display:flex; align-items:center; justify-content:space-between; }
.modal-title { font-family:'Nunito',sans-serif; font-size:16px; font-weight:800; }
.close-btn { width:28px; height:28px; border-radius:50%; background:var(--bg); border:1px solid var(--border); color:var(--text2); font-size:13px; display:flex; align-items:center; justify-content:center; transition:all .12s; cursor:pointer; }
.close-btn:hover { background:var(--purple-soft); color:var(--purple); }
.modal-body { padding:18px 22px; display:flex; flex-direction:column; gap:14px; }
.modal-section { display:flex; flex-direction:column; gap:12px; }
.modal-section-title { font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.1em; color:var(--text3); padding-bottom:6px; border-bottom:1px solid var(--border); }
.f { display:flex; flex-direction:column; gap:4px; }
.f-row { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.f label { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.09em; color:var(--text3); }
.f input,.f select,.f textarea { background:var(--bg); border:1.5px solid var(--border); border-radius:var(--radius-sm); color:var(--text); padding:7px 10px; font-size:13px; transition:border .15s; width:100%; }
.f input,.f select,.same-size-control {
  appearance:none;
  -webkit-appearance:none;
  height:42px;
  line-height:1.2;
}
.f select,.same-size-control {
  background-image:linear-gradient(45deg, transparent 50%, var(--text2) 50%), linear-gradient(135deg, var(--text2) 50%, transparent 50%);
  background-position:calc(100% - 18px) 50%, calc(100% - 12px) 50%;
  background-size:6px 6px, 6px 6px;
  background-repeat:no-repeat;
  padding-right:32px;
}
.f input:focus,.f select:focus,.f textarea:focus { border-color:var(--purple); background:#fff; }
.f select option { background:#fff; }
.f textarea { resize:vertical; min-height:140px; }
.project-form-body { min-height:min(68vh, 560px); }
.notes-field { flex:1; min-height:170px; }
.notes-field .notes-textarea { flex:1; min-height:100%; }
.modal-ftr { padding:12px 22px; border-top:1px solid var(--border); display:flex; gap:8px; justify-content:flex-end; }
.btn { padding:7px 16px; border-radius:20px; font-size:13px; font-weight:700; transition:all .15s; font-family:'Nunito',sans-serif; }
.btn-secondary { background:var(--bg); color:var(--text2); border:1.5px solid var(--border); }
.btn-secondary:hover { background:var(--border); }
.btn-purple { background:var(--purple); color:#fff; }
.btn-purple:hover { background:var(--purple-dark); }
.btn-red { background:var(--red-soft); color:var(--red); border:1.5px solid #f5c0c0; }
.btn-red:hover { background:#f5c0c0; }
.btn:disabled { opacity:.45; cursor:not-allowed; transform:none; }

/* User administration */
.user-admin-modal { overflow:hidden; display:flex; flex-direction:column; }
.user-admin-body { padding:18px; flex:1; min-height:0; overflow-y:auto; }
.user-admin-grid { display:grid; grid-template-columns:300px 1fr; gap:16px; min-height:0; align-items:start; }
.user-list-panel,
.user-form-panel { background:var(--bg); border:1px solid var(--border); border-radius:16px; padding:14px; }
.user-list-panel,
.user-form-panel { min-height:0; }
.user-form-panel { display:flex; flex-direction:column; gap:13px; }
.user-list-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:12px; }
.user-panel-title { font-family:'Nunito',sans-serif; font-weight:800; font-size:18px; }
.user-panel-sub { font-size:13px; color:var(--text3); }
.user-list { display:flex; flex-direction:column; gap:7px; max-height:450px; overflow:auto; padding-right:2px; }
.user-row { width:100%; display:flex; align-items:center; gap:10px; text-align:left; background:var(--surface); border:1px solid var(--border); border-radius:12px; padding:10px; color:var(--text); transition:all .12s; }
.user-row:hover,
.user-row.active { border-color:var(--purple-mid); background:var(--purple-soft); }
.user-avatar { width:38px; height:38px; border-radius:50%; display:flex; align-items:center; justify-content:center; flex-shrink:0; background:linear-gradient(135deg,var(--purple),var(--purple-dark)); color:#fff; font-family:'Nunito',sans-serif; font-size:13px; font-weight:900; }
.user-row-copy { display:flex; flex-direction:column; gap:2px; min-width:0; }
.user-row-name { font-family:'Nunito',sans-serif; font-size:15px; font-weight:800; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.user-row-meta { font-size:12px; color:var(--text3); }
.user-active-check { display:flex; align-items:center; gap:9px; font-size:14px; font-weight:800; color:var(--text2); cursor:pointer; }
.user-active-check input { width:18px; height:18px; accent-color:var(--purple); }
.pending-scope-options { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.pending-scope-options label { display:flex; align-items:flex-start; gap:10px; background:#fff; border:1.5px solid var(--border); border-radius:14px; padding:12px; color:var(--text2); cursor:pointer; transition:all .12s; }
.pending-scope-options label.active { border-color:var(--purple-mid); background:var(--purple-soft); color:var(--purple); }
.pending-scope-options input { width:18px; height:18px; margin-top:2px; accent-color:var(--purple); flex-shrink:0; }
.pending-scope-options span { display:flex; flex-direction:column; gap:3px; }
.pending-scope-options strong { font-family:'Nunito',sans-serif; color:var(--text); }
.pending-scope-options small { color:var(--text2); line-height:1.35; }
.permissions-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.permission-card { display:flex; align-items:flex-start; gap:10px; background:#fff; border:1.5px solid var(--border); border-radius:14px; padding:12px; cursor:pointer; transition:all .12s; }
.permission-card:hover,
.permission-card.active { border-color:var(--purple-mid); background:var(--purple-soft); }
.permission-card input { width:18px; height:18px; margin-top:2px; accent-color:var(--purple); flex-shrink:0; }
.permission-card span { display:flex; flex-direction:column; gap:3px; }
.permission-card strong { font-family:'Nunito',sans-serif; font-size:15px; color:var(--text); }
.permission-card small { font-size:12px; color:var(--text2); line-height:1.35; }
.access-grid { grid-template-columns:1fr; }
.access-card { cursor:default; }
.access-card.level-read,
.access-card.level-edit { border-color:var(--purple-mid); background:var(--purple-soft); }
.access-copy { flex:1; }
.access-options { display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:6px; width:100%; margin-top:8px; }
.access-options label { display:flex; align-items:center; gap:6px; border:1px solid var(--border); border-radius:10px; padding:7px 8px; background:#fff; color:var(--text2); font-weight:800; cursor:pointer; }
.access-options label.active { border-color:var(--purple-mid); color:var(--purple); background:#fff; }
.access-options input { width:14px; height:14px; margin:0; accent-color:var(--purple); }
.access-options input:disabled,
input:disabled,
select:disabled,
textarea:disabled,
button:disabled { cursor:not-allowed; opacity:.62; }
.empty-modules { flex:1; display:flex; align-items:center; justify-content:center; padding:24px; }
.empty-modules-card { max-width:520px; background:var(--surface); border:1px solid var(--border); border-radius:20px; padding:28px; text-align:center; box-shadow:var(--shadow-sm); }
.empty-modules-card h2 { font-family:'Nunito',sans-serif; font-size:26px; margin-bottom:8px; }
.empty-modules-card p { font-size:16px; line-height:1.45; color:var(--text2); }

/* Client selector */
.client-selector { background:var(--bg); border:1.5px solid var(--border); border-radius:var(--radius-sm); overflow:hidden; }
.client-selector-search { padding:7px 10px; border-bottom:1px solid var(--border); }
.client-selector-search input { width:100%; background:#fff; border:1px solid var(--border); border-radius:5px; padding:5px 8px; font-size:12px; color:var(--text); }
.client-selector-list { max-height:130px; overflow-y:auto; }
.cs-option { padding:8px 10px; cursor:pointer; transition:background .1s; display:flex; align-items:center; gap:8px; border-bottom:1px solid var(--border); }
.cs-option:last-child { border-bottom:none; }
.cs-option:hover { background:var(--purple-soft); }
.cs-option.selected { background:var(--purple-soft); }
.cs-option-create { background:rgba(129,33,137,.06); }
.cs-option-create .cs-avatar { background:var(--purple-dark); color:#fff; }
.cs-avatar { width:24px; height:24px; border-radius:50%; background:var(--purple); display:flex; align-items:center; justify-content:center; color:#fff; font-size:9px; font-weight:800; flex-shrink:0; }
.cs-name { font-size:12px; font-weight:700; font-family:'Nunito',sans-serif; }
.cs-sub { font-size:10px; color:var(--text3); }
.selected-client-card { background:var(--purple-soft); border:1.5px solid var(--purple-mid); border-radius:var(--radius-sm); padding:10px 12px; display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.client-info-chips { display:flex; flex-wrap:wrap; gap:5px; margin-top:6px; }
.client-inline-card { display:flex; align-items:flex-start; gap:8px; background:var(--bg); border:1px solid var(--border); border-radius:6px; padding:9px 10px; }
.client-inline-card-title { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.client-inline-card-notes { margin-top:5px; font-size:11px; color:var(--text2); line-height:1.45; white-space:pre-wrap; }
.client-inline-editor { background:var(--bg); border:1.5px dashed var(--border); border-radius:7px; padding:10px 12px; display:flex; flex-direction:column; gap:8px; }
.client-inline-editor-title { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.08em; color:var(--text3); }
.client-contact-grid,
.client-cultivo-grid { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:7px; align-items:start; }
.client-inline-input { width:100%; background:#fff; border:1.5px solid var(--border); border-radius:6px; padding:7px 9px; font-size:12px; color:var(--text); font-family:'Nunito Sans',sans-serif; }
.client-inline-input:focus { border-color:var(--purple); background:#fff; }
.client-inline-textarea { min-height:88px; resize:vertical; }
.product-detail-list { display:flex; flex-direction:column; gap:12px; margin-top:2px; }
.product-detail-card { position:relative; border:1px solid var(--border); border-radius:10px; padding:13px 16px; background:var(--bg); display:grid; grid-template-columns:minmax(150px, 1.1fr) minmax(0, 2fr); align-items:center; gap:18px; }
.product-detail-remove { position:absolute; top:10px; right:10px; width:22px; height:22px; border-radius:50%; background:rgba(129,33,137,.12); color:var(--purple); display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:900; transition:all .12s; }
.product-detail-remove:hover { background:rgba(129,33,137,.22); }
.product-detail-head { display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:4px; margin-bottom:0; min-width:0; padding-right:28px; }
.product-detail-head strong { font-size:12px; font-weight:800; font-family:'Nunito',sans-serif; color:var(--text); }
.product-detail-head span { font-size:11px; color:var(--text3); font-weight:700; }
.product-detail-grid { display:grid; grid-template-columns:repeat(2, minmax(150px, 1fr)); gap:14px; align-items:start; }
.product-detail-column { display:flex; flex-direction:column; gap:12px; }
.negocio-meta-row { grid-template-columns:repeat(2, minmax(0, 1fr)); align-items:end; }
.negocio-stage-field { min-width:0; max-width:none; margin-left:0; }
.negocio-seg-quick-add { border:1px solid var(--border); border-radius:14px; margin-top:2px; }
.negocio-seg-list { display:flex; flex-direction:column; gap:10px; margin-top:12px; }
.negocio-seg-entry { margin-bottom:0; }
.client-cultivo-picker { position:relative; }
.commercial-match-field { position:relative; }
.commercial-match-list { position:absolute; top:calc(100% + 6px); left:0; right:0; background:#fff; border:1px solid var(--border); border-radius:10px; box-shadow:0 14px 30px rgba(45,35,46,.14); padding:6px; display:flex; flex-direction:column; gap:4px; z-index:25; max-height:220px; overflow-y:auto; }
.commercial-match-option { width:100%; text-align:left; background:transparent; border-radius:8px; padding:8px 10px; display:flex; flex-direction:column; gap:2px; transition:all .12s; }
.commercial-match-option:hover { background:var(--purple-soft); }
.commercial-match-option strong { font-size:12px; font-weight:800; color:var(--text); font-family:'Nunito',sans-serif; }
.commercial-match-option span { font-size:11px; color:var(--text3); line-height:1.35; }
.cultivo-suggestions { position:absolute; top:calc(100% + 6px); left:0; right:0; background:#fff; border:1px solid var(--border); border-radius:10px; box-shadow:0 14px 30px rgba(45,35,46,.14); padding:6px; display:flex; flex-direction:column; gap:4px; z-index:20; max-height:220px; overflow-y:auto; }
.cultivo-suggestion { width:100%; text-align:left; background:transparent; border-radius:8px; padding:8px 10px; font-size:12px; color:var(--text); font-weight:700; transition:all .12s; }
.cultivo-suggestion:hover { background:var(--purple-soft); color:var(--purple); }
.cultivo-suggestion-add { color:var(--green-dark); background:var(--green-soft); }
.cultivo-suggestion-add:hover { background:#e3f3c7; color:var(--green-dark); }
.cultivo-empty { padding:8px 10px; font-size:11px; color:var(--text3); }
.client-contact-phone,
.client-contact-notes,
.client-cultivo-picker,
.client-inline-add-btn { grid-column:1 / -1; }
.client-inline-add-btn { justify-self:end; }

/* Shared feedback */
.toast { position:fixed; bottom:24px; right:24px; background:var(--surface); border:1px solid var(--border2); border-radius:10px; padding:10px 16px; font-size:13px; z-index:300; box-shadow:0 4px 20px rgba(0,0,0,.15); }
.loading-bar { position:fixed; top:0; left:0; right:0; height:2px; background:var(--purple); z-index:999; animation:prog 1.5s ease infinite; }
.loader-shell { min-height:100vh; display:flex; align-items:center; justify-content:center; background:
  radial-gradient(circle at top left, rgba(129,33,137,.08), transparent 32%),
  radial-gradient(circle at top right, rgba(129,197,48,.1), transparent 24%),
  var(--bg); }
.loader-mark { width:58px; height:58px; object-fit:contain; animation:floatPulse 1.2s ease-in-out infinite; }

/* Auth */
.auth-shell { min-height:100vh; display:flex; align-items:center; justify-content:center; padding:24px; background:
  radial-gradient(circle at top left, rgba(129,33,137,.09), transparent 30%),
  radial-gradient(circle at bottom right, rgba(129,197,48,.11), transparent 26%),
  linear-gradient(180deg, rgba(255,255,255,.85), rgba(245,244,240,.95)),
  var(--bg); }
.auth-card { width:100%; max-width:740px; background:rgba(255,255,255,.92); border:1px solid rgba(204,201,193,.85); border-radius:30px; padding:48px 50px; box-shadow:0 20px 60px rgba(82,64,84,.12); backdrop-filter:blur(12px); }
.auth-brand { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px; margin-bottom:28px; text-align:center; }
.auth-logo { width:min(260px, 100%); height:auto; display:block; margin:0 auto; }
.auth-title { font-family:'Nunito',sans-serif; font-weight:800; font-size:20px; line-height:1.2; }
.auth-caption { font-size:13px; line-height:1.5; color:var(--text2); text-align:center; }
.auth-field { display:flex; flex-direction:column; gap:6px; margin-bottom:12px; }
.auth-field label { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.08em; color:var(--text3); }
.auth-field input { background:var(--bg); border:1.5px solid var(--border); border-radius:10px; color:var(--text); padding:11px 12px; font-size:14px; width:100%; transition:border-color .15s, background .15s, box-shadow .15s; }
.auth-field input:focus { border-color:var(--purple); background:#fff; box-shadow:0 0 0 4px rgba(129,33,137,.08); }
.auth-error { font-size:12px; color:var(--red); text-align:center; margin:4px 0 10px; }
.auth-submit { width:100%; padding:11px 14px; border-radius:12px; background:linear-gradient(135deg, var(--purple), var(--purple-dark)); color:#fff; font-size:14px; font-weight:800; font-family:'Nunito',sans-serif; border:none; margin-top:6px; box-shadow:0 10px 20px rgba(94,23,100,.16); }
.auth-submit:hover { transform:translateY(-1px); }

/* Larger local working typography */
.nav-tab,
.sub-tab,
.btn-add,
.btn,
.btn-submit,
.auth-submit { font-size:28px; }

.stat-val { font-size:46px; }
.stat-lbl,
.col-count,
.card-row,
.client-sub,
.sub-item-meta,
.seg-entity-sub,
.seg-entity-crumb,
.seg-entry-desc,
.id-card-obj,
.hito-desc,
.evid-meta,
.file-drop-text,
.cs-sub { font-size:24px; }

.col-title,
.add-card-btn,
.client-name,
.detail-value,
.sub-item-name,
.seg-entity-name,
.seg-entry-title,
.g-title,
.id-card-title,
.id-val,
.id-input,
.id-select,
.id-textarea,
.hito-name,
.evid-name,
.etapa-name,
.param-key,
.param-val,
.f input,
.f select,
.f textarea,
.client-selector-search input,
.auth-field input { font-size:28px; }

.card-title,
.seg-entity-title,
.id-drawer-title,
.modal-title,
.auth-title { font-size:38px; }

.card-value { font-size:34px; }
.month-lbl,
.prog-pct { font-size:30px; }

.section-title,
.detail-label,
.info-chip,
.seg-filter-btn,
.seg-entity-type,
.seg-badge,
.seg-type-pill,
.seg-date-label,
.seg-meta-item,
.type-tag,
.g-label-col,
.g-day,
.g-bar-lbl,
.id-dtab,
.id-label,
.id-phase-step,
.hito-date,
.hito-status-sel,
.etapa-status-pill,
.etapa-lbl,
.etapa-status-btn,
.modal-section-title,
.f label,
.auth-field label { font-size:22px; }

.tag,
.btn-move,
.evid-link,
.evid-add-tab,
.etapa-chevron { font-size:22px; }

.toast,
.auth-caption,
.auth-error { font-size:28px; }

#root [style*="font-size:9px"],
#root [style*="font-size: 9px"] { font-size:24px !important; }
#root [style*="font-size:10px"],
#root [style*="font-size: 10px"] { font-size:25px !important; }
#root [style*="font-size:11px"],
#root [style*="font-size: 11px"] { font-size:26px !important; }
#root [style*="font-size:12px"],
#root [style*="font-size: 12px"] { font-size:27px !important; }
#root [style*="font-size:13px"],
#root [style*="font-size: 13px"] { font-size:28px !important; }
#root [style*="font-size:14px"],
#root [style*="font-size: 14px"] { font-size:29px !important; }
#root [style*="font-size:15px"],
#root [style*="font-size: 15px"] { font-size:30px !important; }
#root [style*="font-size:16px"],
#root [style*="font-size: 16px"] { font-size:32px !important; }
#root [style*="font-size:18px"],
#root [style*="font-size: 18px"] { font-size:36px !important; }
#root [style*="font-size:20px"],
#root [style*="font-size: 20px"] { font-size:38px !important; }
#root [style*="font-size:22px"],
#root [style*="font-size: 22px"] { font-size:40px !important; }
#root [style*="font-size:28px"],
#root [style*="font-size: 28px"] { font-size:48px !important; }
#root [style*="font-size:32px"],
#root [style*="font-size: 32px"] { font-size:54px !important; }

/* Pipeline readability boost */
.main-nav .nav-tab { font-size:20px !important; padding:8px 16px !important; border-radius:18px !important; }
.sub-tabs-bar { min-height:60px !important; }
.sub-tabs .sub-tab { font-size:18px !important; padding:11px 17px !important; }
.btn-add { min-height:44px !important; height:44px !important; font-size:18px !important; padding:9px 17px !important; border-radius:18px !important; }
.stats-bar { height:54px !important; gap:21px !important; }
.stat-val { font-size:25px !important; line-height:1 !important; }
.stat-lbl { font-size:18px !important; line-height:1.1 !important; }
.stat-dot { width:9px !important; height:9px !important; }
.kanban-wrap { padding-top:16px !important; }
.kanban-board { gap:11px !important; }
.kanban-col { width:230px !important; }
.desktop-pipeline-wrap .kanban-board {
  width:100%;
  min-width:0;
  margin-inline:auto;
  justify-content:center;
}
.desktop-pipeline-wrap .kanban-col {
  flex:1 1 0;
  width:auto !important;
  min-width:0;
}
.desktop-pipeline-wrap .pipeline-col-header,
.desktop-pipeline-wrap .pipeline-col-header .col-title {
  white-space:normal;
}
.desktop-pipeline-wrap .pipeline-col-header .col-title {
  min-width:0;
  overflow-wrap:anywhere;
}
.col-header { padding:10px 12px !important; margin-bottom:9px !important; border-radius:9px !important; }
.col-title { font-size:18px !important; line-height:1.15 !important; }
.col-count { font-size:18px !important; min-width:27px !important; text-align:center !important; padding:4px 8px !important; border-radius:12px !important; }
.add-card-btn { font-size:18px !important; padding:9px !important; border-radius:8px !important; }
.card-title { font-size:17px !important; }
.card-empresa,
.card-contact,
.card-row,
.tag,
.btn-move { font-size:13px !important; }
.card-value { font-size:19px !important; }

#root [style*="font-size:9px"],
#root [style*="font-size: 9px"] { font-size:13px !important; }
#root [style*="font-size:10px"],
#root [style*="font-size: 10px"] { font-size:14px !important; }
#root [style*="font-size:11px"],
#root [style*="font-size: 11px"] { font-size:15px !important; }
#root [style*="font-size:12px"],
#root [style*="font-size: 12px"] { font-size:17px !important; }
#root [style*="font-size:13px"],
#root [style*="font-size: 13px"] { font-size:18px !important; }
#root [style*="font-size:14px"],
#root [style*="font-size: 14px"] { font-size:19px !important; }
#root [style*="font-size:15px"],
#root [style*="font-size: 15px"] { font-size:20px !important; }
#root [style*="font-size:16px"],
#root [style*="font-size: 16px"] { font-size:21px !important; }
#root [style*="font-size:18px"],
#root [style*="font-size: 18px"] { font-size:23px !important; }
#root [style*="font-size:19px"],
#root [style*="font-size: 19px"] { font-size:24px !important; }
#root [style*="font-size:20px"],
#root [style*="font-size: 20px"] { font-size:25px !important; }
#root [style*="font-size:22px"],
#root [style*="font-size: 22px"] { font-size:27px !important; }

/* Settings and user-admin sizing */
.settings-user strong { font-size:14px !important; }
.settings-user span { font-size:12px !important; }
.settings-item { font-size:14px !important; }
.user-admin-modal .modal-title { font-size:24px !important; }
.user-admin-modal .modal-section-title,
.user-admin-modal .f label { font-size:13px !important; }
.user-admin-modal .f input { font-size:16px !important; padding:9px 11px !important; }
.user-admin-modal .btn { font-size:15px !important; padding:8px 14px !important; border-radius:18px !important; }
.user-panel-title { font-size:18px !important; }
.user-panel-sub,
.user-row-meta,
.permission-card small { font-size:13px !important; }
.user-row-name,
.permission-card strong,
.user-active-check { font-size:15px !important; }
.empty-modules-card h2 { font-size:26px !important; }
.empty-modules-card p { font-size:16px !important; }

/* Requested typography scale */
#root,
#root *,
body,
button,
input,
select,
textarea { font-size:16px !important; }
#root,
#root *,
body,
button,
input,
select,
textarea {
  text-transform:none !important;
  letter-spacing:normal !important;
}
.main-nav .nav-tab { font-size:16px !important; }
#root [style*="font-size:9px"],
#root [style*="font-size: 9px"],
#root [style*="font-size:10px"],
#root [style*="font-size: 10px"],
#root [style*="font-size:11px"],
#root [style*="font-size: 11px"],
#root [style*="font-size:12px"],
#root [style*="font-size: 12px"],
#root [style*="font-size:13px"],
#root [style*="font-size: 13px"],
#root [style*="font-size:14px"],
#root [style*="font-size: 14px"],
#root [style*="font-size:15px"],
#root [style*="font-size: 15px"],
#root [style*="font-size:16px"],
#root [style*="font-size: 16px"],
#root [style*="font-size:18px"],
#root [style*="font-size: 18px"],
#root [style*="font-size:19px"],
#root [style*="font-size: 19px"],
#root [style*="font-size:20px"],
#root [style*="font-size: 20px"],
#root [style*="font-size:22px"],
#root [style*="font-size: 22px"],
#root [style*="font-size:28px"],
#root [style*="font-size: 28px"],
#root [style*="font-size:32px"],
#root [style*="font-size: 32px"] { font-size:16px !important; }
.main-nav .nav-tab,
.main-nav .nav-tab * { font-size:16px !important; }

@keyframes prog {
  0% { transform:scaleX(0); transform-origin:left; }
  50% { transform:scaleX(.72); }
  100% { transform:scaleX(1); transform-origin:right; }
}

@keyframes floatPulse {
  0%, 100% { transform:translateY(0) scale(1); }
  50% { transform:translateY(-2px) scale(1.03); }
}

@media (max-width: 1080px) {
  .header { flex-wrap:wrap; }
  .main-nav-shell { order:3; width:100%; }
  .header-actions { margin-left:0; }
  .sub-tabs-bar { grid-template-columns:1fr; justify-items:stretch; }
  .sub-tabs-side-left { display:flex; }
  .sub-tabs { flex-wrap:wrap; }
  .sub-tabs-side-right { justify-content:flex-end; }
  .commercial-subtabs-bar { grid-template-columns:1fr; }
  .sub-tabs-bar,
  .stats-bar,
  .kanban-wrap,
  .seg-layout,
  .clients-wrap,
  .metrics-wrap,
  .id-toolbar { padding-left:18px; padding-right:18px; }
  .id-toolbar { grid-template-columns:1fr; }
  .id-summary-grid { grid-template-columns:repeat(auto-fit, minmax(180px, 1fr)); }
  .adm-toolbar { padding-left:18px; padding-right:18px; grid-template-columns:1fr; }
  .adm-summary-grid { grid-template-columns:repeat(auto-fit, minmax(180px, 1fr)); }
  .prod-toolbar { padding-left:18px; padding-right:18px; grid-template-columns:1fr; }
  .prod-summary-grid { grid-template-columns:repeat(auto-fit, minmax(180px, 1fr)); }
  .prod-split-shell,
  .prod-metrics-panels { grid-template-columns:1fr; }
  .prod-mini-summary-grid,
  .prod-inventory-row,
  .prod-inventory-editor-row { grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .pending-hero { grid-template-columns:1fr; align-items:stretch; }
  .pending-totals { justify-content:flex-start; width:100%; }
  .pipeline-period-controls { width:100%; margin-left:0; justify-content:flex-end; }
  .metrics-layout { grid-template-columns:1fr; }
  .metrics-status-grid { grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .metrics-chart-grid { grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .metrics-summary-grid { grid-template-columns:1fr; }
  .metrics-panel-head { flex-direction:column; align-items:flex-start; }
  .metrics-hero { flex-direction:column; align-items:flex-start; }
  .metrics-delivery-list { grid-template-columns:1fr; }
  .seg-layout { flex-direction:column; overflow:auto; padding:12px 14px 156px; gap:12px; }
  .seg-left,
  .seg-right { width:100%; max-height:none; overflow:visible; min-height:0; }
  .seg-list,
  .seg-timeline { overflow:visible; max-height:none; }
  .clients-wrap { flex-direction:column; }
  .clients-list,
  .client-detail { width:100%; max-height:none; }
  .clients-filter-row { grid-template-columns:1fr; }
  .detail-grid,
  .f-row { grid-template-columns:1fr; }
}

@media (min-width: 721px) {
  .desktop-prod-view-fab,
  .desktop-prod-legend-fab { display:flex; }
}

@media (max-width: 720px) {
  .app-wrap {
    min-height:100dvh;
    height:100dvh;
    padding-bottom:calc(82px + env(safe-area-inset-bottom));
  }
  .view-area { min-height:0; }
  .header {
    display:grid;
    grid-template-columns:minmax(0, 1fr) auto;
    grid-template-areas:"logo actions";
    align-items:center;
    padding:calc(8px + env(safe-area-inset-top)) 14px 8px;
    min-height:auto;
    gap:10px 12px;
  }
  .logo-wrap {
    grid-area:logo;
    min-width:0;
    align-self:center;
  }
  .brand-lockup { min-width:0; }
  .brand-symbol { width:36px; height:36px; }
  .brand-wordmark { width:min(128px, 52vw); }
  .mobile-module-shell { display:none !important; }
  .main-nav-shell { display:none !important; }
  .mobile-bottom-nav {
    position:fixed;
    left:12px;
    right:12px;
    bottom:calc(10px + env(safe-area-inset-bottom));
    z-index:90;
    display:grid;
    grid-template-columns:repeat(5, minmax(0, 1fr));
    gap:8px;
    padding:8px;
    background:rgba(255,255,255,.96);
    border:1px solid rgba(226,224,218,.92);
    border-radius:24px;
    box-shadow:0 18px 34px rgba(45,35,46,.18);
    backdrop-filter:blur(18px);
  }
  .mobile-bottom-nav-btn {
    min-width:0;
    min-height:54px;
    border-radius:18px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:transparent;
    color:var(--text3);
    transition:all .15s;
  }
  .mobile-bottom-nav-btn.active {
    background:var(--purple);
    color:#fff;
    box-shadow:0 10px 22px rgba(129,33,137,.22);
  }
  .mobile-bottom-nav-icon {
    width:24px;
    height:24px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
  }
  .mobile-bottom-nav-icon svg {
    width:24px;
    height:24px;
    display:block;
  }
  .mobile-hide-creation { display:none !important; }
  .mobile-hide-period { display:none !important; }
  .mobile-hide-prod-view-switch { display:none !important; }
  .header-search-btn { display:none !important; }
  .mobile-prod-view-fab {
    position:fixed;
    left:14px;
    bottom:calc(154px + env(safe-area-inset-bottom));
    z-index:88;
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:4px;
    border-radius:18px;
    border:1px solid rgba(94, 146, 34, .24);
    background:rgba(241, 248, 227, .98);
    box-shadow:0 18px 30px rgba(94,146,34,.16);
    backdrop-filter:blur(14px);
  }
  .mobile-prod-view-fab-btn {
    min-width:78px;
    min-height:50px;
    padding:0 14px;
    border-radius:14px;
    font-size:14px;
    font-weight:800;
    color:var(--green-dark);
    background:transparent;
  }
  .mobile-prod-view-fab-btn.active {
    background:var(--green);
    color:#fff;
    box-shadow:var(--shadow-sm);
  }
  .prod-bottom-controls { display:contents; }
  .prod-gantt-status-fab {
    bottom:calc(86px + env(safe-area-inset-bottom));
    max-width:calc(100vw - 28px);
    gap:4px;
    padding:5px;
  }
  .prod-gantt-status-item {
    min-width:0;
    min-height:44px;
    gap:4px;
    padding:5px 7px;
  }
  .prod-gantt-status-item > span:not(.prod-gantt-status-dot) {
    font-size:11px !important;
  }
  .prod-gantt-status-item strong {
    min-width:14px;
    font-size:16px !important;
  }
  .prod-gantt-status-dot {
    width:7px;
    height:7px;
  }
  .mobile-action-fab {
    position:fixed;
    right:14px;
    bottom:calc(86px + env(safe-area-inset-bottom));
    z-index:88;
    width:58px;
    height:58px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:0;
    border-radius:50%;
    background:var(--purple);
    color:#fff;
    box-shadow:0 18px 30px rgba(129,33,137,.24);
  }
  .global-search-fab {
    position:fixed;
    left:14px;
    bottom:calc(86px + env(safe-area-inset-bottom));
    z-index:88;
    width:58px;
    height:58px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:0;
    border-radius:50%;
    background:var(--green);
    color:#fff;
    box-shadow:0 18px 30px rgba(94,146,34,.24);
  }
  .global-search-fab svg {
    width:24px;
    height:24px;
    stroke:currentColor;
    fill:none;
    stroke-width:2;
    stroke-linecap:round;
    stroke-linejoin:round;
  }
  .mobile-action-fab-plus {
    width:30px;
    height:30px;
    border-radius:50%;
    background:rgba(255,255,255,.16);
    display:inline-flex;
    align-items:center;
    justify-content:center;
    font-size:24px;
    font-weight:900;
    line-height:1;
  }
  .seg-mobile-search-fab { display:none !important; }
  .pipeline-mobile-hide-controls { display:none !important; }
  .main-nav-stack { gap:8px; }
  .main-nav-frame { margin:0 -2px; }
  .main-nav {
    justify-content:flex-start;
    gap:8px;
    padding:0 2px 4px;
    scroll-snap-type:x proximity;
  }
  .main-nav .nav-tab {
    min-height:44px;
    padding:10px 14px !important;
    border-radius:16px !important;
    scroll-snap-align:start;
    white-space:nowrap;
  }
  .nav-scroll-btn,
  .nav-scroll-shadow,
  .nav-scroll-meter { display:none; }
  .header-actions {
    grid-area:actions;
    gap:8px;
    justify-self:end;
    justify-content:flex-end;
    align-self:center;
  }
  .settings-wrap { position:static; }
  .settings-btn { width:44px; height:44px; }
  .settings-btn svg { width:20px; height:20px; }
  .settings-menu,
  .notifications-menu {
    position:fixed;
    top:calc(env(safe-area-inset-top) + 66px);
    left:12px;
    right:12px;
    width:auto;
    max-width:none;
    border-radius:18px;
    z-index:240;
  }
  .settings-menu::before { display:none; }
  .notifications-menu {
    max-height:min(72dvh, 620px);
  }
  .notifications-list {
    max-height:min(56dvh, 460px);
  }
  .sub-tabs-bar {
    margin:10px 14px 0;
    padding:8px 10px;
    min-height:auto !important;
    gap:10px;
    border-radius:18px;
  }
  .sub-tabs-side-left { display:flex; }
  .sub-tabs {
    justify-content:flex-start;
    flex-wrap:nowrap;
    overflow-x:auto;
    overflow-y:hidden;
    gap:8px;
    padding-bottom:2px;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
  }
  .sub-tabs::-webkit-scrollbar { display:none; }
  .sub-tab {
    min-width:max-content;
    flex:0 0 auto;
    min-height:38px;
    padding:8px 12px !important;
    border:1px solid var(--border);
    border-bottom:none;
    border-radius:12px;
    background:var(--bg);
    color:var(--text2);
  }
  .sub-tab.active {
    background:var(--purple);
    color:#fff;
    border-color:var(--purple);
  }
  .sub-tabs-side-right,
  .commercial-subtabs-side-right,
  .id-toolbar-actions,
  .adm-toolbar-actions,
  .prod-toolbar-actions {
    width:100%;
    justify-content:stretch;
    gap:10px;
  }
  .sub-tabs-side-right { justify-content:flex-start; }
  .commercial-subtabs-nav { justify-content:flex-start; }
  .commercial-subtabs-side-right { justify-content:flex-start; }
  .sala-shell { grid-template-columns:1fr; padding:12px 14px 108px; gap:12px; }
  .sala-thread-list { min-height:240px; }
  .sala-panel { min-height:420px; }
  .sala-message { max-width:92%; }
  .sala-compose textarea { min-height:120px; }
  .sub-tabs-period-controls,
  .pipeline-period-controls { width:100%; justify-content:flex-start; }
  .mobile-pipeline-toolbar {
    display:flex;
    flex-direction:column;
    gap:10px;
    padding:12px 14px 0;
  }
  .mobile-pipeline-toolbar-row {
    display:grid;
    grid-template-columns:minmax(0, 1fr) auto;
    gap:10px;
    align-items:center;
  }
  .commercial-period-picker,
  .commercial-period-trigger,
  .mobile-pipeline-stage-dropdown,
  .mobile-pipeline-stage-dropdown .filter-dropdown-trigger,
  .mobile-pipeline-add-btn,
  .pipeline-period-group,
  .pipeline-period-group-single,
  .pipeline-year-group,
  .prod-period-controls,
  .prod-period-controls .commercial-period-picker,
  .prod-period-controls .commercial-period-trigger,
  .adm-period-controls,
  .adm-period-controls .commercial-period-picker,
  .adm-period-controls .commercial-period-trigger,
  .sub-tabs-side-right .btn-add,
  .id-toolbar-actions .btn-add,
  .adm-toolbar-actions .btn-add,
  .prod-toolbar-actions .btn-add,
  .pending-selected-user,
  .filter-dropdown,
  .filter-dropdown-trigger { width:100%; min-width:0; }
  .mobile-pipeline-period-controls,
  .mobile-pipeline-period-controls .commercial-period-picker,
  .mobile-pipeline-period-controls .commercial-period-trigger {
    width:auto;
    min-width:0;
  }
  .commercial-period-trigger,
  .filter-dropdown-trigger,
  .btn-add,
  .btn,
  .btn-submit,
  .settings-btn,
  .pending-task-open {
    min-height:46px;
  }
  .mobile-pipeline-add-btn {
    order:1;
  }
  .mobile-pipeline-period-controls {
    order:2;
    justify-self:end;
  }
  .mobile-pipeline-period-controls .commercial-period-trigger.icon-only {
    width:46px;
    min-width:46px;
    height:46px;
    min-height:46px;
    padding:0;
    justify-content:center;
    border-radius:16px;
    background:var(--green);
    border-color:var(--green);
    color:#fff;
  }
  .mobile-pipeline-period-controls .commercial-period-trigger.icon-only:hover,
  .mobile-pipeline-period-controls .commercial-period-trigger.icon-only.open {
    background:var(--green-dark);
    border-color:var(--green-dark);
  }
  .mobile-pipeline-period-controls .commercial-period-trigger.icon-only .commercial-period-trigger-caret {
    display:none;
  }
  .mobile-pipeline-period-controls .commercial-period-trigger-icon {
    font-size:20px;
  }
  .mobile-pipeline-stage-dropdown .filter-dropdown-trigger {
    justify-content:flex-start;
  }
  .mobile-pipeline-stage-dropdown .filter-dropdown-meta {
    margin-left:auto;
    padding-right:2px;
  }
  .sub-tabs-bar,
  .stats-bar,
  .kanban-wrap,
  .seg-layout,
  .clients-wrap,
  .metrics-wrap,
  .id-toolbar { padding-left:14px; padding-right:14px; }
  .adm-toolbar,
  .prod-toolbar,
  .id-toolbar,
  .pending-hero {
    margin-left:14px;
    margin-right:14px;
    padding-left:14px;
    padding-right:14px;
    border-radius:20px;
  }
  .id-toolbar,
  .adm-toolbar,
  .prod-toolbar,
  .pending-hero {
    padding-top:12px;
    padding-bottom:12px;
    min-height:auto;
    gap:10px;
  }
  .pending-controls { flex-direction:column; align-items:stretch; }
  .pending-totals { display:grid; grid-template-columns:1fr; gap:8px; }
  .pending-summary-card { min-width:0; }
  .pending-grid,
  .pending-grid-single { grid-template-columns:1fr; gap:12px; }
  .pending-user-card { padding:13px; border-radius:16px; }
  .pending-list { gap:10px; }
  .pending-task { padding:12px; border-radius:16px; gap:7px; }
  .pending-task-top { align-items:flex-start; }
  .pending-task-top-actions { width:100%; justify-content:space-between; margin-left:0; }
  .pending-subtask-top { flex-direction:column; }
  .pending-subtask-actions { width:100%; justify-content:space-between; }
  .pipeline-period-controls { width:100%; margin-left:0; justify-content:flex-start; }
  .pipeline-period-group,
  .pipeline-year-group { min-width:0; }
  .kanban-wrap {
    padding-top:14px !important;
    padding-bottom:18px;
    scroll-snap-type:x proximity;
  }
  .desktop-pipeline-wrap { display:none; }
  .mobile-pipeline-board {
    display:block;
    flex:1;
    overflow:auto;
    padding:14px 14px 18px;
  }
  .kanban-board { gap:14px !important; }
  .kanban-col { width:min(88vw, 320px) !important; scroll-snap-align:start; }
  .mobile-pipeline-board .mobile-pipeline-col {
    width:100% !important;
    max-width:none;
  }
  .mobile-pipeline-board .mobile-pipeline-col .col-header {
    display:none;
  }
  .mobile-pipeline-col .col-cards { gap:10px; }
  .mobile-pipeline-col .card { width:100%; }
  .pipeline-col-header { min-height:48px !important; padding:10px 16px !important; }
  .card {
    padding:14px 14px;
    border-radius:14px;
  }
  .card-actions { gap:8px; }
  .btn-move { min-height:38px; }
  .metrics-status-grid { grid-template-columns:1fr; }
  .metrics-chart-grid { grid-template-columns:1fr; }
  .metrics-chart-grid-two { grid-template-columns:1fr; }
  .metrics-summary-row,
  .metrics-summary-head { grid-template-columns:minmax(0, 1fr) 110px 96px; gap:8px; }
  .metrics-cultivo-detail-grid { grid-template-columns:1fr; }
  .metrics-chart-card { padding:12px; }
  .metrics-chart-head { flex-direction:column; align-items:flex-start; }
  .metrics-chart-head span { text-align:left; }
  .metrics-donut { width:150px; height:150px; }
  .metrics-panel,
  .clients-list,
  .client-detail,
  .seg-left,
  .seg-right,
  .prod-side-panel,
  .prod-detail-panel,
  .prod-metrics-window,
  .pending-user-card,
  .metrics-chart-card,
  .metrics-product-row,
  .metrics-delivery-card { border-radius:16px; }
  .metrics-delivery-toggle { flex-direction:column; align-items:stretch; }
  .metrics-delivery-detail { grid-template-columns:1fr; }
  .metrics-delivery-side { width:100%; justify-content:space-between; }
  .id-summary-grid { grid-template-columns:1fr; }
  .id-board { grid-template-columns:minmax(260px, 1fr); justify-content:stretch; min-width:0; gap:12px; }
  .id-col { width:auto; }
  .adm-summary-grid { grid-template-columns:1fr; }
  .adm-board { grid-template-columns:minmax(260px, 1fr); justify-content:stretch; min-width:0; gap:12px; }
  .adm-col { width:auto; }
  .prod-summary-grid { grid-template-columns:1fr; }
  .prod-layout { flex-direction:column; }
  .prod-floating-layout,
  .prod-split-shell,
  .prod-metrics-window { margin-left:14px; margin-right:14px; }
  .prod-toolbar-actions {
    width:100%;
    flex-direction:row;
    align-items:center;
    justify-content:space-between;
    gap:10px;
  }
  .prod-view-switch {
    width:100%;
    justify-content:space-between;
  }
  .prod-view-switch-btn {
    flex:1;
    min-width:0;
  }
  .prod-subtabs-actions.inventory-actions {
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
  .prod-subtabs-actions.inventory-actions .btn-add,
  .prod-subtabs-actions.inventory-actions .btn {
    width:100%;
    min-width:0;
  }
  .prod-card-layout { padding:14px; }
  .prod-card-board { grid-template-columns:1fr; min-width:0; }
  .prod-card-col { width:auto; }
  .prod-gantt-area { max-height:calc(100vh - 280px); }
  .prod-mini-summary-grid,
  .prod-inventory-row,
  .prod-inventory-editor-row { grid-template-columns:1fr; }
  .prod-split-shell { grid-template-columns:1fr; }
  .prod-detail-panel { display:none; }
  .inventory-choice-modal { width:min(100vw - 24px, 420px); }
  .inventory-choice-btn { min-height:88px; font-size:17px; }
  .g-header { margin:0 14px; }
  .new-id-hito-grid { grid-template-columns:1fr; }
  .metrics-product-row { flex-direction:column; align-items:flex-start; }
  .metrics-product-values { align-items:flex-start; text-align:left; }
  .product-detail-card { grid-template-columns:1fr; }
  .product-detail-head { flex-direction:row; align-items:center; justify-content:space-between; }
  .product-detail-grid { grid-template-columns:1fr; }
  .adm-type-inline-actions { justify-content:stretch; }
  .adm-type-inline-btn { flex:1; min-width:0; }
  .adm-toolbar { align-items:stretch; }
  .seg-left-header,
  .seg-right-header,
  .client-detail-hdr,
  .modal-hdr,
  .modal-body,
  .modal-ftr { padding-left:16px; padding-right:16px; }
  .seg-left-header {
    padding-top:10px;
    padding-bottom:10px;
  }
  .seg-right-header,
  .client-detail-hdr { gap:10px; }
  .seg-right-header { align-items:flex-start; flex-direction:column; }
  .seg-search-shell { display:none; }
  .seg-filter-row {
    margin-top:0;
    gap:8px;
  }
  .seg-filter-btn {
    min-height:38px;
    border-radius:12px;
    padding:6px 8px;
    font-size:12px;
  }
  .seg-quick-row,
  .qa-extras,
  .evid-link-row,
  .hito-add-inputs,
  .param-add-row,
  .fermentador-add-actions { flex-direction:column; }
  .negocio-seg-type-pills { grid-template-columns:repeat(3, minmax(0, 1fr)); }
  .seg-quick-add,
  .negocio-seg-quick-add {
    padding:14px;
    border-radius:16px;
  }
  .seg-type-pills,
  .negocio-seg-type-pills { gap:8px; }
  .seg-type-pill,
  .negocio-seg-type-pill {
    min-height:46px;
    border-radius:14px;
    padding:8px 6px;
    font-size:12px;
    line-height:1.2;
  }
  .negocio-seg-title-input { min-height:148px; }
  .negocio-seg-meta-grid { gap:10px; }
  .negocio-seg-meta-grid > .qa-extra-input:first-child,
  .negocio-seg-meta-grid > .qa-extra-input[type="date"],
  .negocio-seg-action-row { flex:1 1 100%; }
  .negocio-seg-action-row { grid-template-columns:minmax(0, 1fr) auto; }
  .negocio-seg-add-btn { min-width:104px; }
  .seg-mobile-search-fab {
    position:fixed;
    left:14px;
    bottom:calc(154px + env(safe-area-inset-bottom));
    z-index:88;
    width:58px;
    height:58px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:0;
    border-radius:50%;
    background:var(--green);
    color:#fff;
    box-shadow:0 18px 30px rgba(94,146,34,.24);
  }
  .seg-mobile-search-fab svg {
    width:24px;
    height:24px;
    stroke:currentColor;
    fill:none;
    stroke-width:2;
    stroke-linecap:round;
    stroke-linejoin:round;
  }
  .seg-search-modal { width:min(100vw - 24px, 420px); }
  .global-search-modal {
    width:min(100vw - 20px, 640px);
    max-height:min(88vh, 760px);
  }
  .global-search-results {
    grid-template-columns:1fr;
    max-height:min(58vh, 480px);
  }
  .seg-entry,
  .negocio-seg-entry {
    display:grid;
    grid-template-columns:28px 30px minmax(0, 1fr);
    align-items:start;
    gap:10px;
    margin-bottom:10px;
  }
  .seg-check,
  .seg-check-placeholder {
    width:28px;
    height:28px;
    margin-top:0;
    align-self:start;
  }
  .seg-entry-icon {
    width:30px;
    height:30px;
    margin-top:0 !important;
  }
  .seg-entry-body {
    min-width:0;
    padding:12px;
    border-radius:16px;
  }
  .seg-entry-top {
    flex-direction:column;
    align-items:stretch;
    gap:8px;
    margin-bottom:6px;
  }
  .seg-entry-title {
    font-size:14px;
    line-height:1.35;
  }
  .seg-entry-actions {
    width:100%;
    flex-wrap:wrap;
    justify-content:flex-start;
    gap:6px;
  }
  .seg-entry-desc {
    font-size:13px;
    line-height:1.45;
    margin-bottom:7px;
  }
  .seg-entry-meta {
    display:grid;
    grid-template-columns:1fr;
    gap:6px;
    align-items:start;
  }
  .seg-meta-item {
    font-size:12px;
    line-height:1.35;
  }
  .type-tag,
  .seg-inline-action {
    min-height:32px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    font-size:11px;
  }
  .pending-subtasks {
    gap:10px;
    padding-top:10px;
  }
  .pending-subtask {
    padding:12px;
    border-radius:14px;
    background:#fff;
  }
  .pending-subtask-top { gap:10px; }
  .pending-subtask-copy strong {
    font-size:14px;
    line-height:1.3;
  }
  .pending-subtask-copy p {
    font-size:13px;
    line-height:1.4;
  }
  .pending-subtask-meta {
    display:grid;
    grid-template-columns:1fr;
    gap:6px;
    align-items:start;
  }
  .pending-subtask-kind {
    font-size:11px;
    padding:4px 10px;
  }
  .pending-subtask-actions {
    gap:10px;
    width:100%;
    justify-content:space-between;
  }
  .fermentador-grid { grid-template-columns:1fr; }
  .qa-input,
  .qa-extra-input,
  .seg-search,
  .clients-search input,
  .client-selector-search input,
  .client-inline-input,
  .f input,
  .f select,
  .same-size-control { min-height:46px; font-size:16px !important; }
  .f textarea,
  .client-inline-textarea,
  .qa-extra-input[type="date"],
  textarea { font-size:16px !important; }
  .overlay {
    padding:0;
    align-items:flex-end;
  }
  .pending-quick-overlay { align-items:flex-end; }
  .pending-quick-drawer-shell {
    width:100vw;
    max-height:min(100dvh, 100vh);
    border-radius:20px 20px 0 0;
  }
  .modal,
  .modal.modal-lg,
  .modal.modal-xl {
    max-width:none;
    width:100vw;
    height:min(100dvh, 100vh);
    max-height:min(100dvh, 100vh);
    border-radius:20px 20px 0 0;
  }
  .modal-hdr,
  .modal-ftr {
    position:sticky;
    background:var(--surface);
    z-index:2;
  }
  .modal-hdr { top:0; padding-top:14px; padding-bottom:12px; }
  .modal-body { padding-top:14px; padding-bottom:18px; }
  .modal-ftr {
    bottom:0;
    padding-top:12px;
    padding-bottom:calc(12px + env(safe-area-inset-bottom));
    flex-wrap:wrap;
    justify-content:stretch;
  }
  .btn {
    display:inline-flex;
    align-items:center;
    justify-content:center;
  }
  .modal-ftr .btn,
  .modal-ftr > .btn {
    flex:1 1 140px;
  }
  .user-admin-grid { grid-template-columns:1fr; min-height:auto; }
  .pending-scope-options,
  .permissions-grid,
  .client-contact-grid,
  .client-cultivo-grid { grid-template-columns:1fr; }
  .adm-type-select-row { flex-wrap:wrap; }
  .adm-type-add-row { grid-template-columns:1fr; }
  .pipeline-col-header .col-count,
  .id-summary-grid,
  .adm-summary-grid,
  .prod-summary-grid,
  .pending-totals,
  .pending-count,
  .metrics-summary-grid { display:none !important; }
  .pipeline-col-header-main { justify-content:center; }
  .pipeline-col-header .col-title { width:100%; justify-content:center; text-align:center; }
  .sub-tabs-bar,
  .stats-bar,
  .kanban-wrap,
  .clients-wrap,
  .seg-layout,
  .metrics-wrap,
  .pending-wrap,
  .id-toolbar,
  .adm-toolbar,
  .prod-toolbar,
  .pending-hero,
  .prod-floating-layout,
  .prod-split-shell,
  .prod-metrics-window,
  .g-header,
  .g-body {
    margin-left:0 !important;
    margin-right:0 !important;
    width:100% !important;
    max-width:none !important;
  }
  .stats-bar,
  .kanban-wrap,
  .clients-wrap,
  .seg-layout,
  .metrics-wrap,
  .pending-wrap,
  .id-kanban-area { padding-left:0 !important; padding-right:0 !important; }
  .sub-tabs-bar,
  .id-toolbar,
  .adm-toolbar,
  .prod-toolbar,
  .pending-hero,
  .prod-floating-layout,
  .prod-split-shell,
  .prod-metrics-window,
  .g-header,
  .g-body { border-radius:0 !important; }
  .clients-list,
  .client-detail,
  .seg-left,
  .seg-right,
  .pending-user-card,
  .prod-side-panel,
  .prod-detail-panel,
  .prod-metrics-card,
  .prod-metrics-window { width:100%; max-width:none; }
  .settings-menu,
  .notifications-menu,
  .filter-dropdown-menu,
  .commercial-period-menu,
  .pipeline-year-menu {
    max-width:calc(100vw - 20px);
  }
  .settings-menu,
  .notifications-menu { width:auto; right:12px; left:12px; }
  .auth-card { padding:28px 22px; border-radius:20px; }
  .auth-title { font-size:34px; }
  .toast { left:14px; right:14px; bottom:16px; }
}

@media (max-width: 560px) {
  .brand-wordmark { width:min(112px, 48vw); }
  .main-nav .nav-tab { padding:10px 12px !important; }
  .sub-tabs-bar,
  .id-toolbar,
  .adm-toolbar,
  .prod-toolbar,
  .pending-hero,
  .clients-wrap,
  .seg-layout,
  .metrics-wrap,
  .kanban-wrap,
  .pending-wrap,
  .id-kanban-area { padding-left:0 !important; padding-right:0 !important; }
  .kanban-col { width:min(90vw, 300px) !important; }
  .stats-bar { padding:0 !important; gap:18px; height:70px; }
  .pending-task-top,
  .product-detail-head { flex-direction:column; align-items:flex-start; }
  .pending-task-top-actions { justify-content:flex-start; }
  .card-value,
  .metrics-card strong { line-height:1.1; }
}

/* ── Clientes 360 ─────────────────────────────────── */
.crm360-shell {
  display:flex;
  flex-direction:column;
  flex:1;
  min-height:0;
  gap:12px;
  margin:14px 18px 18px;
}
.crm360-summary {
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:10px;
}
.crm360-summary-card {
  position:relative;
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  gap:3px 12px;
  min-height:82px;
  padding:14px 16px;
  text-align:left;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:15px;
  box-shadow:0 4px 16px rgba(38,32,28,.04);
  overflow:hidden;
}
.crm360-summary-card::before {
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:4px;
  background:var(--summary-tone, var(--purple));
}
.crm360-summary-card:hover,
.crm360-summary-card.active { border-color:var(--summary-tone, var(--purple)); transform:translateY(-1px); }
.crm360-summary-card > span { align-self:end; font-size:12px; color:var(--text2); font-weight:800; }
.crm360-summary-card > strong { grid-row:1 / 3; grid-column:2; align-self:center; font:800 27px/1 Nunito,sans-serif; color:var(--text); }
.crm360-summary-card > small { font-size:10px; color:var(--text3); }
.crm360-summary-card.urgent { --summary-tone:#c0392b; }
.crm360-summary-card.repurchase { --summary-tone:var(--purple); }
.crm360-summary-card.quote { --summary-tone:#2563eb; }
.crm360-summary-card.risk { --summary-tone:#e0a800; }
.crm360-workspace {
  display:grid;
  grid-template-columns:minmax(300px, 340px) minmax(0, 1fr);
  flex:1;
  min-height:0;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:18px;
  overflow:hidden;
  box-shadow:0 8px 28px rgba(38,32,28,.05);
}
.crm360-client-panel {
  display:flex;
  flex-direction:column;
  min-width:0;
  min-height:0;
  background:#fbfaf8;
  border-right:1px solid var(--border);
}
.crm360-panel-head,
.crm360-detail-head,
.crm360-card-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.crm360-panel-head { min-height:68px; padding:14px 16px; border-bottom:1px solid var(--border); }
.crm360-panel-head > div,
.crm360-card-head > div { display:flex; flex-direction:column; gap:2px; min-width:0; }
.crm360-panel-head strong,
.crm360-card-head strong { font:800 14px/1.25 Nunito,sans-serif; color:var(--text); }
.crm360-panel-head span,
.crm360-card-head span { font-size:10px; color:var(--text3); }
.crm360-settings-btn {
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  border:1px solid var(--border);
  border-radius:10px;
  background:#fff;
  color:var(--text2);
  font-size:17px;
}
.crm360-settings-btn:hover { color:var(--purple); border-color:var(--purple-mid); }
.crm360-filters { display:flex; flex-direction:column; gap:8px; padding:11px 12px; border-bottom:1px solid var(--border); }
.crm360-filters input,
.crm360-filters select {
  width:100%;
  min-width:0;
  height:36px;
  padding:0 10px;
  background:#fff;
  border:1px solid var(--border);
  border-radius:10px;
  color:var(--text2);
  font-size:11px;
}
.crm360-filter-row { display:grid; grid-template-columns:1fr 1fr; gap:7px; }
.crm360-client-list { flex:1; min-height:0; overflow-y:auto; padding:7px; }
.crm360-client-row {
  width:100%;
  display:grid;
  grid-template-columns:38px minmax(0, 1fr) auto;
  align-items:center;
  gap:10px;
  padding:10px;
  margin-bottom:3px;
  text-align:left;
  background:transparent;
  border:1px solid transparent;
  border-radius:12px;
}
.crm360-client-row:hover { background:#fff; border-color:var(--border); }
.crm360-client-row.selected { background:var(--purple-soft); border-color:var(--purple-mid); }
.crm360-client-avatar {
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  border-radius:12px;
  background:linear-gradient(145deg, var(--purple), #a94cc0);
  color:#fff;
  font:800 11px/1 Nunito,sans-serif;
}
.crm360-client-avatar.large { width:46px; height:46px; border-radius:14px; font-size:13px; }
.crm360-client-copy { min-width:0; }
.crm360-client-copy > div { display:flex; align-items:center; gap:6px; min-width:0; }
.crm360-client-copy strong { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font:800 12px/1.25 Nunito,sans-serif; color:var(--text); }
.crm360-client-copy small { display:block; margin-top:4px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--text3); font-size:9.5px; }
.crm360-priority-count { min-width:22px; height:22px; display:grid; place-items:center; border-radius:8px; background:var(--purple); color:#fff; font-size:10px; font-weight:800; }
.crm360-status { display:inline-flex; align-items:center; width:max-content; padding:3px 7px; border-radius:999px; font-size:8px; font-weight:800; white-space:nowrap; background:#eee; color:var(--text2); }
.crm360-status.blue { background:#eaf1ff; color:#2563eb; }
.crm360-status.green { background:var(--green-soft); color:var(--green-dark); }
.crm360-status.purple { background:var(--purple-soft); color:var(--purple); }
.crm360-status.yellow { background:#fff7d6; color:#927300; }
.crm360-status.red { background:var(--red-soft); color:var(--red); }
.crm360-detail { min-width:0; min-height:0; overflow-y:auto; background:#f7f5f2; }
.crm360-detail-head { padding:18px 20px; background:#fff; border-bottom:1px solid var(--border); }
.crm360-customer-title { display:flex; align-items:center; gap:11px; min-width:0; }
.crm360-customer-title > div:nth-child(2) { min-width:0; }
.crm360-customer-title h2 { margin:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font:800 18px/1.2 Nunito,sans-serif; color:var(--text); }
.crm360-customer-title p { margin:4px 0 0; font-size:10px; color:var(--text3); }
.crm360-head-actions { display:flex; gap:8px; flex:0 0 auto; }
.crm360-kpis { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:1px; background:var(--border); border-bottom:1px solid var(--border); }
.crm360-kpis > div { min-width:0; padding:13px 16px; background:#fff; }
.crm360-kpis span { display:block; margin-bottom:5px; font-size:9px; color:var(--text3); text-transform:uppercase; letter-spacing:.04em; }
.crm360-kpis strong { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font:800 12px/1.3 Nunito,sans-serif; color:var(--text); }
.crm360-detail-grid { display:grid; grid-template-columns:minmax(0, 1.25fr) minmax(260px, .75fr); gap:12px; padding:14px; }
.crm360-card { min-width:0; padding:15px; background:#fff; border:1px solid var(--border); border-radius:15px; }
.crm360-card-head { padding-bottom:11px; margin-bottom:11px; border-bottom:1px solid var(--border); }
.crm360-card-head > b { min-width:26px; height:26px; display:grid; place-items:center; border-radius:9px; background:var(--purple-soft); color:var(--purple); font-size:11px; }
.crm360-recommendation-list { display:flex; flex-direction:column; gap:8px; }
.crm360-recommendation { position:relative; padding:12px 12px 11px 15px; border:1px solid var(--border); border-radius:12px; background:#fff; overflow:hidden; }
.crm360-recommendation::before { content:""; position:absolute; inset:0 auto 0 0; width:4px; background:var(--recommendation-color, var(--purple)); }
.crm360-recommendation.task { --recommendation-color:#c0392b; }
.crm360-recommendation.quote { --recommendation-color:#2563eb; }
.crm360-recommendation.repurchase { --recommendation-color:var(--purple); }
.crm360-recommendation.visit { --recommendation-color:#e67e22; }
.crm360-recommendation.evaluation { --recommendation-color:var(--green); }
.crm360-recommendation.overdue { background:#fffafa; }
.crm360-recommendation-top { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.crm360-recommendation-top > span { font:800 12px/1.25 Nunito,sans-serif; color:var(--text); }
.crm360-recommendation-top time { flex:0 0 auto; font-size:9px; color:var(--text3); }
.crm360-recommendation p { margin:6px 0 9px; color:var(--text2); font-size:10.5px; line-height:1.45; }
.crm360-recommendation > div:last-child { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.crm360-recommendation > div:last-child strong { font-size:10px; color:var(--recommendation-color, var(--purple)); }
.crm360-recommendation button { flex:0 0 auto; padding:5px 8px; border-radius:8px; background:var(--recommendation-color, var(--purple)); color:#fff; font-size:9px; font-weight:800; }
.crm360-profile-section { margin-top:13px; }
.crm360-profile-section > span { display:block; margin-bottom:7px; color:var(--text3); font-size:9px; font-weight:800; text-transform:uppercase; letter-spacing:.04em; }
.crm360-chips { display:flex; flex-wrap:wrap; gap:5px; }
.crm360-chips b { padding:5px 8px; border-radius:8px; background:var(--green-soft); color:var(--green-dark); font-size:9px; }
.crm360-chips.products b { background:var(--purple-soft); color:var(--purple); }
.crm360-chips.opportunities b { background:#fff7d6; color:#7d6500; }
.crm360-profile-section em,
.crm360-contact-list em { color:var(--text3); font-size:10px; font-style:normal; }
.crm360-contact-list { display:flex; flex-direction:column; gap:6px; }
.crm360-contact-list > div { padding:8px 9px; border-radius:9px; background:#faf9f7; }
.crm360-contact-list strong,
.crm360-contact-list small { display:block; }
.crm360-contact-list strong { font-size:10px; color:var(--text); }
.crm360-contact-list small { margin-top:2px; font-size:9px; color:var(--text3); }
.crm360-purchase-list,
.crm360-timeline { display:flex; flex-direction:column; }
.crm360-purchase-list > div { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:9px 0; border-bottom:1px solid var(--border); }
.crm360-purchase-list > div:last-child { border-bottom:0; }
.crm360-purchase-list > div > div { min-width:0; }
.crm360-purchase-list strong,
.crm360-purchase-list span { display:block; }
.crm360-purchase-list strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:10.5px; color:var(--text); }
.crm360-purchase-list span { margin-top:3px; font-size:9px; color:var(--text3); }
.crm360-purchase-list > div > b { flex:0 0 auto; font:800 10.5px/1 Nunito,sans-serif; color:var(--green-dark); }
.crm360-timeline > div { display:grid; grid-template-columns:30px minmax(0, 1fr); gap:9px; padding:8px 0; border-bottom:1px solid var(--border); }
.crm360-timeline > div:last-child { border-bottom:0; }
.crm360-timeline > div > span { width:28px; height:28px; display:grid; place-items:center; border-radius:9px; font-size:12px; }
.crm360-timeline strong,
.crm360-timeline small { display:block; }
.crm360-timeline strong { font-size:10.5px; color:var(--text); }
.crm360-timeline small { margin-top:3px; font-size:9px; color:var(--text3); }
.crm360-timeline p { margin:5px 0 0; font-size:9.5px; color:var(--text2); line-height:1.4; }
.crm360-empty { padding:22px 14px; text-align:center; color:var(--text3); font-size:10.5px; line-height:1.5; }
.crm360-empty.large { display:grid; place-items:center; min-height:300px; }
.crm360-channel-grid { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:8px; margin-bottom:14px; }
.crm360-channel-grid button { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px; min-height:62px; padding:8px; border:1px solid var(--border); border-radius:12px; background:#fff; color:var(--text2); font-size:10px; font-weight:800; }
.crm360-channel-grid button span { font-size:18px; }
.crm360-channel-grid button.active { border-color:var(--channel-color); background:var(--channel-bg); color:var(--channel-color); box-shadow:0 0 0 1px var(--channel-color); }
.crm360-cycle-intro { margin:0 0 16px; padding:11px 13px; border-radius:11px; background:var(--purple-soft); color:var(--text2); font-size:11px; line-height:1.45; }
.crm360-cycle-form { display:grid; grid-template-columns:1.05fr 1.05fr .8fr .8fr .9fr auto; align-items:end; gap:8px; margin-bottom:18px; }
.crm360-cycle-form .f { margin:0; }
.crm360-cycle-form .btn { min-height:40px; }
.crm360-cycle-actions { display:flex; justify-content:flex-end; gap:5px; }
.crm360-cycle-actions button { padding:4px 7px; border-radius:7px; background:var(--purple-soft); color:var(--purple); font-size:9px; font-weight:800; }
.crm360-cycle-actions button.danger { background:var(--red-soft); color:var(--red); }

@media (max-width: 1100px) {
  .crm360-workspace { grid-template-columns:minmax(270px, 300px) minmax(0, 1fr); }
  .crm360-detail-grid { grid-template-columns:1fr; }
  .crm360-cycle-form { grid-template-columns:repeat(3, minmax(0, 1fr)); }
  .crm360-cycle-form .btn { min-height:46px; }
}

@media (max-width: 760px) {
  .crm360-shell { display:block; margin:0; overflow-y:auto; }
  .crm360-summary { display:flex; gap:8px; padding:10px; overflow-x:auto; scrollbar-width:none; }
  .crm360-summary::-webkit-scrollbar { display:none; }
  .crm360-summary-card { flex:0 0 174px; min-height:76px; }
  .crm360-workspace { display:block; border-radius:0; border-left:0; border-right:0; overflow:visible; }
  .crm360-client-panel { max-height:390px; border-right:0; border-bottom:1px solid var(--border); }
  .crm360-client-list { min-height:180px; }
  .crm360-detail { overflow:visible; }
  .crm360-detail-head { align-items:flex-start; flex-direction:column; padding:15px; }
  .crm360-customer-title { width:100%; flex-wrap:wrap; }
  .crm360-customer-title > div:nth-child(2) { flex:1; }
  .crm360-head-actions { width:100%; }
  .crm360-head-actions .btn { flex:1; justify-content:center; }
  .crm360-kpis { grid-template-columns:1fr 1fr; }
  .crm360-kpis > div { padding:12px; }
  .crm360-detail-grid { padding:10px; gap:10px; }
  .crm360-card { padding:13px; border-radius:13px; }
  .crm360-recommendation > div:last-child { align-items:flex-start; flex-direction:column; }
  .crm360-recommendation button { width:100%; min-height:36px; }
  .crm360-channel-grid { grid-template-columns:1fr 1fr; }
  .crm360-cycle-form { grid-template-columns:1fr; }
  .crm360-cycles-modal .metrics-table-wrap { overflow-x:auto; }
  .crm360-cycles-modal .metrics-table { min-width:650px; }
}
