:root {
  --primary: #0a7bd7;
  --accent: #c0c0c0;
  --white: #ffffff;
  --bg: #f7f9fc;
  --text: #0f1b2d;
  --muted: #4f637a;
  --border: #dfe6f0;
  --card: rgba(255, 255, 255, 0.85);
  --glass-highlight: rgba(255, 255, 255, 0.6);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.layout {
  display: block;
  min-height: 100vh;
}

.sidebar {
  background: #0b1f38;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 260px;
  overflow-y: auto;
  z-index: 100;
}

.sidebar__brand {
  background: var(--primary);
  color: var(--white);
  padding: 12px 10px;
  border-radius: 10px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, transform 120ms ease, border 120ms ease;
  border: 1px solid transparent;
}

.nav__item .icon {
  width: 22px;
  height: 22px;
  fill: currentColor;
  flex-shrink: 0;
  display: inline-block;
}

.nav__item .label {
  font-size: 16px;
}

.nav__item:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #e0f2ff;
  border-color: rgba(255, 255, 255, 0.12);
}

.nav__item:hover .icon {
  fill: #e0f2ff;
}

.nav__item.active {
  background: #0f6fbf;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  border-color: rgba(255, 255, 255, 0.22);
}

.nav__item.active .icon {
  fill: #ffffff;
}

.sidebar__footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid #0c3359;
}

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

.sidebar-user .pill {
  padding: 6px 10px;
}

.app-footer {
  margin-top: 24px;
  padding: 18px 24px;
  text-align: center;
  font-size: 12px;
  color: #6b7a90;
  border-top: 1px solid #e6edf5;
  background: #f8fafc;
}

.avatar {
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: #ffffff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-left: 4px;
  position: relative;
  overflow: hidden;
}

.avatar__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar__initials {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.content {
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(6px);
  background: #f5f7fb;
  margin-left: 260px;
}

.hero {
  background: #0f6fbf;
  color: #fff;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.hero--searchbar {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.role-select {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  font-weight: 700;
  color: #0a4f8a;
}

.search-shell {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  width: min(900px, 96vw);
  align-items: center;
}

.search-shell--wide {
  width: min(1200px, 98vw);
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 14px;
  padding: 14px 18px;
  width: 100%;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.search-bar--dark input {
  color: #0f1b2d;
}

.search-bar--overlay {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.search-icon {
  font-size: 18px;
  color: #7a7a7a;
}

.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  background: transparent;
}

.search-bar button {
  margin: 0;
  padding: 8px 12px;
}

.quick-actions {
  display: flex;
  gap: 16px;
}

.quick-actions--compact {
  align-self: stretch;
  align-items: center;
}

.quick-actions--compact .icon-btn {
  margin-left: 4px;
}

.quick-actions--compact #notificationsBtn {
  margin-left: auto;
}

.quick-actions--compact #userMenuBtn {
  margin-right: 4px;
}

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(180deg, #ffffff 0%, #f3f6fb 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #0b4a7e;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.12);
}

.icon-btn .icon {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.icon-btn:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 14px 24px rgba(15, 23, 42, 0.16);
}

.icon-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #ef4444;
  box-shadow: 0 0 0 2px #fff;
}

.icon-btn {
  position: relative;
}

.notification-panel {
  position: absolute;
  top: 86px;
  right: 32px;
  width: 360px;
  max-height: 520px;
  background: #fff;
  border: 1px solid #dfe6f0;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
  display: grid;
  gap: 12px;
  padding: 14px;
  z-index: 1100;
}

.notification-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.notification-panel__list {
  display: grid;
  gap: 10px;
  max-height: 420px;
  overflow: auto;
}

.notification-item {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 12px;
  display: grid;
  gap: 4px;
  cursor: pointer;
  background: #f8fafc;
}

.notification-item.unread {
  background: #eaf2ff;
  border-color: #c7dcff;
}

.notification-item strong {
  font-size: 13px;
  color: #1f3b71;
}

.notification-item span {
  font-size: 12px;
  color: #4f637a;
}

.notification-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #6b7a90;
}

.intake-wizard {
  max-width: 860px;
}

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

.wizard-step {
  border: 1px solid #dfe6f0;
  border-radius: 12px;
  padding: 8px;
  display: grid;
  justify-items: center;
  gap: 6px;
  background: #f8fafc;
  color: #6b7a90;
  font-size: 12px;
}

.wizard-step span {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #e2e8f0;
  color: #0f172a;
  font-weight: 700;
}

.wizard-step.active {
  border-color: #0b4a7e;
  background: #eaf2ff;
  color: #0b4a7e;
}

.wizard-step.active span {
  background: #0b4a7e;
  color: #fff;
}

.wizard-panel {
  display: none;
}

.wizard-panel.active {
  display: block;
}

.review-grid {
  display: grid;
  gap: 10px;
  padding: 8px 4px;
}

.review-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
}

.review-row span {
  color: #64748b;
}

.pill:hover,
.quick-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.quick-btn {
  background: #f5f7fa;
  color: #0a4f8a;
  border: 1px solid #dfe6f0;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}

.quick-btn--primary {
  background: #ffffff;
  color: #0a4f8a;
  border-color: #0a4f8a;
}

.search-results {
  position: fixed;
  width: 360px;
  max-height: 320px;
  overflow: auto;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
  z-index: 40;
  color: var(--text);
  font-size: 13px;
}

.search-preview__item {
  width: 100%;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 8px;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
}

.search-preview__item:hover {
  background: #f1f5f9;
}

.search-preview__item mark {
  background: #fde68a;
  color: #0f172a;
  padding: 0 2px;
  border-radius: 4px;
}

.search-preview__title {
  font-weight: 600;
  color: #0f172a;
}

.search-preview__meta {
  font-size: 12px;
  color: #64748b;
}

.search-preview__badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #1f3b71;
}

.search-preview__empty {
  color: #64748b;
  font-size: 13px;
  padding: 8px 4px;
}

main.grid {
  max-width: 1200px;
  margin: 20px auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  padding: 0 16px 24px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08), inset 0 1px 0 var(--glass-highlight);
  backdrop-filter: blur(18px);
}

.card h2 {
  margin-top: 0;
  margin-bottom: 12px;
}

.profile-card.hidden {
  display: none;
}

.view {
  display: block;
}

.hidden {
  display: none;
}

.dash-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
  padding: 16px;
}

.metric {
  grid-column: span 4;
  min-height: 200px;
}

.wide {
  grid-column: span 7;
}

.full {
  grid-column: span 12;
}

.placeholder {
  padding: 32px 24px;
  color: var(--muted);
}

.placeholder h2 {
  margin-top: 0;
  color: var(--text);
}

.leads-view {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contacts-view {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contacts-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.contacts-actions {
  display: flex;
  gap: 8px;
}

.contacts-filters {
  display: flex;
  gap: 16px;
  color: #4f637a;
  font-size: 13px;
}

.leads-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.leads-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.leads-actions .pill,
.leads-actions .cta,
.leads-actions button {
  margin-top: 0;
  padding: 8px 12px;
  font-size: 13px;
  width: auto;
  min-width: 120px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tabs--soft .tab {
  border-radius: 10px 10px 0 0;
  border: 1px solid var(--border);
  border-bottom: none;
  background: #fff;
  color: var(--muted);
}

.tabs--soft .tab.active {
  background: #e6f1ff;
  color: #0a4f8a;
  border-color: #bcd7ff;
}

.leads-filters {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 8px 0;
  color: var(--muted);
  font-size: 13px;
}

.leads-filters .filter-icons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.leads-filters input,
.leads-filters select,
.leads-filters button {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
}

.leads-filters {
  flex-wrap: wrap;
}

#leadsStatus {
  min-height: 20px;
}

#leadsStatus.error-text {
  color: #c0392b;
}

.error-text {
  color: #c0392b;
}

#leadsPagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
}

#leadsPagination .leads-page-label {
  font-size: 13px;
  color: #4f637a;
}

#contactsPagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
}

#contactsPagination .contacts-page-label {
  font-size: 13px;
  color: #4f637a;
}

.error-list {
  margin: 6px 0 0;
  padding-left: 18px;
}

.error-list li {
  margin: 2px 0;
}

.leads-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.leads-table th,
.leads-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.name-cell {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.conflict-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  background: #e2e8f0;
  color: #0f172a;
}

.conflict-badge--clear {
  background: #dcfce7;
  color: #166534;
}

.conflict-badge--possible {
  background: #fef3c7;
  color: #92400e;
}

.conflict-badge--confirmed {
  background: #fee2e2;
  color: #991b1b;
}

.leads-table td .muted.small {
  display: block;
}

.chip--conflict {
  background: #e2e8f0;
  color: #0f172a;
}

.chip--conflict-clear {
  background: #dcfce7;
  color: #166534;
}

.chip--conflict-possible {
  background: #fef3c7;
  color: #92400e;
}

.chip--conflict-confirmed {
  background: #fee2e2;
  color: #991b1b;
}

.sla-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  background: #e2e8f0;
  color: #0f172a;
  margin-top: 6px;
}

.sla-badge--ok {
  background: #dcfce7;
  color: #166534;
}

.sla-badge--warn {
  background: #fef3c7;
  color: #92400e;
}

.sla-badge--late {
  background: #fee2e2;
  color: #991b1b;
}

.name-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lead-tag {
  margin-left: auto;
  background: #eef4ff;
  color: #0a4f8a;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  border: 1px solid #d5e5ff;
}

.leads-table input,
.leads-table select {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.leads-table th {
  text-align: left;
  background: #f9fbff;
  color: #4f637a;
  font-weight: 700;
}

.leads-table tr:hover {
  background: #f3f8ff;
}


.badge {
  background: #fdecc8;
  color: #b57f1b;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  margin-left: 8px;
  font-weight: 700;
}

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

.status-select {
  border: 1px solid #dfe6f0;
  border-radius: 6px;
  padding: 6px;
  background: #fff;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #f3f6fb;
  color: #0a4f8a;
  border: 1px solid #dfe6f0;
  font-weight: 700;
}

.status-intake {
  border-left: 4px solid #f5a524;
}

.avatar-dot {
  width: 10px;
  height: 10px;
  background: #f5a524;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}

.pipeline {
  padding: 16px;
}

.pipeline__topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  gap: 0;
}

.tab {
  border: none;
  background: transparent;
  padding: 10px 18px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
}

.tab.active {
  color: var(--primary);
  border-color: var(--primary);
}

.pipeline__actions .pill {
  border: 1px solid var(--border);
  background: #fff;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
}

.pipeline__banner {
  background: #f6f0ff;
  border: 1px solid #d9c6ff;
  color: #5d3fa3;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 16px;
}

.pipeline__columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
}

.column {
  background: #f9fbff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
}

.column__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.column__title {
  font-weight: 700;
  color: #22324b;
}

.column__meta {
  font-size: 12px;
  color: var(--muted);
}

.column__count {
  font-weight: 700;
  color: #22324b;
}

.column__empty {
  padding: 20px;
  text-align: center;
  color: var(--muted);
  background: #fff;
  border: 1px dashed var(--border);
  border-radius: 10px;
}

.card--compact {
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
  padding: 12px;
  margin-bottom: 10px;
}

.card__title {
  font-weight: 700;
  color: #1f3b71;
}

.profile-link {
  cursor: pointer;
  text-decoration: underline;
}

.card__meta {
  font-size: 13px;
  color: var(--muted);
  margin: 6px 0;
}

.link {
  color: #0a7bd7;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.chip {
  display: inline-block;
  background: #ede7ff;
  color: #6b4bdc;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.chip--success {
  background: #dcfce7;
  color: #166534;
}

.chip--warning {
  background: #fef3c7;
  color: #92400e;
}

.chip--soft {
  background: #e0f2fe;
  color: #075985;
}

.chip--primary {
  background: #dbeafe;
  color: #1d4ed8;
}

.chip--ghost {
  background: #f1f5f9;
  color: #64748b;
}

.card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  font-size: 13px;
}

.icons {
  display: flex;
  gap: 8px;
  color: var(--muted);
}
.card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  margin-bottom: 8px;
}

.card__header select {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  background: #fff;
  color: var(--text);
}

