/* Osmo CRM — admin console styles
 *
 * Look: warm off-white canvas, floating white panels, near-black actions, lime accent,
 * teal labels picked up from the Osmo logo.
 * Type scale: 11.5 caption · 12.5 meta · 13.5 small · 14 body · 17 card title · 30–40 page title
 */
:root {
  --bg: #f2f2ee;
  --surface: #ffffff;
  --surface-2: #f7f7f3;
  --surface-3: #f0f0eb;
  --border: #ebebe5;
  --border-strong: #dcdcd5;

  --ink: #151515;
  --ink-2: #2a2a2a;
  --text: #18181b;
  --head: #3f3f46;
  --muted: #71717a;
  --faint: #a1a1aa;

  --lime: #d6f36a;
  --lime-strong: #c3e64b;
  --lime-soft: #f1fad0;
  --lime-ink: #3d5806;
  --teal: #1f7f8c;
  --teal-soft: #e5f2f3;

  --primary: var(--ink);
  --primary-hover: #000;
  --ring: rgba(21, 21, 21, .08);

  --red: #d92d20;
  --red-bg: #fef1f0;
  --red-border: #fbd0cc;
  --green: #138a4a;
  --green-bg: #ebf8f0;
  --green-border: #c3ead2;
  --amber: #b25e09;
  --amber-bg: #fff6e5;
  --amber-border: #fbe2b5;
  --blue: #2457c5;
  --blue-bg: #edf3ff;
  --blue-border: #cddcfb;
  --violet: #6a3fd1;
  --violet-bg: #f3effe;
  --violet-border: #ddd2fb;
  --gray-bg: #f1f1ed;

  --r-xl: 22px;
  --r-lg: 16px;
  --r-md: 12px;
  --r-sm: 8px;
  --shadow: 0 1px 2px rgba(24, 24, 16, .04), 0 10px 30px -18px rgba(24, 24, 16, .12);
  --shadow-lg: 0 24px 60px -20px rgba(24, 24, 16, .28);

  --font: "Geist", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-xs: 11.5px;
  --fs-sm: 12.5px;
  --fs-md: 13.5px;
  --fs-base: 14px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.5;
  color: var(--text);
  background:
    radial-gradient(900px 420px at 85% -120px, rgba(214, 243, 106, .28), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; }
main a:not(.btn):not(.cell-main):not(.pill):not(.pill-btn):not(.topbar-avatar) { color: var(--teal); text-decoration: none; }
main a:not(.btn):not(.cell-main):not(.pill):not(.pill-btn):not(.topbar-avatar):hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.02em; line-height: 1.25; color: var(--text); font-weight: 600; }
p { margin: 0; }
small { color: var(--muted); font-size: var(--fs-sm); }
::selection { background: var(--lime); color: var(--ink); }
.icon { width: 18px; height: 18px; flex: 0 0 auto; display: inline-block; vertical-align: middle; }
.hide-sm { display: inline; }

/* =====================  App shell  ===================== */
.app { display: flex; min-height: 100vh; padding: 16px; gap: 16px; }

