:root {
  --ink: #172b2b;
  --muted: #536768;
  --line: #dce6e3;
  --canvas: #f4f7f6;
  --brand: #087467;
  --brand-dark: #05584f;
  --shadow: 0 2px 6px rgba(17, 52, 48, .04);
  font-family: "Segoe UI", system-ui, sans-serif;
}

body { font-size: 15px; }
.sidebar { background: #112e2d; border-right: 0; overflow-y: auto; }
.sidebar .brand { color: #fff; }
.sidebar .brand b { color: #a5dad1; }
.brand-mark { background: #96e0cf; color: #113a34; }
.workspace-switch { background: #1c3c3a; color: #fff; }
.workspace-switch .eyebrow, .workspace-module, .sidebar .profile span { color: #b8d2ce; }
.main-nav a { color: #d3e5e2; min-height: 44px; }
.main-nav a:hover { background: #254542; color: #fff; }
.main-nav a[aria-current="page"] { color: #102f2b; background: #b6e5d9; }
.sidebar-bottom { color: #fff; border-color: #355451; }
.sidebar .icon-button { color: #bad7d1; }
.topbar { height: 58px; }
.content-wrap { padding-top: 32px; }
.page-heading { align-items: center; }
.page-heading h1, .panel h2, .login-card h1 { font-family: inherit; }
.page-heading h1 { font-size: clamp(27px, 3vw, 37px); letter-spacing: -.035em; }
.page-heading .muted { max-width: 58ch; }
.heading-actions { flex-wrap: wrap; }
.sales-heading {
  background: linear-gradient(120deg, #e4f2ee, #f8fbfa);
  border: 1px solid #d3e5df;
  border-radius: 16px;
  padding: clamp(18px, 3vw, 32px);
}
.sales-date { color: #3b635d; font-size: 13px; font-weight: 650; margin: 0; }
.stat-grid, .dashboard-grid, .detail-grid { gap: 16px; }
.stat-grid { margin-bottom: 16px; }
.panel, .stat-card { border-radius: 14px; }
.stat-card { padding: 18px; min-height: 132px; }
.stat-label { color: var(--ink); font-size: 13px; }
.stat-note, .stat-lines small { color: var(--muted); font-size: 12px; }
.stat-value, .stat-lines, .detail-values strong { font-family: inherit; font-variant-numeric: tabular-nums; }
.stat-link:hover { border-color: #85b9af; box-shadow: 0 3px 12px #1b564b13; }
.stat-link .stat-note { color: var(--brand-dark); font-weight: 650; }
.panel { padding: clamp(15px, 2vw, 24px); }
.panel h2 { font-size: 18px; }
.panel-heading .muted, .contact-row small, .mini-main small, .task-row span:not(.task-dot),
.pipeline-main span, .detail-values span, .detail-list, .fine-print,
.empty-state p, .empty-state strong { font-size: 13px; }
.contact-row strong, .mini-main strong, .task-row strong, .pipeline-main strong { font-size: 14px; }
.contact-row > div { min-width: 0; overflow-wrap: anywhere; }
.text-link, .back-link { font-size: 13px; }
.badge { font-size: 11px; }
.button { min-height: 42px; font-size: 13px; }
.button.small { min-height: 34px; font-size: 12px; }
.field-input, .login-card .form-stack input { min-height: 44px; font-size: 15px; }
.form-panel { max-width: 900px; }
.editor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 22px; }
.field-wide, .editor-grid > .alert, .editor-grid > .form-actions { grid-column: 1 / -1; }
.form-actions { border-top: 1px solid var(--line); padding-top: 16px; }
.form-field label, .login-card .form-stack label, .field-help, .field-error { font-size: 13px; }
.field-error { font-weight: 600; }
.form-field .errorlist { color: var(--red); font-size: 13px; margin: 0; padding-left: 18px; }
.field-input[aria-invalid="true"] { border-color: var(--red); }
th { font-size: 11px; color: var(--muted); background: #f4f8f6; }
td, td strong { font-size: 13px; }
td small { font-size: 12px; }
tbody tr:hover { background: #f8fbfa; }
.login-card { width: min(100%, 430px); border-radius: 20px; }
.login-card h1 { font-size: 32px; }
.login-card > .muted { font-size: 14px; }
.login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; font-weight: 700; }
.alert { font-size: 14px; }
:focus-visible, .field-input:focus-visible { outline: 2px solid #168579; outline-offset: 3px; }
.sidebar :focus-visible { outline-color: #b6e5d9; }
.skip-link { position: fixed; z-index: 4; left: 10px; top: 10px; background: #fff; padding: 10px 14px; transform: translateY(-150%); }
.skip-link:focus { transform: none; }

@media (max-width: 760px) {
  .sidebar { position: static; width: auto; padding: 12px 14px; overflow: visible; }
  .brand { padding: 0 0 10px; }
  .brand > span:last-child { font-size: 18px; }
  .workspace-switch { display: none; }
  .main-nav { display: flex; flex-wrap: wrap; gap: 4px 6px; }
  .main-nav a, .main-nav a:not([aria-current="page"]), .main-nav a[aria-current="page"] { padding: 0 8px; font-size: 12px; height: auto; min-height: 38px; gap: 4px; }
  .main-nav a span, .main-nav a[aria-current="page"] span { width: auto; font-size: 13px; }
  .sidebar-bottom { position: absolute; top: 8px; right: 12px; padding: 0; border: 0; }
  .sidebar-bottom .avatar { display: none; }
  .sidebar-bottom .icon-button { display: block; min-height: 40px; }
  .main-content { margin-left: 0; }
  .topbar { position: static; height: 44px; }
  .content-wrap { padding: 18px 14px; }
  .page-heading { align-items: flex-start; }
  .heading-actions { align-self: auto; }
  .editor-grid { grid-template-columns: minmax(0, 1fr); }
  .stat-grid { gap: 10px; }
  .stat-card { padding: 13px; min-height: 112px; }
  .panel-heading { flex-wrap: wrap; }
}