.metric__body {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.metric__value {
  font-size: 26px;
  font-weight: 700;
}

.metric__trend {
  font-size: 12px;
}

.metric__trend.bad {
  color: #e05666;
}

.metric__trend.good {
  color: #16a34a;
}

.ring-chart {
  position: relative;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: conic-gradient(#4ea1ff 0deg 270deg, rgba(0, 0, 0, 0.05) 270deg 360deg);
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
}

.ring-chart--small {
  width: 120px;
  height: 120px;
}

.ring-chart__inner {
  width: 60%;
  height: 60%;
  background: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--primary);
}

.legend-row {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}

.legend-col {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 4px;
  font-size: 13px;
  color: var(--muted);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot.blue { background: #4ea1ff; }
.dot.purple { background: #7c8cff; }
.dot.teal { background: #38bdf8; }
.dot.navy { background: #2c5282; }
.dot.gray { background: #d8e2ec; }

.bar-list {
  display: grid;
  gap: 8px;
}

.bar-row {
  display: grid;
  grid-template-columns: 1fr 5fr 80px;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}

.bar {
  background: #eef3f9;
  border-radius: 8px;
  overflow: hidden;
  height: 14px;
}

.bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #4ea1ff, #7c8cff);
}

.bar-num {
  text-align: right;
  color: var(--muted);
}

.line-placeholder {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  color: var(--muted);
  font-size: 12px;
}

.empty-state {
  text-align: center;
  padding: 30px;
  color: var(--muted);
  font-size: 14px;
}

.dash-grid--full {
  grid-template-columns: repeat(12, 1fr);
}

.card--wide {
  grid-column: span 12;
}

.card--split {
  grid-column: span 12;
}

.card--full {
  grid-column: span 12;
}

.agenda-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 12px;
}

.agenda-box {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 10px 24px rgba(15, 27, 45, 0.06);
}

.agenda-title {
  font-weight: 700;
  margin-bottom: 6px;
}

.agenda-body {
  display: flex;
  gap: 12px;
  align-items: center;
}

.agenda-count__num {
  font-size: 18px;
  font-weight: 800;
}

.agenda-count__label {
  font-size: 12px;
  color: #4f637a;
}

.agenda-text {
  color: #4f637a;
  font-size: 13px;
}

.hourly-layout {
  display: grid;
  grid-template-columns: minmax(320px, 1.4fr) minmax(280px, 1fr);
  gap: 16px;
  align-items: stretch;
}

.hourly-chart {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px;
  display: grid;
  gap: 12px;
  align-items: start;
  box-shadow: 0 10px 24px rgba(15, 27, 45, 0.06);
}

.chart-title {
  font-weight: 700;
  text-align: center;
}

.chart-tabs {
  display: flex;
  gap: 4px;
  justify-content: center;
  flex-wrap: wrap;
}

.chart-tabs .pill {
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 11px;
  letter-spacing: 0.01em;
  width: auto;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.chart-tabs .pill.active {
  background: #0f6fbf;
  color: #fff;
  border-color: #0f6fbf;
}

.chart-circle {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 10px solid #e2e8f0;
  display: grid;
  place-items: center;
  margin: 0 auto;
  box-shadow: inset 0 0 0 6px #f8fafc;
}

.chart-circle__value {
  font-size: 18px;
  font-weight: 800;
}

.chart-circle__sub {
  color: #4f637a;
}

.dashboard-billing {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 10px;
  align-content: start;
}

.dashboard-billing__row {
  display: contents;
}

.dashboard-billing__card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px;
  display: grid;
  gap: 4px;
  box-shadow: 0 10px 24px rgba(15, 27, 45, 0.06);
  min-height: 92px;
}

.dashboard-billing__title {
  font-weight: 700;
  font-size: 13px;
}

.dashboard-billing__value {
  color: #2563eb;
  font-weight: 800;
  font-size: 16px;
}

.dashboard-billing__card a {
  line-height: 1.3;
}

@media (max-width: 1100px) {
  .hourly-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-billing {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

.financial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.intake-scorecards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.intake-scorecard {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 6px;
  box-shadow: 0 10px 24px rgba(15, 27, 45, 0.06);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.intake-scorecard:hover {
  transform: translateY(-2px);
  border-color: #cfe2ff;
  box-shadow: 0 16px 30px rgba(15, 27, 45, 0.12);
}

.intake-scorecard__label {
  font-size: 12px;
  color: #4f637a;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.intake-scorecard__value {
  font-size: 24px;
  font-weight: 800;
  color: #0f6fbf;
}

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

.intake-chart {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px;
  display: grid;
  gap: 12px;
  box-shadow: 0 10px 24px rgba(15, 27, 45, 0.06);
  min-height: 220px;
}

.intake-chart__title {
  font-weight: 700;
  font-size: 13px;
}

.intake-bar-chart {
  height: 160px;
  border-radius: 10px;
  background: linear-gradient(180deg, #e2e8f0, #f8fafc);
  position: relative;
  overflow: hidden;
  align-content: stretch;
  padding: 10px 12px 8px;
}

.intake-line-chart {
  height: 160px;
  border-radius: 10px;
  background: linear-gradient(180deg, #f8fafc, #e2e8f0);
  position: relative;
  overflow: hidden;
}

.intake-funnel {
  height: 160px;
  border-radius: 10px;
  background: linear-gradient(180deg, #0f6fbf, #0b4f90);
}

@media (max-width: 1024px) {
  .intake-charts {
    grid-template-columns: 1fr;
  }

  .intake-bar-chart,
  .intake-funnel {
    height: 200px;
  }

  .intake-line-chart {
    height: 220px;
  }
}

.intake-bar-chart,
.intake-line-chart,
.intake-funnel {
  display: grid;
  align-content: end;
  padding: 12px;
  gap: 6px;
}

.intake-bar-chart {
  align-content: stretch;
}

.intake-bars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12px, 1fr));
  gap: 8px;
  align-items: end;
  height: 100%;
}

.intake-bar {
  background: #0f6fbf;
  border-radius: 3px 3px 0 0;
  min-height: 6px;
}

.intake-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #4f637a;
}

.intake-bar-axis {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
  height: 100%;
  align-items: stretch;
}

.intake-bar-y {
  display: grid;
  align-content: space-between;
  justify-items: end;
  font-size: 10px;
  color: #4f637a;
  padding: 0 0 18px;
  border-right: 1px solid #d7e2ee;
}

.intake-bar-plot {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 6px;
  border-bottom: 1px solid #d7e2ee;
  padding-bottom: 0;
  height: 100%;
}

.intake-bar-grid {
  position: relative;
  height: 100%;
  padding: 0 4px 2px;
  background:
    repeating-linear-gradient(
      to top,
      rgba(15, 111, 191, 0.08),
      rgba(15, 111, 191, 0.08) 1px,
      transparent 1px,
      transparent 20%
    );
  border-radius: 8px;
}

.intake-funnel {
  align-content: stretch;
  padding: 10px 12px;
}

.intake-tooltip {
  position: absolute;
  z-index: 5;
  padding: 6px 10px;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-size: 11px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.25);
  pointer-events: none;
  white-space: nowrap;
}

.field-error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.15);
}

.intake-line {
  height: 100%;
  border-radius: 10px;
  background: repeating-linear-gradient(
      180deg,
      #f1f5f9,
      #f1f5f9 20px,
      #e2e8f0 20px,
      #e2e8f0 22px
    ),
    linear-gradient(120deg, rgba(15, 111, 191, 0.4), rgba(15, 111, 191, 0.05));
}

.intake-line__plot {
  height: 100%;
  border-radius: 10px;
  background: repeating-linear-gradient(
      180deg,
      #f1f5f9,
      #f1f5f9 20px,
      #e2e8f0 20px,
      #e2e8f0 22px
    ),
    linear-gradient(120deg, rgba(15, 111, 191, 0.18), rgba(15, 111, 191, 0.03));
  padding: 6px;
}

.intake-line__plot svg {
  width: 100%;
  height: 100%;
}

.intake-line__area {
  fill: rgba(15, 111, 191, 0.04);
}

.intake-line__path {
  fill: none;
  stroke: #0f6fbf;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}


.intake-funnel-steps {
  display: grid;
  gap: 6px;
  width: 100%;
}

.intake-funnel-step {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 6px 8px;
  color: #fff;
  font-size: 11px;
  display: flex;
  justify-content: space-between;
}

.metric-drilldown {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.metric-drilldown__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e6edf5;
  background: #f8fafc;
  font-size: 13px;
}

.metric-drilldown__row strong {
  font-weight: 700;
}

.metric-drilldown__table {
  display: grid;
  gap: 6px;
}

.metric-drilldown__header,
.metric-drilldown__item {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 0.8fr;
  gap: 10px;
  align-items: center;
}

.metric-drilldown__header {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

.metric-drilldown__item {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e6edf5;
  background: #f8fafc;
  font-size: 13px;
}

.metric-drilldown__pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 12px;
}

.metric-link {
  justify-self: end;
}

.conflict-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.conflict-label {
  font-weight: 600;
}

.conflict-pill {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  background: #e2e8f0;
  color: #0f172a;
}

.conflict-pill--clear {
  background: #dcfce7;
  color: #166534;
}

.conflict-pill--possible {
  background: #fef3c7;
  color: #92400e;
}

.conflict-pill--confirmed {
  background: #fee2e2;
  color: #991b1b;
}

.conflict-meta {
  color: #4f637a;
  font-size: 12px;
  margin-bottom: 8px;
}

.conflict-list {
  display: grid;
  gap: 8px;
}

.conflict-item {
  border: 1px solid #e6edf5;
  border-radius: 10px;
  padding: 10px;
  background: #f8fafc;
  font-size: 12px;
  display: grid;
  gap: 4px;
}

.conflict-item__title {
  font-weight: 700;
  color: #0f172a;
}

.history-list {
  display: grid;
  gap: 10px;
}

.history-item {
  border: 1px solid #e6edf5;
  border-radius: 10px;
  padding: 10px;
  background: #f8fafc;
  display: grid;
  gap: 6px;
}

.history-item__row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.history-status {
  font-weight: 700;
  text-transform: capitalize;
  color: #0f172a;
}

.history-note {
  font-size: 12px;
  color: #4f637a;
}

.fin-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 10px 24px rgba(15, 27, 45, 0.06);
}

.fin-title {
  font-weight: 700;
  margin-bottom: 6px;
}

.fin-bar {
  height: 120px;
  border-radius: 6px;
  background: linear-gradient(180deg, #0f6fbf, #0b4f90);
}

.fin-bar--small { width: 70%; }
.fin-bar--medium { width: 80%; }
.fin-bar--large { width: 90%; }
.fin-bar--xl { width: 95%; }

.line-chart-placeholder {
  width: 100%;
  height: 240px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: linear-gradient(180deg, #f8fafc, #f1f5f9);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(15, 27, 45, 0.06);
}

.line-chart-placeholder--wide {
  height: 260px;
}

.firm-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px 0;
}

.firm-filters {
  display: flex;
  gap: 8px;
}

.firm-filters select {
  padding: 8px 10px;
  border: 1px solid #dfe6f0;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
}

.firm-section {
  background: #f8fafc;
  border: 1px solid #dfe6f0;
  border-radius: 10px;
  margin: 10px 16px;
  padding: 12px;
  box-shadow: 0 10px 24px rgba(15, 27, 45, 0.06);
}

/* Reports */
.reports-view {
  padding: 16px;
  display: grid;
  gap: 16px;
}

.reports-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, #0f6fbf, #0b4f90);
  color: #fff;
  padding: 18px 20px;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(15, 27, 45, 0.2);
}

.reports-hero h2 {
  margin: 0 0 4px;
}

.reports-hero .muted {
  color: rgba(255, 255, 255, 0.82);
}

.reports-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.reports-toolbar {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 12px;
  align-items: end;
}

.reports-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.reports-filters label {
  display: grid;
  gap: 6px;
  font-size: 12px;
}

.reports-filters select {
  border: 1px solid #dfe6f0;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  color: #0f172a;
}

.reports-search {
  border: 1px solid #dfe6f0;
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
  font-size: 14px;
}

.report-sections {
  display: grid;
  gap: 18px;
}

.report-section {
  background: #f8fafc;
  border: 1px solid #e6edf5;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 12px 28px rgba(15, 27, 45, 0.08);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}

.section-head h3 {
  margin: 0;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.report-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 8px;
  box-shadow: 0 10px 24px rgba(15, 27, 45, 0.06);
  min-height: 180px;
}

.report-card h4 {
  margin: 0;
}

.report-card p {
  margin: 0;
  color: #4f637a;
  font-size: 13px;
}

.report-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0f6fbf;
}

.report-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #6b7a90;
}

.builder-shell {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 16px 36px rgba(15, 27, 45, 0.1);
  display: grid;
  gap: 16px;
}

.builder-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.builder-grid {
  display: grid;
  grid-template-columns: 240px 1fr 240px;
  gap: 12px;
}

.builder-panel {
  border: 1px solid #e6edf5;
  border-radius: 12px;
  padding: 12px;
  background: #f8fafc;
  display: grid;
  gap: 10px;
  align-content: start;
}

.builder-panel h4 {
  margin: 0;
}

.builder-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.builder-chip {
  border: 1px solid #d9e4f2;
  border-radius: 999px;
  padding: 6px 10px;
  background: #fff;
  font-size: 12px;
}

.builder-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid #e6edf5;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
}

.builder-canvas {
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  padding: 12px;
  background: #f9fbff;
  display: grid;
  gap: 12px;
}

.canvas-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.canvas-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 10px;
}

.canvas-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px;
  display: grid;
  gap: 8px;
  box-shadow: 0 8px 20px rgba(15, 27, 45, 0.06);
}

.canvas-card--wide {
  grid-column: span 2;
}

.canvas-title {
  font-weight: 700;
  font-size: 13px;
}

.canvas-placeholder {
  height: 120px;
  border-radius: 10px;
  background: linear-gradient(180deg, #e2e8f0, #f8fafc);
}

.canvas-placeholder--short {
  height: 90px;
}

.canvas-placeholder--table {
  height: 140px;
  background: repeating-linear-gradient(
    180deg,
    #f8fafc,
    #f8fafc 16px,
    #e2e8f0 16px,
    #e2e8f0 18px
  );
}

@media (max-width: 1100px) {
  .reports-toolbar {
    grid-template-columns: 1fr;
  }

  .builder-grid {
    grid-template-columns: 1fr;
  }

  .canvas-card--wide {
    grid-column: span 1;
  }
}

/* Users */
.users-view {
  padding: 16px;
  display: grid;
  gap: 16px;
}

.users-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, #0b4f90, #0f6fbf);
  color: #fff;
  padding: 18px 20px;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(15, 27, 45, 0.2);
}

.users-hero h2 {
  margin: 0 0 4px;
}

.users-hero .muted {
  color: rgba(255, 255, 255, 0.82);
}

.users-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.users-shell {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: 14px;
}

.users-left,
.users-right {
  display: grid;
  gap: 12px;
}

.users-right .users-card {
  align-content: start;
}

.users-footer {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.users-card {
  display: grid;
  gap: 12px;
}

.user-form {
  display: grid;
  gap: 10px;
}

.user-form label {
  display: grid;
  gap: 6px;
  font-size: 12px;
}

.user-form input,
.user-form select {
  border: 1px solid #dfe6f0;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  color: #0f172a;
  font-size: 14px;
}

.user-form__actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.user-form #userCreateStatus {
  min-height: 18px;
}

.user-list {
  display: grid;
  gap: 10px;
}

.user-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e6edf5;
}

.user-name {
  font-weight: 700;
}

.user-pill {
  font-size: 12px;
  font-weight: 700;
  background: #e2e8f0;
  color: #0f172a;
  padding: 6px 10px;
  border-radius: 999px;
}

