:root {
  color-scheme: light;
  --bg: #f3f1eb;
  --panel: rgba(255, 254, 250, 0.94);
  --surface-muted: #e9eee9;
  --ink: #18231f;
  --muted: #596761;
  --line: #d4dbd6;
  --blue: #256f78;
  --blue-soft: #e2f0f0;
  --green: #18745c;
  --green-soft: #e2f1ea;
  --amber: #b66a2c;
  --amber-soft: #f8eadc;
  --red: #b8483f;
  --red-soft: #f8e6e2;
  --violet: #2f776c;
  --violet-soft: #e2efeb;
  --mint: #77a99b;
  --peach: #d98a56;
  --lemon: #d4a64e;
  --rose: #c96658;
  --navy: #263832;
  --cyan: #56a4a4;
  --chart-1: #18745c;
  --chart-2: #d18a3f;
  --chart-3: #287d88;
  --chart-4: #8a6a42;
  --chart-5: #bf5549;
  --chart-6: #6a8f78;
  --surface-base: #f3f1eb;
  --surface-soft: rgba(255, 254, 250, 0.78);
  --surface-raised: rgba(255, 254, 250, 0.94);
  --surface-strong: #ffffff;
  --border-soft: rgba(37, 60, 52, 0.11);
  --border-medium: rgba(37, 60, 52, 0.2);
  --shadow-xs: 0 1px 2px rgba(24, 35, 31, 0.07);
  --shadow-sm: 0 8px 22px rgba(24, 35, 31, 0.08);
  --shadow-md: 0 16px 40px rgba(24, 35, 31, 0.11);
  --shadow-lg: 0 24px 70px rgba(24, 35, 31, 0.14);
  --shadow: var(--shadow-sm);
  --shadow-drawer: -28px 0 70px rgba(16, 24, 40, 0.22);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --font-body: "IBM Plex Sans", Inter, ui-sans-serif, system-ui, sans-serif;
  --font-display: Manrope, "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
}

body[data-theme="pastel"] {
  --bg: #f7f2ff; --panel: rgba(255, 255, 255, 0.88); --surface-muted: #f0f7ff;
  --ink: #263048; --muted: #6e7890; --line: #e4dff1;
  --blue: #7ea7ff; --blue-soft: #edf3ff; --green: #74cbb2; --green-soft: #e9f8f3;
  --amber: #e6b36a; --amber-soft: #fff5e7; --red: #d76374; --red-soft: #fff0f3;
  --violet: #9b7fea; --violet-soft: #f1edff; --mint: #bfeadf; --peach: #ffd7c2;
  --lemon: #f7e7a4; --rose: #ffc8d6; --navy: #4b5472; --cyan: #9edfee;
  --chart-1: #7398e8; --chart-2: #57a98f; --chart-3: #c88b3d;
  --chart-4: #9275d2; --chart-5: #d76374; --chart-6: #519aa8;
  --surface-base: #f7f2ff; --surface-soft: rgba(255, 255, 255, 0.72);
  --surface-raised: rgba(255, 255, 255, 0.9);
  --border-soft: rgba(92, 84, 122, 0.1); --border-medium: rgba(92, 84, 122, 0.16);
}

body[data-theme="studio"] {
  --bg: #f4f1e9; --panel: rgba(255, 253, 247, 0.94); --surface-muted: #ece9df;
  --ink: #161a1d; --muted: #5d6468; --line: #d9d5ca;
  --blue: #315db8; --blue-soft: #e8edf8; --green: #087f67; --green-soft: #e1f1eb;
  --amber: #c97708; --amber-soft: #faecd6; --red: #c33445; --red-soft: #f8e4e6;
  --violet: #7351a6; --violet-soft: #eee7f6; --mint: #69bca1; --peach: #ed7b54;
  --lemon: #e2ae32; --rose: #d45a65; --navy: #26313a; --cyan: #3c9aa8;
  --chart-1: #087f67; --chart-2: #ed6b45; --chart-3: #315db8;
  --chart-4: #d39a14; --chart-5: #9a4b83; --chart-6: #42a49a;
  --surface-base: #f4f1e9; --surface-soft: rgba(255,253,247,.76);
  --surface-raised: rgba(255,253,247,.94); --border-soft: rgba(22,26,29,.1);
  --border-medium: rgba(22,26,29,.18);
}

body[data-theme="glass"] {
  --bg: #e9eef5; --panel: rgba(255,255,255,.48); --surface-muted: rgba(238,243,249,.56);
  --ink: #18222c; --muted: #596775; --line: rgba(255,255,255,.64);
  --blue: #236bbd; --blue-soft: rgba(212,232,250,.62); --green: #127b6b; --green-soft: rgba(210,241,232,.6);
  --amber: #b96e16; --amber-soft: rgba(252,234,207,.65); --red: #b5434c; --red-soft: rgba(250,220,224,.62);
  --violet: #6558a8; --violet-soft: rgba(228,224,248,.62);
  --chart-1: #236bbd; --chart-2: #16a085; --chart-3: #e09232;
  --chart-4: #735eb8; --chart-5: #d95762; --chart-6: #3d9ca6;
  --surface-base: #e9eef5; --surface-soft: rgba(255,255,255,.42);
  --surface-raised: rgba(255,255,255,.55); --surface-strong: rgba(255,255,255,.74);
  --border-soft: rgba(255,255,255,.58); --border-medium: rgba(255,255,255,.82);
  --shadow-xs: 0 1px 2px rgba(43,62,82,.08); --shadow-sm: 0 12px 34px rgba(43,62,82,.12);
  --shadow-md: 0 20px 50px rgba(43,62,82,.15); --shadow-lg: 0 30px 80px rgba(43,62,82,.18);
}

body[data-theme="neo"] {
  --bg: #e7ecf4; --panel: rgba(255,255,255,.94); --surface-muted: #edf2f8;
  --ink: #10294a; --muted: #71819a; --line: #d8e0eb;
  --blue: #2f69b1; --blue-soft: #e6eefb; --green: #49bc95; --green-soft: #e4f7ef;
  --amber: #e9b04e; --amber-soft: #fff4dc; --red: #eb756e; --red-soft: #fde8e6;
  --violet: #6d82c7; --violet-soft: #e9edf9; --mint: #8edcc7; --peach: #f08a76;
  --lemon: #d8e57d; --rose: #ee8f9a; --navy: #0c2c55; --cyan: #72b8d9;
  --chart-1: #2f69b1; --chart-2: #eb756e; --chart-3: #49bc95;
  --chart-4: #9fb4dd; --chart-5: #0c2c55; --chart-6: #e9b04e;
  --surface-base: #e7ecf4; --surface-soft: rgba(255,255,255,.72);
  --surface-raised: rgba(255,255,255,.96); --surface-strong: #ffffff;
  --border-soft: rgba(16,41,74,.1); --border-medium: rgba(16,41,74,.18);
  --shadow-xs: 0 1px 2px rgba(16,41,74,.06); --shadow-sm: 0 10px 26px rgba(16,41,74,.08);
  --shadow-md: 0 18px 42px rgba(16,41,74,.1); --shadow-lg: 0 28px 76px rgba(16,41,74,.14);
}

body[data-theme="atlas"] {
  --bg: #f5faf8;
  --panel: rgba(255, 255, 255, 0.9);
  --surface-muted: #eef8f4;
  --ink: #21332f;
  --muted: #667a73;
  --line: #dbeae5;
  --blue: #6da7d9;
  --blue-soft: #eaf5ff;
  --green: #5cc0a2;
  --green-soft: #e8f8f2;
  --amber: #d9aa5f;
  --amber-soft: #fff6e8;
  --red: #df7f87;
  --red-soft: #fff0f2;
  --violet: #9f94cf;
  --violet-soft: #f0edfb;
  --chart-1: #6da7d9;
  --chart-2: #5cc0a2;
  --chart-3: #d9aa5f;
  --chart-4: #9f94cf;
  --chart-5: #df7f87;
  --chart-6: #8ed8d0;
  --border-soft: rgba(63, 96, 87, 0.1);
  --border-medium: rgba(63, 96, 87, 0.18);
}

body[data-theme="signal"] {
  --bg: #fff7f4;
  --panel: rgba(255, 255, 255, 0.9);
  --surface-muted: #fff0ea;
  --ink: #342c35;
  --muted: #806f76;
  --line: #f0ded9;
  --blue: #7b9fe8;
  --blue-soft: #edf3ff;
  --green: #71bea3;
  --green-soft: #edf8f3;
  --amber: #efbd72;
  --amber-soft: #fff5e8;
  --red: #e98291;
  --red-soft: #fff0f3;
  --violet: #c49ae8;
  --violet-soft: #f7edff;
  --chart-1: #7b9fe8;
  --chart-2: #71bea3;
  --chart-3: #efbd72;
  --chart-4: #c49ae8;
  --chart-5: #e98291;
  --chart-6: #f0a7a0;
  --border-soft: rgba(121, 83, 90, 0.1);
  --border-medium: rgba(121, 83, 90, 0.18);
}

body[data-palette="studio"] {
  --bg: #f4f1e9; --panel: rgba(255, 253, 247, 0.94); --surface-muted: #ece9df;
  --ink: #161a1d; --muted: #5d6468; --line: #d9d5ca;
  --blue: #315db8; --blue-soft: #e8edf8; --green: #087f67; --green-soft: #e1f1eb;
  --amber: #c97708; --amber-soft: #faecd6; --red: #c33445; --red-soft: #f8e4e6;
  --violet: #7351a6; --violet-soft: #eee7f6; --mint: #69bca1; --peach: #ed7b54;
  --lemon: #e2ae32; --rose: #d45a65; --navy: #26313a; --cyan: #3c9aa8;
  --surface-base: #f4f1e9; --surface-soft: rgba(255,253,247,.76);
  --surface-raised: rgba(255,253,247,.94); --surface-strong: #ffffff;
  --border-soft: rgba(22,26,29,.1); --border-medium: rgba(22,26,29,.18);
}

body[data-palette="neoSearch"] {
  --bg: #e7ecf4; --panel: rgba(255,255,255,.94); --surface-muted: #edf2f8;
  --ink: #10294a; --muted: #71819a; --line: #d8e0eb;
  --blue: #2f69b1; --blue-soft: #e6eefb; --green: #49bc95; --green-soft: #e4f7ef;
  --amber: #e9b04e; --amber-soft: #fff4dc; --red: #eb756e; --red-soft: #fde8e6;
  --violet: #6d82c7; --violet-soft: #e9edf9; --mint: #8edcc7; --peach: #f08a76;
  --lemon: #d8e57d; --rose: #ee8f9a; --navy: #0c2c55; --cyan: #72b8d9;
  --surface-base: #e7ecf4; --surface-soft: rgba(255,255,255,.72);
  --surface-raised: rgba(255,255,255,.96); --surface-strong: #ffffff;
  --border-soft: rgba(16,41,74,.1); --border-medium: rgba(16,41,74,.18);
  --shadow-xs: 0 1px 2px rgba(16,41,74,.06); --shadow-sm: 0 10px 26px rgba(16,41,74,.08);
  --shadow-md: 0 18px 42px rgba(16,41,74,.1); --shadow-lg: 0 28px 76px rgba(16,41,74,.14);
}

body[data-palette="brownOrangeBlue"] {
  --bg: #cedade; --panel: #ffffff; --surface-muted: #cedade;
  --ink: #000000; --muted: #255c6b; --line: #9cb5bc;
  --blue: #0f4c5c; --blue-soft: #cedade; --green: #255c6b; --green-soft: #9cb5bc;
  --amber: #fb8b24; --amber-soft: #cedade; --red: #9a031e; --red-soft: #cedade;
  --violet: #5f0f40; --violet-soft: #cedade; --mint: #9cb5bc; --peach: #e36414;
  --lemon: #f2a541; --rose: #b51c36; --navy: #000000; --cyan: #255c6b;
  --surface-base: #cedade; --surface-soft: rgba(255,255,255,.72);
  --surface-raised: rgba(255,255,255,.96); --surface-strong: #ffffff;
  --border-soft: rgba(15,76,92,.12); --border-medium: rgba(15,76,92,.22);
}

body[data-palette="verdeLimao"] {
  --bg: #ebf2fa; --panel: #ebf2fa; --surface-muted: #ebf2fa;
  --ink: #3c3744; --muted: #427aa1; --line: #427aa1;
  --blue: #064789; --blue-soft: #ebf2fa; --green: #38b000; --green-soft: #70e000;
  --amber: #9ef01a; --amber-soft: #ebf2fa; --red: #3c3744; --red-soft: #ebf2fa;
  --violet: #3d52d5; --violet-soft: #ebf2fa; --mint: #70e000; --peach: #427aa1;
  --lemon: #9ef01a; --rose: #3c3744; --navy: #090c9b; --cyan: #427aa1;
  --surface-base: #ebf2fa; --surface-soft: #ebf2fa;
  --surface-raised: #ebf2fa; --surface-strong: #ebf2fa;
  --border-soft: rgba(6,71,137,.11); --border-medium: rgba(6,71,137,.2);
}

body[data-palette="testSpectrum"] {
  --bg: #fbf8cc; --panel: #fde4cf; --surface-muted: #ffcfd2;
  --ink: #cfbaf0; --muted: #a3c4f3; --line: #cfbaf0;
  --blue: #90dbf4; --blue-soft: #a3c4f3; --green: #98f5e1; --green-soft: #b9fbc0;
  --amber: #fde4cf; --amber-soft: #fbf8cc; --red: #ffcfd2; --red-soft: #fde4cf;
  --violet: #cfbaf0; --violet-soft: #f1c0e8; --mint: #b9fbc0; --peach: #fde4cf;
  --lemon: #fbf8cc; --rose: #f1c0e8; --navy: #cfbaf0; --cyan: #8eecf5;
  --surface-base: #fbf8cc; --surface-soft: #fde4cf;
  --surface-raised: #fbf8cc; --surface-strong: #fde4cf;
  --border-soft: rgba(95,111,137,.11); --border-medium: rgba(95,111,137,.2);
}

body[data-chart-palette="studio"] {
  --chart-1: #087f67; --chart-2: #d85b36; --chart-3: #315db8;
  --chart-4: #c98212; --chart-5: #87436f; --chart-6: #2d8f7c;
}

body[data-chart-palette="neoSearch"] {
  --chart-1: #2f69b1; --chart-2: #eb756e; --chart-3: #49bc95;
  --chart-4: #9fb4dd; --chart-5: #0c2c55; --chart-6: #e9b04e;
}

body[data-chart-palette="brownOrangeBlue"] {
  --chart-1: #000000; --chart-2: #5f0f40; --chart-3: #9a031e;
  --chart-4: #fb8b24; --chart-5: #e36414; --chart-6: #0f4c5c;
  --chart-7: #255c6b; --chart-8: #9cb5bc; --chart-9: #cedade; --chart-10: #ffffff;
}

body[data-chart-palette="verdeLimao"] {
  --chart-1: #38b000; --chart-2: #70e000; --chart-3: #9ef01a;
  --chart-4: #064789; --chart-5: #427aa1; --chart-6: #ebf2fa;
  --chart-7: #3c3744; --chart-8: #090c9b; --chart-9: #3d52d5;
}

