﻿:root {
  --page: #f7f8f4;
  --paper: #ffffff;
  --paper-soft: #f0f3ec;
  --ink: #000000;
  --ink-2: #242424;
  --muted: #6f746d;
  --line: #dfe5db;
  --green: #279f00;
  --green-dark: #1f7f00;
  --mint: #dff2d6;
  --purple: #51284f;
  --purple-soft: #f1e8f0;
  --navy: #000000;
  --blue: #2b7bbb;
  --orange: #f3a600;
  --red: #d71920;
  --shadow: 0 18px 44px rgba(0, 0, 0, .08);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --page: #0d120e;
  --paper: #141a15;
  --paper-soft: #1d251d;
  --ink: #f4f8f0;
  --ink-2: #dce7d6;
  --muted: #9fa99b;
  --line: #2d392c;
  --green: #4cc21f;
  --green-dark: #79e94d;
  --mint: #20361d;
  --purple: #a75ba3;
  --purple-soft: #2a1f2b;
  --navy: #ffffff;
  --blue: #70b7ff;
  --orange: #ffc04d;
  --red: #ff5d68;
  --shadow: 0 18px 44px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }
html { overflow-x: hidden; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Roboto, Inter, Arial, sans-serif;
  font-size: 14px;
  background: var(--page);
  overflow-x: hidden;
}
body.auth-locked { overflow: hidden; }
body.auth-locked .sidebar,
body.auth-locked main { filter: blur(5px); pointer-events: none; user-select: none; }
.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 20%, rgba(39, 159, 0, .16), transparent 28%),
    radial-gradient(circle at 86% 18%, rgba(81, 40, 79, .18), transparent 30%),
    var(--page);
}
body.auth-locked .auth-screen { display: grid; }
.auth-card {
  width: min(460px, 100%);
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .14);
}
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.auth-brand img { width: 150px; height: 34px; object-fit: contain; object-position: left center; }
.auth-brand span { padding-left: 12px; border-left: 4px solid var(--green); color: var(--ink); font-weight: 900; }
.auth-card h1 { margin-top: 8px; font-size: 34px; }
.auth-note { margin: 12px 0 22px; color: var(--muted); line-height: 1.55; }
.auth-form { display: none; gap: 12px; }
.auth-form.active { display: grid; }
.auth-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}
.auth-form input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f9faf7;
  padding: 0 14px;
  color: var(--ink);
  font: 700 13px Roboto, Inter, sans-serif;
  outline: 0;
}
.auth-switch { display: flex; gap: 16px; margin-top: 18px; }
.auth-switch .text-btn { color: var(--muted); }
.auth-switch .text-btn.active { color: var(--green-dark); }
.auth-status { min-height: 18px; margin-top: 14px; color: var(--red); font-size: 11px; font-weight: 800; }
button, input, select, textarea { max-width: 100%; }
img, svg { max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 42px; font-weight: 900; line-height: 1.06; color: var(--ink); letter-spacing: -1.6px; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 260px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  padding: 22px 18px 20px;
  background: #fff;
  border-right: 1px solid var(--line);
  box-shadow: inset 6px 0 0 var(--purple);
  transition: width .18s ease, padding .18s ease;
}
.sidebar-toggle {
  position: absolute;
  top: 14px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font-weight: 900;
}
.brand { display: grid; gap: 8px; padding: 0 8px 28px; position: relative; }
.brand::after {
  content: "";
  width: 42px;
  height: 5px;
  border-radius: 12px;
  background: var(--green);
}
.brand-logo { width: 172px; min-height: 38px; object-fit: contain; object-position: left center; }
.brand-fallback { font-weight: 900; color: var(--ink); font-size: 18px; letter-spacing: -.3px; }
.brand-fallback b { color: var(--green); }
.main-nav { display: flex; flex-direction: column; gap: 8px; overflow: auto; padding-right: 3px; }
.main-nav::-webkit-scrollbar { width: 4px; }
.main-nav::-webkit-scrollbar-thumb { background: #d7e3d8; border-radius: 999px; }
.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 16px;
  padding: 13px 14px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: 700 13px Roboto, Inter, sans-serif;
  text-align: left;
}
.nav-item span {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--purple-soft);
  color: var(--purple);
  font-size: 10px;
  font-weight: 900;
}
.nav-item em { flex: 1; font-style: normal; }
.nav-item i {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f2f4f8;
  color: var(--ink);
  font-style: normal;
  font-size: 10px;
}
.nav-item:hover, .nav-item.active { background: var(--purple-soft); color: var(--ink); }
.nav-item:hover span, .nav-item.active span { background: var(--green); color: #fff; }
.sidebar-bottom { margin-top: auto; }
.safe-note {
  padding: 14px;
  border-radius: 20px;
  background: #f6f7f9;
  border: 1px solid var(--line);
  margin-bottom: 12px;
}
.safe-note b { display: block; color: var(--ink); font-size: 12px; }
.safe-note span { display: block; color: var(--muted); font-size: 10px; line-height: 1.5; margin-top: 4px; }
.profile {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 11px;
  background: var(--paper);
  color: var(--ink);
  text-align: left;
}
.profile span:nth-child(2) { flex: 1; min-width: 0; }
.profile strong, .profile small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile strong { font-size: 11px; }
.profile small { color: var(--muted); font-size: 9px; margin-top: 3px; }
.avatar {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  background: var(--mint);
  color: var(--green-dark);
  font-size: 10px;
  font-weight: 900;
}

body.sidebar-collapsed .sidebar {
  width: 88px;
  padding: 58px 12px 16px;
}
body.sidebar-collapsed .sidebar-toggle { left: 50%; right: auto; transform: translateX(-50%); }
body.sidebar-collapsed .brand { padding: 0 0 20px; place-items: center; }
body.sidebar-collapsed .brand::after { width: 28px; }
body.sidebar-collapsed .brand-logo { width: 44px; min-height: 34px; object-fit: cover; object-position: left center; }
body.sidebar-collapsed .brand-fallback,
body.sidebar-collapsed .nav-item em,
body.sidebar-collapsed .nav-item i,
body.sidebar-collapsed .safe-note,
body.sidebar-collapsed .profile span:nth-child(2) { display: none; }
body.sidebar-collapsed .nav-item { justify-content: center; padding: 11px 0; }
body.sidebar-collapsed .nav-item span { flex: none; }
body.sidebar-collapsed .profile { justify-content: center; padding: 10px 0; }

main { margin-left: 260px; min-height: 100vh; width: calc(100% - 260px); padding: 0 clamp(18px, 2.4vw, 32px) 56px; overflow-x: clip; transition: margin-left .18s ease, width .18s ease; }
body.sidebar-collapsed main { margin-left: 88px; width: calc(100% - 88px); }
.site-strip {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--ink-2);
  font-weight: 500;
  font-size: 12px;
}
.site-strip span:first-child { color: var(--ink); }
.strip-cta {
  margin-left: auto;
  height: 34px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  font: 700 12px Roboto, Inter, sans-serif;
}
.strip-cta:hover, .primary-btn:hover { background: var(--green-dark); border-color: var(--green-dark); }
header {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 32px;
}
body.pipeline-workspace .site-strip { height: 36px; }
body.pipeline-workspace header { min-height: 74px; margin-bottom: 22px; }
.eyebrow {
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.header-actions { display: flex; align-items: center; gap: 10px; min-width: 0; }
.theme-toggle {
  height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 13px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  font: 800 12px Roboto, Inter, sans-serif;
}
.theme-toggle i {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--green));
  box-shadow: inset -4px -4px 0 rgba(255,255,255,.55);
}
.theme-toggle[aria-pressed="true"] i { box-shadow: inset 4px 4px 0 rgba(0,0,0,.55); }
.notification-wrap { position: relative; flex: none; }
.notification-toggle {
  height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  font: 800 12px Roboto, Inter, sans-serif;
}
.notification-toggle.has-unread {
  border-color: rgba(215, 25, 32, .26);
  background: #fff8f8;
}
.notification-dot {
  min-width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--mint);
  color: var(--green-dark);
  font-size: 10px;
  font-weight: 900;
}
.notification-toggle.has-unread .notification-dot { background: #fff0f2; color: var(--red); }
.notification-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 40;
  width: min(420px, calc(100vw - 32px));
  display: none;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 0 22px 54px rgba(20, 30, 20, .16);
}
.notification-popover.open { display: block; }
.notification-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.notification-head b { display: block; color: var(--navy); font-size: 15px; }
.notification-head span { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.notification-list {
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
  padding: 10px 2px;
}
.notification-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.notification-item.unread { border-left: 4px solid var(--green); }
.notification-item.critical.unread { border-left-color: var(--red); }
.notification-item.warning.unread { border-left-color: var(--orange); }
.notification-line {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
}
.notification-line span,
.notification-line small {
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
}
.notification-line span { background: var(--mint); color: var(--green-dark); }
.notification-item.critical .notification-line span { background: #fff0f2; color: var(--red); }
.notification-item.warning .notification-line span { background: #fff6e6; color: #9a6600; }
.notification-line small { background: var(--paper-soft); color: var(--muted); }
.notification-item b { display: block; color: var(--navy); font-size: 12px; }
.notification-item p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}
.notification-item time { display: block; margin-top: 7px; color: var(--muted); font-size: 9px; }
.notification-actions { display: grid; gap: 6px; justify-items: end; align-content: center; }
.notification-actions .mini-action { margin: 0; }
.notification-sync { width: 100%; }
.search {
  width: 330px;
  height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 15px;
  background: var(--paper);
  color: var(--muted);
}
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: 500 12px Roboto, Inter, sans-serif; }
.search kbd { color: var(--muted); font-size: 9px; }
.primary-btn, .period-btn, .ghost-btn, .filters button, .action-wide, .text-btn {
  border-radius: 8px;
  cursor: pointer;
  font-family: Roboto, Inter, sans-serif;
  font-weight: 700;
}
.primary-btn {
  height: 48px;
  border: 2px solid var(--green);
  padding: 0 20px;
  background: var(--green);
  color: #fff;
  box-shadow: none;
}
.period-btn, .ghost-btn, .filters button {
  height: 40px;
  border: 0;
  padding: 0 15px;
  background: var(--paper-soft);
  color: var(--ink);
}
.text-btn { border: 0; background: transparent; color: var(--green-dark); padding: 0; }

.page { display: none; }
.page.active { display: block; }
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 54px;
  padding: 13px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .045);
  margin-bottom: 18px;
  overflow: hidden;
}
.hero-slogan {
  position: relative;
  max-width: 760px;
  margin: 0;
  padding-left: 15px;
  color: #5d635b;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.45;
}
.hero-slogan::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 4px;
  border-radius: 8px;
  background: var(--green);
}
.safe-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}
.safe-stats article, .metric-card, .panel, .attention-card, .client-card, .dc-card, .task-column, .module-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
}
.safe-stats article { padding: 24px; }
.safe-stats article { position: relative; overflow: hidden; }
.safe-stats article::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--green); }
.safe-stats article:nth-child(even)::before { background: var(--purple); }
.safe-stats b { display: block; color: var(--ink); font-size: 34px; font-weight: 900; letter-spacing: -1px; }
.safe-stats span { display: block; color: var(--green); font-weight: 900; margin-top: 4px; }
.safe-stats small { display: block; color: var(--muted); margin-top: 6px; line-height: 1.4; }