.user-pill--primary {
  background: #0f6fbf;
  color: #fff;
}

.role-matrix {
  display: grid;
  gap: 10px;
}

.role-row {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid #e6edf5;
  background: #f8fafc;
}

.role-name {
  font-weight: 700;
}

.role-caps {
  color: #4f637a;
  font-size: 13px;
}

.policy-list {
  display: grid;
  gap: 10px;
}

.policy-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid #e6edf5;
  background: #f8fafc;
}

.policy-title {
  font-weight: 700;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.permission-card {
  border: 1px solid #e6edf5;
  border-radius: 12px;
  padding: 8px;
  display: grid;
  gap: 6px;
  background: #f8fafc;
}

.permission-card label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #0f172a;
}

.permission-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

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

.users-search {
  flex: 1;
  min-width: 220px;
  border: 1px solid #dfe6f0;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  font-size: 14px;
}

.users-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.users-filters select {
  border: 1px solid #dfe6f0;
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
  color: #0f172a;
}

.user-table {
  border: 1px solid #e6edf5;
  border-radius: 12px;
  overflow: hidden;
}

.user-table__header,
.user-table__row {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.6fr 0.8fr 0.8fr;
  gap: 10px;
  padding: 10px 12px;
  align-items: center;
}

.user-table__header {
  background: #f1f5f9;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

.user-table__row {
  background: #fff;
  border-top: 1px solid #e6edf5;
}

.user-table__row.is-selected {
  background: #eef6ff;
  border-color: #cfe2ff;
}

.user-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.status-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  text-transform: capitalize;
  background: #e2e8f0;
  color: #0f172a;
}

.status-pill.status-active {
  background: #dcfce7;
  color: #166534;
}

.status-pill.status-pending {
  background: #fef3c7;
  color: #92400e;
}

.status-pill.status-disabled {
  background: #fee2e2;
  color: #991b1b;
}

@media (max-width: 1100px) {
  .users-shell {
    grid-template-columns: 1fr;
  }
}

/* Settings */
.settings-view {
  padding: 16px;
  display: grid;
  gap: 16px;
}

.settings-hero {
  background: #f8fafc;
  border: 1px solid #e6edf5;
  border-radius: 14px;
  padding: 16px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.integrations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.integrations-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding: 0 16px;
}

.integrations-hero h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.integrations-hero p {
  margin: 4px 0 0;
}

.integrations-hero__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.integrations-hero__actions .pill {
  padding: 10px 14px;
  font-weight: 700;
}

.integrations-hero__actions .pill.primary {
  background: #0f6fbf;
  color: #fff;
  border-color: #0f6fbf;
}

.integrations-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 0 16px;
}

.integrations-tabs {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.integrations-tabs .tab {
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  background: #fff;
}

.integrations-tabs .tab.active {
  background: #0f6fbf;
  border-color: #0f6fbf;
  color: #fff;
}

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

.integrations-tools .pill {
  font-size: 12px;
}

.input-with-icon {
  position: relative;
}

.input-with-icon .icon {
  position: absolute;
  left: 10px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  color: #64748b;
}

.input-with-icon input {
  padding: 10px 12px 10px 34px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
  min-width: 220px;
}

.integration-list {
  padding: 0;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 24px rgba(15, 27, 45, 0.06);
  margin: 0 16px 16px;
}

.integration-list__header,
.integration-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) minmax(90px, 0.6fr) minmax(120px, 0.7fr) minmax(120px, 0.7fr) minmax(150px, 0.9fr) minmax(150px, 0.9fr) minmax(110px, 0.5fr);
  gap: 10px;
  align-items: center;
}

.integration-list__header {
  padding: 14px 16px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
}

.integration-list__body {
  display: grid;
}

.integration-row {
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.integration-row:hover {
  background: #f8fbff;
  box-shadow: inset 0 0 0 1px rgba(15, 111, 191, 0.08);
}

.integration-row:last-child {
  border-bottom: none;
}

.integration-name {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-weight: 600;
}

.integration-subtext {
  font-size: 12px;
  color: #64748b;
}

.integration-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.integration-empty {
  padding: 16px;
  border-bottom: 1px solid #e2e8f0;
  color: #64748b;
  background: #f8fafc;
}

.workflow-builder {
  margin: 0 16px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 27, 45, 0.08);
  overflow: hidden;
}

.workflow-builder__topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.workflow-builder__title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
}

.workflow-builder__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

.workflow-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  font-size: 12px;
  color: #64748b;
}

.toggle-btn {
  width: 34px;
  height: 18px;
  border-radius: 999px;
  border: none;
  background: #0f6fbf;
  position: relative;
}

.toggle-btn::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 18px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
}

.toggle-btn[aria-pressed="false"] {
  background: #cbd5f5;
}

.toggle-btn[aria-pressed="false"]::after {
  left: 2px;
}

.workflow-builder__nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid #e2e8f0;
}

.workflow-builder__tabs {
  display: flex;
  gap: 16px;
}

.workflow-canvas {
  position: relative;
  min-height: 560px;
  background: radial-gradient(circle, rgba(148, 163, 184, 0.3) 1px, transparent 1px);
  background-size: 20px 20px;
  padding: 24px;
}

.workflow-pane {
  min-height: 560px;
}

.workflow-settings {
  padding: 24px;
  display: grid;
  gap: 20px;
}

.workflow-settings__header h3 {
  margin: 0 0 6px;
}

.workflow-settings__card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  display: grid;
  gap: 14px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 27, 45, 0.05);
}

.workflow-setting {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
}

.workflow-setting__row {
  display: grid;
  gap: 8px;
}

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

.workflow-setting__label {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

.toggle {
  position: relative;
  width: 38px;
  height: 20px;
  display: inline-flex;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle__slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #e2e8f0;
  transition: background 0.2s ease;
}

.toggle__slider::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
}

.toggle input:checked + .toggle__slider {
  background: #0f6fbf;
}

.toggle input:checked + .toggle__slider::after {
  transform: translateX(18px);
}

.workflow-empty {
  padding: 24px;
  color: #64748b;
}

.workflow-history {
  padding: 24px;
  display: grid;
  gap: 12px;
}

.workflow-history__header,
.workflow-history__row {
  display: grid;
  grid-template-columns: 1.2fr 0.6fr 0.8fr 0.9fr 0.9fr;
  gap: 12px;
  align-items: center;
}

.workflow-history__header {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0 12px;
}

.workflow-history__list {
  display: grid;
  gap: 10px;
}

.workflow-history__row {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 8px 16px rgba(15, 27, 45, 0.04);
}

.workflow-logs {
  padding: 24px;
  display: grid;
  gap: 16px;
}

.workflow-log-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 10px 18px rgba(15, 27, 45, 0.05);
  display: grid;
  gap: 10px;
}

.workflow-log-card__header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.workflow-log-steps {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: #475569;
}

.workflow-log-step {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
}

.workflow-log-step span {
  white-space: nowrap;
}

.workflow-rail {
  position: absolute;
  top: 24px;
  left: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.workflow-graph {
  max-width: 520px;
  margin: 0 auto;
  display: grid;
  gap: 20px;
  justify-items: center;
}

.workflow-add {
  position: absolute;
  right: 24px;
  top: 24px;
  display: flex;
  gap: 8px;
  align-items: center;
  background: #fff;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 18px rgba(15, 27, 45, 0.08);
}

.workflow-add select {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 12px;
}

.workflow-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(360px, 100%);
  height: 100%;
  background: #fff;
  border-left: 1px solid #e2e8f0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  box-shadow: -10px 0 24px rgba(15, 27, 45, 0.08);
}

.workflow-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid #e2e8f0;
}

.workflow-panel__body {
  padding: 16px;
  display: grid;
  gap: 12px;
  overflow: auto;
}

.workflow-panel__footer {
  padding: 12px 16px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.workflow-panel__actions {
  display: flex;
  gap: 8px;
}

.workflow-panel__label {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

.workflow-panel__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.workflow-panel__rules {
  display: grid;
  gap: 10px;
}

.workflow-rule {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr auto;
  gap: 8px;
  align-items: center;
}

.workflow-rule input,
.workflow-rule select {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
}

.workflow-rule button {
  padding: 6px 10px;
}

.workflow-panel__notice {
  border: 1px solid #fde68a;
  background: #fffbeb;
  color: #92400e;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  display: grid;
  gap: 4px;
}

.workflow-panel textarea,
.workflow-panel input,
.workflow-panel select {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
}

.workflow-node {
  width: 260px;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  background: #fff;
  padding: 12px;
  box-shadow: 0 8px 18px rgba(15, 27, 45, 0.08);
}

.workflow-node--ghost {
  border-style: dashed;
  background: #f8fafc;
  color: #64748b;
  text-align: center;
}

.workflow-node__header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}


.workflow-connector {
  width: 2px;
  height: 24px;
  background: #dbe3ee;
}

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

.workflow-node--branch {
  width: 240px;
}

.workflow-end {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #dbe3ee;
  background: #f8fafc;
  font-size: 12px;
  color: #64748b;
}

@media (max-width: 1024px) {
  .workflow-builder__topbar {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .workflow-builder__actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .workflow-builder__nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .workflow-graph {
    max-width: 100%;
  }

  .workflow-branches {
    grid-template-columns: 1fr;
  }
}

.settings-card {
  display: grid;
  gap: 12px;
}

.settings-form {
  display: grid;
  gap: 10px;
}

.settings-form label {
  display: grid;
  gap: 6px;
  font-size: 12px;
}

.settings-form input {
  border: 1px solid #dfe6f0;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  color: #0f172a;
  font-size: 14px;
}

.settings-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.settings-list {
  display: grid;
  gap: 10px;
}

.settings-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid #e6edf5;
  background: #f8fafc;
}

.settings-title {
  font-weight: 700;
}


.firm-section__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.firm-actions {
  display: flex;
  gap: 6px;
}

.firm-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 12px;
  align-items: start;
}

.firm-gauge {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.gauge-ring {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  margin: 0 auto;
  display: grid;
  place-items: center;
  color: #0f172a;
  font-weight: 800;
}

.gauge-ring--pink {
  border: 10px solid #fce7f3;
  box-shadow: inset 0 0 0 6px #fff;
}

.gauge-ring--teal {
  border: 10px solid #d1fae5;
  box-shadow: inset 0 0 0 6px #fff;
}

.gauge-ring--gray {
  border: 10px solid #e5e7eb;
  box-shadow: inset 0 0 0 6px #fff;
}

.gauge-value {
  font-size: 22px;
}

.gauge-sub {
  font-size: 12px;
  color: #4f637a;
}

.gauge-totals {
  display: grid;
  gap: 6px;
}

.total-figure {
  font-weight: 800;
}

.firm-chart {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 10px 24px rgba(15, 27, 45, 0.06);
}

.feed-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px 0;
}

.feed-filters {
  display: flex;
  gap: 8px;
}

.feed-filters input,
.feed-filters select {
  padding: 8px 10px;
  border: 1px solid #dfe6f0;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
}

.feed-list {
  margin: 12px 16px 16px;
  background: #fff;
  border: 1px solid #dfe6f0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(15, 27, 45, 0.06);
}

.feed-item {
  display: grid;
  grid-template-columns: 60px 1fr 140px;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid #eef2f6;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.feed-item:last-child {
  border-bottom: none;
}

.feed-item:hover {
  background: #f7fbff;
  border-color: #d0e6ff;
  box-shadow: inset 2px 0 0 #0f6fbf;
}

/* Calendar */
.calendar-view {
  padding: 12px 16px 24px;
}

.calendar-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
}

.calendar-sidebar {
  display: grid;
  gap: 16px;
}

.calendar-sidebar .cta--wide {
  width: 100%;
}

.mini-calendar {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 10px 24px rgba(15, 27, 45, 0.06);
}

.mini-calendar__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  margin-bottom: 8px;
}

.mini-calendar__nav {
  display: flex;
  gap: 6px;
}

.mini-calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.mini-calendar__day {
  text-align: center;
  font-size: 11px;
  color: #6b7a90;
  font-weight: 700;
}

.mini-date {
  border: none;
  background: #f8fafc;
  color: #0f1b2d;
  border-radius: 8px;
  padding: 6px 0;
  font-size: 12px;
  cursor: pointer;
}

.mini-date:hover {
  background: #e6f1ff;
}

.mini-date.muted {
  color: #9aa9bc;
  background: #f3f6fb;
}

.mini-date.today {
  background: #0f6fbf;
  color: #fff;
  font-weight: 700;
}

.mini-date.active {
  background: #dbeafe;
  color: #0a4f8a;
  font-weight: 700;
}

.calendar-group {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  display: grid;
  gap: 10px;
  box-shadow: 0 12px 26px rgba(15, 27, 45, 0.08);
}

.calendar-group__title {
  font-weight: 700;
  color: #0f1b2d;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.calendar-option {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #22324b;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.calendar-option input {
  accent-color: #0f6fbf;
}

.calendar-option:hover {
  background: #eef5ff;
  border-color: #cfe2ff;
  transform: translateY(-1px);
}

.calendar-option input {
  width: 16px;
  height: 16px;
}

.calendar-option .dot {
  width: 12px;
  height: 12px;
  box-shadow: 0 0 0 2px rgba(15, 27, 45, 0.06);
}