body[data-chart-palette="testSpectrum"] {
  --chart-1: #fbf8cc; --chart-2: #fde4cf; --chart-3: #ffcfd2;
  --chart-4: #f1c0e8; --chart-5: #cfbaf0; --chart-6: #a3c4f3;
  --chart-7: #90dbf4; --chart-8: #8eecf5; --chart-9: #98f5e1; --chart-10: #b9fbc0;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  background: var(--surface-base);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.45;
  transition: grid-template-columns 180ms ease;
}
body[data-theme="mineral"] {
  background: #f3f1eb;
}
body[data-theme="glass"] {
  background: #e8eef4;
  background-attachment: fixed;
}
body[data-theme="neo"] {
  background: #e7ecf4;
}
body[data-theme="neo"] .sidebar {
  background: #174978;
  color: #ffffff;
  border-right-color: rgba(255,255,255,.08);
  box-shadow: 14px 0 34px rgba(23,73,120,.15);
}
body[data-theme="neo"] .brand small,
body[data-theme="neo"] .nav-section,
body[data-theme="neo"] .sidebar-card .label { color: rgba(255,255,255,.62); }
body[data-theme="neo"] .brand-mark { background: #25609a; }
body[data-theme="neo"] .nav-item { color: rgba(255,255,255,.72); }
body[data-theme="neo"] .nav-item::before { background: rgba(255,255,255,.1); color: #c7d7f6; }
body[data-theme="neo"] .nav-item:hover,
body[data-theme="neo"] .nav-item.is-active {
  background: rgba(255,255,255,.12);
  color: #ffffff;
  border-color: rgba(255,255,255,.16);
}
body[data-theme="neo"] .nav-item.is-active::before { background: #2f69b1; color: #ffffff; }
body[data-theme="neo"] .sidebar-toggle,
body[data-theme="neo"] .sidebar-card { background: rgba(255,255,255,.1); color: #ffffff; border-color: rgba(255,255,255,.16); }
body[data-finish="gradient"] {
  background:
    radial-gradient(circle at 8% 8%, rgba(216,91,54,.16), transparent 24%),
    radial-gradient(circle at 82% 18%, rgba(8,127,103,.14), transparent 26%),
    var(--surface-base);
}
body[data-theme="mineral"][data-finish="gradient"] {
  background:
    radial-gradient(circle at 18% 5%, rgba(98, 157, 137, 0.18), transparent 27%),
    radial-gradient(circle at 90% 10%, rgba(209, 138, 63, 0.14), transparent 25%),
    #f3f1eb;
}
body[data-theme="glass"][data-finish="gradient"] {
  background:
    radial-gradient(circle at 12% 4%, rgba(255,124,93,.34), transparent 30%),
    radial-gradient(circle at 85% 10%, rgba(61,156,204,.30), transparent 32%),
    #e8eef4;
}
body[data-theme="pastel"] {
  background:
    radial-gradient(circle at 22% 8%, rgba(255, 215, 194, 0.48), transparent 24%),
    radial-gradient(circle at 92% 12%, rgba(174, 231, 242, 0.52), transparent 28%),
    linear-gradient(135deg, #f9f4ff 0%, #f2f9ff 48%, #fff8ee 100%);
}
body[data-theme="atlas"] {
  background:
    radial-gradient(circle at 18% 8%, rgba(92, 192, 162, 0.24), transparent 24%),
    radial-gradient(circle at 92% 12%, rgba(109, 167, 217, 0.24), transparent 28%),
    linear-gradient(135deg, #f5faf8 0%, #eef8f4 52%, #fff9ee 100%);
}
body[data-theme="signal"] {
  background:
    radial-gradient(circle at 18% 8%, rgba(240, 167, 160, 0.32), transparent 24%),
    radial-gradient(circle at 92% 12%, rgba(196, 154, 232, 0.22), transparent 28%),
    linear-gradient(135deg, #fff7f4 0%, #fff0ea 48%, #f7f2ff 100%);
}
body.sidebar-collapsed { grid-template-columns: 72px minmax(0, 1fr); }

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 3px solid rgba(40, 100, 216, 0.35);
  outline-offset: 2px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.action-feedback {
  position: fixed;
  top: 18px;
  right: 22px;
  z-index: 1200;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  width: min(460px, calc(100vw - 32px));
  padding: 14px 14px 14px 16px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow-strong);
  color: var(--ink);
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 180ms ease, transform 180ms ease;
}
.action-feedback.is-visible { opacity: 1; transform: translateY(0); }
.action-feedback.success { border-left-color: #18816f; }
.action-feedback.warning { border-left-color: #c58a25; }
.action-feedback.error { border-left-color: #c94b55; }
.action-feedback strong, .action-feedback p { display: block; margin: 0; }
.action-feedback p { margin-top: 3px; color: var(--muted); font-size: 0.84rem; line-height: 1.35; }
.action-feedback .ghost-button { min-height: 36px; white-space: nowrap; }
.action-feedback-close { align-self: start; width: 30px; height: 30px; min-width: 30px; }
.action-focus { outline: 3px solid color-mix(in srgb, var(--accent) 65%, white); outline-offset: 4px; animation: actionFocusPulse 900ms ease 2; }
@keyframes actionFocusPulse { 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 16%, transparent); } }
.radar-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.radar-header h2, .radar-header p { margin: 0; }
.radar-header p { margin-top: 4px; color: var(--muted); font-size: 0.82rem; }
.radar-header .actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.radar-date { margin: 18px 0 8px; color: var(--muted); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; }
.cnpj-result-card { display: grid; grid-template-columns: minmax(220px, 0.8fr) minmax(320px, 1.4fr) auto; align-items: center; gap: 18px; margin: 12px 0 18px; padding: 18px; border: 1px solid var(--border); border-left: 4px solid #18816f; border-radius: 8px; background: var(--panel); box-shadow: var(--shadow-sm); }
.cnpj-result-card h3, .cnpj-result-card p { margin: 2px 0; }
.cnpj-result-card small { color: var(--muted); }
.cnpj-result-card dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; }
.cnpj-result-card dl div { min-width: 0; }
.cnpj-result-card dt { color: var(--muted); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; }
.cnpj-result-card dd { margin: 3px 0 0; overflow-wrap: anywhere; font-size: 0.84rem; }
.cnpj-result-card .actions { display: flex; flex-direction: column; gap: 8px; }

@media (max-width: 640px) {
  .action-feedback { top: 10px; right: 10px; grid-template-columns: minmax(0, 1fr) auto; }
  .action-feedback .ghost-button { grid-column: 1 / -1; }
  .radar-header { align-items: stretch; flex-direction: column; }
  .radar-header .actions { justify-content: flex-start; }
  .cnpj-result-card { grid-template-columns: 1fr; }
  .cnpj-result-card dl { grid-template-columns: 1fr; }
  .cnpj-result-card .actions { flex-direction: row; flex-wrap: wrap; }
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 100vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px 18px;
  background: var(--panel);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 24px;
  border-right: 1px solid var(--border-soft);
  box-shadow: 12px 0 34px rgba(24, 35, 31, 0.07);
  backdrop-filter: blur(18px);
}
.sidebar::-webkit-scrollbar { width: 8px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border-medium); border-radius: 999px; }

.brand { display: flex; align-items: center; gap: 12px; }
.brand > div { min-width: 0; }
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #173d34;
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(24, 54, 47, 0.24);
  position: relative;
  overflow: hidden;
}
.otter-logo { width: 30px; height: 30px; display: block; }
.brand strong, h1, h2 {
  font-family: var(--font-display);
}
.brand strong { font-size: 16px; letter-spacing: -0.02em; }
.brand small { font-size: 11px; letter-spacing: 0.02em; }
.brand small { display: block; color: var(--muted); margin-top: 2px; }
.sidebar-toggle {
  margin-left: auto;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  font-size: 20px;
  box-shadow: var(--shadow-xs);
}
body.sidebar-collapsed .brand > div,
body.sidebar-collapsed .nav-section,
body.sidebar-collapsed .sidebar-card {
  display: none;
}
body.sidebar-collapsed .sidebar-footer {
  width: 100%;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
body.sidebar-collapsed .sidebar-footer span {
  display: none;
}
body.sidebar-collapsed .sidebar-logout {
  min-height: 44px;
  width: 100%;
  padding: 0;
  font-size: 0;
  justify-content: center;
}
body.sidebar-collapsed .sidebar-logout::before {
  content: "↩";
  width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 14px;
}
body.sidebar-collapsed .sidebar { padding: 18px 12px; align-items: center; }
body.sidebar-collapsed .brand { width: 100%; justify-content: center; flex-wrap: wrap; }
body.sidebar-collapsed .sidebar-toggle { margin-left: 0; transform: rotate(180deg); }
body.sidebar-collapsed .nav { width: 100%; }
body.sidebar-collapsed .nav-item {
  min-height: 44px;
  padding: 0;
  text-align: center;
  font-size: 0;
  justify-content: center;
  position: relative;
}
body.sidebar-collapsed .nav-item::before { margin: 0; }
body.sidebar-collapsed .nav-item:hover::after,
body.sidebar-collapsed .nav-item:focus-visible::after {
  content: attr(aria-label);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  min-width: max-content;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--navy);
  color: #ffffff;
  font-size: 12px;
  line-height: 1;
  box-shadow: var(--shadow-md);
  pointer-events: none;
}
body.sidebar-collapsed .nav-item:hover::before,
body.sidebar-collapsed .nav-item:focus-visible::before {
  transform: none;
}

.nav { display: grid; gap: 6px; }
.nav-section {
  margin: 12px 10px 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.nav-item {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 12px 14px;
  text-align: left;
  background: transparent;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  transition: background 180ms ease, box-shadow 180ms ease, transform 180ms ease, border-color 180ms ease;
}
.nav-item::before {
  content: attr(data-icon);
  width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: var(--violet-soft);
  color: var(--green);
  font-size: 14px;
  flex: 0 0 auto;
}
.nav-item:hover, .nav-item.is-active {
  background: var(--surface-strong);
  color: var(--ink);
  border-color: var(--border-medium);
  box-shadow: var(--shadow-sm);
}
.nav-item:hover { transform: translateX(2px); }
.nav-item.is-active { box-shadow: inset 3px 0 0 var(--green), var(--shadow-sm); }
.nav-item.is-active::before { background: var(--green); color: #ffffff; }

.sidebar-card {
  margin-top: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
}
.label, .eyebrow { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0; }
.sidebar-card .label { color: var(--muted); }
.sidebar-card strong { display: block; margin: 8px 0 12px; font-size: 22px; }
.progress { height: 8px; border-radius: 999px; background: #ebe5f6; overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--green); }
.sidebar-footer {
  display: grid;
  gap: 8px;
  padding-top: 2px;
}
.sidebar-footer[hidden] {
  display: none;
}
.sidebar-footer span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.sidebar-logout {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
}
.sidebar-logout:hover {
  background: var(--amber-soft);
  color: var(--ink);
  border-color: rgba(201, 130, 18, 0.24);
}

.app {
  min-width: 0;
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.brand-canvas {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: min(420px, 36vw);
  height: min(420px, 36vw);
  pointer-events: none;
  opacity: 0.34;
  z-index: 0;
}
body[data-theme="glass"] .app::before {
  content: "";
  position: fixed;
  inset: 18px 18px 18px auto;
  width: min(560px, 42vw);
  border-radius: 42px;
  background: rgba(255,255,255,.28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72), inset 0 -42px 80px rgba(44,83,116,.08), 0 34px 90px rgba(42,63,84,.12);
  pointer-events: none;
  z-index: 0;
}
.topbar, .summary-grid, .toolbar, .view {
  position: relative;
  z-index: 1;
}
.topbar {
  display: grid;
  grid-template-columns: minmax(220px, .7fr) minmax(0, 1.3fr);
  gap: 14px;
  align-items: end;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px);
}
.topbar > div:first-child { min-width: 0; align-self: center; }
h1, h2, p { margin: 0; }
h1 { font-size: 26px; line-height: 1.2; margin-top: 4px; letter-spacing: -0.025em; }
h2 { font-size: 19px; line-height: 1.3; letter-spacing: -0.015em; }
.actions { display: grid; grid-template-columns: 160px 124px minmax(180px, 1fr) auto auto auto; gap: 8px; align-items: end; min-width: 0; }
.search { display: grid; gap: 4px; color: var(--muted); font-size: 11px; min-width: 0; }
.search input, select, .form-grid input, .form-grid select, textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 7px 10px;
  min-height: 36px;
}
.search input { width: 100%; min-width: 0; }
.profile-switcher select { min-width: 0; width: 100%; }

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: hidden;
  background: linear-gradient(135deg, #dcecff 0%, #c8e0f5 56%, #b9d6ec 100%);
}

.auth-brand-canvas {
  position: absolute;
  right: clamp(-90px, -4vw, -24px);
  bottom: clamp(-80px, -5vw, -28px);
  width: min(54vw, 720px);
  aspect-ratio: 1;
  opacity: 0.32;
  pointer-events: none;
}

body.auth-required > .sidebar,
body.auth-required > .app {
  display: none;
}

.auth-panel {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  display: grid;
  gap: 18px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-lg);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-brand-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  flex: 0 0 54px;
  border-radius: 8px;
  background: #d9edf7;
  border: 1px solid #b7d4e4;
  box-shadow: 0 8px 20px rgba(18, 43, 70, 0.2);
}
.auth-brand-mark .otter-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.auth-brand strong,
.auth-status strong {
  display: block;
  color: var(--ink);
}

.auth-brand span,
.auth-status span,
.auth-status small {
  display: block;
  color: var(--muted);
}

.auth-form,
.organization-chooser {
  display: grid;
  gap: 12px;
}

.auth-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.auth-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--ink);
  background: #ffffff;
}

.organization-chooser button {
  width: 100%;
  display: grid;
  gap: 3px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  background: var(--surface);
  cursor: pointer;
}

.organization-chooser button:hover {
  border-color: var(--green);
  background: #ffffff;
}

.primary-button, .ghost-button, .icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  min-height: 36px;
  border: 1px solid transparent;
  padding: 0 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
body[data-theme="glass"] .sidebar,
body[data-theme="glass"] .topbar,
body[data-theme="glass"] .toolbar,
body[data-theme="glass"] .summary-grid article,
body[data-theme="glass"] .insight-panel,
body[data-theme="glass"] .chart-card,
body[data-theme="glass"] .dashboard-tabs,
body[data-theme="glass"] .dashboard-controls {
  background: rgba(255,255,255,.52);
  border-color: rgba(255,255,255,.78);
  box-shadow: 0 22px 55px rgba(41,62,82,.18), inset 0 1px 0 rgba(255,255,255,.92), inset 0 -18px 34px rgba(58,89,119,.08);
  backdrop-filter: blur(34px) saturate(1.45);
}
body[data-theme="glass"] .search input,
body[data-theme="glass"] select,
body[data-theme="glass"] .ghost-button { background: rgba(255,255,255,.52); border-color: rgba(255,255,255,.78); }
.primary-button { background: var(--green); color: #ffffff; box-shadow: 0 12px 26px rgba(24, 54, 47, 0.18); }
body[data-theme="studio"] .primary-button { background: var(--green); }
.ghost-button { background: rgba(255,255,255,.78); border-color: var(--border-medium); color: var(--ink); box-shadow: var(--shadow-xs); }
.icon-button { width: 42px; padding: 0; background: rgba(255,255,255,.86); border-color: var(--border-medium); box-shadow: var(--shadow-xs); }
.primary-button, .ghost-button, .icon-button {
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}
.primary-button:hover, .ghost-button:hover, .icon-button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.summary-grid article {
  background: var(--surface-raised);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  min-height: 84px;
  padding: 14px 16px;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-md);
}
.summary-grid span { color: var(--muted); font-size: 13px; }
.summary-grid strong { display: block; margin-top: 8px; font-size: 22px; letter-spacing: 0; }
.home-grid {
  display: grid;
  gap: 12px;
}
.home-hero {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  height: 121.8px;
  box-sizing: border-box;
  padding: 14px 20px;
  border-radius: 8px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.home-hero > div:first-child {
  flex: 1 1 auto;
  height: 80.2px;
  max-width: none;
  min-width: 0;
}
.home-hero p {
  color: var(--muted);
  margin-top: 4px;
  width: 100%;
  max-height: 42px;
  overflow: hidden;
}
.home-marquee {
  display: flex;
  align-items: center;
  overflow: hidden;
  white-space: nowrap;
}
.home-marquee span {
  display: inline-block;
  min-width: max-content;
  padding-left: 100%;
  animation: homeMarquee 28s linear infinite;
}
@keyframes homeMarquee {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}
.home-pulse {
  min-width: 210px;
  border-radius: 8px;
  background: #101828;
  color: #ffffff;
  padding: 14px;
}
.home-pulse strong { display: block; font-size: 22px; }
.home-pulse span { color: #b8c2d4; font-size: 12px; }
.home-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 12px;
}
.home-center {
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--border-soft);
  background: var(--surface-raised);
  box-shadow: var(--shadow-md);
}
.home-widget-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.home-widget {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 164px;
  padding: 14px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--surface-strong);
}
.home-widget header div {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.home-widget header span {
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}
.home-widget p { color: var(--muted); margin: 0; font-size: 13px; line-height: 1.45; }
.widget-metric strong { display: block; font-size: 22px; }
.widget-metric span { color: var(--muted); font-size: 12px; }
.widget-list {
  display: grid;
  gap: 8px;
}
.widget-list div {
  display: grid;
  gap: 2px;
  padding: 9px;
  border-radius: 8px;
  background: var(--surface-muted);
}
.widget-list span { color: var(--muted); font-size: 12px; line-height: 1.35; }
.home-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 12px;
}
.home-wide { grid-column: span 2; }
.notice-board {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}
.notice-board article {
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  padding: 10px;
  background: #f8fbff;
}
.notice-board span { color: var(--blue); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.notice-board p, .message-feed p { color: var(--muted); margin-top: 4px; font-size: 13px; line-height: 1.4; }
.message-feed {
  display: grid;
  gap: 8px;
}
.message-feed article {
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
}
.message-feed article.is-direct {
  background: var(--amber-soft);
  border: 1px solid rgba(184, 107, 18, 0.25);
}
.message-feed div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.message-feed span { color: var(--muted); font-size: 12px; }
.connector-line {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.connector-line:last-child { border-bottom: 0; }
.connector-line p { color: var(--muted); margin-top: 4px; font-size: 13px; }
.report-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.report-line:last-child { border-bottom: 0; }
.report-line span { color: var(--muted); }
.news-source {
  display: grid;
  gap: 4px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.news-source:last-child { border-bottom: 0; }
.news-source span { color: var(--muted); font-size: 13px; line-height: 1.4; }
.briefing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.briefing-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}
.briefing-card p { color: var(--muted); font-size: 13px; line-height: 1.45; }
.briefing-card a { color: var(--blue); font-weight: 800; text-decoration: none; font-size: 12px; }

.toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  padding: 10px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px);
}
.toolbar select { min-width: 180px; }
.filter-group, .filter-field {
  display: grid;
  gap: 6px;
}
.filter-title, .filter-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.filter-field select { width: 100%; }
.segmented {
  display: inline-grid;
  grid-auto-flow: column;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}
.segmented button {
  min-height: 40px;
  border: 0;
  border-right: 1px solid var(--line);
  background: #ffffff;
  padding: 0 14px;
  color: var(--muted);
}
.segmented button:last-child { border-right: 0; }
.segmented .is-selected { background: var(--blue-soft); color: var(--blue); font-weight: 700; }
.owner-select { display: none; }

.view { display: none; }
.view.is-visible { display: block; }

.pipeline-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}
.pipeline-head p { color: var(--muted); margin-top: 4px; }
.pipeline-command {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}
.pipeline-command article {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--surface-raised);
  box-shadow: var(--shadow-xs);
}
.pipeline-command span,
.pipeline-command small {
  color: var(--muted);
  font-size: 12px;
}
.pipeline-command strong {
  color: var(--ink);
  font-size: 20px;
  line-height: 1.1;
}
.pipeline-command article.is-alert {
  border-color: rgba(191, 76, 76, 0.32);
  background: var(--red-soft);
}
.scroll-actions {
  display: flex;
  gap: 8px;
}
.pipeline-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.mode-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}
.mode-switch button {
  min-height: 36px;
  border: 0;
  border-right: 1px solid var(--line);
  background: #ffffff;
  padding: 0 12px;
  color: var(--muted);
  font-weight: 800;
  font-size: 12px;
}
.mode-switch button:last-child { border-right: 0; }
.mode-switch .is-selected { background: var(--blue-soft); color: var(--blue); }
.scroll-actions button {
  width: 42px;
  padding: 0;
  font-size: 18px;
}
.quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.quick-filters button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  padding: 0 12px;
  font-weight: 700;
  font-size: 12px;
}
.quick-filters button.is-selected {
  background: var(--blue-soft);
  border-color: #b7cdfb;
  color: var(--blue);
}
.board-shell {
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-behavior: smooth;
}
.board {
  display: grid;
  grid-template-columns: repeat(7, minmax(260px, 280px));
  gap: 12px;
  width: max-content;
  min-width: 100%;
}
.stage {
  min-height: 520px;
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 10px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72), var(--shadow-xs);
}
.stage.is-over { outline: 2px solid var(--blue); outline-offset: -4px; }
.stage header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 34px;
  position: sticky;
  top: 0;
  z-index: 1;
  margin: -10px -10px 10px;
  padding: 10px;
  background: rgba(241, 244, 248, 0.96);
  border-bottom: 1px solid var(--line);
}
.stage h3 { margin: 0; font-size: 14px; }
.stage header small { color: var(--muted); font-size: 11px; }
.stage-count { color: var(--muted); font-size: 12px; }
.stage-brief {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}
.stage-brief span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.stage-brief strong {
  font-size: 14px;
  color: var(--blue);
}
.stage-empty {
  margin: 8px 2px;
  color: var(--muted);
  font-size: 12px;
}