.section-head { display: flex; justify-content: space-between; align-items: center; margin: 0 0 18px; }
.section-head > div { min-width: 0; }
.section-head h2 { color: var(--ink); font-size: 32px; font-weight: 900; line-height: 1.08; letter-spacing: -1px; }
.section-head p, .panel-head p { margin-top: 5px; color: var(--muted); font-size: 12px; }
.section-head.duplicate-title { margin-top: -10px; }
.section-head.duplicate-title h2 { display: none; }
.section-head.duplicate-title p { margin-top: 0; max-width: 720px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px; }
.metric-card { min-height: 156px; padding: 20px; }
.metric-card.accent { background: #fff; border-color: var(--green); }
.metric-top { display: flex; justify-content: space-between; align-items: center; }
.metric-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--mint);
  color: var(--green-dark);
  font-weight: 900;
}
.metric-icon.warn { background: #fff2df; color: var(--orange); }
.metric-icon.blue { background: #e8f1fb; color: var(--blue); }
.tag { padding: 5px 9px; border-radius: 8px; background: var(--mint); color: var(--green-dark); font-size: 8px; text-transform: uppercase; }
.tag.danger { background: #fff0f2; color: var(--red); }
.metric-card > p { margin-top: 15px; color: var(--muted); font-size: 11px; }
.metric-card h3 { color: var(--ink); font-size: 28px; font-weight: 900; margin: 4px 0; }
.metric-card small { color: var(--muted); }
.progress { height: 5px; margin-top: 14px; overflow: hidden; border-radius: 58px; background: #f2f4f8; }
.progress i { display: block; height: 100%; background: var(--green); border-radius: inherit; }
.blue-progress i { background: var(--blue); }
.spark { height: 22px; display: flex; align-items: end; gap: 4px; margin-top: 9px; }
.spark i { width: 10%; border-radius: 5px 5px 0 0; background: var(--green); opacity: .7; }
.spark i:nth-child(1){height:24%}.spark i:nth-child(2){height:42%}.spark i:nth-child(3){height:36%}.spark i:nth-child(4){height:64%}.spark i:nth-child(5){height:48%}.spark i:nth-child(6){height:76%}.spark i:nth-child(7){height:92%}
.orange-spark i { background: var(--orange); }

.dashboard-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 28px; }
.panel { padding: 24px; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; }
.panel-head h3 { color: var(--ink); font-size: 18px; font-weight: 600; }
.legend { display: flex; gap: 7px; align-items: center; color: var(--muted); font-size: 9px; }
.legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.legend i:nth-child(2) { background: var(--navy); }
.chart { height: 205px; display: flex; margin-top: 22px; }
.chart-labels { width: 42px; display: flex; flex-direction: column; justify-content: space-between; padding-bottom: 18px; color: var(--muted); font-size: 9px; }
.chart-area { position: relative; flex: 1; }
.grid-line { height: 25%; border-top: 1px dashed var(--line); }
.chart-area svg { position: absolute; inset: 0 0 18px; width: 100%; height: calc(100% - 18px); }
.plan-line, .fact-line { fill: none; stroke-width: 2; }
.plan-line { stroke: var(--purple); stroke-dasharray: 5; }
.fact-line { stroke: var(--green-dark); }
.area-fill { fill: rgba(94,188,0,.12); }
.chart-months { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; color: var(--muted); font-size: 9px; }
.action-wide {
  width: 100%;
  min-height: 42px;
  margin-top: 10px;
  border: 0;
  padding: 10px 14px;
  background: #f2f4f8;
  color: var(--ink);
  text-align: left;
}
.action-wide:hover { background: #e9f8dc; color: var(--green-dark); }

.attention-list, .client-grid, .dc-grid, .task-board, .module-grid {
  display: grid;
  gap: 14px;
}
.attention-list { grid-template-columns: repeat(3, 1fr); }
.client-grid, .dc-grid, .module-grid { grid-template-columns: repeat(3, 1fr); }
.task-board { grid-template-columns: repeat(3, 1fr); }
.attention-card, .client-card, .dc-card, .task-column, .module-card { padding: 18px; }
.attention-card:hover, .client-card:hover, .deal-card:hover { transform: translateY(-2px); border-color: var(--green); }
.topline, .deal-card .topline { display: flex; justify-content: space-between; align-items: center; }
.service, .module-pill, .status-online {
  display: inline-block;
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--mint);
  color: var(--green-dark);
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
}
.service.cloud { background: #e8f1fb; color: var(--blue); }
.service.network { background: #fff2df; color: var(--orange); }
.risk { color: var(--red); font-size: 9px; font-weight: 900; }
.attention-card h3, .client-card h3, .dc-card h3, .module-card h3 { color: var(--navy); font-size: 15px; margin-top: 12px; }
.attention-card p, .client-card p, .dc-card p { color: var(--muted); font-size: 10px; margin-top: 6px; }
.money-row { display: flex; justify-content: space-between; align-items: end; margin-top: 13px; padding-top: 11px; border-top: 1px solid var(--line); }
.money-row strong { color: var(--navy); font-size: 14px; }
.money-row small { display: block; color: var(--muted); font-size: 8px; }

.pipeline-head { align-items: end; margin-bottom: 10px; }
.filters { display: flex; gap: 7px; }
.filters button.active { background: var(--green); border-color: var(--green); color: #fff; }
.pipeline-toolbar {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 24px rgba(33, 58, 44, .06);
}
.pipeline-search {
  flex: 1 1 320px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
}
.pipeline-filter-group {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  gap: 5px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #f8faf5;
}
.pipeline-filter-group button,
.attention-filter {
  height: 32px;
  border: 0;
  border-radius: 10px;
  padding: 0 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: 800 10px Roboto, Inter, sans-serif;
}
.pipeline-filter-group button.active,
.attention-filter.active {
  background: var(--green);
  color: #fff;
}
.attention-filter-group button:not(.active) { background: #fff; }
.pipeline-search input, #pipeline-owner-filter {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  outline: 0;
  font: 700 11px Roboto, Inter, sans-serif;
}
#pipeline-owner-filter {
  width: 190px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
#pipeline-board-total { margin-left: auto; color: var(--navy); font-size: 12px; white-space: nowrap; }
.kanban { display: flex; align-items: flex-start; gap: 10px; overflow-x: auto; overscroll-behavior-x: contain; padding: 4px 0 14px; }
.kanban-column { flex: 0 0 255px; min-width: 0; display: flex; flex-direction: column; gap: 10px; min-height: 640px; padding: 12px 9px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: 0 12px 28px rgba(33, 58, 44, .055); }
.kanban-column::before { content: ""; display: block; height: 3px; margin: -12px -9px 8px; border-radius: 18px 18px 0 0; background: #dce6d8; }
.kanban-column.stage-2::before,
.kanban-column.stage-6::before,
.kanban-column.stage-7::before { background: rgba(39, 159, 0, .55); }
.column-head {
  position: static;
  z-index: auto;
  padding: 4px 5px 11px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.column-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  align-items: start;
  padding-bottom: 9px;
}
.column-title h3 { min-height: 2.2em; overflow-wrap: anywhere; color: var(--navy); font-size: 14px; line-height: 1.1; text-transform: uppercase; letter-spacing: .45px; font-weight: 900; }
.column-title span { color: var(--muted); font-size: 10px; font-weight: 800; white-space: nowrap; }
.column-add { width: 100%; padding: 8px 9px; border: 1px dashed var(--line); border-radius: 11px; background: var(--paper-soft); color: var(--muted); cursor: pointer; font: 800 10px Roboto, Inter, sans-serif; }
.column-add:hover { border-color: var(--green); color: var(--green-dark); background: var(--mint); }
.deal-card { position: relative; margin-bottom: 0; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); cursor: pointer; transition: .16s; box-shadow: 0 8px 18px rgba(18, 22, 25, .045); }
.deal-card:hover { transform: translateY(-2px); border-color: rgba(39, 159, 0, .35); box-shadow: 0 10px 22px rgba(18, 22, 25, .07); }
.deal-card::after { content: ""; display: none; position: absolute; top: 15px; right: 12px; width: 7px; height: 7px; border-radius: 999px; }
.deal-card.overdue::after { display: block; background: var(--red); box-shadow: 0 0 0 4px #fff1f3; }
.deal-card.today::after { display: block; background: var(--orange); box-shadow: 0 0 0 4px #fff8e7; }
.deal-card.no-task::after { display: block; background: #c8b27a; box-shadow: 0 0 0 4px #f7f5eb; }
.deal-card-main { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: start; }
.deal-identity { min-width: 0; }
.deal-contact { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 9px; font-weight: 800; }
.deal-card h3 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 5px 0 0; color: var(--navy); font-size: 15px; line-height: 1.15; }
.deal-date { flex: none; margin-right: 15px; padding: 3px 6px; border-radius: 999px; background: #f4f6f1; color: var(--muted); font-size: 8px; font-weight: 900; white-space: nowrap; }
.deal-amount { display: block; margin-top: 10px; color: var(--navy); font-size: 18px; line-height: 1; }
.deal-service { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 8px; color: #1665a9; font-size: 11px; font-weight: 900; }
.deal-note { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 28px; color: var(--muted); font-size: 10px; line-height: 1.4; margin-top: 3px; }
.deal-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.deal-meta span { border-radius: 999px; padding: 4px 7px; background: #f2f5f1; color: var(--muted); font-size: 8px; font-weight: 800; }
.task-chip { display: flex; align-items: center; gap: 6px; min-width: 0; margin-top: 9px; padding: 0; border-radius: 0; background: transparent; color: var(--muted); font-size: 9px; font-weight: 900; }
.task-chip b, .task-chip span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-chip b { flex: none; max-width: 86px; padding: 2px 6px; border-radius: 999px; background: #edf6e8; color: var(--green-dark); font-size: 8px; }
.task-chip span { min-width: 0; color: var(--ink); font-weight: 900; }
.task-chip.overdue b { background: #fff1f3; color: var(--red); }
.task-chip.today b { background: #fff7e6; color: #9a6600; }
.task-chip.no-task b { background: #f7f5eb; color: #88734a; }
.task-chip.no-task span { color: #615b4d; }
.deal-card-footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--line); }
.deal-card-footer .owner { min-width: 0; display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 9px; font-weight: 900; }
.deal-card-footer .owner em { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-style: normal; }
.deal-card-footer .mini-action { flex: none; min-height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #f7f9f4; color: var(--ink); font-size: 10px; }
.deal-card-footer .mini-action:hover { border-color: var(--green); color: var(--green-dark); background: var(--mint); }
.owner .avatar { width: 22px; height: 22px; font-size: 7px; }
body.pipeline-compact .deal-note,
body.pipeline-compact .deal-meta,
body.pipeline-compact .deal-service { display: none; }
body.pipeline-compact .deal-card { padding: 10px; margin-bottom: 0; }
body.pipeline-compact .task-chip { margin-top: 8px; }
body.pipeline-compact .deal-card-footer { margin-top: 8px; padding-top: 8px; }

.client-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 16px; padding-top: 13px; border-top: 1px solid var(--line); }
.client-stats span { color: var(--muted); font-size: 8px; min-width: 0; }
.client-stats b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--navy); font-size: 10px; margin-top: 4px; }
.dc-card { cursor: default; }
.dc-head { display: flex; justify-content: space-between; gap: 12px; }
.resource { margin-top: 18px; }
.resource div { display: flex; justify-content: space-between; color: var(--ink); font-size: 10px; }
.resource span { color: var(--muted); }
.resource .progress { height: 6px; }
.task-column h3 { margin-bottom: 12px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .6px; }
.task-column h3 span { float: right; color: var(--green-dark); }
.task-item { margin-top: 9px; padding: 13px; border: 1px solid var(--line); border-radius: 18px; background: #fff; cursor: pointer; }
.task-item strong { display: block; color: var(--navy); font-size: 11px; }
.task-item p { margin: 5px 0 12px; color: var(--muted); font-size: 9px; }
.task-item footer { display: flex; justify-content: space-between; color: var(--muted); font-size: 8px; }
.task-item.completed { opacity: .55; }
.task-item.completed strong { text-decoration: line-through; }
.events-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.events-stats article {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(33, 58, 44, .055);
}
.events-stats b { display: block; color: var(--navy); font-size: 26px; font-weight: 900; }
.events-stats span { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; font-weight: 800; }
.events-stats .critical { border-left: 4px solid var(--red); }
.events-stats .warning { border-left: 4px solid var(--orange); }
.events-stats .attention { border-left: 4px solid var(--purple); }
.events-stats .info { border-left: 4px solid var(--green); }
.events-toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 150px 190px 190px;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
}
.events-toolbar .pipeline-search { min-width: 0; margin: 0; }
.events-toolbar select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font: 800 11px Roboto, Inter, sans-serif;
}
.events-layout {
  display: grid;
  grid-template-columns: minmax(320px, .85fr) minmax(0, 1.45fr);
  gap: 16px;
  align-items: start;
}
.events-priority, .events-log-panel { min-width: 0; }
.events-priority-list, .events-log { display: grid; gap: 10px; margin-top: 14px; }
.event-card {
  display: grid;
  grid-template-columns: 6px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 20px rgba(33, 58, 44, .04);
}
.event-mark { width: 6px; height: 100%; min-height: 52px; border-radius: 999px; background: var(--green); }
.event-card.critical .event-mark { background: var(--red); }
.event-card.warning .event-mark { background: var(--orange); }
.event-card.info .event-mark { background: var(--blue); }
.event-main { min-width: 0; }
.event-line { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 5px; }
.event-source, .event-severity {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
}
.event-source { background: var(--mint); color: var(--green-dark); }
.event-severity.critical { background: #fff0f2; color: var(--red); }
.event-severity.warning { background: #fff6e6; color: #9a6600; }
.event-severity.info { background: #eef5ff; color: var(--blue); }
.event-card h3 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--navy); font-size: 13px; margin-bottom: 4px; }
.event-card p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); font-size: 10px; line-height: 1.45; }
.event-card footer { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; color: var(--muted); font-size: 9px; font-weight: 800; }
.event-card .mini-action { min-height: 34px; margin-top: 0; white-space: nowrap; }
.service-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.service-stats article {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(33, 58, 44, .055);
}
.service-stats b { display: block; color: var(--navy); font-size: 28px; font-weight: 900; }
.service-stats span { display: block; color: var(--muted); font-size: 10px; margin-top: 4px; }
.service-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) 420px;
  gap: 16px;
  align-items: start;
}
.service-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 12px;
  min-width: 0;
}
.ticket-column {
  min-height: 560px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
}
.ticket-column h3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--navy);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 10px;
}
.ticket-column h3 span { color: var(--green-dark); }
.ticket-card {
  width: 100%;
  display: grid;
  gap: 7px;
  margin-bottom: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  box-shadow: 0 8px 18px rgba(18, 22, 25, .06);
}
.ticket-card:hover, .ticket-card.active { border-color: var(--green); transform: translateY(-1px); }
.ticket-card.danger { border-color: rgba(215,25,32,.35); background: #fff8f8; }
.ticket-card.warning { border-color: rgba(243,166,0,.35); background: #fffaf0; }
.ticket-topline { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 9px; }
.ticket-topline b { color: var(--purple); text-transform: uppercase; }
.ticket-topline em { font-style: normal; font-weight: 900; }
.ticket-card strong { color: var(--navy); font-size: 12px; line-height: 1.25; }
.ticket-card small { color: var(--muted); font-size: 9px; line-height: 1.35; }
.sla-pill {
  width: max-content;
  max-width: 100%;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--paper-soft);
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
}
.sla-pill.ok, .sla-pill.done { background: var(--mint); color: var(--green-dark); }
.sla-pill.warning { background: #fff2df; color: #a96c00; }
.sla-pill.danger { background: #ffe9ec; color: var(--red); }
.service-detail {
  position: sticky;
  top: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
}
.service-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.service-detail-head h3 { color: var(--navy); font-size: 22px; line-height: 1.12; margin: 4px 0 5px; }
.service-detail-head small { color: var(--muted); font-size: 10px; }
.service-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
}
.service-actions button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper-soft);
  color: var(--ink);
  cursor: pointer;
  padding: 0 10px;
  font: 900 10px Roboto, Inter, sans-serif;
}
.service-actions button.active { background: var(--green); border-color: var(--green); color: #fff; }
.service-actions button.paid { background: var(--purple); border-color: var(--purple); }
.ticket-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.ticket-meta-grid div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper-soft);
}
.ticket-meta-grid span { display: block; color: var(--muted); font-size: 9px; margin-bottom: 4px; }
.ticket-meta-grid b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--navy); font-size: 11px; }
.ticket-description {
  padding: 12px;
  border-radius: 14px;
  background: #fbfcf8;
  color: var(--ink-2);
  font-size: 11px;
  line-height: 1.55;
  margin-bottom: 12px;
}
.ticket-note-box { display: grid; gap: 8px; margin-bottom: 14px; }
.ticket-note-box textarea {
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 12px;
  color: var(--ink);
  resize: vertical;
  outline: 0;
  font: 500 12px Roboto, Inter, sans-serif;
}
.ticket-note-box .primary-btn { width: 100%; }
.ticket-events h4 { color: var(--navy); font-size: 14px; margin-bottom: 8px; }
.ticket-events article {
  padding: 11px 0;
  border-top: 1px solid var(--line);
}
.ticket-events span { color: var(--muted); font-size: 9px; }
.ticket-events b { display: block; color: var(--purple); font-size: 10px; margin: 3px 0; text-transform: uppercase; }
.ticket-events p { color: var(--ink-2); font-size: 11px; line-height: 1.45; }
.operations-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.operations-stats article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
}
.operations-stats b { display: block; color: var(--navy); font-size: 24px; letter-spacing: -.7px; }
.operations-stats span { display: block; color: var(--muted); font-size: 11px; margin-top: 6px; }
.operations-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.operations-panel.wide { grid-column: 1 / -1; }
.operations-list { display: grid; gap: 10px; }
.operation-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(92px, .42fr) minmax(92px, .42fr) 136px 86px;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.operation-row.ok, .ip-card.ok { border-left-color: var(--green); }
.operation-row.warning, .ip-card.warning { border-left-color: var(--orange); }
.operation-row.danger, .ip-card.danger { border-left-color: var(--red); }
.operation-row.neutral, .ip-card.neutral { border-left-color: var(--purple); }
.operation-row div { min-width: 0; }
.operation-row b, .ip-card b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--navy); font-size: 13px; }
.operation-row small, .operation-row span, .ip-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 10px; line-height: 1.4; }
.operation-row select, .ip-card select {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f9faf7;
  color: var(--ink);
  padding: 0 10px;
  font: 800 11px Roboto, Inter, sans-serif;
}
.operation-open {
  min-height: 36px;
  border: 1px solid rgba(20,158,0,.22);
  border-radius: 10px;
  background: var(--mint);
  color: var(--green-dark);
  cursor: pointer;
  font: 900 10px Roboto, Inter, sans-serif;
}
.operation-open:hover {
  border-color: rgba(20,158,0,.42);
  background: #f4ffed;
}
.provisioning-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, .65fr);
  gap: 18px;
  align-items: start;
}
.provisioning-form, .provisioning-side, .provisioning-history-panel { overflow: hidden; }
.provisioning-form .section-heading { align-items: center; margin-bottom: 16px; }
.provisioning-form .section-heading.sub { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.provisioning-form .form-grid {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  align-items: end;
}
.provisioning-form label {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}
.provisioning-form input,
.provisioning-form select,
.provisioning-form textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f9faf7;
  color: var(--ink);
  outline: 0;
  padding: 0 13px;
  font: 800 12px Roboto, Inter, sans-serif;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}