.dot--blue { background: #4ea1ff; }
.dot--teal { background: #38bdf8; }
.dot--orange { background: #f59e0b; }
.dot--purple { background: #7c8cff; }

.calendar-main {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px 16px 20px;
  box-shadow: 0 12px 28px rgba(15, 27, 45, 0.08);
}

.calendar-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e9eef5;
}

.calendar-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.calendar-nav__arrows {
  display: flex;
  gap: 6px;
}

.calendar-title {
  font-size: 18px;
  font-weight: 800;
}

.calendar-actions {
  display: flex;
  gap: 6px;
}

.calendar-panel {
  display: none;
  margin-top: 16px;
}

.calendar-panel.active {
  display: block;
}

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

.calendar-grid__header {
  font-size: 12px;
  font-weight: 700;
  color: #6b7a90;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.calendar-cell {
  border: 1px solid #e6edf5;
  border-radius: 10px;
  padding: 8px;
  min-height: 110px;
  background: #fafcff;
  display: grid;
  gap: 6px;
  align-content: start;
}

.calendar-cell span {
  font-weight: 700;
  font-size: 12px;
  color: #0f1b2d;
}

.calendar-cell.muted {
  background: #f6f8fb;
  color: #9aa9bc;
}

.calendar-cell.today {
  border-color: #0f6fbf;
  box-shadow: inset 0 0 0 1px rgba(15, 111, 191, 0.4);
}

.calendar-cell.selected {
  background: #eef6ff;
  border-color: #9cc7ff;
}

.event-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: #0f1b2d;
  background: #e2e8f0;
}

.event-pill--blue { background: #dbeafe; color: #0a4f8a; }
.event-pill--teal { background: #d1fae5; color: #0f766e; }
.event-pill--orange { background: #ffedd5; color: #9a3412; }
.event-pill--purple { background: #ede9fe; color: #5b21b6; }

.calendar-week__header {
  display: grid;
  grid-template-columns: 60px repeat(7, 1fr);
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #6b7a90;
}

.calendar-week__header .today {
  color: #0f6fbf;
}

.calendar-week__grid {
  display: grid;
  grid-template-columns: 60px repeat(7, 1fr);
  gap: 8px;
  margin-top: 10px;
  position: relative;
}

.time-col {
  display: grid;
  gap: 28px;
  font-size: 12px;
  color: #6b7a90;
}

.week-col,
.day-col {
  border: 1px solid #e6edf5;
  border-radius: 10px;
  min-height: 320px;
  position: relative;
  background: #f8fafc;
}

.event-block {
  position: absolute;
  left: 6px;
  right: 6px;
  padding: 6px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(15, 27, 45, 0.12);
}

.calendar-day__header {
  font-weight: 700;
  margin-bottom: 10px;
}

.calendar-day__grid {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 10px;
}

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

.agenda-item {
  display: grid;
  gap: 8px;
}

.agenda-date {
  font-size: 12px;
  color: #6b7a90;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.agenda-card {
  border: 1px solid #e6edf5;
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 6px;
  background: #f8fafc;
}

.agenda-meta {
  font-size: 12px;
  color: #4f637a;
}

.calendar-modal {
  max-width: 720px;
}

.calendar-form {
  display: grid;
  gap: 12px;
  padding: 6px 0;
}

.calendar-form label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  color: #0f1b2d;
  font-size: 13px;
}

.calendar-form input,
.calendar-form select,
.calendar-form textarea {
  border: 1px solid #dfe6f0;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  background: #f8fafc;
  color: #0f1b2d;
}

.calendar-form textarea {
  resize: vertical;
  min-height: 90px;
}

.calendar-form__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.modal__status {
  margin-top: 10px;
  font-size: 13px;
  color: #0f1b2d;
}

.modal__status.error {
  color: #b42318;
}

.calendar-detail {
  max-width: 420px;
  width: min(420px, 92vw);
  position: relative;
}

.calendar-detail__body {
  display: grid;
  gap: 12px;
  padding: 6px 0;
}

.calendar-detail__title {
  font-size: 18px;
  font-weight: 800;
  color: #0f1b2d;
}

.calendar-detail__meta {
  color: #4f637a;
  font-size: 13px;
}

.calendar-detail__row {
  display: grid;
  gap: 4px;
  font-size: 13px;
}

.calendar-detail__row .label {
  font-weight: 700;
  color: #0f1b2d;
}

.task-modal {
  max-width: 680px;
}

.task-form {
  display: grid;
  gap: 12px;
  padding: 6px 0;
}

.task-form label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  color: #0f1b2d;
  font-size: 13px;
}

.task-form input,
.task-form select,
.task-form textarea {
  border: 1px solid #dfe6f0;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  background: #f8fafc;
  color: #0f1b2d;
}

.task-form textarea {
  resize: vertical;
  min-height: 110px;
}

.task-form__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.pipeline-modal {
  max-width: 720px;
}

.pipeline-form {
  display: grid;
  gap: 12px;
  padding: 6px 0;
}

.pipeline-form label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  color: #0f1b2d;
  font-size: 13px;
}

.pipeline-form input,
.pipeline-form select {
  border: 1px solid #dfe6f0;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  background: #f8fafc;
  color: #0f1b2d;
}

.pipeline-form__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

/* Tasks */
.tasks-view {
  padding: 12px 16px 24px;
}

.tasks-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 16px;
}

.tasks-header h2 {
  margin: 0;
}

.tasks-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.tasks-tabs {
  display: flex;
  gap: 6px;
}

.tasks-board {
  display: grid;
  grid-template-columns: 260px 1fr 320px;
  gap: 16px;
}

.tasks-sidebar {
  display: grid;
  gap: 16px;
}

.tasks-search input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #dfe6f0;
  background: #fff;
}

.tasks-filters {
  display: grid;
  gap: 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 10px 24px rgba(15, 27, 45, 0.06);
}

.tasks-filters label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #0f1b2d;
}

.tasks-filters select {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #dfe6f0;
  background: #f8fafc;
}

.tasks-quick {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 10px;
  box-shadow: 0 10px 24px rgba(15, 27, 45, 0.06);
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.tasks-quick.highlight {
  border-color: #9cc7ff;
  box-shadow: 0 0 0 3px rgba(15, 111, 191, 0.15), 0 10px 24px rgba(15, 27, 45, 0.08);
}

.tasks-quick__title {
  font-weight: 700;
  font-size: 13px;
}

.tasks-quick input,
.tasks-quick select {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #dfe6f0;
  background: #f8fafc;
}

.tasks-quick__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.tasks-list {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(15, 27, 45, 0.08);
  display: grid;
  grid-template-rows: auto 1fr;
}

.tasks-list__header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 0.8fr;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7a90;
  border-bottom: 1px solid #e6edf5;
}

.tasks-list__body {
  display: grid;
  gap: 8px;
  padding: 12px;
  max-height: 560px;
  overflow: auto;
}

.task-card {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 0.8fr;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #e6edf5;
  background: #f8fafc;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.task-card:hover {
  transform: translateY(-1px);
  border-color: #cfe2ff;
  box-shadow: 0 10px 20px rgba(15, 27, 45, 0.12);
}

.task-card.active {
  border-color: #0f6fbf;
  background: #eef6ff;
}

.task-title {
  font-weight: 700;
  color: #0f1b2d;
}

.task-meta {
  font-size: 12px;
  color: #4f637a;
}

.task-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.task-pill.high { background: #fee2e2; color: #991b1b; }
.task-pill.medium { background: #e0f2fe; color: #075985; }
.task-pill.low { background: #dcfce7; color: #166534; }

.task-detail {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 12px 28px rgba(15, 27, 45, 0.08);
  display: grid;
  gap: 12px;
}

.task-detail__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.task-detail__title {
  font-weight: 800;
  font-size: 16px;
}

.task-detail__status {
  font-size: 12px;
  font-weight: 700;
  color: #0f6fbf;
}

.task-detail__meta {
  font-size: 12px;
  color: #4f637a;
}

.task-detail__section {
  display: grid;
  gap: 6px;
  font-size: 13px;
}

.task-detail__section textarea {
  border: 1px solid #dfe6f0;
  border-radius: 10px;
  padding: 10px;
  background: #f8fafc;
}

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

/* Pipeline */
.pipeline-view {
  padding: 12px 16px 24px;
}

.pipeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 16px;
}

.pipeline-header h2 {
  margin: 0;
}

.pipeline-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.pipeline-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pipeline-filters input,
.pipeline-filters select {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #dfe6f0;
  background: #fff;
}

.pipeline-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.pipeline-metrics .metric-card {
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.pipeline-metrics .metric-card:hover {
  transform: translateY(-1px);
  border-color: #cfe2ff;
  box-shadow: 0 14px 30px rgba(15, 27, 45, 0.12);
}

.metric-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 10px 24px rgba(15, 27, 45, 0.06);
}

.metric-label {
  font-size: 12px;
  color: #6b7a90;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.metric-value {
  font-size: 20px;
  font-weight: 800;
  margin: 6px 0;
  color: #0f1b2d;
}

.metric-meta {
  font-size: 12px;
  color: #4f637a;
}

.pipeline__columns--wide {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 12px;
}

.pipeline__columns .column {
  background: #f6f9fd;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 10px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 10px;
  min-height: 240px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.pipeline-view .column__body {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 10px;
}

.pipeline-view .column__header {
  align-items: flex-start;
  min-height: 44px;
}

.pipeline-view .column__header > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pipeline-view .column__header .chip {
  margin-top: 2px;
}

.pipeline-view .column__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding-top: 6px;
  border-top: 1px solid #e2e8f0;
}

.pipeline-view .column__page {
  font-size: 12px;
  color: #64748b;
}

.pipeline__columns .column.drag-over {
  border-color: #9cc7ff;
  background: #eef6ff;
  box-shadow: inset 0 0 0 1px rgba(15, 111, 191, 0.25);
}

.pipeline__columns .column.drop-confirm {
  border-color: #34d399;
  background: #ecfdf3;
  box-shadow: inset 0 0 0 1px rgba(22, 163, 74, 0.25);
}

.column__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.column__title {
  font-weight: 800;
  font-size: 14px;
}

.column__meta {
  font-size: 12px;
  color: #6b7a90;
}

.pipeline-view .card--compact {
  background: #fff;
  border: 1px solid #e6edf5;
  border-radius: 12px;
  padding: 16px 16px 14px;
  display: grid;
  gap: 6px;
  box-shadow: 0 10px 20px rgba(15, 27, 45, 0.08);
  min-width: 0;
  width: 100%;
}

.pipeline-view .card__meta {
  font-size: 12px;
  color: #4f637a;
}

.pipeline-view .card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.pipeline-card__title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.pipeline-card__title-row .card__title {
  font-size: 18px;
}

.pipeline-card__avatar-action {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #dbe3ee;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  box-shadow: 0 8px 16px rgba(15, 27, 45, 0.08);
}

.pipeline-card__avatar-action svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
}

.pipeline-card__meta-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px;
  font-size: 13px;
  margin-top: 8px;
}

.pipeline-card__label {
  color: #64748b;
  font-weight: 600;
}

.pipeline-card__value {
  color: #1f2a37;
  font-weight: 500;
}

.pipeline-card__actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  color: #6b7280;
  flex-wrap: wrap;
}

.pipeline-card__icon {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  transition: transform 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.pipeline-card__icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
}

.pipeline-card__icon:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(15, 27, 45, 0.12);
  color: #0f6fbf;
}

@media (max-width: 900px) {
  .pipeline__columns--wide {
    grid-template-columns: 1fr;
  }

  .pipeline-card__actions {
    gap: 8px;
  }
}

.case-management {
  background: linear-gradient(135deg, #f6f9ff 0%, #eef2fb 100%);
  border: 1px solid #d9e2f1;
  border-radius: 16px;
  padding: 16px;
  display: grid;
  gap: 12px;
}

.case-management.hidden {
  display: none;
}

.case-management__header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.case-management__eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #5b6f8a;
}

.case-management__title {
  font-size: 18px;
  font-weight: 700;
  color: #1d2d44;
}

.case-management__meta {
  font-size: 13px;
  color: #4f637a;
}

.case-status-pill {
  background: #0f4c81;
  color: #fff;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
}

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

.case-kpi {
  background: #fff;
  border: 1px solid #dfe6f0;
  border-radius: 12px;
  padding: 10px;
  display: grid;
  gap: 4px;
}

.case-kpi span {
  font-size: 12px;
  color: #6b7a90;
}

.case-kpi strong {
  font-size: 14px;
  color: #1f3b71;
}

.case-management__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.case-management__lists {
  display: grid;
  gap: 12px;
}

.case-list {
  background: #fff;
  border: 1px solid #dfe6f0;
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.case-list__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.case-list__header h6 {
  margin: 0;
  font-size: 14px;
  color: #1d2d44;
}

.case-list__body {
  display: grid;
  gap: 8px;
}

.case-list__item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f8fafc;
}

.case-list__item strong {
  font-size: 13px;
  color: #1f3b71;
}

.case-list__item span {
  font-size: 12px;
  color: #6b7a90;
}

.case-list__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.case-list__badge {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #0b4a7e;
}

.case-list__empty {
  font-size: 12px;
  color: #6b7a90;
}

.pipeline-view .chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: #e2e8f0;
  color: #0f1b2d;
}

.pipeline-view .chip--status {
  background: #e0f2fe;
  color: #075985;
}

.pipeline-view .chip--success {
  background: #dcfce7;
  color: #166534;
}

.pipeline-view .chip--danger {
  background: #fee2e2;
  color: #991b1b;
}

.pipeline-view .chip-owner {
  background: #ede9fe;
  color: #5b21b6;
}

@media (max-width: 1080px) {
  .pipeline-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Matters */
.matters-view {
  padding: 12px 16px 24px;
}

.matters-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 16px;
}

.matters-header h2 {
  margin: 0;
}

.matters-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.matters-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.matters-filters input,
.matters-filters select {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #dfe6f0;
  background: #fff;
}

.matters-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.matters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

/* Contacts */
.contacts-view {
  padding: 12px 16px 24px;
}

.contacts-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 16px;
}

.contacts-header h2 {
  margin: 0;
}

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

.contacts-header__actions input {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #dfe6f0;
  background: #fff;
}