.deal-card {
  display: grid;
  gap: 6px;
  background: var(--surface-raised);
  border: 1px solid var(--border-soft);
  border-left: 5px solid var(--blue);
  border-radius: 8px;
  padding: 8px 9px;
  margin-bottom: 8px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.deal-card:hover {
  border-color: rgba(36, 87, 197, 0.42);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.deal-card[data-priority="Alta"] { border-left-color: var(--red); }
.deal-card[data-priority="Media"] { border-left-color: var(--amber); }
.deal-card[data-priority="Baixa"] { border-left-color: var(--green); }
.deal-card.is-overdue { background: var(--red-soft); }
.deal-card.is-today { background: var(--amber-soft); }
.deal-card.is-soon { background: #f6fbff; }
.deal-card strong { font-size: 14px; }
.deal-title { display: flex; justify-content: space-between; gap: 8px; align-items: start; }
.deal-probability {
  min-width: 38px;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}
.deal-value {
  font-size: 17px;
  line-height: 1.1;
  font-weight: 800;
  color: var(--ink);
}
.deal-card-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.deal-card-main span {
  color: var(--ink);
  font-size: 17px;
  font-weight: 900;
}
.deal-card-main small,
.deal-compact-meta small {
  color: var(--muted);
}
.deal-compact-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.deal-forecast {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  padding: 6px 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
}
.deal-forecast strong {
  color: var(--blue);
  font-size: 13px;
}
.deal-meta, .chip-row, .card-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.deal-meta {
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}
.deal-card p { font-size: 13px; line-height: 1.35; }
.deal-card p { margin: 0; }
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 8px;
  background: #eef2f7;
  color: #344054;
  font-size: 12px;
}
.pill.service { background: var(--green-soft); color: #176447; }
.pill.type { background: var(--amber-soft); color: #81530d; }
.pill.priority { background: #f0f3f8; color: var(--ink); }
.pill.due.is-overdue { background: var(--red-soft); color: var(--red); }
.pill.due.is-today { background: var(--amber-soft); color: var(--amber); }
.pill.due.is-soon { background: var(--blue-soft); color: var(--blue); }
.pill.due.is-nodate { background: #f0f3f8; color: var(--muted); }
.pill.sla { align-self: start; }
.pill.sla.is-overdue { background: var(--red-soft); color: var(--red); }
.pill.sla.is-today { background: var(--amber-soft); color: var(--amber); }
.pill.sla.is-soon { background: var(--blue-soft); color: var(--blue); }
.pill.sla.is-later { background: #f0f3f8; color: var(--muted); }
.pill.sla.is-won { background: var(--green-soft); color: var(--green); }
.pill.sla.is-lost { background: var(--red-soft); color: var(--red); }
.loss-note {
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
}
.recommendation {
  border-left: 3px solid var(--green);
  padding-left: 8px;
  color: #176447;
  font-size: 13px;
}
.card-actions button {
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 8px;
  min-height: 30px;
  padding: 0 8px;
  color: var(--muted);
}
.card-actions {
  justify-content: space-between;
  padding-top: 2px;
  opacity: .72;
  transition: opacity 160ms ease;
}
.deal-card:hover .card-actions,
.deal-card:focus-within .card-actions { opacity: 1; }
.card-actions .mini-icon {
  width: 30px;
  min-width: 30px;
  padding: 0;
  font-weight: 800;
  color: var(--ink);
}
.card-actions .mini-icon:hover { border-color: var(--blue); color: var(--blue); }
.deal-card-compact {
  gap: 7px;
  padding: 9px;
  border-left-width: 4px;
}
.deal-card-compact .card-actions {
  justify-content: flex-end;
}
.deal-card-smart .card-actions {
  margin-top: 2px;
}
.mini-icon.icon-document,
.mini-icon.icon-clock {
  position: relative;
  color: transparent;
}
.mini-icon.icon-document span,
.mini-icon.icon-clock span {
  position: absolute;
  inset: 0;
  display: block;
}
.mini-icon.icon-document span::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 7px;
  width: 11px;
  height: 15px;
  border: 2px solid currentColor;
  border-radius: 3px;
  color: var(--ink);
}
.mini-icon.icon-document span::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 7px;
  width: 6px;
  height: 6px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  color: var(--ink);
  transform: skew(-12deg);
}
.mini-icon.icon-clock span::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 6px;
  width: 15px;
  height: 15px;
  border: 2px solid var(--ink);
  border-radius: 50%;
}
.mini-icon.icon-clock span::after {
  content: "";
  position: absolute;
  left: 15px;
  top: 10px;
  width: 5px;
  height: 7px;
  border-left: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform-origin: left bottom;
}
.mini-icon.icon-document:hover span::before,
.mini-icon.icon-document:hover span::after,
.mini-icon.icon-clock:hover span::before,
.mini-icon.icon-clock:hover span::after {
  color: var(--blue);
  border-color: var(--blue);
}
.card-actions .mini-icon:disabled { opacity: 0.4; cursor: not-allowed; }
.pipeline-list {
  display: grid;
  gap: 12px;
}
.pipeline-lane {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.pipeline-lane header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: #f0f3f8;
  border-bottom: 1px solid var(--line);
}
.pipeline-lane header span { color: var(--muted); font-size: 13px; }
.pipeline-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 140px 170px 150px 130px;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.pipeline-row:last-child { border-bottom: 0; }
.pipeline-row:hover { background: #f8fafc; }
.pipeline-row span { color: var(--muted); }
.pipeline-row div span { display: block; margin-top: 4px; font-size: 12px; }
.pipeline-table tr { cursor: pointer; }
.pipeline-table tr:hover td { background: #f8fafc; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface-raised);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.data-table th, .data-table td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.data-table th { font-size: 12px; color: #514a67; text-transform: uppercase; letter-spacing: 0; background: rgba(199, 182, 255, 0.16); }
.data-table tr:last-child td { border-bottom: 0; }
.sort-button {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  min-height: auto;
  font-weight: 800;
  text-transform: uppercase;
}
.data-table tr[data-open-client] { cursor: pointer; }
.data-table tr[data-open-client]:hover td { background: rgba(255, 255, 255, 0.72); }

.activity-list, .insight-grid { display: grid; gap: 12px; }
.activity {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) minmax(240px, auto);
  gap: 12px;
  align-items: center;
  background: var(--surface-raised);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 14px;
  box-shadow: var(--shadow-sm);
}
.activity time { color: var(--muted); }

.module-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.module-head p { color: var(--muted); margin-top: 4px; max-width: 780px; }
.module-head .actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.module-head .actions .ghost-button,
.module-head .actions .file-button {
  min-height: 36px;
  flex: 0 0 auto;
}
.product-grid, .proposal-grid, .automation-grid {
  display: grid;
  gap: 12px;
}
.product-grid { grid-template-columns: repeat(4, minmax(220px, 1fr)); }
.proposal-grid { grid-template-columns: repeat(3, minmax(240px, 1fr)); }
.template-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(210px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.product-card, .proposal-card {
  display: grid;
  gap: 12px;
  background: var(--surface-raised);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 14px;
  box-shadow: var(--shadow-sm);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}
.product-card:hover, .proposal-card:hover {
  transform: translateY(-1px);
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md);
}
.product-card header, .proposal-card header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}
.template-card {
  display: grid;
  gap: 10px;
  min-height: 220px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 4px solid var(--blue);
  border-radius: 8px;
  padding: 14px;
  box-shadow: var(--shadow);
}
.template-card header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}
.template-card p, .template-card small { color: var(--muted); line-height: 1.45; }
.template-sections {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.template-sections span {
  border-radius: 999px;
  background: #f0f3f8;
  color: #344054;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 700;
}
.product-card .label, .proposal-card .label { display: block; margin-top: 4px; }
.product-card p, .proposal-card p, .rule-row p, .followup-row p { color: var(--muted); }
.product-card small { color: var(--muted); line-height: 1.45; }
.proposal-products {
  display: grid;
  gap: 6px;
}
.proposal-products span {
  padding: 8px 10px;
  border-radius: 8px;
  background: #f0f3f8;
}
.proposal-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  border-radius: 8px;
  background: #e8f3ee;
}
.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.status-row button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  padding: 0 8px;
  font-size: 12px;
  font-weight: 700;
}
.status-row button.is-selected {
  background: #eaf1ff;
  color: var(--blue);
  border-color: #b7cdfb;
}
.automation-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.billing-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.billing-command {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 12px;
  align-items: stretch;
  background: var(--surface-raised);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  padding: 16px;
  margin-bottom: 12px;
}
.billing-command h3 {
  margin: 4px 0 6px;
  font-size: 20px;
}
.billing-command p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}
.billing-health {
  display: grid;
  place-items: center;
  text-align: center;
  border-radius: 8px;
  border: 1px solid var(--border-soft);
  background: var(--surface);
  min-height: 112px;
}
.billing-health strong {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1;
}
.billing-health span {
  color: var(--muted);
  font-size: 12px;
}
.billing-health.is-strong { border-color: rgba(48, 168, 115, 0.34); background: var(--green-soft); }
.billing-health.is-watch { border-color: rgba(215, 150, 52, 0.34); background: var(--amber-soft); }
.billing-health.is-risk { border-color: rgba(218, 89, 89, 0.34); background: var(--red-soft); }
.billing-summary article {
  background: var(--surface-raised);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow-md);
}
.billing-summary span { color: var(--muted); font-size: 13px; }
.billing-summary strong { display: block; margin-top: 8px; font-size: 22px; }
.billing-summary small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}
.billing-scenarios {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.billing-scenarios article {
  background: var(--surface-raised);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  padding: 14px;
}
.billing-scenarios span,
.billing-scenarios small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.billing-scenarios strong {
  display: block;
  margin: 6px 0 4px;
  font-size: 22px;
}
.billing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.billing-bar {
  display: grid;
  gap: 7px;
  margin: 10px 0;
}
.billing-bar div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}
.billing-bar span { color: var(--muted); font-size: 13px; }
.billing-bar .bar-track { height: 8px; }
.billing-mix-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.billing-mix-overview > div {
  display: grid;
  gap: 9px;
  min-width: 0;
}
.billing-mix-overview > div > strong {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.billing-mix-overview button,
.billing-podium button,
.billing-margin-grid article,
.executive-performance-cards button {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.82);
  box-shadow: var(--shadow-xs);
}
.billing-mix-overview button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 5px 10px;
  align-items: center;
  padding: 10px;
  text-align: left;
}
.billing-mix-overview span {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.billing-mix-overview em {
  color: var(--tone-color);
  font-style: normal;
  font-weight: 900;
  text-align: right;
}
.billing-mix-overview i,
.billing-podium i,
.billing-margin-grid i,
.executive-performance-cards i,
.aqua-country em,
.glass-compare-card i,
.glass-progress i {
  grid-column: 1 / -1;
  display: block;
  height: 7px;
  border-radius: 999px;
  background: rgba(15,23,42,.08);
  overflow: hidden;
}
.billing-mix-overview b,
.billing-podium b,
.billing-margin-grid b,
.executive-performance-cards b,
.aqua-country b,
.glass-compare-card b,
.glass-progress b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--tone-color);
}
.billing-mix-overview small {
  color: var(--muted);
  font-size: 11px;
}
.billing-podium {
  display: grid;
  gap: 10px;
}
.billing-podium-leader {
  border-radius: 16px;
  background: color-mix(in srgb, var(--tone-color) 14%, #fff 86%);
  border: 1px solid color-mix(in srgb, var(--tone-color) 28%, #fff 72%);
  padding: 14px;
}
.billing-podium-leader span,
.billing-podium-leader small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.billing-podium-leader strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}
.billing-podium-leader em {
  display: block;
  margin: 4px 0;
  color: var(--tone-color);
  font-style: normal;
  font-size: 22px;
  font-weight: 950;
}
.billing-podium > div,
.billing-margin-grid,
.executive-performance-cards {
  display: grid;
  gap: 9px;
}
.billing-podium button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 10px;
  padding: 10px;
  text-align: left;
}
.billing-podium button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.billing-margin-grid article {
  display: grid;
  gap: 8px;
  padding: 11px;
}
.billing-margin-grid article div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}
.billing-margin-grid article span,
.billing-margin-grid small {
  color: var(--muted);
  font-size: 12px;
}
.billing-mix-blocks {
  min-height: 220px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: stretch;
}
.billing-mix-blocks article {
  flex: var(--share) 1 120px;
  min-height: 88px;
  display: grid;
  align-content: end;
  gap: 4px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 12px;
  background: var(--chart-1);
  color: #ffffff;
}
.billing-mix-blocks article:nth-child(2n) { background: var(--chart-2); }
.billing-mix-blocks article:nth-child(3n) { background: var(--chart-3); }
.billing-mix-blocks article:nth-child(4n) { background: var(--chart-4); }
.billing-mix-blocks span { font-size: 22px; font-weight: 900; }
.billing-mix-blocks small { color: rgba(255,255,255,.78); }
.billing-status-flow {
  display: grid;
  gap: 10px;
}
.billing-status-flow article {
  display: grid;
  gap: 8px;
  padding: 11px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--surface-strong);
}
.billing-status-flow article > div,
.billing-status-flow footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.billing-status-flow span,
.billing-status-flow small { color: var(--muted); font-size: 12px; }
.billing-status-flow i {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-muted);
  overflow: hidden;
}
.billing-status-flow b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}
.billing-status-flow .status-danger b { background: var(--red); }
.billing-status-flow .status-type b { background: var(--amber); }
body[data-theme="glass"] .billing-mix-blocks article {
  background: rgba(255,255,255,.68);
  color: var(--ink);
}
body[data-theme="glass"] .billing-mix-blocks small { color: var(--muted); }
.billing-note {
  display: grid;
  gap: 3px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
}
.billing-note:last-child { border-bottom: 0; }
.billing-note strong { font-size: 13px; }
.billing-note span {
  color: var(--muted);
  font-size: 12px;
}
.billing-table {
  overflow-x: auto;
  border-radius: 8px;
}
.finance-table td:nth-child(4),
.finance-table td:nth-child(5),
.finance-table td:nth-child(6),
.finance-table td:nth-child(7),
.finance-table th:nth-child(4),
.finance-table th:nth-child(5),
.finance-table th:nth-child(6),
.finance-table th:nth-child(7) {
  text-align: right;
}
.pill.danger {
  background: var(--red-soft);
  color: var(--red);
}
.donut-wrap {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-top: 10px;
}
.donut {
  width: 132px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
}
.donut::after {
  content: "";
  position: absolute;
  inset: 24px;
  border-radius: 50%;
  background: var(--panel);
}
.donut span {
  position: relative;
  z-index: 1;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}
.donut-legend {
  display: grid;
  gap: 8px;
}
.donut-legend div {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) 42px;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}
.donut-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}
.command-center {
  display: grid;
  gap: 14px;
}
.command-hero {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  min-height: 132px;
  padding: 20px;
  border-radius: 16px;
  background: #171c1f;
  color: #ffffff;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: var(--shadow-lg);
}
.command-hero p { margin-top: 6px; color: rgba(255, 255, 255, 0.78); max-width: 720px; }
.command-score {
  min-width: 150px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.11);
}
.command-score span { color: rgba(255, 255, 255, 0.75); font-size: 12px; }
.command-score strong { display: block; margin-top: 4px; font-size: 22px; }
.scenario-box {
  display: grid;
  align-self: flex-start;
  gap: 10px;
  min-width: 500px;
}
.scenario-buttons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
}
.scenario-buttons button {
  min-height: 34px;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 800;
}
.scenario-buttons button:last-child { border-right: 0; }
.scenario-buttons .is-selected {
  background: #ffffff;
  color: var(--blue);
}
.dashboard-controls {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(16px);
}
.dashboard-filter-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--surface-raised);
  box-shadow: var(--shadow-sm);
}
.dashboard-filter-toggle span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.dashboard-filter-toggle strong { font-size: 13px; }
.dashboard-filter-toggle-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}
.dashboard-filter-toggle .dashboard-filter-chips {
  justify-content: flex-end;
  margin-top: 0;
  min-width: 0;
  flex: 1 1 auto;
}
.dashboard-filter-toggle .dashboard-filter-chips span {
  background: transparent;
  border-color: transparent;
  color: #89938f;
  padding: 0 1px;
  font-size: 10px;
  font-weight: 650;
}
.dashboard-filter-toggle .dashboard-filter-chips span button {
  width: 14px;
  height: 14px;
  background: transparent;
  color: #9aa39f;
  font-size: 11px;
}

/* Dashboard e Relatorios: camada visual local do modulo BI */
.command-center { display: grid; gap: 14px; }
.scenario-buttons { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dashboard-shortcuts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.dashboard-shortcuts button,
.report-library button,
.report-toolbar button {
  min-height: 34px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 8px;
  background: rgba(255,255,255,.12);
  color: inherit;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 800;
}
.dashboard-shortcuts button:disabled { opacity: .45; cursor: not-allowed; }
.command-score small { display: block; margin-top: 4px; color: rgba(255,255,255,.72); font-size: 11px; }
.dashboard-active-filters { min-height: 34px; align-items: center; }
.dashboard-filter-chips span { display: inline-flex; align-items: center; gap: 6px; }
.dashboard-filter-chips span button {
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: rgba(71,84,103,.1);
  color: var(--ink);
  font-size: 15px;
  line-height: 1;
}
.kpi-card em { display: block; margin-top: 7px; color: var(--muted); font-size: 11px; font-style: normal; }
.kpi-card small.is-negative { color: var(--red); font-weight: 800; }
.dashboard-freshness { margin: 0; color: var(--muted); font-size: 11px; text-align: right; }
.bullet-chart { display: grid; gap: 14px; padding-top: 28px; }
.bullet-chart > div { position: relative; height: 18px; border-radius: 5px; background: #e3e8f1; }
.bullet-chart > div span { display: block; height: 100%; border-radius: 5px; background: var(--chart-1); }
.bullet-chart > div i { position: absolute; top: -7px; width: 3px; height: 32px; background: var(--ink); }
.bullet-chart strong { font-size: 24px; }
.bullet-chart small { display: flex; justify-content: space-between; color: var(--muted); }
.concentration-list, .quality-list, .usage-list { display: grid; gap: 10px; }
.concentration-list button, .quality-list button, .usage-list > div {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) 54px;
  gap: 8px;
  align-items: center;
  border: 0;
  background: transparent;
  padding: 6px 0;
  text-align: left;
}
.concentration-list i { grid-column: 1 / -1; height: 5px; border-radius: 4px; background: var(--chart-1); }
.quality-list button, .usage-list > div { grid-template-columns: 120px 1fr 45px; }
.quality-list i, .usage-list i { height: 7px; border-radius: 8px; background: #edf0f5; overflow: hidden; }
.quality-list b, .usage-list b { display: block; height: 100%; border-radius: inherit; background: var(--chart-2); }
.dashboard-detail { grid-column: 1 / -1; min-width: 0; }
.dashboard-detail header { display: flex; justify-content: space-between; gap: 16px; }
.table-link { border: 0; background: transparent; color: var(--blue); padding: 0; font: inherit; font-weight: 800; text-align: left; }
.reports-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
.report-toolbar { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 24px; align-items: center; padding: 20px; border-radius: 8px; background: #263f73; color: #fff; box-shadow: var(--shadow-md); }
.report-toolbar p { color: rgba(255,255,255,.72); }
.report-toolbar > div:last-child { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.report-library { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(180px,1fr)); gap: 12px; }
.report-library article { min-height: 180px; display: grid; align-content: start; gap: 9px; padding: 16px; border: 1px solid var(--border-soft); border-radius: 8px; background: var(--surface-raised); box-shadow: var(--shadow-sm); }
.report-library article p { color: var(--muted); }
.report-library button { margin-top: auto; border-color: var(--line); color: var(--blue); background: var(--blue-soft); }
.saved-report-list { display: grid; gap: 8px; }
.saved-report-list article { display: grid; grid-template-columns: 1fr 36px 36px; gap: 8px; align-items: center; border-bottom: 1px solid var(--line); padding: 8px 0; }
.saved-report-list button { border: 0; background: transparent; text-align: left; }
.saved-report-list button span { display: block; color: var(--muted); font-size: 11px; }
.saved-report-list article > button:nth-child(2) { font-size: 20px; color: var(--amber); text-align: center; }
.saved-report-list article > button:last-child { font-size: 20px; color: var(--red); text-align: center; }
.report-schedule button:disabled { opacity: .55; }
.scenario-compare { grid-template-columns: repeat(4, minmax(120px,1fr)); }
.alert-list article.amber { border-left-color: var(--amber); background: var(--amber-soft); }

@media (max-width: 1180px) {
  .dashboard-controls { grid-template-columns: repeat(3, minmax(140px, 1fr)); }
  .kpi-strip { grid-template-columns: repeat(4, minmax(130px,1fr)); }
  .report-library { grid-template-columns: repeat(2, minmax(180px,1fr)); }
  .followup-focus-grid { grid-template-columns: minmax(0, 1fr); }
  .command-hero { align-items: stretch; }
  .scenario-box { min-width: 440px; }
  .followup-row {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 8px;
  }
  .followup-editor {
    grid-template-columns: minmax(150px, 1fr) 96px auto;
  }
  .channel-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .dashboard-controls, .kpi-strip, .report-library, .reports-layout { grid-template-columns: 1fr; }
  .report-toolbar { flex-direction: column; align-items: stretch; }
  .report-toolbar > div:last-child { justify-content: stretch; }
  .report-toolbar button { flex: 1 1 120px; }
  .report-library, .report-toolbar, .dashboard-detail { grid-column: auto; }
  .scenario-compare { grid-template-columns: 1fr 1fr; }
  .command-hero { flex-direction: column; align-items: stretch; }
  .scenario-box { grid-template-columns: 1fr; }
  .matrix-grid { overflow-x: auto; }
  .dashboard-freshness { text-align: left; }
}

@media print {
  body.dashboard-print-mode .sidebar,
  body.dashboard-print-mode .topbar,
  body.dashboard-print-mode .dashboard-controls,
  body.dashboard-print-mode .dashboard-tabs,
  body.dashboard-print-mode .dashboard-shortcuts,
  body.dashboard-print-mode button { display: none !important; }
  body.dashboard-print-mode .app { padding: 0; }
  body.dashboard-print-mode .chart-card,
  body.dashboard-print-mode .kpi-card { break-inside: avoid; box-shadow: none; }
}
.dashboard-brief {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 12px;
}
.dashboard-brief article {
  min-height: 104px;
  display: grid;
  align-content: center;
  gap: 5px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--surface-raised);
  padding: 14px;
  box-shadow: var(--shadow-md);
}
.dashboard-brief span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.dashboard-brief strong {
  font-size: 18px;
  line-height: 1.1;
}
.dashboard-brief small {
  color: var(--blue);
  font-weight: 800;
}
.dashboard-controls label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.dashboard-controls input,
.dashboard-controls select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #ffffff;
}
.dashboard-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(14px);
}
.dashboard-tabs button {
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #f3f6fb;
  color: #475467;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 800;
}
.dashboard-tabs .is-selected {
  background: var(--blue);
  border-color: transparent;
  color: #ffffff;
}
.kpi-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.kpi-strip::-webkit-scrollbar { display:none; }
.kpi-card {
  flex: 1 0 160px;
  border: 1px solid var(--border-soft);
  border-top: 4px solid var(--blue);
  border-radius: 12px;
  background: var(--surface-raised);
  padding: 14px;
  box-shadow: var(--shadow-md);
}
.kpi-card span, .kpi-card small { color: var(--muted); font-size: 12px; }
.kpi-card strong { display: block; margin: 7px 0 4px; font-size: 20px; line-height: 1.1; }
.kpi-card.green { border-top-color: var(--green); }
.kpi-card.amber { border-top-color: var(--amber); }
.kpi-card.red { border-top-color: var(--red); }
.kpi-card.violet { border-top-color: var(--violet); }
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 12px;
}
.mini-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 12px;
}
.chart-card {
  min-height: 280px;
  background: var(--surface-raised);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  padding: 16px;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}