.sidebar {
  position: fixed; top: 16px; bottom: 16px; left: 16px; width: 240px;
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl);
  box-shadow: var(--shadow); z-index: 40; overflow: hidden;
}
.brand { display: flex; flex-direction: column; gap: 8px; padding: 22px 22px 14px; text-decoration: none; }
.brand-logo-img { display: block; align-self: flex-start; height: 22px; width: auto; max-width: 100%; object-fit: contain; }
.brand-tenant {
  font-size: var(--fs-xs); font-weight: 500; color: var(--muted); letter-spacing: .02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.side-search {
  position: relative; display: flex; align-items: center; margin: 4px 16px 6px;
}
.side-search .icon { position: absolute; left: 12px; width: 16px; height: 16px; color: var(--faint); pointer-events: none; }
.side-search input[type=search] {
  min-height: 38px; padding: 6px 34px 6px 36px; border-radius: var(--r-md);
  background: var(--surface-2); border-color: var(--border); box-shadow: none; font-size: var(--fs-md);
}
.side-search input[type=search]:focus { background: #fff; }
.side-search kbd {
  position: absolute; right: 10px; padding: 0 6px; border: 1px solid var(--border-strong); border-radius: 6px;
  font: 500 11px/18px var(--font); color: var(--faint); background: #fff;
}

.nav { flex: 1; overflow-y: auto; padding: 4px 12px 12px; display: flex; flex-direction: column; gap: 2px; }
.nav-group {
  display: block; padding: 16px 12px 6px;
  font-size: 10.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--faint);
}
.nav a, .nav-link-plain {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; border-radius: var(--r-md);
  color: var(--head); text-decoration: none; font-size: var(--fs-base); font-weight: 500;
  transition: background-color .12s ease, color .12s ease;
}
.nav a .icon, .nav-link-plain .icon { width: 17px; height: 17px; color: #8a8a84; transition: color .12s ease; }
.nav a:hover, .nav-link-plain:hover { background: var(--surface-2); color: var(--text); }
.nav a.active, .nav-link-plain.active { background: var(--ink); color: #fff; }
.nav a.active .icon, .nav-link-plain.active .icon { color: var(--lime); }
.nav-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-badge {
  min-width: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--surface-3); color: var(--head); font-size: 11px; font-weight: 600; line-height: 20px; text-align: center;
}
.nav a.active .nav-badge { background: var(--lime); color: var(--ink); }

.sidebar-foot { padding: 8px 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.sidebar-user {
  display: flex; align-items: center; gap: 8px;
  padding: 10px; border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--border);
}
.sidebar-user-name { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; text-decoration: none; }
.sidebar-user-name > span:last-child { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.sidebar-user-name strong { font-size: var(--fs-md); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-name small { font-size: var(--fs-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.signout {
  display: grid; place-items: center; width: 32px; height: 32px; padding: 0; flex: 0 0 auto;
  background: none; border: 0; border-radius: var(--r-sm); color: var(--faint); cursor: pointer;
}
.signout:hover { background: var(--red-bg); color: var(--red); }
.signout .icon { width: 17px; height: 17px; }

.main { flex: 1; margin-left: 256px; min-width: 0; padding-bottom: 40px; }

/* The wrapper is the sticky part: it paints the page background (same fixed gradient as <body>)
   so content scrolling underneath never shows above or around the bar, then fades out below it. */
.topbar-wrap {
  position: sticky; top: 0; z-index: 30;
  margin-top: -16px; padding: 16px 0 14px;
  background:
    radial-gradient(900px 420px at 85% -120px, rgba(214, 243, 106, .28), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 14px), transparent);
          mask-image: linear-gradient(to bottom, #000 calc(100% - 14px), transparent);
}
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 60px; padding: 10px 12px 10px 22px;
  background: #fff;
  border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow);
  transition: box-shadow .2s ease, border-color .2s ease;
}
.topbar-wrap.is-scrolled .topbar { border-color: var(--border-strong); box-shadow: 0 8px 24px -12px rgba(24, 24, 16, .22); }
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: var(--fs-base); color: var(--faint); min-width: 0; }
.crumbs strong { color: var(--text); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumb-sep { color: var(--border-strong); }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.pill-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px;
  border-radius: 999px; border: 1px solid var(--border); background: #fff;
  color: var(--text); font-size: var(--fs-base); font-weight: 500; text-decoration: none; white-space: nowrap;
  transition: background-color .12s ease, border-color .12s ease;
}
.pill-btn:hover { background: var(--surface-2); }
.pill-btn .icon { width: 17px; height: 17px; }
.pill-btn-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.pill-btn-dark:hover { background: #000; }
.pill-count { font-size: var(--fs-xs); font-weight: 600; color: var(--muted); }
.topbar-avatar { display: inline-flex; border-radius: 50%; text-decoration: none; }
.topbar-avatar .avatar { width: 40px; height: 40px; font-size: 13px; box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--border); }
.menu-toggle {
  display: none; place-items: center; width: 38px; height: 38px; padding: 0;
  border: 1px solid var(--border); border-radius: 50%; background: #fff; cursor: pointer; color: var(--head);
}
.sidebar-backdrop { display: none; }

.page-hero {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  margin: 16px 4px 22px;
}
.page-hero-text { min-width: 0; }
.eyebrow {
  font-size: var(--fs-xs); font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 8px;
}
.page-hero h1 { font-size: 34px; font-weight: 600; letter-spacing: -.035em; line-height: 1.1; }
.page-subtitle { margin-top: 8px; color: var(--muted); font-size: 15px; }
.page-subtitle strong { color: var(--text); font-weight: 600; }
.page-hero-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* =====================  Cards & grid  ===================== */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); box-shadow: var(--shadow);
  padding: 24px;
}
.card + .card { margin-top: 16px; }
.grid > .card + .card { margin-top: 0; }
.card-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  margin-bottom: 18px; flex-wrap: wrap;
}
.card-head h2 { font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.card-head p { color: var(--muted); font-size: var(--fs-md); margin-top: 3px; }
.card-head > a:not(.btn) { font-size: var(--fs-md); font-weight: 500; }
.card-flush { padding: 0; overflow: hidden; }
.card-flush .card-head { padding: 22px 24px 0; margin-bottom: 16px; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-sidebar { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.mt { margin-top: 16px; }
.section-title { font-size: 18px; font-weight: 600; margin-bottom: 14px; }

.stat { padding: 22px 24px; }
.stat-label {
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--teal);
}
.stat-value {
  font-size: 32px; font-weight: 600; line-height: 1.15; margin: 10px 0 6px;
  letter-spacing: -.035em; font-variant-numeric: tabular-nums;
}
.stat-sub { color: var(--muted); font-size: var(--fs-md); }
.stat-value.red { color: var(--red); }
.stat-value.green { color: var(--green); }
.stat-icon-card { position: relative; padding-right: 76px; }
.stat-icon {
  position: absolute; top: 20px; right: 20px;
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px;
}
.stat-icon .icon { width: 20px; height: 20px; }

.tone-blue { background: var(--blue-bg); color: var(--blue); }
.tone-green { background: var(--green-bg); color: var(--green); }
.tone-violet { background: var(--violet-bg); color: var(--violet); }
.tone-amber { background: var(--amber-bg); color: var(--amber); }
.tone-red { background: var(--red-bg); color: var(--red); }
.tone-teal { background: var(--teal-soft); color: var(--teal); }
.tone-lime { background: var(--lime-soft); color: var(--lime-ink); }
.tone-gray { background: var(--gray-bg); color: var(--head); }

/* =====================  Tables  ===================== */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-lg); }
.card-flush .table-wrap { border: 0; border-radius: 0; border-top: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th {
  text-align: left; white-space: nowrap;
  padding: 12px 16px; background: var(--surface-2);
  font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--faint);
  border-bottom: 1px solid var(--border);
}
td {
  padding: 14px 16px; border-bottom: 1px solid #f1f1ec;
  vertical-align: middle; font-size: var(--fs-md); color: var(--head);
}
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background-color .1s ease; }
tbody tr:hover td { background: #fbfbf8; }
td.num, th.num { text-align: right; }
td.center, th.center { text-align: center; }
.cell-main { font-weight: 600; color: var(--text); text-decoration: none; }
a.cell-main:hover { text-decoration: underline; text-underline-offset: 3px; }
.cell-sub { display: block; color: var(--muted); font-size: var(--fs-sm); margin-top: 1px; }
.empty { text-align: center; color: var(--muted); padding: 36px 12px !important; font-size: var(--fs-md); }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: nowrap; align-items: center; }
.person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.person-text { display: flex; flex-direction: column; min-width: 0; }