.contacts-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.contact-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px;
  display: grid;
  gap: 8px;
  box-shadow: 0 12px 28px rgba(15, 27, 45, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.contact-card:hover {
  transform: translateY(-1px);
  border-color: #cfe2ff;
  box-shadow: 0 14px 30px rgba(15, 27, 45, 0.12);
}

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

.contact-name {
  font-weight: 800;
  color: #0f1b2d;
}

.contact-role {
  font-size: 12px;
  color: #6b7a90;
}

.contact-tag {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: #e2e8f0;
  color: #0f1b2d;
}

.contact-tag.prospect {
  background: #fef3c7;
  color: #92400e;
}

.contact-tag.client {
  background: #dcfce7;
  color: #166534;
}

.contact-meta {
  font-size: 12px;
  color: #4f637a;
}

.contact-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Activities */
.activities-view {
  padding: 12px 16px 24px;
}

.activities-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 16px;
}

.activities-header h2 {
  margin: 0;
}

.activities-header__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.activities-date {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.activities-date input {
  border: none;
  background: transparent;
  font-size: 13px;
  color: #0f1b2d;
}

.activities-date input:focus {
  outline: none;
}

.activities-header__actions input,
.activities-header__actions select {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #dfe6f0;
  background: #fff;
}

.activities-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.activities-panel {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 16px;
}

.activities-list {
  display: grid;
  gap: 10px;
}

.activity-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px;
  display: grid;
  gap: 8px;
  box-shadow: 0 12px 28px rgba(15, 27, 45, 0.08);
}

.activity-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.activity-title {
  font-weight: 800;
  color: #0f1b2d;
}

.activity-meta {
  font-size: 12px;
  color: #4f637a;
}

.activity-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.activity-modal {
  max-width: 680px;
}

.activity-modal__list {
  display: grid;
  gap: 10px;
  padding: 6px 0;
}

.activities-metrics .metric-card {
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.activities-metrics .metric-card:hover {
  transform: translateY(-1px);
  border-color: #cfe2ff;
  box-shadow: 0 14px 30px rgba(15, 27, 45, 0.12);
}

.activities-sidebar {
  display: grid;
  gap: 12px;
}

.activities-summary,
.activities-upnext {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 12px 28px rgba(15, 27, 45, 0.08);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #4f637a;
  margin-top: 8px;
}

.upnext-card {
  display: grid;
  gap: 6px;
  padding: 10px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e6edf5;
  margin-top: 10px;
}

@media (max-width: 1080px) {
  .activities-panel {
    grid-template-columns: 1fr;
  }
}

/* Billing */
.billing-view {
  padding: 12px 16px 24px;
}

.billing-header {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.billing-header__title h2 {
  margin: 0;
}

.billing-header__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
}

.billing-actions__right {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-left: auto;
}

.billing-bulk {
  display: flex;
  gap: 6px;
}

.billing-header__actions input {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #dfe6f0;
  background: #fff;
}

.billing-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.billing-panel {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 16px;
}

.billing-table {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(15, 27, 45, 0.08);
  overflow: hidden;
}

.billing-table__header {
  display: grid;
  grid-template-columns: 0.3fr 1.2fr 1.2fr 1fr 0.8fr 0.8fr 0.8fr 0.8fr;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7a90;
  border-bottom: 1px solid #e6edf5;
}

.billing-table__body {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.billing-row {
  display: grid;
  grid-template-columns: 0.3fr 1.2fr 1.2fr 1fr 0.8fr 0.8fr 0.8fr 0.8fr;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #e6edf5;
  background: #f8fafc;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.billing-row:hover {
  transform: translateY(-1px);
  border-color: #cfe2ff;
  box-shadow: 0 10px 20px rgba(15, 27, 45, 0.12);
}

.billing-metrics .metric-card {
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.billing-metrics .metric-card:hover {
  transform: translateY(-1px);
  border-color: #cfe2ff;
  box-shadow: 0 14px 30px rgba(15, 27, 45, 0.12);
}

.billing-drill-modal {
  max-width: 820px;
}

.billing-drill__list {
  display: grid;
  gap: 10px;
  padding: 6px 0;
}

.billing-status {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: capitalize;
}

.billing-status.draft {
  background: #e2e8f0;
  color: #475569;
}

.billing-status.unpaid {
  background: #fef3c7;
  color: #92400e;
}

.billing-status.overdue {
  background: #fee2e2;
  color: #991b1b;
}

.billing-status.paid {
  background: #dcfce7;
  color: #166534;
}

.billing-status.approved {
  background: #e0f2fe;
  color: #075985;
}

.billing-status.sent {
  background: #ede9fe;
  color: #5b21b6;
}

.billing-sidebar {
  display: grid;
  gap: 12px;
}

.billing-summary,
.billing-actions {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 12px 28px rgba(15, 27, 45, 0.08);
}

.billing-trust {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 12px 28px rgba(15, 27, 45, 0.08);
  display: grid;
  gap: 10px;
}

.billing-trust__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.billing-trust__balance {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #4f637a;
}

.billing-trust__list {
  display: grid;
  gap: 8px;
}

.trust-row {
  display: grid;
  gap: 4px;
  padding: 8px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e6edf5;
  font-size: 12px;
}

.trust-row__amount.deposit {
  color: #166534;
  font-weight: 700;
}

.trust-row__amount.withdrawal {
  color: #991b1b;
  font-weight: 700;
}

.trust-modal {
  max-width: 520px;
}

.trust-form {
  display: grid;
  gap: 12px;
  padding: 6px 0;
}

.trust-form label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  color: #0f1b2d;
  font-size: 13px;
}

.trust-form input,
.trust-form select {
  border: 1px solid #dfe6f0;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  background: #f8fafc;
  color: #0f1b2d;
}

.payment-modal {
  max-width: 520px;
}

.payment-form {
  display: grid;
  gap: 12px;
  padding: 6px 0;
}

.payment-form label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  color: #0f1b2d;
  font-size: 13px;
}

.payment-form input,
.payment-form select,
.payment-form textarea {
  border: 1px solid #dfe6f0;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  background: #f8fafc;
  color: #0f1b2d;
}

.payment-form .small {
  font-size: 12px;
  color: #6b7a90;
}

.payment-summary {
  display: grid;
  gap: 4px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px;
}

.payment-link__row {
  display: flex;
  gap: 8px;
  align-items: center;
}

@media (max-width: 1080px) {
  .billing-panel {
    grid-template-columns: 1fr;
  }
}

/* Payments */
.payments-view {
  padding: 12px 16px 24px;
}

.payments-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 16px;
}

.payments-header h2 {
  margin: 0;
}

.payments-header__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.payments-header__actions input,
.payments-header__actions select {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #dfe6f0;
  background: #fff;
}

.payments-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.payments-panel {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 16px;
}

.payments-table {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(15, 27, 45, 0.08);
  overflow: hidden;
}

.payments-table__header {
  display: grid;
  grid-template-columns: 1.1fr 1fr 0.9fr 0.8fr 0.8fr 0.8fr 0.9fr;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7a90;
  border-bottom: 1px solid #e6edf5;
}

.payments-table__body {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.payments-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr 0.9fr 0.8fr 0.8fr 0.8fr 0.9fr;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #e6edf5;
  background: #f8fafc;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.payments-row:hover {
  transform: translateY(-1px);
  border-color: #cfe2ff;
  box-shadow: 0 10px 20px rgba(15, 27, 45, 0.12);
}

.payment-status {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: capitalize;
}

.payment-status.succeeded {
  background: #dcfce7;
  color: #166534;
}

.payment-status.pending {
  background: #e0f2fe;
  color: #075985;
}

.payment-status.failed {
  background: #fee2e2;
  color: #991b1b;
}

.payment-status.refunded {
  background: #e2e8f0;
  color: #475569;
}

.payment-status.partial-refund {
  background: #fef3c7;
  color: #92400e;
}

.payments-sidebar {
  display: grid;
  gap: 12px;
}

.payments-summary,
.payments-links {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 12px 28px rgba(15, 27, 45, 0.08);
}

.payments-autopay {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 12px 28px rgba(15, 27, 45, 0.08);
}

.autopay-card {
  display: grid;
  gap: 6px;
  padding: 10px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e6edf5;
  margin-top: 10px;
}

.autopay-status {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #0f6fbf;
}

.autopay-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.payment-link-modal {
  max-width: 520px;
}

.payment-detail-modal {
  max-width: 520px;
}

.payment-detail__summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  margin-bottom: 12px;
}

.payment-detail__amount {
  font-size: 20px;
  font-weight: 800;
  color: #0f1b2d;
}

.payment-detail__meta {
  font-size: 12px;
  color: #6b7a90;
  text-transform: capitalize;
}

.payment-detail__pill {
  padding: 4px 10px;
  border-radius: 999px;
  background: #e2e8f0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #475569;
}

.payment-detail__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  font-size: 13px;
  color: #4f637a;
}

.payment-detail__refunds {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  font-size: 13px;
  color: #4f637a;
}

.payment-refund {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e6edf5;
}

.payment-detail__actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 12px;
}

.payment-detail__actions input {
  border: 1px solid #dfe6f0;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
  background: #f8fafc;
}

.payment-link-form {
  display: grid;
  gap: 12px;
  padding: 6px 0;
}

.payment-link-form label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  color: #0f1b2d;
  font-size: 13px;
}

.payment-link-form input,
.payment-link-form select {
  border: 1px solid #dfe6f0;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  background: #f8fafc;
  color: #0f1b2d;
}

.payment-link-card {
  display: grid;
  gap: 6px;
  padding: 10px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e6edf5;
  margin-top: 10px;
}

.payment-link-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

@media (max-width: 1080px) {
  .payments-panel {
    grid-template-columns: 1fr;
  }
}

/* Accounts */
.accounts-view {
  padding: 12px 16px 24px;
}