.provisioning-form select {
  appearance: none;
  padding-right: 34px;
  background:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%) calc(100% - 18px) 19px / 5px 5px no-repeat,
    linear-gradient(135deg, var(--muted) 50%, transparent 50%) calc(100% - 13px) 19px / 5px 5px no-repeat,
    #f9faf7;
}
.provisioning-form textarea {
  min-height: 110px;
  margin-top: 12px;
  padding: 13px;
  resize: vertical;
  line-height: 1.45;
}
.provisioning-form input:focus,
.provisioning-form select:focus,
.provisioning-form textarea:focus {
  border-color: rgba(20,158,0,.55);
  background-color: #fff;
  box-shadow: 0 0 0 4px rgba(20,158,0,.08);
}
.provisioning-form input[type="date"] {
  color-scheme: light;
}
.provisioning-ready {
  padding: 8px 12px;
  border-radius: 999px;
  background: #ecf8e8;
  color: var(--green);
  font-weight: 900;
  font-size: 11px;
}
.provisioning-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fbfcf8;
}
.provisioning-flags .checkbox {
  min-height: 34px;
  flex: 0 1 auto;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-2);
  font-size: 11px;
}
.provisioning-flags input[type="checkbox"] {
  width: 15px;
  min-height: 15px;
  padding: 0;
  accent-color: var(--green);
  box-shadow: none;
}
.provisioning-checks { display: grid; gap: 10px; }
.provisioning-check {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.provisioning-check > span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 900;
}
.provisioning-check.ok > span { background: #e6f7df; color: var(--green); }
.provisioning-check.warn > span { background: #fff2d8; color: var(--orange); }
.provisioning-check.block > span { background: #ffe1e5; color: #d71920; }
.provisioning-check b { display: block; color: var(--navy); font-size: 13px; }
.provisioning-check small { color: var(--muted); line-height: 1.45; }
.provisioning-result {
  margin-top: 14px;
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, #f4f8f0, #fff);
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 700;
}
.provisioning-result b { display: block; color: var(--navy); margin-bottom: 4px; }
.provisioning-history { display: grid; gap: 10px; }
.provisioning-run {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}
.provisioning-run b { display: block; color: var(--navy); margin: 5px 0; }
.provisioning-run span, .provisioning-run small { color: var(--muted); }
.secondary-action { background: #f0f2f5 !important; color: var(--navy) !important; border-color: var(--line) !important; }
.ip-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 10px;
}
.ip-card {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.billing-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.billing-stats article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
}
.billing-stats b { display: block; color: var(--navy); font-size: 24px; letter-spacing: -.7px; }
.billing-stats span { display: block; color: var(--muted); font-size: 11px; margin-top: 6px; }
.billing-auto {
  margin: 0 0 16px;
}
.billing-auto article {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(360px, 1.2fr);
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(135deg, #fff, #f4f8ef);
  box-shadow: var(--shadow);
}
.billing-auto b { display: block; color: var(--navy); font-size: 18px; margin-top: 5px; }
.billing-auto small { display: block; color: var(--muted); font-size: 11px; line-height: 1.45; margin-top: 5px; }
.billing-auto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
  gap: 8px;
}
.billing-auto-grid span {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .72);
  color: var(--muted);
  font-size: 9px;
}
.billing-auto-grid b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
  font-size: 11px;
  margin-top: 3px;
}
.billing-auto-error {
  grid-column: 1 / -1;
  padding: 9px 11px;
  border-radius: 12px;
  background: #fff2f3;
  color: var(--red);
  font-size: 10px;
  font-weight: 800;
  white-space: pre-wrap;
}
.billing-worker {
  grid-column: 1 / -1;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .58);
}
.billing-worker-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}
.billing-worker-head b {
  color: var(--navy);
  font-size: 13px;
  margin: 0;
}
.billing-worker-head span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}
.billing-worker-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}
.billing-worker-row {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--purple);
  border-radius: 12px;
  background: #fff;
}
.billing-worker-row.ok { border-left-color: var(--green); }
.billing-worker-row.warning { border-left-color: var(--orange); }
.billing-worker-row.danger { border-left-color: var(--red); }
.billing-worker-row b,
.billing-worker-row span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.billing-worker-row b {
  color: var(--navy);
  font-size: 10px;
}
.billing-worker-row span {
  color: var(--muted);
  font-size: 9px;
  margin-top: 3px;
}
.billing-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.billing-flags span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
}
.billing-auto-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  grid-column: 1 / -1;
  grid-row: auto;
  align-self: center;
}
.billing-auto-actions button { width: auto; }
.billing-control {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
}
.billing-control-state { font-size: 17px; font-weight: 800; }
.billing-control-state::before {
  content: ''; display: inline-block; width: 9px; height: 9px;
  margin-right: 9px; border-radius: 50%; background: var(--muted);
}
.billing-control-state.running::before { background: var(--green); }
.billing-control-state.paused::before { background: var(--orange); }
.billing-control p { margin: 7px 0 0; font-size: 13px; color: var(--ink-2); }
.billing-control small { font-size: 12px; }
.billing-control-actions { display: flex; flex-wrap: wrap; gap: 8px; }
#billing-pause-timer { margin-left: 12px; font-size: 20px; font-variant-numeric: tabular-nums; }
.billing-outbox {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.billing-outbox-row {
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--purple);
  border-radius: 14px;
  background: rgba(255, 255, 255, .78);
}
.billing-outbox-row.ok { border-left-color: var(--green); }
.billing-outbox-row.warning { border-left-color: var(--orange); }
.billing-outbox-row.danger { border-left-color: var(--red); }
.billing-outbox-row b, .billing-outbox-row span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.billing-outbox-row b { color: var(--navy); font-size: 11px; }
.billing-outbox-row span { color: var(--muted); font-size: 9px; margin-top: 4px; }
.billing-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.billing-panel.wide { grid-column: 1 / -1; }
.billing-list, .billing-ticket-list, .billing-payment-list { display: grid; gap: 10px; }
.billing-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  align-items: start;
  gap: 8px 14px;
  padding: 13px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.billing-row.ok { border-left-color: var(--green); }
.billing-row.warning { border-left-color: var(--orange); }
.billing-row.danger { border-left-color: var(--red); }
.billing-row.neutral { border-left-color: var(--purple); }
.billing-row div { min-width: 0; }
.billing-row > div:first-child { grid-column: 1; grid-row: 1 / span 2; }
.billing-row > div:nth-of-type(2),
.billing-row > div:nth-of-type(3) {
  display: inline-flex;
  gap: 7px;
  align-items: baseline;
  min-width: 0;
}
.billing-row > div:nth-of-type(2) { grid-column: 1; grid-row: 3; }
.billing-row > div:nth-of-type(3) { grid-column: 1; grid-row: 4; }
.billing-row > strong {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  white-space: nowrap;
}
.billing-row > select { grid-column: 2; grid-row: 2; align-self: start; }
.billing-row > .billing-doc-actions {
  grid-column: 2;
  grid-row: 3;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}
.billing-doc-actions button {
  width: 100%;
  min-height: 34px;
  margin-top: 0;
}
.billing-doc-actions button:first-child {
  background: #f3f8ef;
  color: var(--green-dark);
}
.billing-doc-actions button:disabled { opacity: .45; cursor: default; }
.billing-row b, .billing-row strong { color: var(--navy); font-size: 13px; }
.billing-row small, .billing-row span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 10px; line-height: 1.4; }
.billing-row .billing-money-note {
  margin-top: 4px;
  color: var(--green-dark);
  font-weight: 900;
}
.billing-row > div:nth-of-type(2) span,
.billing-row > div:nth-of-type(3) span,
.billing-row > div:nth-of-type(2) b,
.billing-row > div:nth-of-type(3) b { display: inline; }
.billing-row select {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f9faf7;
  color: var(--ink);
  padding: 0 10px;
  font: 800 11px Roboto, Inter, sans-serif;
}
.billing-status {
  width: max-content;
  max-width: 100%;
  margin-bottom: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  font-weight: 900;
}
.billing-status.ok { background: var(--mint); color: var(--green-dark); }
.billing-status.warning { background: #fff2df; color: #a96c00; }
.billing-status.danger { background: #ffe9ec; color: var(--red); }
.billing-status.neutral { background: var(--purple-soft); color: var(--purple); }
.billing-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.modal-hint {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8faf5;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
}
.modal-hint.inline-hint {
  display: flex;
  align-items: center;
  min-height: 44px;
  margin-top: 18px;
}
.billing-ticket-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px 150px;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.billing-ticket-row b { display: block; color: var(--navy); font-size: 13px; }
.billing-ticket-row span { display: block; color: var(--muted); font-size: 10px; margin-top: 4px; }
.billing-ticket-row strong { color: var(--green-dark); font-size: 14px; }
.billing-payment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px minmax(220px, .8fr);
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.billing-payment-row.ok { border-left-color: var(--green); }
.billing-payment-row.warning { border-left-color: var(--orange); }
.billing-payment-row.danger { border-left-color: var(--red); }
.billing-payment-row.neutral { border-left-color: var(--purple); }
.billing-payment-row div { min-width: 0; }
.billing-payment-row b, .billing-payment-row strong { color: var(--navy); font-size: 13px; }
.billing-payment-row small, .billing-payment-row span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}
.billing-payment-row strong { justify-self: end; white-space: nowrap; }
.billing-payment-row select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f9faf7;
  color: var(--ink);
  padding: 0 10px;
  font: 800 11px Roboto, Inter, sans-serif;
}
.module-row { padding: 10px 0; border-top: 1px solid var(--line); }
.module-row:first-of-type { border-top: 0; }
.module-row b { display: block; color: var(--navy); font-size: 11px; }
.module-row span { display: block; color: var(--muted); font-size: 9px; margin-top: 3px; line-height: 1.4; }

