@font-face {
  font-family: "Neue Montreal";
  src: url("assets/fonts/NeueMontreal-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Neue Montreal";
  src: url("assets/fonts/NeueMontreal-Medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Neue Montreal";
  src: url("assets/fonts/NeueMontreal-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #19191a;
  --muted: #727277;
  --subtle: #9c9ca2;
  --line: #e8e7e5;
  --soft-line: #f0efed;
  --surface: #ffffff;
  --canvas: #f7f7f5;
  --soft: #f3f2f0;
  --purple: #5e17eb;
  --purple-dark: #4610b6;
  --purple-soft: #f0eaff;
  --purple-wash: #f8f5ff;
  --green: #0f9f6e;
  --green-soft: #eaf8f2;
  --amber: #c77a14;
  --amber-soft: #fff5df;
  --red: #d64545;
  --red-soft: #fff0ef;
  --blue: #3270dd;
  --blue-soft: #edf4ff;
  --radius: 16px;
  --radius-sm: 11px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;
  --shadow: 0 1px 2px rgba(16, 16, 18, 0.04), 0 12px 36px rgba(24, 19, 34, 0.055);
  --shadow-lg: 0 24px 70px rgba(25, 18, 41, 0.16);
}

* { box-sizing: border-box; }

html { max-width: 100%; overflow-x: hidden; font-size: 16px; }

body {
  max-width: 100%;
  overflow-x: hidden;
  margin: 0;
  font-family: "Neue Montreal", Inter, system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
button { color: inherit; }
a { color: inherit; }
.push-right { margin-left: auto; }
.section-action { margin-top: var(--space-3); }
.panel-content-start { padding: var(--space-5) 0 0; }

::selection { background: #ded0ff; }

.modern-date-field { position: relative; width: 100%; }
.modern-date-field > input[type="date"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.modern-date-button {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.modern-date-button span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modern-date-button .icon:first-child { color: var(--purple); }
.modern-date-button .icon:last-child { width: 13px; color: var(--subtle); }
.modern-date-button:hover { border-color: #cfccd4; background: #fdfdfd; }
.modern-date-button:focus-visible { outline: none; border-color: var(--purple); box-shadow: 0 0 0 4px rgba(94, 23, 235, .11); }
.modern-date-button:disabled { opacity: .48; cursor: not-allowed; background: var(--soft); }

.date-picker-popover {
  position: fixed;
  z-index: 150;
  padding: 18px;
  border: 1px solid rgba(20, 18, 26, .09);
  border-radius: 22px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 28px 80px rgba(22, 17, 33, .20), 0 4px 16px rgba(22, 17, 33, .08);
  backdrop-filter: blur(24px) saturate(1.2);
  animation: date-picker-in .16s cubic-bezier(.2, .8, .2, 1);
}
@keyframes date-picker-in { from { opacity: 0; transform: translateY(-5px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
.date-picker-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 17px; }
.date-picker-top > div:first-child { display: grid; gap: 3px; }
.date-picker-top span { color: var(--subtle); font-size: 10px; letter-spacing: .07em; text-transform: uppercase; }
.date-picker-top strong { font-size: 19px; font-weight: 600; text-transform: capitalize; }
.date-picker-nav { display: flex; gap: 5px; }
.date-picker-nav button {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: var(--soft);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.date-picker-nav button .icon { transform: none; }
.date-picker-nav button:hover { background: var(--purple-soft); color: var(--purple); }
.date-picker-weekdays, .date-picker-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.date-picker-weekdays { margin-bottom: 6px; }
.date-picker-weekdays span { height: 25px; display: grid; place-items: center; color: var(--subtle); font-size: 10px; font-weight: 500; }
.date-picker-day {
  aspect-ratio: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  cursor: pointer;
  position: relative;
  transition: background .13s ease, color .13s ease, transform .13s ease;
}
.date-picker-day:hover { background: var(--purple-soft); color: var(--purple); transform: scale(1.05); }
.date-picker-day.outside { color: #c3c1c6; }
.date-picker-day.today:not(.selected) { color: var(--purple); font-weight: 600; }
.date-picker-day.today:not(.selected)::after { content: ""; position: absolute; left: 50%; bottom: 4px; width: 3px; height: 3px; margin-left: -1.5px; border-radius: 50%; background: currentColor; }
.date-picker-day.selected { background: var(--purple); color: #fff; font-weight: 600; box-shadow: 0 6px 16px rgba(94, 23, 235, .27); }
.date-picker-day:disabled { opacity: .25; cursor: not-allowed; transform: none; }
.date-picker-footer { min-height: 38px; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: 11px; padding-top: 11px; border-top: 1px solid var(--soft-line); }
.date-picker-footer button { min-height: 32px; padding: 0 12px; border: 0; border-radius: 9px; font-size: 12px; font-weight: 500; cursor: pointer; }
.date-picker-clear { background: transparent; color: var(--muted); }
.date-picker-today { margin-left: auto; background: var(--purple-soft); color: var(--purple); }
.date-picker-footer button:hover { filter: brightness(.97); }

@media (max-width: 520px) {
  .date-picker-popover { left: 12px !important; right: 12px; width: auto !important; padding: 16px; border-radius: 20px; }
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.app-shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  z-index: 40;
  inset: 0 auto 0 0;
  width: 246px;
  padding: 20px 15px 16px;
  background: rgba(251, 251, 250, 0.94);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
}

.brand {
  height: 44px;
  display: flex;
  align-items: center;
  padding: 0 9px;
  gap: 10px;
  margin-bottom: 19px;
}

.brand img { width: 128px; height: auto; display: block; }
.os-label { padding-left: 10px; border-left: 1px solid #d4d2cf; color: var(--subtle); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }

.nav-label {
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--subtle);
  padding: 0 12px;
  margin: 13px 0 7px;
}

.nav-list { display: grid; gap: 3px; }
.nav-button {
  width: 100%;
  height: 41px;
  padding: 0 11px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #65656a;
  display: flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  text-align: left;
  transition: .18s ease;
}

.nav-button:hover { color: var(--ink); background: #f0efed; }
.nav-button.active { color: var(--purple); background: var(--purple-soft); font-weight: 500; }
.nav-button .badge-count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: grid; place-items: center; font-size: 11px; background: #eceae7; color: #6d6d72; }
.nav-button.active .badge-count { background: #ded1ff; color: var(--purple); }

.sidebar-bottom { margin-top: auto; }
.workspace-chip { margin: 9px 3px 0; border-top: 1px solid var(--line); padding: 15px 8px 0; display: flex; align-items: center; gap: 10px; }
.workspace-chip > div:nth-child(2) { min-width: 0; }
.logout-button { margin-left: auto; width: 30px; height: 30px; color: var(--muted); }
.avatar { width: 34px; height: 34px; border-radius: 50%; color: white; background: var(--ink); display: grid; place-items: center; font-size: 12px; font-weight: 500; flex: 0 0 auto; }
.avatar.purple { background: var(--purple); }
.avatar.has-image { overflow: hidden; background: var(--soft); }
.avatar.has-image img { width: 100%; height: 100%; display: block; object-fit: cover; }
.workspace-chip strong { display: block; font-size: 13px; font-weight: 500; }
.workspace-chip span { color: var(--subtle); font-size: 11px; }

.main { min-height: 100vh; margin-left: 246px; }

.topbar {
  height: 72px;
  padding: 0 clamp(22px, 3vw, 46px);
  display: flex;
  align-items: center;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(247, 247, 245, .82);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(232,231,229,.74);
}

.mobile-menu { display: none !important; }
.breadcrumbs { font-size: 13px; color: var(--subtle); }
.breadcrumbs b { color: var(--ink); font-weight: 500; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.sync-badge { padding: 6px 9px; border-radius: 99px; background: var(--soft); color: var(--subtle); font-size: 9px; white-space: nowrap; }
.sync-badge.cloud { background: var(--green-soft); color: var(--green); }
.sync-badge.syncing { background: var(--amber-soft); color: var(--amber); }
.sync-badge.conflict { background: var(--red-soft); color: var(--red); }
.filter-note { margin-left: auto; color: var(--subtle); font-size: 10px; }

.search-trigger {
  width: min(350px, 31vw);
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.86);
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--subtle);
  cursor: pointer;
  transition: .2s;
}
.search-trigger:hover { border-color: #d5d3d0; box-shadow: 0 2px 10px rgba(0,0,0,.04); }
.search-trigger span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; }
.key { margin-left: auto; padding: 2px 7px; background: #f4f3f1; border: 1px solid var(--line); border-radius: 6px; font-size: 10px; color: #8b8b90; }

.icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.86);
  display: grid;
  place-items: center;
  cursor: pointer;
  position: relative;
  transition: .18s;
}
.icon-button:hover { background: white; border-color: #d3d1ce; transform: translateY(-1px); }
.status-dot { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--purple); border: 2px solid white; top: 7px; right: 7px; }

.content { padding: 36px clamp(22px, 3vw, 46px) 64px; max-width: 1620px; margin: 0 auto; }
.page-enter { animation: none; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-6); margin-bottom: var(--space-7); }
.eyebrow { margin: 0 0 8px; color: var(--purple); font-size: 11px; font-weight: 500; letter-spacing: .11em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(27px, 3vw, 38px); letter-spacing: -.036em; line-height: 1.1; font-weight: 500; }
.page-subtitle { margin: 9px 0 0; color: var(--muted); font-size: 14px; max-width: 650px; line-height: 1.5; }
.page-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; justify-content: flex-end; }

.btn { min-height: 39px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: white; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; font-weight: 500; font-size: 13px; transition: .18s ease; }
.btn:hover { transform: translateY(-1px); border-color: #d3d1ce; box-shadow: 0 4px 14px rgba(20,20,22,.06); }
.btn:disabled { opacity: .55; cursor: wait; transform: none; }
.btn.primary { color: white; background: var(--purple); border-color: var(--purple); }
.btn.primary:hover { background: var(--purple-dark); border-color: var(--purple-dark); box-shadow: 0 6px 18px rgba(94,23,235,.22); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.danger { color: var(--red); background: var(--red-soft); border-color: transparent; }
.btn.small { min-height: 31px; padding: 0 10px; font-size: 12px; }
.btn.icon-only { width: 39px; padding: 0; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); margin-bottom: var(--space-4); }
.metric-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-5); min-height: 128px; box-shadow: 0 1px 1px rgba(0,0,0,.012); transition: .2s; }
.metric-card:hover { border-color: #d9d6d3; transform: translateY(-2px); box-shadow: var(--shadow); }
.metric-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; color: var(--muted); font-size: 12px; }
.metric-icon { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--soft); color: #77767b; }
.metric-icon.purple { color: var(--purple); background: var(--purple-soft); }
.metric-icon.green { color: var(--green); background: var(--green-soft); }
.metric-icon.red { color: var(--red); background: var(--red-soft); }
.metric-value { margin-top: 16px; font-size: 27px; letter-spacing: -.025em; font-weight: 500; }
.metric-foot { margin-top: 7px; font-size: 11px; color: var(--subtle); display: flex; gap: 6px; align-items: center; }
.trend-up { color: var(--green); }
.trend-down { color: var(--red); }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.58fr) minmax(320px, .82fr); gap: var(--space-4); margin-bottom: var(--space-4); }
.dashboard-insights-grid { display: grid; grid-template-columns: minmax(280px,.9fr) minmax(360px,1.15fr) minmax(290px,.9fr); gap: var(--space-4); margin-bottom: var(--space-4); align-items: stretch; }
.split-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: var(--space-4); margin-bottom: var(--space-4); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 1px 1px rgba(0,0,0,.012); min-width: 0; }
.panel-pad { padding: var(--space-5); }
.panel-head { min-height: 64px; padding: 0 var(--space-5); display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); border-bottom: 1px solid var(--soft-line); }
.panel-title { font-size: 14px; font-weight: 500; }
.panel-meta { color: var(--subtle); font-size: 11px; }
.panel-actions { display: flex; gap: 7px; }

.chart-wrap { padding: 22px 20px 15px; }
.chart-summary { display: flex; align-items: flex-end; gap: 10px; margin-bottom: 17px; }
.chart-summary strong { font-size: 25px; font-weight: 500; letter-spacing: -.02em; }
.chart-summary span { color: var(--green); font-size: 11px; margin-bottom: 4px; }
.line-chart { width: 100%; height: 165px; overflow: visible; }
.line-chart .gridline { stroke: #eeece9; stroke-width: 1; }
.line-chart .area { fill: url(#areaFill); }
.line-chart .line { fill: none; stroke: var(--purple); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.line-chart .point { fill: white; stroke: var(--purple); stroke-width: 2; }
.chart-labels { display: flex; justify-content: space-between; color: var(--subtle); font-size: 10px; margin-top: 6px; }

.list { display: grid; }
.list-row { padding: 13px 20px; min-height: 62px; display: flex; align-items: center; gap: 11px; border-bottom: 1px solid var(--soft-line); }
.list-row:last-child { border-bottom: 0; }
.list-row.clickable { cursor: pointer; }
.list-row.clickable:hover { background: #faf9f8; }
.row-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--soft); color: var(--muted); }
.row-main { min-width: 0; flex: 1; }
.row-main strong { display: block; font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-main span { display: block; color: var(--subtle); font-size: 11px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-side { margin-left: auto; text-align: right; }
.row-side strong { display: block; font-size: 12px; font-weight: 500; }
.row-side span { display: block; font-size: 10px; color: var(--subtle); margin-top: 4px; }

.status, .tag { display: inline-flex; align-items: center; gap: 6px; width: max-content; max-width: 100%; }
.status { padding: 5px 8px; border-radius: 7px; font-size: 11px; font-weight: 500; background: var(--soft); color: #66666b; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #9b9ba0; }
.status.purple { background: var(--purple-soft); color: var(--purple); }
.status.purple::before { background: var(--purple); }
.status.green { background: var(--green-soft); color: var(--green); }
.status.green::before { background: var(--green); }
.status.red { background: var(--red-soft); color: var(--red); }
.status.red::before { background: var(--red); }
.status.amber { background: var(--amber-soft); color: var(--amber); }
.status.amber::before { background: var(--amber); }
.status.blue { background: var(--blue-soft); color: var(--blue); }
.status.blue::before { background: var(--blue); }
.tag { padding: 4px 7px; border-radius: 6px; font-size: 10px; color: var(--muted); background: var(--soft); }
.tag.purple { color: var(--purple); background: var(--purple-soft); }

.progress { height: 5px; background: #eeecea; border-radius: 99px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--purple); border-radius: inherit; }

.pipeline-mini { padding: 20px; display: grid; gap: 15px; }
.pipeline-mini.panel-content-start { padding: var(--space-5) 0 0; }
.pipeline-mini-row { display: grid; grid-template-columns: 130px 1fr 58px; gap: 12px; align-items: center; }
.pipeline-mini-row label { color: var(--muted); font-size: 11px; }
.pipeline-mini-row strong { font-size: 11px; font-weight: 500; text-align: right; }
.bar { height: 7px; background: #f0efed; border-radius: 99px; overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: inherit; background: var(--purple); }

.practice-widget { min-height: 228px; padding: 20px; display: grid; grid-template-columns: 138px minmax(0,1fr); align-items: center; gap: 20px; }
.donut-chart { width: 138px; aspect-ratio: 1; border-radius: 50%; background: var(--donut); display: grid; place-items: center; position: relative; }
.donut-chart::after { content: ""; position: absolute; inset: 24px; border-radius: 50%; background: white; box-shadow: 0 0 0 1px rgba(0,0,0,.025); }
.donut-chart > div { position: relative; z-index: 1; text-align: center; }
.donut-chart strong { display: block; font-size: 27px; font-weight: 500; line-height: 1; }
.donut-chart span { display: block; margin-top: 5px; color: var(--subtle); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.donut-legend { display: grid; gap: 11px; }
.donut-legend > div { display: grid; grid-template-columns: 8px minmax(0,1fr) auto auto; align-items: center; gap: 8px; min-width: 0; }
.donut-legend i { width: 8px; height: 8px; border-radius: 50%; }
.donut-legend span { min-width: 0; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.donut-legend strong { font-size: 11px; font-weight: 500; }
.donut-legend small { min-width: 20px; color: var(--subtle); font-size: 9px; text-align: right; }
.month-compare { min-height: 228px; padding: 15px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.month-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #faf9f8; }
.month-card.current { border-color: #ddcffb; background: var(--purple-wash); }
.month-card-head { min-height: 42px; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--soft-line); }
.month-card-head strong { font-size: 12px; font-weight: 500; text-transform: capitalize; }
.month-card-head span { padding: 3px 6px; border-radius: 6px; color: var(--purple); background: var(--purple-soft); font-size: 8px; text-transform: uppercase; letter-spacing: .05em; }
.month-card:not(.current) .month-card-head span { color: var(--subtle); background: var(--soft); }
.month-stat { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--soft-line); }
.month-stat:last-child { border-bottom: 0; }
.month-stat span { color: var(--subtle); font-size: 10px; }
.month-stat strong { font-size: 13px; font-weight: 500; }
.focus-more { padding: 11px 15px; border-top: 1px solid var(--soft-line); color: var(--purple); background: var(--purple-wash); font-size: 10px; font-weight: 500; text-align: center; }

.toolbar { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); flex-wrap: wrap; }
.crm-owner-tabs { display: flex; gap: 8px; margin: 2px 0 14px; overflow-x: auto; padding-bottom: 2px; }
.owner-tab { min-width: max-content; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--muted); display: inline-flex; align-items: center; gap: 9px; cursor: pointer; transition: .18s; }
.owner-tab span { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 8px; background: var(--soft); display: grid; place-items: center; font-size: 10px; }
.owner-tab:hover { color: var(--ink); border-color: #d4d1ce; }
.owner-tab.active { color: var(--purple); border-color: #d6c6fa; background: var(--purple-soft); font-weight: 500; }
.owner-tab.active span { background: white; }
.toolbar-search { min-width: 250px; flex: 1; max-width: 430px; position: relative; }
.toolbar-search .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--subtle); pointer-events: none; }
.input, .select, .textarea { width: 100%; border: 1px solid var(--line); background: white; border-radius: 10px; color: var(--ink); outline: none; transition: .18s; }
.input, .select { height: 40px; padding: 0 12px; }
.toolbar-search .input { padding-left: 39px; }
.textarea { min-height: 95px; resize: vertical; padding: 11px 12px; line-height: 1.45; }
.input:focus, .select:focus, .textarea:focus { border-color: rgba(94,23,235,.55); box-shadow: 0 0 0 3px rgba(94,23,235,.09); }
.select { width: auto; min-width: 145px; cursor: pointer; }
.view-toggle { display: flex; border: 1px solid var(--line); background: white; border-radius: 10px; overflow: hidden; margin-left: auto; }
.view-toggle button { height: 38px; width: 40px; border: 0; border-right: 1px solid var(--line); display: grid; place-items: center; background: white; color: var(--subtle); cursor: pointer; }
.view-toggle button:last-child { border-right: 0; }
.view-toggle button.active { color: var(--purple); background: var(--purple-soft); }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 820px; }
.data-table th { height: 43px; padding: 0 15px; text-align: left; color: var(--subtle); font-size: 10px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; background: #fbfbfa; border-bottom: 1px solid var(--line); }
.data-table td { height: 66px; padding: 0 15px; border-bottom: 1px solid var(--soft-line); font-size: 12px; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr { cursor: pointer; transition: .15s; }
.data-table tbody tr:hover { background: #faf9f8; }
.crm-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 5px; white-space: nowrap; }
.crm-followup-quick { color: var(--purple); }
.name-cell { display: flex; align-items: center; gap: 10px; }
.name-cell .avatar { width: 30px; height: 30px; font-size: 10px; }
.name-cell strong { display: block; font-weight: 500; }
.name-cell span { display: block; margin-top: 3px; font-size: 10px; color: var(--subtle); }
.overdue { color: var(--red); }
.due-today { color: var(--amber); }

.kanban-wrap { overflow-x: auto; padding-bottom: 12px; }
.kanban { min-width: max-content; display: flex; gap: 12px; align-items: flex-start; }
.kanban-column { width: 285px; background: #f1f0ee; border-radius: 14px; padding: 10px; min-height: 445px; }
.kanban-column.drag-over { outline: 2px dashed rgba(94,23,235,.38); outline-offset: -3px; background: var(--purple-wash); }
.kanban-head { height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 3px 7px; }
.kanban-head strong { font-size: 12px; font-weight: 500; }
.kanban-head span { width: 21px; height: 21px; border-radius: 8px; background: white; display: grid; place-items: center; color: var(--subtle); font-size: 10px; }
.kanban-value { margin-left: auto; color: var(--subtle); font-size: 10px; }
.kanban-cards { display: grid; gap: 8px; }
.kanban-card { display: flex; flex-direction: column; gap: 12px; background: white; border: 1px solid #e5e3e0; border-radius: 12px; padding: 14px; box-shadow: 0 1px 2px rgba(0,0,0,.025); cursor: grab; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.kanban-card:hover { border-color: #d2cfcc; transform: translateY(-1px); box-shadow: 0 7px 18px rgba(28,25,31,.06); }
.kanban-card.dragging { opacity: .45; }
.kanban-card-title { font-size: 13px; font-weight: 500; line-height: 1.35; }
.card-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.kanban-card-meta { display: flex; align-items: center; gap: 8px; color: var(--subtle); font-size: 10px; }
.kanban-card-meta .task-due { display: inline-flex; align-items: center; gap: 5px; line-height: 1; white-space: nowrap; }
.kanban-card-meta .task-due .icon { display: block; flex: 0 0 auto; }
.kanban-card-meta .value { margin-left: auto; color: var(--ink); font-size: 12px; font-weight: 500; }
.kanban-card .progress { margin: 11px 0 10px; }
.priority-dot { width: 7px; height: 7px; border-radius: 50%; background: #a3a3a7; }
.priority-dot.high { background: var(--red); }
.priority-dot.medium { background: var(--amber); }
.priority-dot.low { background: var(--green); }

.client-grid, .project-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: var(--space-4); }
.entity-card { border: 1px solid var(--line); background: white; border-radius: var(--radius); padding: var(--space-5); transition: .2s; cursor: pointer; }
.entity-card:hover { border-color: #d5d2cf; transform: translateY(-2px); box-shadow: var(--shadow); }
.entity-head { display: flex; align-items: flex-start; gap: 11px; }
.entity-logo { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--purple-soft); color: var(--purple); font-size: 12px; font-weight: 700; }
.entity-title { min-width: 0; flex: 1; }
.entity-title strong { font-weight: 500; font-size: 14px; display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.entity-title span { color: var(--subtle); font-size: 11px; display: block; margin-top: 4px; }
.entity-stats { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; margin: 17px 0; padding: 14px 0; border-top: 1px solid var(--soft-line); border-bottom: 1px solid var(--soft-line); }
.entity-stat span { display: block; font-size: 10px; color: var(--subtle); }
.entity-stat strong { display: block; font-size: 13px; font-weight: 500; margin-top: 5px; }
.entity-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--subtle); font-size: 10px; }

.project-card .progress { margin-top: 16px; }
.project-card .progress-label { display: flex; justify-content: space-between; margin-top: 8px; color: var(--subtle); font-size: 10px; }
.project-card .current-task { padding: 12px; background: #faf9f8; border-radius: 10px; margin-top: 15px; }
.project-card .current-task span { display: block; color: var(--subtle); font-size: 9px; letter-spacing: .06em; text-transform: uppercase; }
.project-card .current-task strong { display: block; font-size: 12px; font-weight: 500; margin-top: 6px; }
.project-card .project-next-step { align-items: flex-start; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--soft-line); }
.project-card .project-next-step strong { max-width: 62%; color: var(--ink); font-size: 10px; font-weight: 500; line-height: 1.35; text-align: right; }
.empty-state { grid-column: 1 / -1; min-height: 180px; padding: 32px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 10px; }
.empty-state strong { font-size: 16px; }
.empty-state span { max-width: 560px; color: var(--subtle); line-height: 1.5; }

.empty { padding: 46px 25px; display: grid; place-items: center; text-align: center; }
.empty-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: var(--purple-soft); color: var(--purple); margin-bottom: 13px; }
.empty strong { font-size: 14px; font-weight: 500; }
.empty p { margin: 7px 0 16px; font-size: 12px; color: var(--subtle); max-width: 310px; line-height: 1.45; }

.goal-list { display: grid; gap: 12px; }
.goal-card { padding: 17px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.goal-card.clickable { cursor: pointer; transition: .18s; }
.goal-card.clickable:hover { border-color: #d2cfcc; transform: translateY(-1px); box-shadow: var(--shadow); }
.goal-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.goal-top strong { font-size: 13px; font-weight: 500; }
.goal-value { font-size: 12px; color: var(--purple); }
.goal-card p { color: var(--subtle); font-size: 11px; margin: 7px 0 14px; }


.calendar-connect-banner { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 17px; margin-bottom: 15px; border: 1px solid #eadffc; border-radius: 13px; background: var(--purple-soft); }
.calendar-connect-banner > div { display: flex; align-items: center; gap: 11px; color: var(--purple); }
.calendar-connect-banner strong, .calendar-connect-banner span { display: block; }
.calendar-connect-banner strong { font-size: 12px; font-weight: 500; }
.calendar-connect-banner span { margin-top: 4px; color: var(--purple-dark); font-size: 10px; }
.google-calendar-layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 15px; align-items: start; }
.google-calendar-panel { overflow: hidden; }
.google-calendar-head { min-height: 72px; padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--soft-line); }
.google-calendar-head h2 { margin: 0; font-size: 18px; font-weight: 500; text-transform: capitalize; }
.google-calendar-head span:not(.status) { display: block; margin-top: 5px; color: var(--subtle); font-size: 10px; }
.google-calendar-weekdays, .google-calendar-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); }
.google-calendar-weekdays { padding: 0 8px; border-bottom: 1px solid var(--soft-line); background: #fbfaf9; }
.google-calendar-weekdays span { padding: 10px 8px; color: var(--subtle); font-size: 9px; font-weight: 500; text-transform: uppercase; }
.google-calendar-grid { padding: 0 8px 8px; }
.google-calendar-day { min-height: 125px; padding: 8px; border-right: 1px solid var(--soft-line); border-bottom: 1px solid var(--soft-line); background: white; overflow: hidden; }
.google-calendar-day:nth-child(7n) { border-right: 0; }
.google-calendar-day.outside { background: #fbfaf9; }
.google-calendar-date { min-height: 23px; display: flex; align-items: center; justify-content: space-between; }
.google-calendar-date > span { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 50%; font-size: 10px; }
.google-calendar-day.outside .google-calendar-date > span { color: #bbb7b2; }
.google-calendar-day.today .google-calendar-date > span { background: var(--purple); color: white; }
.google-calendar-date small { color: var(--purple); font-size: 8px; }
.google-calendar-events { display: grid; gap: 4px; margin-top: 4px; }
.google-calendar-event { width: 100%; min-width: 0; padding: 5px 6px; border: 0; border-radius: 6px; background: #f1f6ff; color: #315f9f; cursor: pointer; display: grid; grid-template-columns: 5px auto minmax(0,1fr); align-items: center; gap: 4px; text-align: left; }
.google-calendar-event:hover { background: #e6efff; }
.google-calendar-event i { width: 5px; height: 5px; border-radius: 50%; background: #4285f4; }
.google-calendar-event span { font-size: 8px; white-space: nowrap; }
.google-calendar-event strong { overflow: hidden; font-size: 8px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.google-calendar-more { padding: 3px 6px; color: var(--subtle); font-size: 8px; }
.google-calendar-upcoming { overflow: hidden; }
.google-upcoming-list { display: grid; }
.google-upcoming-list > button { width: 100%; padding: 12px 14px; border: 0; border-top: 1px solid var(--soft-line); background: white; display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 10px; text-align: left; cursor: pointer; }
.google-upcoming-list > button:hover { background: #fbfafc; }
.google-upcoming-date { width: 38px; height: 42px; border-radius: 9px; background: var(--purple-soft); color: var(--purple); display: grid; place-content: center; text-align: center; }
.google-upcoming-date strong, .google-upcoming-date small, .google-upcoming-list > button > span:nth-child(2) strong, .google-upcoming-list > button > span:nth-child(2) small { display: block; }
.google-upcoming-date strong { font-size: 14px; font-weight: 500; line-height: 1; }
.google-upcoming-date small { margin-top: 3px; font-size: 8px; text-transform: uppercase; }
.google-upcoming-list > button > span:nth-child(2) strong { font-size: 11px; font-weight: 500; }
.google-upcoming-list > button > span:nth-child(2) small { margin-top: 4px; color: var(--subtle); font-size: 9px; line-height: 1.35; }

.settings-grid { display: grid; grid-template-columns: 220px minmax(0,1fr); gap: var(--space-4); }
.settings-nav { padding: var(--space-2); height: max-content; }
.settings-nav button { width: 100%; height: 39px; border: 0; border-radius: 9px; background: transparent; display: flex; align-items: center; gap: 9px; color: var(--muted); padding: 0 10px; cursor: pointer; font-size: 12px; }
.settings-nav button.active { color: var(--purple); background: var(--purple-soft); font-weight: 500; }
.settings-section { padding: var(--space-6); }
.settings-form-actions { display: flex; justify-content: flex-end; margin-top: var(--space-6); padding-top: var(--space-5); border-top: 1px solid var(--line); }
.settings-section h2 { margin: 0; font-size: 18px; font-weight: 500; }
.settings-section > p { margin: var(--space-2) 0 28px; color: var(--subtle); font-size: 12px; line-height: 1.45; }
.settings-section > form { margin: 0; }
.settings-note { margin-top: var(--space-6); }
.settings-alert { margin: var(--space-4) 0 0; }
.profile-editor { border-top: 1px solid var(--soft-line); }
.profile-row { min-height: 96px; padding: var(--space-4) 0; border-bottom: 1px solid var(--soft-line); display: grid; grid-template-columns: minmax(150px,auto) minmax(190px,1fr) minmax(185px,auto) auto; align-items: center; gap: var(--space-3); }
.profile-row .field { min-width: 0; }
.profile-photo-editor { min-width: 0; display: flex; align-items: center; gap: var(--space-2); }
.profile-photo-editor .avatar { width: 46px; height: 46px; }
.profile-image-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.profile-photo-actions { display: grid; justify-items: start; gap: 2px; }
.profile-photo-actions .btn { min-height: 27px; padding: 0 7px; font-size: 10px; }
.profile-login strong, .profile-login span { display: block; }
.profile-login strong { font-size: 11px; font-weight: 500; }
.profile-login span { margin-top: 4px; color: var(--subtle); font-size: 10px; }
.setting-row { min-height: 68px; padding: var(--space-4) 0; border-top: 1px solid var(--soft-line); display: flex; align-items: center; gap: var(--space-4); }
.setting-copy { flex: 1; }
.setting-copy strong { display: block; font-size: 12px; font-weight: 500; }
.setting-copy span { display: block; font-size: 10px; color: var(--subtle); margin-top: 4px; }
.integration-card { min-height: 82px; padding: var(--space-4) 0; border-top: 1px solid var(--soft-line); display: flex; align-items: center; gap: var(--space-3); }
.integration-actions { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-2); flex-wrap: wrap; }
.integration-logo { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: 0 0 auto; }
.integration-logo.google { color: #4285f4; background: #f1f5ff; font-size: 18px; }
.integration-copy { flex: 1; min-width: 0; }
.integration-copy strong { display: block; font-size: 12px; font-weight: 500; }
.integration-copy span { display: block; color: var(--subtle); font-size: 10px; margin-top: 5px; }
.calendar-privacy-note { display: flex; gap: var(--space-3); padding: var(--space-4); margin-top: var(--space-4); border-radius: 12px; background: #f2faf6; color: #16794b; }
.calendar-privacy-note strong, .calendar-privacy-note span { display: block; }
.calendar-privacy-note strong { font-size: 11px; font-weight: 500; }
.calendar-privacy-note span { margin-top: 4px; color: #47705d; font-size: 10px; line-height: 1.45; }
.calendar-appointment { display: flex; align-items: flex-start; gap: 9px; min-width: 0; padding: 10px 11px; border: 1px solid #e3ecfb; border-radius: 9px; background: #f5f8fd; color: #2f64b5; }
.calendar-appointment > .icon { flex: 0 0 auto; margin-top: 1px; }
.calendar-appointment > div { min-width: 0; }
.calendar-appointment strong, .calendar-appointment span { display: block; }
.calendar-appointment strong { font-size: 10px; font-weight: 500; line-height: 1.35; }
.calendar-appointment span { margin-top: 4px; overflow: hidden; color: #657892; font-size: 9px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.calendar-appointment-button { width: 100%; font: inherit; text-align: left; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.calendar-appointment-button:hover { border-color: #c9d9f2; background: #eef4fc; }
.calendar-match-section { margin-bottom: var(--space-6); padding: var(--space-4); border: 1px solid var(--line); border-radius: 14px; background: var(--purple-wash); }
.calendar-match-section .section-title-row { margin-bottom: var(--space-3); }
.calendar-match-section .section-title-row h3 { margin: 0; }
.calendar-match-list { display: grid; gap: 7px; }
.calendar-match-list > button { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); display: grid; grid-template-columns: minmax(145px,.85fr) minmax(0,1fr); gap: 5px 12px; cursor: pointer; text-align: left; transition: border-color .15s ease, transform .15s ease; }
.calendar-match-list > button:hover { border-color: #cfc4ed; transform: translateY(-1px); }
.calendar-match-list > button > span:nth-child(2) { overflow: hidden; font-size: 11px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.calendar-match-list > button > small { grid-column: 2; color: var(--subtle); font-size: 9px; }
.calendar-match-date { display: flex; align-items: center; gap: 7px; color: var(--purple); }
.calendar-match-date strong { color: var(--ink); font-size: 10px; font-weight: 500; }
.calendar-match-more { padding: 10px 3px 0; color: var(--subtle); font-size: 9px; }
.pipeline-date-note > span { min-height: 40px; display: flex; align-items: center; gap: 7px; color: var(--subtle); font-size: 10px; }
.kanban-card.stale-deal { border-color: #ead7d3; }
.drawer-body > form { margin: 0; }
.drawer-body > form > .detail-section { margin-bottom: 0; }
.drawer-body > .activity-section { margin: 36px 0 4px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #faf9f7; }
.activity-section .section-title-row { min-height: 24px; align-items: center; }
.activity-section .section-title-row h3 { margin: 0; }
.activity-timeline { position: relative; display: grid; gap: 0; margin-top: 16px; }
.activity-entry { position: relative; display: grid; grid-template-columns: 12px minmax(0,1fr); gap: 10px; padding: 0 0 16px; }
.activity-entry:last-child { padding-bottom: 0; }
.activity-entry:not(:last-child)::before { content: ""; position: absolute; left: 5px; top: 10px; bottom: -2px; width: 1px; background: #e6e3df; }
.activity-dot { position: relative; z-index: 1; width: 11px; height: 11px; margin-top: 2px; border: 3px solid white; border-radius: 50%; background: #b7b2ab; box-shadow: 0 0 0 1px #d8d4cf; }
.activity-dot.purple { background: var(--purple); box-shadow: 0 0 0 1px #c9b6f6; }
.activity-dot.green { background: var(--green); box-shadow: 0 0 0 1px #a9dfcb; }
.activity-entry strong, .activity-entry span { display: block; }
.activity-entry strong { font-size: 10px; font-weight: 500; line-height: 1.4; }
.activity-entry span { margin-top: 3px; color: var(--subtle); font-size: 9px; }
.trash-section { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.trash-section .section-title-row { align-items: flex-start; }
.trash-section h3 { margin: 0; }
.trash-section p { margin: 4px 0 0; color: var(--subtle); font-size: 10px; }
.trash-list { display: grid; gap: 8px; margin-top: 14px; }
.trash-item { display: grid; grid-template-columns: 32px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.trash-item strong, .trash-item span { display: block; }
.trash-item strong { font-size: 10px; font-weight: 500; }
.trash-item span { margin-top: 3px; color: var(--subtle); font-size: 9px; }
.toggle { width: 39px; height: 23px; border-radius: 99px; background: #d7d5d2; padding: 3px; cursor: pointer; transition: .2s; }
.toggle::after { content: ""; display: block; width: 17px; height: 17px; border-radius: 50%; background: white; box-shadow: 0 1px 3px rgba(0,0,0,.15); transition: .2s; }
.toggle.on { background: var(--purple); }
.toggle.on::after { transform: translateX(16px); }

.overlay { position: fixed; z-index: 100; inset: 0; background: rgba(18,17,20,.28); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 20px; animation: fade .1s ease-out both; }
@keyframes fade { from { opacity: .88; } }
.modal { width: min(590px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: white; border: 1px solid rgba(255,255,255,.7); border-radius: 18px; box-shadow: var(--shadow-lg); animation: fade .1s ease-out both; }
.modal-head { padding: var(--space-5) 22px var(--space-4); display: flex; align-items: flex-start; gap: var(--space-4); border-bottom: 1px solid var(--soft-line); }
.modal-head h2 { margin: 0; font-size: 17px; font-weight: 500; }
.modal-head p { margin: 5px 0 0; color: var(--subtle); font-size: 11px; }
.modal-head .icon-button { margin-left: auto; }
.modal-body { padding: 22px; }
.modal-foot { padding: var(--space-4) 22px; border-top: 1px solid var(--soft-line); display: flex; justify-content: flex-end; gap: var(--space-2); }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: var(--space-4); row-gap: 18px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 11px; color: var(--muted); }
.field .checkbox-option { display: flex; align-items: center; gap: 7px; width: fit-content; color: var(--ink); cursor: pointer; }
.checkbox-option input { accent-color: var(--purple); }
.optional { color: var(--subtle); font-size: 9px; margin-left: 4px; }
.field-hint { font-size: 10px; color: var(--subtle); }
.duplicate-warning { padding: 11px 12px; background: var(--amber-soft); color: var(--amber); border-radius: 9px; font-size: 11px; display: flex; gap: 8px; align-items: center; margin-bottom: 15px; }
.pipeline-followup-preview { display: grid; grid-template-columns: 34px minmax(0,1fr); align-items: center; gap: 11px; margin-bottom: 20px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--soft); }
.pipeline-followup-preview strong, .pipeline-followup-preview span { display: block; }
.pipeline-followup-preview strong { font-size: 11px; font-weight: 500; }
.pipeline-followup-preview span { margin-top: 4px; color: var(--subtle); font-size: 9px; line-height: 1.4; }
.pipeline-followup-preview .row-icon { background: var(--panel); color: var(--purple); }
.pipeline-contact-log { margin: 0 0 28px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: #f7f7f5; }
.pipeline-contact-log-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 13px; }
.pipeline-contact-log-head h3, .pipeline-contact-log-head p { margin: 0; }
.pipeline-contact-log-head h3 { color: var(--ink); font-size: 12px; font-weight: 500; letter-spacing: -.01em; text-transform: none; }
.pipeline-contact-log-head p { margin-top: 4px; color: var(--subtle); font-size: 9px; }
.pipeline-contact-log-head > .icon { color: var(--subtle); }
.pipeline-contact-actions { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.pipeline-contact-actions button { min-height: 43px; padding: 0 11px; border: 1px solid #e1e1de; border-radius: 11px; background: #fff; color: var(--ink); display: flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-size: 10px; font-weight: 500; cursor: pointer; transition: transform .14s ease, border-color .14s ease, background .14s ease; }
.pipeline-contact-actions button:hover { border-color: #bdbdb8; background: #fdfdfc; transform: translateY(-1px); }
.pipeline-contact-actions button:active { transform: translateY(0); }
.activity-type-options { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; margin-bottom: 22px; }
.activity-type-option { position: relative; cursor: pointer; }
.activity-type-option input { position: absolute; opacity: 0; pointer-events: none; }
.activity-type-option > span { min-height: 68px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: #f7f7f5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--muted); transition: border-color .14s ease, background .14s ease, color .14s ease; }
.activity-type-option strong { font-size: 10px; font-weight: 500; }
.activity-type-option input:checked + span { border-color: #111; background: #111; color: #fff; }
.activity-type-option input:focus-visible + span { outline: 2px solid #111; outline-offset: 2px; }
.activity-log-fields { padding-top: 2px; }
.activity-task-option { margin-top: 3px; padding-top: 18px; border-top: 1px solid var(--soft-line); }
.activity-task-toggle-label { display: flex !important; align-items: center; gap: 11px; padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: #f7f7f5; color: var(--ink) !important; cursor: pointer; }
.activity-task-toggle-label > input { position: absolute; opacity: 0; pointer-events: none; }
.activity-task-check { width: 28px; height: 28px; flex: 0 0 auto; border: 1px solid #d4d6d6; border-radius: 9px; display: grid; place-items: center; color: transparent; background: #fff; transition: .15s ease; }
.activity-task-toggle-label strong,
.activity-task-toggle-label small { display: block; }
.activity-task-toggle-label strong { font-size: 11px; font-weight: 600; }
.activity-task-toggle-label small { margin-top: 4px; color: var(--subtle); font-size: 9px; }
.activity-task-toggle-label > input:checked + .activity-task-check { color: #fff; border-color: #111; background: #111; }
.activity-task-toggle-label:has(input:checked) { border-color: #c7c9ca; background: #f1f2f2; }
.activity-task-fields { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px var(--space-4); padding: 16px; border-radius: 14px; background: #f3f4f4; }
.activity-task-fields[hidden] { display: none !important; }

@media (max-width: 480px) {
  .pipeline-contact-log { padding: 14px; border-radius: 14px; }
  .pipeline-contact-actions { gap: 6px; }
  .pipeline-contact-actions button { min-height: 42px; padding: 0 7px; gap: 6px; }
  .activity-type-options { gap: 6px; }
  .activity-type-option > span { min-height: 62px; padding: 9px 5px; }
  .activity-task-fields { grid-template-columns: 1fr; gap: 14px; }
}

.drawer-overlay { position: fixed; z-index: 90; inset: 0; background: rgba(20,19,22,.18); animation: fade .1s ease-out both; }
.drawer { position: absolute; inset: 0 0 0 auto; width: min(515px, 100%); background: white; box-shadow: -20px 0 70px rgba(25,20,35,.12); display: flex; flex-direction: column; animation: fade .1s ease-out both; }
.drawer-head { min-height: 76px; padding: var(--space-4) 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: var(--space-3); }
.drawer-head h2 { margin: 0; font-size: 16px; font-weight: 500; }
.drawer-head p { margin: 4px 0 0; color: var(--subtle); font-size: 10px; }
.drawer-head .icon-button { margin-left: auto; }
.drawer-body { overflow-y: auto; padding: 22px; }
.drawer-actions { padding-top: var(--space-5); margin-top: var(--space-6); border-top: 1px solid var(--soft-line); display: flex; justify-content: flex-end; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.drawer-actions .danger { margin-right: auto; }
.section-title-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-4); }
.section-title-row h3 { margin-bottom: 0; }
.detail-section { margin-bottom: 25px; }
.detail-section h3 { margin: 0 0 12px; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--subtle); font-weight: 500; }
.detail-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; }
.detail-item { padding: 11px; border-radius: 10px; background: #faf9f8; }
.detail-item span { display: block; color: var(--subtle); font-size: 9px; }
.detail-item strong { display: block; font-size: 12px; font-weight: 500; margin-top: 6px; }
.workflow { display: grid; }
.workflow-step { display: grid; grid-template-columns: 25px minmax(0,1fr) auto; gap: 10px; position: relative; padding: 8px 0; border-radius: 10px; transition: background .12s ease, opacity .12s ease; }
.workflow-step::before { content: ""; position: absolute; width: 1px; background: var(--line); left: 12px; inset-block: 0; }
.workflow-step:hover { background: rgba(105,78,190,.035); }
.workflow-step.dragging { opacity: .38; }
.workflow-step.drag-over { background: var(--purple-wash); }
.workflow-step.drop-before::after, .workflow-step.drop-after::after { content: ""; position: absolute; left: 34px; right: 4px; height: 2px; border-radius: 2px; background: var(--purple); box-shadow: 0 0 0 3px var(--purple-soft); z-index: 3; }
.workflow-step.drop-before::after { top: -3px; }
.workflow-step.drop-after::after { bottom: -3px; }
.step-marker { width: 25px; height: 25px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); color: var(--subtle); z-index: 1; font-size: 9px; }
.step-marker.step-toggle { border: 0; cursor: pointer; padding: 0; transition: .18s; }
.step-marker.step-toggle:hover { background: var(--purple-soft); color: var(--purple); transform: scale(1.06); }
.workflow-step.done .step-marker { color: white; background: var(--green); }
.workflow-step.current .step-marker { color: white; background: var(--purple); box-shadow: 0 0 0 4px var(--purple-soft); }
.step-copy strong { display: block; font-size: 12px; font-weight: 500; padding-top: 5px; }
.step-copy span { display: block; color: var(--subtle); font-size: 10px; margin-top: 4px; }
.icon-button.mini { width: 27px; height: 27px; border-radius: 8px; }
.icon-button.mini:disabled { opacity: .28; cursor: default; transform: none; }
.project-task-actions { display: flex; align-items: flex-start; gap: 3px; min-width: 24px; }
.project-task-grip { width: 24px; height: 25px; display: grid; place-items: center; border-radius: 7px; color: var(--subtle); cursor: grab; font-size: 16px; line-height: 1; opacity: .38; transition: color .12s ease, background .12s ease, opacity .12s ease; }
.workflow-step:hover .project-task-grip, .project-task-grip:focus { opacity: 1; color: var(--purple); background: var(--purple-soft); outline: none; }
.project-task-grip:active { cursor: grabbing; }
.project-task-actions .danger-icon { color: var(--red); opacity: 0; transition: opacity .12s ease, background .12s ease; }
.workflow-step:hover .project-task-actions .danger-icon, .project-task-actions .danger-icon:focus { opacity: .72; }
.project-task-insert { height: 24px; position: relative; display: flex; align-items: center; margin-left: 0; opacity: .22; transition: opacity .12s ease; }
.project-task-insert::before { content: ""; position: absolute; left: 12px; top: 0; bottom: 0; width: 1px; background: var(--line); }
.project-task-insert.first { height: 18px; }
.project-task-add-point { position: relative; z-index: 2; margin-left: 3px; width: 19px; height: 19px; padding: 0; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--panel); color: var(--subtle); cursor: pointer; transition: color .12s ease, border-color .12s ease, background .12s ease, transform .12s ease; }
.project-task-insert:hover, .project-task-insert:focus-within, .workflow-step:hover + .project-task-insert { opacity: 1; }
.project-task-add-point:hover, .project-task-add-point:focus-visible { color: white; border-color: var(--purple); background: var(--purple); transform: scale(1.08); outline: none; }
.recurring-date { display: grid; gap: 5px; margin-top: 9px; color: var(--muted); font-size: 9px; }
.recurring-date .input { height: 33px; font-size: 11px; }
.project-task-note-label { display: grid; gap: 5px; margin-top: 10px; color: var(--muted); font-size: 9px; }
.project-task-note { width: 100%; min-height: 56px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; background: #faf9f8; color: var(--ink); resize: vertical; outline: none; font: inherit; font-size: 11px; line-height: 1.4; transition: border-color .15s, box-shadow .15s, background .15s; }
.project-task-note:focus { border-color: rgba(104, 78, 190, .5); box-shadow: 0 0 0 3px var(--purple-soft); background: white; }

.command-modal { width: min(620px, 100%); align-self: start; margin-top: 11vh; overflow: hidden; }
.command-input { height: 56px; width: 100%; border: 0; border-bottom: 1px solid var(--line); padding: 0 52px 0 48px; outline: none; font-size: 14px; }
.command-search-icon { position: absolute; left: 18px; top: 19px; color: var(--subtle); }
.command-box { position: relative; }
.command-close { position: absolute; right: 14px; top: 15px; }
.command-results { max-height: 380px; overflow-y: auto; padding: 8px; }
.command-group-label { padding: 10px 10px 6px; font-size: 9px; color: var(--subtle); text-transform: uppercase; letter-spacing: .08em; }
.command-item { min-height: 46px; width: 100%; border: 0; border-radius: 9px; background: transparent; display: flex; align-items: center; gap: 11px; padding: 0 10px; cursor: pointer; text-align: left; }
.command-item:hover, .command-item.active { background: var(--purple-soft); color: var(--purple); }
.command-item .row-icon { width: 30px; height: 30px; background: var(--soft); }
.command-item:hover .row-icon { background: white; }
.command-item strong { display: block; font-size: 12px; font-weight: 500; }
.command-item span { display: block; color: var(--subtle); font-size: 10px; margin-top: 3px; }

.toast-region { position: fixed; z-index: 200; right: 20px; bottom: 20px; display: grid; gap: 8px; }
.toast { min-width: 265px; max-width: 360px; background: #252427; color: white; border-radius: 11px; padding: 12px 14px; display: flex; align-items: center; gap: 9px; box-shadow: 0 12px 34px rgba(0,0,0,.18); font-size: 12px; animation: toast-in .12s ease-out both; }
.toast.success .icon { color: #72e1b8; }
.toast.warning .icon { color: #ffd27d; }
@keyframes toast-in { from { opacity: .75; } }

.deal-celebration { position: fixed; z-index: 190; inset: 0; overflow: hidden; display: grid; place-items: center; pointer-events: none; background: radial-gradient(circle at center, rgba(94,23,235,.18), rgba(16,12,24,.04) 45%, transparent 70%); animation: celebration-backdrop .18s ease-out both; }
.deal-celebration.leaving { opacity: 0; transition: opacity .2s ease; }
.money-rain { position: absolute; inset: 0; overflow: hidden; }
.money-note { --x: 50%; --drift: 0px; --rotation: 0deg; --duration: 2.4s; --delay: 0s; position: absolute; top: -12vh; left: var(--x); width: 48px; height: 25px; border: 2px solid #087b54; border-radius: 5px; background: linear-gradient(135deg,#bff3d9,#e9fff3); color: #087b54; box-shadow: 0 5px 14px rgba(6,90,59,.16); display: grid; place-items: center; font-style: normal; font-size: 14px; font-weight: 700; animation: money-fall var(--duration) cubic-bezier(.18,.65,.35,1) var(--delay) both; }
.money-note::before,.money-note::after { content: ""; position: absolute; width: 5px; height: 5px; border: 1px solid currentColor; border-radius: 50%; top: 8px; opacity: .55; }
.money-note::before { left: 5px; }
.money-note::after { right: 5px; }
.celebration-card { position: relative; width: min(420px,calc(100vw - 36px)); padding: 29px 28px 26px; border: 1px solid rgba(255,255,255,.75); border-radius: 24px; background: rgba(255,255,255,.96); box-shadow: 0 28px 90px rgba(36,16,70,.24); text-align: center; animation: celebration-card 3.45s cubic-bezier(.2,.78,.22,1) both; }
.party-scene { position: relative; width: 155px; height: 92px; margin: -4px auto 7px; }
.party-pig { position: absolute; left: 24px; bottom: 3px; font-size: 67px; line-height: 1; filter: drop-shadow(0 10px 13px rgba(46,22,54,.13)); animation: pig-party .55s ease-in-out 5 alternate; transform-origin: center bottom; }
.party-bottle { position: absolute; right: 20px; bottom: 20px; font-size: 49px; line-height: 1; transform: rotate(-28deg); transform-origin: 25% 75%; animation: bottle-pop 1.05s cubic-bezier(.2,.85,.2,1) both; }
.party-pop { position: absolute; right: -2px; top: 0; color: var(--purple); font-size: 12px; font-weight: 700; letter-spacing: .08em; transform: rotate(10deg); animation: pop-word .65s .45s ease-out both; }
.celebration-kicker { display: block; color: var(--purple); font-size: 10px; font-weight: 500; letter-spacing: .13em; text-transform: uppercase; }
.celebration-card strong { display: block; margin-top: 7px; font-size: clamp(34px,7vw,50px); line-height: 1; letter-spacing: -.045em; }
.celebration-copy { display: block; margin-top: 10px; color: var(--muted); font-size: 13px; }
@keyframes celebration-backdrop { from { opacity: 0; } }
@keyframes celebration-card { 0% { opacity: 0; transform: scale(.78) rotate(-2deg); } 10% { opacity: 1; transform: scale(1.04) rotate(1deg); } 15%,88% { opacity: 1; transform: scale(1) rotate(0); } 100% { opacity: 0; transform: scale(.98); } }
@keyframes money-fall { 0% { opacity: 0; transform: translate3d(0,-15vh,0) rotate(0); } 8% { opacity: 1; } 100% { opacity: .96; transform: translate3d(var(--drift),116vh,0) rotate(var(--rotation)); } }
@keyframes pig-party { from { transform: translateY(0) rotate(-3deg); } to { transform: translateY(-7px) rotate(4deg); } }
@keyframes bottle-pop { 0% { transform: rotate(-28deg) scale(.75); } 42% { transform: rotate(-38deg) scale(1.08); } 60%,100% { transform: rotate(-23deg) scale(1); } }
@keyframes pop-word { from { opacity: 0; transform: translate(-10px,12px) scale(.5) rotate(-12deg); } to { opacity: 1; transform: translate(0,0) scale(1) rotate(10deg); } }

.login-screen { min-height: 100vh; display: grid; grid-template-columns: minmax(480px, 1fr) minmax(440px, 1fr); background: white; }
.login-visual { padding: clamp(28px,5vw,70px); color: white; background: #111112; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.login-visual::after { content: ""; position: absolute; width: 530px; height: 530px; border-radius: 50%; background: radial-gradient(circle, rgba(94,23,235,.74) 0, rgba(94,23,235,.12) 45%, transparent 70%); bottom: -245px; right: -140px; }
.login-logo { width: 145px; filter: invert(1); position: relative; z-index: 1; }
.login-copy { margin: auto 0; max-width: 610px; position: relative; z-index: 1; }
.login-kicker { display: flex; align-items: center; gap: 9px; color: rgba(255,255,255,.58); font-size: 11px; letter-spacing: .11em; text-transform: uppercase; }
.login-kicker::before { content: ""; width: 25px; height: 1px; background: var(--purple); }
.login-copy h1 { margin-top: 20px; font-size: clamp(43px,6vw,78px); line-height: .98; letter-spacing: -.055em; }
.login-copy p { color: rgba(255,255,255,.62); font-size: 15px; line-height: 1.6; max-width: 520px; margin-top: 22px; }
.login-quote { position: relative; z-index: 1; font-size: 11px; color: rgba(255,255,255,.38); }
.login-form-wrap { display: grid; place-items: center; padding: 35px; background: var(--canvas); }
.login-card { width: min(420px,100%); }
.login-card h2 { margin: 0; font-size: 28px; letter-spacing: -.035em; font-weight: 500; }
.login-card > p { margin: 9px 0 28px; color: var(--muted); font-size: 13px; }
.login-card .field { margin-bottom: 14px; }
.login-card .input { height: 47px; }
.login-card .btn.primary { width: 100%; height: 47px; margin-top: 5px; }
.login-error { margin: -3px 0 12px; padding: 10px 12px; border-radius: 9px; background: var(--red-soft); color: var(--red); font-size: 11px; line-height: 1.4; }
.login-error.settings-alert { margin: var(--space-4) 0 0; }
.login-separator { display: flex; align-items: center; gap: 12px; color: var(--subtle); font-size: 10px; margin: 21px 0; }
.login-separator::before, .login-separator::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.demo-note { padding: 13px; border-radius: 11px; background: var(--purple-soft); color: var(--purple-dark); font-size: 11px; line-height: 1.45; }

@media (max-width: 1180px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .client-grid, .project-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s; box-shadow: 25px 0 60px rgba(0,0,0,.12); }
  .sidebar.open { transform: translateX(0); }
  .mobile-scrim { position: fixed; z-index: 35; inset: 0; background: rgba(0,0,0,.25); }
  .main { margin-left: 0; }
  .mobile-menu { display: grid !important; }
  .dashboard-grid, .dashboard-insights-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .google-calendar-layout { grid-template-columns: 1fr; }
  .settings-nav { display: flex; overflow-x: auto; }
  .settings-nav button { min-width: max-content; width: auto; }
  .login-screen { grid-template-columns: 1fr; }
  .login-visual { min-height: 320px; }
  .login-copy { margin: 70px 0 40px; }
  .login-copy h1 { font-size: 48px; max-width: 550px; }
}

@media (max-width: 700px) {
  .profile-row { grid-template-columns: 1fr; align-items: start; gap: var(--space-4); }
  .profile-photo-editor, .profile-login, .profile-row > .btn { grid-column: 1; }
}

@media (max-width: 650px) {
  .app-shell, .main, .content, .page-enter { width: 100%; min-width: 0; max-width: 100%; }
  .content { padding: 25px 15px 45px; }
  .topbar { width: 100%; max-width: 100vw; height: 64px; padding: 0 15px; }
  .topbar-actions { min-width: 0; }
  .search-trigger { width: 40px; padding: 0; justify-content: center; }
  .search-trigger span, .search-trigger .key { display: none; }
  .breadcrumbs { display: none; }
  .sync-badge { display: none; }
  .filter-note { width: 100%; margin-left: 0; }
  .page-head { align-items: flex-start; flex-direction: column; margin-bottom: 22px; }
  .page-actions { width: 100%; justify-content: flex-start; }
  .page-actions .btn { max-width: 100%; }
  .metric-grid, .split-grid, .client-grid, .project-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 112px; }
  .panel, .panel-head, .list, .list-row { width: 100%; min-width: 0; max-width: 100%; }
  .panel-head { min-height: 60px; padding: 13px 16px; align-items: center; flex-wrap: wrap; gap: 10px; }
  .panel-head > div:first-child { flex: 1 1 150px; min-width: 0; }
  .panel-head .btn { flex: 0 0 auto; }
  .list-row { padding: 13px 16px; gap: 10px; overflow: hidden; }
  .row-icon { flex: 0 0 34px; }
  .row-main { overflow: hidden; }
  .row-side { flex: 0 0 auto; max-width: 88px; }
  .row-side strong, .row-side span { white-space: nowrap; }
  .form-grid, .detail-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .toolbar-search { min-width: 100%; max-width: none; }
  .view-toggle { margin-left: 0; }
  .pipeline-mini-row { grid-template-columns: 100px 1fr 48px; }
  .practice-widget { grid-template-columns: 122px minmax(0,1fr); padding: 16px; gap: 16px; }
  .donut-chart { width: 122px; }
  .month-compare { grid-template-columns: 1fr; }
  .calendar-connect-banner { align-items: flex-start; flex-direction: column; }
  .calendar-connect-banner .btn { width: 100%; }
  .settings-section { padding: var(--space-5); }
  .settings-form-actions { justify-content: stretch; }
  .settings-form-actions .btn { width: 100%; }
  .integration-card { align-items: flex-start; flex-wrap: wrap; }
  .integration-actions { width: 100%; justify-content: flex-start; padding-left: 52px; }
  .drawer-body { padding: var(--space-4); }
  .drawer-head { padding: var(--space-4); }
  .drawer-head > div { min-width: 0; }
  .drawer-head h2, .drawer-head p { overflow-wrap: anywhere; }
  .drawer-actions { justify-content: stretch; }
  .drawer-actions .danger { margin-right: 0; }
  .drawer-actions .btn { flex: 1 1 140px; }
  .workflow-step { grid-template-columns: 25px minmax(0,1fr) auto; min-width: 0; }
  .step-copy { min-width: 0; }
  .step-copy strong, .step-copy span { overflow-wrap: anywhere; }
  .project-task-insert { opacity: .45; }
  .project-task-grip { opacity: .68; }
  .project-task-actions .danger-icon { opacity: .55; }
  .modal-head, .modal-body, .modal-foot { padding-left: var(--space-4); padding-right: var(--space-4); }
  .modal-foot { flex-wrap: wrap; }
  .modal-foot .btn { flex: 1 1 130px; }
  .overlay { padding: 12px; }
  .modal { max-height: calc(100vh - 24px); }
  .toast-region { left: 12px; right: 12px; bottom: 12px; }
  .toast { width: 100%; min-width: 0; max-width: none; }
  .google-calendar-panel { overflow-x: auto; }
  .google-calendar-weekdays, .google-calendar-grid { min-width: 760px; }
  .login-visual { padding: 27px; }
  .login-copy h1 { font-size: 39px; }
  .login-form-wrap { padding: 40px 22px; }
}

@media (max-width: 420px) {
  .content { padding-left: 12px; padding-right: 12px; }
  .topbar { padding-left: 12px; padding-right: 12px; gap: 8px; }
  .practice-widget { grid-template-columns: 1fr; justify-items: center; }
  .donut-legend { width: 100%; }
  .pipeline-mini-row { grid-template-columns: minmax(82px, 1fr) minmax(70px, 1.5fr) 44px; gap: 8px; }
  .project-card .project-next-step { gap: 8px; }
  .project-card .project-next-step strong { max-width: 58%; overflow-wrap: anywhere; }
  .section-title-row { align-items: flex-start; flex-wrap: wrap; }
  .trash-item { grid-template-columns: 32px minmax(0,1fr); }
  .trash-item .btn { grid-column: 2; justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* Global creation, mobile navigation and workspace loading */
.quick-create { position: fixed; z-index: 70; right: 28px; bottom: 28px; display: grid; justify-items: end; gap: 10px; }
.quick-create-trigger { width: 52px; height: 52px; padding: 0; border: 0; border-radius: 17px; background: var(--purple); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 12px 30px rgba(94,23,235,.28); transition: transform .16s ease, background .16s ease, box-shadow .16s ease; }
.quick-create-trigger:hover { background: var(--purple-dark); transform: translateY(-2px); box-shadow: 0 16px 36px rgba(94,23,235,.34); }
.quick-create-menu { width: 236px; padding: 7px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); box-shadow: var(--shadow-lg); display: grid; gap: 2px; animation: quick-menu-in .15s cubic-bezier(.2,.8,.2,1); }
.quick-create-menu button { min-height: 48px; padding: 7px 9px; border: 0; border-radius: 10px; background: transparent; display: flex; align-items: center; gap: 11px; color: var(--ink); cursor: pointer; text-align: left; }
.quick-create-menu button:hover { background: var(--purple-soft); color: var(--purple); }
.quick-create-menu button > .icon { width: 31px; height: 31px; padding: 8px; border-radius: 9px; background: var(--soft); }
.quick-create-menu button:hover > .icon { background: var(--surface); }
.quick-create-menu strong, .quick-create-menu small { display: block; }
.quick-create-menu strong { font-size: 12px; font-weight: 500; }
.quick-create-menu small { margin-top: 3px; color: var(--subtle); font-size: 9px; }
@keyframes quick-menu-in { from { opacity: 0; transform: translateY(6px) scale(.98); } }
.mobile-bottom-nav { display: none; }

.skeleton-page { display: grid; gap: 12px; }
.skeleton { position: relative; overflow: hidden; border-radius: 10px; background: var(--soft); }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg,transparent,rgba(255,255,255,.55),transparent); animation: skeleton-shimmer 1.25s infinite; }
.skeleton-kicker { width: 92px; height: 10px; }
.skeleton-title { width: min(330px,72%); height: 38px; margin-top: 3px; }
.skeleton-copy { width: min(520px,88%); height: 13px; }
.skeleton-metrics { margin-top: 25px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: var(--space-4); }
.skeleton-card { height: 128px; border: 1px solid var(--line); background: var(--surface); }
.skeleton-layout { margin-top: 4px; display: grid; grid-template-columns: 1.5fr 1fr; gap: var(--space-4); }
.skeleton-panel { height: 330px; border: 1px solid var(--line); background: var(--surface); }
@keyframes skeleton-shimmer { to { transform: translateX(100%); } }

.appearance-settings { border-top: 1px solid var(--soft-line); }
.setting-choice { min-height: 88px; padding: var(--space-4) 0; border-bottom: 1px solid var(--soft-line); display: flex; align-items: center; justify-content: space-between; gap: var(--space-5); }
.setting-choice > div:first-child { min-width: 0; }
.setting-choice strong, .setting-choice span { display: block; }
.setting-choice strong { font-size: 12px; font-weight: 500; }
.setting-choice span { margin-top: 5px; color: var(--subtle); font-size: 10px; line-height: 1.45; }
.segmented-control { flex: 0 0 auto; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); display: flex; gap: 2px; }
.segmented-control button { min-height: 31px; padding: 0 10px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 11px; }
.segmented-control button.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px rgba(20,20,22,.08); }

/* Compact mode keeps the same information hierarchy with less vertical travel. */

/* Dark mode intentionally preserves purple only for actions and status signals. */
[data-theme="dark"] { color-scheme: dark; --ink: #f2f2f3; --muted: #aaaab0; --subtle: #7f8088; --line: #2d2f34; --soft-line: #25272b; --surface: #191a1d; --canvas: #111214; --soft: #222429; --purple: #8b5cf6; --purple-dark: #7443e8; --purple-soft: #29213d; --purple-wash: #201a2c; --green: #50c99a; --green-soft: #18352b; --amber: #e3a64f; --amber-soft: #382b18; --red: #ef7676; --red-soft: #3b2022; --blue: #73a2ef; --blue-soft: #1c2b43; --shadow: 0 1px 2px rgba(0,0,0,.2),0 16px 42px rgba(0,0,0,.24); --shadow-lg: 0 28px 80px rgba(0,0,0,.48); }
[data-theme="dark"] body, [data-theme="dark"] .main { background: var(--canvas); }
[data-theme="dark"] .sidebar, [data-theme="dark"] .topbar { background: rgba(24,25,28,.94); }
[data-theme="dark"] .brand img { filter: invert(1); }
[data-theme="dark"] .nav-button { color: #a5a5aa; }
[data-theme="dark"] .nav-button:hover { background: #24262a; color: var(--ink); }
[data-theme="dark"] .nav-button .badge-count { background: #2c2e33; color: #b4b4b8; }
[data-theme="dark"] .btn, [data-theme="dark"] .icon-button, [data-theme="dark"] .search-trigger,
[data-theme="dark"] .input, [data-theme="dark"] .select, [data-theme="dark"] .textarea,
[data-theme="dark"] .modern-date-button, [data-theme="dark"] .project-task-note { background: #1d1f22; border-color: var(--line); color: var(--ink); }
[data-theme="dark"] .btn.ghost { background: transparent; }
[data-theme="dark"] .btn.primary { background: var(--purple); border-color: var(--purple); color: #fff; }
[data-theme="dark"] .status-dot { border-color: #191a1d; }
[data-theme="dark"] .metric-card, [data-theme="dark"] .panel, [data-theme="dark"] .modal, [data-theme="dark"] .drawer,
[data-theme="dark"] .kanban-card, [data-theme="dark"] .date-picker-popover, [data-theme="dark"] .google-calendar-day { background: var(--surface); border-color: var(--line); }
[data-theme="dark"] .data-table th, [data-theme="dark"] .google-calendar-weekdays { background: #17181b; }
[data-theme="dark"] .month-card, [data-theme="dark"] .owner-tab, [data-theme="dark"] .view-toggle,
[data-theme="dark"] .view-toggle button, [data-theme="dark"] .entity-card, [data-theme="dark"] .goal-card,
[data-theme="dark"] .google-upcoming-list > button { background: var(--surface); }
[data-theme="dark"] .donut-chart::after, [data-theme="dark"] .owner-tab.active span,
[data-theme="dark"] .kanban-head span { background: var(--surface); }
[data-theme="dark"] .kanban-column { background: #202226; }
[data-theme="dark"] .project-card .current-task,
[data-theme="dark"] .google-calendar-day.outside { background: #17181b; }
[data-theme="dark"] .list-row.clickable:hover, [data-theme="dark"] .data-table tbody tr:hover,
[data-theme="dark"] .google-upcoming-list > button:hover { background: #202226; }
[data-theme="dark"] .key { background: #26282c; color: var(--muted); }
[data-theme="dark"] .bar { background: #2b2d31; }
[data-theme="dark"] .google-calendar-event { background: #1b2a40; color: #8cb7f4; }
[data-theme="dark"] .modern-date-button:hover, [data-theme="dark"] .project-task-note:focus { background: #232529; }
[data-theme="dark"] .detail-item, [data-theme="dark"] .drawer-body > .activity-section { background: #1e2023; }
[data-theme="dark"] .activity-dot { border-color: var(--surface); }
[data-theme="dark"] .calendar-privacy-note { background: #172a22; color: var(--green); }
[data-theme="dark"] .calendar-privacy-note span { color: #83a995; }
[data-theme="dark"] .calendar-appointment { background: #182538; border-color: #263b59; color: var(--blue); }
[data-theme="dark"] .calendar-appointment span { color: #91a5c0; }
[data-theme="dark"] .calendar-appointment-button:hover { background: #1d3049; border-color: #355277; }
[data-theme="dark"] .date-picker-popover { background: rgba(25,26,29,.98); }
[data-theme="dark"] .date-picker-day.outside { color: #55575d; }
[data-theme="dark"] .login-form-wrap { background: var(--canvas); }
[data-theme="dark"] .login-screen { background: var(--canvas); }
[data-theme="dark"] .command-item:hover .row-icon, [data-theme="dark"] .quick-create-menu button:hover > .icon { background: #332947; }
[data-theme="dark"] .segmented-control button.active { box-shadow: 0 1px 5px rgba(0,0,0,.35); }
[data-theme="dark"] .skeleton::after { background: linear-gradient(90deg,transparent,rgba(255,255,255,.06),transparent); }

@media (max-width: 900px) {
  .appearance-control { display: none; }
  .content { padding-bottom: 112px; }
  .mobile-bottom-nav { position: fixed; z-index: 60; left: 10px; right: 10px; bottom: max(10px,env(safe-area-inset-bottom)); height: 66px; padding: 6px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.94); box-shadow: 0 14px 45px rgba(20,20,24,.14); backdrop-filter: blur(20px) saturate(1.2); display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); }
  .mobile-bottom-nav button { position: relative; min-width: 0; padding: 5px 2px; border: 0; border-radius: 13px; background: transparent; color: var(--subtle); display: grid; place-items: center; align-content: center; gap: 4px; cursor: pointer; }
  .mobile-bottom-nav button.active { background: var(--purple-soft); color: var(--purple); }
  .mobile-bottom-nav button span { max-width: 100%; overflow: hidden; font-size: 9px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-bottom-nav button i { position: absolute; top: 3px; right: calc(50% - 18px); min-width: 14px; height: 14px; padding: 0 3px; border-radius: 8px; background: var(--red); color: #fff; display: grid; place-items: center; font-size: 8px; font-style: normal; }
  .quick-create { right: 17px; bottom: calc(89px + env(safe-area-inset-bottom)); }
  .quick-create-trigger { width: 48px; height: 48px; border-radius: 16px; }
  [data-theme="dark"] .mobile-bottom-nav { background: rgba(25,26,29,.94); }
  .skeleton-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .skeleton-layout { grid-template-columns: 1fr; }
}

@media (max-width: 650px) {
  .topbar .mobile-menu { display: none !important; }
  .setting-choice { align-items: flex-start; flex-direction: column; }
  .segmented-control { width: 100%; }
  .segmented-control button { flex: 1; justify-content: center; }
  .skeleton-metrics { grid-template-columns: 1fr; }
  .skeleton-card { height: 104px; }
  .toast-region { bottom: calc(90px + env(safe-area-inset-bottom)); }
  .calendar-match-list > button { grid-template-columns: 1fr; }
  .calendar-match-list > button > small { grid-column: 1; }
}

/* Whiteselect product design system · 2026 */
:root {
  --ink: #0c0d0e;
  --muted: #62676c;
  --subtle: #92979c;
  --line: #e2e5e7;
  --soft-line: #eceeef;
  --surface: #ffffff;
  --canvas: #eef0f1;
  --soft: #f3f5f6;
  --purple: #101112;
  --purple-dark: #000000;
  --purple-soft: #eceeef;
  --purple-wash: #f7f8f8;
  --green: #147a54;
  --green-soft: #eaf7f0;
  --amber: #a66513;
  --amber-soft: #fff4df;
  --red: #c43d3d;
  --red-soft: #fff0ef;
  --blue: #2c68c4;
  --blue-soft: #edf4ff;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(8, 12, 16, .025), 0 12px 32px rgba(8, 12, 16, .045);
  --shadow-lg: 0 30px 90px rgba(7, 10, 13, .2);
  --signal: #f0f2f2;
}

body { background: var(--canvas); letter-spacing: -.008em; }
::selection { background: #dffb99; }

.sidebar {
  width: 238px;
  padding: 22px 16px 18px;
  border-right: 0;
  background: #0d0e0f;
  color: #fff;
  backdrop-filter: none;
}
.brand { height: 46px; padding: 0 10px; margin-bottom: 25px; }
.brand img { width: 126px; filter: invert(1); }
.os-label { border-color: #3b3d40; color: #777c81; font-size: 9px; }
.nav-label { margin: 14px 0 8px; color: #62666b; font-size: 9px; }
.nav-list { gap: 5px; }
.nav-button {
  height: 44px;
  padding: 0 12px;
  border-radius: 13px;
  color: #969a9f;
  gap: 12px;
  font-size: 13px;
}
.nav-button .icon { width: 17px; height: 17px; }
.nav-button:hover { color: #fff; background: #191b1d; }
.nav-button.active { color: #0b0c0d; background: #fff; font-weight: 500; box-shadow: 0 7px 22px rgba(0,0,0,.24); }
.nav-button .badge-count { background: #242629; color: #aeb2b6; }
.nav-button.active .badge-count { background: #0d0e0f; color: #fff; }
.workspace-chip { margin-top: 14px; padding: 18px 8px 0; border-color: #292b2e; }
.workspace-chip strong { color: #f6f7f7; }
.workspace-chip span { color: #6f7479; }
.workspace-chip .avatar { background: #fff; color: #0b0c0d; }
.workspace-chip .logout-button { border-color: #2b2d30; background: #17191b; color: #8e9297; }

.main { margin-left: 238px; }
.topbar {
  height: 78px;
  padding: 0 clamp(24px, 3vw, 50px);
  border-bottom: 1px solid rgba(218,221,224,.78);
  background: rgba(238,240,241,.86);
  backdrop-filter: blur(24px) saturate(1.15);
}
.breadcrumbs { color: var(--ink); font-size: 13px; }
.breadcrumbs b { font-weight: 500; }
.topbar-actions { gap: 9px; }
.sync-badge { padding: 7px 10px; border: 1px solid var(--line); background: rgba(255,255,255,.7); color: var(--muted); }
.sync-badge.cloud { border-color: #d8eadf; }
.search-trigger {
  width: min(320px, 30vw);
  height: 42px;
  padding: 0 12px;
  border: 1px solid #dde0e2;
  border-radius: 13px;
  background: rgba(255,255,255,.82);
  box-shadow: 0 1px 2px rgba(10,12,14,.025);
}
.search-trigger:hover { border-color: #cfd3d6; box-shadow: 0 5px 16px rgba(10,12,14,.05); }
.key { border: 0; background: #eff1f2; color: #80858a; }
.icon-button {
  width: 42px;
  height: 42px;
  border-color: #dde0e2;
  border-radius: 13px;
  background: rgba(255,255,255,.82);
}
.icon-button:hover { border-color: #cfd3d6; background: #fff; transform: none; box-shadow: 0 5px 16px rgba(10,12,14,.05); }
.status-dot { width: 8px; height: 8px; top: 7px; right: 7px; border-color: #fff; background: var(--signal); }

.content { max-width: 1740px; padding: 38px clamp(24px, 3vw, 50px) 80px; }
.page-head { min-height: 52px; align-items: center; margin-bottom: 28px; }
h1 { font-size: clamp(29px, 2.5vw, 38px); font-weight: 500; letter-spacing: -.048em; }
.eyebrow, .page-head .page-subtitle { display: none; }
.page-actions { gap: 9px; }

.btn {
  min-height: 42px;
  padding: 0 15px;
  border-color: #dfe2e4;
  border-radius: 12px;
  background: #fff;
  font-size: 12px;
  box-shadow: 0 1px 1px rgba(10,12,14,.02);
}
.btn:hover { transform: none; border-color: #cbd0d3; box-shadow: 0 5px 16px rgba(10,12,14,.06); }
.btn.primary { background: #0c0d0e; border-color: #0c0d0e; color: #fff; box-shadow: 0 7px 18px rgba(9,11,13,.15); }
.btn.primary:hover { background: #000; border-color: #000; box-shadow: 0 9px 22px rgba(9,11,13,.2); }
.btn.ghost { box-shadow: none; }
.btn.small { min-height: 34px; border-radius: 10px; }

.metric-grid { gap: 14px; margin-bottom: 14px; }
.metric-card {
  min-height: 142px;
  padding: 22px;
  border-color: rgba(218,222,225,.88);
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.metric-card:hover { border-color: #d3d7da; transform: none; box-shadow: 0 16px 38px rgba(8,12,16,.065); }
.metric-head { color: #686d72; font-size: 11px; font-weight: 500; }
.metric-icon { width: 35px; height: 35px; border-radius: 11px; background: #f0f2f3; color: #5f656a; }
.metric-icon.purple { background: #111214; color: #fff; }
.metric-icon.green { background: #e9f7ef; color: #147a54; }
.metric-value { margin-top: 20px; font-size: 30px; letter-spacing: -.045em; }
.metric-foot { margin-top: 8px; color: #9a9ea2; font-size: 10px; }

.dashboard-insights-grid, .split-grid, .dashboard-grid { gap: 14px; margin-bottom: 14px; }
.panel {
  border-color: rgba(218,222,225,.9);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel-head { min-height: 70px; padding: 0 22px; border-color: var(--soft-line); }
.panel-title { font-size: 14px; letter-spacing: -.015em; }
.panel-meta { margin-top: 4px; font-size: 10px; }
.panel-pad { padding: 22px; }
.list-row { min-height: 67px; padding: 14px 22px; gap: 13px; }
.list-row.clickable:hover { background: #f7f8f8; }
.row-icon { width: 36px; height: 36px; border-radius: 11px; background: #f0f2f3; }
.row-main strong { font-size: 12px; }
.row-main span { margin-top: 5px; font-size: 10px; }

.practice-widget, .month-compare { min-height: 242px; padding: 20px; }
.donut-chart { box-shadow: inset 0 0 0 1px rgba(10,12,14,.035); }
.donut-chart::after { inset: 27px; box-shadow: none; }
.month-card { padding: 16px; border-color: #e6e8e9; border-radius: 15px; background: #f7f8f8; }
.month-card.current { border-color: #dfe2e4; background: #fff; box-shadow: 0 5px 18px rgba(8,12,16,.055); }
.month-card-head span { border-radius: 99px; background: #0c0d0e; color: #fff; }
.focus-more { background: #f4f6f6; color: var(--ink); }

.toolbar {
  gap: 9px;
  margin-bottom: 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.84);
  box-shadow: var(--shadow);
}
.crm-owner-tabs { gap: 7px; margin: 0 0 14px; padding: 3px; }
.owner-tab { height: 40px; border-color: transparent; border-radius: 12px; background: rgba(255,255,255,.72); }
.owner-tab:hover { border-color: #dadddf; }
.owner-tab.active { border-color: #0c0d0e; background: #0c0d0e; color: #fff; box-shadow: 0 6px 16px rgba(8,11,13,.13); }
.owner-tab.active span { background: #fff; color: #0c0d0e; }
.input, .select, .textarea, .modern-date-button {
  border-color: #dfe2e4;
  border-radius: 12px;
  background: #fff;
}
.input, .select { height: 42px; }
.input:focus, .select:focus, .textarea:focus { border-color: #0c0d0e; box-shadow: 0 0 0 3px rgba(12,13,14,.08); }
.modern-date-button:focus-visible { border-color: #0c0d0e; box-shadow: 0 0 0 3px rgba(12,13,14,.08); }
.modern-date-button .icon:first-child { color: var(--ink); }
.view-toggle { border-radius: 12px; }
.view-toggle button.active { background: #0c0d0e; color: #fff; }

.table-wrap { border-radius: 20px; }
.data-table th { height: 50px; padding: 0 18px; background: #f7f8f8; color: #8a8f94; letter-spacing: .08em; }
.data-table td { height: 72px; padding: 0 18px; }
.data-table tbody tr:hover { background: #f7f8f8; }
.name-cell { gap: 12px; }
.name-cell .avatar { width: 34px; height: 34px; background: #101112; }

.status { padding: 6px 9px; border-radius: 99px; }
.tag { padding: 5px 8px; border-radius: 99px; }
.tag.purple { background: #111214; color: #fff; }

.kanban-wrap { padding: 4px 2px 18px; }
.kanban { gap: 14px; }
.kanban-column { width: 300px; min-height: 500px; padding: 11px; border: 1px solid #dde0e2; border-radius: 18px; background: #e7e9ea; }
.kanban-head { height: 46px; padding: 0 5px 9px; }
.kanban-head strong { font-size: 12px; }
.kanban-head span { border-radius: 99px; }
.kanban-card { gap: 13px; padding: 16px; border-color: #dfe2e4; border-radius: 15px; box-shadow: 0 3px 10px rgba(8,12,16,.035); }
.kanban-card:hover { border-color: #cbd0d3; transform: none; box-shadow: 0 10px 24px rgba(8,12,16,.075); }
.kanban-card-title { font-size: 13px; }
.kanban-card-meta { padding-top: 3px; }

.client-grid, .project-grid { gap: 14px; }
.entity-card { min-width: 0; padding: 21px; border-color: #dde0e2; border-radius: 19px; box-shadow: var(--shadow); overflow: hidden; }
.entity-card:hover { border-color: #cfd3d6; transform: none; box-shadow: 0 14px 32px rgba(8,12,16,.07); }
.entity-logo { width: 43px; height: 43px; border-radius: 13px; background: #101112; color: #fff; }
.entity-stats { margin: 19px 0; padding: 16px 0; }
.project-card .current-task { padding: 14px; border: 1px solid #eceeef; border-radius: 13px; background: #f7f8f8; }
.project-card .current-task strong, .project-card .project-next-step strong { overflow-wrap: anywhere; }
.progress { height: 6px; background: #e6e9ea; }
.progress span { background: #101112; }

.settings-grid { grid-template-columns: 230px minmax(0,1fr); gap: 14px; }
.settings-nav { padding: 9px; }
.settings-nav button { height: 43px; border-radius: 11px; }
.settings-nav button.active { background: #101112; color: #fff; }
.settings-section { padding: 28px; }
.settings-section h2 { font-size: 20px; letter-spacing: -.025em; }

.overlay { background: rgba(8,10,12,.42); backdrop-filter: blur(7px); }
.modal { border: 1px solid rgba(255,255,255,.7); border-radius: 23px; box-shadow: var(--shadow-lg); }
.modal-head { padding: 23px 25px 18px; }
.modal-head h2 { font-size: 19px; letter-spacing: -.025em; }
.modal-head p { display: none; }
.modal-body { padding: 25px; }
.modal-foot { padding: 18px 25px; }
.form-grid { column-gap: 17px; row-gap: 20px; }
.field { gap: 8px; }
.field label { color: #666b70; font-size: 10px; font-weight: 500; }
.drawer-overlay { background: rgba(8,10,12,.34); backdrop-filter: blur(4px); }
.drawer { width: min(560px,100%); border-left: 1px solid var(--line); box-shadow: -28px 0 90px rgba(7,10,13,.18); }
.drawer-head { min-height: 86px; padding: 18px 26px; }
.drawer-head h2 { font-size: 19px; letter-spacing: -.025em; }
.drawer-body { padding: 26px; }
.detail-section h3 { margin-bottom: 16px; }
.drawer-actions { margin-top: 29px; padding-top: 20px; }
.drawer-body > .activity-section { margin-top: 42px; padding: 20px; border-radius: 16px; background: #f7f8f8; }
.activity-timeline { margin-top: 18px; }
.calendar-match-section { border-radius: 16px; background: #f7f8f8; }
.calendar-appointment { border-color: #e1e4e6; border-radius: 12px; background: #f5f7f8; color: #48515a; }
.calendar-appointment span { color: #7b8288; }

.date-picker-popover { border-radius: 23px; }
.date-picker-day.selected { background: #0c0d0e; box-shadow: 0 6px 16px rgba(8,10,12,.24); }
.date-picker-day.today:not(.selected) { color: #0c0d0e; }
.date-picker-day:hover { background: #eceeef; color: #0c0d0e; }
.date-picker-today { background: #0c0d0e; color: #fff; }

.quick-create-trigger { border-radius: 16px; background: #0c0d0e; box-shadow: 0 14px 34px rgba(8,10,12,.22); }
.quick-create-trigger:hover { background: #000; box-shadow: 0 16px 38px rgba(8,10,12,.28); }
.quick-create-menu { padding: 8px; border-radius: 18px; }
.quick-create-menu button { min-height: 48px; border-radius: 12px; }
.quick-create-menu button:hover { background: #f0f2f3; color: #0c0d0e; }
.quick-create-menu small { display: none; }

.login-screen { background: #0d0e0f; }
.login-visual { background: #0d0e0f; }
.login-form-wrap { border-radius: 28px 0 0 28px; background: #f4f5f5; }
.login-card .btn.primary { background: #0c0d0e; }
.login-kicker { color: var(--signal); }

[data-theme="dark"] {
  --ink: #f5f6f6;
  --muted: #a3a7ab;
  --subtle: #73787d;
  --line: #303336;
  --soft-line: #292c2f;
  --surface: #191b1d;
  --canvas: #111315;
  --soft: #24272a;
  --purple: #f5f6f6;
  --purple-dark: #ffffff;
  --purple-soft: #292c2f;
  --purple-wash: #1e2022;
  --shadow: 0 1px 2px rgba(0,0,0,.2), 0 14px 36px rgba(0,0,0,.2);
}
[data-theme="dark"] .sidebar { background: #08090a; }
[data-theme="dark"] .topbar { background: rgba(17,19,21,.86); }
[data-theme="dark"] .nav-button.active { background: #f5f6f6; color: #0b0c0d; }
[data-theme="dark"] .btn.primary, [data-theme="dark"] .quick-create-trigger { background: #f5f6f6; border-color: #f5f6f6; color: #0b0c0d; }
[data-theme="dark"] .metric-icon.purple, [data-theme="dark"] .tag.purple, [data-theme="dark"] .owner-tab.active, [data-theme="dark"] .settings-nav button.active { background: #f5f6f6; color: #0b0c0d; }
[data-theme="dark"] .toolbar, [data-theme="dark"] .search-trigger, [data-theme="dark"] .icon-button { background: rgba(25,27,29,.88); }
[data-theme="dark"] .data-table th, [data-theme="dark"] .month-card, [data-theme="dark"] .project-card .current-task, [data-theme="dark"] .drawer-body > .activity-section { background: #16181a; }
[data-theme="dark"] .month-card.current { background: #202326; }
[data-theme="dark"] .kanban-column { background: #202326; border-color: #303336; }
[data-theme="dark"] .progress span { background: #f5f6f6; }
[data-theme="dark"] .login-form-wrap { background: #111315; }

@media (max-width: 900px) {
  .main { margin-left: 0; }
  .sidebar { width: 248px; }
  .content { padding-bottom: 118px; }
  .mobile-bottom-nav {
    left: 12px;
    right: 12px;
    height: 68px;
    border-color: #dfe2e4;
    border-radius: 22px;
    background: rgba(255,255,255,.95);
    box-shadow: 0 18px 48px rgba(8,12,16,.16);
  }
  .mobile-bottom-nav button { border-radius: 15px; }
  .mobile-bottom-nav button.active { background: #0c0d0e; color: #fff; }
  [data-theme="dark"] .mobile-bottom-nav { background: rgba(25,27,29,.96); }
  [data-theme="dark"] .mobile-bottom-nav button.active { background: #f5f6f6; color: #0b0c0d; }
}

@media (max-width: 650px) {
  .content { padding: 24px 14px 118px; }
  .topbar { height: 66px; padding: 0 14px; }
  .page-head { min-height: 44px; margin-bottom: 20px; gap: 15px; }
  h1 { font-size: 29px; }
  .page-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .page-actions .btn { width: 100%; min-width: 0; padding-inline: 10px; }
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .metric-card { min-height: 126px; padding: 17px; border-radius: 17px; }
  .metric-head { align-items: flex-start; }
  .metric-head > span:first-child { max-width: calc(100% - 38px); line-height: 1.25; }
  .metric-icon { width: 31px; height: 31px; }
  .metric-value { margin-top: 17px; font-size: 24px; }
  .metric-foot { line-height: 1.3; }
  .panel, .table-wrap { border-radius: 17px; }
  .panel-head { min-height: 64px; padding: 12px 17px; }
  .list-row { padding: 14px 17px; }
  .toolbar { padding: 9px; border-radius: 15px; }
  .toolbar > .select, .toolbar > .btn { flex: 1 1 calc(50% - 5px); min-width: 0; }
  .crm-owner-tabs { margin-inline: -2px; }
  .owner-tab { height: 39px; }
  .practice-widget { padding: 18px; }
  .month-compare { padding: 12px; }
  .client-grid, .project-grid { gap: 10px; }
  .entity-card { padding: 18px; border-radius: 17px; }
  .entity-head, .entity-stats, .entity-foot, .current-task, .progress, .progress-label { min-width: 0; max-width: 100%; }
  .settings-section { padding: 20px; }
  .drawer-head { min-height: 78px; padding: 16px 18px; }
  .drawer-body { padding: 20px 18px 34px; }
  .modal { border-radius: 21px; }
  .modal-head, .modal-body, .modal-foot { padding-left: 20px; padding-right: 20px; }
  .kanban-column { width: min(286px, calc(100vw - 40px)); }
  .google-calendar-layout { min-width: 0; }
  .quick-create { right: 16px; }
}

@media (max-width: 390px) {
  .metric-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 118px; }
  .page-actions { grid-template-columns: 1fr; }
}

/* Whiteselect interface v2 · compact bento workspace */
:root {
  --canvas: #dfe2e3;
  --surface: #ffffff;
  --soft: #f2f4f4;
  --line: #e5e7e8;
  --soft-line: #eef0f1;
  --ink: #0a0b0b;
  --muted: #626769;
  --subtle: #9a9fa1;
  --purple: #0a0b0b;
  --purple-dark: #000;
  --purple-soft: #eef0f1;
  --purple-wash: #f6f7f7;
  --signal: #f0f2f2;
  --radius: 22px;
  --shadow: 0 1px 2px rgba(5,8,10,.025), 0 10px 28px rgba(5,8,10,.04);
}

.icon { stroke-width: 1.55; }
.app-shell { padding: 12px; }
.sidebar {
  inset: 12px auto 12px 12px;
  width: 194px;
  padding: 17px 12px 14px;
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 25px;
  background: rgba(255,255,255,.96);
  color: var(--ink);
  box-shadow: 0 18px 50px rgba(8,11,13,.1);
}
.brand { height: 42px; padding: 0 8px; margin-bottom: 25px; }
.brand img { width: 118px; filter: none; }
.os-label { display: none; }
.nav-label { display: none; }
.nav-list { gap: 5px; }
.nav-button {
  height: 43px;
  padding: 0 9px;
  border-radius: 13px;
  color: #777c7f;
  gap: 9px;
  font-size: 11px;
}
.nav-button > .icon {
  width: 29px;
  height: 29px;
  padding: 6px;
  border-radius: 9px;
  background: #f1f3f3;
  color: #777c7f;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.nav-button:hover { color: #0a0b0b; background: #f4f5f5; }
.nav-button:hover > .icon { color: #0a0b0b; transform: scale(1.04); }
.nav-button.active { background: #0a0b0b; color: #fff; box-shadow: 0 8px 18px rgba(6,8,10,.16); }
.nav-button.active > .icon { background: rgba(255,255,255,.14); color: #fff; }
.nav-button .badge-count { min-width: 18px; height: 18px; padding: 0 5px; background: #edf0f0; color: #74797c; font-size: 9px; }
.nav-button.active .badge-count { background: var(--signal); color: #0a0b0b; }
.workspace-chip { margin: 12px 0 0; padding: 15px 6px 0; border-color: #eceeef; gap: 8px; }
.workspace-chip .avatar { width: 31px; height: 31px; background: #0a0b0b; color: #fff; font-size: 10px; }
.workspace-chip strong { color: #151718; font-size: 11px; }
.workspace-chip span { color: #9a9fa1; font-size: 9px; }
.workspace-chip .logout-button { width: 30px; height: 30px; border: 0; background: #f1f3f3; color: #6e7376; border-radius: 10px; }

.main { margin-left: 206px; min-height: calc(100vh - 24px); border-radius: 25px; background: #f4f5f5; overflow: clip; }
.topbar {
  height: 64px;
  margin: 0;
  padding: 0 clamp(20px,2.5vw,38px);
  border-bottom: 1px solid #e7e9ea;
  background: rgba(244,245,245,.88);
  backdrop-filter: blur(26px) saturate(1.25);
}
.breadcrumbs { font-size: 11px; }
.sync-badge { padding: 6px 9px; border: 0; background: #eceeee; font-size: 8px; }
.sync-badge.cloud::before { content: ""; width: 5px; height: 5px; margin-right: 5px; border-radius: 50%; background: #5be19a; display: inline-block; }
.search-trigger { width: min(270px,28vw); height: 38px; border: 0; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px #e5e7e8, 0 4px 12px rgba(5,8,10,.025); }
.search-trigger span { font-size: 11px; }
.key { font-size: 9px; }
.icon-button { width: 38px; height: 38px; border: 0; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px #e5e7e8; }
.icon-button:hover { box-shadow: inset 0 0 0 1px #d6d9da, 0 7px 16px rgba(5,8,10,.06); transform: translateY(-1px); }
.status-dot { background: var(--signal); }

.content { max-width: 1720px; padding: 28px clamp(20px,2.5vw,38px) 70px; }
.page-enter { animation: interface-in .2s cubic-bezier(.2,.8,.2,1) both; }
@keyframes interface-in { from { opacity: .72; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.page-head { min-height: 48px; margin-bottom: 22px; }
h1 { font-size: clamp(27px,2.35vw,35px); letter-spacing: -.052em; }
.page-actions { gap: 7px; }
.btn { min-height: 39px; padding: 0 13px; border: 0; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px #e1e4e5, 0 4px 12px rgba(5,8,10,.025); font-size: 11px; }
.btn:hover { border: 0; transform: translateY(-1px); box-shadow: inset 0 0 0 1px #d4d7d9, 0 8px 18px rgba(5,8,10,.07); }
.btn:active { transform: translateY(0) scale(.985); }
.btn.primary { background: #0a0b0b; border: 0; box-shadow: 0 8px 18px rgba(5,8,10,.15); }
.btn.primary:hover { border: 0; }
.btn.small { min-height: 31px; font-size: 10px; }

.metric-grid { gap: 10px; margin-bottom: 10px; }
.metric-card { min-height: 119px; padding: 17px 18px; border: 0; border-radius: 18px; box-shadow: var(--shadow); }
.metric-card:hover { border: 0; transform: translateY(-2px); box-shadow: 0 14px 28px rgba(5,8,10,.07); }
.metric-head { font-size: 10px; }
.metric-icon { width: 31px; height: 31px; border-radius: 10px; }
.metric-icon .icon { width: 14px; height: 14px; }
.metric-icon.purple { background: #0a0b0b; }
.metric-icon.green { background: #e8faef; }
.metric-value { margin-top: 13px; font-size: 26px; }
.metric-foot { margin-top: 5px; font-size: 9px; }

.dashboard-secondary-metrics {
  padding: 7px;
  border-radius: 21px;
  background: #0c0e0f;
  box-shadow: 0 18px 38px rgba(5,8,10,.13);
  gap: 0;
}
.dashboard-secondary-metrics .metric-card { min-height: 105px; border-radius: 15px; background: transparent; color: #fff; box-shadow: none; position: relative; }
.dashboard-secondary-metrics .metric-card:not(:last-child)::after { content: ""; position: absolute; top: 17px; right: 0; bottom: 17px; width: 1px; background: #282b2d; }
.dashboard-secondary-metrics .metric-card:hover { background: #151719; transform: none; box-shadow: none; }
.dashboard-secondary-metrics .metric-head { color: #8d9295; }
.dashboard-secondary-metrics .metric-icon { background: #222527; color: #fff; }
.dashboard-secondary-metrics .metric-value { color: #fff; }
.dashboard-secondary-metrics .metric-foot { color: #656b6e; }

.dashboard-insights-grid, .split-grid, .dashboard-grid { gap: 10px; margin-bottom: 10px; }
.panel { border: 0; border-radius: 20px; box-shadow: var(--shadow); }
.panel-head { min-height: 61px; padding: 0 18px; }
.panel-title { font-size: 12px; }
.panel-meta { margin-top: 3px; font-size: 9px; }
.panel-pad { padding: 18px; }
.list-row { min-height: 59px; padding: 11px 18px; }
.row-icon { width: 32px; height: 32px; border-radius: 10px; }
.row-main strong { font-size: 11px; }
.row-main span { margin-top: 3px; font-size: 9px; }
.row-side strong { font-size: 10px; }
.practice-widget, .month-compare { min-height: 216px; padding: 15px; }
.donut-chart { width: 122px; }
.donut-chart::after { inset: 24px; }
.month-card { padding: 13px; border: 0; border-radius: 14px; background: #f2f4f4; }
.month-card.current { border: 0; background: #0c0e0f; color: #fff; box-shadow: none; }
.month-card.current .month-stat { border-color: #282b2d; }
.month-card.current .month-stat span { color: #777d80; }
.month-card.current .month-card-head { border-color: #282b2d; }
.month-card.current .month-card-head span { background: var(--signal); color: #0a0b0b; }

.toolbar { gap: 7px; margin-bottom: 10px; padding: 7px; border: 0; border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
.crm-owner-tabs { margin-bottom: 10px; padding: 0; gap: 6px; }
.owner-tab { height: 37px; padding: 0 11px; border: 0; border-radius: 12px; background: rgba(255,255,255,.7); font-size: 11px; }
.owner-tab.active { border: 0; background: #0a0b0b; }
.input, .select { height: 39px; }
.input, .select, .textarea, .modern-date-button { border: 1px solid #e2e5e6; border-radius: 11px; font-size: 11px; }
.toolbar .input, .toolbar .select { border: 0; background: #f2f4f4; }
.toolbar-search .icon { width: 14px; }
.view-toggle { border: 0; border-radius: 11px; background: #f2f4f4; }
.view-toggle button { height: 38px; border: 0; background: transparent; }

.table-wrap { border-radius: 18px; }
.data-table th { height: 43px; padding: 0 15px; background: #f2f4f4; font-size: 8px; }
.data-table td { height: 62px; padding: 0 15px; font-size: 11px; }
.data-table tbody tr { transition: background .15s ease, transform .15s ease; }
.data-table tbody tr:hover { background: #f7f8f8; }
.name-cell .avatar { width: 31px; height: 31px; }
.status { padding: 5px 8px; font-size: 9px; }
.tag { padding: 5px 7px; font-size: 9px; }

.kanban-wrap { padding-top: 1px; }
.kanban { gap: 10px; }
.kanban-column { width: 274px; min-height: 470px; padding: 9px; border: 0; border-radius: 18px; background: #e8eaeb; box-shadow: inset 0 0 0 1px #dfe2e3; }
.kanban-head { height: 40px; padding: 0 4px 7px; }
.kanban-head strong { font-size: 10px; }
.kanban-head span { width: 19px; height: 19px; font-size: 8px; }
.kanban-value { font-size: 8px; }
.kanban-card { gap: 10px; padding: 13px; border: 0; border-radius: 14px; box-shadow: 0 4px 12px rgba(5,8,10,.045); }
.kanban-card:hover { border: 0; transform: translateY(-2px); box-shadow: 0 12px 24px rgba(5,8,10,.09); }
.kanban-card-title { font-size: 11px; }
.kanban-card-meta { font-size: 8px; }
.kanban-card-meta .value { font-size: 10px; }
.calendar-appointment { padding: 8px 9px; }

.client-grid, .project-grid { gap: 10px; }
.entity-card { padding: 17px; border: 0; border-radius: 18px; box-shadow: var(--shadow); }
.entity-card:hover { border: 0; transform: translateY(-2px); box-shadow: 0 14px 28px rgba(5,8,10,.075); }
.entity-logo { width: 38px; height: 38px; border-radius: 12px; }
.entity-title strong { font-size: 12px; }
.entity-title span { font-size: 9px; }
.entity-stats { margin: 14px 0; padding: 12px 0; }
.project-card .current-task { margin-top: 12px; padding: 11px; border: 0; border-radius: 12px; }
.project-card .project-next-step { margin-top: 12px; padding-top: 11px; }

.settings-grid { grid-template-columns: 205px minmax(0,1fr); gap: 10px; }
.settings-nav { padding: 7px; }
.settings-nav button { height: 39px; border-radius: 11px; font-size: 10px; }
.settings-section { padding: 23px; }
.settings-section h2 { font-size: 18px; }

.overlay { backdrop-filter: blur(10px); }
.modal { border-radius: 25px; animation: modal-pop .2s cubic-bezier(.2,.85,.2,1) both; }
@keyframes modal-pop { from { opacity: 0; transform: translateY(8px) scale(.975); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal-head { padding: 20px 22px 15px; }
.modal-head h2 { font-size: 17px; }
.modal-body { padding: 22px; }
.modal-foot { padding: 15px 22px; }
.drawer { width: min(540px,100%); border: 0; animation: drawer-in .22s cubic-bezier(.2,.8,.2,1) both; }
@keyframes drawer-in { from { transform: translateX(24px); opacity: .6; } to { transform: translateX(0); opacity: 1; } }
.drawer-head { min-height: 76px; padding: 15px 22px; }
.drawer-head h2 { font-size: 17px; }
.drawer-body { padding: 22px; }
.drawer-body > .activity-section { margin-top: 34px; padding: 17px; }
.field label { font-size: 9px; }
.form-grid { row-gap: 17px; }

.quick-create-trigger { width: 50px; height: 50px; border-radius: 16px; background: var(--signal); color: #090a0a; box-shadow: 0 16px 32px rgba(7,10,12,.2); }
.quick-create-trigger:hover { background: #252829; transform: translateY(-2px) rotate(3deg); }
.quick-create.open .quick-create-trigger .icon { transform: rotate(90deg); }
.quick-create-trigger .icon { transition: transform .2s ease; }
.quick-create-menu { border: 0; border-radius: 18px; }

[data-theme="dark"] .sidebar { background: #17191a; border-color: #242728; }
[data-theme="dark"] .sidebar .brand img { filter: invert(1); }
[data-theme="dark"] .main { background: #111314; }
[data-theme="dark"] .topbar { background: rgba(17,19,20,.88); }
[data-theme="dark"] .workspace-chip strong { color: #fff; }
[data-theme="dark"] .nav-button.active { background: #f5f6f6; color: #0a0b0b; }
[data-theme="dark"] .nav-button.active > .icon { color: #0a0b0b; background: #e4e6e7; }
[data-theme="dark"] .dashboard-secondary-metrics { background: #050606; }
[data-theme="dark"] .toolbar { background: #191b1c; }
[data-theme="dark"] .toolbar .input, [data-theme="dark"] .toolbar .select { background: #242728; }

@media (max-width: 1180px) {
  .dashboard-secondary-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-secondary-metrics .metric-card:nth-child(2)::after { display: none; }
}

@media (max-width: 900px) {
  .app-shell { padding: 0; }
  .main { min-height: 100vh; margin-left: 0; border-radius: 0; }
  .sidebar { inset: 10px auto 10px 10px; width: 244px; transform: translateX(calc(-100% - 14px)); }
  .sidebar.open { transform: translateX(0); }
  .mobile-bottom-nav { height: 64px; }
  .mobile-bottom-nav button.active { background: #0a0b0b; }
}

@media (max-width: 650px) {
  .content { padding: 21px 13px 112px; }
  .topbar { height: 60px; padding: 0 13px; }
  .page-head { min-height: 42px; margin-bottom: 17px; }
  h1 { font-size: 27px; }
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .metric-card { min-height: 113px; padding: 14px; border-radius: 16px; }
  .metric-value { margin-top: 12px; font-size: 22px; }
  .metric-foot { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .dashboard-secondary-metrics { padding: 5px; border-radius: 18px; }
  .dashboard-secondary-metrics .metric-card { min-height: 100px; }
  .dashboard-secondary-metrics .metric-card::after { display: none; }
  .panel { border-radius: 17px; }
  .panel-head { min-height: 57px; padding: 10px 15px; }
  .panel-head .btn { white-space: nowrap; }
  .toolbar { padding: 6px; }
  .toolbar > .select, .toolbar > .btn { flex-basis: calc(50% - 4px); }
  .entity-card { padding: 15px; }
  .drawer-head { min-height: 70px; padding: 14px 17px; }
  .drawer-body { padding: 18px 17px 32px; }
  .kanban-column { width: min(270px,calc(100vw - 36px)); }
}

@media (max-width: 370px) {
  .metric-grid, .dashboard-secondary-metrics { grid-template-columns: 1fr; }
}

/* Whiteselect product interface v3 — custom shell, components and proportions */
:root {
  --canvas: #e9ebec;
  --surface: #fff;
  --soft: #f1f3f3;
  --soft-line: #eceeee;
  --line: #e1e4e5;
  --ink: #090a0a;
  --muted: #686d70;
  --subtle: #9a9fa2;
  --purple: #090a0a;
  --purple-dark: #000;
  --purple-soft: #edf0f0;
  --purple-wash: #f7f8f8;
  --signal: #f0f2f2;
  --radius: 24px;
  --radius-sm: 13px;
  --shadow: 0 2px 3px rgba(7,10,12,.025), 0 15px 35px rgba(7,10,12,.055);
  --shadow-lg: 0 28px 90px rgba(7,10,12,.19);
}

body { background: var(--canvas); }
.icon { stroke-width: 1.65; }

.app-shell { min-height: 100vh; padding: 14px; }
.sidebar {
  inset: 14px auto 14px 14px;
  width: 224px;
  padding: 19px 13px 16px;
  border: 0;
  border-radius: 28px;
  background: rgba(255,255,255,.97);
  box-shadow: 0 20px 55px rgba(7,10,12,.10);
}
.brand { height: 46px; margin: 0 0 28px; padding: 0 10px; }
.brand img { width: 132px; }
.nav-list { gap: 6px; }
.nav-button {
  height: 48px;
  padding: 0 11px;
  gap: 11px;
  border-radius: 15px;
  color: #686d70;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -.005em;
}
.nav-button > .icon {
  width: 32px;
  height: 32px;
  padding: 7px;
  border-radius: 11px;
  color: #74797c;
  background: #f0f2f2;
}
.nav-button:hover { color: #090a0a; background: #f4f5f5; }
.nav-button:hover > .icon { background: #e7eaea; color: #090a0a; }
.nav-button.active { color: #fff; background: #090a0a; box-shadow: 0 10px 23px rgba(7,10,12,.18); }
.nav-button.active > .icon { color: #fff; background: #242626; }
.nav-button .badge-count { min-width: 21px; height: 21px; font-size: 10px; }
.nav-button.active .badge-count { color: #090a0a; background: var(--signal); }
.workspace-chip { margin: 13px 2px 0; padding: 17px 7px 0; gap: 10px; }
.workspace-chip .avatar { width: 36px; height: 36px; font-size: 11px; }
.workspace-chip strong { font-size: 12px; }
.workspace-chip span { margin-top: 2px; font-size: 10px; }

.main {
  min-height: calc(100vh - 28px);
  margin-left: 238px;
  border-radius: 28px;
  background: #f5f6f6;
  overflow: clip;
}
.topbar {
  width: auto;
  top: 14px;
  height: 70px;
  margin: 14px 14px 0;
  padding: 0 12px 0 14px;
  border: 0;
  border-radius: 20px;
  color: #fff;
  background: rgba(8,9,10,.96);
  box-shadow: 0 15px 38px rgba(7,10,12,.15);
  backdrop-filter: blur(28px) saturate(1.2);
}
.topbar-context { min-width: 0; display: flex; align-items: center; gap: 11px; }
.topbar-page-icon { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; color: #090a0a; background: var(--signal); }
.breadcrumbs { min-width: 0; display: grid; gap: 2px; }
.breadcrumbs span { color: #777d80; font-size: 9px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
.breadcrumbs b { overflow: hidden; color: #fff; font-size: 13px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { gap: 7px; }
.sync-badge { min-height: 31px; padding: 0 10px; color: #909598; background: #1d1f20; font-size: 9px; display: inline-flex; align-items: center; }
.sync-badge.cloud { color: #b5f0d0; background: #163226; }
.search-trigger {
  width: min(310px,26vw);
  height: 42px;
  padding: 0 11px;
  border: 0;
  border-radius: 13px;
  color: #8b9093;
  background: #1d1f20;
  box-shadow: inset 0 0 0 1px #292c2e;
}
.search-trigger:hover { color: #fff; border: 0; box-shadow: inset 0 0 0 1px #3a3d3f; }
.search-trigger span { font-size: 11px; }
.key { color: #777d80; border-color: #343739; background: #252729; }
.topbar .icon-button { width: 42px; height: 42px; color: #f4f5f5; border: 0; border-radius: 13px; background: #1d1f20; box-shadow: inset 0 0 0 1px #292c2e; }
.topbar .icon-button:hover { color: var(--signal); background: #252829; box-shadow: inset 0 0 0 1px #3a3d3f; }
.status-dot { top: 8px; right: 8px; background: var(--signal); border-color: #1d1f20; }

.content { max-width: 1760px; padding: 31px clamp(27px,3vw,48px) 80px; }
.page-enter { animation: product-page-in .22s cubic-bezier(.2,.75,.25,1) both; }
@keyframes product-page-in { from { opacity: .65; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.page-head { min-height: 56px; margin-bottom: 28px; align-items: center; }
h1 { font-size: clamp(34px,3vw,43px); font-weight: 500; letter-spacing: -.057em; }
.page-actions { gap: 9px; }
.btn { min-height: 44px; padding: 0 16px; border: 0; border-radius: 14px; font-size: 12px; box-shadow: inset 0 0 0 1px #dfe2e3, 0 4px 13px rgba(7,10,12,.025); }
.btn:hover { border: 0; transform: translateY(-2px); box-shadow: inset 0 0 0 1px #cfd3d5, 0 12px 25px rgba(7,10,12,.09); }
.btn.primary { color: #fff; border: 0; background: #090a0a; box-shadow: 0 11px 23px rgba(7,10,12,.18); }
.btn.primary:hover { color: #090a0a; background: var(--signal); border: 0; box-shadow: 0 13px 25px rgba(7,10,12,.14); }
.btn.small { min-height: 34px; padding: 0 11px; font-size: 10px; border-radius: 11px; }

.metric-grid { gap: 13px; margin-bottom: 13px; }
.metric-card { min-height: 145px; padding: 20px 21px; border: 0; border-radius: 22px; box-shadow: var(--shadow); }
.metric-card:hover { border: 0; transform: translateY(-3px); box-shadow: 0 19px 42px rgba(7,10,12,.09); }
.metric-head { color: #656a6d; font-size: 11px; font-weight: 500; }
.metric-icon { width: 38px; height: 38px; border-radius: 12px; color: #141616; background: #eef0f0; }
.metric-icon .icon { width: 17px; height: 17px; }
.metric-icon.purple { color: #fff; background: #090a0a; }
.metric-icon.green { color: #0b5f3e; background: #dff6e9; }
.metric-icon.red { color: #a92d2d; background: #ffdfdd; }
.metric-value { margin-top: 19px; font-size: 31px; letter-spacing: -.045em; }
.metric-foot { margin-top: 7px; font-size: 10px; }
.dashboard-secondary-metrics { margin-bottom: 13px; padding: 8px; border-radius: 24px; }
.dashboard-secondary-metrics .metric-card { min-height: 126px; padding: 19px; border-radius: 17px; }
.dashboard-secondary-metrics .metric-icon { background: #26292a; }
.dashboard-secondary-metrics .metric-value { font-size: 28px; }

.dashboard-grid, .dashboard-insights-grid, .split-grid { gap: 13px; margin-bottom: 13px; }
.panel { border: 0; border-radius: 23px; box-shadow: var(--shadow); }
.panel-head { min-height: 72px; padding: 0 21px; border-color: #edf0f0; }
.panel-title { font-size: 13px; }
.panel-meta { margin-top: 4px; font-size: 10px; }
.panel-pad { padding: 22px; }
.list-row { min-height: 70px; padding: 13px 21px; gap: 13px; }
.row-icon { width: 38px; height: 38px; border-radius: 12px; }
.row-main strong { font-size: 12px; }
.row-main span { font-size: 10px; }
.row-side strong { font-size: 11px; }
.practice-widget, .month-compare { min-height: 248px; padding: 19px; }
.month-card { padding: 16px; border: 0; border-radius: 17px; }
.month-card.current { background: #0b0c0d; }
.donut-chart { width: 137px; }

.crm-owner-tabs { gap: 8px; margin-bottom: 13px; }
.owner-tab { height: 43px; padding: 0 14px; border: 0; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1px #e3e6e7; font-size: 11px; }
.owner-tab.active { color: #fff; border: 0; background: #090a0a; box-shadow: 0 9px 20px rgba(7,10,12,.14); }
.owner-tab.active span { color: #090a0a; background: var(--signal); }
.toolbar { min-height: 58px; gap: 9px; margin-bottom: 13px; padding: 8px; border: 0; border-radius: 18px; background: #fff; box-shadow: var(--shadow); }
.input, .select { height: 42px; }
.input, .select, .textarea, .modern-date-button { border: 1px solid #dfe3e4; border-radius: 13px; font-size: 12px; }
.toolbar .input, .toolbar .select { border: 0; background: #f1f3f3; }
.toolbar-search .icon { left: 14px; width: 15px; }
.toolbar-search .input { padding-left: 42px; }
.view-toggle { border: 0; border-radius: 13px; background: #f1f3f3; }
.view-toggle button { width: 43px; height: 42px; border: 0; }
.view-toggle button.active { color: #fff; background: #090a0a; }

.table-wrap { border-radius: 22px; }
.data-table th { height: 49px; padding: 0 18px; background: #f0f2f2; font-size: 9px; }
.data-table td { height: 72px; padding: 0 18px; font-size: 12px; }
.data-table tbody tr:hover { background: #f7f8f8; }
.name-cell { gap: 12px; }
.name-cell .avatar { width: 36px; height: 36px; }
.status { padding: 6px 9px; border-radius: 9px; font-size: 10px; }
.tag { padding: 5px 8px; border-radius: 8px; font-size: 10px; }

.kanban { gap: 13px; }
.kanban-column { width: 300px; min-height: 510px; padding: 11px; border: 0; border-radius: 21px; background: #e8ebeb; box-shadow: inset 0 0 0 1px #dde1e2; }
.kanban-head { height: 47px; padding: 0 5px 9px; }
.kanban-head strong { font-size: 11px; }
.kanban-head span { width: 23px; height: 23px; border-radius: 8px; font-size: 9px; }
.kanban-cards { gap: 10px; }
.kanban-card { gap: 12px; padding: 16px; border: 0; border-radius: 17px; box-shadow: 0 5px 15px rgba(7,10,12,.055); }
.kanban-card:hover { transform: translateY(-3px); box-shadow: 0 15px 29px rgba(7,10,12,.11); }
.kanban-card-title { font-size: 12px; line-height: 1.35; }
.kanban-card-meta { font-size: 9px; }
.kanban-card-meta .value { font-size: 11px; }
.calendar-appointment { padding: 10px 11px; border-radius: 12px; }

.client-grid, .project-grid { gap: 13px; }
.entity-card { padding: 21px; border: 0; border-radius: 22px; box-shadow: var(--shadow); }
.entity-card:hover { transform: translateY(-3px); box-shadow: 0 19px 40px rgba(7,10,12,.09); }
.entity-logo { width: 44px; height: 44px; border-radius: 14px; }
.entity-title strong { font-size: 13px; }
.entity-title span { margin-top: 4px; font-size: 10px; }
.entity-stats { margin: 17px 0; padding: 15px 0; }
.project-card .current-task { margin-top: 15px; padding: 14px; border-radius: 14px; }
.project-card .project-next-step { margin-top: 15px; padding-top: 14px; }

.settings-grid { grid-template-columns: 220px minmax(0,1fr); gap: 13px; }
.settings-nav { padding: 9px; }
.settings-nav button { height: 44px; border-radius: 13px; font-size: 11px; }
.settings-section { padding: 28px; }
.settings-section h2 { font-size: 21px; }

.overlay { backdrop-filter: blur(13px); }
.modal { border: 0; border-radius: 28px; box-shadow: var(--shadow-lg); }
.modal-head { padding: 23px 25px 18px; }
.modal-head h2 { font-size: 20px; }
.modal-body { padding: 25px; }
.modal-foot { padding: 17px 25px; }
.drawer { width: min(580px,100%); box-shadow: -28px 0 80px rgba(7,10,12,.14); }
.drawer-head { min-height: 86px; padding: 17px 25px; }
.drawer-head h2 { font-size: 20px; }
.drawer-body { padding: 25px; }
.drawer-body > .activity-section { margin-top: 38px; padding: 19px; border-radius: 18px; }
.form-grid { row-gap: 19px; }
.field label { margin-bottom: 7px; font-size: 10px; }
.modern-date-button { min-height: 44px; }
.date-picker-popover { border-radius: 24px; box-shadow: var(--shadow-lg); }

.quick-create { right: 30px; bottom: 27px; }
.quick-create-trigger { width: 58px; height: 58px; border-radius: 19px; }
.quick-create-menu { border-radius: 21px; }

[data-theme="dark"] body { background: #060707; }
[data-theme="dark"] .sidebar { background: #151718; }
[data-theme="dark"] .main { background: #101213; }
[data-theme="dark"] .topbar { background: rgba(3,4,4,.97); }
[data-theme="dark"] .toolbar { background: #191b1c; }
[data-theme="dark"] .toolbar .input, [data-theme="dark"] .toolbar .select { background: #26292a; }
[data-theme="dark"] .owner-tab { background: #191b1c; box-shadow: inset 0 0 0 1px #292c2d; }
[data-theme="dark"] .owner-tab.active { color: #090a0a; background: var(--signal); }
[data-theme="dark"] .owner-tab.active span { background: #090a0a; color: #fff; }

@media (max-width: 1180px) {
  .sidebar { width: 210px; }
  .main { margin-left: 224px; }
  .search-trigger { width: 215px; }
}

@media (max-width: 900px) {
  .app-shell { padding: 0; }
  .main { min-height: 100vh; margin-left: 0; border-radius: 0; }
  .sidebar { inset: 10px auto 10px 10px; width: 260px; border-radius: 26px; transform: translateX(calc(-100% - 18px)); }
  .sidebar.open { transform: translateX(0); }
  .topbar { width: auto; top: 10px; margin: 10px 10px 0; }
  .mobile-bottom-nav { height: 68px; border: 0; border-radius: 22px; box-shadow: 0 18px 45px rgba(7,10,12,.16); }
  .mobile-bottom-nav button.active { color: #fff; background: #090a0a; }
}

@media (max-width: 650px) {
  .topbar { height: 64px; padding: 0 10px; border-radius: 18px; }
  .topbar-page-icon { width: 37px; height: 37px; border-radius: 12px; }
  .breadcrumbs span { display: none; }
  .breadcrumbs b { max-width: 104px; font-size: 12px; }
  .topbar-actions { gap: 5px; }
  .sync-badge, .search-trigger span, .search-trigger .key, .appearance-control { display: none; }
  .search-trigger { width: 40px; height: 40px; padding: 0; justify-content: center; }
  .topbar .icon-button { width: 40px; height: 40px; }
  .content { padding: 25px 14px 118px; }
  .page-head { min-height: 48px; margin-bottom: 21px; }
  h1 { font-size: 32px; }
  .page-actions { width: 100%; justify-content: flex-start; }
  .page-actions .btn { flex: 1 1 auto; }
  .metric-grid { gap: 9px; }
  .metric-card { min-height: 132px; padding: 17px; border-radius: 19px; }
  .metric-value { margin-top: 16px; font-size: 26px; }
  .dashboard-secondary-metrics { padding: 6px; border-radius: 21px; }
  .dashboard-secondary-metrics .metric-card { min-height: 116px; }
  .panel { border-radius: 20px; }
  .panel-head { min-height: 66px; padding: 11px 17px; }
  .list-row { min-height: 68px; padding: 12px 17px; }
  .toolbar { padding: 7px; border-radius: 17px; }
  .toolbar > .select, .toolbar > .btn { flex-basis: calc(50% - 5px); }
  .entity-card { padding: 18px; border-radius: 20px; }
  .kanban-column { width: min(292px,calc(100vw - 38px)); }
  .drawer-head { min-height: 78px; padding: 15px 19px; }
  .drawer-body { padding: 21px 19px 38px; }
  .quick-create { right: 18px; bottom: 91px; }
  .quick-create-trigger { width: 52px; height: 52px; border-radius: 17px; }
}

@media (max-width: 390px) {
  .metric-grid, .dashboard-secondary-metrics { grid-template-columns: 1fr; }
  .metric-card { min-height: 120px; }
  .topbar-page-icon { display: none; }
}

/* Whiteselect interface v4 — monochrome, spacious and visualization-led */
:root {
  --signal: #f0f2f2;
  --green: #333638;
  --green-soft: #eef0f0;
  --amber: #5d6265;
  --amber-soft: #f0f2f2;
}

.nav-button.active .badge-count { color: #090a0a; background: #fff; }
.topbar-page-icon { color: #090a0a; background: #fff; }
.topbar .icon-button:hover { color: #fff; background: #2b2e2f; }
.status-dot { background: #fff; }
.sync-badge.cloud { color: #daddde; background: #222526; }
.btn.primary:hover { color: #fff; background: #252829; }
.owner-tab.active span { color: #090a0a; background: #fff; }
.quick-create-trigger, .quick-create-trigger:hover { color: #fff; background: #090a0a; }
.login-kicker { color: #090a0a; }
.metric-icon.green, .metric-icon.red { color: #151718; background: #eef0f0; }
.status.green, .status.amber, .status.purple, .tag.purple { color: #323638; background: #ecefef; }
.status.green::before, .status.amber::before, .status.purple::before { background: #555a5d; }
.month-card.current .month-card-head span { color: #090a0a; background: #fff; }
.progress span, .bar span { background: #111314; }
.checkbox-option input { accent-color: #090a0a; }

.topbar { height: 74px; padding-inline: 16px; border-radius: 22px; }
.topbar-page-icon { width: 44px; height: 44px; border-radius: 14px; }
.search-trigger { height: 46px; }
.topbar .icon-button { width: 46px; height: 46px; }
.content { padding-top: 36px; }
.page-head { min-height: 62px; margin-bottom: 32px; }
h1 { font-size: clamp(37px,3.2vw,47px); }
.btn { min-height: 48px; padding-inline: 18px; border-radius: 15px; font-size: 13px; }
.btn.small { min-height: 38px; padding-inline: 13px; font-size: 11px; }
.btn.icon-only { width: 48px; }

.metric-grid { gap: 16px; margin-bottom: 16px; }
.metric-card { min-height: 158px; padding: 23px 24px; border-radius: 25px; }
.metric-icon { width: 42px; height: 42px; border-radius: 14px; }
.metric-icon .icon { width: 18px; height: 18px; }
.metric-head { font-size: 12px; }
.metric-value { margin-top: 22px; font-size: 34px; }
.metric-foot { margin-top: 9px; font-size: 11px; }
.dashboard-secondary-metrics { gap: 0; margin-bottom: 16px; padding: 9px; border-radius: 27px; }
.dashboard-secondary-metrics .metric-card { min-height: 136px; padding: 21px; border-radius: 19px; }

.dashboard-grid, .dashboard-insights-grid, .split-grid, .dashboard-visual-grid { gap: 16px; margin-bottom: 16px; }
.panel { border-radius: 26px; }
.panel-head { min-height: 78px; padding-inline: 24px; }
.panel-title { font-size: 14px; }
.panel-meta { margin-top: 5px; font-size: 11px; }
.panel-pad { padding: 25px; }
.list-row { min-height: 76px; padding: 15px 24px; }
.row-icon { width: 42px; height: 42px; border-radius: 14px; }
.row-main strong { font-size: 13px; }
.row-main span { font-size: 11px; }
.practice-widget, .month-compare { min-height: 272px; padding: 23px; }
.donut-chart { width: 150px; }
.month-card { padding: 19px; border-radius: 19px; }

.dashboard-visual-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
.visual-panel { min-width: 0; overflow: hidden; }
.funnel-visual { display: grid; gap: 16px; padding: 24px; }
.funnel-row { display: grid; gap: 8px; }
.funnel-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.funnel-label span { color: var(--muted); font-size: 11px; }
.funnel-label strong { font-size: 12px; font-weight: 500; }
.funnel-track { height: 12px; overflow: hidden; border-radius: 999px; background: #eef0f0; }
.funnel-track span { display: block; height: 100%; border-radius: inherit; background: hsl(210 2% var(--shade)); transition: width .25s ease; }
.project-progress-list { display: grid; padding: 11px 24px 20px; }
.project-progress-item { min-height: 65px; display: grid; grid-template-columns: minmax(0,1fr) minmax(170px,.85fr); align-items: center; gap: 22px; border-bottom: 1px solid var(--soft-line); }
.project-progress-item:last-child { border-bottom: 0; }
.project-progress-item > div:first-child { min-width: 0; }
.project-progress-item > div:first-child strong { display: block; overflow: hidden; font-size: 12px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.project-progress-item > div:first-child span { display: block; margin-top: 4px; color: var(--subtle); font-size: 10px; }
.project-progress-value { display: grid; grid-template-columns: 1fr 42px; align-items: center; gap: 12px; }
.project-progress-value .progress { height: 8px; }
.project-progress-value strong { font-size: 10px; font-weight: 500; text-align: right; }

.toolbar { min-height: 66px; margin-bottom: 16px; padding: 9px; border-radius: 21px; }
.input, .select { height: 48px; padding-inline: 15px; }
.input, .select, .textarea, .modern-date-button { border-radius: 15px; font-size: 13px; }
.modern-date-button { min-height: 48px; padding-inline: 15px; }
.textarea { min-height: 120px; padding: 14px 15px; }
.toolbar-search .input { padding-left: 45px; }
.view-toggle button { width: 48px; height: 48px; }
.owner-tab { height: 47px; padding-inline: 16px; border-radius: 15px; font-size: 12px; }
.table-wrap { border-radius: 25px; }
.data-table th { height: 54px; padding-inline: 20px; }
.data-table td { height: 78px; padding-inline: 20px; font-size: 13px; }
.name-cell .avatar { width: 39px; height: 39px; }

.kanban { gap: 16px; }
.kanban-column { width: 318px; min-height: 540px; padding: 13px; border-radius: 24px; }
.kanban-head { height: 51px; padding-inline: 7px; }
.kanban-card { padding: 18px; border-radius: 19px; }
.kanban-card-title { font-size: 13px; }

.client-grid { gap: 16px; }
.project-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.entity-card { padding: 25px; border-radius: 25px; }
.entity-logo { width: 48px; height: 48px; border-radius: 15px; }
.entity-title strong { font-size: 14px; }
.entity-title span { margin-top: 5px; font-size: 11px; }
.entity-stats { margin: 20px 0; padding: 18px 0; }

.project-status-overview { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 10px; margin-bottom: 16px; }
.project-status-overview button { min-width: 0; min-height: 104px; padding: 17px; border: 0; border-radius: 20px; background: #fff; box-shadow: var(--shadow); cursor: pointer; text-align: left; transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease; }
.project-status-overview button:hover { transform: translateY(-2px); box-shadow: 0 17px 35px rgba(7,10,12,.08); }
.project-status-overview button.active { color: #fff; background: #0b0c0d; }
.project-status-overview button > span { display: block; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.project-status-overview button.active > span { color: #aeb3b5; }
.project-status-overview button > strong { display: block; margin-top: 11px; font-size: 23px; font-weight: 500; }
.project-status-overview button > div { height: 6px; margin-top: 13px; overflow: hidden; border-radius: 99px; background: #eceeee; }
.project-status-overview button > div i { display: block; height: 100%; border-radius: inherit; background: #151718; }
.project-status-overview button > div.is-empty { background: transparent; box-shadow: inset 0 0 0 1px #e8eaea; }
.project-status-overview button > div.is-empty i { width: 0 !important; }
.project-status-overview button.active > div { background: #303334; }
.project-status-overview button.active > div i { background: #fff; }

.project-card { min-height: 350px; }
.project-card-visual { display: grid; grid-template-columns: 106px minmax(0,1fr); align-items: center; gap: 22px; margin-top: 25px; padding: 20px; border-radius: 20px; background: #f2f4f4; }
.project-progress-ring { width: 102px; aspect-ratio: 1; padding: 11px; border-radius: 50%; background: conic-gradient(#0b0c0d 0 var(--project-progress),#dfe2e3 var(--project-progress) 360deg); }
.project-progress-ring > div { width: 100%; height: 100%; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; }
.project-progress-ring strong { font-size: 25px; font-weight: 500; line-height: 1; letter-spacing: -.04em; }
.project-progress-ring span { margin-left: 2px; color: var(--subtle); font-size: 10px; }
.project-card-focus { min-width: 0; display: grid; gap: 15px; }
.project-card-focus > div { min-width: 0; }
.project-card-focus > div + div { padding-top: 14px; border-top: 1px solid #dfe2e3; }
.project-card-focus span { display: block; color: var(--subtle); font-size: 9px; font-weight: 500; letter-spacing: .07em; text-transform: uppercase; }
.project-card-focus strong { display: block; margin-top: 7px; overflow-wrap: anywhere; font-size: 12px; font-weight: 500; line-height: 1.4; }
.project-card > .progress { height: 7px; margin-top: 20px; }
.project-card .progress-label { margin-top: 10px; font-size: 11px; }

.drawer { width: min(620px,100%); }
.drawer-head { min-height: 94px; padding: 20px 30px; }
.drawer-head h2 { font-size: 22px; }
.drawer-body { padding: 30px; }
.modal-body { padding: 30px; }
.modal-head { padding: 26px 30px 20px; }
.modal-foot { padding: 19px 30px; }
.form-grid { column-gap: 20px; row-gap: 23px; }
.field label { margin-bottom: 9px; font-size: 11px; }
.detail-section { margin-bottom: 34px; }
.detail-section h3 { margin-bottom: 20px; font-size: 11px; }
.drawer-actions { margin-top: 32px; padding-top: 23px; gap: 10px; }
#project-edit-form + .detail-section { margin-top: 34px; padding-top: 27px; border-top: 1px solid var(--soft-line); }
#project-edit-form + .detail-section .section-title-row { margin-bottom: 22px; }
.workflow { gap: 0; }
.workflow-step { grid-template-columns: 31px minmax(0,1fr) auto; gap: 13px; padding: 12px 8px; border-radius: 14px; }
.workflow-step::before { left: 23px; }
.step-marker { width: 31px; height: 31px; font-size: 10px; }
.step-copy strong { padding-top: 6px; font-size: 13px; }
.step-copy span { margin-top: 5px; font-size: 11px; }
.project-task-insert { height: 27px; }
.project-task-insert::before { left: 23px; }
.project-task-add-point { width: 21px; height: 21px; margin-left: 13px; }
.project-task-actions { gap: 5px; }
.project-task-grip { width: 29px; height: 31px; }
.icon-button.mini { width: 31px; height: 31px; border-radius: 10px; }
.recurring-date, .project-task-note-label { margin-top: 12px; font-size: 10px; }
.recurring-date .input { height: 40px; }
.project-task-note { min-height: 70px; padding: 11px 12px; border-radius: 12px; font-size: 12px; }

[data-theme="dark"] .topbar-page-icon { color: #090a0a; background: #fff; }
[data-theme="dark"] .owner-tab.active { color: #fff; background: #050606; }
[data-theme="dark"] .owner-tab.active span { color: #090a0a; background: #fff; }
[data-theme="dark"] .metric-icon.green, [data-theme="dark"] .metric-icon.red { color: #fff; background: #2a2d2e; }
[data-theme="dark"] .status.green, [data-theme="dark"] .status.amber, [data-theme="dark"] .status.purple, [data-theme="dark"] .tag.purple { color: #daddde; background: #2a2d2e; }
[data-theme="dark"] .funnel-track, [data-theme="dark"] .project-status-overview button > div { background: #282b2c; }
[data-theme="dark"] .project-status-overview button { background: #191b1c; }
[data-theme="dark"] .project-status-overview button.active { background: #f3f4f4; color: #090a0a; }
[data-theme="dark"] .project-status-overview button.active > span { color: #62676a; }
[data-theme="dark"] .project-card-visual { background: #181a1b; }
[data-theme="dark"] .project-progress-ring { background: conic-gradient(#fff 0 var(--project-progress),#343738 var(--project-progress) 360deg); }
[data-theme="dark"] .project-progress-ring > div { background: #181a1b; }
[data-theme="dark"] .project-card-focus > div + div { border-color: #323536; }
[data-theme="dark"] .progress span, [data-theme="dark"] .bar span { background: #f2f3f3; }

@media (max-width: 1180px) {
  .project-status-overview { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .project-status-overview button { min-height: 94px; }
}

@media (max-width: 900px) {
  .dashboard-visual-grid, .project-grid { grid-template-columns: 1fr; }
}

@media (max-width: 650px) {
  .topbar { height: 66px; padding-inline: 10px; }
  .topbar .icon-button, .search-trigger { width: 42px; height: 42px; }
  .content { padding-top: 28px; }
  .page-head { margin-bottom: 24px; }
  h1 { font-size: 34px; }
  .metric-card { min-height: 144px; padding: 20px; }
  .metric-value { font-size: 29px; }
  .panel-head { min-height: 72px; padding-inline: 19px; }
  .funnel-visual { padding: 20px; }
  .project-progress-list { padding: 9px 19px 18px; }
  .project-progress-item { grid-template-columns: 1fr; gap: 10px; padding: 14px 0; }
  .toolbar { min-height: 62px; }
  .project-status-overview { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .project-status-overview button { min-height: 91px; padding: 14px; border-radius: 17px; }
  .project-card { min-height: 0; }
  .project-card-visual { grid-template-columns: 88px minmax(0,1fr); gap: 17px; margin-top: 21px; padding: 16px; }
  .project-progress-ring { width: 85px; padding: 9px; }
  .project-progress-ring strong { font-size: 21px; }
  .entity-card { padding: 20px; }
  .drawer-head { min-height: 82px; padding: 16px 20px; }
  .drawer-body { padding: 23px 20px 40px; }
  .form-grid { row-gap: 21px; }
  .workflow-step { padding-inline: 4px; }
}

@media (max-width: 390px) {
  .project-status-overview { grid-template-columns: 1fr; }
  .project-card-visual { grid-template-columns: 1fr; }
  .project-progress-ring { margin: 0 auto; }
}

/* Whiteselect interface v5 — unified icon fields and rebuilt task cards */
.metric-icon,
.row-icon,
.task-card-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  padding: 0;
  border-radius: 14px;
  color: #111314;
  background: #eef0f0;
  display: grid;
  place-items: center;
  box-shadow: none;
}
.metric-icon.purple,
.metric-icon.green,
.metric-icon.red,
.metric-icon.amber { color: #111314; background: #eef0f0; }
.metric-icon .icon,
.row-icon .icon,
.task-card-icon .icon { width: 18px; height: 18px; }
.dashboard-secondary-metrics .metric-icon { color: #fff; background: #26292a; }
.settings-nav button > .icon {
  width: 32px;
  height: 32px;
  padding: 7px;
  border-radius: 11px;
  color: #6f7477;
  background: #eef0f0;
}
.settings-nav button.active > .icon { color: #fff; background: #292c2d; }
.quick-create-menu button > .icon {
  width: 34px;
  height: 34px;
  padding: 8px;
  border-radius: 11px;
  color: #151718;
  background: #eef0f0;
}

.task-column { width: 326px; padding: 12px; }
.task-column .kanban-head { height: 50px; padding: 0 7px 10px; }
.task-column .kanban-cards { gap: 12px; }
.task-card {
  min-height: 0;
  gap: 0;
  padding: 17px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(7,10,12,.055);
}
.task-card:hover { transform: translateY(-2px); box-shadow: 0 15px 31px rgba(7,10,12,.10); }
.task-card-head { min-width: 0; display: grid; grid-template-columns: 42px minmax(0,1fr); align-items: start; gap: 12px; }
.task-card-heading { min-width: 0; padding-top: 1px; }
.task-card-heading > strong { display: -webkit-box; overflow: hidden; color: #111314; font-size: 14px; font-weight: 500; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.task-card-heading > span { display: flex; align-items: center; gap: 6px; margin-top: 7px; color: var(--subtle); font-size: 10px; }
.task-card-heading .priority-dot { width: 6px; height: 6px; margin: 0; flex: 0 0 6px; }
.task-card-relation { min-width: 0; height: 33px; margin-top: 14px; padding: 0 10px; border-radius: 10px; color: #62676a; background: #f2f4f4; display: flex; align-items: center; gap: 7px; }
.task-card-relation .icon { width: 13px; height: 13px; }
.task-card-relation span { overflow: hidden; font-size: 10px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.task-card-footer { min-width: 0; margin-top: 16px; padding-top: 14px; border-top: 1px solid #eceeee; display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 10px; }
.task-card-actions { display: flex; align-items: center; gap: 6px; }
.task-card-contact { width: 34px; height: 34px; padding: 0; border: 1px solid #dfe2e3; border-radius: 11px; color: #111314; background: #eef0f0; display: grid; place-items: center; cursor: pointer; transition: transform .16s ease, background .16s ease; }
.task-card-contact:hover { color: #fff; background: #111314; transform: scale(1.04); }
.task-card-date { min-width: 0; color: #767b7e; display: inline-flex; align-items: center; gap: 6px; font-size: 10px; white-space: nowrap; }
.task-card-date .icon { width: 14px; height: 14px; }
.task-card-owner { min-width: 0; color: #343739; display: inline-flex; align-items: center; gap: 6px; font-size: 10px; white-space: nowrap; }
.task-card-owner i { width: 23px; height: 23px; flex: 0 0 23px; border-radius: 50%; color: #fff; background: #111314; display: grid; place-items: center; font-size: 7px; font-style: normal; font-weight: 500; }
.task-card-toggle { width: 34px; height: 34px; padding: 0; border: 0; border-radius: 11px; color: #fff; background: #111314; display: grid; place-items: center; cursor: pointer; transition: transform .16s ease, background .16s ease; }
.task-card-toggle:hover { background: #303334; transform: scale(1.04); }
.task-card-toggle .icon { width: 15px; height: 15px; }
.task-card.is-complete { background: #f9fafa; }
.task-card.is-complete .task-card-icon { color: #fff; background: #111314; }
.task-card.is-complete .task-card-heading > strong { color: #777c7f; text-decoration: line-through; text-decoration-thickness: 1px; }
.task-card.is-complete .task-card-toggle { color: #111314; background: #e7eaea; }

@media (max-width: 650px) {
  .metric-icon, .row-icon, .task-card-icon { width: 40px; height: 40px; flex-basis: 40px; border-radius: 13px; }
  .task-column { width: min(310px,calc(100vw - 38px)); }
  .task-card { padding: 16px; border-radius: 18px; }
  .task-card-head { grid-template-columns: 40px minmax(0,1fr); gap: 11px; }
  .task-card-footer { grid-template-columns: minmax(0,1fr) auto auto; }
}

/* Whiteselect interface v6 — strictly black, white and neutral gray */
:root {
  --purple: #0b0c0d;
  --purple-dark: #000;
  --purple-soft: #eceeee;
  --purple-wash: #f5f6f6;
  --green: #303436;
  --green-soft: #eceeee;
  --amber: #555a5d;
  --amber-soft: #eff1f1;
  --red: #17191a;
  --red-soft: #eff1f1;
  --blue: #34383a;
  --blue-soft: #eef0f0;
}

::selection { color: #fff; background: #17191a; }
.sync-badge.cloud,
.sync-badge.syncing,
.sync-badge.conflict { color: #d5d8d9; background: #222526; }
.sync-badge.cloud::before { background: #fff; }
.trend-up,
.trend-down,
.chart-summary span,
.overdue,
.due-today { color: #17191a; }
.overdue { font-weight: 500; }
.due-today { color: #606568; font-weight: 500; }
.btn.danger { color: #17191a; background: #eff1f1; }
.btn.danger:hover { color: #fff; background: #17191a; }
.status,
.status.green,
.status.red,
.status.amber,
.status.blue,
.status.purple { color: #393d3f; background: #eceeee; }
.status::before,
.status.green::before,
.status.red::before,
.status.amber::before,
.status.blue::before,
.status.purple::before { background: #555a5d; }
.tag,
.tag.purple { color: #555a5d; background: #f0f2f2; }
.priority-dot.high { background: #111314; }
.priority-dot.medium { background: #74797c; }
.priority-dot.low { background: #c1c5c7; }
.input:focus,
.select:focus,
.textarea:focus,
.project-task-note:focus { border-color: #8e9395; box-shadow: 0 0 0 4px rgba(15,17,18,.08); }
.modern-date-button:focus-visible { border-color: #8e9395; box-shadow: 0 0 0 4px rgba(15,17,18,.08); }
.date-picker-day.selected { color: #fff; background: #111314; box-shadow: 0 7px 17px rgba(8,10,12,.22); }
.date-picker-day.today:not(.selected) { color: #111314; }
.date-picker-day:hover { color: #111314; background: #eceeee; }
.date-picker-today { color: #fff; background: #111314; }
.google-calendar-event { color: #34383a; background: #eef0f0; }
.google-calendar-event:hover { background: #e3e6e7; }
.google-calendar-event i { background: #111314; }
.google-calendar-date small { color: #fff; background: #111314; }
.google-calendar-day.today { box-shadow: inset 0 0 0 2px #111314; }
.google-upcoming-date { color: #111314; background: #eceeee; }
.calendar-appointment,
.calendar-appointment-button { color: #34383a; border-color: #dfe2e3; background: #f1f3f3; }
.calendar-appointment span { color: #73787b; }
.calendar-appointment-button:hover { border-color: #c8ccce; background: #e9ebec; }
.calendar-privacy-note { color: #34383a; background: #eef0f0; }
.calendar-privacy-note span { color: #73787b; }
.integration-logo.google { color: #fff; background: #111314; }
.activity-dot,
.activity-dot.purple,
.activity-dot.green { background: #777c7f; box-shadow: 0 0 0 1px #c9cdcf; }
.workflow-step.done .step-marker,
.workflow-step.current .step-marker { color: #fff; background: #111314; }
.workflow-step.current .step-marker { box-shadow: 0 0 0 4px #e3e6e7; }
.workflow-step:hover { background: rgba(10,12,13,.035); }
.workflow-step.drop-before::after,
.workflow-step.drop-after::after { background: #111314; box-shadow: 0 0 0 3px #e3e6e7; }
.project-task-actions .danger-icon { color: #555a5d; }
.duplicate-warning,
.login-error { color: #34383a; background: #eceeee; }
.toast.success .icon,
.toast.warning .icon { color: #fff; }
.deal-celebration { background: radial-gradient(circle at center,rgba(15,17,18,.15),rgba(15,17,18,.03) 46%,transparent 70%); }
.money-note { color: #111314; border-color: #111314; background: linear-gradient(135deg,#d9dcdd,#fff); box-shadow: 0 5px 14px rgba(8,10,12,.14); }
.celebration-card { border-color: rgba(255,255,255,.78); box-shadow: 0 28px 90px rgba(8,10,12,.22); }
.party-pig { filter: grayscale(1) contrast(1.1) drop-shadow(0 10px 13px rgba(8,10,12,.13)); }
.celebration-kicker { color: #111314; }
.line-chart .line { stroke: #111314; }
.line-chart .point { stroke: #111314; }
.focus-more { color: #34383a; background: #eef0f0; }
.mobile-bottom-nav button i { background: #111314; }

select.input,
select.select {
  --select-arrow: linear-gradient(45deg,transparent 50%,#676c6f 50%),linear-gradient(135deg,#676c6f 50%,transparent 50%);
  appearance: none;
  -webkit-appearance: none;
  padding-right: 44px;
  background-image: var(--select-arrow);
  background-repeat: no-repeat;
  background-position: calc(100% - 20px) 50%,calc(100% - 15px) 50%;
  background-size: 5px 5px,5px 5px;
}
.toolbar select.input,
.toolbar select.select {
  background-image: var(--select-arrow);
  background-repeat: no-repeat;
  background-position: calc(100% - 20px) 50%,calc(100% - 15px) 50%;
  background-size: 5px 5px,5px 5px;
}

/* Whiteselect interface v7 — original monochrome editorial imagery */
.editorial-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid #dadcdd;
  border-radius: 28px;
  background: #111314;
  box-shadow: 0 18px 46px rgba(9,11,12,.09);
}
.editorial-hero img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: grayscale(1);
  transform: scale(1.002);
  transition: transform .7s cubic-bezier(.2,.75,.2,1), filter .5s ease;
}
.editorial-hero:hover img { filter: grayscale(1) contrast(1.025); transform: scale(1.018); }
.dashboard-editorial-hero {
  height: clamp(170px,16vw,220px);
  margin-bottom: 18px;
}
.dashboard-editorial-hero img { object-position: center; }
.editorial-hero-shade {
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(90deg,rgba(8,9,10,.78) 0%,rgba(8,9,10,.61) 30%,rgba(8,9,10,.08) 62%,transparent 100%);
}
.editorial-hero-content {
  position: absolute;
  z-index: 2;
  inset: 0 auto 0 0;
  width: min(54%,620px);
  padding: clamp(22px,2.4vw,34px);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.editorial-eyebrow {
  color: inherit;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  opacity: .68;
}
.editorial-hero-content h2 {
  max-width: 560px;
  margin: 12px 0 auto;
  font-size: clamp(23px,2.35vw,34px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -.045em;
}
.editorial-live-stats {
  display: flex;
  gap: clamp(20px,3vw,46px);
  margin-top: 18px;
}
.editorial-live-stats div { display: grid; gap: 4px; }
.editorial-live-stats strong { font-size: 17px; font-weight: 500; }
.editorial-live-stats span { color: rgba(255,255,255,.58); font-size: 10px; white-space: nowrap; }
.sales-scene-banner {
  height: 112px;
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid #dadcdd;
  border-radius: 24px;
  color: #fff;
  background: #111314;
  display: grid;
  grid-template-columns: minmax(0,1fr) 190px;
  grid-template-rows: minmax(0,1fr);
  box-shadow: 0 12px 30px rgba(9,11,12,.07);
}
.sales-scene-banner > div { min-width: 0; min-height: 0; padding: 20px 25px; display: flex; flex-direction: column; justify-content: center; }
.sales-scene-banner strong { margin-top: 8px; overflow: hidden; font-size: 21px; font-weight: 500; letter-spacing: -.035em; text-overflow: ellipsis; white-space: nowrap; }
.sales-scene-banner small { margin-top: 5px; color: rgba(255,255,255,.54); font-size: 10px; }
.sales-scene-banner img {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: block;
  object-fit: cover;
  filter: grayscale(1) contrast(1.06);
  transition: transform .55s cubic-bezier(.2,.75,.2,1);
}
.sales-scene-banner:hover img { transform: scale(1.035); }
.crm-scene-banner img { object-position: center 35%; }
.pipeline-scene-banner img { object-position: center 38%; }
.dashboard-gradient-hero {
  position: relative;
  isolation: isolate;
  min-height: 190px;
  margin-bottom: 18px;
  overflow: hidden;
  padding: 30px 34px;
  border: 1px solid #242627;
  border-radius: 28px;
  color: #fff;
  background:
    linear-gradient(90deg,rgba(3,5,5,.92) 0%,rgba(3,5,5,.79) 48%,rgba(3,5,5,.62) 100%),
    url("assets/visuals/crm-horse-car-scene-v1.jpg") center 70% / cover no-repeat;
  box-shadow: 0 18px 42px rgba(8,10,11,.11);
}
.dashboard-gradient-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: .32;
  background: linear-gradient(105deg,transparent 0 60%,rgba(255,255,255,.045) 60% 60.2%,transparent 60.2% 72%,rgba(255,255,255,.025) 72% 72.15%,transparent 72.15%);
}
.dashboard-gradient-main { height: 100%; margin-top: 22px; display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; }
.dashboard-gradient-main h2 { margin: 0; font-size: clamp(27px,2.65vw,39px); font-weight: 500; line-height: 1.02; letter-spacing: -.045em; }
.dashboard-gradient-hero .editorial-live-stats { margin: 0 0 3px; }

@media (prefers-reduced-motion: reduce) {
  .editorial-hero img { transition: none; }
  .editorial-hero:hover img { transform: none; }
  .sales-scene-banner img { transition: none; }
  .sales-scene-banner:hover img { transform: none; }
}

@media (max-width: 650px) {
  .editorial-hero { border-radius: 22px; }
  .dashboard-editorial-hero { height: 230px; }
  .dashboard-editorial-hero img { object-position: 61% center; }
  .editorial-hero-shade { background: linear-gradient(90deg,rgba(8,9,10,.86),rgba(8,9,10,.56) 58%,rgba(8,9,10,.16)); }
  .editorial-hero-content { width: 100%; padding: 20px; }
  .editorial-hero-content h2 { max-width: 285px; font-size: 25px; }
  .editorial-live-stats { gap: 19px; }
  .editorial-live-stats strong { font-size: 15px; }
  .editorial-live-stats span { font-size: 9px; }
  .sales-scene-banner { height: 94px; grid-template-columns: minmax(0,1fr) 104px; border-radius: 20px; }
  .sales-scene-banner > div { padding: 16px 18px; }
  .sales-scene-banner strong { margin-top: 6px; font-size: 17px; }
  .sales-scene-banner small { font-size: 9px; }
  .dashboard-gradient-hero { min-height: 210px; padding: 23px 21px; border-radius: 22px; background-position: center, 64% 72%; }
  .dashboard-gradient-main { margin-top: 24px; align-items: flex-start; flex-direction: column; gap: 23px; }
  .dashboard-gradient-main h2 { font-size: 26px; }
  .dashboard-gradient-hero .editorial-live-stats { width: 100%; margin: 0; justify-content: space-between; }
}

/* Visual sales cockpit */
.dashboard-kpi-visuals {
  display: grid;
  grid-template-columns: repeat(12,minmax(0,1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.visual-kpi {
  min-width: 0;
  min-height: 238px;
  overflow: hidden;
  padding: 24px;
  border: 1px solid rgba(15,17,18,.055);
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(7,10,12,.055);
  transition: transform .2s ease, box-shadow .2s ease;
}
.visual-kpi:hover { transform: translateY(-3px); box-shadow: 0 20px 44px rgba(7,10,12,.085); }
.visual-kpi-pipeline { grid-column: span 6; color: #fff; background: #0b0c0d; border-color: #0b0c0d; }
.visual-kpi-rate, .visual-kpi-leads { grid-column: span 3; }
.visual-kpi-finance { grid-column: span 6; color: #fff; background: linear-gradient(135deg,#111314,#050606); border-color: #151718; }
.visual-kpi-followups, .visual-kpi-decisions { grid-column: span 3; }
.visual-kpi-head, .visual-kpi-label { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.visual-kpi-head > div:first-child { min-width: 0; }
.visual-kpi-head span, .visual-kpi-label span { display: block; color: #757a7d; font-size: 10px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
.visual-kpi-pipeline .visual-kpi-head span, .visual-kpi-finance .visual-kpi-head span { color: #858a8d; }
.visual-kpi-head strong { display: block; margin-top: 9px; font-size: 30px; font-weight: 500; line-height: 1; letter-spacing: -.04em; }
.visual-kpi-head.compact strong { font-size: 27px; }
.visual-kpi-icon { width: 40px; height: 40px; flex: 0 0 auto; border-radius: 13px; display: grid; place-items: center; color: #111314; background: #f0f1f1; }
.visual-kpi-icon.inverse { color: #0b0c0d; background: #fff; }
.visual-kpi-pipeline .visual-kpi-icon { color: #fff; background: #242728; }
.stage-column-chart { height: 105px; margin-top: 22px; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); align-items: end; gap: 9px; }
.stage-column { height: 100%; min-width: 0; display: grid; grid-template-rows: 1fr auto auto; gap: 6px; text-align: center; }
.stage-column-track { min-height: 60px; display: flex; align-items: flex-end; justify-content: center; border-radius: 9px; background: #181a1b; }
.stage-column-track i { width: 100%; min-height: 4px; border-radius: 8px; background: hsl(210 2% calc(92% - var(--stage)*11%)); transition: height .45s cubic-bezier(.2,.75,.2,1); }
.stage-column span { overflow: hidden; color: #787d80; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.stage-column strong { color: #fff; font-size: 10px; font-weight: 500; }
.visual-kpi-footer { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-top: 18px; padding-top: 15px; border-top: 1px solid #242728; }
.visual-kpi-footer span { display: grid; gap: 4px; }
.visual-kpi-footer small { color: #717679; font-size: 8px; text-transform: uppercase; letter-spacing: .08em; }
.visual-kpi-footer strong { font-size: 12px; font-weight: 500; }
.visual-kpi-label { align-items: center; }
.visual-kpi-label > .icon { color: #787d80; }
.kpi-ring, .followup-orbit { position: relative; width: 128px; aspect-ratio: 1; margin: 20px auto 15px; border-radius: 50%; background: conic-gradient(#0b0c0d calc(var(--value)*1%),#e9eaea 0); display: grid; place-items: center; }
.kpi-ring::after, .followup-orbit::after { content: ""; position: absolute; inset: 13px; border-radius: 50%; background: #fff; }
.kpi-ring.no-data { background: conic-gradient(#e9eaea 0 100%); }
.kpi-ring.no-data::before { content: ""; position: absolute; inset: -1px; border: 1px dashed #d7d9da; border-radius: 50%; }
.kpi-ring > div, .followup-orbit > div { position: relative; z-index: 1; text-align: center; }
.kpi-ring strong, .followup-orbit strong { display: block; font-size: 28px; font-weight: 500; line-height: 1; letter-spacing: -.04em; }
.kpi-ring span, .followup-orbit span { display: block; margin-top: 5px; color: #8a8e90; font-size: 8px; text-transform: uppercase; letter-spacing: .08em; }
.visual-kpi-rate p { margin: 0; color: #838789; font-size: 9px; line-height: 1.45; text-align: center; }
.pulse-chart { height: 105px; margin-top: 23px; display: grid; grid-template-columns: repeat(7,1fr); align-items: end; gap: 7px; }
.pulse-chart > div { height: 100%; display: grid; grid-template-rows: 1fr auto; align-items: end; gap: 7px; }
.pulse-chart i { width: 100%; min-height: 4px; border-radius: 7px 7px 3px 3px; background: linear-gradient(#0c0d0e,#5e6366); transition: height .45s cubic-bezier(.2,.75,.2,1); }
.pulse-chart span { color: #96999b; font-size: 8px; text-align: center; text-transform: uppercase; }
.pulse-caption { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 13px; border-top: 1px solid #eceeee; color: #737779; font-size: 9px; }
.lead-month-chart { height: 110px; margin-top: 20px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.lead-month-chart > div { min-width: 0; display: grid; grid-template-columns: minmax(0,1fr) auto; grid-template-rows: 1fr auto; align-items: end; gap: 6px 8px; }
.lead-month-chart > div > div { grid-column: 1 / -1; height: 76px; padding: 6px; border-radius: 11px; background: #f0f1f1; display: flex; align-items: flex-end; }
.lead-month-chart i { display: block; width: 100%; min-height: 4px; border-radius: 7px; background: #0b0c0d; transition: height .45s cubic-bezier(.2,.75,.2,1); }
.lead-month-chart .previous i { background: #aeb2b4; }
.lead-month-chart span { overflow: hidden; color: #85898b; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; text-transform: uppercase; }
.lead-month-chart strong { font-size: 10px; font-weight: 500; }
.finance-comparison { display: grid; gap: 16px; margin-top: 26px; }
.finance-comparison > div { display: grid; grid-template-columns: 64px minmax(0,1fr) 56px; align-items: center; gap: 12px; }
.finance-comparison span { color: #8d9294; font-size: 9px; }
.finance-comparison > div > div { height: 13px; padding: 3px; overflow: hidden; border-radius: 99px; background: #242728; }
.finance-comparison i { display: block; height: 100%; min-width: 3px; border-radius: inherit; background: #fff; transition: width .45s cubic-bezier(.2,.75,.2,1); }
.finance-comparison > div:nth-child(2) i { background: #aeb2b4; }
.finance-comparison > div:nth-child(3) i { background: #686d70; }
.finance-comparison strong { font-size: 10px; font-weight: 500; text-align: right; }
.followup-orbit { --value: var(--urgent); width: 112px; margin-top: 24px; background: conic-gradient(#0b0c0d calc(var(--urgent)*1%),#d5d7d8 0 75%,#eff0f0 0); }
.followup-orbit::before { content: ""; position: absolute; inset: -8px; border: 1px dashed #d9dbdc; border-radius: 50%; }
.followup-orbit.no-data { background: conic-gradient(#eceeee 0 100%); }
.followup-split { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 22px; }
.followup-split span { display: flex; align-items: center; gap: 6px; color: #737779; font-size: 8px; white-space: nowrap; }
.followup-split i { width: 7px; height: 7px; border-radius: 2px; background: #cfd2d3; }
.followup-split span:last-child i { background: #0b0c0d; }
.decision-stack { height: 36px; margin: 31px 0 20px; padding: 5px; border-radius: 13px; background: #eef0f0; display: flex; gap: 3px; }
.decision-stack i { min-width: 0; border-radius: 8px; transition: width .45s cubic-bezier(.2,.75,.2,1); }
.decision-stack .open, .decision-legend i.open { background: #0b0c0d; }
.decision-stack .won, .decision-legend i.won { background: #6f7476; }
.decision-stack .lost, .decision-legend i.lost { background: #cbd0d1; }
.decision-legend { display: grid; gap: 10px; }
.decision-legend span { display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 8px; color: #787c7e; font-size: 9px; }
.decision-legend i { width: 8px; height: 8px; border-radius: 3px; }
.decision-legend strong { color: #151718; font-size: 10px; font-weight: 500; }

@media (max-width: 1100px) {
  .visual-kpi-pipeline, .visual-kpi-finance { grid-column: span 6; }
  .visual-kpi-rate, .visual-kpi-leads, .visual-kpi-followups, .visual-kpi-decisions { grid-column: span 3; }
  .visual-kpi { padding: 20px; }
}
@media (max-width: 900px) {
  .dashboard-kpi-visuals { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; }
  .visual-kpi-pipeline, .visual-kpi-finance { grid-column: span 2; }
  .visual-kpi-rate, .visual-kpi-leads, .visual-kpi-followups, .visual-kpi-decisions { grid-column: span 1; }
}
@media (max-width: 560px) {
  .dashboard-kpi-visuals { grid-template-columns: 1fr; gap: 10px; }
  .visual-kpi-pipeline, .visual-kpi-finance, .visual-kpi-rate, .visual-kpi-leads, .visual-kpi-followups, .visual-kpi-decisions { grid-column: 1; }
  .visual-kpi { min-height: 218px; padding: 20px; border-radius: 22px; }
  .visual-kpi:hover { transform: none; }
  .stage-column-chart { height: 94px; }
  .kpi-ring { width: 120px; }
  .finance-comparison > div { grid-template-columns: 56px minmax(0,1fr) 52px; gap: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  .visual-kpi, .stage-column-track i, .pulse-chart i, .lead-month-chart i, .finance-comparison i, .decision-stack i { transition: none; }
}

.dashboard-kpi-visuals > .visual-kpi-pipeline { grid-column: span 7; min-height: 292px; }
.essential-kpi-grid { grid-column: span 5; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.essential-kpi-grid article { min-width: 0; min-height: 140px; padding: 20px; border: 1px solid rgba(15,17,18,.055); border-radius: 22px; background: #fff; box-shadow: 0 12px 30px rgba(7,10,12,.05); display: flex; flex-direction: column; justify-content: space-between; }
.essential-kpi-grid article > span { display: flex; align-items: center; gap: 8px; color: #777c7e; font-size: 9px; font-weight: 500; letter-spacing: .055em; text-transform: uppercase; }
.essential-kpi-grid article > strong { display: block; margin-top: 15px; color: #0b0c0d; font-size: 27px; font-weight: 500; line-height: 1; letter-spacing: -.035em; }
.essential-kpi-grid article > small { display: block; margin-top: 9px; overflow: hidden; color: #9a9ea0; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-visual-single { grid-template-columns: 1fr; }

@media (max-width: 900px) {
  .dashboard-kpi-visuals > .visual-kpi-pipeline, .dashboard-kpi-visuals > .essential-kpi-grid { grid-column: span 2; }
}
@media (max-width: 560px) {
  .dashboard-kpi-visuals > .visual-kpi-pipeline, .dashboard-kpi-visuals > .essential-kpi-grid { grid-column: 1; }
  .dashboard-kpi-visuals > .visual-kpi-pipeline { min-height: 270px; }
  .essential-kpi-grid { gap: 8px; }
  .essential-kpi-grid article { min-height: 126px; padding: 16px; border-radius: 18px; }
  .essential-kpi-grid article > strong { font-size: 23px; }
}
@media (max-width: 380px) {
  .essential-kpi-grid { grid-template-columns: 1fr; }
}

/* Unified bare icon language */
.metric-icon,
.row-icon,
.task-card-icon,
.visual-kpi-icon,
.empty-icon,
.topbar-page-icon,
.pipeline-followup-preview .row-icon,
.command-item .row-icon,
.integration-logo {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.metric-icon,
.row-icon,
.task-card-icon,
.visual-kpi-icon { color: #17191a !important; }
.visual-kpi-pipeline .visual-kpi-icon,
.visual-kpi-finance .visual-kpi-icon { color: #fff !important; }
.topbar-page-icon { color: #fff !important; }
.nav-button > .icon,
.quick-create-menu button > .icon {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.nav-button.active > .icon { color: currentColor !important; background: transparent !important; }
.task-card.is-complete .task-card-icon { color: #17191a !important; background: transparent !important; }
.integration-logo.google { color: #17191a !important; }

/* Explicit pipeline distribution bars */
.stage-column-track {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(to top,rgba(255,255,255,.045) 1px,transparent 1px) 0 0 / 100% 25%,
    #1b1d1e;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.035);
}
.stage-column-track i {
  position: absolute;
  left: 22%;
  bottom: 0;
  width: 56%;
  min-height: 0;
  border-radius: 8px 8px 3px 3px;
  background: hsl(210 2% calc(96% - var(--stage)*10%));
  box-shadow: 0 -5px 18px rgba(255,255,255,.08);
}
.stage-column-track.is-empty i { display: none; }
.stage-column-track b {
  position: absolute;
  z-index: 2;
  top: 8px;
  right: 8px;
  min-width: 31px;
  height: 20px;
  padding: 0 6px;
  border-radius: 7px;
  color: #f4f5f5;
  background: rgba(5,6,6,.68);
  display: grid;
  place-items: center;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: .02em;
}
.stage-column-track.is-empty b { color: #73787a; background: rgba(255,255,255,.035); }
.stage-column-track em {
  position: absolute;
  z-index: 3;
  left: 7px;
  right: 7px;
  bottom: 7px;
  overflow: hidden;
  color: #fff;
  font-size: 9px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 5px rgba(0,0,0,.45);
}
.stage-column-track.is-empty em { color: #73787a; text-shadow: none; }

/* Prominent activity history */
.drawer-body > .activity-section {
  margin: 34px 0 5px;
  padding: 19px;
  border: 1px solid #dfe2e3;
  border-radius: 20px;
  background: #f5f6f6;
}
.pipeline-contact-log + .activity-section { margin: 14px 0 24px; }
.activity-section-head { min-height: 42px !important; }
.activity-section-head > div { display: grid; gap: 4px; }
.activity-section-head h3 { font-size: 16px; font-weight: 600; letter-spacing: -.02em; }
.activity-eyebrow {
  color: #888d90;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.activity-section-head .tag { min-height: 26px; padding: 0 9px; display: inline-flex; align-items: center; }
.activity-timeline { margin-top: 15px; display: grid; gap: 9px; }
.activity-entry {
  position: relative;
  display: grid;
  grid-template-columns: 14px minmax(0,1fr);
  gap: 9px;
  padding: 14px 15px 16px;
  border: 1px solid #e1e3e4;
  border-radius: 14px;
  background: #fff;
}
.activity-entry:last-child { padding-bottom: 16px; }
.activity-entry::before { display: none !important; }
.activity-entry-icon {
  width: 14px;
  height: 14px;
  margin-top: 2px;
  border-radius: 0;
  display: grid;
  place-items: center;
  color: #777c7f;
  background: transparent;
}
.activity-entry-icon .icon { width: 11px; height: 11px; }
.activity-entry-content { min-width: 0; }
.activity-entry-top { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 7px; }
.activity-kind { color: #17191a !important; font-size: 11px !important; font-weight: 650; margin: 0 !important; }
.activity-entry-actions { margin: -5px -5px -5px auto; display: flex; align-items: center; gap: 2px; }
.activity-edit-button,
.activity-delete-button {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: #8a8f91;
  background: transparent;
  cursor: pointer;
}
.activity-edit-button:hover,
.activity-delete-button:hover { color: #17191a; background: #eef0f0; }
.activity-edit-button .icon,
.activity-delete-button .icon { width: 10px; height: 10px; }
.activity-result {
  min-height: 23px;
  padding: 0 8px;
  border-radius: 7px;
  display: inline-flex !important;
  align-items: center;
  color: #606568 !important;
  background: #eef0f0;
  font-size: 9px !important;
  font-weight: 500;
  margin: 0 !important;
}
.activity-note { display: block; color: #242728; font-size: 11px !important; font-weight: 500 !important; line-height: 1.55 !important; overflow-wrap: anywhere; }
.activity-meta { display: flex; justify-content: space-between; gap: 10px; margin-top: 11px; padding-top: 10px; border-top: 1px solid #eef0f0; }
.activity-meta span,
.activity-meta time { color: #8a8f91 !important; font-size: 9px !important; margin: 0 !important; }
.activity-meta time { text-align: right; }

@media (max-width: 650px) {
  .drawer-body > .activity-section { padding: 15px; border-radius: 17px; }
  .activity-entry { grid-template-columns: 13px minmax(0,1fr); gap: 8px; padding: 12px 13px 15px; }
  .activity-entry:last-child { padding-bottom: 15px; }
  .activity-entry-icon { width: 13px; height: 13px; border-radius: 0; }
  .activity-meta { align-items: flex-start; flex-direction: column; gap: 4px; }
  .activity-meta time { text-align: left; }
}