.accounts-header {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(280px, 520px);
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.accounts-header h2 {
  margin: 0;
}

.accounts-header__actions {
  display: grid;
  gap: 8px;
  justify-items: end;
  align-items: start;
}

.accounts-header__actions input {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #dfe6f0;
  background: #fff;
}

.accounts-header__actions select {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #dfe6f0;
  background: #fff;
}

.accounts-actions__search {
  width: 100%;
}

.accounts-actions__search input {
  width: 100%;
  height: 36px;
}

.accounts-actions__controls {
  display: grid;
  gap: 8px;
  width: 100%;
}

.accounts-actions__row {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.accounts-actions__row button,
.accounts-actions__row select {
  height: 36px;
}

@media (max-width: 900px) {
  .accounts-header {
    grid-template-columns: 1fr;
  }

  .accounts-header__actions,
  .accounts-actions__controls,
  .accounts-actions__row {
    justify-items: stretch;
    justify-content: flex-start;
  }
}

.accounts-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.account-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px;
  display: grid;
  gap: 10px;
  box-shadow: 0 12px 28px rgba(15, 27, 45, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.account-card:hover {
  transform: translateY(-1px);
  border-color: #cfe2ff;
  box-shadow: 0 14px 30px rgba(15, 27, 45, 0.12);
}

.account-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.account-name {
  font-weight: 800;
  color: #0f1b2d;
}

.account-type {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e2e8f0;
  font-weight: 700;
  text-transform: uppercase;
}

.account-type.trust {
  background: #e0f2fe;
  color: #075985;
}

.account-type.operating {
  background: #dcfce7;
  color: #166534;
}

.account-meta {
  font-size: 12px;
  color: #4f637a;
}

.account-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.account-modal {
  max-width: 560px;
}

.account-form {
  display: grid;
  gap: 12px;
  padding: 6px 0;
}

.account-form label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  color: #0f1b2d;
  font-size: 13px;
}

.account-form input,
.account-form select {
  border: 1px solid #dfe6f0;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  background: #f8fafc;
  color: #0f1b2d;
}

.account-form__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.account-detail {
  display: grid;
  gap: 10px;
  padding: 6px 0;
  font-size: 13px;
  color: #4f637a;
}

.account-detail__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.account-detail__transactions {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.account-transaction {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e6edf5;
  font-size: 12px;
  color: #4f637a;
}

.account-transaction__amount.negative {
  color: #991b1b;
  font-weight: 700;
}

.account-transaction__amount.positive {
  color: #166534;
  font-weight: 700;
}

/* Invoice modal */
.invoice-modal {
  max-width: 820px;
}

.invoice-form {
  display: grid;
  gap: 16px;
  padding: 6px 0;
}

.invoice-form label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  color: #0f1b2d;
  font-size: 13px;
}

.invoice-form input,
.invoice-form select {
  border: 1px solid #dfe6f0;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  background: #f8fafc;
  color: #0f1b2d;
}

.invoice-form__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.invoice-lines {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.invoice-lines__header,
.invoice-line {
  display: grid;
  grid-template-columns: 2fr 0.6fr 0.8fr 0.8fr;
  gap: 8px;
  align-items: center;
}

.invoice-lines__header {
  font-size: 12px;
  font-weight: 700;
  color: #6b7a90;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.invoice-line input {
  width: 100%;
}

.invoice-line__amount {
  font-weight: 700;
  color: #0f1b2d;
}

.invoice-line__remove {
  background: transparent;
  border: none;
  color: #b42318;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  margin: 0;
  box-shadow: none;
}

.invoice-totals {
  display: grid;
  gap: 8px;
  justify-content: end;
}

.invoice-total-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  font-size: 13px;
  color: #4f637a;
}

.invoice-total-row--grand {
  font-size: 15px;
  font-weight: 800;
  color: #0f1b2d;
}

.invoice-tax {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.invoice-tax input {
  width: 70px;
  text-align: right;
}

.invoice-detail-modal {
  max-width: 900px;
  max-height: 90vh;
  overflow: auto;
}

.invoice-detail__grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 12px;
  margin-top: 12px;
}

.invoice-detail__side {
  display: grid;
  gap: 12px;
}

.invoice-history {
  margin-top: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.invoice-history__title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7a90;
}

.invoice-history__item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: #4f637a;
}

.invoice-payments {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.invoice-payment {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: #4f637a;
}

.invoice-payment strong {
  color: #0f1b2d;
}

.invoice-attachments,
.invoice-preview {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.invoice-send {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.invoice-send label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  color: #0f1b2d;
  font-size: 13px;
}

.invoice-send input {
  border: 1px solid #dfe6f0;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  background: #f8fafc;
  color: #0f1b2d;
}

.invoice-attachment {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #4f637a;
}

.invoice-preview__box {
  height: 160px;
  border-radius: 10px;
  border: 1px dashed #cbd5e1;
  display: grid;
  place-items: center;
  color: #6b7a90;
  background: #fff;
  font-size: 12px;
}

/* Documents */
.documents-view {
  padding: 12px 16px 24px;
}

.documents-header {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(280px, 520px);
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.documents-header h2 {
  margin: 0;
}

.documents-header__actions {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.documents-actions__search {
  width: 100%;
}

.documents-actions__search input {
  width: 100%;
  height: 38px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid #dfe6f0;
  background: #fff;
}

.documents-actions__controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

.documents-actions__controls select {
  height: 36px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid #dfe6f0;
  background: #fff;
}

.view-toggle {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: #f1f5fb;
  border: 1px solid #e2e8f0;
}

.view-toggle__btn {
  border: 0;
  background: transparent;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #3b536f;
  cursor: pointer;
}

.view-toggle__btn.active {
  background: #fff;
  color: #0f4aa5;
  box-shadow: 0 2px 6px rgba(15, 74, 165, 0.15);
}

.documents-body {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
}

.documents-sidebar {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 14px;
  display: grid;
  gap: 12px;
  align-content: start;
}

.documents-folder-actions {
  display: grid;
  gap: 8px;
}

.doc-folder-list {
  display: grid;
  gap: 6px;
}

.doc-folder {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: #f5f7fb;
  text-align: left;
  font-weight: 600;
  color: #1d2a3b;
  cursor: pointer;
}

.doc-folder.active {
  background: #e6f0ff;
  border-color: #c7ddff;
  color: #0f4aa5;
}

.doc-storage__label {
  font-weight: 700;
  font-size: 12px;
  color: #3c4c63;
}

.doc-storage__bar {
  height: 8px;
  border-radius: 999px;
  background: #eef2f8;
  overflow: hidden;
}

.doc-storage__bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3c7df0, #7fb0ff);
}

.doc-storage__meta {
  font-size: 12px;
  color: #6b7b92;
}

.documents-content {
  display: grid;
  gap: 12px;
}

.documents-tabs {
  margin-top: 4px;
}

.documents-tab-panels {
  display: grid;
  gap: 12px;
}

.documents-tab-panel.hidden {
  display: none;
}
.documents-requests {
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 14px;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.documents-requests__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.documents-templates,
.documents-activity {
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 14px;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.documents-templates__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.documents-request-title {
  font-weight: 700;
  color: #1f2d3d;
}

.documents-request-btn {
  height: 24px;
  padding: 2px 8px;
  font-size: 12px;
}

.documents-requests__list {
  display: grid;
  gap: 8px;
}

.document-request {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 120px;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: 13px;
  color: #1f2d3d;
}

.document-request__meta {
  font-size: 12px;
  color: #6b7b92;
}

.document-request__status {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 0;
  background: #fff4dd;
}

.document-request__status.requested {
  background: #fff4dd;
  color: #a15a11;
}

.document-request__status.received {
  background: #e5f7ee;
  color: #1d7a4f;
}

.document-request__status.overdue {
  background: #ffe6e6;
  color: #b82c2c;
}

.document-request__actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.document-request-modal {
  max-width: 560px;
}

.document-request-body {
  display: grid;
  gap: 12px;
}

.document-request-body input,
.document-request-body select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #dfe6f0;
  background: #fff;
}

.document-request-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.document-template-card {
  display: grid;
  grid-template-columns: 1.8fr 1fr 120px;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: 13px;
  color: #1f2d3d;
}

.document-template__meta {
  font-size: 12px;
  color: #6b7b92;
}

.document-template__actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.document-activity-row {
  display: grid;
  grid-template-columns: 110px 1fr 120px;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: 13px;
  color: #1f2d3d;
}

.document-activity-row__meta {
  font-size: 12px;
  color: #6b7b92;
}

.documents-bulk {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  font-size: 12px;
  color: #4b5f7a;
}

.documents-bulk.hidden {
  display: none;
}

.doc-select-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.documents-bulk select {
  height: 32px;
  padding: 4px 8px;
  border-radius: 10px;
  border: 1px solid #dfe6f0;
  background: #fff;
}

.documents-bulk__meta {
  margin-left: auto;
  font-weight: 600;
  color: #1f2d3d;
}

.documents-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #6b7b92;
  padding: 2px 4px;
}

.documents-filters {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px;
}

.documents-filters__group {
  display: grid;
  gap: 6px;
}

.documents-filter-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7a8ca6;
  font-weight: 700;
}

.documents-tags {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
  overflow-x: auto;
  padding-bottom: 2px;
}

.tag-chip {
  border: 1px solid #e1e7f2;
  background: #f7f9fd;
  color: #51637d;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 10px;
  line-height: 16px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tag-chip.active {
  background: #e6f0ff;
  border-color: #c7ddff;
  color: #0f4aa5;
}

.tag-chip.tag-chip--more {
  background: #fff;
  border-style: dashed;
  color: #3c567a;
}

.documents-tags__hidden {
  display: none;
  gap: 6px;
  flex-wrap: wrap;
}

.documents-tags__hidden.is-open {
  display: flex;
}

.documents-filters select,
.documents-date-range input {
  height: 34px;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid #dfe6f0;
  background: #fff;
}

.documents-date-range {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.documents-size-range {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.documents-dropzone {
  border: 1px dashed #c7d7f3;
  border-radius: 16px;
  background: #f8fbff;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #4b6382;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.documents-dropzone input {
  display: none;
}

.documents-dropzone.is-dragover {
  border-color: #7aa6ff;
  background: #eef5ff;
  box-shadow: 0 12px 24px rgba(15, 74, 165, 0.12);
}

.documents-dropzone__title {
  font-weight: 700;
  color: #1f2d3d;
}

.documents-dropzone__meta {
  font-size: 12px;
  color: #6b7b92;
}

.doc-breadcrumb {
  font-weight: 600;
  color: #1f2d3d;
}

.documents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.documents-grid.is-list {
  display: block;
}

.document-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px;
  display: grid;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.document-card:hover {
  border-color: #cfe1ff;
  box-shadow: 0 10px 24px rgba(15, 74, 165, 0.12);
  transform: translateY(-2px);
}

.document-card.is-selected {
  border-color: #8fb3ff;
  box-shadow: 0 10px 20px rgba(15, 74, 165, 0.18);
}

.doc-select {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: 1px solid #d4dfee;
  background: #fff;
}

.doc-select input {
  width: 14px;
  height: 14px;
}

.doc-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #1d2a3b;
  background: #eef3ff;
}

.doc-icon--pdf {
  background: #ffe6e6;
  color: #b82c2c;
}

.doc-icon--doc {
  background: #e6f0ff;
  color: #1f5bb5;
}

.doc-icon--sheet {
  background: #e5f7ee;
  color: #1d7a4f;
}

.doc-icon--image {
  background: #fff4dd;
  color: #b86a12;
}

.doc-icon--folder {
  background: #f0f4ff;
  color: #3d5fa8;
}

.document-card__title {
  font-weight: 700;
  font-size: 14px;
  color: #1f2d3d;
}

.document-card__meta {
  font-size: 12px;
  color: #6b7b92;
}

.document-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #6b7b92;
}

.document-card__actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.doc-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.doc-tag {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f1f5fb;
  color: #52627a;
  font-size: 11px;
}

.doc-row {
  display: grid;
  grid-template-columns: 26px 42px 2fr 1fr 1fr 90px 170px;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.doc-row:hover {
  border-color: #cfe1ff;
  box-shadow: 0 10px 18px rgba(15, 74, 165, 0.1);
}

.doc-row--header {
  border: 0;
  background: transparent;
  margin-bottom: 4px;
  text-transform: uppercase;
  font-size: 11px;
  color: #7a8ca6;
  letter-spacing: 0.08em;
  cursor: default;
}

.doc-row--header span:first-child {
  text-align: center;
}

.document-upload-modal {
  max-width: 560px;
}

.document-upload-body {
  display: grid;
  gap: 12px;
}

.document-upload-body input,
.document-upload-body select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #dfe6f0;
  background: #fff;
}

.document-upload-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.document-detail-modal {
  max-width: 560px;
}

.document-detail-body {
  display: grid;
  gap: 12px;
}

.document-detail-preview {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f7f9fd;
  padding: 10px;
  min-height: 180px;
  display: grid;
  place-items: center;
}

.document-detail-preview img {
  max-width: 100%;
  max-height: 260px;
  border-radius: 8px;
}

.document-detail-preview iframe {
  width: 100%;
  height: 260px;
  border: 0;
  border-radius: 8px;
  background: #fff;
}

.document-preview__placeholder {
  font-size: 13px;
  color: #6b7b92;
}

.document-preview {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
  background: #f7f9fd;
  border-radius: 12px;
  padding: 12px;
}

.doc-icon--large {
  width: 64px;
  height: 64px;
  font-size: 12px;
}

.document-preview__meta {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: #52627a;
}

.document-detail-info {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 8px;
  font-size: 13px;
  color: #3b4a60;
}

.document-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.document-versions {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 10px;
  background: #fff;
}

.document-versions__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.document-version-upload input {
  display: none;
}

.document-version {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f7f9fd;
  font-size: 13px;
  color: #2b3a52;
}

.document-version__meta {
  font-size: 12px;
  color: #6b7b92;
  margin-top: 2px;
}

.document-version__size {
  font-weight: 600;
  color: #1f2d3d;
}

@media (max-width: 900px) {
  .documents-header {
    grid-template-columns: 1fr;
  }

  .documents-header__actions {
    justify-items: stretch;
  }

  .documents-actions__controls {
    justify-content: flex-start;
  }

  .documents-body {
    grid-template-columns: 1fr;
  }

  .documents-filters {
    grid-template-columns: 1fr;
  }

  .document-request {
    grid-template-columns: 1fr;
  }

  .document-template-card,
  .document-activity-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .invoice-detail__grid {
    grid-template-columns: 1fr;
  }
}

.contact-modal {
  max-width: 680px;
}

.contact-form {
  display: grid;
  gap: 12px;
  padding: 6px 0;
}

.contact-form label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  color: #0f1b2d;
  font-size: 13px;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  border: 1px solid #dfe6f0;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  background: #f8fafc;
  color: #0f1b2d;
}

.contact-form textarea {
  resize: vertical;
  min-height: 90px;
}

.contact-form__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.matter-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 12px 28px rgba(15, 27, 45, 0.08);
  display: grid;
  gap: 12px;
}

.matter-card__header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.matter-title {
  font-weight: 800;
  font-size: 15px;
  color: #0f1b2d;
}

.matter-sub {
  font-size: 12px;
  color: #6b7a90;
}

.matter-status {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.matter-status--active {
  background: #dcfce7;
  color: #166534;
}

.matter-status--hold {
  background: #fef3c7;
  color: #92400e;
}

.matter-status--closed {
  background: #e5e7eb;
  color: #475569;
}

.matter-meta {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: #4f637a;
}

.matter-meta span {
  color: #0f1b2d;
  font-weight: 700;
  margin-right: 6px;
}

.matter-progress {
  display: grid;
  gap: 6px;
}

.matter-progress__label {
  font-size: 12px;
  font-weight: 700;
  color: #6b7a90;
}

.matter-progress__bar {
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.matter-progress__bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #0f6fbf, #58b5ff);
}

.matter-card__footer {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.matter-modal {
  max-width: 720px;
}

.matter-form {
  display: grid;
  gap: 12px;
  padding: 6px 0;
}

.matter-form label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  color: #0f1b2d;
  font-size: 13px;
}

.matter-form input,
.matter-form select {
  border: 1px solid #dfe6f0;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  background: #f8fafc;
  color: #0f1b2d;
}

.matter-form__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.matter-detail-modal {
  max-width: 520px;
}

.matter-detail__body {
  display: grid;
  gap: 12px;
  padding: 6px 0;
}

.matter-detail__pill {
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: #e2e8f0;
  color: #0f1b2d;
}

.matter-detail__meta {
  font-size: 13px;
  color: #4f637a;
}

@media (max-width: 1080px) {
  .tasks-board {
    grid-template-columns: 1fr;
  }

  .tasks-list__header,
  .task-card {
    grid-template-columns: 1fr 1fr;
    row-gap: 6px;
  }
}

@media (max-width: 1024px) {
  .calendar-shell {
    grid-template-columns: 1fr;
  }

  .calendar-actions {
    flex-wrap: wrap;
  }

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

  .integration-list__header,
  .integration-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .integration-actions {
    justify-content: flex-start;
  }
}

.feed-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0f6fbf, #0d8c7f);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.02em;
}

.feed-desc {
  display: grid;
  gap: 2px;
}

.feed-desc strong {
  font-weight: 700;
}

.feed-desc .muted {
  font-size: 12px;
}

.feed-time {
  text-align: right;
  color: #4f637a;
  font-size: 12px;
}
.line-chart-placeholder::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 20px;
  height: 2px;
  background: #cbd5e1;
}

.line-chart-placeholder::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 40px;
  height: 2px;
  background: linear-gradient(90deg, #0f6fbf, #0f6fbf 40%, transparent 40%, transparent 60%, #0f6fbf 60%);
}

.actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  align-items: center;
}

.lead-report table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 12px;
}

.lead-report th,
.lead-report td {
  border: 1px solid var(--border);
  padding: 8px;
  text-align: left;
}

.lead-report th {
  background: #f6f9fc;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: grid;
  place-items: center;
  z-index: 3000;
}

.modal.hidden {
  display: none;
}

.modal__content {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  width: min(480px, 90vw);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  position: relative;
}

.modal__content--wide {
  width: min(1000px, 95vw);
}

.stage-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.stage-pill {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #dfe6f0;
  background: #f6f9fc;
  text-align: center;
  font-weight: 700;
  color: #4f637a;
}

.stage-pill.active {
  background: #0a7bd7;
  color: #fff;
  border-color: #0a7bd7;
}

