:root {
  --bg: #eeebee;
  --bg-soft: rgba(255, 255, 255, 0.72);
  --surface: rgba(255, 255, 255, 0.94);
  --surface-strong: #fff;
  --surface-muted: #f3f3ef;
  --surface-subtle: #e7ece5;
  --line: rgba(14, 26, 18, 0.12);
  --line-strong: rgba(14, 26, 18, 0.2);
  --text: #0e1a12;
  --muted: rgba(14, 26, 18, 0.68);
  --primary: #009245;
  --primary-dark: #007a39;
  --primary-soft: rgba(0, 146, 69, 0.1);
  --success: #009245;
  --success-soft: rgba(0, 146, 69, 0.12);
  --warning: #b79441;
  --warning-soft: rgba(183, 148, 65, 0.14);
  --danger: #c56a63;
  --danger-soft: rgba(197, 106, 99, 0.14);
  --violet: #8b5cf6;
  --shadow-lg: 0 24px 80px rgba(14, 26, 18, 0.1);
  --shadow-md: 0 12px 30px rgba(14, 26, 18, 0.08);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --font: "Manrope", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.96), rgba(238, 235, 238, 0.92) 38%, rgba(228, 237, 228, 0.94)),
    linear-gradient(180deg, #f8f7f7 0%, #ecefe8 100%);
}

a {
  color: var(--primary-dark);
  text-decoration: none;
}

a:hover {
  color: var(--primary);
}

img,
svg,
video {
  max-width: 100%;
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 6px;
  font-size: 39px;
  line-height: 1.05;
  letter-spacing: -0.05em;
}

h2 {
  margin-bottom: 8px;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

h3 {
  margin-bottom: 8px;
  font-size: 24px;
  line-height: 1.18;
  letter-spacing: -0.03em;
}

small {
  font-size: 12px;
}

::placeholder {
  color: rgba(14, 26, 18, 0.42);
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  max-height: 100vh;
  min-height: 100vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px 12px;
  border-right: 1px solid rgba(14, 26, 18, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(247, 247, 243, 0.98)),
    radial-gradient(circle at top left, rgba(0, 146, 69, 0.1), rgba(183, 148, 65, 0.08) 34%, rgba(0, 0, 0, 0));
  backdrop-filter: blur(14px);
}

.sidebar::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  padding: 8px 10px 10px;
}

.brand-logo-wrap {
  width: 66px;
  height: 66px;
  flex: 0 0 66px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.18) 52%, rgba(255, 255, 255, 0));
  box-shadow: 0 14px 28px rgba(0, 122, 57, 0.14);
}

.brand-logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(90, 66, 0, 0.18));
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-title {
  font-size: 29px;
  font-weight: 800;
  letter-spacing: -0.06em;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.sidebar-section + .sidebar-section {
  margin-top: 22px;
}

.sidebar-label {
  margin: 0 10px 10px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(14, 26, 18, 0.42);
}

.nav {
  display: grid;
  gap: 6px;
}

.nav-departments {
  gap: 10px;
}

.nav-group {
  display: grid;
  gap: 6px;
  border-radius: 18px;
}

.nav-group > summary {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  list-style: none;
  color: rgba(14, 26, 18, 0.62);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 0.18s ease, color 0.18s ease;
}

.nav-group > summary::-webkit-details-marker {
  display: none;
}

.nav-group > summary:hover {
  background: rgba(0, 146, 69, 0.07);
  color: var(--text);
}

.nav-group-caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(0, 146, 69, 0.08);
  color: var(--primary-dark);
  font-size: 10px;
  line-height: 1;
  transition: transform 0.18s ease, background 0.18s ease;
}

.nav-group:not([open]) .nav-group-caret {
  transform: rotate(-90deg);
}

.nav-group-items {
  display: grid;
  gap: 6px;
}