/* =====================  Avatars  ===================== */
.avatar {
  display: inline-grid; place-items: center; flex: 0 0 auto;
  width: 34px; height: 34px; border-radius: 50%;
  font-size: 12px; font-weight: 600; letter-spacing: .02em; line-height: 1;
}
.avatar-sm { width: 24px; height: 24px; font-size: 10px; }
.avatar-lg { width: 44px; height: 44px; font-size: 15px; }
.avatar-lime { background: var(--lime); color: var(--ink); }
.avatar-0 { background: #e3ecff; color: #2457c5; }
.avatar-1 { background: #def5e7; color: #138a4a; }
.avatar-2 { background: #fdeccd; color: #a6560a; }
.avatar-3 { background: #fbe1ee; color: #b4236c; }
.avatar-4 { background: #ebe4fd; color: #6a3fd1; }
.avatar-5 { background: #d9f1f3; color: #1f7f8c; }
.avatar-6 { background: #fde5d6; color: #c2410c; }
.avatar-7 { background: #ecf7c4; color: #4d6b06; }

/* =====================  Pills, chips, deltas  ===================== */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  font-size: var(--fs-xs); font-weight: 500; line-height: 16px; white-space: nowrap;
  border: 1px solid transparent;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-green { background: var(--green-bg); color: var(--green); }
.pill-red { background: var(--red-bg); color: var(--red); }
.pill-amber { background: var(--amber-bg); color: var(--amber); }
.pill-blue { background: var(--blue-bg); color: var(--blue); }
.pill-violet { background: var(--violet-bg); color: var(--violet); }
.pill-gray { background: var(--gray-bg); color: var(--muted); }
.chip {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  background: var(--gray-bg); color: var(--head); font-size: var(--fs-xs); font-weight: 500;
}
.delta { display: inline-block; font-size: var(--fs-sm); font-weight: 600; letter-spacing: -.01em; }
.delta-up { color: var(--green); }
.delta-down { color: var(--red); }
.delta-flat { color: var(--muted); }

/* =====================  Buttons  ===================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 40px; padding: 8px 18px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: #fff; color: var(--text);
  font: inherit; font-size: var(--fs-base); font-weight: 500; line-height: 1.2;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .12s ease, border-color .12s ease, color .12s ease, transform .06s ease;
}
.btn:hover { background: var(--surface-2); border-color: #cfcfc7; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--ring); }
.btn .icon { width: 16px; height: 16px; margin-left: -3px; }
.btn-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-primary:hover { background: #000; border-color: #000; color: #fff; }
.btn-accent { background: var(--lime); border-color: var(--lime); color: var(--ink); font-weight: 600; }
.btn-accent:hover { background: var(--lime-strong); border-color: var(--lime-strong); }
.btn-danger { color: var(--red); border-color: var(--red-border); }
.btn-danger:hover { background: var(--red-bg); border-color: #f5a9a2; color: var(--red); }
.btn-success { color: var(--green); border-color: var(--green-border); }
.btn-success:hover { background: var(--green-bg); color: var(--green); }
.btn-sm { min-height: 32px; padding: 5px 13px; font-size: var(--fs-sm); }
.btn-sm .icon { width: 14px; height: 14px; }
.btn-lg { min-height: 46px; min-width: 150px; padding: 10px 22px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-link { border: 0; background: none; padding: 0; min-height: 0; color: var(--teal); }
.btn-link:hover { background: none; text-decoration: underline; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-row > .btn { flex: 1; }
form.inline { display: inline; }
summary.btn { list-style: none; display: inline-flex; }
summary.btn::-webkit-details-marker { display: none; }

/* =====================  Forms  ===================== */
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=search],
input[type=number], input[type=date], input[type=time], input[type=datetime-local], input[type=url],
input[type=month], select, textarea {
  width: 100%; min-height: 40px; padding: 8px 13px;
  border: 1px solid var(--border-strong); border-radius: var(--r-md); background: #fff;
  font: inherit; font-size: var(--fs-base); color: var(--text);
  transition: border-color .12s ease, box-shadow .12s ease, background-color .12s ease;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
textarea { min-height: 100px; resize: vertical; line-height: 1.5; }
select {
  appearance: none; -webkit-appearance: none; padding-right: 34px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px var(--ring); }
input[type=checkbox], input[type=radio] { accent-color: var(--ink); }
label { display: block; font-size: var(--fs-md); font-weight: 500; color: var(--head); }
label > input, label > select, label > textarea { margin-top: 6px; font-weight: 400; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions {
  display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap;
  margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border);
}
dialog .form-actions { margin: 22px -24px -22px; padding: 16px 24px; background: var(--surface-2); border-radius: 0 0 var(--r-xl) var(--r-xl); }
.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; color: var(--text); }
.check input { margin-top: 2px; width: 16px; height: 16px; flex: 0 0 auto; }
.check small { display: block; font-weight: 400; margin-top: 2px; }
.hint { display: block; color: var(--muted); font-size: var(--fs-sm); margin-top: 5px; font-weight: 400; }
.req { color: var(--red); }
.input-sm { width: 140px !important; min-height: 32px !important; padding: 4px 11px !important; font-size: var(--fs-sm) !important; border-radius: 999px !important; }
.input-month { width: auto; border-radius: 999px; }

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 18px; }
.filters > * { flex: 1 1 160px; }
.filters .grow { flex: 3 1 260px; }
.filters .btn { flex: 0 0 auto; }
.card-flush > .filters { padding: 18px 24px 0; }

/* =====================  Alerts  ===================== */
.alert {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 13px 16px; border-radius: var(--r-lg); margin-bottom: 16px;
  font-size: var(--fs-md); border: 1px solid transparent; background: #fff;
}
.alert::before { content: ""; flex: 0 0 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: currentColor; }
.alert-success { background: var(--green-bg); color: #0f6b3a; border-color: var(--green-border); }
.alert-error { background: var(--red-bg); color: #a3241a; border-color: var(--red-border); }
.alert-info { background: var(--blue-bg); color: #1e46a0; border-color: var(--blue-border); }
.alert code, .secret {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12.5px;
  background: rgba(255,255,255,.8); border: 1px solid var(--border);
  padding: 1px 7px; border-radius: 6px; word-break: break-all; color: var(--text);
}

/* =====================  Progress breakdown  ===================== */
.breakdown-row { margin-bottom: 14px; }
.breakdown-row:last-child { margin-bottom: 0; }
.breakdown-top { display: flex; justify-content: space-between; font-size: var(--fs-md); color: var(--head); margin-bottom: 7px; font-variant-numeric: tabular-nums; }
.bar { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: inherit; background: var(--ink); }
.bar-red > span { background: #ef6b5f; }
.bar-green > span { background: #3bb273; }
.bar-amber > span { background: #f2b23f; }
.bar-blue > span { background: #5b8def; }
.bar-violet > span { background: #9a7bea; }
.bar-gray > span { background: #b4b4ad; }

/* =====================  Detail lists & timeline  ===================== */
.detail-list { display: grid; grid-template-columns: 140px 1fr; gap: 12px 16px; font-size: var(--fs-md); margin: 0; }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; font-weight: 500; color: var(--text); word-break: break-word; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.timeline li:last-child { border-bottom: 0; }
.timeline-icon {
  flex: 0 0 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); font-size: 15px;
}
.timeline-body { flex: 1; min-width: 0; font-size: var(--fs-md); }
.timeline-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: var(--fs-sm); margin-top: 3px; }
.timeline-notes { margin-top: 6px; white-space: pre-line; color: var(--head); }

/* =====================  Tabs & segmented  ===================== */
.tabs {
  display: inline-flex; gap: 2px; padding: 4px; margin-bottom: 16px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--border); border-radius: 999px; box-shadow: var(--shadow);
}
.tabs a {
  display: inline-flex; align-items: center; padding: 7px 16px; border-radius: 999px;
  text-decoration: none !important; color: var(--head) !important; font-size: var(--fs-md); font-weight: 500;
  transition: background-color .12s ease;
}
.tabs a:hover { background: var(--surface-2); }
.tabs a.active { background: var(--ink); color: #fff !important; }
.tabs.mt { margin-top: 18px; }
.tab-count {
  display: inline-block; min-width: 20px; margin-left: 7px; padding: 0 6px; border-radius: 999px;
  background: var(--surface-3); color: var(--muted); font-size: var(--fs-xs); font-weight: 600; line-height: 18px; text-align: center;
}
.tabs a.active .tab-count { background: rgba(255,255,255,.16); color: #fff; }
.tab-count-alert, .tabs a.active .tab-count-alert { background: var(--lime); color: var(--ink); }
.segmented { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: var(--surface-3); }
.segmented a {
  padding: 5px 13px; border-radius: 999px; font-size: var(--fs-sm); font-weight: 500;
  color: var(--muted) !important; text-decoration: none !important;
}
.segmented a:hover { color: var(--text) !important; }
.segmented a.active { background: var(--ink); color: #fff !important; }

/* =====================  Performance  ===================== */
.rank {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--surface-3); font-weight: 600; font-size: var(--fs-sm); color: var(--head);
}
.rank-1 { background: var(--lime); color: var(--ink); }
.rank-2 { background: #e8e8e2; color: var(--ink); }
.rank-3 { background: #f6e3cf; color: #8a4a0f; }
.perf-card h3 { font-size: 16px; font-weight: 600; }
.perf-score { font-size: 26px; font-weight: 600; line-height: 1.2; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.perf-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0; }
.perf-metrics div { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px; text-align: center; }
.perf-metrics span { display: block; font-size: var(--fs-xs); color: var(--muted); margin-bottom: 2px; }
.perf-metrics strong { font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tips { margin: 0; padding-left: 18px; color: var(--head); font-size: var(--fs-md); }
.tips li { margin-bottom: 6px; }
.note-box { margin-top: 16px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--lime-soft); border: 1px solid #e3f2a9; font-size: var(--fs-md); }
.note-box strong { display: block; font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--lime-ink); margin-bottom: 4px; }

/* =====================  Punch card  ===================== */
.punch { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.punch-time { font-size: 38px; font-weight: 600; letter-spacing: -.04em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.punch-meta { display: flex; gap: 30px; flex-wrap: wrap; color: var(--muted); font-size: var(--fs-sm); margin-top: 10px; }
.punch-meta strong { display: block; color: var(--text); font-size: 15px; font-weight: 600; margin-top: 2px; }

/* =====================  Search, pager, menus  ===================== */
.search-group + .search-group { margin-top: 26px; }
.search-group h3 { font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .14em; color: var(--teal); margin-bottom: 10px; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 16px 0 0; color: var(--muted); font-size: var(--fs-sm); }
.card-flush .pager { padding: 14px 24px; border-top: 1px solid var(--border); }

.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
/* Positioned against the window by crm.js, so it is never clipped by a card and flips up near the bottom. */
.menu-pop {
  position: fixed; z-index: 60; min-width: 190px; padding: 6px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); text-align: left;
}
.menu-form { display: block; margin: 0; }
.menu-item {
  display: block; width: 100%; padding: 8px 11px; border: 0; border-radius: var(--r-sm); background: none;
  font: inherit; font-size: var(--fs-md); color: var(--head); text-align: left; cursor: pointer;
}
.menu-item:hover { background: var(--surface-2); color: var(--text); }
.menu-item.is-danger { color: var(--red); }
.menu-item.is-danger:hover { background: var(--red-bg); }
.table-wrap:has(.menu[open]) { overflow: visible; }

/* =====================  Dialog  ===================== */
dialog {
  width: min(600px, calc(100vw - 32px)); border: 0; border-radius: var(--r-xl); padding: 0;
  box-shadow: var(--shadow-lg); color: var(--text);
}
dialog::backdrop { background: rgba(21, 21, 16, .42); backdrop-filter: blur(3px); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px 6px; }
.dialog-head h2 { font-size: 19px; font-weight: 600; }
.dialog-close {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--border); background: #fff; font-size: 20px; line-height: 1; cursor: pointer; color: var(--muted);
}
.dialog-close:hover { background: var(--surface-2); color: var(--text); }
.dialog-body { padding: 16px 24px 22px; }

/* =====================  Charts  ===================== */
.chart-box { position: relative; height: 280px; }
.chart-box.sm { height: 230px; }

/* =====================  Access screen  ===================== */
.access-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.access-head h2 { font-size: 18px; font-weight: 600; }
.access-head p { color: var(--muted); font-size: var(--fs-md); margin-top: 2px; }
.access-status { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.access-status .hint { margin: 0; }
.access-presets { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.access-presets .hint { margin-top: 2px; }
.access-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.access-grid .card + .card { margin-top: 0; }
.access-group { margin: 0; min-width: 0; }
.access-group legend {
  float: left; width: 100%; padding: 0 0 12px; margin-bottom: 4px; border-bottom: 1px solid var(--border);
  font-size: 16px; font-weight: 600; color: var(--text);
}
.access-item { clear: both; padding: 11px 0; border-bottom: 1px solid #f1f1ec; cursor: pointer; }
.access-item:last-child { border-bottom: 0; padding-bottom: 0; }
.access-child { padding-left: 26px; }
.access-item.is-off, .access-item.is-locked { opacity: .42; cursor: not-allowed; }
.access-bar {
  position: sticky; bottom: 16px; margin-top: 16px; z-index: 5;
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  box-shadow: var(--shadow-lg);
}

.empty-state { text-align: center; padding: 56px 24px; }
.empty-state h2 { font-size: 20px; font-weight: 600; margin-bottom: 6px; }
.empty-state p { color: var(--muted); max-width: 440px; margin: 0 auto 18px; }
.empty-state .btn-row { justify-content: center; }
.empty-state .btn-row > .btn { flex: 0 0 auto; }

/* =====================  Dashboard  ===================== */
.kpi { display: flex; flex-direction: column; padding: 22px 24px 18px; min-height: 164px; }
.kpi-row { display: flex; align-items: baseline; gap: 10px; margin: 12px 0 auto; }
.kpi-value { font-size: 36px; font-weight: 600; letter-spacing: -.045em; line-height: 1; font-variant-numeric: tabular-nums; }
.kpi-unit { font-size: 18px; font-weight: 500; color: var(--muted); letter-spacing: -.02em; margin-left: -4px; }
.kpi-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 18px; }
.kpi-foot span { font-size: var(--fs-md); color: var(--muted); }
.sparkline { width: 108px; height: 38px; flex: 0 0 auto; overflow: visible; }

.dash-main { display: grid; grid-template-columns: minmax(0, 2.25fr) minmax(300px, 1fr); gap: 16px; margin-top: 16px; }
.dash-bottom { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: 16px; margin-top: 16px; }

.chart-legend { display: flex; gap: 18px; font-size: var(--fs-md); color: var(--head); }
.chart-legend span { display: inline-flex; align-items: center; gap: 8px; }
.chart-legend i { display: inline-block; width: 16px; height: 0; border-top: 2px solid var(--ink); }
.chart-legend i.dashed { border-top: 2px dashed #9fae5f; }

.rev-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; align-items: stretch; }
.rev-summary { display: flex; flex-direction: column; }
.rev-total { font-size: 46px; font-weight: 600; letter-spacing: -.05em; line-height: 1; margin: 10px 0 12px; font-variant-numeric: tabular-nums; }
.rev-chip { align-self: flex-start; padding: 4px 11px; border-radius: 999px; background: var(--lime-soft); color: var(--lime-ink); font-size: var(--fs-sm); font-weight: 600; }
.rev-list { margin-top: auto; padding-top: 22px; }
.rev-list div { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 0; border-top: 1px solid var(--border); font-size: var(--fs-md); color: var(--muted); }
.rev-list div:first-child { border-top: 0; }
.rev-list strong { color: var(--text); font-size: 15px; font-weight: 600; letter-spacing: -.02em; }
.rev-list strong.good { color: var(--green); }
.rev-chart { position: relative; height: 300px; }

.seg-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--border); }
.seg-tile { padding: 14px 16px 16px; border-radius: var(--r-lg); background: #fff; border: 1px solid var(--border); min-width: 0; }
.seg-name { display: flex; align-items: center; gap: 8px; font-size: var(--fs-md); color: var(--head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seg-name::before { content: ""; flex: 0 0 7px; height: 7px; border-radius: 2px; background: var(--ink); }
.seg-value { display: flex; align-items: baseline; gap: 8px; margin: 8px 0 12px; font-size: 24px; font-weight: 600; letter-spacing: -.04em; }
.seg-bar { height: 4px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.seg-bar span { display: block; height: 100%; border-radius: inherit; background: var(--ink); }
.seg-tile:nth-child(2) .seg-name::before, .seg-tile:nth-child(2) .seg-bar span { background: #a9b86d; }
.seg-tile:nth-child(3) .seg-name::before, .seg-tile:nth-child(3) .seg-bar span { background: #c5c5be; }
.seg-tile.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.seg-tile.dark .seg-name { color: #d4d4cf; }
.seg-tile.dark .seg-name::before, .seg-tile.dark .seg-bar span { background: var(--lime); }
.seg-tile.dark .seg-bar { background: rgba(255,255,255,.14); }
.seg-tile.dark .delta-up { color: var(--lime); }

.schedule { display: flex; flex-direction: column; }
.sched-list { display: flex; flex-direction: column; gap: 10px; }
.sched-item {
  display: block; padding: 14px 16px; border-radius: var(--r-lg); border: 1px solid var(--border); background: #fff;
  text-decoration: none !important; color: inherit !important; transition: border-color .12s ease, box-shadow .12s ease;
}
.sched-item:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.sched-item.is-next { background: var(--lime-soft); border-color: #e1f0a3; }
.sched-item.is-done { opacity: .6; }
.sched-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sched-time { font-size: var(--fs-sm); color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.sched-time.late { color: var(--red); font-weight: 600; }
.sched-tag { padding: 2px 9px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 500; }
.sched-title { margin: 7px 0 8px; font-size: 15px; font-weight: 600; letter-spacing: -.015em; color: var(--text); }
.sched-meta { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--muted); }
.sched-foot { display: flex; justify-content: space-between; margin-top: auto; padding-top: 16px; font-size: var(--fs-sm); color: var(--muted); }
.sched-foot strong { color: var(--lime-ink); font-weight: 600; }
.sched-empty { padding: 30px 12px; text-align: center; color: var(--muted); border: 1px dashed var(--border-strong); border-radius: var(--r-lg); font-size: var(--fs-md); }

.funnel-row { margin-bottom: 14px; }
.funnel-top { display: flex; justify-content: space-between; font-size: var(--fs-md); color: var(--text); margin-bottom: 6px; }
.funnel-top span:last-child { color: var(--muted); font-variant-numeric: tabular-nums; }
.funnel-bar { height: 26px; border-radius: 8px; background: var(--surface-3); overflow: hidden; }
.funnel-bar span { display: block; height: 100%; min-width: 6px; border-radius: 8px; background: linear-gradient(90deg, #111 0%, #2f2f2f 100%); }
.funnel-row.won .funnel-bar span { background: linear-gradient(90deg, var(--lime) 0%, #b7d65a 100%); }
.funnel-row.lost .funnel-bar span { background: #e3e3dc; }
.funnel-cta { margin-top: 20px; }

.stream { list-style: none; margin: 0; padding: 0; }
.stream li { border-top: 1px solid var(--border); }
.stream li:first-child { border-top: 0; }
.stream a { display: flex; align-items: center; gap: 16px; padding: 14px 4px; text-decoration: none !important; color: inherit !important; border-radius: var(--r-md); }
.stream a:hover { background: #fbfbf8; }
.stream-icon { display: grid; place-items: center; flex: 0 0 40px; height: 40px; border-radius: 12px; }
.stream-icon .icon { width: 18px; height: 18px; }
.stream-body { flex: 1; min-width: 0; }
.stream-text { font-size: var(--fs-base); color: var(--text); }
.stream-text b { font-weight: 600; }
.stream-meta { display: flex; align-items: center; gap: 10px; margin-top: 5px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.stream-meta .chip { text-transform: none; letter-spacing: 0; font-size: var(--fs-xs); }
.stream-go { display: grid; place-items: center; flex: 0 0 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border); color: var(--muted); }
.stream-go .icon { width: 15px; height: 15px; }

/* =====================  Website content  ===================== */
.btn-icon { min-width: 32px; padding: 0; width: 32px; }
.row-actions form.inline { display: inline-flex; gap: 4px; }
td.nowrap, .row-actions { white-space: nowrap; }
.btn-icon .icon { margin: 0; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.field-error { display: block; margin-top: 5px; color: var(--red); font-size: var(--fs-sm); font-weight: 500; }
label.has-error input, label.has-error textarea, label.has-error select { border-color: #f2a39b; box-shadow: 0 0 0 4px rgba(217, 45, 32, .08); }
.mono-list { font-variant-numeric: tabular-nums; line-height: 1.7; }
.entry-thumb { flex: 0 0 auto; width: 52px; height: 38px; border-radius: 9px; object-fit: cover; background: var(--surface-3); border: 1px solid var(--border); }
.image-field-current { display: flex; align-items: center; gap: 14px; margin: 8px 0 10px; padding: 10px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); }
.image-field-current img { width: 120px; height: 80px; object-fit: cover; border-radius: 9px; background: #fff; }
.image-field-current .check { margin-top: 6px; font-weight: 500; }
label input[type=file] { display: block; margin-top: 8px; font: inherit; font-size: var(--fs-md); color: var(--muted); }

.field-rows { display: flex; flex-direction: column; gap: 10px; }
.field-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: start;
  padding: 14px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface-2);
}
.field-row-handle { display: flex; flex-direction: column; gap: 4px; padding-top: 22px; }
.field-row-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.field-row-extra { margin-top: 12px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: end; }
.field-row-checks { display: flex; gap: 16px; padding-bottom: 10px; white-space: nowrap; }
.field-row > .btn { margin-top: 22px; }
.field-row input[readonly] { background: var(--surface-3); color: var(--muted); }
.code-block { display: block; padding: 10px 12px; font-size: 12px; line-height: 1.6; }
.danger-zone { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; border-color: var(--red-border); }
.danger-zone h2 { font-size: 16px; }
.danger-zone .btn-row > .btn { flex: 0 0 auto; }
.content-summary .btn-row a.chip { text-decoration: none; padding: 5px 12px; font-size: var(--fs-md); }
@media (max-width: 960px) {
  .field-row { grid-template-columns: minmax(0, 1fr) auto; }
  .field-row-handle { display: none; }
  .field-row-grid, .field-row-extra { grid-template-columns: minmax(0, 1fr); }
}

.form-section { padding-top: 18px; margin-top: 4px; border-top: 1px solid var(--border); }
.form-grid > .form-section:first-child { padding-top: 0; margin-top: 0; border-top: 0; }
.form-section h3 { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.form-section .hint { margin-top: 2px; }
.single-form { max-width: 980px; }
.single-form-bar { position: sticky; bottom: 16px; justify-content: space-between; align-items: center; margin: 22px -24px -24px; padding: 14px 24px; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border-radius: 0 0 var(--r-xl) var(--r-xl); }

/* =====================  Sign-in  ===================== */
.auth-body {
  background:
    radial-gradient(700px 400px at 0% 100%, rgba(214, 243, 106, .35), transparent 70%),
    radial-gradient(600px 380px at 100% 0%, rgba(31, 127, 140, .10), transparent 70%),
    var(--bg);
}
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 16px; gap: 16px; }
.auth-side {
  display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  padding: 44px 48px; border-radius: var(--r-xl);
  background: linear-gradient(160deg, #ffffff 0%, #f7f9ee 100%); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.auth-logo { display: block; align-self: flex-start; height: 34px; width: auto; max-width: 100%; object-fit: contain; }
.auth-pitch h2 { font-size: 36px; font-weight: 600; letter-spacing: -.04em; line-height: 1.12; max-width: 460px; }
.auth-features { list-style: none; margin: 30px 0 0; padding: 0; display: grid; gap: 18px; max-width: 440px; }
.auth-features li { display: flex; gap: 14px; align-items: flex-start; }
.auth-features .icon {
  width: 40px; height: 40px; padding: 10px; border-radius: 12px;
  background: var(--lime); color: var(--ink);
}
.auth-features strong { display: block; color: var(--text); font-size: var(--fs-base); font-weight: 600; }
.auth-features span { color: var(--muted); font-size: var(--fs-md); line-height: 1.5; }
.auth-copy { font-size: var(--fs-sm); color: var(--faint); }
.auth-card { align-self: center; justify-self: center; width: min(400px, calc(100vw - 48px)); padding: 40px 0; }
.auth-card h1 { font-size: 30px; font-weight: 600; letter-spacing: -.035em; margin-bottom: 6px; }
.auth-card .lead { color: var(--muted); font-size: var(--fs-base); margin-bottom: 28px; }
.auth-card form > label { margin-bottom: 16px; }
.auth-card input { min-height: 46px; border-radius: 14px; }
.auth-card .btn { min-height: 46px; font-size: 15px; margin-top: 6px; }
.auth-foot { margin-top: 22px; text-align: center; color: var(--muted); font-size: var(--fs-md); }
.auth-foot a { color: var(--text); font-weight: 600; }
.auth-wide { width: min(600px, calc(100vw - 48px)); }

/* =====================  Responsive  ===================== */
@media (max-width: 1280px) {
  .dash-main { grid-template-columns: minmax(0, 1fr); }
  .schedule .sched-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-sidebar { grid-template-columns: minmax(0, 1fr); }
  .dash-bottom { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1100px) {
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .rev-grid { grid-template-columns: minmax(0, 1fr); }
  .rev-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
  .rev-list div { border-top: 0; flex-direction: column; gap: 2px; padding: 0; }
}
@media (max-width: 960px) {
  .app { padding: 10px; }
  .sidebar { top: 0; bottom: 0; left: 0; border-radius: 0 var(--r-xl) var(--r-xl) 0; transform: translateX(-105%); transition: transform .22s ease; }
  .sidebar.open { transform: none; }
  .sidebar-backdrop.open { display: block; position: fixed; inset: 0; background: rgba(21,21,16,.4); z-index: 35; }
  .main { margin-left: 0; }
  .topbar-wrap { margin-top: -10px; padding-top: 10px; }
  .topbar { padding-left: 10px; }
  .menu-toggle { display: inline-grid; }
  .access-grid { grid-template-columns: minmax(0, 1fr); }
  .access-status { align-items: flex-start; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { padding: 28px; gap: 18px; }
  .auth-pitch h2 { font-size: 26px; }
  .auth-features, .auth-copy { display: none; }
  .seg-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .hide-sm { display: none; }
  .pill-btn { padding: 0 12px; }
  .crumbs > span:first-child, .crumb-sep { display: none; }
  .page-hero { margin: 10px 2px 16px; }
  .page-hero h1 { font-size: 26px; }
  .page-subtitle { font-size: var(--fs-md); }
  .grid-4, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .grid { gap: 12px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 18px; border-radius: 18px; }
  .card-flush .card-head { padding: 18px 18px 0; }
  .card-flush > .filters { padding: 16px 18px 0; }
  .detail-list { grid-template-columns: 1fr; gap: 2px 0; }
  .detail-list dd { margin-bottom: 10px; }
  .stat, .kpi { padding: 16px; min-height: 0; }
  .stat-value, .kpi-value { font-size: 24px; }
  .stat-icon-card { padding-right: 16px; }
  .stat-icon { display: none; }
  .kpi-foot { flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 12px; }
  .sparkline { width: 100%; height: 28px; }
  .perf-metrics { grid-template-columns: repeat(2, 1fr); }
  .rev-total { font-size: 36px; }
  .rev-chart { height: 220px; }
  .schedule .sched-list { grid-template-columns: minmax(0, 1fr); }
  .tabs { display: flex; overflow-x: auto; flex-wrap: nowrap; }
}

@media print {
  body { background: #fff; }
  .sidebar, .topbar-wrap, .menu-toggle, .page-hero-actions, .no-print { display: none !important; }
  .app { padding: 0; }
  .main { margin: 0; padding: 0; }
  .page-hero { margin: 0 0 16px; }
  .card { break-inside: avoid; box-shadow: none; }
}