.profile-details p {
  margin: 4px 0;
  color: #22324b;
}

.profile-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
}

.profile-page {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 16px;
  padding: 12px 16px;
}

.profile-left {
  min-width: 320px;
}

.profile-right {
  width: 100%;
}

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

.profile-card {
  background: #f8fafc;
  border: 1px solid #dfe6f0;
  border-radius: 12px;
  padding: 16px;
  display: grid;
  gap: 10px;
}

.avatar-lg {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #0a7bd7;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 18px;
}

.profile-meta .profile-name {
  font-weight: 800;
  font-size: 18px;
  margin-top: 4px;
}

.profile-meta .profile-sub {
  color: #4f637a;
  font-size: 13px;
}

.profile-field {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: #4f637a;
  align-items: center;
  gap: 8px;
}

.profile-field strong {
  color: #22324b;
}

.profile-field input {
  flex: 1;
  background: #fff;
  border: 1px solid #dfe6f0;
  border-radius: 6px;
  padding: 6px 8px;
}

.timeline-card {
  background: #fff;
  border: 1px solid #dfe6f0;
  border-radius: 12px;
  padding: 14px;
  display: grid;
  gap: 12px;
}

.timeline-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.timeline-header h4 {
  margin: 0;
}

.timeline-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.timeline-tab {
  border: 1px solid #d5deea;
  background: #f5f7fb;
  color: #2b3a55;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.timeline-tab.active {
  background: #0b4a7e;
  border-color: #0b4a7e;
  color: #fff;
}

.timeline-tab.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.timeline-quick {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.timeline-quick select {
  padding: 8px 10px;
  border: 1px solid #dfe6f0;
  border-radius: 10px;
  background: #f8fafc;
  color: #22324b;
  min-width: 150px;
}

.timeline-search input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #dfe6f0;
  border-radius: 10px;
  background: #f8fafc;
}

.timeline-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 6px;
  align-items: center;
}

.timeline-filters select {
  padding: 8px 10px;
  border: 1px solid #dfe6f0;
  border-radius: 10px;
  background: #f8fafc;
  color: #22324b;
}

.timeline-controls {
  display: grid;
  gap: 8px;
}

.timeline-controls .pill--soft {
  padding: 8px 10px;
}

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

.timeline-day {
  display: grid;
  gap: 8px;
}

.timeline-day__label {
  font-weight: 800;
  color: #0a4f8a;
}

.timeline-item {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 12px;
  align-items: start;
  padding: 10px;
  border: 1px solid #e5edf7;
  border-radius: 10px;
  background: #f9fbff;
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
  cursor: pointer;
}

.timeline-dot {
  width: 10px;
  height: 10px;
  background: #0a7bd7;
  border-radius: 50%;
  margin-top: 6px;
}

