:root {
  --ink: #142329;
  --ink-soft: #4f6165;
  --muted: #819093;
  --paper: #f7f8f5;
  --surface: #ffffff;
  --surface-2: #eff3f0;
  --line: #dce5e1;
  --line-strong: #c7d5d0;
  --teal: #16796b;
  --teal-dark: #0e5f54;
  --teal-pale: #e0f2ed;
  --orange: #b86528;
  --orange-pale: #fff0df;
  --yellow: #927313;
  --yellow-pale: #fff8d9;
  --red: #b94b42;
  --red-pale: #ffebe8;
  --blue: #466eaa;
  --blue-pale: #eaf1fb;
  --shadow: 0 12px 32px rgba(20, 35, 41, .08);
  --radius: 12px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 14px/1.45 "DM Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.app-shell { min-height: 100vh; display: flex; }
.sidebar {
  background: var(--ink);
  color: #d9e6e2;
  display: flex;
  flex: 0 0 244px;
  flex-direction: column;
  min-height: 100vh;
  padding: 24px 14px 16px;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 12px 30px; }
.brand-mark { width: 34px; height: 34px; border: 2px solid #83c8b9; border-radius: 9px 9px 9px 3px; display: grid; place-items: center; color: #bde5db; font-family: Georgia, serif; font-size: 22px; transform: rotate(-4deg); }
.brand-name { font-family: Fraunces, Georgia, serif; color: #f5faf7; font-size: 24px; letter-spacing: -.03em; }
.workspace-switcher { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border: 1px solid rgba(220, 238, 231, .18); border-radius: 9px; margin: 0 2px 30px; color: #f1f7f3; background: rgba(255,255,255,.04); text-align: left; width: calc(100% - 4px); }
.avatar { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: #b8ded3; color: var(--ink); font-weight: 700; font-size: 11px; flex: none; }
.workspace-switcher span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-switcher small { color: #91aca8; display: block; font-size: 11px; margin-top: 1px; }
.caret { margin-left: auto; color: #88aaa2; font-size: 11px; }
.nav-label { color: #74908d; font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; padding: 0 12px; margin: 0 0 8px; }
.main-nav { display: grid; gap: 3px; }
.nav-item { border: 0; color: #a7bfba; display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: transparent; border-radius: 8px; text-align: left; width: 100%; font-weight: 500; }
.nav-item:hover, .nav-item.active { color: #f4faf6; background: rgba(255,255,255,.095); }
.nav-item.active { box-shadow: inset 3px 0 var(--teal); }
.nav-icon { width: 18px; text-align: center; color: #86aca4; font-size: 15px; }
.nav-item.active .nav-icon { color: #a2ddcf; }
.sidebar-spacer { flex: 1; }
.sidebar-bottom { border-top: 1px solid rgba(220,238,231,.13); padding-top: 15px; margin: 0 8px; }
.help-link { color: #9ab5af; display: flex; gap: 10px; align-items: center; padding: 8px 4px; font-size: 12px; }

.main { min-width: 0; flex: 1; }
.topbar { height: 72px; background: rgba(247,248,245,.88); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 36px; position: sticky; top: 0; z-index: 5; backdrop-filter: blur(10px); }
.breadcrumb { color: var(--muted); font-size: 13px; }
.breadcrumb strong { color: var(--ink); font-weight: 600; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.icon-button { background: transparent; color: var(--ink-soft); border: 0; padding: 7px; font-size: 18px; border-radius: 7px; }
.icon-button:hover { background: var(--surface-2); }
.top-user { display: flex; align-items: center; gap: 9px; padding-left: 13px; border-left: 1px solid var(--line); }
.top-user .avatar { background: #e1c28e; }
.top-user small { display: block; color: var(--muted); font-size: 11px; }

.page { max-width: 1440px; margin: 0 auto; padding: 34px 36px 64px; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.eyebrow { color: var(--teal); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 7px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font: 600 32px/1.1 Fraunces, Georgia, serif; letter-spacing: -.025em; margin-bottom: 8px; }
h2 { font: 600 22px/1.2 Fraunces, Georgia, serif; letter-spacing: -.018em; }
h3 { font-size: 15px; margin-bottom: 7px; }
.subtitle { color: var(--ink-soft); margin: 0; max-width: 690px; }
.header-actions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }

.btn { border: 1px solid transparent; border-radius: 7px; min-height: 38px; padding: 8px 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; white-space: nowrap; }
.btn-primary { background: var(--teal); color: white; box-shadow: 0 2px 4px rgba(14,95,84,.2); }
.btn-primary:hover { background: var(--teal-dark); }
.btn-secondary { color: var(--ink); background: var(--surface); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--teal); color: var(--teal-dark); }
.btn-ghost { background: transparent; color: var(--ink-soft); border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-danger { color: var(--red); background: var(--red-pale); border-color: #f5c8c3; }
.btn-sm { min-height: 30px; padding: 5px 10px; font-size: 12px; }
.btn-icon { min-width: 38px; padding: 7px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 2px 3px rgba(20,35,41,.02); }
.card-pad { padding: 22px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 26px; }
.stat-card { padding: 18px 20px; position: relative; overflow: hidden; }
.stat-card:after { content: ""; width: 70px; height: 70px; border-radius: 50%; border: 1px solid var(--teal-pale); position: absolute; right: -18px; bottom: -28px; }
.stat-label { color: var(--muted); font-size: 12px; margin-bottom: 9px; }
.stat-value { font: 600 28px/1 Fraunces, Georgia, serif; letter-spacing: -.03em; }
.stat-note { color: var(--ink-soft); font-size: 12px; margin-top: 8px; }
.text-teal { color: var(--teal); }
.text-orange { color: var(--orange); }
.text-muted { color: var(--muted); }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(330px, .8fr); gap: 20px; }
.grid-2-equal { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px 16px; gap: 12px; }
.section-heading h2 { margin: 0; font-size: 19px; }
.section-heading p { color: var(--muted); font-size: 12px; margin: 4px 0 0; }
.section-heading .btn { flex: none; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { color: var(--muted); text-align: left; font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 11px 18px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 15px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfcfa; }
.cell-title { font-weight: 600; color: var(--ink); }
.cell-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.right { text-align: right; }
.mono { font-family: "DM Mono", monospace; font-size: 12px; }

.status { display: inline-flex; align-items: center; gap: 6px; border-radius: 99px; padding: 5px 9px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.status:before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-draft { color: var(--orange); background: var(--orange-pale); }
.status-exported { color: var(--blue); background: var(--blue-pale); }
.status-locked { color: #715a9b; background: #f0eafb; }
.status-active { color: var(--teal); background: var(--teal-pale); }
.status-archived { color: var(--muted); background: var(--surface-2); }

.filter-bar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.search { position: relative; min-width: 220px; }
.search:before { content: "⌕"; position: absolute; left: 11px; top: 7px; color: var(--muted); font-size: 19px; }
input, select, textarea { color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 6px; outline: none; }
input, select { height: 36px; padding: 7px 10px; }
.search input { width: 100%; padding-left: 31px; }
textarea { padding: 9px 10px; resize: vertical; min-height: 78px; width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(22,121,107,.11); }
.filter-select { min-width: 128px; }
.filter-count { margin-left: auto; color: var(--muted); font-size: 12px; }

.notice { display: flex; align-items: flex-start; gap: 11px; border-radius: 8px; padding: 12px 14px; font-size: 13px; margin-bottom: 18px; }
.notice-info { color: #315b86; background: var(--blue-pale); border: 1px solid #cfddf1; }
.notice-warn { color: #755d0d; background: var(--yellow-pale); border: 1px solid #eedf9e; }
.notice-success { color: var(--teal-dark); background: var(--teal-pale); border: 1px solid #b8e0d6; }
.notice-icon { font-weight: 700; }

.timeline { padding: 4px 22px 20px; }
.timeline-item { display: grid; grid-template-columns: 86px 16px 1fr; gap: 13px; min-height: 66px; }
.timeline-date { color: var(--muted); font-size: 11px; padding-top: 2px; }
.timeline-marker { position: relative; display: flex; justify-content: center; }
.timeline-marker:before { content: ""; width: 9px; height: 9px; background: var(--teal); border: 3px solid var(--teal-pale); border-radius: 50%; z-index: 1; }
.timeline-marker:after { content: ""; width: 1px; background: var(--line); position: absolute; top: 11px; bottom: -8px; }
.timeline-item:last-child .timeline-marker:after { display: none; }
.timeline-copy { padding-bottom: 17px; }
.timeline-copy strong { display: block; font-size: 13px; }
.timeline-copy span { color: var(--muted); font-size: 12px; }

/* Timesheet editor */
.editor-header { margin-bottom: 20px; }
.editor-header h1 { margin-bottom: 5px; }
.editor-meta { display: flex; align-items: center; gap: 13px; flex-wrap: wrap; color: var(--ink-soft); font-size: 13px; }
.editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 326px; gap: 18px; align-items: start; }
.editor-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.toolbar-group { display: flex; align-items: center; gap: 8px; }
.month-switcher { display: flex; align-items: center; gap: 5px; font-weight: 700; }
.month-switcher button { border: 0; background: transparent; width: 27px; height: 27px; border-radius: 5px; color: var(--ink-soft); }
.month-switcher button:hover { background: var(--surface-2); }
.keyboard-hint { color: var(--muted); font-size: 11px; display: flex; align-items: center; gap: 5px; }
kbd { background: var(--surface-2); border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 4px; padding: 1px 5px; font: 11px "DM Mono", monospace; color: var(--ink-soft); }
.calendar-shell { overflow: hidden; }
.weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); }
.weekday { color: var(--muted); font-size: 10px; letter-spacing: .09em; font-weight: 700; text-transform: uppercase; padding: 12px 10px 9px; border-bottom: 1px solid var(--line); }
.day-cell { min-height: 110px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 8px; position: relative; cursor: pointer; transition: background .15s, box-shadow .15s; }
.day-cell:nth-child(7n) { border-right: 0; }
.day-cell:hover { background: #fbfcfa; }
.day-cell.selected { background: #f0f8f5; box-shadow: inset 0 0 0 2px var(--teal); z-index: 1; }
.day-cell.muted-day { background: #fafbf9; color: #b4c0bd; }
.day-cell.weekend { background: #fbfaf7; }
.day-cell.restricted { background: #fffcf0; }
.day-cell.restricted.selected { background: #fff8dd; }
.day-num { display: flex; align-items: center; justify-content: space-between; color: var(--ink-soft); font-size: 12px; font-weight: 700; margin-bottom: 6px; }
.weekend .day-num { color: var(--muted); }
.day-cell.has-entry .day-num { color: var(--ink); }
.today-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--teal); display: inline-block; margin-left: 4px; vertical-align: middle; }
.restricted-mark { color: var(--yellow); font-size: 12px; }
.entry-chip { border-radius: 5px; margin: 3px 0; padding: 5px 6px; overflow: hidden; font-size: 11px; white-space: nowrap; text-overflow: ellipsis; }
.entry-regular { color: var(--teal-dark); background: var(--teal-pale); }
.entry-overtime { color: #9b5528; background: var(--orange-pale); }
.entry-chip b { font-family: "DM Mono", monospace; font-size: 10px; margin-right: 3px; }
.entry-summary { color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; padding: 2px 3px; }
.entry-empty { color: #a8b7b3; font-size: 10px; padding: 4px 3px; }
.calendar-footer { display: flex; justify-content: space-between; align-items: center; padding: 13px 16px; color: var(--muted); font-size: 11px; }
.calendar-footer span { display: flex; gap: 12px; align-items: center; }
.legend-item { display: inline-flex; align-items: center; gap: 5px; }
.legend-dot { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.detail-card { position: sticky; top: 92px; }
.detail-card-header { padding: 18px 19px 15px; border-bottom: 1px solid var(--line); }
.detail-date { color: var(--teal); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.detail-card-header h2 { font-size: 21px; margin: 5px 0 8px; }
.detail-body { padding: 17px 19px; }
.detail-section { padding-bottom: 17px; margin-bottom: 17px; border-bottom: 1px solid var(--line); }
.detail-section:last-child { border-bottom: 0; padding-bottom: 0; margin-bottom: 0; }
.detail-section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.detail-section-title strong { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.detail-section-title span { color: var(--muted); font-size: 11px; }
.form-row { display: grid; gap: 10px; grid-template-columns: repeat(2,minmax(0,1fr)); margin-bottom: 10px; }
.form-field { display: grid; gap: 5px; }
.form-field label { color: var(--ink-soft); font-size: 11px; font-weight: 600; }
.form-field input, .form-field select { width: 100%; }
.duration-display { border-radius: 7px; background: var(--surface-2); padding: 11px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 11px; }
.duration-display span { color: var(--muted); font-size: 11px; }
.duration-display strong { font: 600 20px Fraunces, Georgia, serif; }
.quick-fill { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.quick-fill button { border: 1px dashed var(--line-strong); background: #fbfcfa; padding: 9px 6px; border-radius: 6px; color: var(--ink-soft); font-size: 12px; }
.quick-fill button:hover { border-color: var(--teal); color: var(--teal-dark); background: var(--teal-pale); }
.quick-fill button strong { display: block; color: var(--ink); font-size: 15px; }
.detail-actions { display: flex; gap: 7px; margin-top: 16px; }
.detail-actions .btn { flex: 1; }
.summary-list { display: grid; gap: 9px; }
.summary-line { display: flex; align-items: center; justify-content: space-between; color: var(--ink-soft); font-size: 12px; }
.summary-line strong { color: var(--ink); font-family: "DM Mono", monospace; font-size: 12px; }
.summary-total { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 2px; }
.summary-total strong { font-size: 15px; }

/* Settings and clients */
.settings-layout { display: grid; grid-template-columns: 210px minmax(0, 760px); gap: 24px; align-items: start; }
.settings-nav { display: grid; gap: 3px; }
.settings-nav button { border: 0; background: transparent; text-align: left; border-radius: 7px; padding: 10px 12px; color: var(--ink-soft); }
.settings-nav button.active, .settings-nav button:hover { color: var(--teal-dark); background: var(--teal-pale); font-weight: 600; }
.settings-nav small { display: block; color: var(--muted); padding: 19px 12px 7px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.settings-card { margin-bottom: 17px; }
.settings-card-header { padding: 20px 22px 15px; border-bottom: 1px solid var(--line); }
.settings-card-header h2 { margin: 0 0 5px; font-size: 19px; }
.settings-card-header p { margin: 0; color: var(--muted); font-size: 12px; }
.settings-card-body { padding: 20px 22px; }
.fields-2 { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.fields-3 { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; }
.field-label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.field-help { display: block; color: var(--muted); font-size: 11px; margin-top: 5px; }
.full-input { width: 100%; }
.form-divider { height: 1px; background: var(--line); margin: 22px 0; }
.form-footer { display: flex; align-items: center; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); padding: 14px 22px; }
.toggle-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.toggle-row:last-child { border-bottom: 0; }
.toggle-title { font-weight: 600; font-size: 13px; }
.toggle-description { color: var(--muted); font-size: 12px; margin-top: 2px; }
.toggle { width: 39px; height: 22px; background: #bdc9c5; border-radius: 99px; padding: 3px; border: 0; flex: none; }
.toggle:after { content: ""; width: 16px; height: 16px; border-radius: 50%; background: white; display: block; transition: transform .15s; }
.toggle.on { background: var(--teal); }
.toggle.on:after { transform: translateX(17px); }
.logo-uploader { display: flex; align-items: center; gap: 16px; }
.logo-preview { width: 90px; height: 70px; display: grid; place-items: center; border: 1px dashed var(--line-strong); border-radius: 8px; background: #fbfcfa; color: var(--ink); font: 600 24px Fraunces, serif; }
.logo-actions { display: grid; gap: 4px; }
.client-detail-grid { display: grid; grid-template-columns: 250px minmax(0,1fr); gap: 20px; }
.client-identity { padding: 22px; }
.client-avatar { width: 58px; height: 58px; border-radius: 12px; display: grid; place-items: center; background: var(--teal-pale); color: var(--teal-dark); font: 600 22px Fraunces,serif; margin-bottom: 17px; }
.client-identity h2 { margin-bottom: 4px; font-size: 22px; }
.client-identity p { color: var(--muted); font-size: 12px; margin-bottom: 18px; }
.client-contact { display: grid; gap: 9px; border-top: 1px solid var(--line); padding-top: 15px; }
.contact-line { color: var(--ink-soft); font-size: 12px; display: flex; gap: 8px; }
.contact-line b { color: var(--muted); width: 17px; }

/* Artifacts/history */
.detail-top-grid { display: grid; grid-template-columns: minmax(0,1fr) 350px; gap: 20px; margin-bottom: 20px; }
.snapshot-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.snapshot-block h3 { color: var(--muted); text-transform: uppercase; letter-spacing: .09em; font-size: 10px; margin-bottom: 7px; }
.snapshot-block p { margin: 0; font-size: 13px; }
.snapshot-block small { color: var(--muted); font-size: 11px; }
.artifact-row { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 13px; padding: 15px 22px; border-bottom: 1px solid var(--line); }
.artifact-row:last-child { border-bottom: 0; }
.file-icon { width: 37px; height: 42px; border: 1px solid #efc1bc; background: var(--red-pale); color: var(--red); border-radius: 5px; display: grid; place-items: center; font-size: 10px; font-weight: 800; }
.artifact-title { font-weight: 600; font-size: 13px; }
.artifact-meta { color: var(--muted); font-size: 11px; margin-top: 3px; }
.history-line { display: grid; grid-template-columns: 100px 18px 1fr; gap: 10px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.history-line:last-child { border-bottom: 0; }
.history-time { color: var(--muted); font-size: 11px; }
.history-icon { color: var(--teal); text-align: center; font-size: 13px; }
.history-copy strong { font-size: 13px; display: block; }
.history-copy span { color: var(--muted); font-size: 11px; }

/* Modal, toast */
.modal-backdrop { position: fixed; inset: 0; background: rgba(20,35,41,.45); z-index: 20; display: grid; place-items: center; padding: 22px; }
.modal { background: var(--surface); border-radius: 13px; box-shadow: 0 20px 60px rgba(20,35,41,.24); width: min(560px,100%); max-height: 92vh; overflow: auto; }
.modal.wide { width: min(780px,100%); }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; padding: 22px 24px 14px; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 0 0 5px; font-size: 21px; }
.modal-header p { color: var(--muted); font-size: 12px; margin: 0; }
.modal-body { padding: 21px 24px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 24px; border-top: 1px solid var(--line); }
.close-btn { border: 0; background: transparent; color: var(--muted); font-size: 22px; line-height: 1; padding: 0 0 0 12px; }
.modal-review { background: #fdfdfb; border: 1px solid var(--line); border-radius: 8px; padding: 15px; }
.review-head { display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 12px; }
.review-company { font: 600 18px Fraunces,serif; }
.review-label { color: var(--muted); text-transform: uppercase; font-size: 9px; letter-spacing: .1em; margin-bottom: 4px; }
.review-table { width: 100%; font-size: 12px; }
.review-table td { padding: 7px 0; border-bottom: 1px solid #edf0ed; }
.review-table td:last-child { text-align: right; font-family: "DM Mono", monospace; }
.toast-region { position: fixed; right: 22px; bottom: 22px; z-index: 40; display: grid; gap: 9px; }
.toast { background: var(--ink); color: white; border-radius: 8px; box-shadow: var(--shadow); padding: 12px 16px; font-size: 13px; animation: slide-in .2s ease-out; }
.toast.success { border-left: 3px solid #77c8b8; }
@keyframes slide-in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

.empty-state { text-align: center; padding: 60px 24px; color: var(--muted); }
.empty-state .empty-symbol { font: 36px Fraunces,serif; color: var(--line-strong); margin-bottom: 10px; }
.empty-state h2 { color: var(--ink); font-size: 20px; margin-bottom: 6px; }

@media (max-width: 1120px) {
  .sidebar { flex-basis: 218px; }
  .editor-layout { grid-template-columns: minmax(0,1fr) 290px; }
  .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 860px) {
  .sidebar { flex: 0 0 66px; padding: 17px 9px; }
  .brand { padding: 0 7px 27px; }
  .brand-name, .workspace-switcher span, .workspace-switcher small, .caret, .nav-label, .nav-item:not(.active)::after, .nav-item { font-size: 0; }
  .workspace-switcher { justify-content: center; padding: 7px 5px; }
  .workspace-switcher .avatar { width: 30px; height: 30px; }
  .nav-item { justify-content: center; padding: 12px 5px; }
  .nav-icon { font-size: 16px; }
  .sidebar-bottom { margin: 0; }
  .help-link { justify-content: center; font-size: 0; }
  .topbar, .page { padding-left: 22px; padding-right: 22px; }
  .editor-layout, .detail-top-grid, .client-detail-grid, .settings-layout, .grid-2 { grid-template-columns: 1fr; }
  .detail-card { position: static; }
  .settings-nav { display: flex; overflow-x: auto; padding-bottom: 4px; }
  .settings-nav small { display: none; }
  .settings-nav button { white-space: nowrap; }
}
@media (max-width: 600px) {
  .topbar { height: 61px; padding: 0 14px; }
  .top-user > div { display: none; }
  .page { padding: 25px 14px 44px; }
  .page-header { display: block; }
  .header-actions { justify-content: flex-start; margin-top: 17px; }
  h1 { font-size: 28px; }
  .stats-grid, .grid-2-equal, .fields-2, .fields-3 { grid-template-columns: 1fr; }
  .filter-count { width: 100%; margin-left: 0; }
  .editor-toolbar { align-items: flex-start; flex-direction: column; }
  .keyboard-hint { display: none; }
  .day-cell { min-height: 83px; padding: 5px; }
  .entry-summary { display: none; }
  .entry-chip { padding: 4px; }
  .weekday { padding-left: 5px; font-size: 9px; }
  .calendar-footer { display: block; }
  .calendar-footer span { margin-bottom: 7px; }
  .snapshot-grid { grid-template-columns: 1fr; }
  .history-line { grid-template-columns: 76px 14px 1fr; gap: 7px; }
  .modal-body, .modal-header, .modal-footer { padding-left: 17px; padding-right: 17px; }
}
