/* Cron — local billing workspace. No external assets or dependencies. */
:root {
  --canvas: #f6f7f9;
  --surface: #fff;
  --ink: #17232d;
  --muted: #77818c;
  --line: #e8ebee;
  --line-strong: #dce1e6;
  --teal: #147d64;
  --teal-dark: #0e6651;
  --teal-soft: #eaf5f0;
  --coral: #ee755e;
  --amber: #a26a16;
  --amber-soft: #fff5df;
  --blue: #466f9d;
  --blue-soft: #edf4fb;
  --purple: #7b60a4;
  --purple-soft: #f3eff9;
  --red: #b54e4a;
  --radius: 11px;
  --shadow: 0 3px 14px rgb(23 35 45 / 3%);
  --sidebar-width: 232px;
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
button, a, input, select, textarea, [tabindex] { outline-offset: 4px; }
:focus-visible { outline: 2px solid var(--teal); }
svg { width: 18px; height: 18px; flex-shrink: 0; vertical-align: middle; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { line-height: 1.3; }
[hidden] { display: none !important; }

@media screen and (max-width: 760px) {
  .sidebar { visibility: hidden; }
  .app-shell.sidebar-open .sidebar { visibility: visible; }
  .invoice-layout .invoice-list { display: flex; flex-direction: row; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 9px; }
  .invoice-list .invoice-card { flex: 0 0 242px; scroll-snap-align: start; }
}
::selection { background: #cae8dc; }

/* Navigation */
.app-shell { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 27px 16px 18px; background: var(--surface); border-right: 1px solid var(--line); z-index: 30; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 13px 29px; color: var(--ink); font-size: 24px; font-weight: 770; letter-spacing: -1.3px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand > span:last-child { line-height: 1; }
.brand small { display: block; margin-top: 6px; color: var(--muted); font-size: 10px; font-weight: 500; letter-spacing: .2px; }
.brand-mark { display: inline-flex; width: 33px; height: 33px; align-items: center; justify-content: center; flex-shrink: 0; border-radius: 10px; background: var(--coral); color: #fff; font-size: 22px; font-weight: 800; letter-spacing: -1.5px; }
.brand-mark svg { width: 23px; height: 23px; }
.nav-group { margin-bottom: 24px; }
.nav-label { padding: 0 13px; margin-bottom: 10px; color: #98a0a8; font-size: 10px; font-weight: 700; letter-spacing: 1.25px; text-transform: uppercase; }
.nav-item { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 43px; padding: 10px 13px; margin: 3px 0; border: 0; border-radius: 7px; background: transparent; color: #65707a; font-weight: 540; font-size: 13px; text-align: left; text-decoration: none; transition: background .15s, color .15s; }
.nav-item:hover { background: #f5f7f8; color: var(--ink); text-decoration: none; }
.nav-item.active { background: var(--teal-soft); color: var(--teal); font-weight: 650; }
.nav-icon { display: inline-flex; width: 19px; align-items: center; justify-content: center; color: #8b959c; }
.nav-item.active .nav-icon { color: var(--teal); }
.nav-count { margin-left: auto; min-width: 21px; padding: 1px 6px; border-radius: 5px; background: #eef0f3; color: #7a848e; font-size: 10px; font-weight: 650; text-align: center; }
.nav-item.active .nav-count { background: #d7ecdf; color: var(--teal); }
.sidebar-footer { margin-top: auto; padding: 17px 11px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.sidebar-footer p { margin: 6px 0; }
.sidebar-footer strong { display: block; color: var(--ink); font-size: 12px; font-weight: 600; }
.sidebar-footer .avatar { margin-right: 9px; }
.workspace { min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 73px; padding: 0 36px; border-bottom: 1px solid var(--line); background: var(--surface); }
.breadcrumb { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; }
.breadcrumb strong, .breadcrumb > :last-child { color: #4d5964; font-weight: 550; }
.breadcrumb svg { width: 14px; height: 14px; color: #a4acb3; }
.topbar-actions { display: flex; align-items: center; gap: 15px; margin-left: auto; }
.role-switch { display: inline-flex; padding: 3px; gap: 3px; border: 1px solid var(--line); border-radius: 7px; background: #f7f8fa; }
.role-switch button { padding: 6px 11px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 550; white-space: nowrap; }
.role-switch button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgb(23 35 45 / 9%); }
.mobile-nav-toggle, .icon-button.mobile-nav-toggle { display: none; }

/* Page structure */
.main { max-width: 1536px; margin: 0 auto; padding: 33px 36px 45px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 27px; }
.eyebrow { margin-bottom: 7px; color: var(--teal); font-size: 10px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; }
.page-title { margin: 0 0 7px; font-size: 28px; font-weight: 680; letter-spacing: -.9px; }
.page-subtitle { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.page-actions { display: flex; flex-shrink: 0; align-items: center; gap: 9px; flex-wrap: wrap; }
.button, .icon-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; padding: 8px 13px; border: 1px solid var(--line-strong); border-radius: 7px; background: #fff; color: #47525b; font-size: 12px; line-height: 1.4; font-weight: 600; white-space: nowrap; text-decoration: none; transition: background .15s, border-color .15s, box-shadow .15s; }
.button:hover, .icon-button:hover { background: #f4f6f7; border-color: #cbd3d9; text-decoration: none; }
.button.primary { border-color: var(--teal); background: var(--teal); color: #fff; box-shadow: 0 1px 2px rgb(20 125 100 / 12%); }
.button.primary:hover { border-color: var(--teal-dark); background: var(--teal-dark); }
.button.secondary { background: #fff; }
.button.ghost { border-color: transparent; background: transparent; color: var(--muted); box-shadow: none; }
.button.ghost:hover { background: #edf0f2; color: var(--ink); }
.button.danger { border-color: #efd3d0; background: #fff; color: var(--red); }
.button.danger:hover { background: #fcf0ef; }
.button.small { min-height: 29px; padding: 5px 9px; font-size: 11px; }
.button svg, .icon-button svg { width: 15px; height: 15px; }
.icon-button { width: 32px; min-height: 32px; padding: 7px; flex-shrink: 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { position: relative; min-width: 0; padding: 20px 21px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.stat-label { margin-bottom: 12px; color: #7b858f; font-size: 11px; font-weight: 550; }
.stat-value { margin-bottom: 8px; color: var(--ink); font-size: 27px; font-weight: 650; letter-spacing: -.8px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: 16px; font-weight: 500; color: #919aa3; }
.stat-meta { color: #8b949d; font-size: 10px; line-height: 1.5; }
.stat-meta strong { color: var(--teal); font-weight: 600; }
.stat-icon { position: absolute; top: 17px; right: 17px; display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 8px; background: #f2f7f4; color: #5e9d88; }
.stat-icon svg { width: 15px; height: 15px; }
.panel { min-width: 0; margin-bottom: 23px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.panel-title { margin: 0; font-size: 14px; font-weight: 650; letter-spacing: -.2px; }
.panel-subtitle { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.panel-body { padding: 21px 22px; }
.panel-body > :last-child { margin-bottom: 0; }
.two-column { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, 1fr); gap: 22px; align-items: start; }
.three-column { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }
.split-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
.split-heading h2, .split-heading h3 { margin: 0; font-size: 15px; font-weight: 650; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 20px; border-bottom: 1px solid var(--line); }
.toolbar > div { min-width: 0; }
.tabs { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.tab { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border: 0; border-radius: 6px; background: transparent; color: #87909a; font-size: 11px; font-weight: 560; white-space: nowrap; }
.tab:hover { background: #f5f7f8; color: var(--ink); }
.tab.active { background: var(--teal-soft); color: var(--teal); font-weight: 650; }
.tab .nav-count { min-width: 17px; margin: 0; padding: 0 4px; font-size: 9px; }
.search-field { position: relative; display: flex; align-items: center; gap: 8px; width: 220px; max-width: 100%; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; }
.search-field svg { width: 14px; height: 14px; color: #9ba4ad; }
.search-field input { width: 100%; min-width: 0; height: 33px; padding: 0; border: 0; background: transparent; color: var(--ink); font-size: 11px; outline: none; }
.search-field:focus-within { border-color: #74b39e; box-shadow: 0 0 0 3px #edf7f2; }

/* Dense, readable business data */
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
.data-table { font-size: 12px; }
.data-table th { padding: 11px 20px; background: #fafbfc; border-bottom: 1px solid var(--line); color: #8a949d; font-size: 9px; font-weight: 650; letter-spacing: .65px; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 15px 20px; border-bottom: 1px solid #edf0f2; color: #596570; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background .12s; }
.data-table tbody tr:hover { background: #fafcfb; }
.data-table tbody tr.selected { background: #f2f9f5; }
.data-table th:first-child, .data-table td:first-child { padding-left: 22px; }
.data-table th:last-child, .data-table td:last-child { padding-right: 22px; }
.data-table td.num { color: #37434d; font-weight: 550; }
.data-table input[type="checkbox"] { width: 14px; height: 14px; margin: 0; accent-color: var(--teal); cursor: pointer; }
.cell-title { color: #35424c; font-size: 12px; font-weight: 600; line-height: 1.45; }
.cell-subtitle { margin-top: 3px; color: #97a0a8; font-size: 10px; line-height: 1.45; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-actions { display: flex; justify-content: flex-end; align-items: center; gap: 5px; }
.row-actions .icon-button { width: 27px; min-height: 27px; padding: 5px; border-color: transparent; background: transparent; color: #9aa3aa; }
.row-actions .icon-button:hover { background: #edf3f0; color: var(--teal); }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px; border-radius: 5px; background: #f0f2f4; color: #7a838c; font-size: 9px; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.badge.success { background: #eaf5ee; color: #468566; }
.badge.warning { background: var(--amber-soft); color: var(--amber); }
.badge.neutral { background: #eff2f5; color: #7e8b96; }
.badge.info { background: var(--blue-soft); color: var(--blue); }
.badge.purple { background: var(--purple-soft); color: var(--purple); }
.badge.danger { background: #fbedec; color: var(--red); }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 5px; background: #fafbfc; color: #818b94; font-size: 10px; white-space: nowrap; }
.muted { color: var(--muted) !important; }
.text-success { color: var(--teal) !important; }
.text-warning { color: var(--amber) !important; }
.avatar { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; background: #e9f0ed; color: #68917e; font-size: 10px; font-weight: 650; }
.avatar-stack { display: flex; padding-left: 5px; }
.avatar-stack .avatar { margin-left: -5px; border: 2px solid #fff; }

/* Billing review */
.invoice-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 22px; align-items: start; }
.invoice-list { display: flex; flex-direction: column; gap: 9px; }
.invoice-card { display: block; width: 100%; padding: 17px 18px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); text-align: left; cursor: pointer; transition: border-color .15s, background .15s; }
.invoice-card:hover { border-color: #b8d7ca; }
.invoice-card.selected { border-color: #7bb59e; background: #f1f8f4; box-shadow: 0 0 0 1px #c7e2d4; }
.invoice-card .cell-title { font-size: 13px; }
.invoice-card .split-heading { margin-bottom: 8px; gap: 8px; }
.invoice-card .invoice-total { display: flex; justify-content: space-between; margin-top: 14px; padding-top: 11px; border-top: 1px solid var(--line); font-size: 12px; font-weight: 650; }
.invoice-detail { min-width: 0; }
.invoice-detail > .panel-header { padding: 0 0 15px; border: 0; }
.invoice-paper { padding: 30px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.invoice-paper h2 { margin-bottom: 6px; font-size: 21px; font-weight: 650; letter-spacing: -.5px; }
.invoice-paper h3 { margin: 25px 0 12px; color: #85919b; font-size: 10px; font-weight: 650; letter-spacing: .8px; text-transform: uppercase; }
.invoice-paper p { font-size: 12px; }
.invoice-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 26px; margin: 22px 0; padding: 17px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: #7d8791; font-size: 11px; }
.invoice-meta strong { display: block; margin-top: 3px; color: #46535e; font-weight: 550; }
.invoice-row { display: grid; grid-template-columns: minmax(0, 1fr) 60px 82px 90px; gap: 12px; align-items: start; padding: 13px 0; border-bottom: 1px solid var(--line); color: #5e6972; font-size: 11px; }
.invoice-row > :not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.invoice-paper > .invoice-total { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line-strong); font-size: 16px; font-weight: 650; }
.invoice-paper .data-table th { padding: 10px 9px; font-size: 9px; }
.invoice-paper .data-table td { padding: 13px 9px; font-size: 11px; }
.invoice-paper .data-table td:first-child, .invoice-paper .data-table th:first-child { padding-left: 0; }
.invoice-paper .data-table td:last-child, .invoice-paper .data-table th:last-child { padding-right: 0; }
.notice { display: flex; align-items: flex-start; gap: 9px; padding: 12px 15px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 7px; background: #f9fafb; color: #78838d; font-size: 11px; line-height: 1.65; }
.notice svg { width: 15px; height: 15px; margin-top: 2px; }
.notice p { margin: 0; }
.notice strong { font-weight: 650; }
.notice.info { border-color: #dce7f2; background: #f2f7fc; color: #65829c; }
.notice.warning { border-color: #f2e5c5; background: #fffaf0; color: #9e813f; }
.notice.success { border-color: #d6e9de; background: #f0f8f3; color: #5a8d73; }

/* Forms and dialogs */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label, label.field-label { color: #5b6670; font-size: 11px; font-weight: 600; }
input:not([type="checkbox"]):not([type="radio"]), select, textarea { min-width: 0; min-height: 37px; padding: 8px 11px; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; color: #46525d; font-size: 12px; transition: border-color .15s, box-shadow .15s; }
input:not([type="checkbox"]):not([type="radio"]):focus, select:focus, textarea:focus { outline: 0; border-color: #74b39e; box-shadow: 0 0 0 3px #edf7f2; }
input::placeholder, textarea::placeholder { color: #a5adb4; }
input[readonly] { background: #f7f8fa; color: #8b959e; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--teal); }
select { padding-right: 25px; cursor: pointer; }
textarea { min-height: 95px; resize: vertical; line-height: 1.65; }
.search-field input:not([type="checkbox"]):not([type="radio"]) { min-height: 33px; padding: 0; border: 0; border-radius: 0; background: transparent; font-size: 11px; box-shadow: none; }
.field-hint { color: #96a0a9; font-size: 10px; line-height: 1.5; }
.modal-backdrop { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 30px; background: rgb(22 35 45 / 27%); backdrop-filter: blur(2px); z-index: 100; }
.modal { display: flex; flex-direction: column; width: min(600px, 100%); max-height: calc(100dvh - 60px); border: 1px solid #e0e6e8; border-radius: 13px; background: #fff; box-shadow: 0 18px 70px rgb(23 35 45 / 18%); overflow: hidden; animation: dialog-in .16s ease-out; }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 23px 26px 20px; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 0 0 4px; font-size: 19px; font-weight: 650; letter-spacing: -.4px; }
.modal-header p { margin: 0; color: var(--muted); font-size: 11px; }
.modal-header .icon-button { border-color: transparent; margin: -3px -7px 0 0; }
.modal-body { padding: 23px 26px; overflow-y: auto; }
.modal-footer { display: flex; align-items: center; justify-content: flex-end; gap: 9px; padding: 17px 26px; border-top: 1px solid var(--line); background: #fcfdfd; }
.modal.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(570px, 100%); max-height: 100dvh; border-radius: 0; border-width: 0 0 0 1px; }
.drawer .modal-body { flex: 1; }
.empty-state { padding: 45px 25px; color: #98a1a9; text-align: center; font-size: 12px; }
.empty-state svg { width: 31px; height: 31px; margin-bottom: 13px; color: #a6b4ad; }
.empty-state h3 { margin-bottom: 8px; color: #65746e; font-size: 15px; font-weight: 600; }
.empty-state p { max-width: 330px; margin: 0 auto 17px; font-size: 12px; line-height: 1.7; }
.toast { position: fixed; right: 28px; bottom: 25px; display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 36px); padding: 13px 19px; border: 1px solid #dce8e1; border-radius: 9px; background: #fff; color: #3d6958; box-shadow: 0 8px 35px rgb(23 35 45 / 13%); font-size: 12px; z-index: 200; animation: dialog-in .18s ease-out; }
.toast svg { color: var(--teal); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* Planning and activity */
.progress { height: 5px; overflow: hidden; border-radius: 6px; background: #edf1f1; }
.progress-fill { height: 100%; border-radius: inherit; background: #6dad94; transition: width .2s; }
.bar-chart { display: flex; align-items: stretch; gap: 20px; height: 200px; padding: 17px 3px 0; }
.chart-column { position: relative; display: flex; flex: 1; flex-direction: column; justify-content: flex-end; align-items: center; gap: 9px; min-width: 0; }
.chart-bar { width: min(100%, 43px); min-height: 3px; border-radius: 4px 4px 0 0; background: #bed9cb; transition: height .2s; }
.chart-column.active .chart-bar, .chart-bar.active { background: var(--teal); }
.chart-label { color: #8d98a2; font-size: 10px; white-space: nowrap; }
.chart-value { color: #6d7d74; font-size: 10px; font-weight: 550; white-space: nowrap; font-variant-numeric: tabular-nums; }
.legend { display: flex; align-items: center; gap: 15px; flex-wrap: wrap; color: #8d969e; font-size: 10px; }
.legend > span { display: inline-flex; align-items: center; gap: 5px; }
.dot { display: inline-block; flex-shrink: 0; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }
.dot.warning { background: #d2ac5b; }
.dot.info { background: #7193b8; }
.dot.neutral { background: #b7c2ca; }
.dot.purple { background: #ac98c6; }
.timeline { margin: 0; padding: 0; list-style: none; }
.timeline-item { position: relative; padding: 0 0 21px 23px; margin-left: 4px; border-left: 1px solid var(--line); color: #7f8a93; font-size: 11px; }
.timeline-item::before { content: ""; position: absolute; top: 4px; left: -4px; width: 7px; height: 7px; border: 2px solid #fff; border-radius: 50%; background: #9fc3b1; box-sizing: content-box; }
.timeline-item:last-child { padding-bottom: 0; border-left-color: transparent; }
.timeline-item strong { display: block; margin-bottom: 4px; color: #4b5a64; font-size: 11px; font-weight: 550; }
.timeline-item time { display: block; margin-top: 6px; color: #a1a9b0; font-size: 10px; }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 19px; }
.project-card { display: flex; flex-direction: column; gap: 16px; padding: 21px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.project-card .split-heading { margin: 0; }
.project-card h3 { margin: 0 0 4px; font-size: 14px; font-weight: 650; }
.project-card p { margin: 0; color: var(--muted); font-size: 11px; }
.project-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 13px; border-top: 1px solid var(--line); color: #9099a1; font-size: 10px; }
.metric-pair { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.metric-pair > div { min-width: 0; }
.metric-pair strong { display: block; color: #46535d; font-size: 17px; font-weight: 650; letter-spacing: -.35px; font-variant-numeric: tabular-nums; }
.metric-pair span, .metric-pair small { color: #94a0a8; font-size: 10px; }

/* App-specific composition */
.icon { display: inline-block; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.brand-caption { display: block; margin-top: 6px; color: #9ba4ac; font-size: 8px; font-weight: 600; letter-spacing: 2px; line-height: 1.2; }
.brand-mark { position: relative; padding: 0 2px 3px 0; font-size: 30px; font-weight: 700; }
.brand-mark > span { position: absolute; right: 6px; top: 9px; width: 5px; height: 5px; background: #fff; border-radius: 1px; }
.workspace-label { display: flex; align-items: center; gap: 8px; margin: 0 5px 28px; padding: 11px 8px; border: 1px solid var(--line); border-radius: 7px; color: #5b6770; font-size: 10px; font-weight: 550; }
.workspace-label small, .profile small { display: block; margin-top: 3px; color: #9ca5ad; font-size: 9px; font-weight: 400; }
.workspace-label > .icon { width: 12px; height: 12px; margin-left: auto; color: #a0a9b0; }
.workspace-avatar { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 27px; height: 28px; border: 1px solid #e5ebe8; border-radius: 6px; background: #f7faf8; color: #6c947e; font-size: 12px; font-weight: 600; }
.nav-item { font-size: 12px; white-space: nowrap; }
.profile { display: flex; align-items: center; gap: 1px; padding-top: 15px; margin-top: 14px; border-top: 1px solid var(--line); color: #4e5b65; font-size: 11px; font-weight: 600; }
.profile .avatar { width: 29px; height: 29px; }
.demo-note { position: relative; padding-left: 15px; margin-bottom: 15px; font-size: 10px; font-weight: 550; }
.demo-note small { display: block; margin-top: 4px; color: #a5adb4; font-size: 9px; font-weight: 400; }
.demo-dot { position: absolute; left: 0; top: 5px; width: 5px; height: 5px; border-radius: 50%; background: #82ad99; }
.sidebar-footer .nav-item { min-height: 34px; padding: 5px 0; font-size: 10px; }
.sidebar-footer .nav-item > .icon { width: 15px; height: 15px; }
.month-control { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 7px; background: #fff; }
.month-control > .icon { width: 14px; height: 14px; color: #8d989f; }
.month-control input[type="month"] { width: 137px; min-height: 34px; padding: 4px 0; border: 0; background: transparent; color: #66727c; font-size: 11px; box-shadow: none; }
.month-control:focus-within { border-color: #74b39e; box-shadow: 0 0 0 3px #edf7f2; }
.billing-summary { display: flex; align-items: center; gap: 27px; margin: -3px 0 24px; color: #8b969f; font-size: 11px; }
.billing-summary > span { display: inline-flex; align-items: center; gap: 5px; }
.billing-summary strong { color: #46545e; font-weight: 650; }
.billing-summary .icon { width: 14px; height: 14px; }
.main > .toolbar { margin: 0 0 21px; padding: 0 0 15px; }
.toolbar > .muted, .panel-header > .muted { font-size: 11px; }
.tab > span { padding: 0 4px; border-radius: 4px; background: #edf0f2; color: #a0a9b1; font-size: 9px; }
.tab.active > span { background: #dceee3; color: #589780; }
.badge { border-radius: 20px; padding: 3px 8px; }
.invoice-card h3 { margin: 11px 0 3px; color: #40504b; font-size: 13px; font-weight: 650; letter-spacing: -.15px; }
.invoice-card > p { margin-bottom: 15px; color: #95a099; font-size: 10px; }
.invoice-card-initial { display: inline-flex; align-items: center; justify-content: center; width: 27px; height: 27px; border: 1px solid #e9edea; border-radius: 6px; background: #f6f9f7; color: #7c998a; font-size: 11px; font-weight: 650; }
.invoice-card.selected .invoice-card-initial { border-color: #d8e9de; background: #e5f1e9; color: #57896f; }
.invoice-card-footer { display: flex; justify-content: space-between; gap: 10px; padding-top: 11px; border-top: 1px solid #e9eeea; color: #9aa59e; font-size: 10px; }
.invoice-card-footer strong { color: #51665a; font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; }
.invoice-detail .panel { margin-bottom: 12px; }
.invoice-detail .invoice-paper { padding: 28px; border: 0; border-radius: 0; box-shadow: none; }
.invoice-detail .panel-header .eyebrow { display: block; margin-bottom: 6px; font-size: 8px; }
.invoice-brand { display: flex; align-items: center; justify-content: space-between; color: #203b31; font-size: 23px; font-weight: 750; letter-spacing: -1px; }
.invoice-brand > span { color: #96a19b; font-size: 11px; font-weight: 400; letter-spacing: 0; text-transform: capitalize; }
.invoice-meta > div > span { color: #9ca59f; font-size: 8px; font-weight: 650; letter-spacing: .8px; }
.invoice-meta strong { margin-top: 5px; color: #44544b; font-size: 12px; font-weight: 600; }
.invoice-meta small { display: block; margin-top: 4px; color: #97a19b; font-size: 10px; }
.invoice-lines .cell-title { font-size: 11px; font-weight: 500; line-height: 1.6; }
.invoice-lines .cell-subtitle { margin-top: 4px; font-size: 9px; }
.invoice-lines td:not(:first-child) { vertical-align: top; }
.invoice-lines .credit-row td, .invoice-lines .credit-row .cell-title { color: #62977d; }
.invoice-work-details { margin: 20px 0; border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; }
.invoice-work-details > summary { padding: 12px 15px; background: #fafcfb; color: #61776a; font-size: 11px; font-weight: 600; cursor: pointer; }
.invoice-work-details > summary::marker { color: #91ad9c; font-size: 10px; }
.invoice-work-details > summary > span { float: right; margin-left: 12px; color: #a0aca4; font-size: 10px; font-weight: 400; }
.invoice-work-details[open] > summary { border-bottom: 1px solid var(--line); }
.invoice-work-details .data-table th:first-child, .invoice-work-details .data-table td:first-child { padding-left: 15px; }
.invoice-work-details .data-table th:last-child, .invoice-work-details .data-table td:last-child { padding-right: 15px; }
.invoice-totals { width: 270px; max-width: 100%; margin: 22px 0 0 auto; color: #85938a; font-size: 11px; }
.invoice-totals > div { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding: 7px 0; }
.invoice-totals strong { color: #586c5f; font-weight: 550; font-variant-numeric: tabular-nums; }
.invoice-totals .invoice-grand-total { margin-top: 9px; padding-top: 14px; border-top: 1px solid var(--line); color: #435b4d; font-size: 14px; font-weight: 600; }
.invoice-grand-total strong { font-size: 21px; font-weight: 650; letter-spacing: -.5px; }
.invoice-paper .invoice-footnote { padding-top: 20px; margin: 24px 0 0; border-top: 1px solid var(--line); color: #a1aaa4; font-size: 9px; }
.invoice-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 8px; padding: 18px 22px; border-top: 1px solid var(--line); background: #fbfcfc; font-size: 11px; }
.invoice-actions > .text-success { margin-right: auto; }
.invoice-actions > .text-success .icon { width: 14px; height: 14px; margin-right: 3px; }
.invoice-edit-links { display: flex; align-items: center; justify-content: center; gap: 2px; flex-wrap: wrap; font-size: 10px; }
.snapshot-note { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 4px 10px; font-size: 10px; }
.snapshot-note .icon { width: 13px; height: 13px; }
.customer-avatar { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 9px; background: #edf4ef; color: #729882; font-size: 12px; font-weight: 650; }
.project-card { gap: 0; }
.project-card > .split-heading { margin-bottom: 16px; }
.project-card > h2 { margin: 0 0 5px; font-size: 16px; font-weight: 650; letter-spacing: -.35px; }
.project-card > p.cell-subtitle { font-size: 10px; }
.customer-projects { flex: 1; margin: 18px 0; }
.project-link { display: flex; align-items: center; gap: 9px; width: 100%; padding: 11px 0; border: 0; border-top: 1px solid #f0f2f3; background: transparent; color: #71877a; text-align: left; }
.project-link > span:first-child { display: inline-flex; align-items: center; justify-content: center; width: 25px; height: 25px; border-radius: 5px; background: #f6f8f7; }
.project-link .icon { width: 13px; height: 13px; }
.project-link > .icon:last-child { width: 11px; height: 11px; margin-left: auto; color: #a9b4ad; }
.project-link strong { display: block; color: #647269; font-size: 11px; font-weight: 550; }
.project-link small { display: block; margin-top: 2px; color: #a0aaa3; font-size: 9px; }
.project-link:hover strong { color: var(--teal); }
.project-card-footer { display: flex; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); color: #9aa49d; font-size: 10px; }
.project-card-footer strong { color: #627b6b; font-size: 12px; font-weight: 650; }
.work-description { max-width: 590px; margin-top: 4px; color: #82908a; font-size: 11px; line-height: 1.6; }
.work-table td { vertical-align: top; }
.work-table td:nth-child(2) { min-width: 250px; }
.reference { color: #91a098; font-size: 10px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.capitalize { text-transform: capitalize; }
.hours-toolbar { flex-wrap: wrap; }
.toolbar-filters { display: flex; align-items: center; gap: 9px; }
.toolbar-filters select { max-width: 220px; min-height: 36px; font-size: 11px; }
.stats-grid.three-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.overview-columns { grid-template-columns: minmax(0, 1.6fr) minmax(310px, 1fr); }
.checklist { margin-top: 23px; }
.checklist > div { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid #f0f3f1; }
.checklist > div:first-child { padding-top: 0; }
.checklist > div:last-child { padding-bottom: 0; border-bottom: 0; }
.checklist > div > .icon { flex-shrink: 0; width: 15px; height: 15px; color: #86a692; }
.checklist > div > span:not(.badge) { flex: 1; color: #63726a; font-size: 11px; }
.checklist small { display: block; margin-top: 3px; color: #a0aaa4; font-size: 9px; }
.checklist .badge { padding: 2px 6px; font-size: 8px; }
.checklist .button { padding-right: 0; font-size: 10px; }
.accent-panel { background: #fbfcfb; }
.accent-panel .panel-subtitle { max-width: 310px; font-size: 11px; line-height: 1.7; }
.minimum-flow { margin: 20px 0; }
.minimum-flow > div { padding: 11px 0; }
.minimum-flow > div + div { border-top: 1px solid var(--line); }
.minimum-flow > div > span { display: block; margin-bottom: 6px; color: #99a69e; font-size: 8px; font-weight: 600; letter-spacing: .7px; }
.minimum-flow strong { display: block; color: #4e6b59; font-size: 21px; font-weight: 600; letter-spacing: -.4px; }
.minimum-flow strong small { margin-left: 6px; color: #9aa79e; font-size: 10px; font-weight: 400; letter-spacing: 0; }
.minimum-flow em { display: block; margin-top: 4px; color: #8c9b92; font-size: 10px; font-style: normal; }
.bar-chart { height: 226px; padding-top: 9px; gap: 16px; }
.chart-column { align-self: stretch; padding: 0; border: 0; background: transparent; font: inherit; }
.chart-bar-track { display: flex; align-items: flex-end; justify-content: center; width: 100%; height: 143px; flex-shrink: 0; }
.chart-bar { display: block; width: min(72%, 39px); min-height: 3px; background: #c4dbcd; }
.chart-column.current .chart-bar { background: #4c9976; }
.chart-column:hover .chart-bar { background: #7eb699; }
.chart-column.current .chart-label { color: #5d9575; }
.chart-label { line-height: 1.4; text-transform: capitalize; }
.chart-label small { display: block; margin-top: 1px; color: #b0b8b3; font-size: 8px; }
.chart-value { color: #86998d; font-size: 9px; font-weight: 500; }
.forecast-chart { overflow-x: auto; }
.forecast-chart .bar-chart { min-width: 650px; height: 270px; }
.forecast-chart .chart-bar-track { height: 187px; }
.modal-open { overflow: hidden; }
.modal-wide { width: min(760px, 100%); }
.modal > form { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.modal > form > .modal-body { flex: 1; min-height: 0; }
.modal-header, .modal-footer { flex-shrink: 0; }
.modal-body > p { color: #7b8a80; font-size: 12px; line-height: 1.75; }
.modal-body .field > span { color: #637267; font-size: 11px; font-weight: 550; }
.copy-text { display: block; width: 100%; min-height: 310px; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 11px; line-height: 1.7; }
.project-detail-header { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.project-detail-header strong { color: #4f6657; font-size: 13px; font-weight: 600; }
.project-detail-header p { margin: 4px 0 0; font-size: 11px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 25px; padding: 20px; margin-bottom: 22px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfb; }
.detail-grid small { display: block; margin-bottom: 5px; color: #9aa69e; font-size: 10px; }
.detail-grid strong { display: block; color: #52695b; font-size: 12px; font-weight: 550; }
.detail-services > div { display: flex; align-items: center; gap: 14px; padding: 15px 0; border-top: 1px solid var(--line); font-size: 12px; }
.detail-services > div > span { flex: 1; }
.detail-services strong { color: #5c7464; font-size: 11px; font-weight: 550; }
.detail-services small { display: block; margin-top: 4px; color: #9eaaa2; font-size: 10px; }
.feature-list { margin: 0; padding-left: 17px; color: #849188; font-size: 12px; line-height: 1.8; }
.feature-list li + li { margin-top: 9px; }
.scenario-presets { display: flex; gap: 8px; margin: 18px 0; }
.scenario-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 20px 0; }
.scenario-results > div { padding: 19px; border: 1px solid #e0ebe4; border-radius: 8px; background: #f7faf7; }
.scenario-results span { color: #859c8d; font-size: 10px; }
.scenario-results strong { display: block; margin: 8px 0 5px; color: #4e805f; font-size: 25px; font-weight: 650; letter-spacing: -.5px; }
.scenario-results small { display: block; color: #9caca1; font-size: 9px; line-height: 1.6; }

/* Responsive */
@media (min-width: 1680px) {
  .main { padding-top: 39px; }
  .stat-card { padding: 24px; }
  .stats-grid { gap: 20px; }
}
@media (max-width: 1200px) {
  :root { --sidebar-width: 222px; }
  .topbar { padding: 0 25px; }
  .main { padding: 28px 25px 35px; }
  .stats-grid { gap: 12px; }
  .stat-card { padding: 17px; }
  .stat-value { font-size: 25px; }
  .stat-icon { top: 14px; right: 14px; width: 25px; height: 25px; }
  .stat-label { max-width: calc(100% - 20px); }
  .two-column { grid-template-columns: minmax(0, 1.5fr) minmax(250px, 1fr); gap: 18px; }
  .invoice-layout { grid-template-columns: 250px minmax(0, 1fr); gap: 16px; }
  .invoice-paper { padding: 23px; }
  .invoice-row { grid-template-columns: minmax(0, 1fr) 45px 65px 75px; gap: 8px; }
  .data-table th, .data-table td { padding-left: 14px; padding-right: 14px; }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .page-heading { align-items: flex-start; }
  .page-title { font-size: 25px; }
  .page-actions { justify-content: flex-end; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-column, .three-column, .overview-columns { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .two-column > :not(.panel), .three-column > :not(.panel) { margin-bottom: 20px; }
  .invoice-layout { grid-template-columns: 1fr; }
  .invoice-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 6px; }
  .toolbar { flex-wrap: wrap; }
  .bar-chart { gap: 15px; }
}
@media (max-width: 760px) {
  :root { --sidebar-width: 232px; }
  .app-shell { display: block; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width); height: 100dvh; transform: translateX(-100%); transition: transform .18s ease; box-shadow: 8px 0 35px rgb(23 35 45 / 10%); }
  .app-shell.sidebar-open .sidebar, body.sidebar-open .sidebar { transform: translateX(0); }
  .app-shell.sidebar-open::before, body.sidebar-open::before { content: ""; position: fixed; inset: 0; background: rgb(23 35 45 / 22%); z-index: 25; }
  .mobile-nav-toggle, .icon-button.mobile-nav-toggle { display: inline-flex; }
  .topbar { min-height: 62px; padding: 0 20px; gap: 12px; }
  .breadcrumb { font-size: 11px; gap: 6px; }
  .topbar-actions { gap: 9px; }
  .topbar-actions > .avatar { display: none; }
  .role-switch button { padding: 5px 8px; font-size: 10px; }
  .main { padding: 26px 20px 35px; }
  .page-heading { flex-direction: column; gap: 16px; margin-bottom: 22px; }
  .page-actions { justify-content: flex-start; }
  .billing-summary { gap: 12px 20px; flex-wrap: wrap; }
  .page-title { font-size: 25px; }
  .page-subtitle { font-size: 12px; }
  .panel-header, .panel-body { padding: 18px; }
  .toolbar { padding: 13px 16px; }
  .stats-grid.three-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .three-stats .stat-value { font-size: 21px; }
  .three-stats .stat-icon { display: none; }
  .three-stats .stat-label { max-width: 100%; }
  .toolbar-filters { flex-wrap: wrap; }
  .invoice-detail .invoice-paper { padding: 22px; }
  .data-table { min-width: 600px; }
  .invoice-paper .data-table { min-width: 480px; }
  .data-table th:first-child, .data-table td:first-child { padding-left: 18px; }
  .data-table th:last-child, .data-table td:last-child { padding-right: 18px; }
  .project-grid { gap: 13px; }
  .project-card { padding: 17px; }
  .modal-backdrop { padding: 18px; }
  .modal { max-height: calc(100dvh - 36px); }
  .toast { right: 18px; bottom: 18px; }
}
@media (max-width: 480px) {
  .topbar { padding: 0 15px; }
  .breadcrumb { display: flex; }
  .breadcrumb > span, .breadcrumb > strong, .breadcrumb > .icon { display: none; }
  .main { padding: 23px 15px 30px; }
  .stats-grid { gap: 9px; }
  .stat-card { padding: 15px 13px; }
  .stat-value { font-size: 23px; letter-spacing: -.6px; }
  .stat-label { font-size: 10px; margin-bottom: 11px; }
  .stat-icon { width: 22px; height: 22px; top: 12px; right: 10px; }
  .stat-icon svg { width: 13px; height: 13px; }
  .stat-meta { font-size: 9px; }
  .stats-grid.three-stats { grid-template-columns: minmax(0, 1fr); }
  .three-stats .stat-card { padding: 15px; }
  .three-stats .stat-icon { display: flex; }
  .three-stats .stat-label { margin-bottom: 7px; }
  .page-actions { width: 100%; gap: 7px; }
  .page-actions .button { flex: 1; }
  .button { padding: 8px 10px; font-size: 11px; }
  .toolbar .search-field { width: 100%; }
  .tabs { gap: 2px; }
  .tab { padding: 6px 8px; font-size: 10px; }
  .invoice-list, .project-grid, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .invoice-card { padding: 14px 16px; }
  .invoice-paper { padding: 21px 17px; }
  .invoice-detail .invoice-paper { padding: 21px 17px; }
  .invoice-actions { padding: 16px; }
  .invoice-actions .button { flex: 1; }
  .invoice-edit-links > .muted { width: 100%; margin: 4px 0; text-align: center; }
  .billing-summary { font-size: 10px; }
  .toolbar-filters { width: 100%; }
  .toolbar-filters select { flex: 1; max-width: none; min-width: 120px; }
  .hours-toolbar .search-field { width: 100%; }
  .invoice-meta { gap: 13px; font-size: 10px; }
  .invoice-row { grid-template-columns: minmax(0, 1fr) 33px 52px 60px; gap: 6px; font-size: 10px; }
  .invoice-row .cell-title { font-size: 11px; }
  .modal-backdrop { padding: 10px; }
  .modal { max-height: calc(100dvh - 20px); }
  .modal-header, .modal-body { padding: 20px; }
  .modal-footer { padding: 15px 20px; }
  .bar-chart { gap: 10px; }
  .chart-value { font-size: 9px; }
  .legend { gap: 10px; }
  .scenario-results { gap: 9px; }
  .scenario-results > div { padding: 13px; }
  .detail-services > div { flex-wrap: wrap; gap: 10px; }
  .detail-services > div > span { min-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Print only the reviewable invoice content. */
@media print {
  @page { size: A4; margin: 17mm; }
  body { background: #fff; font-size: 11px; }
  body * { visibility: hidden; }
  .invoice-paper, .invoice-paper * { visibility: visible; }
  .invoice-paper { position: absolute; top: 0; left: 0; width: 100%; padding: 0; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
  .invoice-detail .invoice-paper { padding: 0; }
  .sidebar, .topbar, .page-heading, .invoice-list, .invoice-detail > .panel-header, .invoice-detail > .notice, .modal-backdrop, .toast { display: none !important; }
  .app-shell, .workspace, .main, .invoice-layout, .invoice-detail { display: block; width: 100%; margin: 0; padding: 0; }
  .invoice-paper .button, .invoice-paper .icon-button { display: none !important; }
  .invoice-actions, .invoice-edit-links, .snapshot-note, .billing-summary, .main > .toolbar, .invoice-detail .panel > .panel-header { display: none !important; }
  .invoice-detail .panel { border: 0; box-shadow: none; overflow: visible; }
  .invoice-paper .table-wrap { overflow: visible; }
  .invoice-paper .data-table { min-width: 0; }
  .invoice-row, .invoice-meta, .invoice-total, tr { break-inside: avoid; }
  .invoice-paper h3 { break-after: avoid; }
  a { color: inherit; text-decoration: none; }
  .badge, .notice { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