.timeline-dot--call { background: #0a7bd7; }
.timeline-dot--email { background: #7c3aed; }
.timeline-dot--task { background: #0ea5e9; }
.timeline-dot--deadline { background: #ef4444; }
.timeline-dot--document { background: #111827; }
.timeline-dot--intake { background: #16a34a; }
.timeline-dot--note { background: #14b8a6; }
.timeline-dot--appointment { background: #f97316; }
.timeline-dot--filing { background: #4b5563; }
.timeline-dot--default { background: #0a7bd7; }

.timeline-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.timeline-item:hover {
  border-color: #bcd7ff;
  box-shadow: 0 8px 20px rgba(10, 79, 138, 0.08);
  background: #f2f7ff;
}

.timeline-item--expanded {
  border-color: #0a7bd7;
  background: #edf5ff;
}

.timeline-item--expanded strong,
.timeline-item--expanded p {
  display: block;
}

.timeline-content p {
  margin: 0 0 4px 0;
  color: #22324b;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.timeline-item--expanded .timeline-content p {
  -webkit-line-clamp: unset;
  overflow: visible;
}

.timeline-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}

.timeline-badge--call { background: #0a7bd7; }
.timeline-badge--email { background: #7c3aed; }
.timeline-badge--task { background: #0ea5e9; }
.timeline-badge--deadline { background: #ef4444; }
.timeline-badge--document { background: #111827; }
.timeline-badge--intake { background: #16a34a; }
.timeline-badge--note { background: #14b8a6; }
.timeline-badge--appointment { background: #f97316; }
.timeline-badge--filing { background: #4b5563; }
.timeline-badge--default { background: #0a7bd7; }

.timeline-meta {
  color: #4f637a;
  font-size: 12px;
}

.timeline-time {
  margin-left: auto;
  color: #0a7bd7;
  font-weight: 700;
  font-size: 12px;
}

.timeline-content strong {
  display: block;
  margin-bottom: 4px;
}

.timeline-content small {
  color: #6b7a91;
}

.pill--ghost {
  background: #eef2f6;
  color: #0a4f8a;
}

.timeline-types {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.timeline-types .pill {
  background: #f5f7fa;
  color: #22324b;
  border: 1px solid #dfe6f0;
  box-shadow: none;
  padding: 8px 12px;
  margin: 0;
}

.timeline-types .pill.active {
  background: #0a7bd7;
  color: #fff;
  border-color: #0a7bd7;
}

.timeline-types.compact .pill {
  padding: 6px 10px;
  font-size: 12px;
}

.timeline-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  background: #f1f5f9;
  border: 1px solid #dfe6f0;
  border-radius: 8px;
  font-size: 12px;
  color: #0f172a;
  margin-top: 6px;
}

.timeline-empty {
  background: #f8fafc;
  border: 1px dashed #dfe6f0;
  border-radius: 10px;
  padding: 16px;
  color: #4f637a;
  text-align: center;
}

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

.timeline-modal__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.timeline-modal__content strong {
  font-size: 16px;
  display: block;
  margin-bottom: 6px;
}

.timeline-modal__content p {
  margin: 0;
  line-height: 1.5;
  color: #22324b;
}

.stage-panel {
  background: #fff;
  border: 1px solid #dfe6f0;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
  display: grid;
  gap: 10px;
}

.profile-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.stage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.stage-track span {
  height: 6px;
  border-radius: 999px;
  background: #e2e8f0;
}

.stage-track span.active {
  background: linear-gradient(90deg, #0b4a7e, #3ba2ff);
}

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

.stage-option {
  border: 1px solid #dfe6f0;
  border-radius: 12px;
  padding: 10px;
  text-align: left;
  background: #f8fafc;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  display: grid;
  gap: 4px;
}

.stage-option span {
  font-weight: 700;
  color: #1f3b71;
  font-size: 13px;
}

.stage-option small {
  color: #6b7a90;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stage-option.active {
  border-color: #0b4a7e;
  background: #eaf2ff;
  box-shadow: 0 10px 20px rgba(15, 76, 129, 0.16);
  transform: translateY(-2px);
}

.stage-option:hover {
  border-color: #94c1ff;
  transform: translateY(-1px);
}

.stage-promote {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #d7e6f9;
  background: #f5f9ff;
  display: grid;
  gap: 8px;
}

.stage-promote__label {
  font-size: 13px;
  font-weight: 600;
  color: #1f3b71;
}

.stage-promote__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stage-promote__actions input {
  flex: 1 1 220px;
  border: 1px solid #d7e1ee;
  border-radius: 8px;
  padding: 8px 10px;
}

.cta-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  margin-bottom: 12px;
  align-items: stretch;
}

.cta-card {
  border-radius: 12px;
  padding: 12px;
  color: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
  width: 100%;
  flex: 1 1 0;
}


.cta-card h5 {
  margin: 0 0 6px;
  font-size: 16px;
}

.cta-card p {
  margin: 0 0 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.9);
}

.cta-card .ghost {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: none;
}

.cta-blue { background: linear-gradient(135deg, #0a4f8a, #0f6fbf); }
.cta-purple { background: linear-gradient(135deg, #1f2937, #334155); }
.cta-teal {
  background: linear-gradient(135deg, #0d8c7f, #13b59b);
  color: #f7fdfc;
  border: 1px solid rgba(0, 0, 0, 0.05);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}
.cta-orange { background: linear-gradient(135deg, #0ea5e9, #38bdf8); }
.cta-output {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.18);
  color: #eaf1f9;
  font-size: 13px;
  line-height: 1.4;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid #e2e8f0;
  border-top-color: #0f6fbf;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.qualify-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: #f5f7fb;
  border-radius: 10px;
  color: #0f172a;
  border: 1px solid #e2e8f0;
}

.qualify-result {
  margin-top: 12px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  color: #0f172a;
  line-height: 1.5;
}

.qualify-conflicts {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.qualify-conflicts .conflict-item {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 10px;
  background: #ffffff;
}

.qualify-result__pill {
  display: inline-block;
  padding: 4px 8px;
  background: #0f6fbf;
  color: #fff;
  border-radius: 8px;
  font-size: 12px;
  margin-bottom: 8px;
}

.qualify-error {
  margin-top: 10px;
  color: #b42318;
  font-weight: 600;
}

.engagement-suggestions {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.engagement-suggestions .suggestion-item {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 10px;
  background: #ffffff;
}
.modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.modal__close {
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #0f1b2d;
  padding: 0;
  margin: 0;
  box-shadow: none;
  position: absolute;
  top: 12px;
  right: 12px;
}

.modal__actions {
  justify-content: flex-end;
}

.modal__actions--right {
  justify-content: flex-end;
  gap: 8px;
}

.modal__tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.form-grid--wide {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.labeled label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
  color: #22324b;
  font-size: 14px;
}

.labeled input,
.labeled textarea {
  background: #fff;
  border: 1px solid #dfe6f0;
  border-radius: 6px;
  padding: 10px;
}

.labeled .full {
  grid-column: span 2;
}

input,
textarea {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
}

button {
  background: linear-gradient(135deg, #0a7bd7, #4ea1ff);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px;
  cursor: pointer;
  margin-top: 12px;
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
  box-shadow: 0 10px 30px rgba(78, 161, 255, 0.25);
}

button:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.activity-card {
  background: #fff;
  border: 1px solid #dfe6f0;
  border-radius: 12px;
  padding: 12px;
}

.activity-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  margin-bottom: 10px;
  overflow-x: auto;
}

.activity-tab {
  border: 1px solid #dfe6f0;
  background: #f5f7fa;
  color: #1f2937;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.activity-tab.active {
  background: #0a7bd7;
  color: #fff;
  border-color: #0a7bd7;
}

.activity-icon {
  width: 16px;
  height: 16px;
}

.activity-body {
  min-height: 180px;
  display: grid;
  text-align: center;
  color: #4f637a;
}

.activity-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 8px;
}

.activity-actions--top {
  justify-content: flex-start;
  margin-top: 0;
  margin-bottom: 8px;
}

.activity-pane {
  display: none;
}
.activity-pane.active {
  display: grid;
  place-items: center;
}

.activity-pane--list.active {
  place-items: start;
}

.activity-list {
  width: 100%;
  display: grid;
  gap: 10px;
}

.activity-item {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 12px;
  background: #f8fafc;
  display: grid;
  gap: 4px;
}

.activity-item strong {
  font-size: 13px;
  color: #1f3b71;
}

.activity-item span {
  font-size: 12px;
  color: #4f637a;
}

.activity-item__meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #6b7a90;
}

.note-item {
  position: relative;
}

.note-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.note-item:hover .note-actions {
  opacity: 1;
  pointer-events: auto;
}

.task-item {
  position: relative;
}

.task-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.task-item:hover .task-actions {
  opacity: 1;
  pointer-events: auto;
}

.pill.danger {
  border-color: #fca5a5;
  color: #b91c1c;
  background: #fff1f2;
}

.agenda {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.agenda-header {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
}

.agenda-tabs {
  display: flex;
  gap: 4px;
}

.agenda-tab {
  border: 1px solid #dfe6f0;
  background: #f5f7fa;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.agenda-tab.active {
  background: #0a7bd7;
  color: #fff;
  border-color: #0a7bd7;
}

.agenda-filters {
  color: #4f637a;
  font-size: 13px;
}

.agenda-list {
  background: #fff;
  border: 1px solid #dfe6f0;
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.agenda-item {
  padding: 10px;
  border: 1px solid #e7eef6;
  border-radius: 8px;
}

.agenda-title {
  font-weight: 700;
  margin-bottom: 4px;
}

.agenda-meta {
  color: #4f637a;
  font-size: 12px;
}

.matters-view {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.matters-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
}

.matters-actions {
  display: flex;
  gap: 8px;
}

.matters-filters {
  display: flex;
  gap: 16px;
  color: #4f637a;
  font-size: 13px;
}

.forms-view {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.forms-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.forms-actions {
  display: flex;
  gap: 8px;
}

.forms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.form-card {
  background: #fff;
  border: 1px solid #dfe6f0;
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.05);
  display: grid;
  gap: 6px;
}

.form-title {
  font-weight: 700;
}

.form-meta {
  color: #4f637a;
  font-size: 12px;
}

textarea,
input,
select,
pre.output {
  color: var(--text);
}

label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin: 8px 0 4px;
}

input,
textarea,
button {
  width: 100%;
  font: inherit;
}

input,
textarea {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fdfdfd;
}

button {
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 10px;
  padding: 12px;
  cursor: pointer;
  margin-top: 12px;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(8, 89, 154, 0.2);
}

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

.status {
  font-size: 13px;
  color: var(--muted);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.output {
  background: #0f1b2d;
  color: #e6edf7;
  padding: 12px;
  border-radius: 8px;
  min-height: 80px;
  max-height: 220px;
  overflow: auto;
  font-size: 12px;
  line-height: 1.4;
  margin-top: 8px;
}

.output:empty {
  display: none;
}

.marketing {
  padding: 18px;
  display: grid;
  gap: 16px;
}

.marketing__hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 12px;
  font-weight: 700;
  color: #4f637a;
  margin: 0 0 4px;
}

.marketing__selected {
  margin-top: 8px;
  color: #0a4f8a;
  font-weight: 700;
}

.marketing__filters {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.marketing__filters .pill {
  margin-top: 0;
  width: auto;
}

.marketing__mediums {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.medium-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f9fbff 0%, #ffffff 100%);
  border: 1px solid #e4ecf5;
  cursor: pointer;
  color: inherit;
  margin: 0;
  text-align: left;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.medium-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(8, 89, 154, 0.16);
}

.medium-card.active {
  border-color: #0a7bd7;
  box-shadow: 0 12px 28px rgba(10, 123, 215, 0.18);
}

.medium-card__icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #0f1b2d;
  background: #e8f1ff;
  letter-spacing: 0.04em;
}

.medium-card__icon--search {
  background: linear-gradient(135deg, #e4f1ff, #cde3ff);
}

.medium-card__icon--ads {
  background: linear-gradient(135deg, #fff4e6, #ffe7c2);
}

.medium-card__icon--ga4 {
  background: linear-gradient(135deg, #e8fdf5, #cbf5e5);
}

.medium-card__icon--facebook {
  background: linear-gradient(135deg, #e8ecff, #d5ddff);
}

.medium-card__icon--instagram {
  background: linear-gradient(135deg, #ffe9f2, #ffd9e8);
}

.medium-card__name {
  font-weight: 800;
  margin-bottom: 2px;
}

.medium-card__meta {
  color: #4f637a;
  font-size: 13px;
}

.medium-card__stat {
  text-align: right;
  display: grid;
  gap: 2px;
}

.medium-card__value {
  font-weight: 800;
  color: #0a4f8a;
}

.medium-card__label {
  font-size: 12px;
  color: #4f637a;
}

.marketing__metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.marketing-kpi {
  display: grid;
  gap: 6px;
  background: linear-gradient(135deg, #ffffff 0%, #f7fbff 100%);
}

.kpi-label {
  font-size: 13px;
  color: #4f637a;
  font-weight: 700;
}

.kpi-value {
  font-size: 26px;
  font-weight: 900;
  color: #0f1b2d;
}

.kpi-trend {
  font-size: 13px;
  font-weight: 700;
  color: #4f637a;
}

.kpi-trend.positive {
  color: #1c8c4d;
}

.kpi-trend.negative {
  color: #b44235;
}

.kpi-sub {
  color: #4f637a;
  font-size: 13px;
}

.marketing-insight {
  grid-column: span 2;
  background: #0f1b2d;
  color: #e6edf7;
  display: grid;
  gap: 8px;
}

.marketing-insight__title {
  font-weight: 800;
  letter-spacing: 0.02em;
}

.marketing-insight__summary {
  margin: 0;
  color: #c8d2e0;
}

.marketing-insight__list {
  list-style: disc;
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  color: #d9e4f2;
}

.automations {
  padding: 18px;
  display: grid;
  gap: 16px;
}

.automations__hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  align-items: center;
}

.automations__actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.automations__actions .pill {
  margin-top: 0;
  width: auto;
}

.automation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.automation-card {
  background: #ffffff;
  border: 1px solid #e4ecf5;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(10, 123, 215, 0.08);
  display: grid;
  gap: 10px;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
  text-align: left;
}

.automation-card h3 {
  margin: 0;
}

.automation-card p {
  margin: 0;
  color: #4f637a;
  font-size: 14px;
}

.automation-card__meta {
  font-size: 12px;
  color: #4f637a;
}

.automation-card__tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: #e6f1ff;
  color: #0a4f8a;
  border-radius: 20px;
  font-weight: 700;
  width: fit-content;
}

.automation-card__tag--blue {
  background: #eaf3ff;
  color: #0a7bd7;
}

.automation-card__tag--green {
  background: #e8fdf5;
  color: #1c8c4d;
}

.automation-card__tag--purple {
  background: #f0e9ff;
  color: #5a3fc0;
}

.automation-card__tag--orange {
  background: #fff4e6;
  color: #c7651c;
}

.automation-card__tag--teal {
  background: #e7f9fa;
  color: #1f7a83;
}

.automation-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(10, 123, 215, 0.12);
}

.automation-card.active {
  border-color: #0a7bd7;
  box-shadow: 0 12px 30px rgba(10, 123, 215, 0.15);
}

.automation-detail {
  display: grid;
  gap: 10px;
}

.automation-detail__header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.automation-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.automation-actions .pill {
  margin-top: 0;
  width: auto;
}

.automation-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #4f637a;
  font-size: 13px;
}

.badge-pill {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #e4ecf5;
  background: #f7fbff;
  color: #0a4f8a;
  font-weight: 700;
}

.automation-builder {
  margin-top: 12px;
  border: 1px solid #e4ecf5;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 27, 45, 0.06);
}

.builder__top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #e4ecf5;
}

.builder__breadcrumbs {
  color: #4f637a;
  font-size: 13px;
  cursor: pointer;
}

.builder__tabs {
  display: inline-flex;
  gap: 6px;
  justify-content: center;
}

.builder__tab {
  border: 1px solid #e4ecf5;
  background: #f7fbff;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
}

.builder__tab.active {
  border-color: #0a7bd7;
  color: #0a7bd7;
  background: #eaf3ff;
}

.builder__actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.builder__canvas-shell {
  position: relative;
  display: grid;
  grid-template-columns: 48px 1fr 64px;
  align-items: stretch;
}

.builder__toolbar {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 10px 6px;
  border-right: 1px solid #e4ecf5;
}

.builder__canvas {
  position: relative;
  min-height: 520px;
  background: repeating-linear-gradient(
      0deg,
      #f5f7fa,
      #f5f7fa 1px,
      transparent 1px,
      transparent 16px
    ),
    repeating-linear-gradient(
      90deg,
      #f5f7fa,
      #f5f7fa 1px,
      transparent 1px,
      transparent 16px
    );
  background-color: #fbfdff;
  padding: 24px 60px;
  overflow: hidden;
}

.builder__canvas-empty {
  color: #4f637a;
  text-align: center;
  margin-top: 200px;
}

.builder__zoom {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 10px 8px;
  border-left: 1px solid #e4ecf5;
}

.tool-btn {
  background: #fff;
  border: 1px solid #e4ecf5;
  border-radius: 10px;
  padding: 8px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(15, 27, 45, 0.06);
  font-weight: 800;
  color: #0a4f8a;
}

.builder__controls {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid #e4ecf5;
  justify-content: flex-end;
}

.builder__lane {
  max-width: 520px;
  margin: 0 auto;
  position: relative;
}

.builder__node {
  background: #fff;
  border: 1px solid #e4ecf5;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 10px 24px rgba(15, 27, 45, 0.08);
  display: grid;
  gap: 6px;
  position: relative;
}

.builder__node-label {
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.builder__node-sub {
  color: #4f637a;
  font-size: 13px;
}

.builder__connector {
  width: 2px;
  background: #d3dce8;
  height: 32px;
  margin: 8px auto;
}

.builder__add-inline {
  display: flex;
  justify-content: center;
  margin: 6px 0 10px;
}

.node-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #0a4f8a;
  background: #eaf3ff;
  font-weight: 800;
}

.node-trigger {
  border-color: #c6e6d8;
  background: #f3fbf7;
}

.node-action {
  border-color: #dfe6f0;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #4f637a;
}

.note-modal__tabs {
  margin: 0 16px;
}

.note-modal__body {
  padding: 12px 16px 4px;
}

.note-pane.hidden {
  display: none;
}

.note-label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
}

.note-textarea {
  width: 100%;
  border: 1px solid #d8e2ef;
  border-radius: 10px;
  padding: 12px;
  font-size: 14px;
  min-height: 140px;
  resize: vertical;
}

.note-helper {
  margin-top: 6px;
  color: #4f637a;
  font-size: 13px;
}

.record-card {
  border: 1px dashed #d8e2ef;
  border-radius: 12px;
  padding: 12px;
  background: #f8fbff;
  display: grid;
  gap: 10px;
}

.record-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.record-timer {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  color: #0a4f8a;
}

.record-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.record-playback audio {
  width: 100%;
}

.note-status {
  flex: 1;
  color: #0a4f8a;
  font-size: 13px;
  min-height: 18px;
}

.note-status.error {
  color: #b42318;
}

.toast {
  position: fixed;
  right: 32px;
  bottom: 32px;
  min-width: 240px;
  max-width: 360px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #0f172a;
  color: #f8fafc;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.25);
  font-size: 0.95rem;
  opacity: 0;
  transform: translateY(12px);
  transition: transform 200ms ease, opacity 200ms ease;
  z-index: 1200;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast--success {
  background: #0b3b24;
}

.toast--error {
  background: #7f1d1d;
}

.auth-screen {
  position: fixed;
  inset: 0;
  background: #e9f1ff;
  display: grid;
  place-items: stretch;
  padding: 0;
  z-index: 1300;
}

.auth-screen.hidden {
  display: none;
}

#appShell.hidden {
  display: none;
}

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

.auth-showcase {
  position: relative;
  background: linear-gradient(135deg, #071026 0%, #0a2a4f 40%, #00a1c7 100%);
  color: #f8fafc;
  padding: 64px;
  display: grid;
  gap: 18px;
  align-content: center;
  overflow: hidden;
}

.auth-showcase::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 20%, rgba(72, 198, 239, 0.22), transparent 46%),
    radial-gradient(circle at 80% 10%, rgba(38, 179, 215, 0.18), transparent 52%),
    radial-gradient(circle at 70% 82%, rgba(6, 25, 46, 0.95), transparent 55%),
    linear-gradient(140deg, rgba(255, 255, 255, 0.08) 0%, transparent 55%);
  opacity: 0.8;
}

.auth-showcase::after {
  content: "";
  position: absolute;
  inset: -20% -10%;
  background:
    radial-gradient(circle at 30% 35%, rgba(0, 212, 255, 0.12), transparent 35%),
    radial-gradient(circle at 75% 70%, rgba(70, 255, 216, 0.12), transparent 42%),
    conic-gradient(from 120deg, rgba(255, 255, 255, 0.08), transparent 30%, rgba(0, 163, 255, 0.12), transparent 60%);
  mix-blend-mode: screen;
  opacity: 0.6;
  pointer-events: none;
}

.auth-showcase > * {
  position: relative;
  z-index: 1;
}

.auth-showcase h1 {
  margin: 0;
  font-size: 36px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.auth-showcase .muted {
  color: rgba(248, 250, 252, 0.8);
  font-size: 16px;
}

.auth-showcase__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.auth-showcase__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 10px;
}

.auth-showcase__stats strong {
  display: block;
  font-size: 20px;
}

.auth-showcase__stats span {
  font-size: 12px;
  color: rgba(248, 250, 252, 0.75);
}

.auth-showcase__glow {
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.35), transparent 70%);
  bottom: -80px;
  right: -40px;
  opacity: 0.6;
}

.auth-panel {
  background: #f8fafc;
  display: grid;
  align-items: center;
  padding: 48px;
}

.auth-card {
  background: #fff;
  border: 1px solid #dfe6f0;
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  display: grid;
  gap: 14px;
}

.auth-brand {
  font-weight: 800;
  font-size: 18px;
  color: #0b4a7e;
  letter-spacing: 0.08em;
}

.auth-card h2 {
  margin: 0;
  font-size: 24px;
  color: #1d2d44;
}

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

.auth-form input,
.auth-form select {
  width: 100%;
  border: 1px solid #dfe6f0;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  background: #f8fafc;
}

.auth-form .cta {
  width: 100%;
}

@media (max-width: 960px) {
  .auth-split {
    grid-template-columns: 1fr;
  }

  .auth-showcase {
    padding: 40px 32px;
  }

  .auth-panel {
    padding: 32px;
  }
}

.toast__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.toast__action {
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: transparent;
  color: inherit;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.85rem;
  cursor: pointer;
}

.toast__action:hover {
  border-color: rgba(255, 255, 255, 0.7);
}

.quick-actions {
  position: relative;
}


.handoff-card {
  border: 1px solid #dfe6f0;
  background: #f8fafc;
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.handoff-card .muted {
  margin: 0;
  color: #4f637a;
}

.handoff-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.handoff-actions input {
  flex: 1;
  min-width: 160px;
  border: 1px solid #dfe6f0;
  border-radius: 10px;
  padding: 8px 10px;
}

.pill--danger {
  background: #b42318;
  color: #fff;
}

.pill--ghost {
  background: #eef2f6;
  color: #0a4f8a;
}

.role-block.hidden {
  display: none;
}

.queue-list {
  display: grid;
  gap: 10px;
}

.queue-item {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px;
  background: #f8fafc;
}

.queue-item__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.queue-item__title {
  font-weight: 700;
  color: #0f172a;
}

.queue-item__meta {
  color: #4f637a;
  font-size: 12px;
}

.queue-item__link {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.queue-item__link:hover {
  text-decoration: underline;
}

.queue-item__sla {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  padding: 4px 8px;
  font-weight: 700;
  font-size: 12px;
}

.sla-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  border: 1px solid transparent;
}

.sla-ok {
  background: #ecfdf3;
  color: #166534;
  border-color: #bbf7d0;
}

.sla-warn {
  background: #fef9c3;
  color: #854d0e;
  border-color: #fde68a;
}

.sla-urgent {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecdd3;
}

.subnav {
  display: flex;
  gap: 8px;
  padding: 10px 16px 0;
}

.dashboard-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px 0;
}

.dashboard-range,
.dashboard-range__custom {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dashboard-range__custom input[type="date"] {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
}

.dashboard-range .pill.is-active {
  border-color: #9cc7ff;
  background: #eef6ff;
}

.subnav__tab {
  border: 1px solid #dfe6f0;
  background: #f8fafc;
  color: #0f172a;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.subnav__tab.active {
  background: #0f6fbf;
  color: #fff;
  border-color: #0f6fbf;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot--muted {
  background: #cdd8e5;
}

.dot--live {
  background: #d22d2d;
}
@media (max-width: 720px) {
  .marketing__filters {
    justify-content: flex-start;
  }
  .marketing-insight {
    grid-column: span 1;
  }
}