.nav-icon-letter {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.nav-link {
  display: block;
  padding: 4px;
  border-radius: 18px;
  color: var(--text);
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.nav-link:hover {
  background: rgba(0, 146, 69, 0.08);
}

.nav-link.active {
  background: linear-gradient(135deg, rgba(0, 146, 69, 0.16), rgba(183, 148, 65, 0.08));
}

.nav-link-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 0 12px;
  border-radius: 14px;
  font-weight: 700;
}

.nav-link.active .nav-link-main {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 12px 22px rgba(0, 122, 57, 0.2), inset 0 1px 0 rgba(255, 241, 204, 0.22);
}

.nav-icon {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: rgba(0, 146, 69, 0.1);
  color: var(--primary-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 0;
  line-height: 0;
  overflow: hidden;
}

.nav-link.active .nav-icon {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.nav-icon > :not(svg) {
  display: none !important;
}

.nav-icon svg {
  width: 18px;
  height: 18px;
  display: block;
  flex: 0 0 auto;
}

.main {
  min-width: 0;
  padding: 14px 18px 18px;
}

.frame {
  min-height: calc(100vh - 32px);
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 16px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 14px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px);
}

.topbar-left {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1 1 auto;
}

.topnav {
  display: none;
}

.topbar-search {
  width: min(540px, 100%);
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(14, 26, 18, 0.08);
  background: rgba(255, 255, 255, 0.74);
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-search-icon {
  color: rgba(14, 26, 18, 0.42);
}

.topbar-search-icon svg {
  width: 16px;
  height: 16px;
}

.topbar-search input {
  width: auto;
  min-width: 0;
  flex: 1 1 auto;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.topbar-search input:focus {
  box-shadow: none;
}

.topbar-search-shortcut {
  flex: 0 0 auto;
  min-width: 42px;
  height: 24px;
  padding: 0 8px;
  border-radius: 7px;
  border: 1px solid rgba(14, 26, 18, 0.1);
  background: rgba(255, 255, 255, 0.64);
  color: rgba(14, 26, 18, 0.56);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.topbar-shortcut {
  min-height: 40px;
  padding: 0 16px;
  gap: 8px;
}

.topbar-create-menu {
  position: relative;
}

.topbar-create-menu summary {
  list-style: none;
  cursor: pointer;
}

.topbar-create-menu summary::-webkit-details-marker {
  display: none;
}

.topbar-create-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 50;
  min-width: 210px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(7, 13, 17, 0.98);
  box-shadow: var(--shadow-md);
  display: grid;
  gap: 4px;
}

.topbar-create-panel a {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--text);
  display: flex;
  align-items: center;
  font-weight: 800;
}

.topbar-create-panel a:hover {
  background: rgba(8, 212, 109, 0.14);
  color: #7cf8aa;
}

.topbar-shortcut-caret {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.86;
}

.topbar-shortcut-icon,
.topbar-icon-button,
.mobile-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.topbar-shortcut-icon svg,
.topbar-icon-button svg,
.mobile-toggle svg {
  width: 16px;
  height: 16px;
}

.topbar-icon-button,
.mobile-toggle {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  color: var(--muted);
  box-shadow: none;
  position: relative;
}

.topbar-icon-button:hover,
.mobile-toggle:hover {
  background: var(--surface-muted);
}

.topbar-icon-dot {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #dc5e55;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.94);
}

.topbar-chip {
  min-height: 40px;
  max-width: 240px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-toggle {
  display: none;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 4px 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
}

.user-pill-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(0, 146, 69, 0.2), rgba(183, 148, 65, 0.34));
  color: var(--primary-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.user-pill-meta {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.user-pill-meta strong {
  font-size: 13px;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-pill-meta .muted {
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-pill-link {
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.user-pill-link svg {
  width: 16px;
  height: 16px;
}

a.topbar-shortcut.btn-secondary {
  border-color: transparent;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  box-shadow: 0 10px 24px rgba(22, 163, 74, 0.24);
}

.topbar-icon-button:hover,
.mobile-toggle:hover,
.user-pill-link:hover {
  background: #fff;
}

.content {
  padding: 0 0 8px;
}

.stack {
  display: grid;
  gap: 18px;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.clients-card-grid {
  align-items: stretch;
  grid-template-columns: repeat(auto-fit, minmax(280px, 340px));
  justify-content: start;
  gap: 14px;
}

.client-summary-card {
  position: relative;
  min-height: 184px;
  padding: 18px;
  display: grid;
  gap: 12px;
  align-content: start;
  border-radius: 24px;
  border: 1px solid rgba(84, 100, 78, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 247, 241, 0.98)),
    linear-gradient(180deg, rgba(0, 146, 69, 0.03), rgba(255, 255, 255, 0));
  box-shadow: 0 18px 30px rgba(28, 50, 31, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.72);
  color: var(--text);
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.client-summary-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: rgba(0, 146, 69, 0.28);
}

.client-summary-card[data-risk-tone="warning"]::before {
  background: rgba(185, 138, 42, 0.42);
}

.client-summary-card[data-risk-tone="danger"]::before {
  background: rgba(197, 106, 99, 0.46);
}

.client-summary-card:hover {
  transform: translateY(-2px);
  border-color: rgba(95, 141, 99, 0.22);
  box-shadow: 0 22px 36px rgba(28, 50, 31, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.client-summary-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.client-summary-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.client-summary-card-link {
  display: grid;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.client-summary-open {
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.client-summary-open:hover {
  text-decoration: underline;
}

button.client-summary-delete[type="submit"] {
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(197, 106, 99, 0.22);
  background: rgba(197, 106, 99, 0.12);
  color: #a6534d;
  box-shadow: none;
  font-size: 11px;
  font-weight: 700;
}

button.client-summary-delete[type="submit"]:hover {
  background: rgba(197, 106, 99, 0.16);
  transform: none;
}

.client-summary-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.22;
  letter-spacing: -0.03em;
  color: var(--primary-dark);
}

.client-summary-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.client-summary-pills {
  gap: 6px;
}

.client-summary-pills .badge {
  min-height: 28px;
  padding: 0 10px;
  font-size: 11px;
}

.client-summary-foot {
  margin-top: auto;
  display: grid;
  gap: 6px;
}

.client-summary-email {
  color: rgba(39, 50, 41, 0.92);
  font-size: 13px;
  line-height: 1.35;
  word-break: break-word;
}

.client-summary-report {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.clients-card-grid .empty {
  grid-column: 1 / -1;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 18px;
}

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

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.section-head h3,
.section-head h2 {
  margin-bottom: 0;
}

.panel,
.card,
.metric-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.panel {
  padding: 18px;
}

.panel-strong {
  background: var(--surface-strong);
}

.card {
  padding: 16px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.metric-card {
  position: relative;
  overflow: hidden;
  padding: 18px 18px 20px;
  display: grid;
  gap: 8px;
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: rgba(0, 146, 69, 0.18);
}

.metric-card[data-accent="success"]::before,
.metric-card[data-accent="primary"]::before {
  background: rgba(0, 146, 69, 0.54);
}

.metric-card[data-accent="warning"]::before {
  background: rgba(185, 138, 42, 0.52);
}

.metric-card[data-accent="danger"]::before {
  background: rgba(197, 106, 99, 0.52);
}

.metric-card strong {
  font-size: 44px;
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.metric-card[data-accent="success"] strong,
.metric-card[data-accent="primary"] strong {
  color: var(--primary-dark);
}

.metric-card[data-accent="warning"] strong {
  color: #9f761f;
}

.metric-card[data-accent="danger"] strong {
  color: #b25852;
}

.metric-card small,
.metric-card div {
  color: var(--muted);
}

.kpi-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0;
}

.kpi-line + .kpi-line {
  border-top: 1px solid rgba(84, 100, 78, 0.08);
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-item {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(84, 100, 78, 0.08);
  background: rgba(246, 247, 242, 0.96);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

.timeline-item:hover {
  border-color: rgba(95, 141, 99, 0.22);
  background: rgba(240, 244, 235, 0.98);
}

.btn,
button[type="submit"],
button[type="button"]:not(.mobile-toggle) {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(0, 122, 57, 0.18), inset 0 1px 0 rgba(255, 241, 204, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s ease, filter 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.btn:hover,
button[type="submit"]:hover,
button[type="button"]:not(.mobile-toggle):hover {
  filter: brightness(1.02);
  transform: translateY(-1px);
}

.btn-secondary,
.btn-lite {
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  border-color: var(--line);
  box-shadow: none;
}

.btn-danger-lite {
  background: rgba(197, 106, 99, 0.12);
  color: #a6534d;
  border-color: rgba(197, 106, 99, 0.22);
  box-shadow: none;
}

.btn-danger-lite:hover {
  background: rgba(197, 106, 99, 0.16);
}

.btn-secondary:hover,
.btn-lite:hover {
  background: #fff;
}

.btn-chip {
  min-height: 40px;
  padding: 0 16px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(84, 100, 78, 0.08);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.badge[data-tone="danger"] {
  background: var(--danger-soft);
  color: #a6534d;
}

.badge[data-tone="warning"] {
  background: var(--warning-soft);
  color: #8f6a1d;
}

.badge[data-tone="success"] {
  background: var(--success-soft);
  color: var(--primary-dark);
}

.eyebrow,
.muted,
.tasks-muted,
.documents-cell-muted,
.drive-cell-muted,
.mail-status-stack,
.staff-note {
  color: var(--muted);
}

.mono {
  font-family: "Cascadia Code", "Consolas", monospace;
}

.empty {
  padding: 24px 18px;
  border: 1px dashed rgba(111, 123, 104, 0.34);
  border-radius: 20px;
  background: rgba(246, 247, 242, 0.88);
  color: var(--muted);
  text-align: center;
}

.field {
  display: grid;
  gap: 7px;
  color: rgba(39, 50, 41, 0.9);
}

.field.span-2 {
  grid-column: span 2;
}

.field.span-3 {
  grid-column: span 3;
}

.field.span-4 {
  grid-column: span 4;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 14px;
}

.clients-filter-bar {
  grid-template-columns: minmax(280px, 2.2fr) repeat(3, minmax(140px, 1fr)) auto;
  gap: 8px 10px;
  align-items: end;
  padding: 12px 14px;
}

.clients-filter-bar .field,
.clients-filter-bar .field.span-2 {
  grid-column: auto;
  gap: 4px;
}

.clients-filter-bar label {
  font-size: 9px;
  line-height: 1.15;
}

.clients-filter-bar input,
.clients-filter-bar select {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 12px;
  font-size: 12px;
}

.clients-filter-bar .actions {
  gap: 0;
}

.clients-filter-actions {
  justify-content: flex-start;
}

.clients-filter-actions button[type="submit"] {
  min-height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.client-1c-form {
  padding: 14px 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 245, 0.98)),
    linear-gradient(180deg, rgba(0, 146, 69, 0.02), rgba(255, 255, 255, 0));
}

.client-1c-sheet {
  display: grid;
  gap: 8px;
  max-width: 1120px;
  align-content: start;
}

.client-1c-row {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.client-1c-label {
  font-size: 13px;
  line-height: 1.2;
  color: #4b5563;
}

.client-1c-control {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.client-1c-control-bank {
  display: grid;
  grid-template-columns: minmax(260px, 320px) 112px auto;
  align-items: center;
  gap: 8px;
  justify-content: start;
}

.client-1c-control input,
.client-1c-control select,
.client-1c-mini-field input,
.client-1c-mini-field select {
  min-height: 30px;
  padding: 0 8px;
  border-radius: 4px;
  border: 1px solid #cfd5db;
  background: #fff;
  color: #1f2937;
  font-size: 13px;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.client-1c-control input:focus,
.client-1c-control select:focus,
.client-1c-mini-field input:focus,
.client-1c-mini-field select:focus {
  border-color: #6b8fd6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.12);
}

.client-1c-control-inline {
  max-width: 320px;
}

.client-1c-control-short {
  max-width: 156px;
}

.client-1c-control input.client-1c-input-mini,
.client-1c-control select.client-1c-input-mini {
  width: 72px;
  max-width: 72px;
}

.client-1c-control input.client-1c-input-code,
.client-1c-control select.client-1c-input-code {
  width: 148px;
  max-width: 148px;
}

.client-1c-control input.client-1c-input-code--wide,
.client-1c-control select.client-1c-input-code--wide {
  width: 176px;
  max-width: 176px;
}

.client-1c-control input.client-1c-input-date,
.client-1c-control select.client-1c-input-date {
  width: 128px;
  max-width: 128px;
}

.client-1c-control input.client-1c-input-medium,
.client-1c-control select.client-1c-input-medium {
  width: min(100%, 320px);
  max-width: 320px;
}

.client-1c-control input.client-1c-input-long,
.client-1c-control select.client-1c-input-long {
  width: min(100%, 460px);
  max-width: 460px;
}

.client-1c-control-bank input.client-1c-input-long,
.client-1c-control-bank select.client-1c-input-long,
.client-1c-control-bank input.client-1c-input-code,
.client-1c-control-bank select.client-1c-input-code {
  width: 100%;
  max-width: none;
}

.client-1c-control input.client-1c-input-extended,
.client-1c-control select.client-1c-input-extended {
  width: min(100%, 620px);
  max-width: 620px;
}

.client-1c-control input.client-1c-input-address,
.client-1c-control select.client-1c-input-address {
  width: min(100%, 860px);
  max-width: 860px;
}

.client-1c-control input.client-1c-input-iban,
.client-1c-control select.client-1c-input-iban {
  width: min(100%, 280px);
  max-width: 280px;
}

.client-1c-control-double {
  display: grid;
  grid-template-columns: minmax(176px, 196px) auto auto minmax(118px, 132px) auto;
  gap: 8px;
  align-items: center;
  width: auto;
  justify-content: start;
}

.client-1c-control-double--wide {
  grid-template-columns: minmax(220px, 300px) auto auto minmax(170px, 220px);
  width: auto;
}

.client-1c-inline-label {
  font-size: 12px;
  color: #4b5563;
  white-space: nowrap;
}

.client-1c-help {
  color: #2563eb;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  flex: 0 0 auto;
}

.client-1c-link {
  color: #2563eb;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}

.client-1c-form .client-1c-help,
.client-1c-form .client-1c-link {
  display: none;
}

button.client-1c-secondary[type="button"],
button.client-1c-submit[type="submit"] {
  min-height: 30px;
  padding: 0 12px;
  border-radius: 4px;
  border: 1px solid #cfd5db;
  background: linear-gradient(180deg, #ffffff, #edf1f5);
  color: #425066;
  box-shadow: none;
  font-size: 12px;
  font-weight: 600;
}

button.client-1c-secondary[type="button"]:hover,
button.client-1c-secondary[type="button"]:focus,
button.client-1c-secondary[type="button"]:focus-visible,
button.client-1c-submit[type="submit"]:hover,
button.client-1c-submit[type="submit"]:focus,
button.client-1c-submit[type="submit"]:focus-visible {
  background: linear-gradient(180deg, #ffffff, #e7edf4);
  border-color: #bcc7d4;
  color: #334155;
  box-shadow: none;
  filter: none;
  transform: none;
  outline: none;
}

.client-1c-mini-input {
  width: 112px;
  max-width: 112px;
}

button.client-1c-secondary[data-bik-lookup][type="button"] {
  white-space: nowrap;
}

.client-1c-status-line {
  margin-left: 188px;
  max-width: 520px;
  font-size: 12px;
  line-height: 1.35;
  color: #64748b;
}

.client-1c-status-line[data-tone="success"] {
  color: #15803d;
}

.client-1c-status-line[data-tone="warning"] {
  color: #a16207;
}

.client-1c-status-line[data-tone="danger"] {
  color: #b42318;
}

.client-1c-status-line[data-tone="info"] {
  color: #2563eb;
}

.client-1c-checkboxes {
  margin-left: 188px;
  display: grid;
  gap: 6px;
}

.client-1c-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #4b5563;
}

.client-1c-checkbox input[type="checkbox"] {
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 16px;
  padding: 0;
  border-radius: 3px;
}

.client-1c-section {
  margin-left: 188px;
  padding-top: 2px;
  border-top: 0;
}

.client-1c-section summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #179549;
  font-size: 13px;
  font-weight: 600;
  min-width: 0;
}

.client-1c-section summary::-webkit-details-marker {
  display: none;
}

.client-1c-section summary::marker {
  content: "";
}

.client-1c-section summary::before {
  content: "▾";
  flex: 0 0 auto;
  margin-right: 0;
  color: #179549;
}

.client-1c-section:not([open]) summary::before {
  content: "▸";
}

.client-1c-section-body {
  margin-top: 8px;
  display: grid;
  gap: 8px;
}

.client-1c-section-body .client-1c-row {
  grid-template-columns: 144px minmax(0, 1fr);
}

.client-1c-settings-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 12px;
}

.client-1c-mini-field {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: #4b5563;
}

.client-1c-section--preview {
  padding-top: 0;
  border-top: 0;
}

.client-1c-section--preview summary {
  color: #179549;
}

.client-1c-section-summary {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

.client-1c-section-title {
  flex: 0 0 auto;
  color: #179549;
}

.client-1c-section-preview {
  flex: 1 1 260px;
  min-width: 0;
  color: #7aa08a;
  font-weight: 500;
  font-size: 13px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-1c-section[open] > summary .client-1c-section-preview {
  display: none;
}

.client-1c-section--preview .client-1c-section-body {
  margin-top: 6px;
  padding-left: 18px;
}

.client-1c-footer {
  margin-left: 188px;
  margin-top: 10px;
  display: flex;
  justify-content: flex-start;
}

label {
  color: rgba(39, 50, 41, 0.86);
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

textarea {
  min-height: 120px;
  padding-top: 12px;
  padding-bottom: 12px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(95, 141, 99, 0.44);
  box-shadow: 0 0 0 4px rgba(95, 141, 99, 0.12);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(84, 100, 78, 0.08);
  text-align: left;
}

.dashboard-stack {
  gap: 18px;
}

.dashboard-hero {
  align-items: flex-start;
}

.dashboard-hero > div:first-child {
  min-width: 0;
  flex: 1 1 auto;
}

.dashboard-hero-copy {
  font-size: 10px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body:not(.page-login) .content h1 {
  font-size: 24px;
  line-height: 1.18;
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}

.dashboard-actions {
  justify-content: flex-end;
}

.dashboard-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.95fr);
  gap: 18px;
}

.dashboard-lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.95fr);
  gap: 18px;
}

.dashboard-panel {
  min-height: 100%;
}

.dashboard-list,
.dashboard-progress-list,
.dashboard-task-list {
  display: grid;
}

.dashboard-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 0;
  border-top: 1px solid rgba(84, 100, 78, 0.08);
}

.dashboard-list-row:first-child {
  border-top: 0;
  padding-top: 10px;
}

.dashboard-list-copy {
  display: grid;
  gap: 4px;
}

.dashboard-progress-list {
  gap: 0;
}

.dashboard-progress-row {
  display: grid;
  gap: 8px;
  padding: 14px 0;
  color: inherit;
  border-top: 1px solid rgba(84, 100, 78, 0.08);
}

.dashboard-progress-row:first-child {
  border-top: 0;
  padding-top: 10px;
}

.dashboard-progress-row:hover {
  color: inherit;
}

.dashboard-progress-head,
.dashboard-task-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dashboard-progress-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(111, 123, 104, 0.12);
  overflow: hidden;
}

.dashboard-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(95, 141, 99, 0.3), rgba(95, 141, 99, 0.72));
}

.dashboard-task-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.dashboard-task-card {
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(84, 100, 78, 0.08);
  background: var(--surface-muted);
}

.dashboard-task-row {
  display: grid;
  gap: 6px;
}

.dashboard-task-row + .dashboard-task-row {
  margin-top: 12px;
}

.dashboard-task-meta {
  font-weight: 700;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.login-card {
  width: min(460px, 100%);
  padding: 30px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-lg);
}

.documents-shell,
.drive-shell,
.mail-shell,
.kb-shell,
.tracker-shell,
.staff-shell,
.chat-workbench,
.lead-layout {
  display: grid;
  gap: 16px;
}

.lead-layout {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.lead-workspace,
.lead-sheet,
.lead-contracts-card,
.lead-timeline-card,
.chat-roster,
.chat-stage,
.mail-list,
.mail-message,
.staff-user-card,
.tracker-summary-card,
.kb-card,
.yandex-area-card {
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.lead-workspace-head,
.chat-roster-top,
.mail-toolbar,
.kb-toolbar,
.tracker-hero-head,
.yandex-area-hero,
.staff-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.lead-composer-tabs,
.mail-folder-tabs,
.tracker-filter,
.kb-actions,
.b24-view-switch,
.documents-view-switch,
.pill-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lead-composer-tabs a,
.tracker-chip,
.kb-pill,
.b24-summary-pill,
.b24-caption-chip,
.documents-view-chip {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.lead-composer-tabs a.active,
.tracker-chip.active,
.kb-pill.active,
.b24-summary-pill.active,
.b24-caption-chip.active,
.documents-view-chip.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
}

.lead-sheet-grid,
.kb-grid,
.yandex-area-grid,
.tracker-summary,
.staff-drive-summary,
.chat-tools-grid,
.collab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.lead-sheet-card,
.tracker-summary-card,
.staff-drive-card,
.kb-card,
.chat-tool-card,
.collab-card {
  display: grid;
  gap: 8px;
}

.lead-timeline,
.lead-contracts-list,
.mail-attachments,
.tasks-row-actions,
.tracker-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lead-timeline-item,
.lead-contract-item,
.mail-item,
.chat-thread-card,
.collab-card,
.kb-row,
.tracker-row {
  border-radius: 16px;
  border: 1px solid rgba(84, 100, 78, 0.08);
  background: rgba(246, 247, 242, 0.92);
}

.chat-workbench {
  grid-template-columns: 320px minmax(0, 1fr);
  align-items: start;
}

.chat-thread-scroll,
.chat-stage-stream {
  display: grid;
  gap: 10px;
}

.chat-thread-card,
.chat-message,
.mail-item,
.kb-row,
.tracker-row {
  padding: 12px 14px;
}

.chat-thread-card.active,
.mail-item.active {
  border-color: rgba(95, 141, 99, 0.22);
  background: rgba(240, 244, 235, 0.98);
}

.lead-workspace {
  display: grid;
  gap: 18px;
}

.lead-workspace-head {
  padding: 4px 2px 0;
  border-bottom: 1px solid rgba(84, 100, 78, 0.08);
}

.lead-workspace-title {
  display: grid;
  gap: 8px;
  max-width: 780px;
}

.lead-workspace-title h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.lead-workspace-title p {
  margin: 0;
  color: var(--muted);
  max-width: 760px;
}

.lead-workspace-kicker {
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.lead-workspace-actions {
  justify-content: flex-end;
  align-self: center;
}

.lead-command-bar {
  display: block;
}

.lead-stage-track {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.lead-action-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}

.lead-action-pill {
  width: 100%;
  min-height: 44px;
  padding: 0 18px;
  justify-content: center;
  text-align: center;
  border-radius: 16px;
  border: 1px solid rgba(0, 122, 57, 0.14);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 10px 22px rgba(0, 122, 57, 0.16);
  font-size: 13px;
  font-weight: 800;
}

.lead-action-pill:hover,
.lead-action-pill.active {
  transform: none;
  filter: none;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.lead-stage-step {
  margin: 0;
}

.lead-stage-step .lead-stage-button {
  position: relative;
  width: 100%;
  min-height: 58px;
  padding: 0 18px;
  justify-content: flex-start;
  border-radius: 18px;
  border: 1px solid rgba(84, 100, 78, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 246, 241, 0.98));
  color: var(--text);
  box-shadow: none;
}

.lead-stage-step .lead-stage-button::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 16px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(84, 100, 78, 0.2);
  transform: translateY(-50%);
}

.lead-stage-step.active .lead-stage-button {
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 12px 24px rgba(0, 122, 57, 0.18);
}

.lead-stage-step.active .lead-stage-button::after {
  background: rgba(255, 255, 255, 0.92);
}

.lead-sheet {
  display: grid;
  gap: 14px;
}

.lead-sheet-form {
  display: grid;
  gap: 14px;
}

.lead-sheet-tail {
  display: grid;
  gap: 10px;
  width: 100%;
}

.lead-sheet-card {
  display: grid;
  gap: 16px;
  padding: 20px;
  border-radius: 24px;
  border: 1px solid rgba(84, 100, 78, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 247, 243, 0.96));
  box-shadow: 0 12px 28px rgba(14, 26, 18, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.lead-sheet-card-strong {
  background:
    radial-gradient(circle at top right, rgba(0, 146, 69, 0.08), rgba(255, 255, 255, 0) 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(246, 249, 244, 0.98));
}

.lead-sheet-card-compact {
  gap: 12px;
  padding: 16px 18px;
}

.lead-sheet-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.lead-sheet-card-head h3 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.lead-sheet-card-head span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(0, 146, 69, 0.1);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

.lead-metric {
  display: grid;
  gap: 8px;
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid rgba(0, 146, 69, 0.12);
  background: linear-gradient(135deg, rgba(0, 146, 69, 0.1), rgba(255, 255, 255, 0.96) 56%);
}

.lead-metric-label {
  color: rgba(14, 26, 18, 0.52);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lead-metric-value {
  color: var(--primary-dark);
  font-size: 36px;
  font-weight: 800;
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.lead-workspace input,
.lead-workspace select,
.lead-workspace textarea {
  width: 100%;
  border: 1px solid rgba(84, 100, 78, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

.lead-workspace input,
.lead-workspace select {
  min-height: 46px;
  padding: 0 14px;
}

.lead-workspace textarea {
  min-height: 130px;
  padding: 12px 14px;
  resize: vertical;
}

.lead-workspace input:focus,
.lead-workspace select:focus,
.lead-workspace textarea:focus {
  outline: none;
  border-color: rgba(0, 146, 69, 0.42);
  box-shadow: 0 0 0 4px rgba(0, 146, 69, 0.08);
}

.lead-sheet-grid.lead-sheet-grid-compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.lead-sheet-grid.lead-sheet-grid-compact .field {
  gap: 6px;
}

.lead-sheet-grid.lead-sheet-grid-compact .lead-summary-textarea {
  min-height: 88px;
  height: 88px;
}

.lead-sheet-tail-actions {
  justify-content: flex-start;
}

.lead-activity {
  display: grid;
  gap: 14px;
  align-content: start;
}

.lead-composer-tabs {
  padding: 6px;
  border-radius: 22px;
  border: 1px solid rgba(84, 100, 78, 0.1);
  background: rgba(243, 243, 239, 0.9);
}

.lead-composer-tabs .lead-composer-tab {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 14px;
  border: 0;
  background: transparent;
  color: rgba(14, 26, 18, 0.64);
  box-shadow: none;
  font-size: 13px;
  font-weight: 800;
}

.lead-composer-tabs .lead-composer-tab:hover {
  transform: none;
  filter: none;
  color: var(--text);
  background: rgba(255, 255, 255, 0.76);
}

.lead-composer-tabs .lead-composer-tab.active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 10px 20px rgba(14, 26, 18, 0.08);
}

.lead-composer-card {
  display: grid;
  gap: 16px;
  padding: 20px;
  border-radius: 24px;
  border: 1px solid rgba(84, 100, 78, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 247, 242, 0.96));
  box-shadow: 0 12px 28px rgba(14, 26, 18, 0.06);
}

.lead-composer-form {
  display: grid;
  gap: 16px;
}

.lead-composer-form.is-hidden {
  display: none;
}

.lead-modal-layer {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
}

.lead-modal-layer.is-hidden {
  display: none;
}

.lead-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 26, 18, 0.36);
  backdrop-filter: blur(6px);
}

body.lead-modal-open {
  overflow: hidden;
}

.lead-modal-window {
  position: relative;
  width: min(960px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  border-radius: 28px;
  border: 1px solid rgba(84, 100, 78, 0.12);
  background:
    radial-gradient(circle at top right, rgba(0, 146, 69, 0.08), rgba(255, 255, 255, 0) 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(246, 247, 242, 0.98));
  box-shadow: 0 24px 60px rgba(14, 26, 18, 0.22);
  overflow: hidden;
}

.lead-modal-window.is-lg {
  width: min(1080px, calc(100vw - 48px));
}

.lead-modal-window.is-xl {
  width: min(1280px, calc(100vw - 48px));
}

.lead-modal-shell {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 16px;
  height: calc(100vh - 48px);
  max-height: calc(100vh - 48px);
  padding: 22px;
  min-height: 0;
}

.lead-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(84, 100, 78, 0.08);
}

.lead-modal-heading {
  display: grid;
  gap: 6px;
}

.lead-modal-kicker {
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.lead-modal-heading h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.lead-modal-heading p {
  margin: 0;
  color: var(--muted);
  max-width: 720px;
}

.lead-modal-close {
  width: 46px;
  min-height: 46px;
  padding: 0;
  border-radius: 16px;
  border: 1px solid rgba(84, 100, 78, 0.14);
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  box-shadow: none;
  font-size: 24px;
  line-height: 1;
}

.lead-modal-close:hover {
  transform: none;
  filter: none;
}

.lead-modal-body {
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.lead-modal-panel {
  display: grid;
  gap: 16px;
  padding: 20px;
  border-radius: 24px;
  border: 1px solid rgba(84, 100, 78, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 247, 242, 0.96));
  box-shadow: 0 12px 28px rgba(14, 26, 18, 0.06);
}

.lead-composer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(84, 100, 78, 0.08);
}

.lead-composer-head strong {
  display: block;
  font-size: 18px;
  line-height: 1.2;
}

.lead-composer-head span {
  max-width: 360px;
  color: var(--muted);
  text-align: right;
}

.lead-composer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.lead-history-inline,
.lead-comment-body,
.lead-audit-body,
.lead-contract-empty {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(84, 100, 78, 0.1);
  background: rgba(244, 246, 241, 0.92);
  color: var(--muted);
}

.lead-calculator-card {
  display: grid;
  gap: 0;
  padding: 0;
  border-radius: 16px;
  border: 1px solid #d8ddd3;
  background: #fff;
  overflow: hidden;
  box-shadow: none;
}

.lead-calculator-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 14px;
  align-items: stretch;
  padding: 14px 16px;
  border-bottom: 1px solid #d8ddd3;
  background: linear-gradient(180deg, #ffffff, #f8faf5);
}

.lead-calculator-summary {
  display: grid;
  gap: 4px;
}

.lead-calculator-context-field {
  display: grid;
  gap: 4px;
}

.lead-calculator-context-field span {
  color: #657166;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lead-calculator-context-field select {
  min-height: 36px;
  border: 1px solid #d8ddd3;
  border-radius: 10px;
  background: #fff;
  font-size: 13px;
}

.lead-calculator-context-field input {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid #d8ddd3;
  border-radius: 10px;
  background: #fff;
  font-size: 13px;
}

.lead-calculator-base-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 14px;
  align-items: end;
  padding: 12px;
  border-bottom: 1px solid #e1e6dc;
  background: #f7faf4;
}

.lead-calculator-base-help {
  color: #657166;
  font-size: 12px;
  line-height: 1.4;
}

.lead-calculator-promo-toolbar {
  grid-template-columns: minmax(180px, 240px) minmax(260px, 1fr);
}

.lead-calculator-promo-help {
  grid-column: 1 / -1;
}

.lead-calculator-summary > span,
.lead-calculator-total > span,
.lead-calculator-section-head span,
.lead-calculator-note,
.lead-calculator-summary small {
  color: #657166;
}

.lead-calculator-summary > span,
.lead-calculator-total > span {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.lead-calculator-summary strong,
.lead-calculator-total strong {
  line-height: 1.12;
}

.lead-calculator-summary strong {
  font-size: 22px;
  letter-spacing: -0.04em;
}

.lead-calculator-lead-caption {
  font-weight: 700;
  color: var(--text);
}

.lead-calculator-total {
  min-width: 0;
  display: grid;
  gap: 4px;
  align-content: center;
  padding: 12px 14px;
  border: 1px solid #d8d8d8;
  border-radius: 10px;
  background: #f2f2f2;
}

.lead-calculator-total strong {
  color: #124225;
  font-size: 30px;
  letter-spacing: -0.05em;
}

.lead-calculator-section {
  display: grid;
  gap: 0;
  padding: 0;
  border: 0;
  border-top: 1px solid #dfe4db;
  border-radius: 0;
  background: #fff;
}

.lead-calculator-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid #cbcfca;
  background: #d8d8d8;
}

.lead-calculator-section-head h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.lead-calculator-section-head span {
  font-size: 11px;
  line-height: 1.35;
  max-width: 48%;
  text-align: right;
}

.lead-calculator-admin-note,
.lead-calculator-admin-inline-note {
  margin: 8px 12px 0;
  padding: 8px 10px;
  border: 1px solid #e5d8ae;
  border-radius: 8px;
  background: #faf4dc;
  color: #7a5a19;
  font-size: 12px;
}

.lead-calculator-zero {
  display: grid;
  gap: 0;
}

.lead-calculator-zero-toggle {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid #e9ede8;
  background: #fafbf8;
  font-weight: 800;
}

.lead-calculator-zero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.lead-calculator-zero-option {
  display: grid;
  grid-template-columns: auto minmax(90px, 130px) minmax(140px, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 0;
  border-bottom: 1px solid #ecefec;
  border-radius: 0;
  background: #fff;
}

.lead-calculator-zero-option:last-child {
  border-bottom: 0;
}

.lead-calculator-zero-option span {
  font-weight: 700;
}

.lead-calculator-zero-option input[type="radio"] {
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 16px;
  padding: 0;
  margin: 0;
  border-radius: 999px;
  justify-self: center;
  align-self: center;
}

.lead-calculator-card input[type="checkbox"] {
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 16px;
  padding: 0;
  margin: 0;
  border-radius: 4px;
  justify-self: center;
  align-self: center;
}

.lead-calculator-base-choice input[type="radio"] {
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 16px;
  padding: 0;
  margin: 0;
  border-radius: 999px;
  flex: 0 0 16px;
}

.lead-calculator-zero-option small {
  font-size: 12px;
}

.lead-calculator-table-wrap {
  overflow-x: auto;
}

.lead-calculator-table,
.lead-calculator-matrix {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  table-layout: fixed;
}

.lead-calculator-matrix .lead-calculator-base-sno-col {
  width: 280px;
}

.lead-calculator-table thead th,
.lead-calculator-matrix thead th {
  padding: 8px 10px;
  border: 1px solid #d8ddd3;
  background: #d8d8d8;
  color: #4f5b50;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: left;
}

.lead-calculator-table tbody td,
.lead-calculator-table tbody th,
.lead-calculator-matrix tbody td,
.lead-calculator-matrix tbody th {
  padding: 8px 10px;
  border: 1px solid #e3e7e0;
  background: #fff;
  vertical-align: middle;
  font-size: 13px;
  line-height: 1.35;
}

.lead-calculator-table tbody td:first-child,
.lead-calculator-table tbody td:nth-child(2),
.lead-calculator-matrix tbody th {
  background: #f2f2f2;
}

.lead-calculator-table tfoot th,
.lead-calculator-table tfoot td,
.lead-calculator-matrix tfoot th,
.lead-calculator-matrix tfoot td {
  padding: 9px 10px;
  border: 1px solid #d8ddd3;
  background: #d8d8d8;
  font-size: 13px;
  font-weight: 800;
}

.lead-calculator-matrix [data-base-activity].is-active {
  background: #cfe0d2;
  color: #163c23;
}

.lead-calculator-matrix [data-base-rate].is-active {
  background: #f4faf5;
}

.lead-calculator-matrix [data-base-rate].is-picked,
.lead-calculator-matrix tr.is-picked th {
  background: #dff0e4;
  color: #124225;
  font-weight: 800;
}

.lead-calculator-base-choice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.lead-calculator-rate-editor {
  display: grid;
  gap: 4px;
}

.lead-calculator-rate-editor small {
  font-size: 11px;
  color: #6b766b;
}

.lead-calculator-rate-editor input,
.lead-calculator-zero-option input[type="number"],
.lead-calculator-table input[type="number"],
.lead-calculator-table select,
.lead-calculator-matrix input[type="number"] {
  min-height: 32px;
  padding: 0 8px;
  border-radius: 8px;
  border-color: #cfd6cd;
  background: #fff;
  box-shadow: none;
}

.lead-calculator-table select[data-calc-control="toggle"] {
  min-width: 86px;
}

.lead-calculator-table input[data-calc-control="count"] {
  min-width: 92px;
}

.lead-calculator-row-muted {
  color: rgba(14, 26, 18, 0.46);
}

.lead-calculator-summary-strip {
  display: grid;
  gap: 0;
  border-top: 1px solid #dfe4db;
}

.lead-calculator-summary-strip > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid #e7ebe5;
  border-radius: 0;
  background: #f2f2f2;
}

.lead-calculator-summary-strip > div:last-child {
  background: #d8d8d8;
}

.lead-calculator-summary-strip > div:nth-child(3) strong {
  color: #8f3b2a;
}

.lead-calculator-summary-strip strong {
  min-width: 160px;
  padding: 7px 10px;
  border: 1px solid #d1d6cf;
  background: #fff;
  text-align: right;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.lead-calculator-note {
  padding: 10px 12px;
  border-top: 1px solid #e7ebe5;
  background: #fafbf8;
  font-size: 12px;
  line-height: 1.45;
}

.lead-calculator-card .actions {
  justify-content: flex-end;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid #e7ebe5;
  background: #fff;
}

.lead-contracts-card {
  display: grid;
  gap: 14px;
}

.lead-contracts-list {
  display: grid;
  gap: 12px;
}

.lead-contract-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
}

.lead-contract-meta {
  display: grid;
  gap: 4px;
}

.lead-timeline {
  display: grid;
  gap: 12px;
}

.lead-timeline-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
}

.lead-timeline-marker {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(0, 146, 69, 0.16), rgba(183, 148, 65, 0.12));
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 800;
}

.lead-timeline-card {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
}

.lead-timeline-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.lead-task-inline {
  display: grid;
  gap: 12px;
}

.lead-task-inline p {
  margin: 0;
}

.lead-task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lead-task-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(84, 100, 78, 0.08);
  font-size: 12px;
  font-weight: 700;
}

.chat-roster,
.chat-stage {
  display: grid;
  gap: 14px;
  min-height: calc(100vh - 170px);
}

.chat-workbench-contact-center {
  grid-template-columns: 360px minmax(0, 1fr);
}

.chat-workbench-contact-center .chat-roster {
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.chat-workbench-contact-center .chat-stage {
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.chat-workbench-contact-center .chat-roster-top {
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(84, 100, 78, 0.08);
  background: rgba(255, 255, 255, 0.96);
}

.chat-roster-heading {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.chat-workbench-contact-center .chat-roster-heading {
  gap: 0;
}

.chat-roster-section-tag,
.chat-view-switcher-trigger {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 16px;
  border: 1px solid rgba(84, 100, 78, 0.12);
  background: rgba(255, 255, 255, 0.94);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 700;
}

.chat-roster-section-tag {
  width: fit-content;
  color: rgba(14, 26, 18, 0.72);
  font-size: 13px;
}

.chat-view-switcher {
  position: relative;
  width: 100%;
}

.chat-view-switcher summary {
  list-style: none;
  cursor: pointer;
}

.chat-view-switcher summary::-webkit-details-marker {
  display: none;
}

.chat-view-switcher-trigger {
  width: 100%;
  justify-content: space-between;
}

.chat-view-switcher-label {
  color: rgba(14, 26, 18, 0.54);
  font-size: 12px;
  font-weight: 700;
}

.chat-view-switcher-value {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 800;
}

.chat-view-switcher-caret {
  color: rgba(14, 26, 18, 0.46);
  font-size: 14px;
}

.chat-view-switcher-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 20;
  width: min(340px, 100%);
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(84, 100, 78, 0.12);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 34px rgba(14, 26, 18, 0.12);
  display: grid;
  gap: 12px;
}

.chat-view-switcher:not([open]) .chat-view-switcher-menu {
  display: none;
}

.chat-view-switcher-group {
  display: grid;
  gap: 8px;
}

.chat-view-switcher-group-title {
  margin: 0;
  color: rgba(14, 26, 18, 0.44);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.chat-view-switcher-link {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1px solid rgba(84, 100, 78, 0.08);
  background: rgba(246, 247, 242, 0.8);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.chat-view-switcher-link.active {
  border-color: rgba(0, 146, 69, 0.14);
  background: rgba(236, 246, 238, 0.96);
  color: var(--primary-dark);
}

.chat-view-switcher-count,
.chat-channel-option strong,
.chat-channel-switcher-count {
  min-width: 24px;
  min-height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(14, 26, 18, 0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}

.chat-roster-kicker,
.chat-stage-empty-kicker {
  margin: 0;
  color: rgba(0, 122, 57, 0.72);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.chat-roster-title,
.chat-stage-title,
.chat-stage-empty-title {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.18;
  font-weight: 800;
}

.chat-roster-copy,
.chat-stage-copy,
.chat-stage-empty-copy {
  margin: 0;
  color: rgba(14, 26, 18, 0.58);
  font-size: 13px;
  line-height: 1.5;
}

.chat-stage-badges,
.chat-stage-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chat-channel-switcher {
  position: relative;
  width: 100%;
}

.chat-channel-switcher summary {
  list-style: none;
  cursor: pointer;
}

.chat-channel-switcher summary::-webkit-details-marker {
  display: none;
}

.chat-channel-switcher-trigger {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 16px;
  border: 1px solid rgba(84, 100, 78, 0.12);
  background: rgba(255, 255, 255, 0.95);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.chat-channel-switcher-menu-icon {
  width: 18px;
  height: 18px;
  color: rgba(14, 26, 18, 0.62);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.chat-channel-switcher-menu-icon svg {
  width: 16px;
  height: 16px;
}

.chat-channel-switcher-value {
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.chat-channel-switcher-caret {
  color: rgba(14, 26, 18, 0.46);
  font-size: 12px;
}

.chat-channel-switcher-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 18;
  width: 100%;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid rgba(84, 100, 78, 0.12);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 34px rgba(14, 26, 18, 0.12);
  display: grid;
  gap: 8px;
}

.chat-channel-switcher:not([open]) .chat-channel-switcher-menu {
  display: none;
}

.chat-channel-option {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 14px;
  border: 1px solid rgba(84, 100, 78, 0.08);
  background: rgba(246, 247, 242, 0.8);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
}

.chat-channel-option.active {
  border-color: rgba(0, 146, 69, 0.14);
  background: rgba(236, 246, 238, 0.96);
  color: var(--primary-dark);
}

.chat-search-shell form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.chat-search-shell input {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(84, 100, 78, 0.12);
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
}

.chat-search-shell button {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 14px;
}

.chat-thread-card {
  display: grid;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.chat-thread-main {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-width: 0;
}

.chat-thread-title {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
}

.chat-thread-date {
  color: rgba(14, 26, 18, 0.48);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.chat-thread-preview {
  margin: 4px 0 0;
  color: rgba(14, 26, 18, 0.58);
  font-size: 12px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-thread-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.chat-thread-unread {
  min-width: 24px;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}

.chat-thread-empty {
  padding: 18px;
  border-radius: 18px;
  border: 1px dashed rgba(84, 100, 78, 0.18);
  background: rgba(250, 251, 248, 0.92);
  color: rgba(14, 26, 18, 0.56);
  font-size: 13px;
  line-height: 1.5;
}

.chat-stage-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.chat-stage-empty {
  min-height: 100%;
}

.chat-stage-empty-box {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 100%;
  padding: 28px;
  border-radius: 22px;
  border: 1px solid rgba(84, 100, 78, 0.1);
  background:
    radial-gradient(circle at top right, rgba(183, 148, 65, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 248, 244, 0.98));
  box-shadow: 0 20px 36px rgba(14, 26, 18, 0.06);
}

.chat-stage-empty-visual {
  position: relative;
  height: 130px;
  margin-bottom: 4px;
}

.chat-stage-empty-card {
  position: absolute;
  inset: 12px auto auto 0;
  width: 220px;
  height: 104px;
  border-radius: 24px;
  border: 1px solid rgba(84, 100, 78, 0.1);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 20px 34px rgba(14, 26, 18, 0.08);
}

.chat-stage-empty-badge {
  position: absolute;
  min-width: 42px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 28px rgba(14, 26, 18, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.chat-stage-empty-badge.one {
  top: 0;
  left: 190px;
}

.chat-stage-empty-badge.two {
  top: 56px;
  left: 230px;
}

.chat-stage-empty-badge.three {
  top: 18px;
  left: 284px;
}

.chat-stage-empty-orb {
  position: absolute;
  top: 24px;
  left: 118px;
  width: 116px;
  height: 116px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.8), rgba(0, 146, 69, 0.22) 38%, rgba(0, 122, 57, 0.12) 100%);
  filter: blur(0.2px);
}

.chat-stage-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.chat-stage-summary-card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(84, 100, 78, 0.1);
  background: rgba(255, 255, 255, 0.94);
  color: inherit;
  text-decoration: none;
  display: grid;
  gap: 10px;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.chat-stage-summary-card:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 146, 69, 0.18);
  box-shadow: 0 16px 28px rgba(14, 26, 18, 0.06);
}

.chat-stage-summary-card.active {
  border-color: rgba(0, 146, 69, 0.18);
  background: rgba(239, 247, 241, 0.98);
}

.chat-stage-summary-label {
  color: rgba(14, 26, 18, 0.48);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chat-stage-summary-value {
  color: var(--text);
  font-size: 24px;
  line-height: 1;
  font-weight: 800;
}

.chat-stage-empty-contact-center .chat-stage-empty-box {
  gap: 16px;
}

.chat-stage-empty-contact-center .chat-stage-empty-title {
  font-size: 18px;
}

.chat-stage-empty-contact-center .chat-stage-empty-copy {
  max-width: 760px;
}

.chat-stage-empty-note {
  max-width: 720px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px dashed rgba(84, 100, 78, 0.16);
  background: rgba(250, 251, 248, 0.92);
  color: rgba(14, 26, 18, 0.62);
  font-size: 13px;
  line-height: 1.55;
}

.chat-workbench-contact-center .chat-roster-top {
  align-items: flex-start;
}

.chat-workbench-contact-center .chat-roster-copy,
.chat-workbench-contact-center .chat-search-shell,
.chat-workbench-contact-center .chat-roster-section-tag,
.chat-workbench-contact-center .chat-roster-kicker,
.chat-workbench-contact-center .chat-roster-title {
  display: none;
}

.chat-workbench-contact-center .chat-thread-scroll {
  gap: 0;
  overflow: auto;
  background: rgba(255, 255, 255, 0.98);
}

.chat-workbench-contact-center .chat-thread-card {
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid rgba(84, 100, 78, 0.08);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.chat-workbench-contact-center .chat-thread-card:hover {
  background: rgba(244, 248, 242, 0.9);
}

.chat-workbench-contact-center .chat-thread-card.active {
  border: 0;
  border-bottom: 1px solid rgba(84, 100, 78, 0.08);
  background: linear-gradient(135deg, rgba(0, 146, 69, 0.18), rgba(0, 146, 69, 0.1));
  box-shadow: inset 4px 0 0 rgba(0, 146, 69, 0.72);
}

.chat-workbench-contact-center .chat-thread-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
}

.chat-workbench-contact-center .chat-thread-top {
  align-items: flex-start;
}

.chat-workbench-contact-center .chat-thread-title {
  font-size: 13px;
}

.chat-workbench-contact-center .chat-thread-preview {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.chat-workbench-contact-center .chat-thread-bottom {
  justify-content: flex-start;
}

.chat-workbench-contact-center .chat-thread-empty {
  margin: 14px;
}

.chat-contact-footer {
  padding: 14px 16px 16px;
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid rgba(84, 100, 78, 0.08);
  background: rgba(255, 255, 255, 0.96);
}

.chat-contact-new-chat {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 16px 28px rgba(0, 122, 57, 0.22);
  text-decoration: none;
}

.chat-contact-new-chat svg {
  width: 22px;
  height: 22px;
}

.chat-workbench-contact-center .chat-stage-head {
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(84, 100, 78, 0.08);
}

.chat-stage-head-main {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-width: 0;
}

.chat-stage-head-copy-group {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.chat-stage-head-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(0, 146, 69, 0.2), rgba(0, 146, 69, 0.42));
  color: var(--primary-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  flex: 0 0 44px;
}

.chat-workbench-contact-center .chat-stage-title {
  font-size: 15px;
}

.chat-workbench-contact-center .chat-stage-copy {
  font-size: 12px;
}

.chat-workbench-contact-center .chat-stage-badges {
  gap: 6px;
}

.chat-workbench-contact-center .chat-stage-stream {
  padding: 18px;
  overflow: auto;
  align-content: start;
  background:
    radial-gradient(circle at 14% 18%, rgba(255, 255, 255, 0.18), transparent 18%),
    radial-gradient(circle at 84% 22%, rgba(255, 255, 255, 0.12), transparent 22%),
    radial-gradient(circle at 26% 82%, rgba(255, 255, 255, 0.08), transparent 16%),
    radial-gradient(circle at 76% 76%, rgba(255, 255, 255, 0.1), transparent 18%),
    linear-gradient(180deg, rgba(174, 203, 145, 0.96), rgba(147, 187, 122, 0.96));
}

.chat-workbench-contact-center .chat-message {
  max-width: min(74%, 720px);
  box-shadow: 0 8px 18px rgba(14, 26, 18, 0.08);
}

.chat-workbench-contact-center .chat-message.incoming {
  background: rgba(255, 255, 255, 0.98);
}

.chat-workbench-contact-center .chat-message.mine {
  background: rgba(236, 255, 225, 0.96);
}

.chat-workbench-contact-center .chat-message.system {
  background: rgba(255, 255, 255, 0.82);
}

.chat-workbench-contact-center .chat-message-author {
  margin: 0 0 4px 4px;
  color: rgba(14, 26, 18, 0.62);
  font-size: 12px;
  font-weight: 700;
}

.chat-workbench-contact-center .chat-bubble-foot {
  margin-top: 6px;
}

.chat-workbench-contact-center .chat-compose-panel {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid rgba(84, 100, 78, 0.08);
}

.chat-workbench-contact-center .chat-compose-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.chat-workbench-contact-center .chat-compose-form textarea {
  min-height: 46px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(84, 100, 78, 0.12);
  background: rgba(255, 255, 255, 0.98);
}

.chat-workbench-contact-center .chat-compose-form button {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 18px;
}

.chat-workbench-contact-center .chat-tools {
  padding: 12px 16px 16px;
  background: rgba(255, 255, 255, 0.94);
  border-top: 1px solid rgba(84, 100, 78, 0.08);
}

.chat-workbench-contact-center .chat-tool-card {
  background: rgba(250, 251, 248, 0.96);
}

.chat-workbench-contact-center .chat-stage-empty {
  min-height: 100%;
}

.chat-workbench-contact-center .chat-stage-empty-box {
  justify-content: center;
  background:
    radial-gradient(circle at 14% 18%, rgba(255, 255, 255, 0.18), transparent 18%),
    radial-gradient(circle at 84% 22%, rgba(255, 255, 255, 0.12), transparent 22%),
    radial-gradient(circle at 26% 82%, rgba(255, 255, 255, 0.08), transparent 16%),
    radial-gradient(circle at 76% 76%, rgba(255, 255, 255, 0.1), transparent 18%),
    linear-gradient(180deg, rgba(174, 203, 145, 0.96), rgba(147, 187, 122, 0.96));
}

.chat-workbench-contact-center .chat-stage-empty-kicker,
.chat-workbench-contact-center .chat-stage-empty-title,
.chat-workbench-contact-center .chat-stage-empty-copy {
  max-width: 760px;
}

.chat-workbench-contact-center .chat-stage-empty-note {
  border-style: solid;
  border-color: rgba(84, 100, 78, 0.1);
  background: rgba(255, 255, 255, 0.88);
}

.chat-workbench-contact-center {
  grid-template-columns: 330px minmax(0, 1fr);
  align-items: stretch;
}

.chat-workbench-contact-center .chat-roster,
.chat-workbench-contact-center .chat-stage {
  min-height: calc(100vh - 152px);
}

.chat-workbench-contact-center .chat-roster-top {
  display: grid;
  gap: 10px;
  padding: 12px 14px 10px;
}

.chat-contact-toolbar {
  display: grid;
  grid-template-columns: minmax(112px, auto) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.chat-contact-search {
  margin: 0;
}

.chat-contact-search input {
  min-height: 36px;
  width: 100%;
  padding: 0 14px;
  border-radius: 16px;
  border: 1px solid rgba(84, 100, 78, 0.12);
  background: rgba(247, 249, 244, 0.96);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.chat-contact-search input::placeholder {
  color: rgba(14, 26, 18, 0.36);
}

.chat-contact-roster-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chat-contact-roster-label {
  color: rgba(14, 26, 18, 0.52);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.chat-contact-roster-count {
  min-width: 24px;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(0, 146, 69, 0.08);
  color: var(--primary-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
}

.chat-workbench-contact-center .chat-thread-scroll {
  gap: 0;
}

.chat-workbench-contact-center .chat-thread-card {
  padding: 12px 14px 11px;
}

.chat-workbench-contact-center .chat-thread-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: flex-start;
}

.chat-thread-meta-stack {
  display: grid;
  justify-items: end;
  gap: 4px;
  flex: 0 0 auto;
}

.chat-workbench-contact-center .chat-thread-top {
  align-items: flex-start;
}

.chat-workbench-contact-center .chat-thread-date {
  color: rgba(14, 26, 18, 0.44);
  font-size: 11px;
  font-weight: 700;
}

.chat-workbench-contact-center .chat-thread-unread {
  min-width: 20px;
  min-height: 20px;
  padding: 0 6px;
  font-size: 11px;
  box-shadow: none;
}

.chat-thread-channel-row {
  margin-top: 8px;
}

.chat-thread-channel {
  color: rgba(0, 122, 57, 0.82);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chat-workbench-contact-center .chat-stage {
  position: relative;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.chat-workbench-contact-center .chat-stage-head {
  align-items: center;
  padding: 12px 18px;
}

.chat-workbench-contact-center .chat-stage-head-main {
  align-items: center;
}

.chat-workbench-contact-center .chat-stage-copy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.chat-workbench-contact-center .chat-stage-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.chat-stage-tools-drawer {
  position: relative;
}

.chat-stage-tools-drawer summary {
  list-style: none;
  cursor: pointer;
}

.chat-stage-tools-drawer summary::-webkit-details-marker {
  display: none;
}

.chat-stage-tools-trigger {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 16px;
  border: 1px solid rgba(84, 100, 78, 0.12);
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 10px 22px rgba(14, 26, 18, 0.06);
}

.chat-stage-tools-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 24;
  width: min(370px, calc(100vw - 56px));
  padding: 12px;
  border-radius: 20px;
  border: 1px solid rgba(84, 100, 78, 0.12);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 40px rgba(14, 26, 18, 0.14);
  backdrop-filter: blur(18px);
}

.chat-stage-tools-grid {
  display: grid;
  gap: 10px;
}

.chat-stage-tools-panel .chat-tool-card {
  padding: 0;
  border: 1px solid rgba(84, 100, 78, 0.08);
  border-radius: 16px;
  background: rgba(248, 250, 246, 0.96);
}

.chat-stage-tools-panel .chat-tool-card summary {
  min-height: 42px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  font-size: 13px;
  font-weight: 800;
}

.chat-stage-tools-panel .chat-tool-body {
  padding: 0 14px 14px;
}

.chat-tool-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.chat-tool-actions form {
  margin: 0;
  display: flex;
}

.chat-tool-actions button {
  width: 100%;
  min-height: 40px;
  padding: 0 14px;
  justify-content: center;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  box-shadow: none;
}

.chat-tool-actions form:last-child {
  grid-column: 1 / -1;
}

.chat-stage-tools-panel .chat-tool-actions {
  gap: 8px;
}

.chat-stage-tools-panel .chat-tool-actions button {
  min-height: 38px;
  border-radius: 12px;
}

.chat-workbench-contact-center .chat-stage-stream {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 24px 20px;
}

.chat-workbench-contact-center .chat-message {
  max-width: min(72%, 760px);
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.chat-workbench-contact-center .chat-bubble {
  max-width: none;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 22px rgba(14, 26, 18, 0.08);
}

.chat-workbench-contact-center .chat-message.incoming {
  margin-right: auto;
}

.chat-workbench-contact-center .chat-message.incoming .chat-bubble {
  background: rgba(255, 255, 255, 0.98);
}

.chat-workbench-contact-center .chat-message.mine {
  margin-left: auto;
  background: transparent;
}

.chat-workbench-contact-center .chat-message.mine .chat-bubble {
  background: rgba(236, 255, 225, 0.98);
}

.chat-workbench-contact-center .chat-message.system {
  max-width: fit-content;
  margin: 0 auto;
  background: transparent;
}

.chat-workbench-contact-center .chat-message.system .chat-bubble {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: none;
}

.chat-workbench-contact-center .chat-compose-panel {
  padding: 12px 16px 14px;
}

.chat-workbench-contact-center .chat-compose-form {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.chat-workbench-contact-center .chat-compose-form textarea {
  min-height: 48px;
  max-height: 120px;
  resize: vertical;
}

.chat-workbench-contact-center .chat-compose-form button {
  min-width: 104px;
  min-height: 48px;
  border-radius: 18px;
}

.chat-bubble,
.chat-message {
  max-width: 82%;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
}

.chat-message.mine {
  margin-left: auto;
  background: rgba(95, 141, 99, 0.12);
}

.chat-message.system {
  margin: 0 auto;
  background: rgba(84, 100, 78, 0.08);
}

.mail-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 16px;
}

.mail-item.unread {
  border-color: rgba(95, 141, 99, 0.2);
}

.mail-item-head,
.chat-thread-top,
.collab-card-top,
.staff-user-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.tasks-shell .panel,
.tracker-shell .panel,
.documents-shell .panel,
.drive-shell .panel,
.kb-shell .panel,
.staff-shell .panel {
  background: var(--surface-strong);
}

body.page-deals {
  background:
    radial-gradient(circle at top left, rgba(0, 146, 69, 0.12), transparent 26%),
    radial-gradient(circle at top right, rgba(183, 148, 65, 0.08), transparent 22%),
    linear-gradient(180deg, #f7f8f4 0%, #ecefe8 100%);
}

body.page-deals .shell {
  grid-template-columns: 268px minmax(0, 1fr);
}

body.page-deals .sidebar {
  border-right: 1px solid rgba(14, 26, 18, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(247, 247, 243, 0.98)),
    radial-gradient(circle at top left, rgba(0, 146, 69, 0.1), rgba(183, 148, 65, 0.08) 34%, rgba(0, 0, 0, 0));
  color: var(--text);
}

body.page-deals .brand-logo-wrap {
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.08) 52%, rgba(255, 255, 255, 0));
  box-shadow: 0 14px 28px rgba(0, 146, 69, 0.14);
}

body.page-deals .brand-title,
body.page-deals .brand-subtitle,
body.page-deals .sidebar-label {
  color: var(--text);
}

body.page-deals .brand-subtitle,
body.page-deals .sidebar-label {
  color: rgba(14, 26, 18, 0.48);
}

body.page-deals .nav-link {
  color: var(--text);
}

body.page-deals .nav-link:hover {
  background: rgba(0, 146, 69, 0.08);
}

body.page-deals .nav-link.active {
  background: linear-gradient(135deg, rgba(0, 146, 69, 0.16), rgba(183, 148, 65, 0.08));
}

body.page-deals .nav-link-main {
  min-height: 48px;
}

body.page-deals .nav-link.active .nav-link-main {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 12px 22px rgba(0, 122, 57, 0.2), inset 0 1px 0 rgba(255, 241, 204, 0.22);
}

body.page-deals .nav-icon {
  background: rgba(0, 146, 69, 0.1);
  color: var(--primary-dark);
}

body.page-deals .nav-link.active .nav-icon {
  background: rgba(255, 255, 255, 0.18);
}

body.page-deals .main {
  padding: 14px 18px 18px;
}

body.page-deals .frame {
  min-height: calc(100vh - 32px);
  gap: 16px;
  border-radius: 0;
  background: transparent;
  position: relative;
  overflow: visible;
}

body.page-deals .frame::before {
  content: none;
}

body.page-deals .topbar {
  gap: 14px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px);
}

body.page-deals .topbar-search,
body.page-deals .topbar-chip,
body.page-deals .user-pill,
body.page-deals .topbar-icon-button,
body.page-deals .mobile-toggle {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
}

body.page-deals .topbar-search {
  min-height: 40px;
  padding: 0 14px;
  gap: 10px;
}

body.page-deals .topbar-search-icon svg,
body.page-deals .topbar-icon-button svg,
body.page-deals .mobile-toggle svg,
body.page-deals .topbar-shortcut-icon svg {
  width: 16px;
  height: 16px;
}

body.page-deals .topbar-actions {
  gap: 8px;
}

body.page-deals .topbar-shortcut {
  min-height: 40px;
  padding: 0 16px;
  gap: 8px;
}

body.page-deals .topbar-icon-button,
body.page-deals .mobile-toggle {
  width: 40px;
  height: 40px;
}

body.page-deals .topbar-chip {
  min-height: 40px;
  padding: 0 15px;
}

body.page-deals .user-pill {
  gap: 10px;
  padding: 4px 8px 4px 4px;
}

body.page-deals .topbar-search input,
body.page-deals .topbar-search-icon,
body.page-deals .topbar-chip,
body.page-deals .user-pill-link,
body.page-deals .user-pill-meta .muted,
body.page-deals .topbar-icon-button,
body.page-deals .mobile-toggle {
  color: var(--muted);
}

body.page-deals .topbar-search input::placeholder {
  color: rgba(14, 26, 18, 0.42);
}

body.page-deals .user-pill-link {
  background: var(--surface-muted);
  color: var(--text);
}

body.page-deals .topbar-shortcut {
  border-color: transparent;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  box-shadow: 0 10px 24px rgba(22, 163, 74, 0.24);
}

body.page-deals .topbar-icon-button:hover,
body.page-deals .mobile-toggle:hover,
body.page-deals .user-pill-link:hover {
  background: #fff;
}

body.page-deals .user-pill-avatar {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, rgba(0, 146, 69, 0.2), rgba(183, 148, 65, 0.34));
  color: var(--primary-dark);
}

body.page-deals .user-pill-meta strong {
  font-size: 13px;
  line-height: 1.1;
}

body.page-deals .user-pill-meta .muted {
  font-size: 10px;
}

body.page-deals .user-pill-link {
  min-height: 30px;
  padding: 0 10px;
}

body.page-deals .content {
  position: relative;
  z-index: 1;
  padding: 0 0 8px;
}

.b24-deals-shell,
.b24-task-board {
  display: grid;
  gap: 16px;
  color: var(--text);
}

.b24-deals-hero,
.b24-deals-summary,
.b24-list-view,
.b24-calendar-view,
.b24-stage-column,
.b24-deal-modal-card {
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(12px);
}

.b24-deals-hero,
.b24-deals-summary,
.b24-list-view,
.b24-calendar-view,
.b24-deal-modal-card {
  padding: 14px;
}

.b24-deals-hero {
  position: relative;
  overflow: hidden;
}

.b24-deals-hero::before {
  content: "";
  position: absolute;
  inset: auto -40px -120px auto;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 146, 69, 0.16), rgba(183, 148, 65, 0.04) 54%, rgba(0, 146, 69, 0));
  pointer-events: none;
}

.b24-deals-topline,
.b24-toolbar-actions,
.b24-deals-top-actions,
.b24-calendar-header,
.b24-calendar-nav,
.b24-board-caption,
.b24-board-caption-links,
.b24-deal-modal-head,
.b24-deal-modal-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.b24-deals-topline,
.b24-board-caption,
.b24-deal-modal-head,
.b24-deal-modal-actions,
.b24-calendar-header {
  justify-content: space-between;
}

.b24-deals-heading {
  display: grid;
  gap: 4px;
  max-width: 720px;
}

.b24-deals-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(0, 122, 57, 0.78);
}

.b24-deals-heading h1 {
  margin-bottom: 0;
  font-size: 24px;
  color: var(--text);
}

.b24-deals-copy {
  max-width: 640px;
  color: var(--muted);
  font-size: 11px;
}

.b24-view-switch {
  gap: 4px;
}

.b24-view-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  color: var(--muted);
  font-weight: 700;
  font-size: 11px;
}

.b24-view-switch a.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-color: transparent;
}

button.b24-create-trigger[type="button"] {
  min-height: 20px;
  min-width: 74px;
  padding: 0 10px;
  border-radius: 7px;
  border: 0;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 10px;
  box-shadow: 0 6px 14px rgba(0, 122, 57, 0.16), inset 0 1px 0 rgba(255, 241, 204, 0.14);
}

.b24-deals-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.9);
}

.b24-summary-pill,
.b24-caption-chip {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(0, 146, 69, 0.12);
  background: rgba(0, 146, 69, 0.08);
  color: var(--primary-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}

.b24-summary-pill.active,
.b24-caption-chip.active {
  background: linear-gradient(135deg, rgba(0, 146, 69, 0.18), rgba(183, 148, 65, 0.12));
  border-color: rgba(0, 146, 69, 0.24);
}

.b24-deals-toolbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(240px, 1.35fr) auto;
  gap: 8px;
  align-items: end;
}

.b24-toolbar-field,
.b24-toolbar-search {
  display: grid;
  gap: 4px;
}

.b24-toolbar-field span,
.b24-toolbar-search span {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(14, 26, 18, 0.44);
}

.b24-toolbar-field select,
.b24-toolbar-search input {
  min-height: 24px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  font-size: 12px;
}

.b24-toolbar-field select option {
  color: #111827;
}

.b24-toolbar-search input::placeholder {
  color: rgba(14, 26, 18, 0.38);
}

.b24-toolbar-actions button {
  min-width: 96px;
  min-height: 24px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 11px;
}

.b24-board-caption {
  gap: 14px;
}

.b24-board-caption-group,
.b24-board-caption-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.b24-board-caption-links a {
  color: var(--primary-dark);
  font-weight: 700;
}

.b24-board-caption-links a:hover {
  color: var(--primary);
}

.b24-board-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(222px, 246px);
  gap: 10px;
  margin-top: 8px;
  align-items: start;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 12px;
  scroll-snap-type: x proximity;
}

.b24-board-scroll::-webkit-scrollbar {
  height: 10px;
}

.b24-board-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(14, 26, 18, 0.16);
}

.b24-stage-column {
  --b24-stage-accent: #009245;
  min-height: 560px;
  padding: 8px 0 12px;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(242, 245, 239, 0.96)),
    linear-gradient(180deg, rgba(0, 146, 69, 0.03), rgba(255, 255, 255, 0));
  scroll-snap-align: start;
}

.b24-stage-column[data-tone="new"] {
  --b24-stage-accent: #36a8ef;
}

.b24-stage-column[data-tone="qualified"] {
  --b24-stage-accent: #18b8f3;
}

.b24-stage-column[data-tone="proposal"] {
  --b24-stage-accent: #59d4e3;
}

.b24-stage-column[data-tone="negotiation"] {
  --b24-stage-accent: #46dcb5;
}

.b24-stage-column[data-tone="emerald"] {
  --b24-stage-accent: #25c26e;
}

.b24-stage-column[data-tone="violet"] {
  --b24-stage-accent: #8a78ff;
}

.b24-stage-column[data-tone="rose"] {
  --b24-stage-accent: #ef6f9f;
}

.b24-stage-column[data-tone="won"] {
  --b24-stage-accent: #f3b01d;
}

.b24-stage-column[data-tone="lost"] {
  --b24-stage-accent: #c98a1c;
}

.b24-stage-header {
  position: relative;
  z-index: 1;
  padding: 0 10px;
  display: grid;
  gap: 4px;
}

.b24-stage-column:hover .b24-stage-header,
.b24-stage-column:focus-within .b24-stage-header {
  z-index: 3;
}

.b24-stage-ribbon {
  position: relative;
  min-height: 24px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 0;
  border-radius: 8px;
  background: var(--b24-stage-accent);
  color: #fff;
  font-weight: 800;
  font-size: 11px;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 50%, calc(100% - 18px) 100%, 0 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.b24-stage-ribbon-main {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1 1 auto;
}

.b24-stage-label-group {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 3px;
}

.b24-stage-label {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[data-stage-count] {
  flex: 0 0 auto;
  font-size: 9px;
  line-height: 1;
  font-weight: 700;
  opacity: 0.88;
}

[data-stage-count]::before {
  content: "(";
}

[data-stage-count]::after {
  content: ")";
}

.b24-stage-actions {
  position: absolute;
  top: 12px;
  right: -10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  backdrop-filter: none;
  opacity: 0;
  transform: translate3d(6px, -50%, 0);
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.b24-stage-header:hover .b24-stage-actions,
.b24-stage-actions:focus-within,
.b24-stage-actions.is-open {
  opacity: 1;
  transform: translate3d(0, -50%, 0);
  pointer-events: auto;
}

.b24-stage-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: -6px;
  width: 196px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-lg);
  display: grid;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.b24-stage-actions.is-open .b24-stage-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.b24-stage-panel-title {
  font-size: 11px;
  line-height: 1.2;
  font-weight: 700;
  color: rgba(14, 26, 18, 0.56);
}

.b24-stage-panel-action-row {
  display: grid;
  gap: 8px;
}

button.b24-stage-panel-action[type="button"] {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(0, 146, 69, 0.14);
  background: rgba(0, 146, 69, 0.06);
  color: var(--primary-dark);
  justify-content: flex-start;
  font-size: 12px;
  font-weight: 700;
  box-shadow: none;
  filter: none;
  transform: none;
  outline: none;
}

button.b24-stage-panel-action[type="button"]:hover,
button.b24-stage-panel-action[type="button"]:focus,
button.b24-stage-panel-action[type="button"]:focus-visible {
  border-color: rgba(0, 146, 69, 0.22);
  background: rgba(0, 146, 69, 0.1);
  color: var(--primary-dark);
  box-shadow: none;
  filter: none;
  transform: none;
  outline: none;
}

.b24-stage-tone-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

button.b24-stage-tone-option[type="button"] {
  width: 20px;
  min-width: 20px;
  height: 20px;
  min-height: 20px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid transparent;
  box-shadow: none;
  filter: none;
  transform: none;
  outline: none;
}

button.b24-stage-tone-option[data-stage-tone="new"][type="button"] {
  background: #36a8ef;
}

button.b24-stage-tone-option[data-stage-tone="qualified"][type="button"] {
  background: #18b8f3;
}

button.b24-stage-tone-option[data-stage-tone="proposal"][type="button"] {
  background: #59d4e3;
}

button.b24-stage-tone-option[data-stage-tone="negotiation"][type="button"] {
  background: #46dcb5;
}

button.b24-stage-tone-option[data-stage-tone="emerald"][type="button"] {
  background: #25c26e;
}

button.b24-stage-tone-option[data-stage-tone="violet"][type="button"] {
  background: #8a78ff;
}

button.b24-stage-tone-option[data-stage-tone="rose"][type="button"] {
  background: #ef6f9f;
}

button.b24-stage-tone-option[data-stage-tone="won"][type="button"] {
  background: #f3b01d;
}

button.b24-stage-tone-option[data-stage-tone="lost"][type="button"] {
  background: #c98a1c;
}

button.b24-stage-tone-option[type="button"].is-active,
button.b24-stage-tone-option[type="button"]:hover,
button.b24-stage-tone-option[type="button"]:focus,
button.b24-stage-tone-option[type="button"]:focus-visible {
  border-color: rgba(14, 26, 18, 0.14);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.92);
  filter: none;
  transform: none;
  outline: none;
}

button.b24-stage-delete[type="button"] {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(180, 35, 24, 0.16);
  background: rgba(180, 35, 24, 0.06);
  color: #b42318;
  justify-content: flex-start;
  font-size: 12px;
  font-weight: 700;
  box-shadow: none;
  filter: none;
  transform: none;
  outline: none;
}

button.b24-stage-delete[type="button"]:hover,
button.b24-stage-delete[type="button"]:focus,
button.b24-stage-delete[type="button"]:focus-visible {
  border-color: rgba(180, 35, 24, 0.22);
  background: rgba(180, 35, 24, 0.1);
  color: #b42318;
  box-shadow: none;
  filter: none;
  transform: none;
  outline: none;
}

button.b24-stage-action[type="button"] {
  width: 14px;
  min-width: 14px;
  height: 14px;
  min-height: 14px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  line-height: 1;
  font-weight: 700;
  box-shadow: none;
  filter: none;
  transform: none;
  outline: none;
}

button.b24-stage-action[data-stage-rename][type="button"] {
  width: 12px;
  min-width: 12px;
  height: 12px;
  min-height: 12px;
  padding: 0;
  border-radius: 4px;
  color: var(--primary);
  text-shadow: none;
}

button.b24-stage-action[data-stage-add][type="button"] {
  width: 24px;
  min-width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  border-color: transparent;
  border-width: 0;
  background: transparent;
  font-size: 18px;
  font-weight: 900;
  line-height: 0.72;
  -webkit-text-stroke: 0.3px currentColor;
  box-shadow: none;
}

button.b24-stage-action[type="button"]:hover,
button.b24-stage-action[type="button"]:focus,
button.b24-stage-action[type="button"]:focus-visible {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  filter: none;
  outline: none;
  transform: none;
  opacity: 0.72;
}

.b24-stage-ribbon small {
  min-width: 18px;
  min-height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  line-height: 1;
}

.b24-stage-total {
  text-align: center;
  color: var(--text);
  font-size: 20px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.05em;
}

button.b24-stage-quick[type="button"] {
  min-height: 16px;
  min-width: 0;
  margin: 0 10px;
  padding: 0 8px;
  width: auto;
  max-width: calc(100% - 48px);
  justify-self: center;
  border-radius: 999px;
  border: 1px solid rgba(0, 146, 69, 0.16);
  background: rgba(0, 146, 69, 0.08);
  color: var(--primary-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  box-shadow: none;
  font-size: 10px;
  line-height: 1;
}

button.b24-stage-quick.is-compact[type="button"] {
  width: 74px;
  max-width: 74px;
  font-size: 12px;
  line-height: 1;
}

button.b24-stage-quick[type="button"]:disabled {
  opacity: 0.44;
  cursor: not-allowed;
}

.b24-stage-list {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 0 10px;
}

.b24-kanban-card {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 10px 10px 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
  color: var(--text);
  box-shadow: 0 8px 16px rgba(14, 26, 18, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

.b24-kanban-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  border-radius: 12px 0 0 12px;
  background: var(--b24-stage-accent);
}

.b24-kanban-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(14, 26, 18, 0.1);
}

.b24-kanban-card-top,
.b24-kanban-meta,
.b24-kanban-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.b24-kanban-card-top h4 {
  margin: 0;
  font-size: 13px;
  line-height: 1.25;
}

.b24-kanban-source {
  min-height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(0, 146, 69, 0.08);
  color: var(--primary-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.b24-kanban-amount {
  font-size: 18px;
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: var(--text);
  font-weight: 700;
}

.b24-kanban-company {
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
}

.b24-kanban-summary {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.b24-kanban-meta {
  font-size: 10px;
  color: rgba(14, 26, 18, 0.54);
}

.b24-kanban-footer {
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid rgba(14, 26, 18, 0.08);
}

.b24-kanban-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.b24-kanban-flag {
  min-height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(0, 146, 69, 0.08);
  color: var(--primary-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
}

.b24-kanban-flag.subtle {
  background: rgba(14, 26, 18, 0.05);
  color: rgba(14, 26, 18, 0.56);
}

.b24-kanban-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(0, 146, 69, 0.18), rgba(183, 148, 65, 0.28));
  color: var(--primary-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
}

.b24-stage-column[data-tone="won"] .b24-stage-ribbon,
.b24-stage-column[data-tone="lost"] .b24-stage-ribbon {
  color: #4b3610;
}

.b24-stage-column[data-tone="won"] .b24-stage-action,
.b24-stage-column[data-tone="lost"] .b24-stage-action {
  color: var(--primary);
}

.b24-stage-column[data-tone="won"] .b24-stage-action[data-stage-add],
.b24-stage-column[data-tone="lost"] .b24-stage-action[data-stage-add] {
  border-color: transparent;
  background: transparent !important;
}

.b24-stage-column[data-tone="won"] .b24-stage-action[data-stage-rename],
.b24-stage-column[data-tone="lost"] .b24-stage-action[data-stage-rename] {
  color: var(--primary);
  text-shadow: none;
}

.b24-stage-empty {
  padding: 24px 14px;
  border-radius: 16px;
  border: 1px dashed rgba(14, 26, 18, 0.14);
  background: rgba(255, 255, 255, 0.72);
  color: rgba(14, 26, 18, 0.46);
  text-align: center;
}

.b24-stage-column.is-drop-target {
  box-shadow: 0 0 0 2px rgba(0, 146, 69, 0.22), 0 18px 34px rgba(14, 26, 18, 0.12);
}

.b24-droptray {
  position: sticky;
  bottom: 14px;
  z-index: 12;
  opacity: 0;
  transform: translateY(18px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.b24-droptray.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.b24-droptray-inner {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.b24-dropzone {
  padding: 18px;
  border-radius: 18px;
  border: 1px dashed rgba(14, 26, 18, 0.14);
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  box-shadow: 0 16px 32px rgba(14, 26, 18, 0.1);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.b24-dropzone.danger {
  background: rgba(183, 148, 65, 0.12);
}

.b24-dropzone.is-drop-target {
  transform: translateY(-2px);
  border-style: solid;
  border-color: rgba(0, 146, 69, 0.28);
}

.b24-dropzone-title {
  font-size: 14px;
  font-weight: 800;
}

.b24-dropzone-stat {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 10px;
}

.b24-dropzone-stat strong,
.b24-dropzone-sum {
  font-size: 28px;
  line-height: 1;
  font-weight: 300;
  letter-spacing: -0.04em;
}

.b24-dropzone-stat span {
  color: var(--muted);
}

.b24-drag-preview {
  position: fixed;
  top: -1000px;
  left: -1000px;
  pointer-events: none;
}

.b24-drag-ghost {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.92;
  transform: rotate(2deg);
  box-shadow: 0 22px 48px rgba(14, 26, 18, 0.18);
}

.b24-kanban-card.is-dragging {
  opacity: 0.22;
}

.b24-kanban-card.is-updating,
.b24-stage-column.is-updating,
.b24-dropzone.is-updating {
  opacity: 0.66;
}

.b24-list-view,
.b24-calendar-view {
  color: var(--text);
}

.b24-list-table-wrap {
  overflow: auto;
}

.b24-list-table {
  min-width: 960px;
}

.b24-list-table thead th {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(14, 26, 18, 0.46);
  border-bottom-color: rgba(14, 26, 18, 0.08);
}

.b24-list-table tbody td {
  color: var(--text);
  border-bottom-color: rgba(14, 26, 18, 0.08);
}

.b24-list-title {
  color: var(--text);
  font-weight: 700;
}

.b24-list-subtitle,
.b24-list-empty,
.b24-list-due span {
  color: var(--muted);
}

.b24-stage-progress {
  display: grid;
  gap: 8px;
}

.b24-stage-progress-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(14, 26, 18, 0.08);
  overflow: hidden;
}

.b24-stage-progress-bar i {
  display: block;
  width: var(--stage-progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #42b76f);
}

.b24-task-list {
  align-content: start;
}

.b24-task-card .b24-kanban-company {
  color: var(--primary-dark);
}

.b24-task-deadline {
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
}

.b24-task-deadline.subtle {
  color: var(--muted);
}

.b24-calendar-header {
  margin-bottom: 16px;
}

.b24-calendar-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
}

.b24-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.b24-calendar-weekday {
  padding: 0 4px 6px;
  color: rgba(14, 26, 18, 0.46);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.b24-calendar-arrow,
.b24-calendar-today {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.b24-calendar-day {
  min-height: 140px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(14, 26, 18, 0.08);
  background: rgba(255, 255, 255, 0.9);
}

.b24-calendar-day.is-today {
  border-color: rgba(0, 146, 69, 0.28);
  box-shadow: inset 0 0 0 1px rgba(0, 146, 69, 0.16);
}

.b24-calendar-day.is-outside {
  opacity: 0.45;
}

.b24-calendar-day-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--text);
  font-weight: 800;
}

.b24-calendar-day-events {
  display: grid;
  gap: 8px;
}

.b24-calendar-event {
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(0, 146, 69, 0.08);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
}

.b24-calendar-event[data-tone="won"] {
  background: rgba(0, 146, 69, 0.14);
}

.b24-calendar-event[data-tone="lost"] {
  background: rgba(183, 148, 65, 0.18);
  color: #745913;
}

.b24-calendar-more {
  color: var(--muted);
  font-size: 12px;
}

.b24-deal-modal {
  padding: 0;
  border: 0;
  background: transparent;
}

.b24-deal-modal::backdrop {
  background: rgba(14, 26, 18, 0.3);
  backdrop-filter: blur(4px);
}

.b24-deal-modal-card {
  width: min(960px, calc(100vw - 40px));
  color: var(--text);
  background: rgba(255, 255, 255, 0.98);
}

.b24-deal-modal-kicker {
  margin-bottom: 4px;
  color: rgba(0, 122, 57, 0.72);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.b24-deal-modal-close {
  width: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  box-shadow: none;
}

.b24-deal-modal-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 14px;
  margin-top: 14px;
}

/* Dark sales board based on the GF45 kanban sketch. */
body.page-deals {
  --deals-bg: #050a0e;
  --deals-panel: rgba(15, 24, 30, 0.92);
  --deals-panel-strong: rgba(18, 29, 36, 0.96);
  --deals-line: rgba(70, 86, 96, 0.66);
  --deals-line-soft: rgba(57, 73, 83, 0.54);
  --deals-text: #f3fff8;
  --deals-muted: rgba(204, 218, 211, 0.72);
  --deals-dim: rgba(184, 199, 192, 0.54);
  --deals-green: #18d176;
  background:
    radial-gradient(circle at 18% 0%, rgba(0, 146, 69, 0.18), transparent 28%),
    radial-gradient(circle at 90% 2%, rgba(22, 163, 94, 0.11), transparent 24%),
    linear-gradient(180deg, #04090d 0%, #050a0e 100%);
  color: var(--deals-text);
}

body.page-deals .shell {
  grid-template-columns: 268px minmax(0, 1fr);
}

body.page-deals .sidebar {
  border-right: 1px solid rgba(43, 56, 65, 0.88);
  background:
    linear-gradient(135deg, rgba(16, 58, 39, 0.12) 0 1px, transparent 1px 18px),
    linear-gradient(180deg, rgba(9, 17, 22, 0.98), rgba(5, 12, 16, 0.98));
  color: var(--deals-text);
}

body.page-deals .brand-title,
body.page-deals .brand-subtitle,
body.page-deals .sidebar-label {
  color: var(--deals-text);
}

body.page-deals .brand-subtitle,
body.page-deals .sidebar-label {
  color: var(--deals-dim);
}

body.page-deals .nav-link {
  color: rgba(229, 239, 234, 0.78);
}

body.page-deals .nav-link:hover {
  background: rgba(28, 132, 82, 0.12);
}

body.page-deals .nav-link.active {
  border-color: rgba(30, 213, 117, 0.54);
  background: linear-gradient(90deg, rgba(25, 139, 82, 0.62), rgba(16, 79, 51, 0.42));
}

body.page-deals .nav-link-main {
  min-height: 54px;
}

body.page-deals .nav-link.active .nav-link-main {
  background: transparent;
  box-shadow: none;
}

body.page-deals .nav-icon {
  background: rgba(20, 111, 69, 0.22);
  color: #72f0ad;
}

body.page-deals .nav-link.active .nav-icon {
  background: rgba(61, 217, 130, 0.18);
}

body.page-deals .main {
  padding: 0;
  background: var(--deals-bg);
}

body.page-deals .frame {
  min-height: 100vh;
  gap: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

body.page-deals .topbar {
  min-height: 68px;
  gap: 14px;
  padding: 12px 24px;
  border: 0;
  border-bottom: 1px solid rgba(38, 52, 61, 0.78);
  border-radius: 0;
  background:
    radial-gradient(circle at 78% 18%, rgba(14, 133, 77, 0.16), transparent 20%),
    rgba(5, 11, 15, 0.96);
  box-shadow: none;
  backdrop-filter: none;
}

body.page-deals .topbar-search,
body.page-deals .topbar-chip,
body.page-deals .user-pill,
body.page-deals .topbar-icon-button,
body.page-deals .mobile-toggle {
  border-color: rgba(55, 70, 80, 0.78);
  background: rgba(14, 22, 28, 0.88);
  color: var(--deals-muted);
}

body.page-deals .topbar-search {
  width: min(430px, 38vw);
  min-height: 38px;
  padding: 0 14px;
  border-radius: 9px;
}

body.page-deals .topbar-search input,
body.page-deals .topbar-search-icon,
body.page-deals .topbar-chip,
body.page-deals .user-pill-link,
body.page-deals .user-pill-meta .muted,
body.page-deals .topbar-icon-button,
body.page-deals .mobile-toggle {
  color: var(--deals-muted);
}

body.page-deals .topbar-search input::placeholder {
  color: rgba(199, 211, 205, 0.52);
}

body.page-deals .topbar-shortcut {
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid rgba(36, 205, 112, 0.42);
  background: linear-gradient(180deg, #18a85f, #0d7f47);
  color: #f6fff8;
  box-shadow: 0 12px 26px rgba(0, 146, 69, 0.24);
}

body.page-deals .topbar-icon-button,
body.page-deals .mobile-toggle {
  width: 40px;
  height: 40px;
}

body.page-deals .user-pill-avatar {
  width: 34px;
  height: 34px;
  background: linear-gradient(180deg, #15784b, #0d5c3a);
  color: #dcffec;
}

body.page-deals .user-pill-link {
  background: rgba(14, 22, 28, 0.88);
  color: var(--deals-text);
}

body.page-deals .topbar-icon-button:hover,
body.page-deals .mobile-toggle:hover,
body.page-deals .user-pill-link:hover {
  background: rgba(20, 31, 38, 0.96);
}

body.page-deals .content {
  position: relative;
  z-index: 1;
  padding: 18px 24px 16px;
  background:
    radial-gradient(circle at 50% -6%, rgba(0, 146, 69, 0.22), transparent 30%),
    linear-gradient(180deg, rgba(2, 9, 12, 0.96), rgba(5, 10, 14, 1));
}

body.page-deals .b24-deals-shell {
  gap: 12px;
  min-width: 0;
  color: var(--deals-text);
}

body.page-deals .b24-deals-hero,
body.page-deals .b24-deals-summary,
body.page-deals .b24-list-view,
body.page-deals .b24-calendar-view,
body.page-deals .b24-stage-column,
body.page-deals .b24-deal-modal-card {
  border-radius: 8px;
  border-color: var(--deals-line-soft);
  background: var(--deals-panel);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.22);
  backdrop-filter: none;
}

body.page-deals .b24-deals-hero {
  display: grid;
  gap: 14px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

body.page-deals .b24-deals-hero::before {
  content: none;
}

body.page-deals .b24-deals-topline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 18px;
}

body.page-deals .b24-deals-heading {
  gap: 4px;
  max-width: 780px;
}

body.page-deals .b24-deals-kicker {
  color: rgba(51, 230, 126, 0.84);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

body.page-deals .b24-deals-heading h1 {
  margin: 0;
  color: var(--deals-text);
  font-size: 25px;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

body.page-deals .b24-deals-copy {
  color: var(--deals-muted);
  font-size: 13px;
}

body.page-deals .b24-deals-top-actions {
  gap: 10px;
}

body.page-deals .b24-view-switch {
  display: inline-flex;
  gap: 0;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--deals-line);
  background: rgba(9, 15, 20, 0.76);
}

body.page-deals .b24-view-switch a {
  min-width: 86px;
  min-height: 38px;
  padding: 0 15px;
  border: 0;
  border-right: 1px solid rgba(53, 67, 76, 0.58);
  border-radius: 0;
  background: transparent;
  color: rgba(203, 214, 208, 0.68);
  font-size: 14px;
  font-weight: 700;
}

body.page-deals .b24-view-switch a:last-child {
  border-right: 0;
}

body.page-deals .b24-view-switch a.active {
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(23, 116, 72, 0.9), rgba(15, 84, 52, 0.9));
  color: #f2fff7;
  box-shadow: inset 0 1px 0 rgba(159, 255, 198, 0.12), 0 10px 22px rgba(0, 146, 69, 0.18);
}

body.page-deals button.b24-create-trigger[type="button"] {
  display: none;
}

body.page-deals .b24-deals-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

body.page-deals .b24-deal-metric-card {
  position: relative;
  min-height: 100px;
  padding: 16px 18px;
  border-radius: 8px;
  border: 1px solid var(--deals-line-soft);
  background:
    radial-gradient(circle at 86% 22%, rgba(32, 219, 119, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(18, 27, 34, 0.98), rgba(12, 20, 26, 0.96));
  overflow: hidden;
}

body.page-deals .b24-deal-metric-card > span {
  display: block;
  margin-bottom: 8px;
  color: rgba(192, 207, 200, 0.62);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body.page-deals .b24-deal-metric-card strong {
  display: block;
  color: var(--deals-text);
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.04em;
}

body.page-deals .b24-deal-metric-card small {
  display: block;
  margin-top: 10px;
  color: rgba(42, 220, 120, 0.9);
  font-size: 12px;
  font-weight: 800;
}

body.page-deals .b24-deal-metric-card svg {
  position: absolute;
  right: 14px;
  bottom: 27px;
  width: 92px;
  height: 32px;
}

body.page-deals .b24-deal-metric-card svg path {
  fill: none;
  stroke: rgba(32, 214, 115, 0.8);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 8px rgba(32, 214, 115, 0.3));
}

body.page-deals .b24-deal-metric-card[data-visual="ring"] i {
  position: absolute;
  right: 22px;
  top: 28px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(18, 27, 34, 0.98) 0 56%, transparent 57%),
    conic-gradient(#22d17c var(--metric-progress), rgba(65, 82, 91, 0.72) 0);
  box-shadow: 0 0 18px rgba(34, 209, 124, 0.16);
}

body.page-deals .b24-deal-metric-card[data-visual="bars"] b {
  position: absolute;
  right: 20px;
  bottom: 24px;
  display: flex;
  align-items: end;
  gap: 8px;
  width: 90px;
  height: 54px;
}

body.page-deals .b24-deal-metric-card[data-visual="bars"] em {
  display: block;
  width: 11px;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(180deg, #37d583, #167548);
  opacity: 0.72;
}

body.page-deals .b24-deal-metric-card[data-visual="bars"] em:nth-child(1) { height: 22px; opacity: 0.38; }
body.page-deals .b24-deal-metric-card[data-visual="bars"] em:nth-child(2) { height: 32px; opacity: 0.5; }
body.page-deals .b24-deal-metric-card[data-visual="bars"] em:nth-child(3) { height: 42px; opacity: 0.62; }
body.page-deals .b24-deal-metric-card[data-visual="bars"] em:nth-child(4) { height: 52px; opacity: 0.82; }
body.page-deals .b24-deal-metric-card[data-visual="bars"] em:nth-child(5) { height: 30px; opacity: 0.5; }

body.page-deals .b24-deals-toolbar {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(190px, 1fr) minmax(210px, 1fr) minmax(210px, 1.1fr) minmax(230px, 1.16fr) auto;
  gap: 8px;
  align-items: end;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--deals-line-soft);
  background: rgba(12, 19, 25, 0.9);
}

body.page-deals .b24-toolbar-field,
body.page-deals .b24-toolbar-search {
  gap: 5px;
}

body.page-deals .b24-toolbar-field span,
body.page-deals .b24-toolbar-search span {
  color: rgba(184, 199, 192, 0.66);
  font-size: 11px;
  letter-spacing: 0.12em;
}

body.page-deals .b24-toolbar-field select,
body.page-deals .b24-toolbar-search input {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid rgba(61, 77, 87, 0.74);
  background: rgba(13, 21, 27, 0.96);
  color: var(--deals-text);
  font-size: 13px;
}

body.page-deals .b24-toolbar-field select option {
  color: #0e1a12;
}

body.page-deals .b24-toolbar-search input::placeholder {
  color: rgba(193, 207, 200, 0.48);
}

body.page-deals .b24-toolbar-actions button {
  min-width: 92px;
  min-height: 38px;
  border-radius: 8px;
  border: 1px solid rgba(41, 206, 113, 0.32);
  background: rgba(18, 111, 66, 0.35);
  color: #e8fff1;
  font-size: 12px;
}

body.page-deals .b24-board-scroll {
  grid-auto-columns: minmax(210px, 1fr);
  gap: 10px;
  margin-top: 4px;
  align-items: stretch;
  padding-bottom: 8px;
  overflow-x: auto;
  overflow-y: hidden;
}

body.page-deals .b24-board-scroll::-webkit-scrollbar {
  height: 8px;
}

body.page-deals .b24-board-scroll::-webkit-scrollbar-thumb {
  background: rgba(53, 71, 80, 0.9);
}

body.page-deals .b24-stage-column {
  --b24-stage-accent: #22c55e;
  --b24-stage-soft: rgba(34, 197, 94, 0.16);
  min-height: 535px;
  padding: 0 10px 12px;
  grid-template-rows: auto auto 1fr;
  gap: 10px;
  background:
    linear-gradient(180deg, rgba(17, 27, 33, 0.98), rgba(9, 17, 22, 0.98)),
    radial-gradient(circle at 50% 0%, var(--b24-stage-soft), transparent 34%);
  box-shadow: inset 0 1px 0 rgba(162, 255, 199, 0.04);
}

body.page-deals .b24-board-scroll:not(.b24-task-board) .b24-stage-column {
  height: 535px;
  max-height: 535px;
  overflow: hidden;
}

body.page-deals .b24-stage-column[data-tone="new"] {
  --b24-stage-accent: #35a4eb;
  --b24-stage-soft: rgba(53, 164, 235, 0.22);
}

body.page-deals .b24-stage-column[data-tone="qualified"] {
  --b24-stage-accent: #24bfe8;
  --b24-stage-soft: rgba(36, 191, 232, 0.2);
}

body.page-deals .b24-stage-column[data-tone="proposal"] {
  --b24-stage-accent: #33c8c7;
  --b24-stage-soft: rgba(51, 200, 199, 0.19);
}

body.page-deals .b24-stage-column[data-tone="negotiation"] {
  --b24-stage-accent: #2ac36f;
  --b24-stage-soft: rgba(42, 195, 111, 0.2);
}

body.page-deals .b24-stage-column[data-tone="won"] {
  --b24-stage-accent: #e5a936;
  --b24-stage-soft: rgba(229, 169, 54, 0.22);
}

body.page-deals .b24-stage-column[data-tone="lost"] {
  --b24-stage-accent: #29c979;
  --b24-stage-soft: rgba(41, 201, 121, 0.2);
}

body.page-deals .b24-stage-header {
  padding: 0;
  gap: 8px;
}

body.page-deals .b24-stage-ribbon {
  min-height: 42px;
  margin: 0 -10px;
  padding: 0 12px;
  border-radius: 8px 8px 0 0;
  border-bottom: 1px solid rgba(64, 224, 134, 0.34);
  background:
    linear-gradient(180deg, var(--b24-stage-soft), rgba(12, 21, 27, 0.72)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03), transparent);
  clip-path: none;
  color: #eafff1;
  font-size: 13px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body.page-deals .b24-stage-column[data-tone="won"] .b24-stage-ribbon,
body.page-deals .b24-stage-column[data-tone="won"] .b24-stage-ribbon small {
  color: #f5fff8;
}

body.page-deals .b24-stage-column.b24-task-column .b24-stage-ribbon {
  gap: 9px;
  color: #f5fff8;
}

body.page-deals .b24-stage-column.b24-task-column .b24-stage-ribbon > span,
body.page-deals .b24-stage-column.b24-task-column .b24-stage-ribbon > small {
  color: #f5fff8;
}

body.page-deals .b24-stage-label-group {
  gap: 7px;
}

body.page-deals .b24-stage-ribbon small {
  min-width: 0;
  min-height: 0;
  padding: 0;
  background: transparent;
  color: rgba(225, 237, 231, 0.72);
  font-size: 12px;
}

body.page-deals .b24-stage-actions {
  top: 21px;
  right: 7px;
}

body.page-deals .b24-stage-panel {
  border-color: var(--deals-line);
  background: rgba(12, 20, 26, 0.98);
  color: var(--deals-text);
}

body.page-deals .b24-stage-panel-title {
  color: var(--deals-muted);
}

body.page-deals .b24-stage-total {
  text-align: left;
  color: var(--deals-text);
  font-size: 23px;
  font-weight: 700;
}

body.page-deals .b24-stage-subtotal {
  margin-top: -4px;
  color: var(--deals-dim);
  font-size: 12px;
}

body.page-deals button.b24-stage-quick[type="button"] {
  min-height: 30px;
  margin: 0;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px dashed rgba(125, 144, 154, 0.42);
  background: rgba(9, 16, 21, 0.56);
  color: rgba(222, 238, 230, 0.78);
  font-size: 12px;
  box-shadow: none;
}

body.page-deals button.b24-stage-quick:not(.is-compact)[type="button"] {
  min-height: 74px;
  max-width: none;
  width: 100%;
  font-size: 14px;
}

body.page-deals button.b24-stage-quick.is-compact[type="button"] {
  width: auto;
  max-width: none;
}

body.page-deals .b24-stage-list {
  gap: 8px;
  padding: 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(74, 95, 104, 0.86) transparent;
}

body.page-deals .b24-stage-list::-webkit-scrollbar {
  width: 7px;
}

body.page-deals .b24-stage-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(74, 95, 104, 0.86);
}

body.page-deals .b24-kanban-card {
  gap: 8px;
  padding: 13px 12px 11px;
  border-radius: 8px;
  border-color: rgba(54, 70, 80, 0.78);
  background:
    linear-gradient(180deg, rgba(24, 35, 40, 0.96), rgba(18, 27, 31, 0.96)),
    radial-gradient(circle at 30% 0%, var(--b24-stage-soft), transparent 36%);
  color: var(--deals-text);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.14);
}

body.page-deals .b24-kanban-card::before {
  display: none;
}

body.page-deals .b24-kanban-card:hover {
  border-color: var(--b24-stage-accent);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.22);
}

body.page-deals .b24-kanban-card-top h4 {
  color: var(--deals-text);
  font-size: 12px;
  line-height: 1.25;
}

body.page-deals .b24-kanban-source {
  min-height: 20px;
  background: rgba(26, 166, 91, 0.17);
  color: #7ff1b5;
  font-size: 10px;
}

body.page-deals .b24-kanban-amount {
  color: #f6fff8;
  font-size: 16px;
  font-weight: 700;
}

body.page-deals .b24-kanban-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
}

body.page-deals .b24-kanban-progress span {
  position: relative;
  height: 4px;
  border-radius: 999px;
  background: rgba(71, 87, 95, 0.58);
  overflow: hidden;
}

body.page-deals .b24-kanban-progress span::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--deal-progress);
  border-radius: inherit;
  background: linear-gradient(90deg, #60d59a, var(--b24-stage-accent));
}

body.page-deals .b24-kanban-progress em {
  color: rgba(230, 242, 236, 0.8);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

body.page-deals .b24-kanban-company {
  color: rgba(229, 241, 235, 0.74);
  font-size: 12px;
}

body.page-deals .b24-kanban-summary,
body.page-deals .b24-kanban-meta {
  color: var(--deals-dim);
}

body.page-deals .b24-kanban-footer {
  border-top-color: rgba(68, 84, 93, 0.52);
}

body.page-deals .b24-kanban-flag {
  background: rgba(39, 167, 98, 0.14);
  color: #8df2bc;
}

body.page-deals .b24-kanban-flag.subtle {
  background: rgba(87, 104, 113, 0.18);
  color: rgba(217, 231, 224, 0.7);
}

body.page-deals .b24-kanban-avatar {
  background: linear-gradient(180deg, rgba(34, 177, 100, 0.52), rgba(19, 103, 65, 0.82));
  color: #d9ffea;
}

body.page-deals .b24-stage-empty {
  border-color: rgba(102, 119, 129, 0.42);
  background: rgba(8, 15, 20, 0.42);
  color: var(--deals-dim);
}

body.page-deals .b24-droptray {
  position: fixed;
  left: calc(268px + 24px);
  right: 24px;
  bottom: 22px;
  z-index: 36;
  transform: translateY(16px) scale(0.98);
}

body.page-deals .b24-droptray.is-visible {
  transform: translateY(0) scale(1);
}

body.page-deals .b24-droptray-inner {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  border-radius: 12px;
  border: 1px solid rgba(62, 79, 90, 0.82);
  background:
    radial-gradient(circle at 18% 0%, rgba(28, 191, 105, 0.13), transparent 34%),
    linear-gradient(180deg, rgba(10, 18, 24, 0.96), rgba(6, 12, 17, 0.96));
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(177, 255, 209, 0.05);
  backdrop-filter: blur(12px);
}

body.page-deals .b24-dropzone {
  --drop-accent: #25d779;
  --drop-soft: rgba(37, 215, 121, 0.14);
  min-height: 82px;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 5px 14px;
  border-radius: 8px;
  border: 1px dashed rgba(90, 111, 122, 0.7);
  background:
    radial-gradient(circle at 92% 12%, var(--drop-soft), transparent 34%),
    linear-gradient(180deg, rgba(17, 28, 34, 0.98), rgba(11, 20, 26, 0.98));
  color: var(--deals-text);
  box-shadow: inset 0 1px 0 rgba(200, 255, 222, 0.04);
}

body.page-deals .b24-dropzone[data-drop-action="delete"] {
  --drop-accent: #ff6868;
  --drop-soft: rgba(255, 104, 104, 0.13);
}

body.page-deals .b24-dropzone.danger {
  --drop-accent: #f0a83a;
  --drop-soft: rgba(240, 168, 58, 0.15);
  background:
    radial-gradient(circle at 92% 12%, var(--drop-soft), transparent 34%),
    linear-gradient(180deg, rgba(27, 29, 22, 0.98), rgba(18, 23, 19, 0.98));
}

body.page-deals .b24-dropzone.is-drop-target {
  transform: translateY(-3px);
  border-style: solid;
  border-color: var(--drop-accent);
  background:
    radial-gradient(circle at 92% 12%, var(--drop-soft), transparent 38%),
    linear-gradient(180deg, rgba(21, 35, 42, 0.99), rgba(12, 22, 28, 0.99));
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.32), 0 0 0 1px rgba(37, 215, 121, 0.22);
}

body.page-deals .b24-dropzone-title {
  grid-column: 1;
  color: var(--drop-accent);
  font-size: 13px;
  font-weight: 900;
}

body.page-deals .b24-dropzone-stat {
  grid-column: 1;
  margin: 0;
  gap: 7px;
}

body.page-deals .b24-dropzone-stat strong {
  color: #f4fff8;
  font-size: 24px;
  font-weight: 700;
}

body.page-deals .b24-dropzone-stat span {
  color: var(--deals-muted);
  font-size: 13px;
}

body.page-deals .b24-dropzone-sum {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  color: #f4fff8;
  font-size: 24px;
  font-weight: 800;
  white-space: nowrap;
}

body.page-deals .b24-list-table thead th,
body.page-deals .b24-list-table tbody td {
  border-bottom-color: rgba(62, 78, 88, 0.58);
  color: var(--deals-muted);
}

body.page-deals .b24-list-title,
body.page-deals .b24-calendar-day-head {
  color: var(--deals-text);
}

body.page-deals .b24-calendar-day {
  border-color: var(--deals-line-soft);
  background: rgba(13, 21, 27, 0.9);
}

body.page-deals .b24-calendar-nav {
  gap: 14px;
}

body.page-deals .b24-calendar-arrow,
body.page-deals .b24-calendar-today {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(239, 255, 246, 0.86);
  box-shadow: none;
}

body.page-deals .b24-calendar-arrow {
  min-width: 18px;
  font-size: 32px;
  line-height: 1;
}

body.page-deals .b24-calendar-today {
  font-size: 13px;
  line-height: 1;
  font-weight: 800;
}

body.page-deals .b24-calendar-arrow:hover,
body.page-deals .b24-calendar-today:hover {
  background: transparent;
  color: #20df83;
}

body.page-deals .b24-deal-modal::backdrop {
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(6px);
}

body.page-deals .b24-deal-modal-card {
  color: var(--deals-text);
  background: rgba(13, 21, 27, 0.98);
}

body.page-deals .b24-deal-modal-close {
  border-color: var(--deals-line);
  background: rgba(20, 31, 38, 0.96);
  color: var(--deals-text);
}

.avatar,
.chat-thread-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(95, 141, 99, 0.18), rgba(95, 141, 99, 0.42));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--primary-dark);
}

.staff-gender-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.staff-gender-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.95);
}

.staff-api-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.staff-api-card,
.staff-drive-card,
.drive-overview-card,
.mail-empty,
.document-view-shell,
.drive-view-shell {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.95);
}

.document-view-toolbar,
.drive-view-toolbar,
.staff-api-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.documents-card,
.drive-overview-card,
.documents-launch-card,
.documents-launch-hit,
.yandex-area-card,
.kb-card,
.tracker-row,
.kb-row {
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.documents-card:hover,
.documents-launch-card:hover,
.yandex-area-card:hover,
.kb-card:hover,
.kb-row:hover,
.tracker-row:hover {
  transform: translateY(-1px);
  border-color: rgba(95, 141, 99, 0.18);
}

.tasks-row-open,
.documents-row-file-link,
.documents-card-file,
.drive-row-file-link,
.drive-card-file,
.tracker-task-link {
  color: inherit;
  text-decoration: none;
}

details summary {
  cursor: pointer;
}

@media (max-width: 1280px) {
  .shell {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .metric-grid,
  .grid-3,
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-main-grid,
  .dashboard-lower-grid,
  .split,
  .lead-layout,
  .chat-workbench,
  .mail-layout {
    grid-template-columns: 1fr;
  }

  .b24-deals-toolbar,
  .b24-deal-modal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .b24-board-scroll {
    grid-auto-columns: minmax(220px, 236px);
  }

  .lead-stage-track {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .lead-action-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .lead-composer-grid,
  .lead-calculator-head,
  .lead-calculator-summary-strip {
    grid-template-columns: 1fr;
  }

  .lead-contract-item {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 1024px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(82vw, 320px);
    min-height: 100vh;
    transform: translateX(-105%);
    transition: transform 0.24s ease;
    z-index: 20;
    border-right: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
  }

  .mobile-toggle {
    display: inline-flex;
    align-items: center;
  }

  body.nav-open {
    overflow: hidden;
  }

  body.nav-open::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(39, 50, 41, 0.16);
    z-index: 15;
  }

  body.nav-open .sidebar {
    transform: translateX(0);
  }

  .frame {
    min-height: auto;
  }

  .main {
    padding: 14px;
  }

  .topbar-search {
    width: 100%;
  }

  body.page-deals .shell {
    grid-template-columns: 1fr;
  }

  body.page-deals .topbar {
    padding-left: 14px;
    padding-right: 14px;
  }

  body.page-deals .content {
    padding: 14px 14px 22px;
  }

  .client-1c-row,
  .client-1c-section-body .client-1c-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .client-1c-status-line,
  .client-1c-checkboxes,
  .client-1c-section,
  .client-1c-outline,
  .client-1c-footer {
    margin-left: 0;
  }

  .client-1c-control-double,
  .client-1c-control-double--wide,
  .client-1c-control-bank {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .client-1c-inline-label {
    margin-top: 2px;
  }

  .client-1c-settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  h1 {
    font-size: 31px;
  }

  .topbar,
  .section-head,
  .lead-workspace-head,
  .mail-toolbar,
  .kb-toolbar,
  .tracker-hero-head,
  .staff-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .metric-grid,
  .dashboard-main-grid,
  .dashboard-lower-grid,
  .dashboard-task-grid,
  .grid-2,
  .grid-3,
  .form-grid,
  .lead-sheet-grid,
  .kb-grid,
  .yandex-area-grid,
  .tracker-summary,
  .staff-drive-summary {
    grid-template-columns: 1fr;
  }

  .lead-sheet-grid.lead-sheet-grid-compact {
    grid-template-columns: 1fr;
  }

  .field.span-2,
  .field.span-3,
  .field.span-4 {
    grid-column: auto;
  }

  .lead-stage-track {
    grid-template-columns: 1fr;
  }

  .lead-action-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lead-modal-layer {
    padding: 12px;
  }

  .lead-modal-window,
  .lead-modal-window.is-lg,
  .lead-modal-window.is-xl {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
  }

  .lead-modal-shell {
    height: calc(100vh - 24px);
    max-height: calc(100vh - 24px);
    padding: 16px;
  }

  .lead-modal-header {
    flex-direction: column;
    align-items: stretch;
  }

  .lead-modal-close {
    width: 100%;
  }

  .lead-composer-head,
  .lead-timeline-head {
    flex-direction: column;
    align-items: stretch;
  }

  .lead-composer-head span {
    max-width: none;
    text-align: left;
  }

  .lead-timeline-item {
    grid-template-columns: 1fr;
  }

  .lead-timeline-marker {
    width: 38px;
    height: 38px;
  }

  .lead-sheet-card,
  .lead-composer-card {
    padding: 16px;
  }

  .lead-calculator-head {
    grid-template-columns: 1fr;
  }

  .lead-calculator-total {
    min-width: 0;
  }

  .lead-calculator-section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .lead-calculator-section-head span {
    max-width: none;
    text-align: left;
  }

  .lead-calculator-zero-option {
    grid-template-columns: auto 1fr;
  }

  .lead-calculator-zero-option input[type="number"] {
    justify-self: stretch;
    grid-column: 2;
  }

  .lead-calculator-table,
  .lead-calculator-matrix {
    min-width: 640px;
  }

  .b24-deals-topline,
  .b24-board-caption,
  .b24-calendar-header,
  .b24-deal-modal-head,
  .b24-deal-modal-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .b24-deals-heading h1 {
    font-size: 22px;
  }

  .b24-deals-toolbar,
  .b24-deal-modal-grid,
  .b24-droptray-inner {
    grid-template-columns: 1fr;
  }

  .b24-board-scroll {
    grid-auto-columns: minmax(224px, 82vw);
  }

  .b24-stage-column {
    min-height: 540px;
  }

  .b24-deal-modal-card {
    width: min(100vw - 20px, 100%);
    padding: 16px;
  }

  .topbar-left,
  .topbar-actions,
  .topbar-chip,
  .topbar-search,
  .user-pill {
    width: 100%;
  }

  .dashboard-hero-copy {
    white-space: normal;
  }

  .sidebar {
    width: min(88vw, 320px);
  }

  .client-1c-form {
    padding: 12px;
  }

  .client-1c-control,
  .client-1c-control-inline {
    max-width: 100%;
  }

  .client-1c-control input.client-1c-input-mini,
  .client-1c-control select.client-1c-input-mini,
  .client-1c-control input.client-1c-input-code,
  .client-1c-control select.client-1c-input-code,
  .client-1c-control input.client-1c-input-code--wide,
  .client-1c-control select.client-1c-input-code--wide,
  .client-1c-control input.client-1c-input-date,
  .client-1c-control select.client-1c-input-date,
  .client-1c-control input.client-1c-input-medium,
  .client-1c-control select.client-1c-input-medium,
  .client-1c-control input.client-1c-input-long,
  .client-1c-control select.client-1c-input-long,
  .client-1c-control input.client-1c-input-extended,
  .client-1c-control select.client-1c-input-extended,
  .client-1c-control input.client-1c-input-address,
  .client-1c-control select.client-1c-input-address,
  .client-1c-control input.client-1c-input-iban,
  .client-1c-control select.client-1c-input-iban,
  .client-1c-control-short input,
  .client-1c-mini-input {
    width: 100%;
    max-width: none;
  }

  .client-1c-settings-grid {
    grid-template-columns: 1fr;
  }

  .client-1c-section--preview .client-1c-section-body {
    padding-left: 0;
  }

  .client-1c-outline-row {
    font-size: 12px;
  }
}

body.page-dashboard .metric-grid {
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: minmax(168px, 1fr);
  overflow-x: auto;
  padding-bottom: 4px;
}

body.page-dashboard .metric-grid::-webkit-scrollbar {
  height: 8px;
}

body.page-dashboard .metric-grid::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(111, 123, 104, 0.18);
}

body.page-dashboard .metric-card {
  padding: 14px 16px;
  gap: 4px;
}

body.page-dashboard .metric-card strong {
  font-size: 36px;
}

body.page-dashboard .metric-card small,
body.page-dashboard .metric-card div {
  font-size: 11px;
}

@media (max-width: 1180px) {
  body.page-dashboard .metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-flow: row;
    grid-auto-columns: auto;
    overflow-x: visible;
  }
}

@media (max-width: 720px) {
  body.page-dashboard .metric-grid {
    grid-template-columns: 1fr;
  }

  body.page-dashboard .metric-card strong {
    font-size: 32px;
  }
}

/* Telegram-like contact center workspace */
.chat-workbench-contact-center {
  grid-template-columns: 334px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.chat-workbench-contact-center .chat-roster,
.chat-workbench-contact-center .chat-stage {
  min-height: calc(100vh - 152px);
}

/* Operational dark CRM surface */
:root {
  --bg: #05090e;
  --bg-soft: rgba(12, 18, 24, 0.76);
  --surface: rgba(14, 20, 27, 0.92);
  --surface-strong: rgba(15, 22, 30, 0.98);
  --surface-muted: rgba(20, 29, 37, 0.92);
  --surface-subtle: rgba(19, 36, 28, 0.72);
  --line: rgba(169, 186, 174, 0.12);
  --line-strong: rgba(169, 186, 174, 0.2);
  --text: #edf4ef;
  --muted: rgba(220, 229, 222, 0.62);
  --primary: #08d46d;
  --primary-dark: #0ca85c;
  --primary-soft: rgba(8, 212, 109, 0.14);
  --button-primary: #0b5f3b;
  --button-primary-dark: #053821;
  --button-primary-border: rgba(31, 139, 87, 0.72);
  --success: #08d46d;
  --success-soft: rgba(8, 212, 109, 0.14);
  --warning: #f59e0b;
  --warning-soft: rgba(245, 158, 11, 0.15);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.15);
  --shadow-lg: 0 30px 100px rgba(0, 0, 0, 0.42);
  --shadow-md: 0 18px 48px rgba(0, 0, 0, 0.28);
  --radius-xl: 24px;
  --radius-lg: 16px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --font: "Manrope", "Aptos", "Segoe UI", sans-serif;
}

body:not(.page-login) {
  color: var(--text);
  background:
    radial-gradient(circle at 17% 0%, rgba(9, 131, 71, 0.18), transparent 26%),
    radial-gradient(circle at 88% 12%, rgba(8, 212, 109, 0.12), transparent 24%),
    linear-gradient(180deg, #070b11 0%, #05080d 100%);
}

body:not(.page-login) .sidebar {
  height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 16px;
  border-right-color: rgba(169, 186, 174, 0.12);
  background:
    radial-gradient(circle at 20% 2%, rgba(8, 212, 109, 0.14), transparent 22%),
    linear-gradient(180deg, rgba(10, 15, 21, 0.98), rgba(6, 10, 15, 0.98));
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.03), 18px 0 60px rgba(0, 0, 0, 0.28);
}

body:not(.page-login) .shell {
  grid-template-columns: 268px minmax(0, 1fr);
}

body:not(.page-login) .brand-logo-wrap {
  border-radius: 50%;
  background:
    radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.32), transparent 35%),
    linear-gradient(135deg, rgba(8, 212, 109, 0.2), rgba(4, 8, 12, 0.8));
  box-shadow: 0 0 24px rgba(8, 212, 109, 0.24);
}

body:not(.page-login) .brand-title,
body:not(.page-login) .nav-link,
body:not(.page-login) .topbar-chip,
body:not(.page-login) .user-pill strong {
  color: var(--text);
}

body:not(.page-login) .brand-subtitle,
body:not(.page-login) .sidebar-label,
body:not(.page-login) .nav-group > summary,
body:not(.page-login) .muted {
  color: var(--muted);
}

body:not(.page-login) .nav-link {
  border: 1px solid transparent;
}

body:not(.page-login) .nav-link:hover {
  background: rgba(8, 212, 109, 0.08);
  border-color: rgba(8, 212, 109, 0.12);
}

body:not(.page-login) .nav-link.active {
  background: rgba(8, 212, 109, 0.1);
  border-color: rgba(8, 212, 109, 0.42);
  box-shadow: 0 0 26px rgba(8, 212, 109, 0.18);
}

body:not(.page-login) .nav-link.active .nav-link-main {
  background: linear-gradient(135deg, rgba(8, 212, 109, 0.3), rgba(4, 113, 61, 0.24));
  color: #effff6;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

body:not(.page-login) .nav-icon,
body:not(.page-login) .nav-group-caret {
  background: rgba(8, 212, 109, 0.1);
  color: var(--primary);
}

body:not(.page-login) .main {
  padding: 0;
}

body:not(.page-login) .frame {
  min-height: 100vh;
  gap: 0;
}

body:not(.page-login) .topbar {
  min-height: 80px;
  padding: 14px 24px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: rgba(5, 9, 14, 0.72);
  box-shadow: none;
}

body:not(.page-login) .topbar-search,
body:not(.page-login) .topbar-icon-button,
body:not(.page-login) .mobile-toggle,
body:not(.page-login) .topbar-chip,
body:not(.page-login) .user-pill {
  border-color: var(--line);
  background: rgba(12, 18, 24, 0.86);
  color: var(--text);
}

body:not(.page-login) .topbar-search {
  border-radius: 10px;
}

body:not(.page-login) .topbar-search input,
body:not(.page-login) input,
body:not(.page-login) select,
body:not(.page-login) textarea {
  background: rgba(8, 13, 19, 0.92);
  color: var(--text);
  border-color: var(--line-strong);
}

body:not(.page-login) .topbar-search input {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body:not(.page-login) .topbar-search input:focus {
  box-shadow: none;
}

body:not(.page-login) .topbar-search-shortcut {
  border-color: rgba(169, 186, 174, 0.14);
  background: rgba(21, 29, 38, 0.9);
  color: rgba(220, 229, 222, 0.76);
}

body:not(.page-login) .topbar-icon-dot {
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(5, 9, 14, 0.92);
}

body:not(.page-login) .user-pill-avatar,
.ops-avatar {
  background: linear-gradient(135deg, #157d48, #0b5d36);
  color: #eafff2;
}

body:not(.page-login) .content {
  padding: 18px 24px 16px;
}

body.page-drive .main,
body.page-drive .content {
  min-width: 0;
}

body:not(.page-login) .panel,
body:not(.page-login) .card,
body:not(.page-login) .metric-card,
body:not(.page-login) .empty {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-md);
}

body:not(.page-login) .empty {
  border-style: dashed;
  color: var(--muted);
}

body:not(.page-login) .btn-secondary,
body:not(.page-login) .btn-lite,
body:not(.page-login) .user-pill-link {
  background: rgba(14, 20, 27, 0.9);
  color: var(--text);
  border-color: var(--line);
}

body:not(.page-login) .btn-secondary:hover,
body:not(.page-login) .btn-lite:hover,
body:not(.page-login) .user-pill-link:hover {
  background: rgba(21, 30, 39, 0.96);
}

body:not(.page-login) .btn:not(.btn-secondary):not(.btn-lite):not(.btn-danger-lite),
body:not(.page-login) button[type="submit"]:not(.btn-secondary):not(.btn-lite):not(.btn-danger-lite):not(.client-summary-delete):not(.b24-stage-delete),
body:not(.page-login) button[type="button"]:not(.btn-secondary):not(.btn-lite):not(.btn-danger-lite):not(.mobile-toggle):not(.topbar-icon-button):not(.b24-stage-action):not(.b24-stage-tone-option):not(.b24-stage-panel-action):not(.b24-stage-quick):not(.client-card-more) {
  border-color: var(--button-primary-border);
  background: linear-gradient(135deg, var(--button-primary), var(--button-primary-dark));
  color: #f2fff7;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(176, 255, 207, 0.12);
}

body:not(.page-login) .btn:not(.btn-secondary):not(.btn-lite):not(.btn-danger-lite):hover,
body:not(.page-login) button[type="submit"]:not(.btn-secondary):not(.btn-lite):not(.btn-danger-lite):not(.client-summary-delete):not(.b24-stage-delete):hover,
body:not(.page-login) button[type="button"]:not(.btn-secondary):not(.btn-lite):not(.btn-danger-lite):not(.mobile-toggle):not(.topbar-icon-button):not(.b24-stage-action):not(.b24-stage-tone-option):not(.b24-stage-panel-action):not(.b24-stage-quick):not(.client-card-more):hover {
  background: linear-gradient(135deg, #0d6b42, #06452a);
  border-color: rgba(47, 164, 103, 0.78);
  color: #f7fff9;
}

body:not(.page-login) .client-1c-label,
body:not(.page-login) .client-1c-inline-label,
body:not(.page-login) .client-1c-checkbox,
body:not(.page-login) .client-1c-mini-field,
body:not(.page-login) .client-1c-status-line:not([data-tone]) {
  color: rgba(220, 229, 222, 0.62);
}

body:not(.page-login) .client-1c-section summary,
body:not(.page-login) .client-1c-section summary::before,
body:not(.page-login) .client-1c-section-title {
  color: #22b96e;
}

body:not(.page-login) .client-1c-section-preview {
  color: rgba(75, 205, 135, 0.74);
}

body:not(.page-login) .client-1c-control input::placeholder,
body:not(.page-login) .client-1c-control select::placeholder,
body:not(.page-login) .client-1c-mini-field input::placeholder,
body:not(.page-login) .client-1c-mini-field select::placeholder {
  color: rgba(220, 229, 222, 0.34);
}

body:not(.page-login) .badge {
  background: rgba(169, 186, 174, 0.1);
  color: var(--text);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.client-list-shell {
  gap: 14px;
}

.client-list-hero {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  min-height: 0;
  aspect-ratio: 1983 / 258;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: start;
  padding: 26px 30px 24px;
  border-bottom: 1px solid rgba(169, 186, 174, 0.1);
  background: url("/static/client-assets/client-list-hero-field-animated.png") center / 100% 100% no-repeat;
  overflow: hidden;
  isolation: isolate;
}

.client-list-hero::before,
.client-list-hero::after {
  display: none;
}

.client-list-hero::before {
  background:
    radial-gradient(circle at 67% 47%, rgba(58, 255, 157, 0.2), transparent 22%),
    linear-gradient(105deg, transparent 42%, rgba(205, 255, 224, 0.12) 52%, transparent 62%);
  mix-blend-mode: screen;
  opacity: 0.22;
  transform: translateX(-18%);
  animation: clientListHeroFieldSweep 7.8s ease-in-out infinite;
}

.client-list-hero::after {
  background:
    radial-gradient(circle at 69% 23%, rgba(130, 255, 205, 0.16), transparent 7%),
    radial-gradient(circle at 72% 75%, rgba(85, 255, 168, 0.12), transparent 8%);
  opacity: 0.28;
  animation: clientListHeroArtPulse 5.8s ease-in-out infinite;
}

.client-list-hero-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  align-content: start;
  min-width: 0;
}

.client-list-hero h1 {
  margin: 0;
  color: #f3fff7;
  font-size: 34px;
  line-height: 1.04;
  letter-spacing: 0;
}

.client-list-hero p {
  max-width: 650px;
  margin: 0;
  color: rgba(220, 229, 222, 0.66);
  font-size: 14px;
}

.client-list-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 22px;
}

.client-list-stat {
  min-width: 180px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 50px;
  gap: 8px 14px;
  align-items: center;
  padding-right: 18px;
  border-right: 1px solid rgba(169, 186, 174, 0.18);
}

.client-list-stat:last-child {
  border-right: 0;
}

.client-list-stat span {
  grid-column: 1;
  color: rgba(220, 229, 222, 0.62);
  font-size: 13px;
}

.client-list-stat strong {
  grid-column: 1;
  color: #f2fff7;
  font-size: 26px;
  line-height: 1;
}

.client-list-stat i {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 50px;
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  border: 1px solid rgba(38, 217, 120, 0.28);
  background: rgba(10, 105, 63, 0.24);
  color: #1fd77f;
  box-shadow: inset 0 1px 0 rgba(194, 255, 218, 0.1);
}

.client-list-stat svg {
  width: 25px;
  height: 25px;
}

.client-list-hero-actions {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.client-list-hero-actions .btn {
  min-height: 48px;
  padding: 0 22px;
  border-radius: 18px;
}

.client-list-add {
  min-width: 190px;
}

.client-list-pill {
  min-width: 100px;
}

.client-list-hero-art {
  display: none;
}

.client-list-hero-art::before,
.client-list-hero-art::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.client-list-hero-art::before {
  background:
    radial-gradient(circle at 56% 45%, rgba(59, 255, 153, 0.2), transparent 34%),
    linear-gradient(110deg, transparent 32%, rgba(205, 255, 224, 0.16) 48%, transparent 62%);
  mix-blend-mode: screen;
  opacity: 0.22;
  transform: translateX(-18%);
  animation: clientListHeroArtSweep 7.6s ease-in-out infinite;
}

.client-list-hero-art::after {
  background:
    radial-gradient(circle at 30% 73%, rgba(123, 255, 194, 0.18), transparent 12%),
    radial-gradient(circle at 75% 16%, rgba(130, 255, 205, 0.2), transparent 9%),
    radial-gradient(circle at 78% 73%, rgba(85, 255, 168, 0.15), transparent 11%);
  opacity: 0.28;
  animation: clientListHeroArtPulse 5.8s ease-in-out infinite;
}

.client-list-hero-image {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: fill;
}

.client-list-hero-svg {
  display: none;
}

.client-hero-folder-float {
  transform-box: fill-box;
  transform-origin: center;
  animation: clientHeroFolderFloat 7.2s ease-in-out infinite;
}

.client-hero-folder {
  transform-box: fill-box;
  transform-origin: center;
}

.client-hero-orbits {
  transform-box: fill-box;
  transform-origin: center;
  animation: clientHeroOrbitSway 8.8s ease-in-out infinite;
}

.client-hero-orbit-base {
  opacity: 0.78;
}

.client-hero-orbit-front {
  opacity: 0.88;
}

.client-hero-orbit-glint {
  stroke-dasharray: 34 430;
  stroke-dashoffset: 0;
  opacity: 0.86;
  animation: clientHeroOrbitDash 7.8s linear infinite;
}

.client-hero-orbit-glint-two {
  animation-duration: 8.8s;
  animation-delay: -2.2s;
}

.client-hero-glow {
  transform-box: fill-box;
  transform-origin: center;
  animation: clientHeroGlow 5.8s ease-in-out infinite;
}

.client-hero-arrow,
.client-hero-dot,
.client-hero-planet {
  transform-box: fill-box;
  transform-origin: center;
  animation: clientHeroSpark 5.8s ease-in-out infinite;
}

.client-hero-arrow-two,
.client-hero-dot-b {
  animation-delay: 1.2s;
}

.client-hero-dot-c,
.client-hero-dot-d {
  animation-delay: 2.3s;
}

.client-hero-dot-e {
  animation-delay: 3.1s;
}

.client-hero-shine {
  animation: clientHeroShine 6.4s ease-in-out infinite;
}

@keyframes clientHeroFolderFloat {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(0, -7px, 0) scale(1.012);
  }
}

@keyframes clientHeroOrbitSway {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }

  50% {
    transform: translate3d(0, 3px, 0) rotate(1.4deg);
  }
}

@keyframes clientHeroOrbitDash {
  to {
    stroke-dashoffset: -382;
  }
}

@keyframes clientHeroGlow {
  0%,
  100% {
    opacity: 0.56;
    transform: scale(0.97);
  }

  50% {
    opacity: 0.82;
    transform: scale(1.04);
  }
}

@keyframes clientHeroSpark {
  0%,
  68%,
  100% {
    opacity: 0.42;
    transform: translate3d(0, 0, 0) scale(0.88);
  }

  78% {
    opacity: 1;
    transform: translate3d(0, -4px, 0) scale(1.12);
  }
}

@keyframes clientHeroShine {
  0%,
  100% {
    opacity: 0.05;
  }

  50% {
    opacity: 0.13;
  }
}

@keyframes clientListHeroArtBreath {
  0%,
  100% {
    filter:
      drop-shadow(0 20px 38px rgba(0, 0, 0, 0.34))
      drop-shadow(0 0 22px rgba(29, 221, 120, 0.1));
  }

  50% {
    filter:
      drop-shadow(0 22px 42px rgba(0, 0, 0, 0.36))
      drop-shadow(0 0 34px rgba(29, 221, 120, 0.2));
  }
}

@keyframes clientListHeroArtSweep {
  0%,
  100% {
    opacity: 0.12;
    transform: translateX(-34%);
  }

  48% {
    opacity: 0.34;
    transform: translateX(30%);
  }
}

@keyframes clientListHeroArtPulse {
  0%,
  100% {
    opacity: 0.2;
  }

  50% {
    opacity: 0.42;
  }
}

@keyframes clientListHeroFieldBreath {
  0%,
  100% {
    background-position:
      center,
      center;
    background-size:
      100% 100%,
      100% 100%;
    filter: drop-shadow(0 0 0 rgba(29, 221, 120, 0));
  }

  50% {
    background-position:
      center,
      calc(50% + 7px) calc(50% - 2px);
    background-size:
      100% 100%,
      101.5% 102%;
    filter: drop-shadow(0 0 18px rgba(29, 221, 120, 0.08));
  }
}

@keyframes clientListHeroFieldSweep {
  0%,
  100% {
    opacity: 0.1;
    transform: translateX(-34%);
  }

  48% {
    opacity: 0.28;
    transform: translateX(24%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .client-list-hero,
  .client-list-hero::before,
  .client-list-hero::after,
  .client-list-hero-art,
  .client-list-hero-art::before,
  .client-list-hero-art::after,
  .client-hero-folder-float,
  .client-hero-folder,
  .client-hero-orbits,
  .client-hero-orbit-glint,
  .client-hero-glow,
  .client-hero-arrow,
  .client-hero-dot,
  .client-hero-planet,
  .client-hero-shine {
    animation: none;
  }
}

.client-list-filters {
  grid-template-columns: minmax(260px, 1.7fr) repeat(4, minmax(130px, 0.88fr)) auto;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(13, 20, 27, 0.94);
}

.client-list-filters .field {
  gap: 6px;
  color: rgba(220, 229, 222, 0.58);
  font-size: 11px;
  font-weight: 700;
}

.client-list-filters input,
.client-list-filters select {
  min-height: 44px;
  border-radius: 10px;
  background: rgba(8, 13, 19, 0.88);
}

.client-list-filters .clients-filter-actions {
  align-self: end;
  display: grid;
  grid-template-columns: auto auto;
  gap: 12px;
}

.client-list-reset {
  gap: 8px;
}

.client-list-shell .clients-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
  justify-content: stretch;
}

.client-list-card.client-summary-card {
  min-height: 224px;
  padding: 18px;
  border-radius: 16px;
  border-color: rgba(43, 64, 72, 0.9);
  background:
    radial-gradient(circle at 92% 4%, rgba(20, 170, 92, 0.12), transparent 32%),
    linear-gradient(180deg, rgba(15, 25, 31, 0.98), rgba(11, 20, 25, 0.98));
  box-shadow: none;
  gap: 14px;
}

.client-list-card.client-summary-card::before {
  display: none;
}

.client-list-card.client-summary-card:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 185, 110, 0.5);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.22);
}

.client-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 28px;
  gap: 10px;
  align-items: start;
}

.client-card-title-link {
  min-width: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  color: inherit;
}

.client-card-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(23, 130, 77, 0.38);
  color: rgba(111, 238, 161, 0.92);
}

.client-card-icon svg {
  width: 20px;
  height: 20px;
}

.client-list-card .client-summary-title {
  color: #f3fff7;
  font-size: 17px;
  line-height: 1.18;
  letter-spacing: 0;
}

.client-status-badge {
  min-height: 28px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(34, 185, 110, 0.34);
  background: rgba(9, 95, 56, 0.34);
  color: #42de91;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.client-status-badge[data-tone="warning"] {
  border-color: rgba(245, 158, 11, 0.34);
  background: rgba(91, 63, 9, 0.34);
  color: #eab638;
}

.client-status-badge[data-tone="muted"] {
  border-color: rgba(169, 186, 174, 0.22);
  background: rgba(169, 186, 174, 0.1);
  color: rgba(220, 229, 222, 0.74);
}

button.client-card-more[type="button"] {
  min-width: 28px;
  width: 28px;
  min-height: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(220, 229, 222, 0.72);
  box-shadow: none;
  font-size: 14px;
  line-height: 1;
}

button.client-card-more[type="button"]:hover {
  background: rgba(169, 186, 174, 0.08);
  transform: none;
}

.client-card-more {
  position: relative;
}

.client-card-more summary {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  color: rgba(220, 229, 222, 0.72);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  list-style: none;
  font-size: 14px;
  line-height: 1;
}

.client-card-more summary::-webkit-details-marker {
  display: none;
}

.client-card-more summary:hover,
.client-card-more[open] summary {
  background: rgba(169, 186, 174, 0.08);
}

.client-card-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 25;
  min-width: 180px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(7, 13, 17, 0.98);
  box-shadow: var(--shadow-md);
  display: grid;
  gap: 4px;
}

.client-card-menu a,
.client-card-menu button {
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 9px;
  border: 0;
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  box-shadow: none;
  font-size: 13px;
  font-weight: 800;
}

.client-card-menu a:hover {
  background: rgba(8, 212, 109, 0.13);
  color: #7cf8aa;
}

.client-card-menu form {
  margin: 0;
}

.client-card-menu button {
  color: #ff8c8c;
}

.client-card-menu button:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #ffb3b3;
}

.client-card-body-link {
  gap: 14px;
}

.client-card-tags {
  display: grid;
  grid-template-columns: auto auto minmax(24px, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.client-card-tags span {
  color: rgba(220, 229, 222, 0.62);
  font-size: 12px;
  font-weight: 700;
}

.client-card-tags b {
  min-height: 24px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
  color: #42de91;
  background: rgba(9, 95, 56, 0.32);
}

.client-card-tags b[data-tone="warning"] {
  color: #f5b83f;
  background: rgba(124, 83, 12, 0.32);
}

.client-card-tags b[data-tone="danger"] {
  color: #ff9c6d;
  background: rgba(149, 62, 20, 0.32);
}

.client-card-tags b[data-tone="package"] {
  color: #68c8ff;
  background: rgba(24, 86, 142, 0.32);
}

.client-card-contacts {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, auto);
  gap: 12px;
  color: rgba(220, 229, 222, 0.78);
  font-size: 13px;
}

.client-card-contacts span {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-card-contacts svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: rgba(220, 229, 222, 0.68);
}

.client-card-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(169, 186, 174, 0.12);
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(120px, 0.85fr) auto;
  gap: 12px;
  align-items: center;
}

.client-card-manager {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-width: 0;
}

.client-card-avatar {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(118, 230, 160, 0.7), rgba(13, 91, 56, 0.96));
  color: #f6fff8;
  font-size: 11px;
  font-weight: 900;
}

.client-card-manager small,
.client-card-activity small {
  display: block;
  color: rgba(220, 229, 222, 0.5);
  font-size: 10px;
  line-height: 1.2;
}

.client-card-manager strong,
.client-card-activity strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(239, 255, 246, 0.9);
  font-size: 12px;
  line-height: 1.25;
}

.client-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.client-card-action {
  min-height: 32px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(169, 186, 174, 0.16);
  background: rgba(14, 21, 28, 0.78);
  color: #e9fff2;
  font-size: 12px;
  font-weight: 800;
}

.client-card-action-deal {
  border-color: rgba(34, 185, 110, 0.5);
  background: rgba(6, 66, 40, 0.48);
  color: #33d884;
}

.client-card-action:hover,
.client-card-action-deal:hover {
  color: #f6fff8;
}

.client-list-shell button.client-summary-delete[type="submit"] {
  min-width: 32px;
  width: 32px;
  min-height: 32px;
  height: 32px;
  padding: 0;
  border-radius: 10px;
  border-color: rgba(239, 68, 68, 0.26);
  background: rgba(116, 22, 22, 0.28);
  color: #ff4d4d;
  font-size: 14px;
}

.client-list-empty {
  grid-column: 1 / -1;
  min-height: 220px;
}

.client-list-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(180px, 1fr);
  gap: 18px;
  align-items: center;
  padding: 4px 8px 0;
}

.client-list-pagination {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.client-list-pagination a,
.client-list-pagination span {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid transparent;
  background: rgba(12, 18, 24, 0.82);
  color: rgba(220, 229, 222, 0.78);
  font-weight: 800;
}

.client-list-pagination a.active {
  border-color: rgba(34, 185, 110, 0.48);
  background: rgba(8, 93, 55, 0.68);
  color: #f2fff7;
}

.client-list-per-page {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(220, 229, 222, 0.62);
}

.client-list-per-page select {
  width: 74px;
  min-height: 38px;
  border-radius: 10px;
  padding: 0 12px;
  font-weight: 800;
}

.ops-page {
  display: grid;
  gap: 16px;
}

.ops-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.ops-hero-compact {
  align-items: center;
}

.ops-hero h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.ops-subtitle,
.ops-eyebrow {
  margin: 0;
  color: var(--muted);
}

.ops-eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ops-subtitle {
  margin-top: 6px;
  max-width: 740px;
}

.ops-hero-actions,
.ops-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.ops-inline-action-form {
  display: inline-flex;
  margin: 0;
}

.ops-tabs {
  justify-content: flex-start;
}

.ops-tab {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(13, 19, 26, 0.86);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}

.ops-tab:hover,
.ops-tab.active {
  color: #f1fff6;
  border-color: rgba(8, 212, 109, 0.55);
  background: linear-gradient(135deg, rgba(8, 212, 109, 0.2), rgba(8, 212, 109, 0.08));
  box-shadow: 0 0 22px rgba(8, 212, 109, 0.14);
}

.ops-tab span {
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

.ops-action-grid,
.ops-kpi-grid,
.ops-activity-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.ops-action-card,
.ops-kpi-card,
.ops-panel,
.ops-activity-card {
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(15, 22, 30, 0.96), rgba(9, 14, 20, 0.96)),
    radial-gradient(circle at 16% 0%, rgba(8, 212, 109, 0.12), transparent 34%);
  box-shadow: var(--shadow-md);
}

.ops-action-card {
  min-height: 72px;
  padding: 14px 16px;
  border-radius: 10px;
  color: var(--text);
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 3px 12px;
  align-items: center;
}

.ops-action-card:hover {
  color: var(--text);
  border-color: rgba(8, 212, 109, 0.42);
  transform: translateY(-1px);
}

.ops-action-icon {
  grid-row: span 2;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: rgba(8, 212, 109, 0.12);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 0 18px rgba(8, 212, 109, 0.12);
}

.ops-action-card strong,
.ops-action-card small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-action-card small {
  color: var(--muted);
}

.ops-kpi-grid {
  grid-template-columns: repeat(6, minmax(180px, 1fr));
}

.ops-kpi-card {
  min-height: 108px;
  padding: 16px;
  border-radius: 10px;
  display: grid;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.ops-kpi-card::after,
.ops-activity-card::after {
  content: "";
  position: absolute;
  inset: auto 14px 14px auto;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(8, 212, 109, 0.22);
  border-radius: 50%;
  background: rgba(8, 212, 109, 0.08);
}

.ops-kpi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ops-kpi-card small,
.ops-kpi-card p,
.ops-activity-card small,
.ops-activity-card span {
  margin: 0;
  color: var(--muted);
}

.ops-kpi-card strong {
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.06em;
}

.ops-kpi-card[data-accent="red"] strong,
.ops-kpi-card[data-accent="danger"] strong,
.ops-kpi-card[data-accent="orange"] strong {
  color: #ff705f;
}

.ops-kpi-card[data-accent="gold"] strong,
.ops-kpi-card[data-accent="warning"] strong {
  color: #f6b33d;
}

.ops-kpi-card[data-accent="teal"] strong,
.ops-kpi-card[data-accent="success"] strong,
.ops-kpi-card[data-accent="blue"] strong {
  color: #7cf8aa;
}

.ops-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1.25fr) minmax(320px, 1fr) minmax(320px, 1.1fr);
  gap: 14px;
}

.ops-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.98fr);
  gap: 14px;
}

.ops-panel {
  padding: 16px;
  border-radius: 10px;
  min-width: 0;
}

.ops-task-create-panel {
  max-width: 1040px;
}

.ops-task-create-form textarea {
  resize: vertical;
  min-height: 130px;
}

.ops-panel-glow {
  border-color: rgba(8, 212, 109, 0.42);
  box-shadow: 0 0 28px rgba(8, 212, 109, 0.13), var(--shadow-md);
}

.ops-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.ops-panel-head h2,
.ops-control-card h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.ops-select-link,
.ops-panel-cta {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(13, 19, 26, 0.92);
}

.ops-select-link {
  min-height: 30px;
  padding: 0 12px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  font-weight: 800;
}

.ops-panel-cta {
  min-height: 38px;
  margin-top: 12px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.ops-funnel {
  display: grid;
  gap: 0;
}

.ops-funnel-row {
  min-height: 49px;
  display: grid;
  grid-template-columns: minmax(160px, 0.7fr) minmax(0, 1fr) 48px;
  align-items: center;
  gap: 10px;
  color: var(--text);
  border-bottom: 1px solid var(--line);
}

.ops-funnel-row:hover {
  color: var(--text);
}

.ops-funnel-shape {
  justify-self: end;
  width: var(--w);
  min-width: 82px;
  height: 32px;
  border-radius: 5px 18px 18px 5px;
  background: linear-gradient(90deg, rgba(8, 212, 109, 0.16), rgba(8, 212, 109, 0.72));
  clip-path: polygon(0 0, 100% 0, 88% 100%, 12% 100%);
}

.ops-funnel-copy,
.ops-risk-row,
.ops-mini-row,
.ops-task-cell {
  display: grid;
  gap: 3px;
}

.ops-funnel-copy span,
.ops-load-row span,
.ops-risk-row span,
.ops-muted,
.ops-task-title p,
.ops-task-tags,
.ops-task-cell span {
  color: var(--muted);
}

.ops-panel-footer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px 18px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.ops-panel-footer span {
  color: var(--muted);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.1em;
}

.ops-panel-footer strong {
  font-size: 18px;
}

.ops-funnel-card {
  min-height: 284px;
  padding: 4px 0 0;
}

.ops-funnel {
  display: grid;
  grid-template-columns: minmax(180px, 0.86fr) minmax(190px, 1fr);
  gap: 0;
  align-items: stretch;
}

.ops-funnel-chart,
.ops-funnel-stages {
  display: grid;
  grid-auto-rows: 43px;
}

.ops-funnel-chart {
  padding: 2px 0 0 4px;
  justify-items: center;
}

.ops-funnel-slice {
  width: var(--w);
  height: 42px;
  margin-top: -1px;
  clip-path: polygon(5% 0, 95% 0, 86% 100%, 14% 100%);
  background:
    linear-gradient(180deg, rgba(43, 55, 62, 0.82), rgba(25, 35, 40, 0.9)),
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.06), transparent 55%);
  border: 1px solid rgba(169, 186, 174, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: filter 0.18s ease, transform 0.18s ease;
}

.ops-funnel-slice.is-warm {
  background:
    linear-gradient(180deg, rgba(17, 86, 56, 0.72), rgba(12, 61, 43, 0.9)),
    radial-gradient(circle at 50% 0%, rgba(8, 212, 109, 0.08), transparent 58%);
}

.ops-funnel-slice.is-hot {
  background:
    linear-gradient(180deg, rgba(5, 220, 105, 0.92), rgba(5, 132, 69, 0.96)),
    radial-gradient(circle at 50% 0%, rgba(239, 255, 245, 0.18), transparent 58%);
  box-shadow: 0 0 22px rgba(8, 212, 109, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.ops-funnel-slice:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.ops-funnel-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: center;
  gap: 10px;
  min-height: 43px;
  padding: 0 0 0 16px;
  color: var(--text);
  border-bottom: 1px solid rgba(169, 186, 174, 0.09);
}

.ops-funnel-stage:hover {
  color: var(--text);
}

.ops-funnel-stage-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.ops-funnel-stage-copy strong,
.ops-funnel-stage-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-funnel-stage-copy strong {
  font-size: 12px;
  font-weight: 900;
}

.ops-funnel-stage-copy small {
  color: var(--muted);
  font-size: 11px;
}

.ops-funnel-stage b {
  justify-self: end;
  color: var(--muted);
  font-size: 12px;
}

.ops-funnel-stage.is-hot b,
.ops-funnel-stage.is-hot .ops-funnel-stage-copy strong {
  color: #7cf8aa;
}

.ops-funnel-connector {
  position: absolute;
  left: -54px;
  top: 50%;
  width: 54px;
  height: 1px;
  background: rgba(169, 186, 174, 0.14);
}

.ops-funnel-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
  padding-top: 12px;
}

.ops-funnel-summary div {
  display: grid;
  gap: 3px;
}

.ops-funnel-summary span {
  color: var(--muted);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.1em;
}

.ops-funnel-summary strong {
  font-size: 18px;
  letter-spacing: -0.04em;
}

.ops-load-list,
.ops-risk-list,
.ops-alert-list,
.ops-queue-list {
  display: grid;
  gap: 10px;
}

.ops-load-list.compact {
  gap: 9px;
}

.ops-load-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.ops-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  flex: 0 0 auto;
}

.ops-load-row > div:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.ops-load-row em,
.ops-risk-row em {
  align-self: start;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--success-soft);
  color: #7cf8aa;
  font-style: normal;
  font-weight: 800;
  font-size: 12px;
}

.ops-load-row em[data-tone="danger"],
.ops-risk-row em[data-tone="danger"] {
  background: var(--danger-soft);
  color: #ff7b6d;
}

.ops-risk-row em[data-tone="warning"] {
  background: var(--warning-soft);
  color: #f6b33d;
}

.ops-progress {
  height: 8px;
  border-radius: 999px;
  background: rgba(169, 186, 174, 0.11);
  overflow: hidden;
}

.ops-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(8, 212, 109, 0.42), rgba(8, 212, 109, 0.95));
}

.ops-risk-row {
  color: var(--text);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  grid-template-columns: minmax(0, 1fr) auto;
}

.ops-risk-row .ops-progress {
  grid-column: 1 / -1;
}

.ops-control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.ops-control-card {
  padding: 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(9, 14, 20, 0.68);
  display: grid;
  gap: 12px;
}

.ops-mini-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 10px;
}

.ops-mini-row .ops-progress {
  grid-column: 1 / -1;
}

.ops-activity-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ops-activity-card {
  position: relative;
  min-height: 96px;
  padding: 14px;
  border-radius: 10px;
  display: grid;
  gap: 5px;
  overflow: hidden;
}

.ops-activity-card strong {
  font-size: 28px;
}

.ops-tasks-layout {
  display: grid;
  grid-template-columns: 250px minmax(620px, 1fr) 360px;
  gap: 14px;
  align-items: start;
}

.ops-queues-panel {
  position: sticky;
  top: 96px;
}

.ops-queue-row {
  min-height: 38px;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid transparent;
}

.ops-queue-row:hover,
.ops-queue-row.active {
  color: var(--text);
  border-color: rgba(8, 212, 109, 0.38);
  background: rgba(8, 212, 109, 0.1);
}

.ops-queue-row b {
  min-width: 28px;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(8, 212, 109, 0.14);
  color: #7cf8aa;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

.ops-filter-menu {
  position: relative;
}

.ops-filter-menu > summary {
  list-style: none;
}

.ops-filter-menu > summary::-webkit-details-marker {
  display: none;
}

.ops-filter-form {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 25;
  width: min(720px, calc(100vw - 48px));
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(9, 14, 20, 0.98);
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ops-filter-form button {
  align-self: end;
}

.ops-task-table {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(8, 13, 19, 0.52);
}

.ops-task-head,
.ops-task-row {
  display: grid;
  grid-template-columns: 30px minmax(260px, 1.8fr) minmax(110px, 0.7fr) minmax(120px, 0.74fr) minmax(130px, 0.8fr) minmax(140px, 0.8fr) minmax(140px, 0.78fr) 44px;
  gap: 12px;
  align-items: center;
}

.ops-task-head {
  min-height: 46px;
  padding: 0 14px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ops-task-row {
  min-height: 78px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(169, 186, 174, 0.09);
}

.ops-task-row:last-child {
  border-bottom: 0;
}

.ops-task-row:hover {
  background: rgba(255, 255, 255, 0.025);
}

.ops-task-row.is-overdue {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.12), rgba(8, 13, 19, 0.2));
}

.ops-check {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid rgba(220, 229, 222, 0.34);
}

.ops-task-title {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.ops-task-title a {
  color: var(--text);
  font-weight: 900;
  line-height: 1.25;
}

.ops-task-title p {
  margin: 0;
  font-size: 12px;
}

.ops-task-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 11px;
}

.ops-task-tags > * {
  min-height: 20px;
  padding: 0 6px;
  border-radius: 5px;
  background: rgba(169, 186, 174, 0.08);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
}

.ops-task-tags a {
  color: #7cf8aa;
  font-weight: 800;
}

.ops-priority {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.ops-priority i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(8, 212, 109, 0.45);
}

.ops-priority[data-tone="warning"] i {
  background: rgba(245, 158, 11, 0.8);
}

.ops-priority[data-tone="danger"] i {
  background: rgba(239, 68, 68, 0.88);
}

.ops-task-cell strong {
  font-size: 12px;
}

.ops-task-cell em {
  color: #ff7b6d;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.ops-assignee {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.ops-assignee strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-status-form {
  margin: 0;
}

.ops-status-select {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.ops-status-form[data-status="new"] .ops-status-select {
  border-color: rgba(59, 130, 246, 0.32);
  color: #93c5fd;
}

.ops-status-form[data-status="in_progress"] .ops-status-select {
  border-color: rgba(245, 158, 11, 0.34);
  color: #fbbf24;
}

.ops-status-form[data-status="waiting"] .ops-status-select {
  border-color: rgba(168, 85, 247, 0.34);
  color: #c4b5fd;
}

.ops-status-form[data-status="done"] .ops-status-select {
  border-color: rgba(8, 212, 109, 0.36);
  color: #7cf8aa;
}

.ops-row-menu {
  position: relative;
  justify-self: end;
}

.ops-row-menu summary {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(13, 19, 26, 0.92);
  color: var(--muted);
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ops-row-menu summary::-webkit-details-marker {
  display: none;
}

.ops-row-menu > div {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
  width: 220px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(9, 14, 20, 0.98);
  box-shadow: var(--shadow-lg);
  display: grid;
  gap: 4px;
}

.ops-row-menu a,
.ops-row-menu button {
  width: 100%;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 7px;
  border: 0;
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  text-align: left;
  box-shadow: none;
}

.ops-row-menu a:hover,
.ops-row-menu button:hover {
  background: rgba(8, 212, 109, 0.1);
  transform: none;
}

.ops-right-rail {
  display: grid;
  gap: 14px;
}

.ops-sla {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.ops-donut {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: conic-gradient(var(--primary) var(--value), rgba(169, 186, 174, 0.14) 0);
  display: grid;
  place-items: center;
  position: relative;
}

.ops-donut::after {
  content: "";
  position: absolute;
  inset: 13px;
  border-radius: 50%;
  background: #0b1118;
}

.ops-donut strong,
.ops-donut span {
  position: relative;
  z-index: 1;
}

.ops-donut strong {
  font-size: 24px;
  line-height: 1;
}

.ops-donut span {
  color: var(--muted);
  font-size: 11px;
  margin-top: 30px;
  position: absolute;
}

.ops-sla-list {
  display: grid;
  gap: 8px;
}

.ops-sla-list div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
}

.ops-sla-list b {
  color: var(--text);
}

.ops-alert-row {
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  display: grid;
  gap: 3px;
}

.ops-alert-row span {
  color: var(--muted);
}

.ops-alert-row[data-tone="danger"] strong {
  color: #ff7b6d;
}

.ops-alert-row[data-tone="warning"] strong {
  color: #f6b33d;
}

.ops-footer {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-size: 12px;
}

.ops-footer i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--primary);
  display: inline-block;
  margin-right: 8px;
  box-shadow: 0 0 16px rgba(8, 212, 109, 0.7);
}

.ops-kpi-card[data-accent="info"] strong {
  color: #67e8f9;
}

.ops-tracker {
  gap: 16px;
}

.ops-tracker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.ops-tracker-head h1 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.ops-tracker-layout {
  display: grid;
  grid-template-columns: minmax(720px, 1fr) 360px;
  gap: 14px;
  align-items: start;
}

.ops-tracker-main,
.ops-tracker-rail {
  display: grid;
  gap: 14px;
}

.ops-tracker-rail {
  position: sticky;
  top: 96px;
}

.ops-tracker-filter-panel {
  display: grid;
  gap: 14px;
}

.ops-tracker-search-line {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.ops-tracker-search {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(8, 13, 19, 0.92);
  display: flex;
  align-items: center;
  gap: 10px;
}

.ops-tracker-search span {
  color: var(--muted);
  font-size: 17px;
}

.ops-tracker-search input {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.ops-tracker-search input:focus {
  box-shadow: none;
}

.ops-tracker-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
}

.ops-tracker-filter-grid .field {
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.ops-tracker-filter-grid input,
.ops-tracker-filter-grid select {
  min-height: 42px;
  border-radius: 9px;
}

.ops-tracker-filter-actions {
  display: flex;
  gap: 8px;
}

.ops-tracker-table-panel {
  padding: 0;
  overflow: hidden;
}

.ops-tracker-table {
  display: grid;
}

.ops-tracker-table-head,
.ops-tracker-row {
  display: grid;
  grid-template-columns: minmax(270px, 1.45fr) minmax(120px, 0.72fr) minmax(130px, 0.82fr) minmax(130px, 0.75fr) minmax(160px, 0.9fr) minmax(210px, 1fr) 34px;
  gap: 12px;
  align-items: center;
}

.ops-tracker-table-head {
  min-height: 46px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ops-tracker-row {
  min-height: 72px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(169, 186, 174, 0.09);
  transition: background 0.18s ease, border-color 0.18s ease;
}

.ops-tracker-row:last-child {
  border-bottom: 0;
}

.ops-tracker-row:hover {
  background: rgba(255, 255, 255, 0.025);
}

.ops-tracker-title {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  color: var(--text);
}

.ops-tracker-title:hover {
  color: var(--text);
}

.ops-tracker-title strong,
.ops-tracker-title small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-tracker-title small {
  margin-top: 3px;
  color: var(--muted);
}

.ops-tracker-icon {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.ops-tracker-icon[data-tone="success"] {
  background: rgba(8, 212, 109, 0.16);
  color: #7cf8aa;
}

.ops-tracker-icon[data-tone="warning"] {
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
}

.ops-tracker-icon[data-tone="danger"] {
  background: rgba(239, 68, 68, 0.16);
  color: #ff7b6d;
}

.ops-tracker-status,
.ops-tracker-assignee,
.ops-tracker-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.ops-tracker-status i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
}

.ops-tracker-status[data-tone="warning"] i {
  background: #f59e0b;
}

.ops-tracker-status[data-tone="info"] i {
  background: #22d3ee;
}

.ops-tracker-status[data-tone="danger"] i {
  background: #ef4444;
}

.ops-tracker-assignee strong,
.ops-tracker-status span,
.ops-tracker-publication,
.ops-tracker-due {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-tracker-due.is-danger,
.ops-tracker-publication span {
  color: #ff7b6d;
}

.ops-tracker-publication a {
  color: #7cf8aa;
}

.ops-tracker-actions form {
  margin: 0;
}

.ops-tracker-pagination {
  min-height: 58px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
}

.ops-tracker-pagination > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ops-tracker-per-page {
  margin: 0;
}

.ops-tracker-pagination a,
.ops-tracker-pagination > div span {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ops-tracker-pagination a.active {
  background: rgba(8, 212, 109, 0.18);
  border: 1px solid rgba(8, 212, 109, 0.42);
  color: #7cf8aa;
}

.ops-tracker-pagination label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.ops-tracker-pagination select {
  width: 64px;
  min-height: 34px;
  border-radius: 8px;
}

.ops-tracker-donut-wrap {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.ops-tracker-donut {
  width: 116px;
  height: 116px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  box-shadow: 0 0 22px rgba(8, 212, 109, 0.1);
}

.ops-tracker-donut::after {
  content: "";
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  background: #0b1118;
}

.ops-tracker-donut strong,
.ops-tracker-donut span {
  position: relative;
  z-index: 1;
}

.ops-tracker-donut strong {
  font-size: 24px;
  line-height: 1;
}

.ops-tracker-donut span {
  position: absolute;
  margin-top: 34px;
  color: var(--muted);
  font-size: 11px;
}

.ops-tracker-legend {
  display: grid;
  gap: 12px;
}

.ops-tracker-legend div {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  color: var(--muted);
}

.ops-tracker-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #08d46d;
}

.ops-tracker-legend div[data-tone="warning"] i {
  background: #f59e0b;
}

.ops-tracker-legend div[data-tone="info"] i {
  background: #22d3ee;
}

.ops-tracker-legend div[data-tone="danger"] i {
  background: #ef4444;
}

.ops-tracker-legend b {
  color: var(--text);
}

.ops-tracker-publish-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ops-tracker-publish-grid article {
  min-height: 74px;
  padding: 14px;
  border-radius: 9px;
  border: 1px solid rgba(8, 212, 109, 0.14);
  background: rgba(8, 212, 109, 0.08);
  display: grid;
  gap: 6px;
}

.ops-tracker-publish-grid span,
.ops-tracker-last span {
  color: var(--muted);
}

.ops-tracker-publish-grid strong {
  font-size: 24px;
}

.ops-tracker-publish-bar {
  margin-top: 12px;
}

.ops-tracker-last {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.ops-tracker-kpis {
  grid-template-columns: repeat(5, minmax(180px, 1fr));
}

.ops-collabs {
  gap: 16px;
}

.ops-pill-label {
  margin-left: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(8, 212, 109, 0.14);
  color: #7cf8aa;
  font-size: 12px;
  font-weight: 800;
  vertical-align: middle;
}

.ops-collab-hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  grid-template-areas:
    "copy art"
    "search art"
    "toolbar toolbar";
  column-gap: 26px;
  row-gap: 8px;
  padding: 18px;
  border-radius: 20px;
  border-color: rgba(20, 74, 48, 0.72);
  background:
    linear-gradient(180deg, rgba(13, 18, 24, 0.98), rgba(9, 14, 20, 0.96)),
    radial-gradient(circle at top right, rgba(8, 212, 109, 0.08), transparent 24%);
  box-shadow:
    inset 0 1px 0 rgba(145, 255, 193, 0.04),
    0 20px 40px rgba(3, 8, 12, 0.28);
  overflow: hidden;
}

.ops-collab-hero-text {
  grid-area: copy;
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 78px;
  padding-top: 6px;
}

.ops-collab-hero-text h2 {
  margin: 0;
  font-size: 19px;
  line-height: 1.18;
  letter-spacing: -0.03em;
  color: #ffffff;
}

.ops-collab-hero-text .ops-subtitle {
  margin: 0;
  max-width: 760px;
  color: rgba(255, 255, 255, 0.92);
}

.ops-collab-hero-art {
  grid-area: art;
  position: relative;
  width: 100%;
  min-height: 124px;
  justify-self: end;
  border-radius: 22px;
  background:
    radial-gradient(circle at 55% 58%, rgba(28, 255, 149, 0.18), transparent 34%),
    radial-gradient(circle at 75% 78%, rgba(8, 212, 109, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(13, 19, 25, 0.96), rgba(8, 13, 18, 0.88));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.02),
    inset 0 -14px 28px rgba(3, 10, 14, 0.28);
  overflow: hidden;
  isolation: isolate;
}

.ops-collab-hero-art::before {
  content: "";
  position: absolute;
  inset: 20px 38px 18px 54px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(24, 255, 145, 0.22), transparent 62%);
  filter: blur(10px);
  animation: ops-collab-glow 4.6s ease-in-out infinite;
}

.ops-collab-orbit,
.ops-collab-plus,
.ops-collab-spark,
.ops-collab-person,
.ops-collab-head,
.ops-collab-body {
  position: absolute;
}

.ops-collab-orbit {
  inset: 26px 18px 24px 18px;
  border: 1px solid rgba(24, 255, 145, 0.22);
  border-radius: 50%;
  transform-origin: 50% 50%;
  animation: ops-collab-orbit-spin 18s linear infinite;
}

.ops-collab-orbit.orbit-a {
  inset: 30px 16px 30px 20px;
  transform: rotate(2deg);
}

.ops-collab-orbit.orbit-b {
  inset: 52px 38px 40px 38px;
  border-color: rgba(24, 255, 145, 0.14);
  animation-direction: reverse;
  animation-duration: 22s;
}

.ops-collab-orbit.orbit-c {
  inset: 44px 30px 34px 64px;
  border-top-color: transparent;
  border-right-color: rgba(24, 255, 145, 0.18);
  border-bottom-color: rgba(24, 255, 145, 0.08);
  border-left-color: transparent;
  animation-duration: 14s;
}

.ops-collab-person {
  width: 84px;
  height: 108px;
  filter: drop-shadow(0 0 16px rgba(22, 255, 142, 0.16));
  animation: ops-collab-float 5.2s ease-in-out infinite;
}

.ops-collab-person.person-left {
  left: 58px;
  top: 20px;
  z-index: 2;
}

.ops-collab-person.person-center {
  left: 110px;
  top: 44px;
  width: 96px;
  height: 122px;
  z-index: 4;
  animation-duration: 6.2s;
  animation-delay: -0.8s;
}

.ops-collab-person.person-right {
  left: 174px;
  top: 34px;
  width: 78px;
  height: 102px;
  z-index: 3;
  animation-duration: 5.8s;
  animation-delay: -1.6s;
}

.ops-collab-head {
  left: 50%;
  top: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transform: translateX(-50%);
  background:
    radial-gradient(circle at 38% 28%, rgba(236, 255, 245, 0.95), rgba(139, 255, 191, 0.64) 48%, rgba(22, 255, 142, 0.12) 76%, transparent 84%);
  box-shadow:
    inset 0 -8px 14px rgba(0, 42, 20, 0.22),
    0 0 18px rgba(22, 255, 142, 0.24);
}

.ops-collab-body {
  left: 50%;
  top: 22px;
  width: 58px;
  height: 68px;
  border-radius: 999px 999px 28px 28px;
  transform: translateX(-50%);
  background:
    radial-gradient(circle at 42% 22%, rgba(231, 255, 241, 0.84), rgba(116, 255, 173, 0.44) 34%, rgba(22, 255, 142, 0.12) 72%, transparent 96%),
    linear-gradient(180deg, rgba(133, 255, 188, 0.42), rgba(18, 58, 39, 0.08));
  box-shadow:
    inset 0 -14px 16px rgba(0, 32, 16, 0.3),
    0 0 20px rgba(22, 255, 142, 0.16);
}

.ops-collab-person.person-center .ops-collab-head {
  width: 42px;
  height: 42px;
}

.ops-collab-person.person-center .ops-collab-body {
  top: 25px;
  width: 66px;
  height: 82px;
}

.ops-collab-person.person-right .ops-collab-head {
  width: 34px;
  height: 34px;
}

.ops-collab-person.person-right .ops-collab-body {
  top: 20px;
  width: 54px;
  height: 64px;
}

.ops-collab-spark {
  width: 4px;
  height: 4px;
  border-radius: 1px;
  background: rgba(138, 255, 194, 0.92);
  box-shadow: 0 0 10px rgba(22, 255, 142, 0.4);
  transform: rotate(45deg);
  animation: ops-collab-twinkle 3.2s ease-in-out infinite;
}

.ops-collab-spark.spark-a {
  left: 36px;
  top: 66px;
}

.ops-collab-spark.spark-b {
  left: 92px;
  top: 30px;
  animation-delay: -0.6s;
}

.ops-collab-spark.spark-c {
  left: 228px;
  top: 38px;
  animation-delay: -1.3s;
}

.ops-collab-spark.spark-d {
  left: 246px;
  top: 98px;
  animation-delay: -2s;
}

.ops-collab-spark.spark-e {
  left: 152px;
  top: 14px;
  width: 3px;
  height: 3px;
  animation-delay: -2.6s;
}

.ops-collab-plus {
  right: 20px;
  top: 84px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 30%, rgba(193, 255, 220, 0.28), rgba(22, 255, 142, 0.3) 36%, rgba(10, 69, 39, 0.92) 100%);
  color: #b8ffd5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  box-shadow:
    0 0 22px rgba(22, 255, 142, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  animation: ops-collab-plus-pulse 3.8s ease-in-out infinite;
}

@keyframes ops-collab-orbit-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes ops-collab-float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-4px);
  }
}

@keyframes ops-collab-twinkle {
  0%,
  100% {
    opacity: 0.3;
    transform: rotate(45deg) scale(0.72);
  }

  50% {
    opacity: 1;
    transform: rotate(45deg) scale(1.1);
  }
}

@keyframes ops-collab-plus-pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow:
      0 0 22px rgba(22, 255, 142, 0.26),
      inset 0 1px 0 rgba(255, 255, 255, 0.14);
  }

  50% {
    transform: scale(1.08);
    box-shadow:
      0 0 30px rgba(22, 255, 142, 0.34),
      inset 0 1px 0 rgba(255, 255, 255, 0.18);
  }
}

@keyframes ops-collab-glow {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(0.96);
  }

  50% {
    opacity: 0.9;
    transform: scale(1.03);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ops-collab-hero-art::before,
  .ops-collab-orbit,
  .ops-collab-person,
  .ops-collab-spark,
  .ops-collab-plus {
    animation: none !important;
  }
}

.ops-collab-searchbar {
  grid-area: search;
  display: block;
  width: 100%;
  max-width: 980px;
  margin-top: -14px;
}

.ops-collab-searchfield {
  position: relative;
  display: block;
}

.ops-collab-searchfield input {
  width: 100%;
  min-height: 36px;
  padding: 0 44px 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(54, 67, 77, 0.56);
  background: rgba(8, 12, 17, 0.96);
  color: #eef9f1;
}

.ops-collab-searchfield input::placeholder {
  color: rgba(162, 179, 168, 0.52);
}

.ops-collab-searchfield button {
  position: absolute;
  top: 50%;
  right: 14px;
  width: 16px;
  height: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(168, 184, 173, 0.68);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  box-shadow: none;
  cursor: pointer;
}

.ops-collab-searchfield button span {
  font-size: 15px;
  line-height: 1;
}

.ops-collab-toolbar {
  grid-area: toolbar;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.ops-collab-toolbar .ops-tabs {
  flex: 0 1 auto;
  justify-content: flex-start;
  gap: 10px;
}

.ops-collab-toolbar .ops-tab {
  min-height: 42px;
  padding: 0 20px;
  border-radius: 12px;
  border-color: rgba(54, 67, 77, 0.56);
  background: rgba(12, 18, 24, 0.82);
  color: #d4e3d9;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.015);
}

.ops-collab-toolbar .ops-tab:hover,
.ops-collab-toolbar .ops-tab.active {
  border-color: rgba(8, 212, 109, 0.44);
  background: linear-gradient(135deg, rgba(8, 212, 109, 0.22), rgba(8, 212, 109, 0.08));
  box-shadow:
    inset 0 0 0 1px rgba(8, 212, 109, 0.16),
    0 0 20px rgba(8, 212, 109, 0.1);
}

.ops-collab-toolbar .ops-tab span {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  font-size: 11px;
}

.ops-collab-filter-button {
  min-height: 42px;
  padding: 0 20px;
  margin-left: 2px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(12, 18, 24, 0.82);
  border-color: rgba(54, 67, 77, 0.56);
  box-shadow: none;
  white-space: nowrap;
}

.ops-collab-filter-button::before {
  content: "";
  width: 14px;
  height: 14px;
  display: inline-block;
  opacity: 0.78;
  background:
    linear-gradient(currentColor, currentColor) left 0 top 2px / 12px 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) left 2px top 6px / 10px 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) left 4px top 10px / 8px 1.5px no-repeat;
}

.ops-collab-layout {
  display: grid;
  grid-template-columns: 300px minmax(560px, 1fr) 360px;
  gap: 14px;
  align-items: start;
}

.ops-collab-left,
.ops-collab-main,
.ops-collab-right {
  display: grid;
  gap: 14px;
}

.ops-collab-create-panel,
.ops-collab-quick-actions {
  display: grid;
  gap: 12px;
}

.ops-collab-create-form {
  display: grid;
  gap: 12px;
}

.ops-collab-create-form .field {
  color: rgba(255, 255, 255, 0.96);
}

.ops-collab-create-form .field small,
.ops-collab-create-form .ops-muted {
  color: rgba(211, 223, 216, 0.82);
}

.ops-collab-create-form textarea,
.ops-collab-create-form select[multiple] {
  min-height: 108px;
  padding-top: 12px;
  padding-bottom: 12px;
  border-radius: 10px;
}

.ops-collab-action {
  min-height: 70px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(13, 19, 26, 0.9);
  color: var(--text);
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 16px;
  gap: 12px;
  align-items: center;
}

.ops-collab-action:hover {
  color: var(--text);
  border-color: rgba(8, 212, 109, 0.3);
}

.ops-collab-action > span:first-child {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(8, 212, 109, 0.12);
  color: #7cf8aa;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ops-collab-action strong,
.ops-collab-action small {
  display: block;
}

.ops-collab-action small {
  color: var(--muted);
}

.ops-collab-main-actions {
  display: flex;
  gap: 8px;
}

.ops-collab-main-actions .ops-select-link.is-active {
  border-color: rgba(8, 212, 109, 0.42);
  color: #7cf8aa;
}

.ops-collab-list {
  display: grid;
  gap: 10px;
}

.ops-collab-row {
  min-height: 92px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(13, 19, 26, 0.92);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px 54px;
  gap: 14px;
  align-items: center;
}

.ops-collab-row:hover {
  border-color: rgba(8, 212, 109, 0.24);
}

.ops-collab-row-main {
  min-width: 0;
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  color: var(--text);
}

.ops-collab-row-main:hover {
  color: var(--text);
}

.ops-collab-icon {
  width: 66px;
  height: 66px;
  border-radius: 14px;
  background: rgba(8, 212, 109, 0.14);
  color: #7cf8aa;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.ops-collab-icon[data-tone="violet"] {
  background: rgba(168, 85, 247, 0.14);
  color: #c4b5fd;
}

.ops-collab-icon[data-tone="orange"] {
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
}

.ops-collab-icon[data-tone="blue"] {
  background: rgba(59, 130, 246, 0.14);
  color: #93c5fd;
}

.ops-collab-icon[data-tone="gold"] {
  background: rgba(234, 179, 8, 0.14);
  color: #fde047;
}

.ops-collab-row-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.ops-collab-row-copy small,
.ops-collab-row-copy p,
.ops-collab-row-meta span,
.ops-collab-row-meta small {
  color: var(--muted);
}

.ops-collab-row-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.ops-collab-row-title strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
}

.ops-collab-row-title form {
  margin: 0;
}

.ops-collab-star {
  min-width: 26px;
  min-height: 26px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  box-shadow: none;
}

.ops-collab-star.is-active {
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.3);
}

.ops-collab-members,
.ops-collab-people {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.ops-collab-avatar,
.ops-collab-extra {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(5, 9, 14, 0.92);
  background: linear-gradient(135deg, rgba(120, 255, 176, 0.88), rgba(8, 212, 109, 0.2));
  color: #0b1118;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  margin-left: -8px;
}

.ops-collab-avatar:first-child,
.ops-collab-extra:first-child {
  margin-left: 0;
}

.ops-collab-extra {
  background: rgba(169, 186, 174, 0.12);
  color: var(--text);
}

.ops-collab-tag {
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(169, 186, 174, 0.08);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  margin-left: 4px;
}

.ops-collab-row-meta {
  display: grid;
  gap: 4px;
  justify-items: end;
  text-align: right;
}

.ops-collab-row-side {
  justify-self: end;
}

.ops-collab-comments {
  min-width: 32px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(8, 212, 109, 0.12);
  color: #7cf8aa;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}

.ops-collab-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ops-collab-quick-card {
  min-height: 76px;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(13, 19, 26, 0.9);
  color: var(--text);
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.ops-collab-quick-card:hover {
  color: var(--text);
  border-color: rgba(8, 212, 109, 0.24);
}

.ops-collab-quick-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(8, 212, 109, 0.12);
  color: #7cf8aa;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ops-collab-quick-card small {
  display: block;
  color: var(--muted);
}

.ops-collab-feed {
  display: grid;
  gap: 12px;
}

.ops-collab-feed-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
  color: var(--text);
}

.ops-collab-feed-item:hover {
  color: var(--text);
}

.ops-collab-feed-item p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.4;
}

@media (max-width: 1480px) {
  .ops-collab-layout {
    grid-template-columns: 1fr;
  }

  .ops-collab-hero-panel {
    grid-template-columns: 1fr;
    grid-template-areas:
      "copy"
      "art"
      "search"
      "toolbar";
  }

  .ops-collab-hero-art {
    width: min(100%, 320px);
    min-height: 136px;
  }

  .ops-collab-right {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .ops-collab-layout,
  .ops-collab-right,
  .ops-collab-quick-grid {
    grid-template-columns: 1fr;
  }

  .ops-collab-row {
    grid-template-columns: 1fr;
  }

  .ops-collab-row-meta,
  .ops-collab-row-side {
    justify-items: start;
    justify-self: start;
    text-align: left;
  }
}

@media (max-width: 720px) {
  .ops-collab-toolbar,
  .ops-collab-row-main {
    flex-direction: column;
    align-items: stretch;
  }

  .ops-collab-searchbar {
    max-width: 100%;
    margin-top: 0;
  }

  .ops-collab-filter-button {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 1480px) {
  .ops-tracker-layout {
    grid-template-columns: 1fr;
  }

  .ops-tracker-rail {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .ops-tracker-filter-grid,
  .ops-tracker-rail,
  .ops-tracker-kpis {
    grid-template-columns: 1fr;
  }

  .ops-tracker-table-head {
    display: none;
  }

  .ops-tracker-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

@media (max-width: 720px) {
  .ops-tracker-head,
  .ops-tracker-pagination,
  .ops-tracker-search-line,
  .ops-tracker-donut-wrap,
  .ops-tracker-publish-grid {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .ops-tracker-actions {
    flex-wrap: wrap;
  }
}

@media (max-width: 1480px) {
  .ops-dashboard-grid,
  .ops-tasks-layout {
    grid-template-columns: 1fr;
  }

  .ops-queues-panel {
    position: static;
  }

  .ops-right-rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .ops-action-grid,
  .ops-kpi-grid,
  .ops-activity-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ops-bottom-grid,
  .ops-right-rail,
  .ops-control-grid {
    grid-template-columns: 1fr;
  }

  .ops-task-head {
    display: none;
  }

  .ops-task-row {
    grid-template-columns: 26px minmax(0, 1fr) auto;
    align-items: start;
  }

  .ops-task-row > .ops-task-cell,
  .ops-task-row > .ops-priority,
  .ops-task-row > .ops-assignee,
  .ops-task-row > .ops-status-form {
    grid-column: 2 / -1;
  }

  .ops-row-menu {
    grid-column: 3;
    grid-row: 1;
  }
}

@media (max-width: 720px) {
  body:not(.page-login) .content,
  body:not(.page-login) .topbar {
    padding-left: 14px;
    padding-right: 14px;
  }

  .ops-hero,
  .ops-panel-head,
  .ops-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .ops-hero-actions,
  .ops-tabs {
    justify-content: flex-start;
  }

  .ops-action-grid,
  .ops-kpi-grid,
  .ops-activity-grid,
  .ops-panel-footer,
  .ops-sla {
    grid-template-columns: 1fr;
  }

  .ops-filter-form {
    position: fixed;
    inset: 90px 12px auto;
    width: auto;
    grid-template-columns: 1fr;
  }

  .ops-task-row {
    grid-template-columns: 1fr;
  }

  .ops-task-row > * {
    grid-column: auto !important;
  }

  .ops-row-menu {
    justify-self: start;
  }
}

.chat-workbench-contact-center .chat-roster-top {
  padding: 10px 12px 8px;
  gap: 8px;
  background: rgba(255, 255, 255, 0.98);
}

.chat-workbench-contact-center .chat-contact-toolbar {
  grid-template-columns: minmax(182px, 220px) minmax(0, 1fr);
  gap: 8px;
}

.chat-workbench-contact-center .chat-channel-switcher {
  width: 100%;
}

.chat-workbench-contact-center .chat-channel-switcher-trigger {
  min-height: 34px;
  padding: 0 11px;
  border-radius: 14px;
  box-shadow: none;
}

.chat-workbench-contact-center .chat-channel-switcher-value {
  font-size: 12px;
}

.chat-workbench-contact-center .chat-channel-switcher-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 18;
  width: 100%;
  margin-top: 0;
  border-radius: 14px;
  box-shadow: 0 18px 34px rgba(14, 26, 18, 0.12);
}

.chat-workbench-contact-center .chat-contact-search input {
  min-height: 34px;
  border-radius: 14px;
  background: rgba(247, 249, 244, 0.98);
}

.chat-workbench-contact-center .chat-contact-roster-head {
  display: none;
}

.chat-workbench-contact-center .chat-thread-scroll {
  gap: 0;
  background: rgba(255, 255, 255, 0.98);
}

.chat-workbench-contact-center .chat-thread-card {
  padding: 11px 12px 10px;
  border-bottom: 1px solid rgba(84, 100, 78, 0.08);
  border-radius: 0;
}

.chat-workbench-contact-center .chat-thread-card:hover {
  background: rgba(244, 248, 242, 0.92);
}

.chat-workbench-contact-center .chat-thread-card.active {
  background: linear-gradient(135deg, rgba(0, 146, 69, 0.14), rgba(0, 146, 69, 0.08));
  box-shadow: inset 4px 0 0 rgba(0, 146, 69, 0.76);
}

.chat-workbench-contact-center .chat-thread-main {
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
}

.chat-workbench-contact-center .chat-thread-avatar {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
}

.chat-workbench-contact-center .chat-thread-title {
  font-size: 13px;
  line-height: 1.25;
}

.chat-workbench-contact-center .chat-thread-preview {
  margin-top: 3px;
  color: rgba(14, 26, 18, 0.56);
  font-size: 12px;
  line-height: 1.34;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.chat-workbench-contact-center .chat-thread-date {
  font-size: 10px;
}

.chat-workbench-contact-center .chat-thread-unread {
  min-width: 18px;
  min-height: 18px;
  font-size: 10px;
}

.chat-workbench-contact-center .chat-thread-channel-row {
  margin-top: 6px;
}

.chat-workbench-contact-center .chat-thread-channel {
  font-size: 10px;
  letter-spacing: 0.06em;
}

.chat-workbench-contact-center .chat-contact-footer {
  padding: 10px 12px 12px;
  background: rgba(255, 255, 255, 0.98);
}

.chat-workbench-contact-center .chat-contact-new-chat {
  width: 48px;
  height: 48px;
}

.chat-workbench-contact-center .chat-stage {
  position: relative;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.chat-workbench-contact-center .chat-stage-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 74px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.98);
}

.chat-workbench-contact-center .chat-stage-head-main {
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.chat-workbench-contact-center .chat-stage-head-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  font-size: 17px;
}

.chat-workbench-contact-center .chat-stage-head-copy-group {
  gap: 2px;
}

.chat-workbench-contact-center .chat-stage-title {
  font-size: 16px;
  line-height: 1.16;
}

.chat-workbench-contact-center .chat-stage-copy {
  display: block;
  color: rgba(14, 26, 18, 0.52);
  font-size: 12px;
  line-height: 1.35;
}

.chat-workbench-contact-center .chat-stage-badges {
  display: none;
}

.chat-workbench-contact-center .chat-stage-meta {
  gap: 10px;
}

.chat-workbench-contact-center .chat-stage-meta .btn,
.chat-workbench-contact-center .chat-stage-tools-trigger {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 14px;
  box-shadow: none;
}

.chat-workbench-contact-center .chat-stage-tools-panel {
  top: calc(100% + 8px);
  width: min(360px, calc(100vw - 56px));
}

.chat-workbench-contact-center .chat-stage-stream {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 22px 16px;
  overflow: auto;
  background:
    radial-gradient(circle at 14% 18%, rgba(255, 255, 255, 0.18), transparent 18%),
    radial-gradient(circle at 84% 22%, rgba(255, 255, 255, 0.12), transparent 22%),
    radial-gradient(circle at 26% 82%, rgba(255, 255, 255, 0.08), transparent 16%),
    radial-gradient(circle at 76% 76%, rgba(255, 255, 255, 0.1), transparent 18%),
    linear-gradient(180deg, rgba(174, 203, 145, 0.96), rgba(147, 187, 122, 0.96));
}

.chat-workbench-contact-center .chat-message {
  display: block;
  max-width: min(72%, 780px);
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.chat-workbench-contact-center .chat-message.incoming {
  margin-right: auto;
}

.chat-workbench-contact-center .chat-message.mine {
  margin-left: auto;
}

.chat-workbench-contact-center .chat-message.system {
  margin: 0 auto;
  max-width: fit-content;
}

.chat-workbench-contact-center .chat-message-author {
  margin: 0 0 4px 6px;
  color: rgba(14, 26, 18, 0.56);
  font-size: 11px;
  font-weight: 700;
}

.chat-workbench-contact-center .chat-bubble {
  max-width: none;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 22px rgba(14, 26, 18, 0.08);
}

.chat-workbench-contact-center .chat-message.incoming .chat-bubble {
  border-bottom-left-radius: 10px;
  background: rgba(255, 255, 255, 0.98);
}

.chat-workbench-contact-center .chat-message.mine .chat-bubble {
  border-bottom-right-radius: 10px;
  background: rgba(236, 255, 225, 0.98);
}

.chat-workbench-contact-center .chat-message.system .chat-bubble {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: none;
}

.chat-workbench-contact-center .chat-bubble-foot {
  margin-top: 6px;
}

.chat-workbench-contact-center .chat-compose-panel {
  padding: 10px 14px 14px;
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid rgba(84, 100, 78, 0.08);
}

.chat-workbench-contact-center .chat-compose-form {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.chat-workbench-contact-center .chat-compose-form textarea {
  min-height: 48px;
  max-height: 120px;
  padding: 12px 14px;
  border-radius: 20px;
  resize: vertical;
  background: rgba(255, 255, 255, 0.98);
}

.chat-workbench-contact-center .chat-compose-form button {
  min-width: 100px;
  min-height: 48px;
  border-radius: 999px;
}

/* Final pass: contact roster and message geometry closer to Telegram */
.chat-workbench-contact-center .chat-roster {
  background: rgba(255, 255, 255, 0.98);
}

.chat-workbench-contact-center .chat-thread-card {
  min-height: 74px;
  padding: 9px 12px 8px;
  background: transparent;
}

.chat-workbench-contact-center .chat-thread-card:hover {
  background: rgba(14, 26, 18, 0.03);
}

.chat-workbench-contact-center .chat-thread-card.active {
  background: rgba(0, 146, 69, 0.08);
  box-shadow: inset 3px 0 0 rgba(0, 146, 69, 0.78);
}

.chat-workbench-contact-center .chat-thread-top {
  gap: 8px;
}

.chat-workbench-contact-center .chat-thread-preview {
  margin-top: 2px;
  color: rgba(14, 26, 18, 0.5);
  line-height: 1.3;
  -webkit-line-clamp: 1;
}

.chat-workbench-contact-center .chat-thread-channel-row {
  margin-top: 4px;
}

.chat-workbench-contact-center .chat-stage-stream {
  gap: 10px;
  align-items: stretch;
}

.chat-workbench-contact-center .chat-message {
  width: fit-content;
  min-width: 0;
  max-width: min(56%, 620px);
  margin: 0;
}

.chat-workbench-contact-center .chat-message.incoming {
  align-self: flex-start;
}

.chat-workbench-contact-center .chat-message.mine {
  align-self: flex-end;
}

.chat-workbench-contact-center .chat-message.system {
  align-self: center;
}

.chat-workbench-contact-center .chat-bubble {
  border-radius: 18px;
}

.chat-workbench-contact-center .chat-message.incoming .chat-bubble {
  border-bottom-left-radius: 8px;
}

.chat-workbench-contact-center .chat-message.mine .chat-bubble {
  border-bottom-right-radius: 8px;
}

.chat-workbench-contact-center .chat-thread-scroll {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-content: normal;
  background: rgba(255, 255, 255, 0.98);
}

.chat-workbench-contact-center .chat-thread-card.active {
  background: rgba(255, 255, 255, 0.98);
}

.chat-workbench-contact-center .chat-thread-avatar,
.chat-workbench-contact-center .chat-stage-head-avatar,
.chat-workbench-contact-center .chat-message-avatar {
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chat-workbench-contact-center .chat-thread-avatar {
  font-size: 12px;
  font-weight: 800;
}

.chat-workbench-contact-center .chat-stage-head-avatar {
  font-size: 15px;
}

.chat-workbench-contact-center .chat-message {
  max-width: min(72%, 720px);
}

.chat-workbench-contact-center .chat-message.system {
  align-self: flex-end;
  max-width: min(72%, 720px);
}

.chat-workbench-contact-center .chat-message-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.chat-workbench-contact-center .chat-message-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  max-width: 100%;
}

.chat-workbench-contact-center .chat-message-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(0, 146, 69, 0.2), rgba(0, 146, 69, 0.38));
  color: var(--primary-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}

.chat-workbench-contact-center .chat-message.incoming .chat-message-author {
  display: none;
}

.chat-workbench-contact-center .chat-bubble {
  width: fit-content;
  max-width: 100%;
  min-width: 170px;
  padding: 13px 16px;
  border-radius: 20px;
}

.chat-workbench-contact-center .chat-message.system .chat-bubble {
  border-bottom-right-radius: 8px;
  background: rgba(236, 255, 225, 0.98);
  box-shadow: 0 10px 22px rgba(14, 26, 18, 0.08);
}

/* Final fix: keep avatar strictly outside incoming bubble */
.chat-workbench-contact-center .chat-message.incoming {
  width: auto;
  max-width: min(72%, 720px);
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.chat-workbench-contact-center .chat-message.incoming .chat-message-row {
  display: grid;
  grid-template-columns: 34px auto;
  column-gap: 12px;
  align-items: end;
}

.chat-workbench-contact-center .chat-message.incoming .chat-message-avatar {
  grid-column: 1;
  align-self: end;
  position: relative;
  z-index: 1;
}

.chat-workbench-contact-center .chat-message.incoming .chat-message-stack {
  grid-column: 2;
  align-self: end;
  max-width: 100%;
}

.chat-workbench-contact-center .chat-message.incoming .chat-bubble {
  min-width: 150px;
}

/* Final override: Telegram-like incoming geometry, transparent avatar lane,
   inline time, and day separators. */
.chat-day-separator {
  align-self: center;
  width: auto;
  max-width: none;
  margin: 4px auto 8px;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.chat-day-separator .chat-bubble {
  min-width: 0;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(111, 134, 92, 0.82);
  color: #fff;
  box-shadow: none;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.chat-bubble-inline {
  display: inline-flex;
  align-items: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 100%;
}

.chat-workbench-contact-center .chat-bubble-text {
  display: inline;
  margin: 0;
  line-height: 1.42;
}

.chat-workbench-contact-center .chat-bubble-foot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 0;
  white-space: nowrap;
  color: rgba(14, 26, 18, 0.48);
  font-size: 11px;
  line-height: 1;
}

.chat-workbench-contact-center .chat-bubble-time {
  font-weight: 700;
}

.chat-bubble-attachments {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.chat-attachment {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: fit-content;
  max-width: min(320px, 100%);
  padding: 9px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(84, 100, 78, 0.12);
  color: var(--text-strong);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(17, 34, 19, 0.06);
}

.chat-attachment:hover {
  color: var(--text-strong);
  background: #fff;
}

.chat-attachment-image {
  padding: 0;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
}

.chat-attachment-image img {
  display: block;
  max-width: min(240px, 100%);
  max-height: 180px;
  object-fit: cover;
}

.chat-workbench-contact-center .chat-message.incoming,
.chat-workbench-contact-center .chat-message.incoming .chat-message-row,
.chat-workbench-contact-center .chat-message.incoming .chat-message-stack {
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
}

.chat-workbench-contact-center .chat-message.incoming {
  width: auto;
  max-width: min(72%, 720px);
  padding: 0;
}

.chat-workbench-contact-center .chat-message.incoming .chat-message-row {
  display: grid;
  grid-template-columns: 34px minmax(0, auto);
  column-gap: 12px;
  align-items: end;
}

.chat-workbench-contact-center .chat-message.incoming .chat-message-avatar {
  grid-column: 1;
  align-self: end;
  justify-self: start;
  position: static;
  z-index: auto;
}

.chat-workbench-contact-center .chat-message.incoming .chat-message-stack {
  grid-column: 2;
  align-self: end;
  max-width: 100%;
  min-width: 0;
}

.chat-workbench-contact-center .chat-message.incoming .chat-bubble {
  min-width: 0;
  margin: 0;
}

/* Keep the contact list scrollable inside the messenger shell. */
.chat-workbench-contact-center {
  height: calc(100vh - 150px);
  max-height: calc(100vh - 150px);
  min-height: 520px;
  align-items: stretch;
  overflow: hidden;
}

.chat-workbench-contact-center .chat-roster,
.chat-workbench-contact-center .chat-stage {
  height: 100%;
  min-height: 0;
  max-height: 100%;
}

.chat-workbench-contact-center .chat-thread-scroll,
.chat-workbench-contact-center .chat-stage-stream {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* Contact-center workspace redesign. Scoped to the chat content area only. */
body.page-chat .content:has(.chat-workbench-contact-center) {
  padding: 0;
}

body.page-chat .chat-workbench-contact-center {
  display: grid;
  grid-template-columns: 340px minmax(520px, 1fr) 420px;
  grid-template-areas: "roster stage ai";
  gap: 0;
  height: calc(100vh - 76px);
  max-height: calc(100vh - 76px);
  min-height: 620px;
  margin: 0;
  border-radius: 0 0 8px 0;
  border-top: 1px solid rgba(39, 51, 61, 0.78);
  background:
    radial-gradient(circle at 62% 45%, rgba(14, 146, 79, 0.1), transparent 28%),
    #05090d;
  overflow: hidden;
}

body.page-chat .chat-workbench-contact-center .chat-roster {
  grid-area: roster;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 0;
  padding: 0;
  height: 100%;
  min-height: 0;
  max-height: none;
  border: 0;
  border-right: 1px solid rgba(42, 55, 65, 0.78);
  border-radius: 0;
  background: #070d12;
  box-shadow: none;
  overflow: hidden;
}

body.page-chat .chat-workbench-contact-center .chat-stage {
  grid-area: stage;
  height: 100%;
  min-height: 0;
  max-height: none;
  border: 0;
  border-right: 1px solid rgba(42, 55, 65, 0.78);
  border-radius: 0;
  background:
    radial-gradient(circle at 24% 42%, rgba(23, 220, 120, 0.13), transparent 2px),
    radial-gradient(circle at 58% 60%, rgba(23, 220, 120, 0.12), transparent 2px),
    radial-gradient(circle at 82% 24%, rgba(23, 220, 120, 0.12), transparent 2px),
    linear-gradient(180deg, #070d12, #061015);
  box-shadow: none;
}

body.page-chat .chat-workbench-contact-center .chat-roster-top {
  display: block;
  padding: 18px 18px 14px;
  gap: 18px;
  background: transparent;
  border-bottom: 1px solid rgba(42, 55, 65, 0.66);
}

body.page-chat .chat-workbench-contact-center .chat-roster-actions {
  display: none;
}

body.page-chat .chat-workbench-contact-center .chat-roster-heading {
  display: block;
}

body.page-chat .chat-contact-channel-shell {
  display: grid;
  gap: 18px;
}

body.page-chat .chat-contact-section-head,
body.page-chat .chat-contact-dialogs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #f3fff7;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

body.page-chat .chat-contact-section-head a {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #dfffee;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(71, 91, 104, 0.72);
  background: rgba(10, 18, 24, 0.82);
  font-size: 20px;
  line-height: 1;
}

body.page-chat .chat-contact-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-height: 42px;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(42, 55, 65, 0.86);
  background: rgba(9, 15, 21, 0.9);
}

body.page-chat .chat-contact-tabs a {
  border-radius: 9px;
  color: rgba(222, 236, 229, 0.72);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 800;
}

body.page-chat .chat-contact-tabs a.active {
  color: #f8fff9;
  background: linear-gradient(180deg, rgba(34, 51, 58, 0.96), rgba(24, 35, 42, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.page-chat .chat-contact-tabs strong {
  color: #2ee480;
}

body.page-chat .chat-contact-channel-list {
  display: grid;
  gap: 8px;
}

body.page-chat .chat-contact-channel-card {
  min-height: 54px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

body.page-chat .chat-contact-channel-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #f8fffb;
  font-weight: 900;
  background: linear-gradient(135deg, #0d8dff, #2bc7ff);
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.22);
}

body.page-chat .chat-contact-channel-card[data-channel="telegram"] .chat-contact-channel-icon {
  background: #27a7e7;
}

body.page-chat .chat-telegram-logo {
  width: 22px;
  height: 22px;
  display: block;
  color: #fff;
}

body.page-chat .chat-contact-channel-card[data-channel="whatsapp"] .chat-contact-channel-icon {
  background: linear-gradient(135deg, #18c65f, #52f288);
}

body.page-chat .chat-contact-channel-card[data-channel="email"] .chat-contact-channel-icon {
  background: linear-gradient(135deg, #60718d, #9aabc3);
}

body.page-chat .chat-contact-channel-card[data-channel="avito"] .chat-contact-channel-icon,
body.page-chat .chat-contact-channel-card[data-channel="max"] .chat-contact-channel-icon {
  background: linear-gradient(135deg, #6b48ff, #ff5ed7);
}

body.page-chat .chat-contact-channel-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

body.page-chat .chat-contact-channel-copy strong {
  color: #f3fff7;
  font-size: 13px;
  line-height: 1.2;
}

body.page-chat .chat-contact-channel-copy small {
  color: rgba(203, 216, 210, 0.62);
  font-size: 11px;
}

body.page-chat .chat-contact-channel-count,
body.page-chat .chat-thread-unread {
  min-width: 24px;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, #27ce72, #159852);
  color: #f8fff9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
}

body.page-chat .chat-contact-dialogs-head {
  min-height: 42px;
  padding: 14px 18px 8px;
  align-self: start;
}

body.page-chat .chat-contact-dialogs-head div {
  display: inline-flex;
  gap: 10px;
  color: rgba(202, 216, 210, 0.66);
}

body.page-chat .chat-workbench-contact-center .chat-thread-scroll {
  padding: 0 12px 12px;
  gap: 8px;
  min-height: 0;
  overflow-y: auto;
  background: transparent;
}

body.page-chat .chat-workbench-contact-center .chat-thread-card {
  min-height: 66px;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
}

body.page-chat .chat-workbench-contact-center .chat-thread-card:hover {
  background: rgba(18, 28, 35, 0.82);
}

body.page-chat .chat-workbench-contact-center .chat-thread-card.active {
  border-color: rgba(24, 210, 112, 0.88);
  background: linear-gradient(180deg, rgba(15, 87, 49, 0.64), rgba(11, 60, 37, 0.6));
  box-shadow: inset 0 0 0 1px rgba(26, 168, 91, 0.22), 0 10px 24px rgba(0, 0, 0, 0.16);
}

body.page-chat .chat-workbench-contact-center .chat-thread-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #f7fff9;
  background: linear-gradient(135deg, #526478, #283746);
}

body.page-chat .chat-workbench-contact-center .chat-thread-title {
  color: #f8fff9;
  font-size: 13px;
}

body.page-chat .chat-workbench-contact-center .chat-thread-date,
body.page-chat .chat-workbench-contact-center .chat-thread-preview {
  color: rgba(205, 217, 211, 0.64);
}

body.page-chat .chat-workbench-contact-center .chat-thread-channel {
  color: #35d980;
  text-transform: uppercase;
}

body.page-chat .chat-workbench-contact-center .chat-thread-channel-row {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

body.page-chat .chat-workbench-contact-center .chat-thread-channel-logo {
  width: 13px;
  height: 13px;
  padding: 2px;
  border-radius: 50%;
  background: #27a7e7;
  color: #fff;
  flex: 0 0 auto;
}

body.page-chat .chat-contact-footer {
  display: none;
}

body.page-chat .chat-workbench-contact-center .chat-stage-head {
  min-height: 96px;
  padding: 22px 30px;
  border-bottom: 1px solid rgba(42, 55, 65, 0.78);
  background: rgba(7, 12, 16, 0.92);
}

body.page-chat .chat-workbench-contact-center .chat-stage-head-avatar {
  width: 58px;
  height: 58px;
  flex-basis: 58px;
  color: #dfffee;
  background: linear-gradient(135deg, rgba(44, 65, 74, 0.92), rgba(22, 34, 42, 0.92));
}

body.page-chat .chat-workbench-contact-center .chat-stage-title {
  color: #f8fff9;
  font-size: 18px;
  font-weight: 900;
}

body.page-chat .chat-workbench-contact-center .chat-stage-copy {
  color: rgba(205, 217, 211, 0.74);
}

body.page-chat .chat-workbench-contact-center .chat-stage-meta .btn,
body.page-chat .chat-workbench-contact-center .chat-stage-tools-trigger {
  min-height: 38px;
  border-radius: 12px;
  border-color: rgba(54, 68, 78, 0.88);
  background: rgba(9, 15, 21, 0.86);
  color: #effff6;
}

body.page-chat .chat-workbench-contact-center .chat-stage-stream {
  padding: 34px 32px 22px;
  gap: 28px;
  background:
    radial-gradient(circle at 16% 26%, rgba(28, 230, 123, 0.34) 0 1px, transparent 2px),
    radial-gradient(circle at 45% 62%, rgba(28, 230, 123, 0.18) 0 1px, transparent 2px),
    radial-gradient(circle at 72% 38%, rgba(28, 230, 123, 0.24) 0 1px, transparent 2px),
    radial-gradient(circle at 32% 76%, rgba(28, 230, 123, 0.18) 0 1px, transparent 2px),
    linear-gradient(180deg, rgba(5, 10, 14, 0.98), rgba(6, 14, 18, 0.98));
}

body.page-chat .chat-workbench-contact-center .chat-message {
  max-width: min(64%, 620px);
}

body.page-chat .chat-workbench-contact-center .chat-bubble {
  min-width: 0;
  padding: 16px 18px;
  border-radius: 18px;
  color: #f8fff9;
  font-size: 16px;
  line-height: 1.48;
  box-shadow: none;
}

body.page-chat .chat-workbench-contact-center .chat-message.incoming .chat-bubble {
  background: #1a232b;
  border-bottom-left-radius: 8px;
}

body.page-chat .chat-workbench-contact-center .chat-message.mine .chat-bubble,
body.page-chat .chat-workbench-contact-center .chat-message.system .chat-bubble {
  background: linear-gradient(180deg, rgba(16, 78, 47, 0.96), rgba(13, 64, 40, 0.96));
  border-bottom-right-radius: 8px;
}

body.page-chat .chat-workbench-contact-center .chat-bubble-foot {
  color: rgba(213, 226, 219, 0.62);
}

body.page-chat .chat-suggested-actions {
  margin: 0 32px 20px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(45, 58, 68, 0.86);
  background: rgba(7, 13, 18, 0.92);
}

body.page-chat .chat-suggested-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(204, 216, 210, 0.66);
  font-size: 12px;
}

body.page-chat .chat-suggested-head button {
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: rgba(204, 216, 210, 0.72);
  cursor: pointer;
}

body.page-chat .chat-suggested-buttons {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

body.page-chat .chat-suggested-buttons button,
body.page-chat .chat-ai-hints button {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  border: 0;
  background: rgba(22, 31, 39, 0.96);
  color: #effff6;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

body.page-chat .chat-suggested-buttons button:first-child {
  background: linear-gradient(180deg, rgba(25, 106, 65, 0.96), rgba(16, 75, 48, 0.96));
}

body.page-chat .chat-workbench-contact-center .chat-compose-panel {
  padding: 0 32px 24px;
  border: 0;
  background: #070d12;
}

body.page-chat .chat-workbench-contact-center .chat-compose-form {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(45, 58, 68, 0.86);
  background: rgba(8, 14, 19, 0.96);
}

body.page-chat .chat-workbench-contact-center .chat-compose-form-rich {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
}

body.page-chat .chat-workbench-contact-center .chat-send-error {
  margin: 0 0 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 111, 111, 0.45);
  background: rgba(92, 22, 26, 0.36);
  color: #ffd7d7;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

body.page-chat .chat-workbench-contact-center .chat-send-error[hidden] {
  display: none;
}

body.page-chat .chat-workbench-contact-center .chat-compose-field {
  min-height: 112px;
  padding: 14px 14px 12px;
  border-radius: 16px;
  border: 1px solid rgba(45, 58, 68, 0.9);
  background: rgba(8, 14, 19, 0.96);
  display: grid;
  grid-template-rows: minmax(42px, auto) auto auto;
  gap: 10px;
  position: relative;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

body.page-chat .chat-workbench-contact-center .chat-compose-form textarea {
  min-height: 44px;
  padding: 11px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #f3fff7;
  box-shadow: none;
}

body.page-chat .chat-workbench-contact-center .chat-compose-form textarea::placeholder {
  color: rgba(201, 214, 207, 0.48);
}

body.page-chat .chat-workbench-contact-center .chat-compose-form-rich textarea {
  width: 100%;
  min-height: 42px;
  max-height: 140px;
  padding: 0;
  resize: none;
  overflow-y: auto;
  line-height: 1.42;
}

body.page-chat .chat-workbench-contact-center .chat-compose-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

body.page-chat .chat-workbench-contact-center .chat-compose-tool-group {
  display: flex;
  align-items: center;
  gap: 7px;
}

body.page-chat .chat-workbench-contact-center .chat-compose-tool {
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(205, 217, 211, 0.68);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
}

body.page-chat .chat-workbench-contact-center .chat-compose-tool svg {
  width: 18px;
  height: 18px;
}

body.page-chat .chat-workbench-contact-center .chat-compose-tool:hover,
body.page-chat .chat-workbench-contact-center .chat-compose-tool.active {
  background: rgba(29, 47, 56, 0.9);
  color: #effff6;
}

body.page-chat .chat-workbench-contact-center .chat-compose-tool.disabled {
  color: rgba(205, 217, 211, 0.35);
}

body.page-chat .chat-workbench-contact-center .chat-compose-ai {
  width: 30px;
  min-width: 30px;
  color: #4bf093;
  background: rgba(33, 124, 72, 0.28);
  font-size: 12px;
}

body.page-chat .chat-workbench-contact-center .chat-compose-file-input {
  display: none;
}

body.page-chat .chat-workbench-contact-center .chat-compose-file-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

body.page-chat .chat-workbench-contact-center .chat-compose-file-list[hidden] {
  display: none;
}

body.page-chat .chat-workbench-contact-center .chat-compose-file-list span,
body.page-chat .chat-workbench-contact-center .chat-compose-file-list button {
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(45, 81, 66, 0.82);
  background: rgba(15, 36, 28, 0.78);
  color: #dfffee;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
}

body.page-chat .chat-workbench-contact-center .chat-compose-file-list button {
  border-color: rgba(255, 111, 111, 0.42);
  background: rgba(92, 22, 26, 0.28);
  color: #ffd7d7;
  cursor: pointer;
}

body.page-chat .chat-workbench-contact-center .chat-compose-menu {
  position: absolute;
  left: 12px;
  bottom: 50px;
  z-index: 5;
  width: min(320px, calc(100% - 24px));
  padding: 8px;
  border-radius: 12px;
  border: 1px solid rgba(45, 58, 68, 0.92);
  background: rgba(11, 18, 24, 0.98);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.35);
  display: grid;
  gap: 6px;
}

body.page-chat .chat-workbench-contact-center .chat-compose-menu[hidden] {
  display: none;
}

body.page-chat .chat-workbench-contact-center .chat-compose-menu button {
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #effff6;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

body.page-chat .chat-workbench-contact-center .chat-compose-menu button:hover {
  background: rgba(29, 47, 56, 0.9);
}

body.page-chat .chat-workbench-contact-center .chat-compose-form button[type="submit"] {
  width: 46px;
  min-width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 50%;
  color: transparent;
  background: linear-gradient(180deg, var(--button-primary), var(--button-primary-dark));
  position: relative;
}

body.page-chat .chat-workbench-contact-center .chat-compose-form-rich button[type="submit"] {
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
}

body.page-chat .chat-workbench-contact-center .chat-compose-form button[type="submit"]::before {
  content: "➤";
  color: #f8fff9;
  font-size: 18px;
  transform: translateX(1px);
}

body.page-chat .chat-ai-sidebar {
  grid-area: ai;
  min-height: 0;
  height: 100%;
  padding: 24px 24px 18px;
  display: grid;
  align-content: start;
  gap: 16px;
  overflow-y: auto;
  background: #071015;
}

body.page-chat .chat-ai-card {
  padding: 18px;
  border-radius: 14px;
  border: 1px solid rgba(27, 90, 61, 0.5);
  background: linear-gradient(180deg, rgba(12, 24, 28, 0.98), rgba(9, 17, 23, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

body.page-chat .chat-ai-card h3 {
  margin: 0;
  color: #f8fff9;
  font-size: 15px;
  font-weight: 900;
}

body.page-chat .chat-ai-card p,
body.page-chat .chat-ai-card small,
body.page-chat .chat-ai-client dt {
  margin: 0;
  color: rgba(202, 216, 209, 0.62);
  font-size: 12px;
}

body.page-chat .chat-ai-card-head,
body.page-chat .chat-ai-card-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

body.page-chat .chat-ai-icon,
body.page-chat .chat-ai-card-title-row span {
  min-width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(21, 127, 70, 0.34);
  color: #35ec8c;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
}

body.page-chat .chat-ai-points {
  margin: 18px 0 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(22, 31, 39, 0.72);
  display: grid;
  gap: 12px;
  list-style: none;
}

body.page-chat .chat-ai-points li {
  color: #eafcf1;
  font-size: 13px;
  line-height: 1.35;
}

body.page-chat .chat-ai-points li::before {
  content: "•";
  margin-right: 9px;
  color: #1fe07e;
}

body.page-chat .chat-ai-mood,
body.page-chat .chat-ai-priority {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(51, 66, 76, 0.72);
  color: rgba(224, 237, 230, 0.76);
  font-size: 13px;
}

body.page-chat .chat-ai-mood strong,
body.page-chat .chat-ai-priority strong,
body.page-chat .chat-ai-sla-copy strong,
body.page-chat .chat-ai-sla-copy b {
  color: #f8fff9;
}

body.page-chat .chat-ai-sla-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

body.page-chat .chat-ai-ring {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: conic-gradient(#20d888 calc(var(--value) * 1%), rgba(118, 145, 127, 0.44) 0);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

body.page-chat .chat-ai-ring::before {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: #111b22;
}

body.page-chat .chat-ai-ring span {
  position: relative;
  z-index: 1;
  color: #f8fff9;
  font-size: 24px;
  font-weight: 900;
}

body.page-chat .chat-ai-sla-copy {
  display: grid;
  gap: 4px;
}

body.page-chat .chat-ai-sla-copy span {
  color: #f8fff9;
  font-size: 13px;
  font-weight: 800;
}

body.page-chat .chat-ai-sla-copy strong {
  color: #20df83;
}

body.page-chat .chat-ai-priority {
  color: #ffbc42;
}

body.page-chat .chat-ai-hints {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

body.page-chat .chat-ai-hints button {
  width: 100%;
  min-height: 44px;
  justify-content: space-between;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
}

body.page-chat .chat-ai-hints strong,
body.page-chat .chat-ai-card-title-row a {
  color: #20df83;
  text-decoration: none;
  font-weight: 900;
}

body.page-chat .chat-ai-client {
  margin: 14px 0 0;
  display: grid;
  grid-template-columns: minmax(90px, auto) minmax(0, 1fr);
  gap: 10px 16px;
}

body.page-chat .chat-ai-client dd {
  margin: 0;
  color: rgba(236, 247, 241, 0.86);
  text-align: right;
  font-size: 12px;
}

@media (max-width: 1500px) {
  body.page-chat .chat-workbench-contact-center {
    grid-template-columns: 320px minmax(480px, 1fr) 360px;
  }
}

@media (max-width: 1240px) {
  body.page-chat .chat-workbench-contact-center {
    grid-template-columns: 320px minmax(0, 1fr);
    grid-template-areas:
      "roster stage"
      "ai ai";
    height: auto;
    max-height: none;
    min-height: calc(100vh - 76px);
    overflow: visible;
  }

  body.page-chat .chat-ai-sidebar {
    height: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }
}

@media (max-width: 1500px) {
  body.page-deals .b24-deals-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.page-deals .b24-deals-toolbar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  body.page-deals .b24-deals-topline {
    grid-template-columns: 1fr;
  }

  body.page-deals .b24-deals-metrics,
  body.page-deals .b24-deals-toolbar {
    grid-template-columns: 1fr;
  }

  body.page-deals .b24-board-scroll {
    grid-auto-columns: minmax(240px, 84vw);
  }

  body.page-deals .b24-droptray {
    left: 14px;
    right: 14px;
    bottom: 14px;
  }

  body.page-deals .b24-droptray-inner {
    grid-template-columns: 1fr;
  }
}