.lead-card, .list-row, .timeline-row, .report-tile {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 14px 28px rgba(33, 58, 44, .06);
}
.lead-card { margin-top: 9px; padding: 14px; }
.lead-card h3 { color: var(--navy); font-size: 13px; margin: 10px 0 5px; }
.lead-card p, .lead-contact { color: var(--muted); font-size: 10px; line-height: 1.5; }
.client-list-row { grid-template-columns: auto minmax(180px, 1fr) minmax(220px, 1fr) 140px; }
.client360-panel {
  display: block;
  overflow: visible;
}
.client360-layout {
  display: grid;
  grid-template-columns: minmax(280px, .82fr) minmax(0, 1.45fr);
  gap: 16px;
  align-items: start;
}
.client360-list {
  display: grid;
  gap: 10px;
  min-width: 0;
}
.client360-row {
  width: 100%;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 13px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  box-shadow: 0 12px 26px rgba(33, 58, 44, .055);
}
.client360-row:hover, .client360-row.active {
  border-color: var(--green);
  background: linear-gradient(90deg, #fff, #f4fbef);
}
.client360-row b, .client360-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.client360-row b { color: var(--navy); font-size: 12px; }
.client360-row small { color: var(--muted); font-size: 9px; margin-top: 4px; }
.client360-row strong { color: var(--green-dark); font-size: 11px; white-space: nowrap; }
.client360-detail {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
}
.client360-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
  margin-bottom: 16px;
}
.client360-head .avatar { width: 44px; height: 44px; font-size: 12px; }
.client360-head h3 {
  color: var(--navy);
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: -.8px;
  margin: 3px 0 5px;
}
.client360-head small { color: var(--muted); font-size: 11px; }
.client360-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -4px 0 14px;
}
.client360-actions .mini-action {
  width: auto;
  padding: 9px 12px;
  border-radius: 999px;
}
.client360-actions .soft-action {
  background: var(--paper-soft);
  color: var(--green-dark);
}
.client360-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.client360-stats article {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper-soft);
}
.client360-stats article.attention { background: #fff6f6; border-color: rgba(215,25,32,.24); }
.client360-stats b { display: block; color: var(--navy); font-size: 18px; font-weight: 900; }
.client360-stats span { display: block; color: var(--muted); font-size: 9px; margin-top: 4px; }
.client360-section {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.client360-section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}
.client360-section-head b { color: var(--navy); font-size: 14px; }
.client360-section-head span, .client360-more { color: var(--muted); font-size: 10px; font-weight: 800; }
.client360-section-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}
.client360-section-actions .text-btn {
  padding: 0;
  color: var(--green-dark);
  font-size: 10px;
}
.client360-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.portal-access-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.portal-access-item.muted {
  opacity: .58;
}
.portal-access-item.muted b,
.portal-access-item.muted span {
  color: var(--muted);
}
.client-finance-section .text-btn {
  padding: 0;
  color: var(--green-dark);
  font-size: 10px;
}
.finance-rule-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.finance-rule-grid article {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: linear-gradient(180deg, #fff, #f8fbf5);
}
.finance-rule-grid article.attention {
  border-color: rgba(215,25,32,.28);
  background: #fff8f8;
}
.finance-rule-grid span,
.finance-rule-grid small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
}
.finance-rule-grid b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--navy);
  font-size: 13px;
  margin: 4px 0;
}
.client360-item {
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.client360-item-button {
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.client360-item-button:hover {
  border-color: rgba(20,158,0,.36);
  background: #f8fff4;
}
.client360-service-card {
  display: grid;
  gap: 8px;
}
.client360-card-main {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.client360-link {
  justify-self: start;
  min-height: 24px;
  padding: 5px 9px;
  border: 1px solid rgba(20,158,0,.24);
  border-radius: 999px;
  background: var(--mint);
  color: var(--green-dark);
  cursor: pointer;
  font-size: 9px;
  font-weight: 900;
}
.client360-link:hover {
  border-color: rgba(20,158,0,.45);
  background: #f2ffe9;
}
.client360-item.attention { border-color: rgba(215,25,32,.28); background: #fff8f8; }
.client360-item b,
.client360-item span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.client360-item b { color: var(--navy); font-size: 11px; }
.client360-item span { color: var(--muted); font-size: 9px; margin-top: 4px; }
.mini-empty {
  min-height: 38px;
  display: grid;
  align-items: center;
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: var(--paper-soft);
  font-size: 10px;
}
.lead-summary-row, .rack-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}
.lead-summary-row article, .rack-stats article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(0,0,0,.05);
}
.lead-summary-row b, .rack-stats b { display: block; color: var(--navy); font-size: 22px; font-weight: 900; }
.lead-summary-row span, .rack-stats span { display: block; color: var(--muted); font-size: 10px; margin-top: 4px; }
.lead-list-row { grid-template-columns: auto minmax(170px, .8fr) minmax(260px, 1.4fr) 190px auto; }
.discount-cell b { color: var(--green-dark); font-size: 16px; }
.discount-cell span { display: flex; gap: 4px; margin-top: 7px; }
.discount-cell button {
  min-width: 34px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-soft);
  color: var(--ink);
  cursor: pointer;
  font-size: 9px;
  font-weight: 900;
}
.discount-cell button.active { background: var(--green); border-color: var(--green); color: #fff; }
.mini-action { min-height: 34px; margin-top: 12px; padding: 8px 12px; font-size: 10px; text-align: center; }
.done-pill, .soft-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  width: max-content;
  margin-top: 10px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
}
.done-pill { background: var(--mint); color: var(--green-dark); }
.soft-pill { background: #eef3ee; color: var(--muted); }
.list-panel, .timeline-panel {
  display: grid;
  gap: 10px;
  min-width: 0;
  overflow-x: auto;
}
.list-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(170px, auto) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
}
.list-row b { display: block; color: var(--navy); font-size: 12px; }
.list-row small { display: block; color: var(--muted); font-size: 9px; margin-top: 4px; }
.timeline-row {
  position: relative;
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 12px;
  padding: 16px;
}
.timeline-dot {
  width: 10px;
  height: 10px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px var(--mint);
}
.timeline-row h3 { color: var(--navy); font-size: 14px; margin: 8px 0 6px; }
.timeline-row p { color: var(--ink-2); font-size: 11px; line-height: 1.55; }
.timeline-row small { display: block; color: var(--muted); font-size: 9px; margin-top: 8px; }
.report-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.report-tile { padding: 18px; }
.report-tile b { display: block; color: var(--navy); font-size: 28px; letter-spacing: -1px; }
.report-tile span { display: block; color: var(--muted); font-size: 10px; font-weight: 900; margin-top: 6px; }
.report-layout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.rack-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.rack-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 410px;
  gap: 16px;
  align-items: start;
}
.rack-map-panel, .rack-detail { padding: 18px; }
.rack-map-panel { min-width: 0; overflow: hidden; }
.rack-object-tabs, .rack-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.rack-object-tabs button, .rack-tabs button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  padding: 0 14px;
  font-weight: 900;
}
.rack-object-tabs button.active, .rack-tabs button.active { background: var(--purple); border-color: var(--purple); color: #fff; }
.machinery-plan {
  min-width: 720px;
  padding: 18px;
  border-radius: 22px;
  background:
    linear-gradient(90deg, rgba(81,40,79,.04) 1px, transparent 1px),
    linear-gradient(rgba(81,40,79,.04) 1px, transparent 1px),
    #fbfbf8;
  background-size: 22px 22px;
  border: 1px solid var(--line);
}
.machine-room-outline {
  position: relative;
  min-height: 620px;
  padding: 58px 22px 22px;
  border: 2px solid #313131;
  border-radius: 4px;
  background: rgba(255,255,255,.72);
}
.machine-room-outline::before,
.machine-room-outline::after {
  content: "";
  position: absolute;
  height: 16px;
  width: 110px;
  top: -2px;
  border: 2px solid #777;
  border-top: 0;
  background: #fff;
}
.machine-room-outline::before { left: 12%; }
.machine-room-outline::after { right: 16%; }
.room-label {
  position: absolute;
  left: 20px;
  top: 16px;
  display: grid;
  gap: 3px;
}
.room-label b { color: var(--navy); font-size: 15px; }
.room-label span { color: var(--muted); font-size: 10px; }
.hermozone-layout {
  display: grid;
  grid-template-columns: repeat(var(--hall-cols), minmax(220px, 1fr));
  gap: 18px;
  align-items: start;
}
.hermozone {
  position: relative;
  min-height: 210px;
  padding: 16px;
  border: 1px solid rgba(215, 44, 74, .35);
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(215,44,74,.13) 0 8px, transparent 8px calc(100% - 8px), rgba(215,44,74,.13) calc(100% - 8px)),
    rgba(255,255,255,.9);
}
.hermozone::before, .hermozone::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 8px;
  height: 55%;
  transform: translateY(-50%);
  border-radius: 8px;
  background: #e63b59;
  box-shadow: 0 0 0 2px #1438d8 inset;
}
.hermozone::before { left: 5px; }
.hermozone::after { right: 5px; }
.hermozone header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding: 0 12px;
}
.hermozone header b { color: var(--purple); font-size: 12px; text-transform: uppercase; }
.hermozone header span { color: var(--muted); font-size: 9px; text-align: right; }
.hermozone-racks {
  display: grid;
  grid-template-columns: repeat(4, minmax(52px, 1fr));
  gap: 5px 10px;
}
.rack-grid {
  display: grid;
  grid-template-columns: repeat(var(--rack-cols), minmax(74px, 1fr));
  gap: 8px;
}
.rack-tile {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  padding: 5px;
  text-align: left;
  transition: .16s;
}
.rack-tile:hover, .rack-tile.selected { transform: translateY(-1px); border-color: var(--green); box-shadow: 0 8px 18px rgba(0,0,0,.08); }
.rack-tile b { display: block; font-size: 10px; line-height: 1; }
.rack-tile span { display: block; min-height: 12px; margin-top: 3px; color: var(--muted); font-size: 7px; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rack-tile small { display: block; margin-top: 3px; padding: 0; border-radius: 0; background: transparent; color: var(--muted); font-size: 6px; font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rack-tile.client { border-color: rgba(39,159,0,.45); background: linear-gradient(180deg, #fff, #f4fbef); }
.rack-tile.unit { border-color: rgba(43,123,187,.45); background: linear-gradient(180deg, #fff, #eef6ff); }
.rack-tile.reserved { border-color: rgba(81,40,79,.35); background: linear-gradient(180deg, #fff, var(--purple-soft)); }
.rack-tile.free { opacity: .82; }
.rack-detail { position: sticky; top: 16px; }
.rack-detail-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.rack-detail-head h3 { color: var(--navy); font-size: 30px; line-height: 1; margin: 4px 0 8px; }
.rack-detail-head > b { color: var(--green-dark); font-size: 24px; }
.rack-status { display: inline-flex; padding: 5px 9px; border-radius: 8px; background: var(--paper-soft); color: var(--muted); font-size: 9px; font-weight: 900; }
.rack-status.client { background: var(--mint); color: var(--green-dark); }
.rack-status.reserved { background: var(--purple-soft); color: var(--purple); }
.rack-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.rack-meta div { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.rack-meta span { color: var(--muted); font-size: 10px; }
.rack-meta b { color: var(--navy); font-size: 11px; text-align: right; }
.rack-note { color: var(--muted); font-size: 11px; line-height: 1.5; margin-bottom: 12px; }
.rack-service-links {
  display: grid;
  gap: 8px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid rgba(20,158,0,.18);
  border-radius: 16px;
  background: linear-gradient(180deg, #fbfff8, #fff);
}
.rack-service-links > b {
  color: var(--green-dark);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.rack-service-links button {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}
.rack-service-links span {
  color: var(--navy);
  font-size: 11px;
  font-weight: 900;
}
.rack-service-links small {
  color: var(--muted);
  font-size: 9px;
}
.rack-service-links button:hover {
  border-color: rgba(20,158,0,.35);
  background: #f8fff4;
}
.rack-ops-panel {
  display: grid;
  gap: 12px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid rgba(81,40,79,.14);
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, var(--paper-soft));
}
.rack-ops-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}
.rack-ops-head b {
  display: block;
  color: var(--navy);
  font-size: 13px;
}
.rack-ops-head span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}
.rack-ops-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-end;
}
.rack-ops-actions button {
  min-height: 26px;
  padding: 5px 8px;
  border: 1px solid rgba(20,158,0,.25);
  border-radius: 999px;
  background: #fff;
  color: var(--green-dark);
  cursor: pointer;
  font-size: 8px;
  font-weight: 900;
}
.rack-ops-actions button:hover {
  background: var(--mint);
}
.rack-ops-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.rack-ops-card {
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.rack-ops-card header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin-bottom: 7px;
}
.rack-ops-card header b {
  color: var(--navy);
  font-size: 10px;
}
.rack-ops-card header span {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--mint);
  color: var(--green-dark);
  font-size: 9px;
  font-weight: 900;
}
.rack-ops-row {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 7px 0;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.rack-ops-row:first-child {
  border-top: 0;
}
.rack-ops-row b,
.rack-ops-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rack-ops-row b {
  color: var(--ink);
  font-size: 9px;
}
.rack-ops-row span {
  color: var(--muted);
  font-size: 8px;
}
.rack-ops-row:hover b {
  color: var(--green-dark);
}
.rack-client-card, .unit-detail-card {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.rack-client-card h4, .rack-unit-mode h4, .unit-detail-card h4 { color: var(--navy); font-size: 15px; margin-bottom: 8px; }
.rack-client-card p, .unit-detail-card p { color: var(--muted); font-size: 11px; line-height: 1.5; margin-bottom: 10px; }
.rack-docs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}
.rack-docs article {
  padding: 10px;
  border-radius: 12px;
  background: var(--paper-soft);
}
.rack-docs b { display: block; color: var(--purple); font-size: 10px; margin-bottom: 7px; }
.rack-docs ul { margin: 0; padding-left: 16px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.rack-actions.compact { margin-top: 12px; justify-content: stretch; }
.rack-actions.compact button { flex: 1; }
.rack-unit-mode { margin-top: 12px; }
.unit-client-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  margin: 10px 0 12px;
  max-width: 100%;
  overflow: hidden;
}
.unit-client {
  min-width: 0;
  min-height: 42px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  overflow: hidden;
}
.unit-client span { display: block; color: var(--muted); font-size: 8px; font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.unit-client b { display: block; color: var(--ink); font-size: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.unit-client.busy { background: var(--mint); border-color: rgba(39,159,0,.35); }
.unit-client.unit-merged { border-color: rgba(39,159,0,.55); background: linear-gradient(180deg, #effbe9, #fff); }
.unit-client.unit-start { box-shadow: inset 4px 0 0 var(--green); }
.unit-client.unit-joined {
  min-height: 28px;
  margin-top: -5px;
  border-top-style: dashed;
  border-color: rgba(39,159,0,.26);
  background: #f7fcf3;
}
.unit-client.unit-joined span { opacity: .7; }
.unit-client.unit-joined b { color: var(--muted); font-weight: 700; }
.unit-client.selected { outline: 2px solid var(--purple); }
.unit-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; color: var(--muted); font-size: 9px; }
.unit-legend span { display: inline-flex; align-items: center; gap: 5px; }
.unit-legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--paper-soft); border: 1px solid var(--line); }
.unit-legend i.compute, .rack-unit.compute { background: var(--mint); border-color: rgba(39,159,0,.4); }
.unit-legend i.storage, .rack-unit.storage { background: #edf4ff; border-color: rgba(43,123,187,.35); }
.unit-legend i.network, .rack-unit.network { background: var(--purple-soft); border-color: rgba(81,40,79,.35); }
.rack-units {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
  max-height: 590px;
  overflow: auto;
  padding-right: 4px;
}
.rack-unit {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 8px;
  align-items: center;
  min-height: 22px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 3px 7px;
}
.rack-unit span { color: var(--muted); font-size: 9px; font-weight: 900; }
.rack-unit b { color: var(--ink); font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-layout .list-row { grid-template-columns: minmax(0, 1fr) auto; margin-top: 10px; }
.permissions-workspace { display: grid; gap: 14px; }
.permissions-tabs {
  display: inline-flex;
  width: max-content;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}
.permissions-tabs button {
  min-height: 38px;
  border: 0;
  border-radius: 10px;
  padding: 0 14px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: 900 12px Roboto, Inter, sans-serif;
}
.permissions-tabs button.active { background: var(--green); color: #fff; }
.permissions-tabs span {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  margin-left: 7px;
  border-radius: 999px;
  background: rgba(0,0,0,.06);
  font-size: 10px;
}
.permissions-panel { display: none; padding: 18px; }
.permissions-panel.active { display: block; }
.permission-list { display: grid; gap: 8px; margin-top: 14px; }
.permission-row {
  display: grid;
  grid-template-columns: 34px minmax(220px, 1fr) auto auto minmax(130px, auto) auto;
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
}
.role-list-row { grid-template-columns: minmax(260px, .9fr) minmax(280px, 1fr) auto; }
.permission-row-main { min-width: 0; }
.permission-row-main b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--navy); font-size: 13px; }
.permission-row-main small,
.permission-last-login { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 10px; margin-top: 3px; }
.permission-role-pill,
.permission-status,
.permission-chip-list span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  background: var(--paper-soft);
  color: var(--ink-2);
  font: 900 10px Roboto, Inter, sans-serif;
  white-space: nowrap;
}
.permission-status.active { background: var(--mint); color: var(--green-dark); }
.permission-status.blocked { background: #fff0f2; color: var(--red); }
.permission-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}
.permission-row-actions,
.role-actions,
.user-actions { display: flex; justify-content: flex-end; gap: 8px; }
.permission-row-actions .period-btn { height: 34px; padding: 0 12px; }
.user-access-row { display: flex; flex-wrap: wrap; }
.user-access-row > .avatar { flex: 0 0 34px; }
.user-access-row > .permission-row-main { flex: 1 1 200px; }
.user-access-row > .permission-row-actions { flex-wrap: wrap; margin-left: auto; max-width: 100%; }
.user-access-row .permission-row-actions .period-btn { height: auto; min-height: 34px; white-space: nowrap; }
.danger-lite { color: var(--red) !important; }
.permission-edit-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-top: 16px;
  color: var(--navy);
  font-weight: 900;
}
.permission-edit-head span { color: var(--muted); font-size: 10px; }
.small-grid { grid-template-columns: 1fr; }
.compact-card { box-shadow: none; }
.compact-card p { color: var(--muted); font-size: 10px; line-height: 1.5; margin-top: 8px; }
.compact-card small { display: block; margin-top: 12px; color: var(--green-dark); font-size: 9px; line-height: 1.5; }
.permission-matrix {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.permission-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 800;
}
.permission-check input { width: auto; }
.permissions-edit-modal textarea { min-height: 92px; }

.cpq-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}
.cpq-workspace, .cpq-summary { min-width: 0; }
.cpq-workspace { display: contents; }
.client-panel { grid-column: 1 / -1; grid-row: 1; }
.contract-panel { grid-column: 1 / -1; grid-row: 2; }
.cpq-catalog-panel { grid-column: 1; grid-row: 3; height: 100%; }
.cpq-summary { grid-column: 2; grid-row: 3; height: 100%; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.section-heading > div { display: flex; align-items: center; gap: 10px; }
.section-heading h2 { color: var(--navy); font-size: 18px; }
.step, .counter {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--mint);
  color: var(--green-dark);
  font-size: 10px;
  font-weight: 900;
}
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cpq-workspace .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.client-panel label, .cpq-summary label { color: var(--muted); font-size: 10px; font-weight: 900; }
.client-panel input, .client-panel select {
  width: 100%;
  margin-top: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f9faf7;
  color: var(--ink);
  outline: 0;
  font: 700 11px Roboto;
}
.option-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; color: var(--ink-2); font-size: 11px; }
.checkbox { display: inline-flex; align-items: center; gap: 7px; }
.install-percent { display: inline-flex; align-items: center; gap: 7px; }
.install-percent input { width: 76px; margin: 0; padding: 8px; }
.categories { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.category-pill {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 13px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font: 800 10px Roboto, Inter, sans-serif;
}
.category-pill.active { background: var(--green); color: #fff; border-color: var(--green); }
.catalog { display: grid; gap: 9px; max-height: 560px; overflow: auto; padding-right: 4px; }
.cpq-service {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 34px;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}
.cpq-service b { display: block; color: var(--navy); font-size: 12px; }
.cpq-service small { display: block; color: var(--muted); font-size: 9px; margin-top: 4px; }
.cpq-service strong { color: var(--green-dark); font-size: 11px; white-space: nowrap; }
.add {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  font: 800 18px Roboto, Inter, sans-serif;
}
.summary-card {
  position: static;
  height: 100%;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
}
.cart { display: grid; gap: 9px; max-height: 330px; overflow: auto; padding-right: 4px; }
.cpq-line { padding: 12px; border: 1px solid var(--line); border-radius: 18px; background: #f9faf7; }
.cpq-line .cart-title { display: flex; justify-content: space-between; gap: 10px; color: var(--navy); font-size: 11px; font-weight: 900; }
.remove { border: 0; background: transparent; color: var(--red); cursor: pointer; font-size: 18px; }
.cpq-line-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.quantity { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 999px; background: #fff; padding: 4px; }
.quantity button { width: 24px; height: 24px; border: 0; border-radius: 50%; background: var(--mint); color: var(--green-dark); cursor: pointer; font-weight: 900; }
.quantity span { min-width: 18px; text-align: center; font-size: 11px; font-weight: 900; }
.cpq-line label { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 9px; font-weight: 900; }
.cpq-line input { width: 82px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font: 700 10px Roboto; }
.cpq-line small { display: block; margin-top: 8px; color: var(--muted); font-size: 9px; }
.totals { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.totals div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; color: var(--muted); font-size: 11px; }
.totals strong { color: var(--navy); }
.totals .grand { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--navy); font-weight: 900; }
.totals .grand strong { color: var(--green-dark); font-size: 17px; }
.button-primary-like {
  width: 100%;
  min-height: 44px;
  margin-top: 14px;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  font: 800 12px Roboto, Inter, sans-serif;
  box-shadow: none;
}
.cpq-result { margin-top: 12px; }
.cpq-result small { display: block; color: var(--muted); margin-top: 5px; }
.catalog-actions { display: flex; align-items: center; gap: 8px; }
.catalog-actions .mini-action, .catalog-admin-row .mini-action { margin-top: 0; }
.catalog-service-form {
  display: grid;
  grid-template-columns: .8fr 1.5fr 1fr .7fr .8fr .9fr auto;
  gap: 8px;
  margin-bottom: 12px;
}
.catalog-service-form input, .catalog-service-form select,
.catalog-admin-row input, .catalog-admin-row select {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f9faf7;
  color: var(--ink);
  font: 800 10px Roboto;
  outline: 0;
}
.catalog-service-form .button-primary-like { min-height: 38px; margin-top: 0; padding: 0 14px; white-space: nowrap; }
.catalog-admin-table { display: grid; gap: 8px; max-height: 420px; overflow: auto; padding-right: 4px; }
.catalog-admin-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.4fr) minmax(120px, 1fr) 80px 95px 120px 92px 90px 90px;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.catalog-admin-row.inactive { opacity: .55; background: #f0f1ed; }
.catalog-active { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 9px; font-weight: 900; }
.danger-mini { color: var(--red); border-color: rgba(213,79,75,.25); }
.contract-panel summary {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  list-style: none;
}
.contract-panel summary::-webkit-details-marker { display: none; }
.contract-panel summary h2 { color: var(--navy); font-size: 18px; }
.contract-panel summary p { color: var(--muted); font-size: 10px; font-weight: 800; margin-left: auto; }
.recognition-grid {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  margin: 16px 0 10px;
}
.file-drop, .file-inline {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px dashed var(--green-dark);
  border-radius: 16px;
  background: var(--mint);
  color: var(--green-dark);
  font: 800 10px Roboto, Inter, sans-serif;
  cursor: pointer;
  overflow: hidden;
}
.file-drop input, .file-inline input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.recognition-status {
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f9faf7;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}
.recognition-status b { display: block; color: var(--navy); margin-bottom: 4px; }
.contract-grid { margin-top: 14px; }
.history-stack { margin-top: 14px; display: grid; gap: 9px; }
.history-head { display: flex; justify-content: space-between; align-items: center; color: var(--navy); font-size: 11px; font-weight: 900; }
.history-head span { color: var(--green-dark); }
.history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 6px;
  align-items: stretch;
  margin-top: 6px;
}
.history-item button {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  padding: 9px;
  text-align: left;
  font: 800 10px Roboto;
}
.history-item button:not(:first-child) { text-align: center; color: var(--green-dark); }
.history-item b, .history-item span, .history-item strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-item span { color: var(--muted); margin-top: 3px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 20; display: none; place-items: center; background: rgba(18,22,25,.28); backdrop-filter: blur(6px); }
.modal-backdrop.open { display: grid; }
.modal-backdrop.modal-attention .modal {
  animation: modal-attention .32s ease;
  box-shadow: 0 30px 90px rgba(87, 0, 84, .22);
}
@keyframes modal-attention {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}
.modal { width: min(520px, 92vw); max-height: 92vh; overflow: auto; padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: 0 30px 90px rgba(18,22,25,.16); }
.wide-modal { width: min(960px, 94vw); }
.modal-head { display: flex; justify-content: space-between; margin-bottom: 18px; }
.modal-head h2 { color: var(--navy); margin-top: 4px; }
.close-modal { border: 0; background: transparent; color: var(--muted); font-size: 25px; cursor: pointer; }
.modal label { display: block; margin-top: 12px; color: var(--muted); font-size: 10px; font-weight: 900; }
.modal input, .modal select, .modal textarea { width: 100%; margin-top: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper-soft); color: var(--ink); outline: 0; font: 700 11px Roboto, Inter, sans-serif; }
.modal textarea { height: 82px; resize: none; }
.settings-modal { width: min(780px, 94vw); }
.settings-modal textarea { min-height: 92px; }
.settings-modal .form-row { align-items: start; }
.inline-checkbox {
  align-self: stretch;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfcf8;
}
.inline-checkbox input { width: auto; min-height: auto; }
.settings-section {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfcf8;
}
.settings-section summary {
  cursor: pointer;
  color: var(--green-dark);
  font: 900 12px Roboto, Inter, sans-serif;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.settings-section[open] summary { margin-bottom: 12px; }
.settings-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.settings-menu {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255,255,255,.72);
  box-shadow: 0 18px 52px rgba(18,22,25,.06);
}
.settings-menu button {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}
.settings-menu button b { color: var(--ink); font: 900 14px Roboto, Inter, sans-serif; }
.settings-menu button span { font: 700 11px Roboto, Inter, sans-serif; }
.settings-menu button.active {
  border-color: rgba(31,184,0,.24);
  background: #eef8ea;
  color: var(--green-dark);
}
.settings-content { min-width: 0; }
.settings-pane { display: none; }
.settings-pane.active { display: block; }
.settings-form { display: grid; gap: 12px; }
.settings-form label {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}
.settings-form input,
.settings-form select,
.settings-form textarea {
  width: 100%;
  margin-top: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-soft);
  color: var(--ink);
  outline: 0;
  font: 700 11px Roboto, Inter, sans-serif;
}
.settings-form textarea { min-height: 92px; resize: vertical; }
.settings-subhead {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0 2px;
  border-bottom: 1px solid var(--line);
}
.settings-subhead b { color: var(--navy); font-size: 15px; }
.settings-subhead span { color: var(--muted); font-size: 11px; font-weight: 700; }
.settings-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 8px;
}
.settings-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.settings-card {
  display: grid;
  gap: 10px;
  min-height: 132px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fbfcf8;
}
.settings-card b { color: var(--navy); font-size: 22px; }
.settings-card span { color: var(--muted); font-weight: 700; }
.settings-card .period-btn,
.settings-card a.period-btn { align-self: end; text-align: center; text-decoration: none; }
.notification-settings-grid {
  display: grid;
  grid-template-columns: minmax(300px, .9fr) minmax(360px, 1.1fr);
  gap: 14px;
  align-items: start;
}
.notification-rule-form {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fbfcf8;
}
.notification-rules-panel { min-height: 0; }
.notification-rule-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.notification-rule-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.notification-rule-row.muted { opacity: .62; }
.notification-rule-row b,
.notification-rule-row small,
.notification-rule-row span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.notification-rule-row b { color: var(--navy); font-size: 13px; }
.notification-rule-row small { margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 800; }
.notification-rule-row span { margin-top: 5px; color: var(--green-dark); font-size: 10px; font-weight: 900; }
.notification-rule-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}
.notification-templates-panel {
  grid-column: 1 / -1;
}
.notification-template-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.notification-template-row {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.notification-template-head,
.notification-template-actions,
.switch-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.notification-template-head b { display: block; color: var(--navy); font-size: 14px; }
.notification-template-head small,
.notification-template-actions span { color: var(--muted); font: 800 10px Roboto, Inter, sans-serif; }
.notification-template-row label:not(.switch-line) {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font: 900 10px Roboto, Inter, sans-serif;
}
.notification-template-row input:not([type="checkbox"]),
.notification-template-row textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  padding: 10px 12px;
  font: 800 12px Roboto, Inter, sans-serif;
}
.notification-template-row textarea {
  min-height: 118px;
  resize: vertical;
  line-height: 1.45;
}
.switch-line {
  justify-content: flex-end;
  color: var(--green-dark);
  font: 900 11px Roboto, Inter, sans-serif;
}
.settings-permissions { grid-template-columns: 1fr; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.deal-modal-shell {
  width: calc(100vw - 20px);
  height: calc(100vh - 20px);
  max-height: calc(100vh - 20px);
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
}
.deal-card-head {
  flex: none;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 24px 15px;
  background: #fff;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  box-shadow: inset 0 4px 0 var(--green);
}
.deal-card-head h2 { color: var(--navy); font-size: 28px; margin-top: 5px; }
.deal-card-head .eyebrow, .deal-title-meta { color: var(--muted); }
.deal-head-actions { display: flex; flex-wrap: wrap; align-items: start; justify-content: flex-end; gap: 8px; }
.deal-card-head .action-wide {
  width: auto;
  min-width: 132px;
  min-height: 38px;
  margin-top: 0;
  background: #f3f6f1;
  color: var(--navy);
  border: 1px solid var(--line);
  border-radius: 8px;
}
#make-quote {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
.deal-card-head .secondary-action {
  min-width: 86px;
  background: #f3f6f1;
  color: var(--navy);
  border-color: var(--line);
}
.deal-card-head .secondary-action:hover { background: #ecf7e7; color: var(--green-dark); border-color: rgba(20,158,0,.28); }
.deal-card-head .close-modal { color: var(--muted); }
.deal-tabs {
  flex: none;
  display: flex;
  gap: 2px;
  padding: 0 24px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.deal-tabs button {
  min-height: 46px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0 18px;
  font: 900 12px Roboto, Inter, sans-serif;
}
.deal-tabs button:hover,
.deal-tabs button.active { color: var(--navy); border-color: var(--green); background: #fbfff8; }
.deal-stage-line {
  flex: none;
  display: flex;
  gap: 6px;
  padding: 9px 24px;
  background: #f7faf7;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: thin;
}
.deal-stage-line span {
  flex: 1 0 150px;
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  background: #eef1ec;
  color: var(--ink-2);
  font-size: 9px;
  font-weight: 900;
  text-align: left;
  padding: 6px 9px;
  line-height: 1.15;
  box-shadow: inset 0 0 0 1px rgba(10,32,20,.03);
}
.deal-stage-line span.done { background: #e8f7df; color: var(--green-dark); }
.deal-stage-line span.current {
  background: #fff;
  color: var(--green-dark);
  box-shadow: inset 0 0 0 2px var(--green), 0 10px 20px rgba(20,158,0,.08);
}
.deal-stage-line span { cursor: pointer; }
.deal-stage-line span:hover { transform: translateY(-1px); box-shadow: inset 0 0 0 1px rgba(20,158,0,.35), 0 8px 18px rgba(20,158,0,.06); }
.deal-stage-index {
  flex: none;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #fff;
  color: var(--green-dark);
  font-size: 8px;
  font-style: normal;
  font-weight: 900;
}
.deal-stage-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.deal-stage-advice {
  display: none;
  margin-top: 12px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfcf8;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}
.deal-stage-advice.show { display: block; }
.deal-stage-advice b { display: block; color: var(--navy); font-size: 11px; margin-bottom: 5px; }
.deal-stage-advice ul { margin: 6px 0 0 16px; padding: 0; }
.deal-stage-advice li { margin-top: 3px; }
.deal-stage-advice.good { border-color: rgba(20,158,0,.25); background: #f6fff0; }
.deal-stage-advice.warn { border-color: #ffdca8; background: #fffaf0; }
.deal-tab-panel {
  display: none;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.deal-tab-panel.active {
  display: flex;
  flex-direction: column;
}
.deal-tab-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  padding: 20px;
  background: var(--page);
}
.deal-tab-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
}
.deal-stats-grid,
.deal-insight-grid,
.deal-settings-grid,
.deal-file-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.deal-stat-tile,
.deal-insight-tile,
.deal-file-row,
.deal-setting-row {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfcf8;
}
.deal-stat-tile span,
.deal-insight-tile span,
.deal-file-row span,
.deal-setting-row span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}
.deal-stat-tile b,
.deal-insight-tile b,
.deal-file-row b,
.deal-setting-row b {
  display: block;
  margin-top: 6px;
  color: var(--navy);
  font-size: 18px;
  line-height: 1.15;
}
.deal-stat-tile small,
.deal-setting-row small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}
.deal-insight-tile.warning { border-color: #ffdca8; background: #fffaf0; }
.deal-insight-tile.danger { border-color: #ffc7ce; background: #fff6f7; }
.deal-file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.deal-file-row small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}
.deal-file-row button {
  height: 34px;
  border: 0;
  border-radius: 10px;
  padding: 0 12px;
  background: var(--mint);
  color: var(--green-dark);
  cursor: pointer;
  font: 900 10px Roboto, Inter, sans-serif;
}
.deal-file-row strong {
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}
.deal-file-drop {
  min-height: 130px;
  display: grid;
  place-content: center;
  gap: 8px;
  border: 1px dashed rgba(20,158,0,.35);
  border-radius: 18px;
  background: linear-gradient(135deg, #fbfff8, #fff);
  color: var(--muted);
  text-align: center;
  padding: 18px;
}
.deal-file-drop b { color: var(--navy); font-size: 16px; }
.deal-file-drop span { max-width: 560px; font-size: 12px; line-height: 1.5; }
.deal-workbench {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(340px, 400px) minmax(620px, 1fr) minmax(300px, 350px);
}
.deal-profile, .deal-center, .deal-widgets {
  min-height: 0;
  height: 100%;
  padding: 20px;
  overflow: auto;
  max-height: none;
}
.deal-profile { border-right: 1px solid var(--line); background: #fff; }
.deal-center {
  display: flex;
  min-width: 0;
  flex-direction: column;
  background: var(--page);
}
.deal-widgets { border-left: 1px solid var(--line); background: var(--paper-soft); }
.deal-profile-block {
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}
.deal-profile-heading,
.deal-profile-edit summary {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  color: var(--navy);
  font-weight: 900;
  cursor: pointer;
}
.deal-profile-heading span,
.deal-profile-edit summary span { font-size: 13px; }
.deal-profile-heading b,
.deal-profile-edit summary b {
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.deal-profile-edit summary { list-style: none; margin-bottom: 10px; }
.deal-profile-edit summary::-webkit-details-marker { display: none; }
.deal-profile-edit label { color: var(--muted); }
.deal-profile-edit input,
.deal-profile-edit select,
.deal-profile-edit textarea {
  background: #fff;
}
.deal-mini-card {
  display: grid;
  gap: 12px;
  padding: 12px 0 0;
}
.deal-mini-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.deal-mini-top b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 9px;
}
.deal-mini-card strong { color: var(--navy); font-size: 28px; line-height: 1; }
.deal-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
.deal-mini-grid span {
  min-width: 0;
  padding: 9px;
  border-radius: 12px;
  background: #f6f8f3;
}
.deal-mini-grid small,
.deal-mini-grid b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.deal-mini-grid small { color: var(--muted); font-size: 8px; }
.deal-mini-grid b { margin-top: 4px; color: var(--navy); font-size: 10px; }
.deal-side-section { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.deal-side-section h3, .deal-widgets h3 { color: var(--navy); font-size: 12px; margin-bottom: 10px; }
.contact-mini, .company-mini {
  display: grid;
  gap: 5px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  margin-top: 8px;
}
.contact-mini b, .company-mini b { color: var(--navy); font-size: 11px; }
.contact-mini span, .company-mini span, .contact-mini a, .company-mini a { color: var(--muted); font-size: 9px; overflow: hidden; text-overflow: ellipsis; }
.deal-action-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.deal-action-bar button, .deal-task-composer button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--navy);
  cursor: pointer;
  padding: 10px 13px;
  font: 800 10px Roboto, Inter, sans-serif;
}
.deal-action-bar button:hover { border-color: rgba(20,158,0,.35); color: var(--green-dark); background: #fbfff8; }
.deal-quick-panel {
  display: none;
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid rgba(20,158,0,.22);
  border-radius: 18px;
  background: linear-gradient(135deg, #fbfff8, #fff);
}
.deal-quick-panel.open { display: block; }
.deal-quick-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.deal-quick-head b { color: var(--navy); font-size: 14px; }
.deal-quick-head button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: #f2f4f8;
  color: var(--muted);
  cursor: pointer;
  font: 900 18px Roboto, Inter, sans-serif;
}
.deal-quick-grid {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 150px;
  gap: 10px;
}
.deal-quick-panel label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}
.deal-quick-panel input,
.deal-quick-panel select,
.deal-quick-panel textarea {
  width: 100%;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  padding: 11px;
  outline: 0;
  font: 800 11px Roboto, Inter, sans-serif;
}
.deal-quick-panel textarea {
  min-height: 88px;
  resize: vertical;
}
.deal-quick-task { margin-top: 10px; }
.deal-quick-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}
.deal-quick-actions .primary-btn,
.deal-quick-actions .period-btn { height: 40px; }
.deal-task-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px auto;
  gap: 8px;
  margin: 12px 0;
}
.deal-task-composer input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 11px;
  color: var(--ink);
  font: 700 10px Roboto, Inter, sans-serif;
}
.deal-task-composer .action-wide { width: auto; margin-top: 0; white-space: nowrap; }
.timeline-event { position: relative; padding-left: 46px; }
.timeline-event::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 15px;
  display: grid;
  place-items: center;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--mint);
  border: 5px solid #fff;
  box-shadow: 0 0 0 1px rgba(20,158,0,.24);
  color: var(--green-dark);
}
.timeline-event.call::before { background: #e8f1fb; box-shadow: 0 0 0 1px rgba(27,117,187,.24); }
.timeline-event.email::before { background: #f3e8f7; box-shadow: 0 0 0 1px rgba(87,0,84,.22); }
.timeline-event.meeting::before { background: #fff4df; box-shadow: 0 0 0 1px rgba(236,139,0,.24); }
.timeline-event.task::before { background: #fff8e8; box-shadow: 0 0 0 1px rgba(188,124,20,.28); }
.timeline-event.quote::before { background: #e6f7df; box-shadow: 0 0 0 1px rgba(20,158,0,.24); }
.timeline-event.contract::before { background: #f3e8f7; box-shadow: 0 0 0 1px rgba(87,0,84,.22); }
.timeline-event.invoice::before { background: #e6f7df; box-shadow: 0 0 0 1px rgba(20,158,0,.24); }
.timeline-event.ticket::before { background: #e8f1fb; box-shadow: 0 0 0 1px rgba(27,117,187,.24); }
.timeline-event.provisioning::before { background: #dff4d8; box-shadow: 0 0 0 1px rgba(20,158,0,.24); }
.timeline-event.done::before { background: #e6f7df; box-shadow: 0 0 0 1px rgba(20,158,0,.24); }
.timeline-event.change::before { background: #f3e8f7; box-shadow: 0 0 0 1px rgba(87,0,84,.22); }
.deal-widgets article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  margin-bottom: 12px;
}
.widget-row, .check-row, .resource-mini {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}
.widget-row:first-of-type, .check-row:first-of-type { border-top: 0; }
.widget-row b { color: var(--navy); }
.check-row { justify-content: flex-start; align-items: center; font-weight: 900; }
.check-row span { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #fff2f3; color: var(--red); }
.check-row.ok span { background: var(--mint); color: var(--green-dark); }
.resource-mini { display: grid; }
.resource-mini b { color: var(--navy); font-size: 18px; }
.resource-mini small { color: var(--muted); line-height: 1.45; }
.deal-layout { display: grid; grid-template-columns: 1fr 340px; gap: 20px; }
.deal-aside { border-left: 1px solid var(--line); padding-left: 18px; }
.quote-box { min-height: 72px; padding: 13px; border: 1px solid var(--line); border-radius: 18px; background: #f9faf7; color: var(--muted); font-size: 10px; line-height: 1.55; }
.quote-box b { display: block; color: var(--green-dark); font-size: 16px; margin-bottom: 5px; }
.quote-box pre { white-space: pre-wrap; margin: 10px 0 0; color: var(--ink-2); font: 10px/1.5 Roboto, Arial, sans-serif; }
.activity-box {
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 14px;
  display: flex;
  flex-direction: column;
}
.activity-box-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.activity-box h3 { color: var(--navy); font-size: 12px; margin-bottom: 2px; }
.activity-box-head span { color: var(--muted); font-size: 9px; font-weight: 800; }
.deal-next-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(18,22,25,.04);
}
.deal-next-action b { display: block; color: var(--navy); font-size: 12px; }
.deal-next-action span { display: block; color: var(--muted); font-size: 10px; margin-top: 3px; line-height: 1.35; }
.deal-next-action button, .activity-actions button {
  border: 0;
  border-radius: 10px;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  padding: 9px 12px;
  font: 900 10px Roboto, Inter, sans-serif;
  white-space: nowrap;
}
.deal-next-action.warn { border-color: #ffe1a8; background: #fffaf0; }
.deal-next-action.danger { border-color: #ffd1d4; background: #fff8f8; }
.deal-next-action.good { border-color: rgba(20,158,0,.2); background: #fbfff8; }
.next-action-hero {
  flex: none;
  margin: 0 0 12px;
  padding: 18px;
  border-radius: 20px;
  box-shadow: 0 16px 36px rgba(33, 58, 44, .08);
}
.next-action-hero .next-action-copy {
  min-width: 0;
}
.next-action-hero .next-action-copy > span {
  margin: 0 0 5px;
  color: var(--green-dark);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.next-action-hero .next-action-copy > b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--navy);
  font-size: 22px;
  line-height: 1.1;
}
.next-action-hero .next-action-copy > small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.next-action-buttons {
  flex: none;
  display: flex;
  gap: 8px;
}
.next-action-buttons .secondary {
  background: #f2f4f8;
  color: var(--navy);
  border: 1px solid var(--line);
}
.deal-checkline {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: -2px 0 12px;
}
.deal-checkline span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: #fff7e6;
  color: #9a6600;
  font-size: 9px;
  font-weight: 900;
}
.deal-checkline span.ok {
  background: var(--mint);
  color: var(--green-dark);
}
.activity-filters {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 0 0 9px;
  margin-bottom: 8px;
}
.activity-filters button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-2);
  cursor: pointer;
  padding: 8px 11px;
  font: 900 10px Roboto, Inter, sans-serif;
}
.activity-filters button.active { background: var(--green); border-color: var(--green); color: #fff; }
.activity-filters span {
  display: inline-grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  border-radius: 999px;
  background: rgba(20,158,0,.08);
  color: var(--green-dark);
  font-size: 9px;
}
.activity-filters button.active span { background: rgba(255,255,255,.22); color: #fff; }
#activity-list {
  flex: 1 1 auto;
  min-height: 260px;
  max-height: none;
  overflow: auto;
  padding-right: 6px;
}
.activity-item {
  margin-bottom: 8px;
  padding: 10px 13px 10px 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.activity-item b { display: block; color: var(--navy); font-size: 11px; }
.activity-item span, .empty-state { color: var(--muted); font-size: 9px; }
.activity-item p { margin-top: 4px; color: var(--ink); font-size: 11px; line-height: 1.4; }
.activity-row-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.activity-row-head b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.activity-row-head em {
  flex: none;
  margin-left: auto;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 999px;
  background: #f4f6f1;
  color: var(--muted);
  padding: 5px 8px;
  font-style: normal;
  font-size: 8px;
  font-weight: 900;
}
.activity-kind {
  flex: none;
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--mint);
  color: var(--green-dark) !important;
  font-size: 8px !important;
  font-weight: 900;
  letter-spacing: .05em;
}
.timeline-event.call .activity-kind { background: #e8f1fb; color: var(--blue) !important; }
.timeline-event.email .activity-kind,
.timeline-event.change .activity-kind { background: #f3e8f7; color: var(--purple) !important; }
.timeline-event.meeting .activity-kind,
.timeline-event.task .activity-kind { background: #fff4df; color: var(--orange) !important; }
.timeline-event.invoice .activity-kind,
.timeline-event.provisioning .activity-kind { background: #e8f7df; color: var(--green-dark) !important; }
.timeline-event.ticket .activity-kind { background: #e8f1fb; color: var(--blue) !important; }
.timeline-event.contract .activity-kind { background: #f3e8f7; color: var(--purple) !important; }
.activity-meta { display: block; margin-top: 4px; }
.activity-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.activity-actions button {
  background: #f0f4ee;
  color: var(--navy);
  border: 1px solid var(--line);
  padding: 8px 10px;
}
.activity-actions button:hover { border-color: rgba(20,158,0,.28); color: var(--green-dark); }
.deal-modal-shell > .modal-actions {
  flex: none;
  align-items: center;
  min-height: 72px;
  box-shadow: 0 -10px 24px rgba(18,22,25,.04);
}
.deal-modal-shell:not(.dirty) > .deal-modal-actions { display: none !important; }
.deal-modal-shell.dirty > .deal-modal-actions { display: flex !important; }
.save-hint {
  margin-right: auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}
.deal-modal-shell > .modal-actions .period-btn {
  background: #f2f4f8;
  color: var(--ink-2);
  border-color: transparent;
}
.deal-widgets article:nth-of-type(2) {
  border-color: rgba(20,158,0,.22);
  box-shadow: 0 12px 28px rgba(33, 58, 44, .07);
}
.deal-widgets article:nth-of-type(2) h3 {
  color: var(--green-dark);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.check-row:not(.ok) {
  color: var(--red);
  background: #fff8f8;
  margin-inline: -4px;
  padding-inline: 4px;
  border-radius: 10px;
}
.lists-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.lists-entities {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}
.lists-entities button {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  width: auto;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 10px 16px;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}
.lists-entities button span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 12px;
  background: var(--purple-soft);
  color: var(--purple);
  font-size: 10px;
  font-weight: 900;
}
.lists-entities button b,
.lists-entities button small {
  min-width: 0;
  white-space: normal;
}
.lists-entities button b { font-size: 14px; }
.lists-entities button small { color: var(--muted); font-size: 11px; }
.lists-entities button:hover,
.lists-entities button.active {
  border-color: rgba(39,159,0,.35);
  background: linear-gradient(180deg, #fff, #f7fff2);
}
.lists-entities button.active span { background: var(--green); color: #fff; }
.lists-panel { min-width: 0; overflow: hidden; }
.lists-toolbar {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(260px, 540px);
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}
.lists-toolbar h3 {
  margin: 4px 0;
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
}
.lists-toolbar span:not(.counter) { color: var(--muted); font-size: 11px; }
.lists-toolbar #lists-active-meta { font-size: 13px; }
#lists .lists-search { display: flex; width: 100%; }
#lists > .section-head .header-actions label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
#registry-group-filter { min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); font: inherit; }
.lists-secondary-tools { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.lists-tools[open] { flex-basis: 100%; }
.lists-tools { min-width: 0; }
.lists-tools > summary { width: fit-content; min-height: 40px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); font-size: 13px; font-weight: 600; cursor: pointer; }
.lists-tools > .lists-bulk-actions { margin-top: 10px; }
.lists-filter-panel .lists-filters { margin-top: 10px; }
.lists-tools summary:focus-visible, .list-record-link:focus-visible { outline: 2px solid var(--green-dark); outline-offset: 2px; }
#lists-bulkbar[hidden], #lists-bulk-edit[hidden], #lists-template[hidden], #lists-import-control[hidden], #lists-bulk-delete[hidden], #lists-active-filters[hidden], #lists-count[hidden] { display: none; }
.lists-filters {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(220px, 1fr) auto auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fbfcf8;
}
.lists-filters label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.lists-filters input,
.lists-filters select,
.list-edit-fields input,
.list-edit-fields select,
.list-edit-fields textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 0 11px;
  color: var(--ink);
  font: 500 13px Roboto, Inter, sans-serif;
  outline: 0;
}
.list-edit-fields textarea {
  min-height: 94px;
  padding: 10px 11px;
  resize: vertical;
}
.lists-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 24px;
  align-items: center;
  margin: 8px 0;
  color: var(--muted);
  font-size: 12px;
}
.list-filter-chip {
  border: 1px solid rgba(39,159,0,.22);
  border-radius: 999px;
  background: var(--mint);
  color: var(--green-dark);
  padding: 7px 10px;
  cursor: pointer;
  font: 900 10px Roboto, Inter, sans-serif;
}
.lists-bulkbar {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid rgba(81,40,79,.14);
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, #fbfcf8);
}
.lists-bulk-summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.lists-bulk-summary b {
  color: var(--green-dark);
  font-size: 12px;
}
.lists-bulk-summary small {
  color: var(--muted);
  font-size: 10px;
}
.lists-bulk-actions,
.lists-bulk-edit {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
}
.lists-bulk-edit label {
  display: grid;
  gap: 6px;
  min-width: 190px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}
.lists-bulk-edit input,
.lists-bulk-edit select {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 0 11px;
  color: var(--ink);
  font: 700 12px Roboto, Inter, sans-serif;
  outline: 0;
}
.lists-table-scroll {
  max-width: 100%;
  max-height: 70vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}
.lists-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}
.lists-table caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.lists-table th,
.lists-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 13px;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.45;
  background: var(--paper);
}
.lists-table .list-check-cell {
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  text-align: center;
  position: sticky;
  left: 0;
  z-index: 1;
}
.lists-table .list-id-cell { position: sticky; left: 44px; z-index: 1; font-variant-numeric: tabular-nums; font-weight: 700; }
.lists-table .list-primary-cell { font-weight: 600; }
.lists-table .list-money-cell { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.list-record-link { border: 0; padding: 4px 0; background: transparent; color: var(--green-dark); cursor: pointer; font: inherit; text-align: left; }
.list-record-link:hover { text-decoration: underline; }
.list-check-cell input {
  display: block;
  margin: 0 auto;
  width: 16px;
  height: 16px;
  accent-color: var(--green);
}
.lists-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f7faf3;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 700;
}
.lists-table th.list-check-cell, .lists-table th.list-id-cell { z-index: 3; }
.lists-table tr:hover td, .lists-table .list-row-selected td { background: var(--mint); }
.list-row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.list-row-actions .period-btn,
.list-row-actions .danger-btn {
  flex: none;
  white-space: nowrap;
  min-height: 36px;
  height: auto;
  padding: 6px 9px;
  font-size: 12px;
}
.mini-danger { margin-right: 0; }
.lists-pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.lists-pagination button:disabled,
.list-row-actions button:disabled {
  opacity: .45;
  cursor: not-allowed;
}
.list-edit-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.list-edit-fields label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}
.list-edit-fields label:has(textarea),
.list-edit-fields .inline-checkbox {
  grid-column: 1 / -1;
}
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 0; padding: 16px 24px; border-top: 1px solid var(--line); background: #fff; }
.danger-btn { height: 40px; margin-right: auto; padding: 0 14px; border: 1px solid #f0c8cd; border-radius: 8px; background: #fff2f3; color: var(--red); cursor: pointer; font: 800 11px Roboto, Inter, sans-serif; }

html[data-theme="dark"] body {
  background:
    radial-gradient(circle at 20% 0%, rgba(76, 194, 31, .08), transparent 30%),
    radial-gradient(circle at 88% 8%, rgba(167, 91, 163, .12), transparent 28%),
    var(--page);
}
html[data-theme="dark"] .auth-screen {
  background:
    radial-gradient(circle at 20% 20%, rgba(76, 194, 31, .14), transparent 28%),
    radial-gradient(circle at 86% 18%, rgba(167, 91, 163, .18), transparent 30%),
    var(--page);
}
html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .auth-card,
html[data-theme="dark"] .hero,
html[data-theme="dark"] .safe-stats article,
html[data-theme="dark"] .metric-card,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .attention-card,
html[data-theme="dark"] .client-card,
html[data-theme="dark"] .dc-card,
html[data-theme="dark"] .task-column,
html[data-theme="dark"] .module-card,
html[data-theme="dark"] .kanban-column,
html[data-theme="dark"] .column-head,
html[data-theme="dark"] .deal-card,
html[data-theme="dark"] .permission-row,
html[data-theme="dark"] .permissions-tabs,
html[data-theme="dark"] .ticket-column,
html[data-theme="dark"] .ticket-card,
html[data-theme="dark"] .operation-row,
html[data-theme="dark"] .operations-panel,
html[data-theme="dark"] .ip-card,
html[data-theme="dark"] .billing-panel,
html[data-theme="dark"] .billing-row,
html[data-theme="dark"] .billing-auto,
html[data-theme="dark"] .billing-outbox-row,
html[data-theme="dark"] .lead-list-row,
html[data-theme="dark"] .client-list-row,
html[data-theme="dark"] .list-row,
html[data-theme="dark"] .timeline-row,
html[data-theme="dark"] .report-tile,
html[data-theme="dark"] .rack-detail,
html[data-theme="dark"] .rack-card,
html[data-theme="dark"] .rack-client-card,
html[data-theme="dark"] .rack-unit-mode,
html[data-theme="dark"] .unit-detail-card,
html[data-theme="dark"] .compact-card,
html[data-theme="dark"] .summary-card,
html[data-theme="dark"] .modal,
html[data-theme="dark"] .deal-modal-shell,
html[data-theme="dark"] .deal-profile,
html[data-theme="dark"] .deal-center,
html[data-theme="dark"] .deal-widgets,
html[data-theme="dark"] .modal-actions,
html[data-theme="dark"] .safe-note,
html[data-theme="dark"] .profile {
  background: var(--paper);
  border-color: var(--line);
  box-shadow: 0 16px 36px rgba(0, 0, 0, .18);
}
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .search,
html[data-theme="dark"] .notification-toggle,
html[data-theme="dark"] .pipeline-search,
html[data-theme="dark"] #pipeline-owner-filter,
html[data-theme="dark"] .pipeline-filter-group,
html[data-theme="dark"] .attention-filter-group,
html[data-theme="dark"] .period-btn,
html[data-theme="dark"] .ghost-btn,
html[data-theme="dark"] .secondary-action,
html[data-theme="dark"] .action-wide,
html[data-theme="dark"] .column-add,
html[data-theme="dark"] .deal-date,
html[data-theme="dark"] .deal-meta span,
html[data-theme="dark"] .task-chip b,
html[data-theme="dark"] .permission-check,
html[data-theme="dark"] .permission-role-pill,
html[data-theme="dark"] .permission-chip-list span,
html[data-theme="dark"] .nav-item i,
html[data-theme="dark"] .theme-toggle {
  background: var(--paper-soft);
  border-color: var(--line);
  color: var(--ink);
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: #7f8a7c;
}
html[data-theme="dark"] .attention-filter-group button:not(.active),
html[data-theme="dark"] .pipeline-filter-group button:not(.active) {
  background: var(--paper-soft);
  color: var(--muted);
}
html[data-theme="dark"] .nav-item:hover,
html[data-theme="dark"] .nav-item.active {
  background: var(--purple-soft);
}
html[data-theme="dark"] .hero-slogan,
html[data-theme="dark"] .section-head p,
html[data-theme="dark"] .panel-head p {
  color: var(--muted);
}
html[data-theme="dark"] .deal-card:hover {
  border-color: rgba(76, 194, 31, .5);
  box-shadow: 0 12px 26px rgba(0, 0, 0, .28);
}
html[data-theme="dark"] .deal-card.overdue::after { box-shadow: 0 0 0 4px rgba(255, 93, 104, .14); }
html[data-theme="dark"] .deal-card.today::after { box-shadow: 0 0 0 4px rgba(255, 192, 77, .14); }
html[data-theme="dark"] .deal-card.no-task::after { box-shadow: 0 0 0 4px rgba(200, 178, 122, .14); }
html[data-theme="dark"] .task-chip.overdue b { background: rgba(255, 93, 104, .13); }
html[data-theme="dark"] .task-chip.today b { background: rgba(255, 192, 77, .13); }
html[data-theme="dark"] .task-chip.no-task b { background: rgba(200, 178, 122, .14); color: #e7d39a; }
html[data-theme="dark"] .permission-status.blocked { background: rgba(255, 93, 104, .12); }
html[data-theme="dark"] .deal-service { color: var(--blue); }
html[data-theme="dark"] .main-nav::-webkit-scrollbar-thumb { background: #354632; }
html[data-theme="dark"] .danger-btn { background: rgba(255, 93, 104, .12); border-color: rgba(255, 93, 104, .28); }
html[data-theme="dark"] .events-toolbar,
html[data-theme="dark"] .events-toolbar select,
html[data-theme="dark"] .events-stats article,
html[data-theme="dark"] .event-card {
  background: var(--paper);
  border-color: var(--line);
  color: var(--ink);
}
html[data-theme="dark"] .events-toolbar { background: rgba(20, 26, 21, .92); }
html[data-theme="dark"] .events-stats b,
html[data-theme="dark"] .event-card h3 { color: var(--navy); }
html[data-theme="dark"] .event-source { background: rgba(76, 194, 31, .14); color: var(--green-dark); }
html[data-theme="dark"] .event-severity.critical { background: rgba(255, 93, 104, .14); color: #ff8c97; }
html[data-theme="dark"] .event-severity.warning { background: rgba(255, 192, 77, .14); color: #ffd280; }
html[data-theme="dark"] .event-severity.info { background: rgba(77, 166, 255, .14); color: #8ec7ff; }
html[data-theme="dark"] .notification-popover,
html[data-theme="dark"] .notification-item,
html[data-theme="dark"] .notification-rule-form,
html[data-theme="dark"] .notification-rule-row {
  background: var(--paper);
  border-color: var(--line);
  color: var(--ink);
}
html[data-theme="dark"] .notification-toggle.has-unread { background: rgba(255, 93, 104, .12); }
html[data-theme="dark"] .notification-dot { background: rgba(76, 194, 31, .18); color: #8bf168; }
html[data-theme="dark"] .notification-toggle.has-unread .notification-dot { background: rgba(255, 93, 104, .18); color: #ff98a1; }
html[data-theme="dark"] .notification-head b,
html[data-theme="dark"] .notification-item b,
html[data-theme="dark"] .notification-rule-row b { color: var(--navy); }
html[data-theme="dark"] .notification-line small { background: var(--paper-soft); color: var(--muted); }
html[data-theme="dark"] .notification-rule-row span { color: #8bf168; }

html[data-theme="dark"] .auth-card,
html[data-theme="dark"] .pipeline-toolbar {
  background: rgba(20, 26, 21, .94);
}
html[data-theme="dark"] .pipeline-toolbar,
html[data-theme="dark"] .deal-card-head,
html[data-theme="dark"] .deal-tabs,
html[data-theme="dark"] .deal-stage-line {
  border-color: var(--line);
}
html[data-theme="dark"] .pipeline-search,
html[data-theme="dark"] #pipeline-owner-filter,
html[data-theme="dark"] .pipeline-filter-group,
html[data-theme="dark"] .attention-filter-group,
html[data-theme="dark"] .task-item,
html[data-theme="dark"] .service-stats article,
html[data-theme="dark"] .ticket-column,
html[data-theme="dark"] .ticket-card,
html[data-theme="dark"] .service-detail,
html[data-theme="dark"] .ticket-description,
html[data-theme="dark"] .ticket-note-box textarea,
html[data-theme="dark"] .operations-stats article,
html[data-theme="dark"] .operation-row,
html[data-theme="dark"] .ip-card,
html[data-theme="dark"] .billing-stats article,
html[data-theme="dark"] .billing-row,
html[data-theme="dark"] .billing-ticket-row,
html[data-theme="dark"] .billing-payment-row,
html[data-theme="dark"] .lead-summary-row article,
html[data-theme="dark"] .rack-stats article,
html[data-theme="dark"] .rack-object-tabs button,
html[data-theme="dark"] .rack-tabs button,
html[data-theme="dark"] .rack-tile,
html[data-theme="dark"] .rack-service-links button,
html[data-theme="dark"] .rack-ops-card,
html[data-theme="dark"] .unit-client,
html[data-theme="dark"] .rack-unit,
html[data-theme="dark"] .category-pill,
html[data-theme="dark"] .cpq-service,
html[data-theme="dark"] .summary-card,
html[data-theme="dark"] .cpq-line,
html[data-theme="dark"] .quantity,
html[data-theme="dark"] .catalog-admin-row,
html[data-theme="dark"] .history-item button,
html[data-theme="dark"] .recognition-status,
html[data-theme="dark"] .modal-hint,
html[data-theme="dark"] .inline-checkbox,
html[data-theme="dark"] .settings-section,
html[data-theme="dark"] .settings-menu,
html[data-theme="dark"] .settings-card,
html[data-theme="dark"] .deal-tab-card,
html[data-theme="dark"] .deal-stat-tile,
html[data-theme="dark"] .deal-insight-tile,
html[data-theme="dark"] .deal-file-row,
html[data-theme="dark"] .deal-setting-row,
html[data-theme="dark"] .deal-profile-block,
html[data-theme="dark"] .deal-mini-grid span,
html[data-theme="dark"] .contact-mini,
html[data-theme="dark"] .company-mini,
html[data-theme="dark"] .deal-action-bar button,
html[data-theme="dark"] .deal-quick-head button,
html[data-theme="dark"] .deal-task-composer input,
html[data-theme="dark"] .deal-widgets article,
html[data-theme="dark"] .quote-box,
html[data-theme="dark"] .deal-next-action,
html[data-theme="dark"] .activity-filters button,
html[data-theme="dark"] .activity-item,
html[data-theme="dark"] .activity-row-head em,
html[data-theme="dark"] .activity-actions button,
html[data-theme="dark"] .modal-actions,
html[data-theme="dark"] .lists-toolbar,
html[data-theme="dark"] .lists-entities,
html[data-theme="dark"] .lists-filters,
html[data-theme="dark"] .list-edit-fields,
html[data-theme="dark"] .lists-bulk-edit,
html[data-theme="dark"] .notification-template-row,
html[data-theme="dark"] .notification-rule-form,
html[data-theme="dark"] .notification-rule-row {
  background: var(--paper);
  border-color: var(--line);
  color: var(--ink);
}
html[data-theme="dark"] .settings-menu button.active {
  background: rgba(31,184,0,.14);
  border-color: rgba(76,208,38,.32);
}
html[data-theme="dark"] .settings-form input,
html[data-theme="dark"] .settings-form select,
html[data-theme="dark"] .settings-form textarea,
html[data-theme="dark"] .notification-template-row input:not([type="checkbox"]),
html[data-theme="dark"] .notification-template-row textarea {
  background: var(--paper);
  border-color: var(--line);
  color: var(--ink);
}
html[data-theme="dark"] .deal-card-head,
html[data-theme="dark"] .deal-tabs,
html[data-theme="dark"] .deal-stage-line,
html[data-theme="dark"] .deal-profile,
html[data-theme="dark"] .deal-widgets {
  background: var(--paper);
}
html[data-theme="dark"] .deal-center,
html[data-theme="dark"] .deal-tab-content {
  background: var(--page);
}
html[data-theme="dark"] .deal-card-head .action-wide,
html[data-theme="dark"] .deal-card-head .secondary-action,
html[data-theme="dark"] .next-action-buttons .secondary,
html[data-theme="dark"] .deal-modal-shell > .modal-actions .period-btn,
html[data-theme="dark"] .secondary-action,
html[data-theme="dark"] .deal-card-footer .mini-action,
html[data-theme="dark"] .billing-doc-actions button:first-child {
  background: var(--paper-soft) !important;
  border-color: var(--line) !important;
  color: var(--ink) !important;
}
html[data-theme="dark"] #make-quote,
html[data-theme="dark"] .primary-btn,
html[data-theme="dark"] .button-primary-like,
html[data-theme="dark"] .strip-cta,
html[data-theme="dark"] .add {
  background: var(--green);
  border-color: var(--green);
  color: #071006;
}
html[data-theme="dark"] button:disabled,
html[data-theme="dark"] .deal-card-head .action-wide:disabled,
html[data-theme="dark"] .deal-card-head .secondary-action:disabled {
  opacity: .45;
  color: var(--muted) !important;
}
html[data-theme="dark"] .deal-tabs button:hover,
html[data-theme="dark"] .deal-tabs button.active {
  background: rgba(76, 194, 31, .12);
  color: var(--ink);
}
html[data-theme="dark"] .deal-stage-line span {
  background: var(--paper-soft);
  color: var(--muted);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.03);
}
html[data-theme="dark"] .deal-stage-line span.done {
  background: rgba(76, 194, 31, .14);
  color: var(--green-dark);
}
html[data-theme="dark"] .deal-stage-line span.current {
  background: rgba(76, 194, 31, .1);
  color: var(--green-dark);
  box-shadow: inset 0 0 0 2px var(--green);
}
html[data-theme="dark"] .deal-stage-index,
html[data-theme="dark"] .activity-filters span {
  background: rgba(76, 194, 31, .16);
  color: var(--green-dark);
}
html[data-theme="dark"] .deal-stage-advice,
html[data-theme="dark"] .deal-stage-advice.good,
html[data-theme="dark"] .deal-next-action.good,
html[data-theme="dark"] .deal-quick-panel,
html[data-theme="dark"] .deal-file-drop,
html[data-theme="dark"] .rack-service-links,
html[data-theme="dark"] .rack-ops-panel,
html[data-theme="dark"] .provisioning-result,
html[data-theme="dark"] .billing-auto article {
  background: linear-gradient(135deg, rgba(76, 194, 31, .07), rgba(167, 91, 163, .04)), var(--paper);
  border-color: var(--line);
  color: var(--ink);
}
html[data-theme="dark"] .ticket-card.danger,
html[data-theme="dark"] .deal-insight-tile.danger,
html[data-theme="dark"] .deal-next-action.danger,
html[data-theme="dark"] .billing-auto-error {
  background: rgba(255, 93, 104, .1);
  border-color: rgba(255, 93, 104, .28);
  color: #ff8991;
}
html[data-theme="dark"] .ticket-card.warning,
html[data-theme="dark"] .deal-insight-tile.warning,
html[data-theme="dark"] .deal-stage-advice.warn,
html[data-theme="dark"] .deal-next-action.warn {
  background: rgba(255, 192, 77, .1);
  border-color: rgba(255, 192, 77, .28);
  color: #ffd47d;
}
html[data-theme="dark"] .sla-pill.warning,
html[data-theme="dark"] .billing-status.warning,
html[data-theme="dark"] .deal-checkline span,
html[data-theme="dark"] .task-chip.today b {
  background: rgba(255, 192, 77, .13);
  color: #ffd47d;
}
html[data-theme="dark"] .sla-pill.danger,
html[data-theme="dark"] .billing-status.danger,
html[data-theme="dark"] .task-chip.overdue b,
html[data-theme="dark"] .check-row span {
  background: rgba(255, 93, 104, .13);
  color: #ff8991;
}
html[data-theme="dark"] .billing-status.neutral,
html[data-theme="dark"] .rack-status.reserved {
  background: rgba(167, 91, 163, .16);
  color: #e3a8df;
}
html[data-theme="dark"] .billing-auto-grid span,
html[data-theme="dark"] .billing-flags span,
html[data-theme="dark"] .billing-worker,
html[data-theme="dark"] .billing-worker-row,
html[data-theme="dark"] .billing-outbox-row,
html[data-theme="dark"] .provisioning-flags,
html[data-theme="dark"] .provisioning-flags .checkbox,
html[data-theme="dark"] .provisioning-check,
html[data-theme="dark"] .provisioning-run,
html[data-theme="dark"] .cpq-line input,
html[data-theme="dark"] .catalog-service-form input,
html[data-theme="dark"] .catalog-service-form select,
html[data-theme="dark"] .catalog-admin-row input,
html[data-theme="dark"] .catalog-admin-row select,
html[data-theme="dark"] .deal-profile-edit input,
html[data-theme="dark"] .deal-profile-edit select,
html[data-theme="dark"] .deal-profile-edit textarea,
html[data-theme="dark"] .deal-quick-panel input,
html[data-theme="dark"] .deal-quick-panel select,
html[data-theme="dark"] .deal-quick-panel textarea,
html[data-theme="dark"] .client-panel input,
html[data-theme="dark"] .client-panel select,
html[data-theme="dark"] .provisioning-form input,
html[data-theme="dark"] .provisioning-form select,
html[data-theme="dark"] .provisioning-form textarea {
  background: var(--paper-soft);
  border-color: var(--line);
  color: var(--ink);
  box-shadow: none;
}
html[data-theme="dark"] .billing-outbox-row b,
html[data-theme="dark"] .billing-worker-head b,
html[data-theme="dark"] .billing-worker-row b,
html[data-theme="dark"] .billing-row b,
html[data-theme="dark"] .billing-row strong,
html[data-theme="dark"] .billing-ticket-row b,
html[data-theme="dark"] .billing-payment-row b,
html[data-theme="dark"] .billing-payment-row strong,
html[data-theme="dark"] .operation-row b,
html[data-theme="dark"] .ip-card b,
html[data-theme="dark"] .ticket-card strong,
html[data-theme="dark"] .task-item strong,
html[data-theme="dark"] .cpq-service b,
html[data-theme="dark"] .cpq-line .cart-title,
html[data-theme="dark"] .history-head,
html[data-theme="dark"] .history-item button,
html[data-theme="dark"] .deal-tab-card b,
html[data-theme="dark"] .deal-profile-heading,
html[data-theme="dark"] .deal-profile-edit summary,
html[data-theme="dark"] .deal-mini-grid b,
html[data-theme="dark"] .contact-mini b,
html[data-theme="dark"] .company-mini b,
html[data-theme="dark"] .deal-action-bar button,
html[data-theme="dark"] .deal-next-action b,
html[data-theme="dark"] .activity-item b,
html[data-theme="dark"] .resource-mini b {
  color: var(--ink);
}
html[data-theme="dark"] .service-stats b,
html[data-theme="dark"] .operations-stats b,
html[data-theme="dark"] .billing-stats b,
html[data-theme="dark"] .rack-stats b,
html[data-theme="dark"] .lead-summary-row b,
html[data-theme="dark"] .report-tile b,
html[data-theme="dark"] .metric-card h3 {
  color: var(--ink);
}
html[data-theme="dark"] .deal-note,
html[data-theme="dark"] .deal-contact,
html[data-theme="dark"] .deal-card-footer .owner,
html[data-theme="dark"] .deal-meta span,
html[data-theme="dark"] .ticket-card small,
html[data-theme="dark"] .ticket-description,
html[data-theme="dark"] .billing-auto small,
html[data-theme="dark"] .billing-worker-head span,
html[data-theme="dark"] .billing-worker-row span,
html[data-theme="dark"] .billing-outbox-row span,
html[data-theme="dark"] .billing-row small,
html[data-theme="dark"] .billing-row span,
html[data-theme="dark"] .billing-payment-row small,
html[data-theme="dark"] .billing-payment-row span,
html[data-theme="dark"] .operation-row small,
html[data-theme="dark"] .operation-row span,
html[data-theme="dark"] .ip-card small,
html[data-theme="dark"] .rack-tile span,
html[data-theme="dark"] .rack-tile small,
html[data-theme="dark"] .contact-mini span,
html[data-theme="dark"] .company-mini span,
html[data-theme="dark"] .contact-mini a,
html[data-theme="dark"] .company-mini a,
html[data-theme="dark"] .activity-item span,
html[data-theme="dark"] .empty-state {
  color: var(--muted);
}
html[data-theme="dark"] .activity-item p,
html[data-theme="dark"] .quote-box pre,
html[data-theme="dark"] .ticket-events p,
html[data-theme="dark"] .timeline-row p {
  color: var(--ink-2);
}
html[data-theme="dark"] .activity-kind {
  background: rgba(76, 194, 31, .16);
  color: var(--green-dark) !important;
}
html[data-theme="dark"] .timeline-event::before {
  border-color: var(--paper);
  box-shadow: 0 0 0 1px rgba(76, 194, 31, .28);
}
html[data-theme="dark"] .timeline-event.call::before,
html[data-theme="dark"] .timeline-event.ticket::before,
html[data-theme="dark"] .timeline-event.call .activity-kind,
html[data-theme="dark"] .timeline-event.ticket .activity-kind {
  background: rgba(112, 183, 255, .14);
  color: var(--blue) !important;
}
html[data-theme="dark"] .timeline-event.email::before,
html[data-theme="dark"] .timeline-event.change::before,
html[data-theme="dark"] .timeline-event.contract::before,
html[data-theme="dark"] .timeline-event.email .activity-kind,
html[data-theme="dark"] .timeline-event.change .activity-kind,
html[data-theme="dark"] .timeline-event.contract .activity-kind {
  background: rgba(167, 91, 163, .16);
  color: #e3a8df !important;
}
html[data-theme="dark"] .timeline-event.meeting::before,
html[data-theme="dark"] .timeline-event.task::before,
html[data-theme="dark"] .timeline-event.meeting .activity-kind,
html[data-theme="dark"] .timeline-event.task .activity-kind {
  background: rgba(255, 192, 77, .13);
  color: #ffd47d !important;
}
html[data-theme="dark"] .machinery-plan {
  background:
    linear-gradient(90deg, rgba(154, 180, 143, .08) 1px, transparent 1px),
    linear-gradient(rgba(154, 180, 143, .08) 1px, transparent 1px),
    #101711;
  border-color: var(--line);
}
html[data-theme="dark"] .machine-room-outline {
  background: rgba(20, 26, 21, .76);
  border-color: #6f7d68;
}
html[data-theme="dark"] .machine-room-outline::before,
html[data-theme="dark"] .machine-room-outline::after {
  background: var(--paper);
  border-color: #6f7d68;
}
html[data-theme="dark"] .hermozone {
  background:
    linear-gradient(90deg, rgba(255, 93, 104, .12) 0 8px, transparent 8px calc(100% - 8px), rgba(255, 93, 104, .12) calc(100% - 8px)),
    rgba(20, 26, 21, .88);
  border-color: rgba(255, 93, 104, .3);
}
html[data-theme="dark"] .rack-tile.client {
  background: linear-gradient(180deg, rgba(76, 194, 31, .14), rgba(20, 26, 21, .96));
}
html[data-theme="dark"] .rack-tile.unit,
html[data-theme="dark"] .unit-legend i.storage,
html[data-theme="dark"] .rack-unit.storage {
  background: rgba(112, 183, 255, .12);
}
html[data-theme="dark"] .rack-tile.reserved,
html[data-theme="dark"] .unit-legend i.network,
html[data-theme="dark"] .rack-unit.network {
  background: rgba(167, 91, 163, .14);
}
html[data-theme="dark"] .unit-client.busy,
html[data-theme="dark"] .unit-client.unit-merged,
html[data-theme="dark"] .rack-unit.compute {
  background: rgba(76, 194, 31, .12);
}
html[data-theme="dark"] .unit-client.unit-joined {
  background: rgba(76, 194, 31, .07);
  border-color: rgba(76, 194, 31, .22);
}
html[data-theme="dark"] .soft-pill,
html[data-theme="dark"] .deal-date,
html[data-theme="dark"] .deal-meta span {
  background: var(--paper-soft);
  color: var(--muted);
}
html[data-theme="dark"] .progress,
html[data-theme="dark"] .action-wide,
html[data-theme="dark"] .ghost-btn,
html[data-theme="dark"] .period-btn,
html[data-theme="dark"] .mini-action,
html[data-theme="dark"] .client360-row,
html[data-theme="dark"] .client360-detail,
html[data-theme="dark"] .finance-rule-grid article,
html[data-theme="dark"] .client360-item,
html[data-theme="dark"] .client360-link,
html[data-theme="dark"] .lists-entities button,
html[data-theme="dark"] .lists-bulkbar,
html[data-theme="dark"] .lists-table-scroll,
html[data-theme="dark"] .lists-table th,
html[data-theme="dark"] .lists-table td,
html[data-theme="dark"] .list-edit-fields,
html[data-theme="dark"] .permission-check,
html[data-theme="dark"] .provisioning-ready {
  background: var(--paper-soft);
  border-color: var(--line);
  color: var(--ink);
}
html[data-theme="dark"] .client360-row:hover,
html[data-theme="dark"] .client360-row.active,
html[data-theme="dark"] .client360-item-button:hover,
html[data-theme="dark"] .lists-entities button:hover,
html[data-theme="dark"] .lists-entities button.active {
  background: linear-gradient(135deg, rgba(76, 194, 31, .1), rgba(76, 194, 31, .03)), var(--paper);
  border-color: rgba(76, 194, 31, .35);
}
html[data-theme="dark"] .lists-table tr:hover td,
html[data-theme="dark"] .lists-table .list-row-selected td { background: var(--mint); }
html[data-theme="dark"] .client360-stats article,
html[data-theme="dark"] .mini-empty,
html[data-theme="dark"] .lists-entities button span,
html[data-theme="dark"] .list-filter-chip {
  background: rgba(76, 194, 31, .12);
  color: var(--green-dark);
  border-color: rgba(76, 194, 31, .25);
}
html[data-theme="dark"] .client360-stats article.attention,
html[data-theme="dark"] .finance-rule-grid article.attention,
html[data-theme="dark"] .client360-item.attention,
html[data-theme="dark"] .provisioning-check.block > span {
  background: rgba(255, 93, 104, .1);
  border-color: rgba(255, 93, 104, .28);
  color: #ff8991;
}
html[data-theme="dark"] .provisioning-check.ok > span {
  background: rgba(76, 194, 31, .16);
  color: var(--green-dark);
}
html[data-theme="dark"] .provisioning-check.warn > span {
  background: rgba(255, 192, 77, .13);
  color: #ffd47d;
}
html[data-theme="dark"] .provisioning-form input:focus,
html[data-theme="dark"] .provisioning-form select:focus,
html[data-theme="dark"] .provisioning-form textarea:focus {
  background-color: var(--paper);
  box-shadow: 0 0 0 4px rgba(76, 194, 31, .11);
}
html[data-theme="dark"] .provisioning-form input[type="date"],
html[data-theme="dark"] input[type="date"] {
  color-scheme: dark;
}
html[data-theme="dark"] .client360-row b,
html[data-theme="dark"] .client360-head h3,
html[data-theme="dark"] .client360-section-head b,
html[data-theme="dark"] .finance-rule-grid b,
html[data-theme="dark"] .client360-item b,
html[data-theme="dark"] .lists-toolbar h3,
html[data-theme="dark"] .lists-entities button b,
html[data-theme="dark"] .permission-edit-head,
html[data-theme="dark"] .provisioning-check b,
html[data-theme="dark"] .provisioning-result b,
html[data-theme="dark"] .provisioning-run b {
  color: var(--ink);
}
html[data-theme="dark"] .client360-row small,
html[data-theme="dark"] .client360-head small,
html[data-theme="dark"] .client360-section-head span,
html[data-theme="dark"] .client360-more,
html[data-theme="dark"] .finance-rule-grid span,
html[data-theme="dark"] .finance-rule-grid small,
html[data-theme="dark"] .client360-item span,
html[data-theme="dark"] .lists-toolbar span:not(.counter),
html[data-theme="dark"] .lists-entities button small,
html[data-theme="dark"] .permission-edit-head span,
html[data-theme="dark"] .provisioning-check small,
html[data-theme="dark"] .provisioning-run span,
html[data-theme="dark"] .provisioning-run small {
  color: var(--muted);
}
html[data-theme="dark"] .primary-btn:hover,
html[data-theme="dark"] .strip-cta:hover,
html[data-theme="dark"] .button-primary-like:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: #071006;
}

.toast { position: fixed; right: 24px; bottom: 24px; z-index: 30; padding: 13px 18px; border-radius: 8px; background: var(--navy); color: #fff; font-size: 11px; font-weight: 800; opacity: 0; transform: translateY(80px); transition: .25s; }
.toast.show { opacity: 1; transform: none; }

@media (max-width: 1380px) {
  h1 { font-size: 34px; }
  .sidebar { width: 230px; }
  main { margin-left: 230px; width: calc(100% - 230px); padding-inline: 22px; }
  .search { width: 260px; }
  .hero { padding: 13px 18px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: 1.4fr .9fr; }
  .cpq-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-card { position: static; }
  .service-layout { grid-template-columns: minmax(0, 1fr) 360px; }
  .service-board { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
  .service-detail { padding: 18px; }
  .operation-row { grid-template-columns: minmax(0, 1fr) 92px 92px 126px 78px; }
  .ip-grid { grid-template-columns: repeat(3, minmax(160px, 1fr)); }
  .billing-row { grid-template-columns: minmax(0, 1fr) 126px; }
  .rack-layout { grid-template-columns: minmax(0, 1fr) 360px; }
  .deal-workbench { grid-template-columns: minmax(330px, 380px) minmax(520px, 1fr) minmax(270px, 320px); }
  .deal-profile, .deal-center, .deal-widgets { padding: 16px; }
  .deal-stats-grid,
  .deal-insight-grid,
  .deal-settings-grid,
  .deal-file-list { grid-template-columns: repeat(3, minmax(160px, 1fr)); }
}

@media (max-width: 1180px) {
  header { align-items: flex-start; flex-direction: column; }
  .header-actions { width: 100%; }
  .search { flex: 1; width: auto; }
  .section-head { align-items: flex-start; flex-direction: column; gap: 12px; }
  .filters, .rack-actions { width: 100%; overflow-x: auto; justify-content: flex-start; padding-bottom: 4px; }
  .filters button, .rack-actions button { flex: 0 0 auto; }
  .lead-list-row, .client-list-row { min-width: 820px; }
  .list-row { min-width: 680px; }
  .service-layout { grid-template-columns: 1fr; }
  .service-detail { position: static; }
  .operations-layout { grid-template-columns: 1fr; }
  .operations-panel.wide { grid-column: 1; }
  .operation-row { grid-template-columns: 1fr; align-items: stretch; }
  .ip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .billing-layout { grid-template-columns: 1fr; }
  .billing-panel.wide { grid-column: 1; }
  .billing-row, .billing-ticket-row, .billing-payment-row { grid-template-columns: 1fr; align-items: stretch; }
  .billing-row > div:first-child,
  .billing-row > div:nth-of-type(2),
  .billing-row > div:nth-of-type(3),
  .billing-row > strong,
  .billing-row > select,
  .billing-row > .billing-doc-actions {
    grid-column: 1;
    grid-row: auto;
    justify-self: stretch;
  }
  .billing-payment-row strong { justify-self: start; }
  .billing-auto article { grid-template-columns: 1fr; }
  .billing-auto-actions { grid-column: auto; grid-row: auto; }
  .billing-auto-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .billing-outbox { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lists-workspace { grid-template-columns: 1fr; }
  .lists-entities {
    position: static;
    display: flex;
    max-height: none;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .lists-entities button { flex: none; min-width: 140px; }
  .lists-toolbar { grid-template-columns: 1fr; }
  .lists-filters { grid-template-columns: 1fr 1fr; }
  .lists-bulk-summary { align-items: flex-start; flex-direction: column; }
  .lists-bulk-actions button,
  .lists-bulk-actions label { flex: 1 1 180px; }
  .lists-bulk-edit { display: grid; grid-template-columns: 1fr 1fr; }
  .events-toolbar { grid-template-columns: 1fr 1fr; }
  .events-layout { grid-template-columns: 1fr; }
  .settings-shell { grid-template-columns: 1fr; }
  .settings-menu {
    position: static;
    display: flex;
    overflow-x: auto;
  }
  .settings-menu button { min-width: 190px; }
  .settings-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .notification-settings-grid { grid-template-columns: 1fr; }
  .notification-template-list { grid-template-columns: 1fr; }
  .permission-row {
    grid-template-columns: 34px minmax(0, 1fr) auto;
  }
  .role-list-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .role-list-row .permission-chip-list,
  .role-list-row .permission-row-actions {
    grid-column: 1;
  }
  .permission-role-pill,
  .permission-status,
  .permission-last-login {
    grid-column: 2 / -1;
  }
  .permission-row-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
  .rack-layout { grid-template-columns: 1fr; }
  .rack-detail { position: static; }
  .rack-ops-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rack-map-panel { overflow-x: auto; }
  .machine-room-outline { min-height: 520px; }
  .deal-workbench {
    grid-template-columns: minmax(300px, 360px) minmax(420px, 1fr);
    overflow: auto;
  }
  .deal-widgets { grid-column: 1 / -1; border-top: 1px solid var(--line); }
  .deal-profile, .deal-center, .deal-widgets { height: auto; max-height: none; }
  .deal-profile, .deal-widgets { border: 0; }
  .deal-stage-line { grid-template-columns: repeat(4, minmax(100px, 1fr)); overflow-x: auto; }
  .deal-quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .deal-stats-grid,
  .deal-insight-grid,
  .deal-settings-grid,
  .deal-file-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
  .metric-grid, .safe-stats { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .client-grid, .dc-grid, .module-grid { grid-template-columns: repeat(2, 1fr); }
  .client360-layout { grid-template-columns: 1fr; }
  .client360-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .finance-rule-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-grid { grid-template-columns: repeat(3, 1fr); }
  .operations-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .billing-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-layout, .permissions-layout, .cpq-layout, .rack-layout, .provisioning-layout { grid-template-columns: 1fr; }
  .client-panel { grid-column: 1; grid-row: 1; }
  .contract-panel { grid-column: 1; grid-row: 2; }
  .cpq-catalog-panel { grid-column: 1; grid-row: 3; }
  .cpq-summary { grid-column: 1; grid-row: 4; }
  .service-layout { grid-template-columns: 1fr; }
  .service-board { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
  .service-detail { position: static; }
  .rack-detail { position: static; }
  .lead-summary-row, .rack-stats { grid-template-columns: repeat(2, 1fr); }
  .hermozone-layout { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
  .summary-card { position: static; }
  .form-grid { grid-template-columns: repeat(2, 1fr); }
  .provisioning-form .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-service-form, .catalog-admin-row { grid-template-columns: 1fr 1fr; }
  .recognition-grid { grid-template-columns: 1fr; }
  .pipeline-toolbar { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .deal-layout { grid-template-columns: 1fr; }
  .deal-aside { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; padding-top: 14px; }
  .deal-task-composer, .pipeline-toolbar { grid-template-columns: 1fr; }
  .deal-card-head { flex-direction: column; }
  .cpq-layout { grid-template-columns: 1fr; }
  .summary-card { position: static; }
  .site-strip { flex-wrap: wrap; height: auto; min-height: 48px; padding: 10px 0; }
  .strip-cta { margin-left: 0; }
  .modal { width: min(620px, 94vw); padding: 18px; }
  .deal-modal-shell {
    width: calc(100vw - 10px);
    height: calc(100vh - 10px);
    max-height: calc(100vh - 10px);
    padding: 0;
  }
  .deal-workbench { grid-template-columns: 1fr; }
  .deal-widgets { grid-column: auto; }
  .deal-tabs { overflow-x: auto; }
  .deal-tabs button { flex: 0 0 auto; }
  .deal-stage-line span { min-width: 180px; }
  .deal-quick-grid { grid-template-columns: 1fr; }
  .deal-stats-grid,
  .deal-insight-grid,
  .deal-settings-grid,
  .deal-file-list { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .sidebar { width: 78px; padding: 20px 9px; }
  .brand-logo, .brand-fallback, .nav-item em, .nav-item i, .safe-note, .profile span:nth-child(2) { display: none; }
  main { margin-left: 78px; width: calc(100% - 78px); padding: 0 14px 32px; }
  .site-strip, .search { display: none; }
  header { height: auto; padding: 18px 0; align-items: flex-start; gap: 15px; }
  h1 { font-size: 28px; }
  .metric-grid, .attention-list, .client-grid, .dc-grid, .task-board, .module-grid, .safe-stats, .report-grid, .operations-stats, .billing-stats { grid-template-columns: 1fr; }
  .list-row, .lead-list-row, .client-list-row { grid-template-columns: auto 1fr; }
  .lead-list-row, .client-list-row, .list-row { min-width: 640px; }
  .client360-list, .client360-mini-grid { grid-template-columns: 1fr; }
  .finance-rule-grid { grid-template-columns: 1fr; }
  .client360-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .client360-row { grid-template-columns: 34px minmax(0, 1fr); }
  .client360-row strong { grid-column: 2; }
  .rack-stats, .lead-summary-row { grid-template-columns: 1fr; }
  .service-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .events-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .events-toolbar { grid-template-columns: 1fr; }
  .event-card { grid-template-columns: 5px minmax(0, 1fr); }
  .event-card .mini-action { grid-column: 2; justify-self: start; }
  .notification-item,
  .notification-rule-row {
    grid-template-columns: 1fr;
  }
  .notification-actions,
  .notification-rule-actions {
    justify-items: start;
    justify-content: flex-start;
  }
  .service-board { grid-template-columns: 1fr; }
  .ticket-column { min-height: 0; }
  .ip-grid { grid-template-columns: 1fr; }
  .billing-outbox, .billing-settings-grid { grid-template-columns: 1fr; }
  .settings-card-grid,
  .settings-form .form-row { grid-template-columns: 1fr; }
  .settings-subhead { flex-direction: column; }
  .lists-filters, .list-edit-fields { grid-template-columns: 1fr; }
  .lists-bulk-edit { grid-template-columns: 1fr; }
  .lists-pagination { justify-content: stretch; }
  .lists-pagination button { flex: 1; }
  .machinery-plan { min-width: 680px; padding: 12px; }
  .hermozone-layout { grid-template-columns: repeat(2, minmax(210px, 1fr)); }
  .hermozone-racks { grid-template-columns: repeat(4, minmax(50px, 1fr)); }
  .rack-grid { grid-template-columns: repeat(4, minmax(50px, 1fr)) !important; }
  .form-grid { grid-template-columns: 1fr; }
  .provisioning-form .form-grid { grid-template-columns: 1fr; }
  .catalog-service-form, .catalog-admin-row { grid-template-columns: 1fr; }
  .history-item { grid-template-columns: 1fr; }
  .provisioning-run { grid-template-columns: 1fr; }
  .provisioning-flags { display: grid; grid-template-columns: 1fr; }
  .kanban-column { flex-basis: 250px; }
  .unit-client-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rack-ops-grid { grid-template-columns: 1fr; }
  .rack-ops-head { flex-direction: column; }
  .rack-ops-actions { justify-content: flex-start; }
  .rack-docs { grid-template-columns: 1fr; }
  .modal-actions { flex-wrap: wrap; }
  .modal-actions button { flex: 1 1 auto; }
}

@media (max-width: 520px) {
  .sidebar {
    position: sticky;
    top: 0;
    inset: auto;
    width: 100%;
    height: auto;
    padding: 8px;
    flex-direction: row;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    box-shadow: inset 0 4px 0 var(--purple);
  }
  .main-nav { flex-direction: row; overflow: visible; padding: 0; }
  .nav-item { width: auto; min-width: 48px; padding: 9px; }
  .sidebar-bottom, .brand { display: none; }
  main { margin-left: 0; width: 100%; padding: 0 12px 28px; }
  .primary-btn { height: 42px; padding: 0 14px; }
  .hero { padding: 12px 14px; border-radius: 14px; }
  .hero-slogan { padding-left: 13px; font-size: 14px; }
  .header-actions { flex-direction: column; align-items: stretch; width: 100%; }
  .header-actions button { width: 100%; }
  .machine-room-outline { padding: 48px 12px 12px; }
  .unit-client-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .client360-detail { padding: 15px; border-radius: 18px; }
  .client360-head h3 { font-size: 22px; }
  .client360-stats { grid-template-columns: 1fr; }
  .service-stats, .ticket-meta-grid { grid-template-columns: 1fr; }
  .service-detail { padding: 15px; border-radius: 18px; }
}