.chart-card:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.chart-card:has(.is-selected) {
  border-color: rgba(126, 167, 255, 0.44);
  box-shadow: 0 0 0 4px rgba(126, 167, 255, 0.12), var(--shadow-md);
}
.chart-card.insight-story {
  min-height: 168px;
  display: grid;
  align-content: center;
}
.chart-card.wide {
  grid-column: span 2;
}
.dashboard-grid > .wide {
  grid-column: span 2;
}
.dashboard-grid > .full,
.chart-card.full {
  grid-column: 1 / -1;
}
.dashboard-grid > .insight-story,
.chart-card.insight-story {
  background: #171c1f;
  color: #ffffff;
  border: 1px solid rgba(255,255,255,.08);
  min-height: 160px;
  box-shadow: var(--shadow-lg);
}
body[data-theme="glass"] .dashboard-grid > .insight-story,
body[data-theme="glass"] .chart-card.insight-story,
body[data-theme="glass"] .signal-number-card {
  background: rgba(255,255,255,.62);
  color: var(--ink);
  border-color: rgba(255,255,255,.82);
}
body[data-theme="glass"] .dashboard-grid > .insight-story .eyebrow,
body[data-theme="glass"] .dashboard-grid > .insight-story p,
body[data-theme="glass"] .chart-card.insight-story .eyebrow,
body[data-theme="glass"] .chart-card.insight-story p,
body[data-theme="glass"] .signal-number-card .eyebrow,
body[data-theme="glass"] .signal-number-card p {
  color: var(--muted);
}
body[data-theme="glass"] .dashboard-filter-chips span {
  color: var(--ink);
  background: rgba(255,255,255,.7);
  border-color: rgba(24,34,44,.12);
}
body[data-theme="glass"] .dashboard-filter-toggle .dashboard-filter-chips span {
  color: #89938f;
  background: transparent;
  border-color: transparent;
}
body[data-theme="glass"] .treemap-chart button {
  color: var(--ink);
  background: rgba(255,255,255,.68);
  border-color: rgba(24,34,44,.12);
}
body[data-theme="glass"] .treemap-chart small { color: var(--muted); }
.dashboard-grid > .insight-story .eyebrow,
.dashboard-grid > .insight-story p,
.chart-card.insight-story .eyebrow,
.chart-card.insight-story p {
  color: rgba(255, 255, 255, 0.78);
}
.dashboard-grid > .insight-story h2,
.chart-card.insight-story h2 {
  margin: 8px 0;
  font-size: 24px;
}
.dashboard-filter-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.dashboard-filter-chips span {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 800;
}
.chart-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.chart-card header p { margin-top: 4px; color: var(--muted); font-size: 13px; }
.funnel-chart {
  display: grid;
  gap: 8px;
  align-content: start;
  overflow: visible;
  min-height: 0;
  padding: 4px 0 0;
}
.funnel-step {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) 82px;
  gap: 8px;
  align-items: center;
}
.funnel-step span { color: var(--muted); font-size: 11px; }
.funnel-step strong { font-size: 12px; line-height: 1.15; }
.funnel-bar {
  height: 20px;
  width: 100%;
  border: 0;
  padding: 0;
  border-radius: 999px;
  background: rgba(226, 239, 235, .95);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(24,35,31,.06);
}
.funnel-bar.is-selected {
  outline: 3px solid rgba(36, 87, 197, 0.2);
  background: #dfe9ff;
}
.funnel-bar span {
  display: block;
  height: 100%;
  min-width: 18px;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--chart-1), var(--cyan));
  box-shadow: inset -10px 0 18px rgba(255,255,255,.22);
}
.dashboard-template-grid .funnel-chart {
  gap: 7px;
}
.dashboard-template-grid .funnel-step {
  grid-template-columns: 96px minmax(0, 1fr) 70px;
}
.conversion-chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(90px, 1fr));
  gap: 8px;
}
.conversion-chart button {
  min-height: 128px;
  display: grid;
  gap: 8px;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
  text-align: left;
}
.conversion-chart button.is-selected {
  border-color: var(--blue);
  background: var(--blue-soft);
}
.conversion-chart span,
.conversion-chart small { color: var(--muted); font-size: 12px; }
.conversion-chart strong { font-size: 24px; }
.rank-list {
  display: grid;
  gap: 8px;
}
.rank-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: center;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
  text-align: left;
  overflow: hidden;
}
.rank-row:hover { border-color: rgba(36, 87, 197, 0.42); }
.rank-row small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
}
.rank-row i {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  background: var(--chart-1);
}
.donut-click-list {
  display: grid;
  gap: 8px;
}
.donut-click-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px 90px;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
  text-align: left;
}
.donut-click-list small { color: var(--muted); text-align: right; }
.treemap-chart {
  min-height: 230px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-content: stretch;
}
.treemap-chart button {
  flex: var(--share) 1 120px;
  min-height: 96px;
  display: grid;
  align-content: end;
  gap: 5px;
  border: 1px solid rgba(16, 35, 63, 0.08);
  border-radius: 8px;
  padding: 12px;
  text-align: left;
  color: #ffffff;
  background: var(--chart-1);
}
.treemap-chart button:nth-child(2n) { background: var(--chart-2); }
.treemap-chart button:nth-child(3n) { background: var(--chart-4); }
.treemap-chart button:nth-child(4n) { background: var(--chart-3); }
.treemap-chart button.is-selected {
  outline: 3px solid rgba(16, 35, 63, 0.22);
}
.treemap-chart span { font-size: 20px; font-weight: 900; }
.treemap-chart small { color: rgba(255, 255, 255, 0.78); }
.lollipop-chart {
  display: grid;
  gap: 10px;
}
.lollipop-chart button {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) 92px;
  gap: 10px;
  align-items: center;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
}
.lollipop-chart i {
  height: 10px;
  border-radius: 999px;
  background: #eef2f7;
  position: relative;
  overflow: visible;
}
.lollipop-chart b {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--chart-1);
  position: relative;
}
.lollipop-chart b::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: var(--chart-2);
  box-shadow: 0 3px 10px rgba(16, 24, 40, 0.18);
}
.lollipop-chart button.is-selected span { color: var(--blue); font-weight: 900; }
.gauge-ring {
  min-height: 230px;
  display: grid;
  place-items: center;
  gap: 12px;
  text-align: center;
}
.gauge-ring > div {
  width: 160px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--chart-2) 0 var(--score), #f1edf8 var(--score) 360deg);
  position: relative;
}
.gauge-ring > div::after {
  content: "";
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  background: #ffffff;
}
.gauge-ring strong,
.gauge-ring span {
  position: relative;
  z-index: 1;
}
.gauge-ring strong { font-size: 30px; }
.gauge-ring span { display: block; color: var(--muted); font-size: 12px; }
.gauge-ring p { color: var(--muted); }
.stage-flow {
  display: grid;
  gap: 9px;
}
.stage-flow button {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 34px;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 8px;
  text-align: left;
}
.stage-flow button.is-selected { border-color: var(--blue); background: var(--blue-soft); }
.stage-flow i {
  height: 16px;
  border-radius: 999px;
  background: var(--chart-1);
}
.aging-chart {
  height: 220px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  align-items: end;
}
.aging-chart div {
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 6px;
  align-items: end;
  text-align: center;
}
.aging-chart div span {
  display: block;
  width: 100%;
  border-radius: 8px 8px 3px 3px;
  background: var(--chart-3);
}
.aging-chart small { color: var(--muted); font-size: 11px; }
.performance-table {
  display: grid;
  gap: 8px;
}
.performance-table button {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr 1fr 0.7fr;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
  text-align: left;
}
.performance-table span { color: var(--muted); font-size: 12px; }
.executive-performance-cards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.dashboard-template-grid > .chart-card.compact .executive-performance-cards {
  grid-template-columns: 1fr;
  gap: 7px;
}
.executive-performance-cards button {
  display: grid;
  gap: 8px;
  min-height: 104px;
  padding: 10px;
  text-align: left;
}
.dashboard-template-grid > .chart-card.compact .executive-performance-cards button {
  min-height: 74px;
  gap: 6px;
}
.executive-performance-cards header,
.executive-performance-cards footer {
  display: flex;
  gap: 8px;
  justify-content: space-between;
}
.executive-performance-cards header strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.executive-performance-cards header span {
  color: var(--tone-color);
  font-size: 18px;
  font-weight: 950;
}
.executive-performance-cards footer {
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 11px;
}
.dashboard-template-grid > .chart-card.compact .executive-performance-cards footer span:nth-child(2) {
  display: none;
}
.top-accounts-donut {
  display: grid;
  place-items: center;
  min-height: 226px;
}
.top-accounts-orbit {
  position: relative;
  width: min(100%, 286px);
  height: 216px;
}
.top-accounts-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 118px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.top-accounts-ring::after {
  content: "";
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  background: var(--surface-raised);
}
.top-accounts-ring strong,
.top-accounts-ring span {
  position: relative;
  z-index: 1;
}
.top-accounts-ring strong { font-size: 26px; }
.top-accounts-ring span { color: var(--muted); font-size: 12px; }
.top-account-label {
  position: absolute;
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  gap: 4px 6px;
  align-items: center;
  width: 124px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.82);
  box-shadow: var(--shadow-xs);
  padding: 7px 9px;
  text-align: left;
}
.top-account-label i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--tone-color);
}
.top-account-label span {
  min-width: 0;
  overflow: hidden;
  font-weight: 850;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.top-account-label strong { color: var(--tone-color); font-size: 11px; }
.top-account-label.label-1 { left: 0; top: 8px; }
.top-account-label.label-2 { right: 0; top: 30px; }
.top-account-label.label-3 { left: 4px; bottom: 24px; }
.top-account-label.label-4 { right: 8px; bottom: 14px; }
.top-account-label.label-5 { left: 50%; top: 0; transform: translateX(-50%); width: 118px; }
.risk-priority-card .risk-list button {
  border-left-width: 0;
  background: rgba(255,255,255,.86);
  box-shadow: inset 4px 0 0 var(--red);
}
.risk-priority-story {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}
.risk-priority-score {
  width: 92px;
  aspect-ratio: 1;
  display: grid;
  place-content: center;
  border-radius: 50%;
  background: conic-gradient(var(--red) 0 var(--score), rgba(15,23,42,.08) var(--score) 360deg);
  position: relative;
  text-align: center;
}
.risk-priority-score::after {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: 50%;
  background: var(--surface-raised);
}
.risk-priority-score strong,
.risk-priority-score span {
  position: relative;
  z-index: 1;
}
.risk-priority-score strong { font-size: 24px; }
.risk-priority-score span { color: var(--muted); font-size: 10px; font-weight: 850; }
.risk-priority-story article {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.risk-priority-story article span,
.risk-priority-story p {
  color: var(--muted);
  font-size: 12px;
}
.risk-priority-story article button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px;
  text-align: left;
}
.risk-priority-story article strong,
.risk-priority-story article small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.risk-priority-story article small { color: var(--muted); margin-top: 3px; }
.risk-priority-metrics {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.risk-priority-metrics span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.72);
  padding: 8px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}
.risk-priority-metrics strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
}
.risk-priority-story p { grid-column: 1 / -1; margin: 0; }
.matrix-grid {
  display: grid;
  gap: 6px;
  overflow-x: auto;
}
.matrix-grid > * {
  min-height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  padding: 8px;
  font-size: 12px;
}
.matrix-grid strong {
  background: #f3f6fb;
}
.matrix-grid button {
  border: 1px solid rgba(36, 87, 197, 0.12);
  background: rgba(36, 87, 197, calc(0.06 + var(--heat) * 0.34));
  color: var(--ink);
  font-weight: 800;
}
.risk-list {
  display: grid;
  gap: 8px;
}
.risk-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 70px;
  gap: 4px 10px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  border-radius: 8px;
  background: #fffafa;
  padding: 10px;
  text-align: left;
}
.risk-list p {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
}
.scenario-compare {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.scenario-compare article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 16px;
}
.scenario-compare span,
.scenario-compare small { color: var(--muted); }
.scenario-compare strong { display: block; margin: 8px 0; font-size: 22px; }
.market-signal-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.market-signal-board button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
  text-align: left;
}
.market-signal-board span { display: block; margin: 6px 0; color: var(--blue); font-weight: 800; }
.market-signal-board p { color: var(--muted); font-size: 13px; line-height: 1.45; }
.area-chart {
  display: grid;
  gap: 12px;
}
.area-chart svg {
  width: 100%;
  height: 148px;
  border-radius: 8px;
  background: #f8fbff;
  border: 1px solid var(--line);
}
.area-chart polyline {
  fill: none;
  stroke: var(--chart-1);
  stroke-width: 4;
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.area-labels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.area-labels button {
  display: grid;
  gap: 3px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 11px;
  text-align: left;
}
.area-labels button:hover { border-color: rgba(36, 87, 197, 0.24); }
.area-labels strong { color: var(--ink); }
.waterfall-chart {
  height: 210px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  align-items: end;
  padding-top: 8px;
}
.waterfall-item {
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 6px;
  align-items: end;
  text-align: center;
}
.waterfall-item span {
  display: block;
  width: 100%;
  border-radius: 8px 8px 3px 3px;
  background: var(--tone-color, var(--chart-1));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.24);
}
.waterfall-item strong { font-size: 12px; }
.waterfall-item small { color: var(--muted); }
.bubble-map {
  position: relative;
  height: 230px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(#eef2f7 1px, transparent 1px),
    linear-gradient(90deg, #eef2f7 1px, transparent 1px),
    #ffffff;
  background-size: 25% 25%;
  overflow: hidden;
}
.bubble {
  position: absolute;
  transform: translate(-50%, -50%);
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: var(--chart-1);
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(16, 24, 40, 0.16);
}
.bubble.is-risk { background: var(--red); }
.axis {
  position: absolute;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.axis.x { right: 10px; bottom: 8px; }
.axis.y { left: 10px; top: 8px; }
.heatmap {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}
.heatmap button {
  min-height: 92px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  border: 1px solid rgba(36, 87, 197, 0.12);
  border-radius: 8px;
  background: rgba(36, 87, 197, calc(0.08 + var(--heat) * 0.42));
}
.heatmap strong { font-size: 22px; }
.heatmap span { color: var(--muted); font-size: 12px; text-transform: capitalize; }
.alert-list {
  display: grid;
  gap: 8px;
}
.alert-list article {
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
}
.alert-list article p { color: var(--muted); margin-top: 4px; font-size: 13px; }
.alert-list .danger { border-left-color: var(--red); background: var(--red-soft); }
.alert-list .green { border-left-color: var(--green); background: var(--green-soft); }
.alert-list .blue { border-left-color: var(--blue); background: var(--blue-soft); }
.followup-reminder-dock {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 19;
  width: min(360px, calc(100vw - 32px));
}
.followup-reminder-card {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.16);
  overflow: hidden;
  backdrop-filter: blur(12px);
}
.followup-reminder-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.07);
}
.followup-reminder-card header span {
  display: block;
  margin-bottom: 3px;
  color: var(--teal);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.followup-reminder-card header strong { font-size: 15px; color: var(--ink); }
.followup-reminder-card header button {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: var(--surface);
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}
.followup-reminder-list {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
}
.followup-reminder-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 10px;
  align-items: center;
  padding: 10px;
  border-radius: 10px;
  background: var(--surface-soft);
}
.followup-reminder-list strong { display: block; font-size: 13px; color: var(--ink); }
.followup-reminder-list span { color: var(--muted); font-size: 12px; }
.followup-reminder-list p {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.followup-reminder-list button,
.followup-reminder-card footer button {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  padding: 8px 10px;
}
.followup-reminder-card footer {
  padding: 0 12px 12px;
}
.followup-reminder-card footer button {
  width: 100%;
  background: var(--teal);
  color: #ffffff;
}
@media (max-width: 720px) {
  .followup-reminder-dock {
    right: 12px;
    bottom: 12px;
  }
}
.client-drawer {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 20;
}
.client-drawer.is-open { display: block; }
.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
}
.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(1040px, 100vw);
  height: 100%;
  overflow-y: auto;
  background:
    radial-gradient(circle at 92% 8%, rgba(174, 231, 242, 0.26), transparent 28%),
    var(--bg);
  box-shadow: var(--shadow-drawer);
  padding: 20px;
}
.drawer-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
  margin-bottom: 14px;
}
.drawer-header p { color: var(--muted); margin-top: 4px; }
.client-command {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 14px;
  align-items: stretch;
  background: linear-gradient(135deg, #172554, #164e63);
  color: #ffffff;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-md);
}
.client-command h3 {
  margin: 10px 0 6px;
  font-size: 21px;
  line-height: 1.2;
}
.client-command p { color: rgba(255, 255, 255, 0.78); max-width: 720px; }
.client-health {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  min-height: 104px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  text-align: center;
}
.client-health strong { font-size: 34px; line-height: 1; }
.client-health span { color: rgba(255, 255, 255, 0.78); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.client-health.is-strong { box-shadow: inset 0 -4px 0 rgba(157, 224, 202, 0.82); }
.client-health.is-watch { box-shadow: inset 0 -4px 0 rgba(255, 211, 154, 0.88); }
.client-health.is-risk { box-shadow: inset 0 -4px 0 rgba(255, 178, 192, 0.9); }
.client-progress {
  background: var(--surface-raised);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-xs);
}
.client-progress span {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--green));
}
.client-progress small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-weight: 700;
}
.drawer-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.drawer-summary article, .drawer-section {
  background: var(--surface-raised);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 14px;
  box-shadow: var(--shadow-sm);
}
.drawer-summary span { color: var(--muted); font-size: 12px; }
.drawer-summary strong { display: block; margin-top: 6px; font-size: 18px; }
.drawer-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  align-items: center;
}
.drawer-action-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-right: 8px;
  border-right: 1px solid var(--line);
}
.drawer-action-group:last-child { border-right: 0; }
.drawer-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.drawer-tabs button,
.next-actions button {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  border-radius: 8px;
  padding: 9px 12px;
  font-weight: 800;
  cursor: pointer;
}
.drawer-tabs button:hover,
.next-actions button:hover {
  border-color: rgba(74, 111, 255, 0.36);
  box-shadow: var(--shadow-xs);
}
.client-internal-tabs {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 8px;
  margin: 4px 0 12px;
}
.client-internal-tabs button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
}
.client-internal-tabs button.is-selected {
  background: var(--ink);
  color: #ffffff;
  border-color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.client-tab-content {
  display: grid;
  gap: 12px;
}
.client-alerts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.client-alerts article {
  border: 1px solid var(--border-soft);
  border-left: 4px solid var(--amber);
  border-radius: 8px;
  background: var(--surface-raised);
  padding: 12px;
  box-shadow: var(--shadow-xs);
}
.client-alerts article p { margin-top: 4px; color: var(--muted); font-size: 13px; }
.client-alerts .danger { border-left-color: var(--red); background: var(--red-soft); }
.client-alerts .green { border-left-color: var(--green); background: var(--green-soft); }
.client-alerts .blue { border-left-color: var(--blue); background: var(--blue-soft); }
.primary-mini {
  background: var(--blue) !important;
  color: #ffffff !important;
  border-color: var(--blue) !important;
}
.success-action {
  background: var(--green-soft) !important;
  color: var(--green) !important;
  border-color: rgba(22, 132, 91, 0.25) !important;
}
.danger-action {
  background: var(--red-soft) !important;
  color: var(--red) !important;
  border-color: rgba(200, 61, 61, 0.25) !important;
}
.drawer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 12px;
}
.account-profile {
  grid-row: span 2;
}
.drawer-section h3 {
  margin: 0 0 10px;
  font-size: 15px;
}
.drawer-section dl {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
}
.drawer-section dl div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid #edf1f6;
  padding-bottom: 6px;
}
.drawer-section dt { color: var(--muted); }
.drawer-section dd { margin: 0; font-weight: 700; text-align: right; }
.tag-form {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag-list span {
  border: 1px solid rgba(74, 111, 255, 0.18);
  border-radius: 999px;
  background: #eef4ff;
  color: var(--blue);
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}
.inline-form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
.inline-form-row input,
.inline-form-row textarea,
.editable-card input,
.editable-card select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 10px 12px;
}
.inline-form-row button,
.editable-actions button {
  border-radius: 8px;
}
.inline-form-row .wide,
.inline-form-row .form-section-label {
  grid-column: 1 / -1;
}
.form-section-label {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.editable-list {
  display: grid;
  gap: 10px;
}
.editable-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff, #f8fbff);
  padding: 12px;
  box-shadow: var(--shadow-xs);
}
.compact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.editable-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.next-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.map-section {
  grid-column: 1 / -1;
}
.map-frame {
  width: 100%;
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #eef2f7;
  margin-bottom: 12px;
}
.map-frame iframe {
  display: block;
  width: 100%;
  height: 280px;
  border: 0;
}
.map-placeholder {
  min-height: 260px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  text-align: center;
  color: var(--muted);
}
.map-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.timeline-item {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 10px;
  padding: 8px 0;
}
.timeline-item > span {
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--blue);
}
.timeline-item small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.timeline-full {
  grid-column: 1 / -1;
}
.risk-list {
  display: grid;
  gap: 8px;
}
.risk-list article {
  border: 1px solid var(--border-soft);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
}
.risk-list article p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}
.risk-list .danger { border-left-color: var(--red); background: var(--red-soft); }
.risk-list .green { border-left-color: var(--green); background: var(--green-soft); }
.risk-list .blue { border-left-color: var(--blue); background: var(--blue-soft); }
.intelligence-panel {
  background:
    linear-gradient(135deg, rgba(74, 111, 255, 0.1), rgba(157, 224, 202, 0.16)),
    var(--surface-raised);
}
.score-board {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}
.score-board strong {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: conic-gradient(var(--blue) calc(var(--score, 72) * 1%), #e6edf7 0);
  color: var(--ink);
  font-size: 24px;
  box-shadow: var(--shadow-xs);
}
.score-board span { color: var(--muted); font-weight: 800; }
.activity-log-panel {
  grid-column: 1 / -1;
}
.activity-log-form {
  display: grid;
  gap: 8px;
}
.log-form-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 8px;
}
.activity-log-form select,
.activity-log-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 10px 12px;
}
.activity-log-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.activity-log-item {
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff, #f8fbff);
  padding: 10px;
  box-shadow: var(--shadow-xs);
}
.activity-log-item div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}
.activity-log-item span,
.activity-log-item small {
  color: var(--muted);
  font-size: 12px;
}
.activity-log-item p {
  margin-top: 6px;
  color: var(--ink);
  line-height: 1.45;
}
.notice.compact {
  margin-top: 0;
  padding: 10px;
}
.admin-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.admin-summary article {
  background: var(--surface-raised);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow-md);
}
.admin-summary span { color: var(--muted); font-size: 13px; }
.admin-summary strong { display: block; margin-top: 8px; font-size: 22px; }
.admin-org-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 16px;
  margin-bottom: 12px;
}
.admin-org-panel h2 { margin-top: 4px; }
.admin-org-facts,
.admin-membership-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.admin-membership-strip {
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  margin-bottom: 12px;
}
.admin-org-facts article,
.admin-membership-strip article {
  padding: 12px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--surface-raised);
}
.admin-org-facts span,
.admin-membership-strip span {
  color: var(--muted);
  font-size: 12px;
}
.admin-org-facts strong,
.admin-membership-strip strong {
  display: block;
  margin-top: 6px;
}
.admin-org-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.super-admin-provision {
  margin-bottom: 12px;
}
.organization-provision-form {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-soft);
}
.provision-flow-grid,
.setup-checklist {
  display: grid;
  gap: 10px;
}
.provision-flow-grid {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  margin-bottom: 12px;
}
.provision-flow-grid article,
.setup-checklist article {
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--surface-raised);
  padding: 12px;
}
.provision-flow-grid h3 {
  margin: 0 0 6px;
  font-size: 14px;
}
.provision-flow-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}
.setup-checklist {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}
.setup-checklist article {
  display: grid;
  gap: 6px;
}
.setup-checklist span {
  width: max-content;
  border-radius: 999px;
  padding: 4px 7px;
  font-size: 11px;
  font-weight: 800;
}
.setup-checklist .is-done {
  background: var(--green-soft);
  color: var(--green);
}
.setup-checklist .is-pending {
  background: var(--amber-soft);
  color: var(--amber);
}
.super-admin-directory {
  margin-bottom: 12px;
}
.organization-directory-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 12px;
}
.organization-detail-panel {
  display: grid;
  gap: 12px;
  align-content: start;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--surface-raised);
  padding: 14px;
}
.organization-detail-panel h3 {
  margin: 4px 0;
}
.organization-detail-panel p {
  margin: 0;
  color: var(--muted);
}
.organization-detail-panel dl {
  display: grid;
  gap: 8px;
  margin: 0;
}
.organization-detail-panel dl div {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}
.organization-detail-panel dt {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}
.organization-detail-panel dd {
  margin: 3px 0 0;
  line-height: 1.4;
}
.organization-detail-panel.is-empty {
  color: var(--muted);
}
.org-access-state {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  background: var(--amber-soft);
  color: var(--amber);
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 800;
}
.admin-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 12px;
  margin-bottom: 12px;
}
.admin-grid > * { min-width: 0; }
.admin-summary + .admin-grid { grid-template-columns: minmax(0, 1fr); }
.admin-users-grid { grid-template-columns: minmax(0, 1fr); }
.admin-grid .rule-row { grid-template-columns: 96px minmax(0, 1fr); align-items: start; }
.admin-actions { min-width: 210px; }
.admin-actions .mini-action { margin: 2px; }
.form-status {
  min-height: 32px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--green);
  font-weight: 800;
}
.home-settings-form {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-soft);
}
.widget-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.widget-delete {
  width: 22px;
  height: 22px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: var(--red-soft);
  color: var(--red);
  font-weight: 900;
  line-height: 1;
  padding: 0;
}
.team-grid { display: grid; grid-template-columns: repeat(2, minmax(150px, 1fr)); gap: 10px; }
.team-card { display: grid; gap: 5px; padding: 12px; border: 1px solid var(--border-soft); border-radius: 8px; background: var(--surface-raised); }
.team-card span, .team-card small { color: var(--muted); }
.portfolio-transfer-form { display: grid; gap: 10px; margin-top: 12px; }
.portfolio-transfer-form label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; }
.panel-title-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.panel-title-row p {
  margin-top: 4px;
  color: var(--muted);
}
.integration-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 12px;
}
.api-settings {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(260px, 420px) auto;
  gap: 12px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
  margin-bottom: 12px;
}
.api-settings p {
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.4;
}
.api-settings input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}
.readiness-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 10px;
}
.readiness-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: linear-gradient(135deg, #ffffff, #f8fbff);
}
.readiness-grid span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  padding: 0 8px;
  background: var(--violet-soft);
  color: #7760c7;
  font-size: 11px;
  font-weight: 900;
}
.readiness-grid strong {
  display: block;
  margin-top: 8px;
}
.readiness-grid p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.42;
}
.integration-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--surface-raised);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}
.integration-card > div {
  display: flex;
  gap: 8px;
  align-items: center;
}
.integration-card h3 {
  margin: 0;
  font-size: 16px;
}
.integration-card p,
.integration-card dd {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.integration-card dl {
  display: grid;
  gap: 6px;
  margin: 0;
}
.integration-card dt {
  margin-top: 4px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}
.brand-lab-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 16px;
  align-items: stretch;
  margin-bottom: 12px;
  border: 1px solid var(--border-medium);
  border-radius: 8px;
  padding: 22px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), var(--green-soft) 62%, var(--amber-soft));
  box-shadow: var(--shadow);
}
.brand-lab-hero h2 {
  max-width: 760px;
  margin-top: 8px;
  font-size: 26px;
  line-height: 1.2;
}
.brand-lab-hero p {
  max-width: 720px;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.5;
}
.design-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.mascot-preview {
  min-height: 260px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.54);
  text-align: center;
}
.mascot-preview canvas, .mascot-preview img {
  width: 176px;
  height: 176px;
}
.mascot-preview img { padding: 30px; border-radius: 22px; background: #f2eee4; }
.mascot-preview strong { font-family: var(--font-display); }
.mascot-preview span { color: var(--muted); font-size: 12px; max-width: 180px; line-height: 1.35; }
.design-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 12px;
}
.design-grid .wide { grid-column: span 2; }
.design-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin: -2px 0 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-muted) 58%, #ffffff 42%);
}
.design-card-head h2 { margin: 0; }
.design-card-head p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.42;
  max-width: 560px;
}
.design-palette-control {
  flex: 0 0 238px;
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.design-palette-control select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--border-medium);
  border-radius: 10px;
  padding: 8px 12px;
  background: var(--surface-strong);
  color: var(--ink);
  font: 700 13px/1.2 var(--font-body);
  box-shadow: var(--shadow-xs);
}
.swatch-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 10px;
}
.swatch-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
  display: grid;
  gap: 6px;
}
.swatch-card span {
  height: 54px;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.44);
}
.swatch-card code {
  color: var(--muted);
  font-size: 12px;
}
.swatch-card small,
.design-rule-row p,
.asset-grid p {
  color: var(--muted);
  line-height: 1.42;
}
.type-showcase {
  min-height: 226px;
  display: grid;
  align-content: center;
  gap: 12px;
  border-radius: 8px;
  padding: 18px;
  background: linear-gradient(135deg, #ffffff, var(--green-soft));
}
.type-showcase span { color: var(--muted); font-weight: 800; }
.type-showcase strong {
  font-family: var(--font-body);
  font-size: 24px;
  line-height: 1.15;
}
.type-showcase em {
  font-family: var(--font-display);
  color: var(--green);
  font-style: normal;
  font-size: 18px;
}
.icon-system {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.icon-system div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.icon-system span {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--violet-soft), var(--blue-soft));
  color: #7760c7;
  font-weight: 900;
}
.icon-system strong { font-size: 13px; }
.chart-palette {
  min-height: 188px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(44px, 1fr));
  align-items: end;
  gap: 10px;
  padding: 14px;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff, #f6fbff);
}
.chart-palette span {
  display: grid;
  gap: 8px;
  justify-items: center;
  align-items: end;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.chart-palette i {
  display: block;
  width: 100%;
  height: var(--height);
  border-radius: 12px 12px 6px 6px;
  background: linear-gradient(180deg, var(--color), rgba(255,255,255,.82));
  border: 1px solid rgba(255,255,255,.7);
}
.design-rule-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 12px;
}
.asset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 10px;
}
.asset-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: linear-gradient(135deg, #ffffff, #f8fbff);
}
.asset-grid p { margin-top: 6px; font-size: 13px; }
.component-samples {
  display: grid;
  gap: 10px;
}
.priority {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 900;
  color: #ffffff;
  background: var(--blue);
}
.priority.p0 { background: var(--red); }
.priority.p1 { background: var(--amber); color: #4a2b00; }
.priority.p2 { background: var(--green); }
.table-scroll { overflow-x: auto; }
.automation-strip article {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}
.automation-strip span { color: var(--muted); }
.automation-strip strong { display: block; margin-top: 6px; font-size: 24px; }
.automation-grid { grid-template-columns: 0.95fr 1.05fr; }
.rule-row, .followup-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 88px;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.followup-row { grid-template-columns: minmax(220px, 1fr) minmax(230px, 0.8fr) minmax(150px, auto); }
.followup-row > * { min-width: 0; }
.followup-row p {
  overflow-wrap: anywhere;
  line-height: 1.35;
}
.followup-editor {
  display: grid;
  grid-template-columns: minmax(126px, 1fr) 88px auto;
  gap: 6px;
  align-items: center;
  min-width: 0;
}
.followup-editor input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 34px;
  padding: 6px 8px;
}
.followup-focus-panel {
  margin-bottom: 12px;
  border-color: color-mix(in srgb, var(--blue) 22%, var(--line) 78%);
  background:
    radial-gradient(circle at 92% 12%, color-mix(in srgb, var(--blue) 12%, transparent), transparent 30%),
    var(--surface-raised);
}
.followup-focus-panel.is-drawer { margin-bottom: 0; }
.followup-focus-panel header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
  margin-bottom: 14px;
}
.followup-focus-panel header p {
  margin-top: 4px;
  color: var(--muted);
}
.followup-focus-head-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
}
.followup-focus-head-actions .ghost-button {
  min-height: 30px;
  padding: 0 10px;
}
.followup-focus-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.25fr) minmax(260px, 1fr) minmax(180px, .75fr);
  gap: 12px;
  align-items: stretch;
}
.followup-focus-grid label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}
.followup-focus-grid textarea,
.followup-focus-grid input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 9px 10px;
}
.followup-focus-grid textarea {
  min-height: 96px;
  resize: vertical;
}
.followup-focus-editor {
  display: grid;
  gap: 10px;
}
.followup-focus-actions {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}
.followup-focus-actions button,
.followup-focus-actions a {
  width: 100%;
  justify-content: center;
}
.preset-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}
.preset-row button {
  min-height: 28px;
  padding: 0 8px;
  white-space: nowrap;
}
.preset-row span { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.preset-row button, .preset-mini button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 800;
  padding: 0 8px;
}
.preset-mini { display: flex; gap: 4px; }
.rule-row:last-child, .followup-row:last-child { border-bottom: 0; }
.channel-actions {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}
.channel-actions .mini-action {
  min-height: 28px;
  padding: 0 8px;
  font-size: 11px;
}
.mini-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #ffffff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.mini-action[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
}
.mini-action.is-static {
  background: var(--soft);
  color: var(--muted);
  cursor: default;
  pointer-events: none;
}
.file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  min-height: 36px;
  white-space: nowrap;
}
.file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.notice {
  margin-top: 12px;
  border: 1px dashed var(--border-medium);
  border-radius: 8px;
  background: rgba(255,255,255,.78);
  color: var(--muted);
  padding: 14px;
  box-shadow: var(--shadow-xs);
}
.empty-state {
  display: grid;
  justify-items: start;
  gap: 10px;
  background: var(--surface-raised);
  border: 1px dashed var(--border-medium);
  border-radius: 8px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.empty-state strong { font-size: 18px; }
.empty-state p { color: var(--muted); }
.sales-engine-hero {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.sales-engine-hero article,
.sales-engine-ai,
.sales-cadence-card,
.sales-playbook-card,
.sales-queue-item {
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--surface-raised);
  box-shadow: var(--shadow-sm);
}
.sales-engine-hero article {
  padding: 16px;
  border-top: 4px solid var(--blue);
}
.sales-engine-hero article.is-alert { border-top-color: var(--red); background: var(--red-soft); }
.sales-engine-hero span,
.sales-engine-hero p,
.sales-engine-ai p,
.sales-cadence-card p,
.sales-cadence-card small,
.sales-playbook-card p,
.sales-playbook-card small {
  color: var(--muted);
}
.sales-engine-hero strong {
  display: block;
  margin: 8px 0 4px;
  font-size: 24px;
}
.sales-engine-ai {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 12px;
  padding: 14px 16px;
}
.sales-engine-ai strong { display: block; margin: 3px 0; }
.sales-engine-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--surface-raised);
}
.sales-engine-filters label,
.sales-task-editor label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.sales-engine-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 12px;
}
.sales-queue-panel { grid-row: span 2; }
.sales-queue-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 150px;
  gap: 12px;
  align-items: start;
  padding: 14px;
  margin-top: 10px;
}
.sales-queue-item.is-overdue { border-left: 4px solid var(--red); background: var(--red-soft); }
.sales-queue-item.is-today { border-left: 4px solid var(--amber); background: var(--amber-soft); }
.sales-queue-item.is-soon { border-left: 4px solid var(--blue); }
.sales-task-editor { display: grid; gap: 8px; align-content: start; }
.sales-task-editor .primary-button,
.sales-task-editor .ghost-button { width: 100%; text-align: center; }
.sales-cadence-card,
.sales-playbook-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  margin-top: 10px;
}
.sales-cadence-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.sales-playbook-card h3 { margin: 2px 0; }
.intelligence-hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr 0.9fr;
  gap: 12px;
  margin-bottom: 12px;
}
.intelligence-hero article {
  background: var(--blue);
  color: #ffffff;
  border-radius: 8px;
  padding: 18px;
  box-shadow: var(--shadow-lg);
}
.intelligence-hero article:nth-child(2) { background: var(--green); }
.intelligence-hero article:nth-child(3) { background: var(--amber); color: #171c1f; }
.intelligence-hero article:nth-child(3) span,
.intelligence-hero article:nth-child(3) p { color: rgba(23,28,31,.72); }
.intelligence-hero span { color: #cbd5e1; font-size: 13px; }
.intelligence-hero strong {
  display: block;
  margin: 8px 0;
  font-size: 24px;
}
.intelligence-hero p { color: #e5e7eb; }
.intelligence-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 12px;
  margin-top: 12px;
}
.intelligence-governance-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--surface-raised);
}
.intelligence-governance-banner strong { display: block; margin: 3px 0; }
.intelligence-governance-banner p { color: var(--muted); font-size: 13px; }
.live-intelligence-lab {
  display: grid;
  grid-template-columns: minmax(240px, 1.35fr) minmax(220px, 1fr) minmax(150px, .55fr) auto auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid rgba(15, 138, 104, .18);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(15, 138, 104, .08), rgba(75, 112, 226, .07)),
    var(--surface-raised);
  box-shadow: var(--shadow-sm);
}
.live-intelligence-lab > div {
  align-self: center;
}
.live-intelligence-lab strong { display: block; margin: 3px 0; color: var(--ink); }
.live-intelligence-lab p { color: var(--muted); font-size: 12px; line-height: 1.35; }
.live-intelligence-lab label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.live-intelligence-lab input,
.live-intelligence-lab select { min-width: 0; }
.live-intelligence-lab .api-status {
  grid-column: 2 / -1;
  color: var(--muted);
  font-size: 12px;
}
.api-status.success { color: var(--green); font-weight: 800; }
.api-status.warning { color: #9a6a00; font-weight: 800; }
.api-status.error { color: var(--red); font-weight: 800; }
.api-catalog-grid {
  margin-bottom: 12px;
}
.intelligence-filters {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, minmax(130px, .7fr));
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--surface-raised);
}
.intelligence-filters label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 700; }
.intelligence-filters input, .intelligence-filters select { min-width: 0; }
.pill.simulated { background: #fff3cd; color: #805d00; border-color: #f0d98a; font-size: 10px; }
.pill.live { background: rgba(15, 138, 104, .12); color: var(--green); border-color: rgba(15, 138, 104, .28); font-size: 10px; }
.intel-row-actionable { grid-template-columns: 52px minmax(0, 1fr) 150px; align-items: start; }
.intel-actions { display: grid; gap: 7px; align-content: start; }
.intel-actions .primary-button, .intel-actions .ghost-button { width: 100%; text-align: center; }
.intel-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}
.recommendation-reason { margin-top: 8px; padding: 8px 10px; border-left: 3px solid var(--green); background: rgba(15, 138, 104, .06); }
.market-briefing {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.market-briefing:last-child { border-bottom: 0; }
.market-briefing h3 { margin: 8px 0 5px; }
.market-briefing p, .market-briefing small { color: var(--muted); line-height: 1.5; }
.account-map-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px 130px;
  gap: 10px;
  align-items: center;
  padding: 11px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.account-map-row span:first-child { display: grid; gap: 3px; }
.account-map-row small, .account-map-row > span:nth-child(2) { color: var(--muted); }
.account-map-row b { text-align: right; }
.section-gap { margin-top: 22px; }
.connector-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.connector-card {
  display: grid;
  gap: 8px;
  background: var(--surface-raised);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 12px;
  box-shadow: var(--shadow-sm);
}
.connector-card header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: start;
}
.connector-card p, .connector-card small { color: var(--muted); line-height: 1.45; }
.connector-card small { font-size: 12px; }
.score-reasons {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
}
.intel-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 84px;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.intel-row:last-child, .playbook-row:last-child { border-bottom: 0; }
.score {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #eaf1ff;
  color: var(--blue);
  font-weight: 800;
}
.playbook-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.insight-grid {
  grid-template-columns: 1.2fr 0.8fr;
}
.insight-panel {
  background: var(--surface-raised);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(14px);
}
.insight-panel.insight-story {
  min-height: 168px;
  background: #0b1528;
  color: #ffffff;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: var(--shadow-lg);
}
body[data-theme="glass"] .insight-panel.insight-story {
  background: rgba(255,255,255,.62);
  color: var(--ink);
  border-color: rgba(255,255,255,.82);
}
body[data-theme="glass"] .insight-panel.insight-story .eyebrow,
body[data-theme="glass"] .insight-panel.insight-story p {
  color: var(--muted);
}
.insight-panel.insight-story .eyebrow,
.insight-panel.insight-story p {
  color: rgba(255, 255, 255, 0.78);
}
.insight-panel.insight-story .dashboard-filter-chips span {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}
.bar-row {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) 90px;
  gap: 10px;
  align-items: center;
  margin: 14px 0;
}
.bar-track { height: 12px; background: #eef2f7; border-radius: 999px; overflow: hidden; }
.bar-track span { display: block; height: 100%; background: var(--tone-color, var(--chart-1)); }
.bar-track,
.bar-track span,
.funnel-bar,
.funnel-bar span,
.lollipop-chart i,
.lollipop-chart b,
.stage-flow i,
.aging-chart div span,
.waterfall-item span,
.soft-bars i,
.glass-week-bars span,
.aqua-stats b,
.billing-status-flow i,
.billing-status-flow b,
.forecast-vivo-track,
.forecast-vivo-track span {
  border-radius: 6px;
}

.dialog {
  width: min(860px, calc(100vw - 32px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: var(--shadow-lg);
}
.dialog::backdrop { background: rgba(17, 24, 39, 0.42); }
.dialog form { padding: 20px; }
.dialog header, .dialog footer { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.dialog footer { justify-content: flex-end; margin-top: 16px; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.form-grid label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
.form-grid .wide { grid-column: 1 / -1; }
.address-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--surface-muted);
}
.address-tools span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.address-tools button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--ink);
  padding: 7px 10px;
  font-weight: 800;
}
.address-tools small { color: var(--muted); }
textarea { resize: vertical; }

@media (max-width: 1100px) {
  body { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; min-height: auto; overflow: visible; flex-direction: row; align-items: center; flex-wrap: wrap; }
  .nav { grid-auto-flow: column; overflow-x: auto; }
  .sidebar-card { display: none; }
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .board { grid-template-columns: repeat(7, 260px); }
  .product-grid, .proposal-grid, .template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .automation-grid, .sales-engine-grid, .sales-engine-hero, .sales-engine-filters, .intelligence-grid, .intelligence-hero, .live-intelligence-lab, .intelligence-filters, .connector-grid, .billing-grid, .admin-grid, .admin-org-panel, .organization-directory-grid, .provision-flow-grid, .drawer-grid, .client-alerts, .api-settings, .brand-lab-hero { grid-template-columns: 1fr; }
  .live-intelligence-lab .api-status { grid-column: auto; }
  .readiness-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-widget-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-wide { grid-column: span 2; }
  .home-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pipeline-command { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dashboard-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-brief { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart-card.wide { grid-column: span 2; }
  .dashboard-grid > .wide { grid-column: span 2; }
  .dashboard-grid > .full, .chart-card.full { grid-column: span 2; }
  .design-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .design-grid .wide { grid-column: span 2; }
  .swatch-grid, .asset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .conversion-chart, .market-signal-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .performance-table button { grid-template-columns: 1fr 1fr; }
  .pipeline-row { grid-template-columns: minmax(220px, 1fr) 120px 150px 140px 120px; }
  .billing-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .billing-command { grid-template-columns: 1fr; }
  .billing-scenarios { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .admin-summary, .admin-org-facts, .admin-membership-strip, .setup-checklist { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .app { padding: 16px; }
  .topbar, .actions, .toolbar, .pipeline-head, .pipeline-tools, .command-hero, .home-hero { align-items: stretch; flex-direction: column; }
  .search input, .actions button, .toolbar select, .segmented { width: 100%; }
  .segmented { grid-auto-flow: row; }
  .segmented button { border-right: 0; border-bottom: 1px solid var(--line); }
  .summary-grid, .form-grid, .compact-grid, .inline-form-row, .insight-grid, .kpi-strip, .dashboard-grid, .dashboard-brief, .area-labels, .heatmap, .home-strip, .home-columns, .home-widget-grid, .pipeline-command, .client-command, .client-alerts, .design-grid, .swatch-grid, .asset-grid, .readiness-grid { grid-template-columns: 1fr; }
  .design-card-head { flex-direction: column; }
  .design-palette-control { width: 100%; flex-basis: auto; }
  .client-internal-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .client-internal-tabs button:last-child { grid-column: 1 / -1; }
  .dashboard-controls { grid-template-columns: 1fr; }
  .dashboard-tabs { display: grid; grid-template-columns: 1fr; }
  .dashboard-grid > .wide, .chart-card.wide, .dashboard-grid > .full, .chart-card.full { grid-column: auto; }
  .design-grid .wide { grid-column: auto; }
  .mini-kpi-row, .conversion-chart, .scenario-compare, .market-signal-board { grid-template-columns: 1fr; }
  .performance-table button, .donut-click-list button { grid-template-columns: 1fr; }
  .lollipop-chart button, .stage-flow button { grid-template-columns: 1fr; }
  .log-form-row { grid-template-columns: 1fr; }
  .aging-chart { grid-template-columns: repeat(5, minmax(54px, 1fr)); overflow-x: auto; }
  .home-wide { grid-column: auto; }
  .chart-card.wide { grid-column: auto; }
  .activity, .product-grid, .proposal-grid, .template-grid, .automation-grid, .automation-strip, .rule-row, .followup-row, .sales-queue-item, .intel-row, .playbook-row, .market-briefing, .account-map-row, .billing-summary, .billing-command, .billing-scenarios, .admin-summary, .setup-checklist, .drawer-summary, .donut-wrap, .pipeline-row, .funnel-step, .score-board { grid-template-columns: 1fr; }
  .drawer-panel { padding: 14px; }
  .client-command h3 { font-size: 18px; }
  .mode-switch { display: grid; grid-template-columns: repeat(3, 1fr); }
  .mode-switch button { border-right: 1px solid var(--line); }
  .mode-switch button:last-child { border-right: 0; }
  .module-head { flex-direction: column; align-items: stretch; }
  .channel-actions { justify-content: flex-start; }
  .form-grid .wide { grid-column: auto; }
}

@media (max-width: 720px) {
  body { grid-template-columns: minmax(0, 1fr); width: 100%; overflow-x: hidden; }
  .app { width: 100%; max-width: 100vw; min-width: 0; }
  #insightsView,
  .command-center,
  .command-center > *,
  .reports-layout,
  .reports-layout > *,
  .dashboard-controls > *,
  .dashboard-grid > *,
  .insight-panel { min-width: 0; max-width: 100%; }
  .command-center, .reports-layout { width: 100%; overflow: hidden; }
  .dashboard-controls, .reports-layout, .report-library, .kpi-strip { grid-template-columns: minmax(0, 1fr); }
  .dashboard-controls input, .dashboard-controls select { width: 100%; min-width: 0; }
  .table-scroll { width: 100%; max-width: 100%; overflow-x: auto; }
  .scenario-box, .command-score { min-width: 0; width: 100%; }
  .scenario-buttons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Integrations hub */
.integration-command{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:12px;margin-bottom:12px}.integration-command article,.integration-policy,.integration-hub-card{border:1px solid var(--border-soft);border-radius:8px;background:var(--surface-raised);padding:16px;box-shadow:var(--shadow-sm)}.integration-command span,.integration-policy p,.integration-hub-card p,.automation-control p,.connector-last-run{color:var(--muted)}.integration-command strong{display:block;margin-top:7px;font-size:24px}.integration-policy{margin-bottom:12px;background:linear-gradient(135deg,var(--violet-soft),var(--surface-raised))}.integration-policy p{margin-top:6px;line-height:1.5}.integration-hub-grid{display:grid;grid-template-columns:repeat(2,minmax(300px,1fr));gap:12px;margin-bottom:12px}.integration-hub-card{display:grid;gap:12px;opacity:.82}.integration-hub-card.is-enabled{border-color:rgba(116,203,178,.65);opacity:1}.integration-hub-card header,.integration-hub-card header>div,.integration-hub-card footer,.automation-control{display:flex;justify-content:space-between;align-items:center;gap:10px}.integration-hub-card header>div{justify-content:flex-start}.integration-hub-card header small,.connector-last-run{display:block;margin-top:3px}.integration-hub-card dl{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:0}.integration-hub-card dl div{padding:9px;border-radius:8px;background:var(--panel)}.integration-hub-card dt{color:var(--muted);font-size:11px;text-transform:uppercase}.integration-hub-card dd{margin:4px 0 0;font-size:13px}.connector-dot{width:10px;height:10px;border-radius:50%;background:var(--muted)}.connector-dot.status-ready,.log-status.status-success{background:var(--green)}.connector-dot.status-governance,.connector-dot.status-planned{background:var(--amber)}.connector-settings{display:grid;grid-template-columns:130px minmax(180px,1fr) auto;gap:8px;align-items:end}.connector-settings label{display:grid;gap:5px;color:var(--muted);font-size:12px}.connector-settings input,.connector-settings select{min-height:38px;border:1px solid var(--line);border-radius:8px;padding:8px;background:var(--surface-raised)}.connector-governance{display:flex;flex-wrap:wrap;gap:6px}.connector-governance span{padding:5px 8px;border-radius:999px;background:var(--violet-soft);color:var(--muted);font-size:11px}.integration-ops-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:12px}.automation-control{padding:11px 0;border-bottom:1px solid var(--line)}.webhook-flow{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:16px 0}.webhook-flow span{padding:9px 11px;border:1px solid var(--line);border-radius:8px;background:var(--panel)}.log-status{display:inline-flex;padding:4px 7px;border-radius:999px;color:#fff;background:var(--red);font-size:11px;font-weight:800}@media(max-width:1100px){.integration-hub-grid,.integration-ops-grid{grid-template-columns:1fr}}@media(max-width:720px){.integration-command,.connector-settings{grid-template-columns:1fr}}

/* Decision canvas */
.dashboard-workspace-toolbar { display:flex; justify-content:space-between; align-items:center; gap:16px; padding:10px 12px; border:1px solid var(--border-soft); border-radius:10px; background:var(--surface-soft); }
.dashboard-workspace-toolbar span { display:block; color:var(--muted); font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.08em; }
.dashboard-workspace-toolbar strong { font-size:13px; }
.dashboard-workspace { grid-template-columns:repeat(12,minmax(0,1fr)); grid-auto-flow:dense; gap:12px; align-items:start; }
.dashboard-workspace > * { position:relative; min-width:0; grid-column:span 3; }
.dashboard-workspace > .wide { grid-column:span 6; }
.dashboard-workspace > .full { grid-column:1 / -1; }
.dashboard-widget-controls { position:absolute; top:10px; right:10px; z-index:6; display:flex; align-items:center; gap:5px; padding:3px; border:1px solid var(--border-soft); border-radius:9px; background:color-mix(in srgb,var(--surface-strong) 92%,transparent); box-shadow:var(--shadow-xs); opacity:.42; transition:opacity 160ms ease; }
[data-dashboard-widget]:hover .dashboard-widget-controls, [data-dashboard-widget]:focus-within .dashboard-widget-controls { opacity:1; }
.dashboard-widget-controls span, .dashboard-widget-controls button { height:25px; min-width:25px; display:grid; place-items:center; border:0; border-radius:6px; background:transparent; color:var(--muted); box-shadow:none; }
.dashboard-widget-controls button { cursor:pointer; }
.dashboard-widget-controls button:hover { background:var(--surface-soft); color:var(--ink); }
.dashboard-drag-handle { cursor:grab; letter-spacing:-3px; padding-right:3px; }
.dashboard-resize-handle { position:absolute; right:6px; bottom:6px; z-index:7; width:14px; height:14px; cursor:nwse-resize; touch-action:none; opacity:.3; border-radius:0 0 6px 0; background:repeating-linear-gradient(135deg,transparent 0 3px,color-mix(in srgb,var(--muted) 46%,transparent) 3px 4px); clip-path:polygon(100% 0,100% 100%,0 100%); transition:opacity 160ms ease,transform 160ms ease; }
.dashboard-resize-handle::before { content:""; position:absolute; inset:-7px; }
[data-dashboard-widget]:hover .dashboard-resize-handle, [data-dashboard-widget].is-resizing .dashboard-resize-handle { opacity:.78; transform:translate(-1px,-1px); }
[data-dashboard-widget].is-resizing { user-select:none; outline:2px solid color-mix(in srgb,var(--green) 55%,transparent); outline-offset:2px; }
[data-dashboard-widget].is-dragging { opacity:.42; transform:scale(.985); }
[data-dashboard-widget].is-over { outline:2px solid var(--green); outline-offset:3px; }
.dashboard-speedometer { min-height:220px; }
.speedometer { width:min(220px,100%); margin:14px auto 0; position:relative; text-align:center; }
.speedometer-arc { width:220px; height:112px; margin:0 auto; position:relative; overflow:hidden; }
.speedometer-arc::before { content:""; position:absolute; inset:0 auto auto 0; width:220px; height:220px; border-radius:50%; background:conic-gradient(from 270deg,var(--gauge-start, var(--chart-2)) 0deg 58deg,var(--chart-4) 58deg 118deg,var(--gauge-end, var(--chart-1)) 118deg 180deg,transparent 180deg 360deg); }
.speedometer-center { position:absolute; z-index:1; left:27px; top:27px; width:166px; height:166px; border-radius:50%; background:var(--surface-raised); }
.speedometer-arc i { position:absolute; z-index:2; left:107px; bottom:0; width:6px; height:82px; border-radius:6px; background:var(--ink); transform-origin:50% 100%; transform:rotate(var(--needle)); transition:transform 400ms ease; }
.speedometer-arc i::after { content:""; position:absolute; left:-6px; bottom:-7px; width:18px; height:18px; border-radius:50%; background:var(--ink); }
.speedometer-value { margin-top:10px; }
.speedometer-value strong { display:block; font-family:var(--font-display); font-size:28px; line-height:1; }
.speedometer-value span { color:var(--muted); font-size:12px; }
.speedometer-value { position:relative; padding-inline:52px; }
.speedometer-scale { position:absolute; left:0; right:0; bottom:0; display:flex; justify-content:space-between; margin:0; color:var(--muted); font-size:10px; text-transform:uppercase; letter-spacing:.08em; }
.signal-number-card { min-height:240px; display:flex; flex-direction:column; justify-content:flex-end; overflow:hidden; background:linear-gradient(135deg,var(--ink),#173d34); color:#fff; }
.signal-number-card::before { content:""; position:absolute; inset:16px 16px auto auto; width:92px; height:92px; border-radius:22px; border:1px solid rgba(255,255,255,.18); background:linear-gradient(135deg,rgba(255,255,255,.18),rgba(255,255,255,.04)); transform:rotate(8deg); }
.signal-number-card::after { content:""; position:absolute; right:20px; top:122px; width:140px; height:2px; background:linear-gradient(90deg,transparent,rgba(255,255,255,.42)); }
.signal-number-card .eyebrow, .signal-number-card p { color:rgba(255,255,255,.7); }
.signal-number-card strong { position:relative; display:block; margin:8px 0; font-family:var(--font-display); font-size:clamp(24px,2.8vw,38px); line-height:1; letter-spacing:0; }
.signal-number-card small { position:relative; color:rgba(255,255,255,.72); }
.forecast-vivo-track { position:relative; height:9px; border-radius:999px; overflow:hidden; background:rgba(255,255,255,.16); margin:12px 0 8px; }
.forecast-vivo-track span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--green),var(--lemon)); }
.design-art-control { display:grid; gap:4px; min-width:190px; color:var(--muted); font-size:11px; }
.design-art-control select { min-height:34px; border:1px solid var(--line); border-radius:8px; padding:6px 9px; background:var(--surface-strong); }

@media (max-width:1300px) {
  .topbar { grid-template-columns:1fr; }
}
@media (max-width:1050px) {
  .actions { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .actions .search:not(.profile-switcher):not(.theme-switcher) { grid-column:1 / -1; }
  .dashboard-workspace > * { grid-column:span 6; }
  .dashboard-workspace > .wide, .dashboard-workspace > .full { grid-column:1 / -1; }
}
@media (max-width:720px) {
  .topbar, .actions { display:grid; grid-template-columns:1fr; }
  .actions .search:not(.profile-switcher):not(.theme-switcher) { grid-column:auto; }
  .dashboard-workspace > *, .dashboard-workspace > .wide, .dashboard-workspace > .full { grid-column:1 / -1; }
  .dashboard-workspace-toolbar { align-items:stretch; flex-direction:column; }
}

/* Dashboard modular */
.dashboard-template-selector {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(255,255,255,.78), rgba(255,255,255,.52)),
    var(--surface-raised);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(18px);
}
.template-selector-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: var(--space-4);
}
.template-selector-head h3 {
  margin: 2px 0 3px;
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.15;
}
.template-selector-head p {
  margin: 0;
  color: var(--muted);
}
.template-selector-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-2);
}
.template-selector-actions .is-selected {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.dashboard-template-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: var(--space-2);
}
.dashboard-template-card {
  min-height: 104px;
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 13px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.64);
  color: var(--ink);
  text-align: left;
  box-shadow: var(--shadow-xs);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.dashboard-template-card:hover {
  transform: translateY(-1px);
  border-color: var(--border-medium);
  box-shadow: var(--shadow-sm);
}
.dashboard-template-card.is-selected {
  background: linear-gradient(135deg, var(--ink), var(--navy));
  border-color: transparent;
  color: #fff;
  box-shadow: var(--shadow-lg);
}
.dashboard-template-card span,
.dashboard-template-card small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}
.dashboard-template-card span {
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.dashboard-template-card strong {
  font-family: var(--font-display);
  font-size: 18px;
}
.dashboard-template-card.is-selected span,
.dashboard-template-card.is-selected small {
  color: rgba(255,255,255,.72);
}
.dashboard-template-grid {
  align-items: start;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 12px;
}
.dashboard-workspace .chart-card {
  min-height: 220px;
  padding: 14px;
}
.dashboard-template-grid > .chart-card {
  min-height: 260px;
  height: 260px;
  overflow: hidden;
}
.dashboard-template-grid > .chart-card:has(.funnel-chart) {
  height: auto;
  overflow: visible;
}
.dashboard-template-grid > .chart-card.compact {
  grid-column: span 1;
}
.dashboard-template-grid > .chart-card.wide {
  grid-column: span 2;
}
.dashboard-template-grid > .chart-card.full {
  grid-column: 1 / -1;
  height: auto;
}
.dashboard-workspace .chart-card header {
  margin-bottom: 8px;
}
.dashboard-template-grid .chart-card,
.dashboard-template-grid .billing-command,
.premium-kpi-strip .kpi-card {
  border-radius: var(--radius-lg);
}
.premium-kpi-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  overflow: visible;
}
.premium-kpi-strip .kpi-card {
  min-height: 104px;
  display: grid;
  align-content: space-between;
  border-top: 0;
  padding: var(--space-3);
  background:
    linear-gradient(180deg, rgba(255,255,255,.9), rgba(255,255,255,.68)),
    var(--surface-raised);
}
.premium-kpi-strip .kpi-card strong {
  font-family: var(--font-display);
  font-size: clamp(18px, 1.6vw, 24px);
  letter-spacing: 0;
}
.premium-kpi-strip .kpi-card.green { box-shadow: inset 0 4px 0 var(--green), var(--shadow-md); }
.premium-kpi-strip .kpi-card.amber { box-shadow: inset 0 4px 0 var(--amber), var(--shadow-md); }
.premium-kpi-strip .kpi-card.red { box-shadow: inset 0 4px 0 var(--red), var(--shadow-md); }
.premium-kpi-strip .kpi-card.violet { box-shadow: inset 0 4px 0 var(--violet), var(--shadow-md); }
.premium-kpi-strip .kpi-card:not(.green):not(.amber):not(.red):not(.violet) { box-shadow: inset 0 4px 0 var(--blue), var(--shadow-md); }
.dashboard-template-grid .chart-card {
  min-height: 240px;
  padding: var(--space-4);
  background:
    linear-gradient(180deg, rgba(255,255,255,.88), rgba(255,255,255,.64)),
    var(--surface-raised);
  border-color: rgba(24,35,31,.09);
}
.dashboard-template-grid .chart-card header {
  align-items: start;
  padding-right: 48px;
}
.dashboard-template-grid .chart-card header .eyebrow {
  color: var(--blue);
}
.dashboard-template-grid .chart-card header h2 {
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.12;
}
.dashboard-template-grid .chart-card header p {
  max-width: 54ch;
  font-size: 12px;
}
.dashboard-template-grid .insight-story {
  min-height: 160px;
  padding: var(--space-4);
  background: #171c1f;
}
.dashboard-template-grid .insight-story h2 {
  max-width: 780px;
  font-size: clamp(18px, 1.6vw, 22px);
}
.dashboard-template-grid .signal-number-card {
  border: 0;
  background:
    radial-gradient(circle at 85% 18%, rgba(255,255,255,.2), transparent 30%),
    linear-gradient(135deg, var(--ink), #0f5f52);
}
.dashboard-template-grid .signal-number-card h2 {
  margin: 6px 0 auto;
  font-size: 16px;
}
.dashboard-template-grid .signal-number-card strong {
  font-size: clamp(26px, 3vw, 38px);
}
.dashboard-workspace-toolbar {
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.68);
  box-shadow: var(--shadow-sm);
}
.dashboard-workspace { gap: var(--space-3); }
.dashboard-widget-controls { top: 12px; right: 12px; }
.funnel-chart, .conversion-chart, .treemap-chart, .lollipop-chart, .area-chart, .waterfall-chart, .heatmap {
  margin-top: var(--space-3);
}
.treemap-chart button,
.market-signal-board button,
.rank-row,
.risk-list button,
.stage-flow button,
.area-labels button {
  border-radius: var(--radius-sm);
}

@media (max-width: 1180px) {
  .dashboard-template-list { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
  .premium-kpi-strip { grid-template-columns: repeat(3, minmax(160px, 1fr)); }
}

@media (max-width: 720px) {
  .template-selector-head { flex-direction: column; }
  .template-selector-actions { justify-content: stretch; width: 100%; }
  .template-selector-actions button { flex: 1 1 160px; }
  .dashboard-template-list,
  .premium-kpi-strip { grid-template-columns: 1fr; }
}

/* Final dashboard refinements kept last to avoid stale theme overrides. */
.dashboard-filter-toggle .dashboard-filter-chips span {
  background: transparent !important;
  border-color: transparent !important;
  color: #a1aaa6 !important;
  box-shadow: none !important;
  padding: 0 1px !important;
  font-size: 9.5px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}
.dashboard-filter-toggle .dashboard-filter-chips span button {
  width: 14px !important;
  height: 14px !important;
  background: transparent !important;
  color: #a1aaa6 !important;
  font-size: 11px !important;
}

/* Neo Search dashboard: visual direction extracted from uploaded reference. */
body[data-theme="neo"] .topbar,
body[data-theme="neo"] .toolbar,
body[data-theme="neo"] .summary-grid article,
body[data-theme="neo"] .dashboard-template-selector,
body[data-theme="neo"] .dashboard-workspace-toolbar,
body[data-theme="neo"] .dashboard-filter-toggle,
body[data-theme="neo"] .dashboard-controls,
body[data-theme="neo"] .dashboard-tabs,
body[data-theme="neo"] .insight-panel,
body[data-theme="neo"] .chart-card {
  border-color: rgba(16,41,74,.08);
  background: rgba(255,255,255,.94);
  box-shadow: 0 12px 28px rgba(16,41,74,.08);
}
body[data-theme="neo"] .topbar {
  border-radius: 0 0 18px 18px;
}
body[data-theme="neo"] .primary-button {
  background: #2f69b1;
}
body[data-theme="neo"] .ghost-button,
body[data-theme="neo"] select,
body[data-theme="neo"] input {
  border-color: #d8e0eb;
  background: #ffffff;
}
body[data-theme="neo"] .dashboard-template-card.is-selected,
body[data-theme="neo"] .dashboard-tabs .is-selected {
  background: #2f69b1;
  color: #ffffff;
}
body[data-theme="neo"] .premium-kpi-strip {
  display: none;
}
body[data-theme="neo"] .dashboard-template-grid[data-template-id="neoSearch"] {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
body[data-theme="neo"] .dashboard-template-grid[data-template-id="neoSearch"] > .chart-card {
  height: 176px;
  min-height: 176px;
  padding: 14px;
  border-radius: 10px;
  background: #ffffff;
  border-color: rgba(16,41,74,.08);
  box-shadow: 0 10px 26px rgba(16,41,74,.07);
}
body[data-theme="neo"] .dashboard-template-grid[data-template-id="neoSearch"] > .chart-card.wide {
  grid-column: span 2;
}
body[data-theme="neo"] .dashboard-template-grid[data-template-id="neoSearch"] > .chart-card.full {
  grid-column: 1 / -1;
  height: auto;
}
body[data-theme="neo"] .dashboard-template-grid[data-template-id="neoSearch"] .chart-card header {
  margin-bottom: 8px;
  padding-right: 0;
}
body[data-theme="neo"] .dashboard-template-grid[data-template-id="neoSearch"] .chart-card header h2,
body[data-theme="neo"] .neo-reference-card h2 {
  color: #10294a;
  font-size: 13px;
  letter-spacing: -.01em;
}
body[data-theme="neo"] .dashboard-template-grid[data-template-id="neoSearch"] .chart-card header p,
body[data-theme="neo"] .neo-reference-card p {
  color: #71819a;
  font-size: 11px;
}
body[data-palette="neoSearch"] .topbar,
body[data-palette="neoSearch"] .toolbar,
body[data-palette="neoSearch"] .summary-grid article,
body[data-palette="neoSearch"] .dashboard-template-selector,
body[data-palette="neoSearch"] .dashboard-workspace-toolbar,
body[data-palette="neoSearch"] .dashboard-filter-toggle,
body[data-palette="neoSearch"] .dashboard-controls,
body[data-palette="neoSearch"] .dashboard-tabs,
body[data-palette="neoSearch"] .insight-panel,
body[data-palette="neoSearch"] .chart-card {
  border-color: rgba(16,41,74,.08);
  background: rgba(255,255,255,.94);
  box-shadow: 0 12px 28px rgba(16,41,74,.08);
}
body[data-palette="neoSearch"] .dashboard-template-card.is-selected,
body[data-palette="neoSearch"] .dashboard-tabs .is-selected {
  background: #2f69b1;
  color: #ffffff;
}
body[data-palette="neoSearch"] .premium-kpi-strip { display: none; }
body[data-palette="neoSearch"] .dashboard-template-grid[data-template-id="neoSearch"] {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
body[data-palette="neoSearch"] .dashboard-template-grid[data-template-id="neoSearch"] > .chart-card {
  height: 176px;
  min-height: 176px;
  padding: 14px;
  border-radius: 10px;
  background: #ffffff;
  border-color: rgba(16,41,74,.08);
  box-shadow: 0 10px 26px rgba(16,41,74,.07);
}
body[data-palette="neoSearch"] .dashboard-template-grid[data-template-id="neoSearch"] > .chart-card.wide {
  grid-column: span 2;
}
body[data-palette="neoSearch"] .dashboard-template-grid[data-template-id="neoSearch"] > .chart-card.full {
  grid-column: 1 / -1;
  height: auto;
}
body[data-palette="neoSearch"] .dashboard-template-grid[data-template-id="neoSearch"] .chart-card header {
  margin-bottom: 8px;
  padding-right: 0;
}
body[data-palette="neoSearch"] .dashboard-template-grid[data-template-id="neoSearch"] .chart-card header h2,
body[data-palette="neoSearch"] .neo-reference-card h2 {
  color: #10294a;
  font-size: 13px;
  letter-spacing: -.01em;
}
body[data-palette="neoSearch"] .dashboard-template-grid[data-template-id="neoSearch"] .chart-card header p,
body[data-palette="neoSearch"] .neo-reference-card p {
  color: #71819a;
  font-size: 11px;
}
body[data-palette="neoSearch"] .sidebar {
  background: #174978;
  color: #ffffff;
  border-right-color: rgba(255,255,255,.08);
  box-shadow: 14px 0 34px rgba(23,73,120,.15);
}
body[data-palette="neoSearch"] .brand-mark { background: #25609a; }
body[data-palette="neoSearch"] .brand small,
body[data-palette="neoSearch"] .nav-section,
body[data-palette="neoSearch"] .sidebar-card .label { color: rgba(255,255,255,.66); }
body[data-palette="neoSearch"] .nav-item { color: rgba(255,255,255,.76); }
body[data-palette="neoSearch"] .nav-item::before { background: rgba(255,255,255,.11); color: #d5e5ff; }
body[data-palette="neoSearch"] .nav-item:hover,
body[data-palette="neoSearch"] .nav-item.is-active {
  background: rgba(255,255,255,.13);
  color: #ffffff;
  border-color: rgba(255,255,255,.18);
}
body[data-palette="neoSearch"] .nav-item.is-active::before { background: #2f69b1; color: #ffffff; }
body[data-palette="neoSearch"] .sidebar-toggle,
body[data-palette="neoSearch"] .sidebar-card { background: rgba(255,255,255,.1); color: #ffffff; border-color: rgba(255,255,255,.16); }
.neo-hero-card {
  height: 272px !important;
  min-height: 272px !important;
  overflow: hidden;
}
.neo-hero-card header {
  display: flex;
  align-items: start;
  justify-content: space-between;
}
.neo-hero-card header > strong {
  color: #9aa8bd;
  font-size: 11px;
  font-weight: 700;
}
.neo-hero-layout {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 12px;
  height: 204px;
}
.neo-hero-people {
  display: grid;
  gap: 6px;
  align-content: start;
}
.neo-hero-people button {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  border: 0;
  border-bottom: 1px solid #edf2f8;
  background: transparent;
  padding: 5px 0 8px;
  text-align: left;
}
.neo-hero-people button > span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eef3fb;
  color: #2f69b1;
  font-weight: 900;
}
.neo-hero-people strong { display:block; color:#10294a; font-size:11px; }
.neo-hero-people small { display:block; color:#71819a; font-size:9px; }
.neo-hero-people em {
  padding: 4px 7px;
  border-radius: 999px;
  background: #e4f7ef;
  color: #238765;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}
.neo-line-chart {
  position: relative;
  min-width: 0;
  border-radius: 10px;
  background:
    linear-gradient(#edf2f8 1px, transparent 1px),
    linear-gradient(90deg, #edf2f8 1px, transparent 1px),
    #ffffff;
  background-size: 25% 25%;
  overflow: hidden;
}
.neo-line-chart svg {
  position: absolute;
  inset: 12px;
  width: calc(100% - 24px);
  height: calc(100% - 24px);
}
.neo-line-chart polygon { fill: rgba(47,105,177,.14); }
.neo-line-chart polyline {
  fill: none;
  stroke: #2f69b1;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 -4px 0 rgba(235,117,110,.78));
}
.neo-callout {
  position: absolute;
  padding: 6px 10px;
  border-radius: 8px;
  background: #e7eefb;
  color: #10294a;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(16,41,74,.1);
}
.neo-callout span { display:block; color:#71819a; font-size:8px; font-weight:700; }
.neo-callout-left { left: 24%; top: 20%; }
.neo-callout-right { right: 10px; top: 8px; border-top-right-radius: 14px; }
.neo-side-card .neo-action-list {
  display: grid;
  gap: 7px;
}
.neo-action-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 14px;
  gap: 6px;
  align-items: center;
  min-height: 31px;
  border: 0;
  border-radius: 8px;
  background: #f3f6fb;
  padding: 7px 8px;
  text-align: left;
}
.neo-action-list strong { font-size: 11px; color:#10294a; }
.neo-action-list span { grid-column: 1; color:#71819a; font-size:9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.neo-action-list i { grid-column: 2; grid-row: 1 / span 2; color:#9aa8bd; font-style: normal; }
.neo-metric-card {
  display: grid;
  align-content: center;
  text-align: center;
}
.neo-metric-card strong {
  color: #10294a;
  font-family: var(--font-display);
  font-size: clamp(34px, 4vw, 52px);
  line-height: .95;
}
.neo-metric-card strong small {
  margin-left: 2px;
  font-size: 16px;
  color: #10294a;
}
.neo-donut-card {
  display: grid;
  place-items: center;
}
.neo-donut {
  width: 116px;
  height: 116px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(#2f69b1 0 var(--score), #eb756e var(--score) calc(var(--score) + 58deg), #edf2f8 0);
}
.neo-donut > div {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 50%;
  background: #ffffff;
}
.neo-donut strong { color:#10294a; font-size:24px; line-height:1; }
.neo-donut span { color:#71819a; font-size:9px; }
.neo-spark-area {
  position: relative;
  height: 120px;
  border-radius: 10px;
  background:
    linear-gradient(#edf2f8 1px, transparent 1px),
    linear-gradient(90deg, #edf2f8 1px, transparent 1px),
    #ffffff;
  background-size: 20% 25%;
}
.neo-spark-area svg { width: 100%; height: 100%; }
.neo-spark-area polyline {
  fill: none;
  stroke: #2f69b1;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 10px 8px rgba(47,105,177,.18));
}
.neo-spark-area i {
  position: absolute;
  width: 9px;
  height: 9px;
  border: 2px solid #2f69b1;
  border-radius: 50%;
  background: #ffffff;
}
.neo-finance-rows,
.neo-keyword-rows {
  display: grid;
  gap: 8px;
}
.neo-finance-rows div,
.neo-keyword-rows button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 8px;
  align-items: center;
  border: 0;
  border-bottom: 1px solid #edf2f8;
  background: transparent;
  padding: 5px 0;
  text-align: left;
}
.neo-finance-rows span,
.neo-keyword-rows span { color:#71819a; font-size:10px; }
.neo-finance-rows strong,
.neo-keyword-rows strong { color:#10294a; font-size:11px; }
.neo-finance-rows i {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #edf2f8;
}
.neo-finance-rows i.is-hot { background:#eb756e; }
.neo-keyword-rows small { color:#b0bbca; font-size:9px; }
.neo-gauge-panel {
  height: 198px !important;
}
.neo-gauge-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  align-items: center;
}
.neo-mini-speed {
  position: relative;
  height: 118px;
  display: grid;
  place-items: center;
  align-content: end;
  border-radius: 12px;
  background: #f4f7fb;
  overflow: hidden;
}
.neo-mini-speed::before {
  content: "";
  position: absolute;
  bottom: 28px;
  width: 118px;
  height: 58px;
  border: 14px solid #d7e1f0;
  border-bottom: 0;
  border-radius: 80px 80px 0 0;
}
.neo-mini-speed i {
  position: absolute;
  bottom: 30px;
  width: 3px;
  height: 46px;
  border-radius: 4px;
  background: #10294a;
  transform-origin: 50% 100%;
  transform: rotate(var(--needle));
}
.neo-mini-speed strong { color:#10294a; font-size:22px; z-index:1; }
.neo-mini-speed span { color:#71819a; font-size:10px; z-index:1; }
.neo-center-readout {
  min-height: 118px;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 12px;
  background: #f6f8fc;
  text-align: center;
}
.neo-center-readout strong { color:#10294a; font-size:30px; }
.neo-center-readout span,
.neo-center-readout small { color:#71819a; font-size:10px; }
.neo-center-readout i {
  width: 86px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg,#2f69b1,#eb756e);
}
.neo-score-card {
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
}
.neo-score-card > strong {
  color: #10294a;
  font-size: 42px;
}
.neo-score-card div,
.neo-dark-card footer {
  display: flex;
  gap: 8px;
}
.neo-score-card button,
.neo-dark-card button {
  min-height: 30px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  background: #edf2f8;
  color: #71819a;
  font-weight: 800;
}
.neo-dark-card {
  display: grid;
  align-content: space-between;
  background: #173f7a !important;
  color: #ffffff;
}
.neo-dark-card span,
.neo-dark-card p { color: rgba(255,255,255,.7); }
.neo-dark-card strong { font-size: 44px; line-height: 1; }
.neo-dark-card button {
  color: #dbe8ff;
  background: rgba(255,255,255,.12);
}
.neo-bars {
  height: 138px;
  display: grid;
  grid-template-columns: repeat(12, 1fr) 150px;
  gap: 8px;
  align-items: end;
}
.neo-bars div {
  height: 118px;
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: end;
  gap: 5px;
}
.neo-bars div span {
  display: block;
  width: 8px;
  margin: 0 auto;
  border-radius: 999px;
  background: #2f69b1;
}
.neo-bars div:nth-child(3n) span { background:#edf2f8; }
.neo-bars small { color:#b0bbca; font-size:9px; text-align:center; }
.neo-bars article {
  align-self: stretch;
  display: grid;
  align-content: center;
  border-left: 1px solid #edf2f8;
  padding-left: 12px;
}
.neo-bars article strong { color:#10294a; font-size:20px; }
.neo-bars article p,
.neo-bars article li { color:#71819a; font-size:10px; }
.neo-bars article ul { margin: 4px 0 0; padding-left: 14px; }
.neo-table {
  max-height: 260px;
  overflow: hidden;
}
.neo-table table {
  width: 100%;
  border-collapse: collapse;
}
.neo-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #edf2f8;
  color: #71819a;
  font-size: 12px;
}
.neo-table td:nth-child(2),
.neo-table td:nth-child(3) {
  color: #10294a;
  font-weight: 800;
}
.neo-table td:last-child span {
  display: inline-flex;
  min-width: 54px;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e4f7ef;
  color: #238765;
  font-weight: 900;
}

@media (max-width: 1180px) {
  body[data-theme="neo"] .dashboard-template-grid[data-template-id="neoSearch"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .neo-bars { grid-template-columns: repeat(6, 1fr); }
  .neo-bars article { grid-column: 1 / -1; border-left: 0; border-top: 1px solid #edf2f8; padding: 10px 0 0; }
}

/* Image ID dashboard templates */
.dashboard-template-grid[data-template-id="softBlocks"],
.dashboard-template-grid[data-template-id="glassFlow"],
.dashboard-template-grid[data-template-id="aquaSales"] { align-items: stretch; }
.soft-widget, .glass-widget, .aqua-widget { overflow: hidden; }
.soft-kpi-strip > div { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); gap: 10px; }
.soft-kpi-strip article { min-height: 112px; display: grid; align-content: end; gap: 6px; padding: 14px; border-radius: 14px; background: color-mix(in srgb, var(--tone-color) 72%, #fff 28%); color: #fff; }
.soft-kpi-strip article strong { font-size: 24px; color: inherit; }
.soft-kpi-strip article small { color: color-mix(in srgb, #fff 82%, var(--tone-color) 18%); }
.soft-quick-list, .soft-people, .soft-bottom-grid { display: grid; gap: 9px; }
.soft-quick-list button, .soft-people article, .soft-bottom-grid article { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: #fff; }
.soft-quick-list button { display: grid; grid-template-columns: 26px 1fr; gap: 2px 8px; text-align: left; }
.soft-quick-list i { grid-row: span 2; width: 24px; height: 24px; border-radius: 50%; background: var(--tone-color); }
.soft-quick-list span, .soft-people span { color: var(--muted); font-size: 12px; }
.soft-ring { width: 148px; height: 148px; margin: 10px auto; display: grid; place-content: center; border-radius: 50%; text-align: center; background: conic-gradient(var(--tone-color) 0 var(--score), color-mix(in srgb, var(--tone-color) 12%, #fff 88%) var(--score) 360deg); position: relative; }
.soft-ring::after { content: ""; position: absolute; inset: 16px; border-radius: 50%; background: var(--surface-raised); }
.soft-ring strong, .soft-ring span { position: relative; z-index: 1; }
.soft-ring strong { font-size: 30px; }
.soft-ring span { color: var(--muted); font-size: 12px; }
.soft-donut-mix { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.soft-donut-mix span { min-height: 78px; display: grid; place-content: center; border-radius: 18px; background: color-mix(in srgb, var(--tone-color) var(--share), #fff); text-align: center; }
.soft-donut-mix b { font-size: 20px; }
.soft-donut-mix small { color: var(--muted); }
.soft-line-board { position: relative; min-height: 160px; border-radius: 14px; background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(255,255,255,.5)); }
.soft-line-board svg { position: absolute; inset: 12px; width: calc(100% - 24px); height: calc(100% - 52px); }
.soft-line-board polyline { fill: none; stroke: var(--chart-1); stroke-width: 3; vector-effect: non-scaling-stroke; }
.soft-line-board div { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; gap: 8px; }
.soft-line-board span { padding: 5px 9px; border-radius: 999px; background: var(--tone-color); color: #fff; font-size: 11px; font-weight: 800; }
.soft-bars, .glass-week-bars { height: 150px; display: flex; align-items: end; justify-content: center; gap: 10px; padding-top: 12px; }
.soft-bars i, .glass-week-bars span { flex: 0 1 18px; min-width: 10px; max-width: 26px; border-radius: 8px 8px 3px 3px; background: var(--tone-color); position: relative; }
.glass-week-bars { height: 118px; gap: 7px; padding-top: 4px; }
.glass-week-bars span { flex-basis: 13px; max-width: 16px; }
.soft-bars small { position: absolute; left: 50%; bottom: -18px; transform: translateX(-50%); color: var(--muted); font-style: normal; font-size: 10px; }
.soft-people article { display: grid; grid-template-columns: 32px 1fr; gap: 2px 8px; }
.soft-people i { grid-row: span 2; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--tone-color); color: #fff; font-style: normal; font-weight: 900; }
.soft-bottom-grid { grid-template-columns: repeat(3, 1fr); }
.soft-bottom-grid article { border-top: 4px solid var(--tone-color); }
.soft-bottom-grid strong { display: block; font-size: 28px; }
.dashboard-template-grid[data-template-id="glassFlow"] { background: linear-gradient(135deg, rgba(207,186,240,.35), rgba(144,219,244,.22)); padding: 12px; border-radius: 22px; }
.dashboard-template-grid[data-template-id="glassFlow"] .chart-card { border: 1px solid rgba(255,255,255,.66); background: rgba(255,255,255,.68); backdrop-filter: blur(18px); }
.glass-action-focus {
  min-height: 160px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}
.glass-action-focus article {
  min-height: 138px;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 4px;
  align-items: end;
  border: 1px solid rgba(255,255,255,.56);
  border-radius: 16px;
  background: rgba(255,255,255,.56);
  padding: 10px;
  text-align: center;
}
.glass-action-focus strong { font-size: 24px; }
.glass-action-focus span { color: var(--muted); font-size: 11px; font-weight: 850; }
.glass-action-focus i {
  width: 100%;
  display: block;
  border-radius: 999px 999px 6px 6px;
  background: var(--tone-color);
  opacity: .9;
}
.glass-number-card {
  min-height: 160px;
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
}
.glass-number-card strong { font-size: 28px; }
.glass-number-card span { color: var(--muted); }
.glass-calendar div { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-top: 10px; }
.glass-calendar span { padding: 5px 0; border-radius: 999px; text-align: center; font-size: 11px; }
.glass-calendar .is-hot { background: var(--chart-2); color: #fff; }
.glass-progress { display: grid; gap: 12px; }
.glass-progress article { display: grid; gap: 6px; }
.glass-progress article div { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.glass-progress strong { font-size: 13px; }
.glass-progress span { color: var(--muted); font-size: 12px; font-weight: 850; }
.glass-line footer { display: flex; gap: 8px; margin-top: 8px; }
.glass-line footer span { color: var(--tone-color); font-weight: 800; }
.glass-mini-areas { display: grid; grid-template-columns: 1fr; gap: 8px; }
.glass-compare-card { display: grid; gap: 12px; }
.glass-compare-card article { display: grid; gap: 6px; }
.glass-compare-card article span,
.glass-compare-card small { color: var(--muted); font-size: 12px; }
.glass-compare-card article strong { font-size: 18px; }
.glass-stage-donut {
  display: grid;
  place-items: center;
  min-height: 190px;
}
.glass-stage-orbit {
  position: relative;
  width: min(100%, 390px);
  height: 198px;
}
.glass-stage-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 132px;
  aspect-ratio: 1;
  display: grid;
  place-content: center;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}
.glass-stage-ring::after {
  content: "";
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  background: rgba(255,255,255,.82);
}
.glass-stage-ring strong,
.glass-stage-ring span {
  position: relative;
  z-index: 1;
}
.glass-stage-ring strong { font-size: 15px; }
.glass-stage-ring span { color: var(--muted); font-size: 11px; }
.glass-stage-label {
  position: absolute;
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  width: 124px;
  gap: 3px 6px;
  align-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.82);
  box-shadow: var(--shadow-xs);
  padding: 7px 9px;
  text-align: left;
}
.glass-stage-label i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--tone-color);
}
.glass-stage-label span {
  min-width: 0;
  overflow: hidden;
  font-weight: 850;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.glass-stage-label strong {
  color: var(--tone-color);
  font-size: 11px;
  text-align: right;
}
.glass-stage-label.label-1 { left: 0; top: 10px; }
.glass-stage-label.label-2 { right: 0; top: 12px; }
.glass-stage-label.label-3 { right: 0; top: 82px; }
.glass-stage-label.label-4 { right: 18px; bottom: 4px; }
.glass-stage-label.label-5 { left: 18px; bottom: 4px; }
.glass-stage-label.label-6 { left: 0; top: 82px; }
.dashboard-template-grid[data-template-id="aquaSales"] { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.dashboard-template-grid[data-template-id="aquaSales"] > .chart-card.compact { grid-column: span 2; }
.dashboard-template-grid[data-template-id="aquaSales"] > .chart-card.wide { grid-column: span 3; }
.dashboard-template-grid[data-template-id="aquaSales"] .chart-card { border-radius: 18px; background: #fff; }
.aqua-metric.is-dark { background: linear-gradient(135deg, #10294a, #236bbd); color: #fff; }
.aqua-metric header { display: flex; justify-content: space-between; }
.aqua-metric strong { display: block; margin-top: 18px; font-size: 30px; }
.aqua-metric p b { padding: 3px 8px; border-radius: 999px; background: var(--green-soft); color: var(--green); }
.aqua-pipeline-card header { align-items: start; }
.aqua-pipeline-card .eyebrow { color: rgba(255,255,255,.72); }
.aqua-pipeline-card strong { font-size: 25px; line-height: 1.05; }
.aqua-pipeline-card p,
.aqua-pipeline-card small { color: rgba(255,255,255,.76); }
.aqua-pipeline-card p b { background: rgba(255,255,255,.16); color: #fff; }
.aqua-growth { display: grid; gap: 12px; }
.aqua-growth div { display: flex; gap: 6px; }
.aqua-growth button { border: 0; border-radius: 999px; padding: 5px 10px; background: var(--blue-soft); }
.aqua-growth strong { font-size: 34px; }
.aqua-growth span { height: 36px; border-radius: 10px; background: var(--surface-muted); overflow: hidden; }
.aqua-growth i { display: block; height: 100%; background: linear-gradient(90deg, var(--chart-1), var(--chart-2)); }
.aqua-volume {
  display: grid;
  place-items: center;
  gap: 12px;
  text-align: center;
}
.aqua-volume-ring {
  width: 126px;
  aspect-ratio: 1;
  display: grid !important;
  place-content: center;
  border-radius: 50%;
  background: conic-gradient(var(--chart-1) 0 var(--score), color-mix(in srgb, var(--chart-1) 14%, #fff 86%) var(--score) 360deg);
  position: relative;
}
.aqua-volume-ring::after {
  content: "";
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  background: #fff;
}
.aqua-volume-ring strong,
.aqua-volume-ring span {
  position: relative;
  z-index: 1;
}
.aqua-volume-ring strong { font-size: 34px; }
.aqua-volume-ring span { color: var(--muted); font-size: 12px; }
.aqua-volume section {
  width: 100%;
  display: grid;
  gap: 8px;
}
.aqua-volume article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  gap: 4px 8px;
  align-items: center;
  text-align: left;
}
.aqua-volume article span { color: var(--muted); font-size: 12px; }
.aqua-volume article strong { font-size: 13px; text-align: right; }
.aqua-volume article i {
  grid-column: 1 / -1;
  height: 7px;
  border-radius: 999px;
  background: rgba(15,23,42,.08);
  overflow: hidden;
}
.aqua-volume article b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--tone-color);
}
.aqua-volume small { display: block; color: var(--muted); font-size: 12px; }
.aqua-stats { display: grid; grid-template-columns: 130px 1fr; gap: 18px; align-items: end; min-height: 180px; }
.aqua-stats aside strong { font-size: 34px; }
.aqua-stats > div { height: 150px; display: flex; align-items: end; gap: 10px; }
.aqua-stats article { flex: 1; display: grid; align-items: end; gap: 8px; text-align: center; height: 100%; }
.aqua-stats b { display: block; border-radius: 12px 12px 4px 4px; background: var(--tone-color); }
.aqua-country { display: grid; gap: 10px; }
.aqua-country article,
.aqua-country button { display: grid; grid-template-columns: 28px minmax(0, 1fr) 90px; gap: 10px; align-items: center; padding: 9px; border: 0; border-radius: 999px; background: color-mix(in srgb, var(--tone-color) 18%, #fff 82%); text-align: left; }
.aqua-country i { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--tone-color); color: #fff; font-style: normal; font-weight: 900; }
.aqua-country span { color: var(--muted); font-size: 12px; }
.aqua-country em { grid-column: auto; }

/* Dashboard bar policy: menos "pill", mais SaaS/BI corporativo. */
.dashboard-workspace .bar-track,
.dashboard-workspace .bar-track span,
.dashboard-workspace .funnel-bar,
.dashboard-workspace .funnel-bar span,
.dashboard-workspace .lollipop-chart i,
.dashboard-workspace .lollipop-chart b,
.dashboard-workspace .stage-flow i,
.dashboard-workspace .aging-chart div span,
.dashboard-workspace .waterfall-item span,
.dashboard-workspace .soft-bars i,
.dashboard-workspace .glass-week-bars span,
.dashboard-workspace .aqua-stats b,
.dashboard-workspace .billing-status-flow i,
.dashboard-workspace .billing-status-flow b,
.dashboard-workspace .forecast-vivo-track,
.dashboard-workspace .forecast-vivo-track span {
  border-radius: 6px;
}

/* Dashboard Studio */
.studio-shell {
  display: grid;
  gap: 14px;
}
.studio-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
  gap: 18px;
  align-items: stretch;
  padding: 22px;
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 18px;
  background:
    radial-gradient(circle at 88% 8%, color-mix(in srgb, var(--chart-1) 34%, transparent), transparent 30%),
    radial-gradient(circle at 6% 92%, color-mix(in srgb, var(--chart-2) 18%, transparent), transparent 34%),
    linear-gradient(135deg, #10161b 0%, #142421 58%, #0f171d 100%);
  color: #fff;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.studio-hero::after {
  content: "";
  position: absolute;
  right: 24px;
  top: 22px;
  width: 104px;
  height: 104px;
  border: 18px solid color-mix(in srgb, var(--chart-1) 72%, #fff 28%);
  border-left-color: color-mix(in srgb, var(--chart-2) 78%, #fff 22%);
  border-radius: 28px;
  opacity: .92;
  pointer-events: none;
}
.studio-hero > * {
  position: relative;
  z-index: 1;
}
.studio-hero p { max-width: 760px; color: rgba(255,255,255,.74); }
.studio-hero h2 {
  margin: 8px 0;
  max-width: 820px;
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 48px);
  line-height: .98;
}
.studio-hero .eyebrow { color: rgba(255,255,255,.68); }
.studio-hero-metric {
  display: grid;
  align-content: end;
  gap: 8px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 14px;
  background: rgba(255,255,255,.1);
  padding: 16px;
  backdrop-filter: blur(18px);
}
.studio-hero-metric span,
.studio-hero-metric small { color: rgba(255,255,255,.72); }
.studio-hero-metric strong {
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1;
}
.studio-toolbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr)) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: rgba(255,255,255,.78);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(14px);
}
.studio-toolbar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}
.studio-toolbar select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 8px 10px;
}
.studio-library {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 260px) auto auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface-raised) 88%, transparent);
  box-shadow: var(--shadow-xs);
}
.studio-library div {
  display: grid;
  gap: 3px;
}
.studio-library strong { font-size: 15px; }
.studio-library small { color: var(--muted); }
.studio-library label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}
.studio-library select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 8px 10px;
}
.studio-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 8px;
  grid-auto-flow: dense;
  gap: 12px;
  align-items: stretch;
}
.studio-card {
  height: 100%;
  min-height: 260px;
  display: grid;
  gap: 14px;
  align-content: start;
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  background: rgba(255,255,255,.86);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.studio-widget { container-type:inline-size; }
.studio-card header {
  display: flex;
  gap: 10px;
  align-items: start;
  padding-right: 96px;
}
.studio-card header > span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 11px;
  font-weight: 950;
}
.studio-card header strong { display: block; }
.studio-card header small { color: var(--muted); }
.studio-widget.is-compact-widget > header {
  display: grid;
  justify-items: center;
  gap: 3px;
  min-height: 54px;
  padding: 2px 46px 0;
  text-align: center;
}
.studio-widget.is-compact-widget > header > span { display: none; }
.studio-widget.is-compact-widget > header > div { min-width: 0; }
.studio-widget.is-compact-widget > header strong { line-height: 1.15; }
.studio-widget.is-compact-widget > header small { display: block; margin-top: 4px; font-size: 11px; line-height: 1.25; }
.studio-widget.is-compact-widget .studio-bold-number { min-height: 150px; }
.studio-widget.is-compact-widget .studio-ai-lane { align-content: start; }
.studio-widget.is-compact-widget .dashboard-speedometer { min-height: 0; }
.studio-widget.is-compact-widget .speedometer { margin-top: 2px; }
.studio-widget-grid > .studio-widget,
.studio-widget-grid > .studio-widget.wide,
.studio-widget-grid > .studio-widget.full { grid-column:span var(--widget-span,1) !important; }
.studio-widget-grid > .studio-widget.is-compact-widget[data-widget-min-columns="3"] { grid-column:span 1 !important; }
.studio-card-hero { min-height: 300px; }
.studio-bold-number {
  display: grid;
  place-content: center;
  min-height: 190px;
  gap: 10px;
  text-align: center;
}
.studio-bold-number span,
.studio-bold-number small { color: var(--muted); }
.studio-bold-number span { font-size: 12px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.studio-bold-number strong {
  font-size: clamp(34px, 4vw, 62px);
  line-height: .92;
  letter-spacing: -0.05em;
}
.studio-card-triad { min-height: 340px; }
.studio-triad { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; min-height:240px; }
.studio-triad > section { display:grid; align-content:start; justify-items:center; gap:10px; min-width:0; padding:4px 10px; text-align:center; }
.studio-triad > section + section { border-left:1px solid var(--line); }
.studio-triad > section > span { color:var(--muted); font-size:11px; font-weight:850; letter-spacing:.06em; text-transform:uppercase; }
.studio-triad-visual { position:relative; width:118px; height:118px; display:grid; place-items:center; }
.studio-triad-ring { position:absolute; inset:0; display:block; border-radius:50%; background:conic-gradient(var(--ring)); }
.studio-triad-ring.is-segmented { -webkit-mask:radial-gradient(circle,transparent 0 48%,#000 49% 69%,transparent 70%),repeating-conic-gradient(#000 0 7deg,transparent 7deg 10deg); -webkit-mask-composite:source-in; mask:radial-gradient(circle,transparent 0 48%,#000 49% 69%,transparent 70%),repeating-conic-gradient(#000 0 7deg,transparent 7deg 10deg); mask-composite:intersect; }
.studio-triad-visual > strong { position:relative; z-index:1; display:grid; font-size:22px; line-height:1; }
.studio-triad-visual > strong small { margin-top:4px; color:var(--muted); font-size:9px; font-weight:700; }
.studio-triad-legend { width:100%; display:grid; gap:5px; }
.studio-triad-legend button { display:grid; grid-template-columns:8px minmax(0,1fr) auto; gap:6px; align-items:center; min-width:0; padding:3px 0; border:0; background:transparent; color:var(--ink); text-align:left; }
.studio-triad-legend button i { width:8px; height:8px; border-radius:2px; background:var(--tone-color); }
.studio-triad-legend button span { overflow:hidden; color:var(--muted); font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
.studio-triad-legend button strong { font-size:10px; }
.studio-triad-stages { width:100%; display:grid; gap:14px; align-self:center; }
.studio-triad-stages button { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:5px 8px; padding:0; border:0; background:transparent; color:var(--ink); text-align:left; }
.studio-triad-stages button i { grid-column:1 / -1; height:7px; display:block; border-radius:2px; background:var(--surface-soft); overflow:hidden; }
.studio-triad-stages button b { width:var(--share); height:100%; display:block; border-radius:2px; background:var(--tone-color); }
.studio-triad-stages button span { color:var(--muted); font-size:10px; }
.studio-triad-stages button strong { font-size:10px; }
.studio-triad-score { --score:0%; width:118px; height:118px; display:grid; place-content:center; border-radius:50%; background:radial-gradient(circle at center,var(--surface-raised) 0 57%,transparent 58%),conic-gradient(var(--chart-1) var(--score),var(--surface-soft) 0); }
.studio-triad-score strong { font-size:24px; }
.studio-triad-score small { color:var(--muted); font-size:9px; }
.studio-triad > section p { margin:0; color:var(--muted); font-size:11px; line-height:1.35; }
@container (max-width: 420px) {
  .studio-widget.is-compact-widget .speedometer { width:calc(100% / .78); transform:scale(.78); transform-origin:top center; margin-bottom:-34px; }
  .studio-widget.is-compact-widget .speedometer-value strong { font-size:25px; }
  .studio-widget.is-compact-widget .speedometer-scale { margin-top:4px; }
  .studio-widget.is-compact-widget .top-accounts-orbit { transform:scale(.86); transform-origin:center; margin:-12px auto; }
  .studio-widget.is-compact-widget .risk-priority-story { grid-template-columns:1fr; }
  .studio-widget.is-compact-widget .risk-priority-score { width:92px; height:92px; margin:auto; }
  .studio-widget.is-compact-widget .risk-priority-story article { min-height:0; padding:9px; }
  .studio-widget.is-compact-widget .donut-click-list button { padding:7px 0; }
  .studio-widget.is-compact-widget .funnel-chart { gap:6px; }
  .studio-widget.is-compact-widget .funnel-chart button { min-height:34px; }
  .studio-bold-number strong { font-size:clamp(30px,14cqi,48px); }
  .studio-ai-lane article { padding:8px; }
  .studio-ai-lane p { font-size:12px; }
  .donut-click-list { gap:6px; }
}
@container (max-width: 700px) {
  .studio-triad { grid-template-columns:1fr; }
  .studio-triad > section + section { padding-top:14px; border-top:1px solid var(--line); border-left:0; }
}
.studio-momentum {
  height: 250px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}
.studio-momentum section {
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 10px;
}
.studio-momentum section div {
  display: grid;
  gap: 3px;
}
.studio-momentum span,
.studio-momentum p { color: var(--muted); font-size: 12px; }
.studio-momentum strong { font-size: 15px; }
.studio-momentum i {
  display: flex;
  align-items: end;
  border-radius: 8px;
  background: color-mix(in srgb, var(--tone-color) 10%, #fff 90%);
  overflow: hidden;
}
.studio-momentum b {
  width: 100%;
  display: block;
  border-radius: 6px 6px 0 0;
  background: var(--tone-color);
}
.studio-momentum p { grid-column: 1 / -1; margin: 0; }
.studio-constellation {
  min-height: 220px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
}
.studio-constellation button {
  width: var(--size);
  min-width: 76px;
  aspect-ratio: 1;
  display: grid;
  place-content: center;
  gap: 4px;
  border: 1px solid color-mix(in srgb, var(--tone-color) 38%, #fff 62%);
  border-radius: 18px;
  background: color-mix(in srgb, var(--tone-color) 18%, #fff 82%);
  color: var(--ink);
  text-align: center;
}
.studio-constellation strong {
  font-size: 12px;
  line-height: 1.1;
}
.studio-constellation span,
.studio-constellation small {
  color: var(--muted);
  font-size: 10px;
}
.studio-ai-lane {
  display: grid;
  gap: 10px;
}
.studio-ai-lane article {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 10px;
}
.studio-ai-lane i {
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 3px;
  background: var(--tone-color);
}
.studio-ai-lane p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}
.studio-ai-lane button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
  color: var(--ink);
  font-weight: 850;
}
.studio-shell.density-focus .studio-card-ai { display: grid; }
.studio-shell.layout-briefing .studio-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@container (max-width: 380px) {
  .studio-momentum { height:230px; gap:6px; }
  .studio-momentum section { gap:6px; }
  .studio-momentum section div { justify-items:center; text-align:center; }
  .studio-momentum span,
  .studio-momentum p { font-size:10px; line-height:1.25; }
  .studio-momentum strong { font-size:12px; }
  .studio-momentum i { border-radius:5px; }
  .studio-constellation { gap:6px; align-content:center; }
  .studio-constellation button { width:min(var(--size),86px); min-width:64px; border-radius:14px; }
  .executive-performance-cards { grid-template-columns:1fr; gap:7px; }
  .executive-performance-cards button { min-height:74px; gap:6px; }
  .executive-performance-cards footer span:nth-child(2) { display:none; }
  .heatmap { grid-template-columns:repeat(4,minmax(0,1fr)); gap:6px; }
  .heatmap button { min-height:58px; padding:7px; }
  .funnel-chart { gap:7px; }
}

@media (max-width: 1180px) {
  .studio-hero,
  .studio-toolbar,
  .studio-grid,
  .studio-shell.layout-briefing .studio-grid {
    grid-template-columns: 1fr;
  }
  .studio-card,
  .studio-card-hero,
  .studio-card-health,
  .studio-card-risk,
  .studio-card-pipeline,
  .studio-card-ai,
  .studio-widget-grid > .studio-widget,
  .studio-widget-grid > .studio-widget.wide,
  .studio-widget-grid > .studio-widget.full,
  .studio-shell.density-focus .studio-card-hero,
  .studio-shell.density-focus .studio-card-health,
  .studio-shell.layout-briefing .studio-card,
  .studio-shell.layout-briefing .studio-card-hero {
    grid-column: auto;
  }
  .studio-library {
    grid-template-columns: 1fr;
  }
  .studio-widget-grid > .studio-widget,
  .studio-widget-grid > .studio-widget.wide,
  .studio-widget-grid > .studio-widget.full { grid-column:1 / -1 !important; }
  .studio-triad { grid-template-columns:1fr; }
}
