/* SJ8475 Owner Console — local assets, no external font or image requests. */
:root {
  color-scheme: light;
  --canvas: #f3f6fa;
  --surface: #ffffff;
  --ink: #15243c;
  --body: #34465f;
  --muted: #65748a;
  --line: #dde5ee;
  --line-strong: #bfccdc;
  --blue: #2455cf;
  --blue-hover: #1943ae;
  --blue-soft: #eaf0ff;
  --green: #216746;
  --green-soft: #eaf6ee;
  --amber: #825718;
  --amber-soft: #fff4dc;
  --red: #a5323e;
  --red-soft: #fff0f1;
  --radius: 14px;
  --shadow: 0 5px 22px rgb(22 42 77 / 4%);
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--body);
  font: 400 1rem/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
a { color: var(--blue); text-underline-offset: .19em; }
a:hover { color: var(--blue-hover); }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
button, input, select, textarea, a { touch-action: manipulation; }
button:focus-visible, a:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid #88a8ff;
  outline-offset: 3px;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgb(36 85 207 / 10%);
}
::selection { background: #d9e5ff; color: var(--ink); }
[hidden] { display: none !important; }
.js-only { display: none; }
.js .js-only { display: inline-flex; }
.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;
}
.skip-link {
  position: fixed; top: -5rem; left: 1rem; z-index: 100;
  padding: .65rem 1rem; background: var(--ink); color: white; border-radius: 8px;
}
.skip-link:focus { top: .8rem; color: white; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; }
h1 { margin-bottom: .6rem; font-size: clamp(1.8rem, 3vw, 2.55rem); font-weight: 670; letter-spacing: -.04em; }
h2 { font-size: 1.2rem; font-weight: 650; letter-spacing: -.02em; }
h3 { font-size: 1.05rem; font-weight: 650; }
p { margin-bottom: 1rem; }
small, .small, .help-text, .meta { font-size: .875rem; }
.muted, .help-text, .meta { color: var(--muted); }
.eyebrow {
  display: block; margin-bottom: .7rem; font-size: .875rem;
  font-weight: 650; letter-spacing: .09em; text-transform: uppercase; color: var(--blue);
}
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .9em; overflow-wrap: anywhere; }

/* The sidebar is intentionally light: blue identifies actions and selected views. */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 242px minmax(0, 1fr); }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  padding: 2rem 1.25rem 1.35rem; background: var(--surface); border-right: 1px solid var(--line);
}
.brand {
  display: flex; align-items: center; gap: .8rem; padding: 0 .4rem;
  margin-bottom: 2.65rem; color: var(--ink); text-decoration: none;
}
.brand:hover { color: var(--ink); }
.brand-mark {
  flex: 0 0 auto; display: grid; place-items: center; width: 44px; height: 44px;
  background: var(--ink); color: white; border-radius: 11px; font-size: .96rem;
  font-weight: 700; letter-spacing: -.04em;
}
.brand-name { display: block; color: var(--ink); font-size: 1.25rem; font-weight: 750; line-height: 1.2; letter-spacing: -.045em; }
.brand-caption { display: block; margin-top: .22rem; color: var(--muted); font-size: .875rem; line-height: 1.25; }
.nav-label { margin: 0 .75rem .6rem; font-size: .875rem; color: var(--muted); font-weight: 600; }
.sidebar-nav { display: grid; gap: .35rem; }
.nav-link {
  display: flex; align-items: center; gap: .7rem; min-height: 46px;
  padding: .65rem .85rem; border: 1px solid transparent; border-radius: 9px;
  color: #53637a; font-size: .9375rem; font-weight: 550; text-decoration: none;
}
.nav-link:hover { background: #f5f7fb; color: var(--ink); }
.nav-link.is-active, .nav-link[aria-current="page"] {
  color: var(--blue); border-color: #dce6ff; background: var(--blue-soft); font-weight: 650;
}
.nav-link svg, .nav-icon { flex: 0 0 auto; width: 20px; height: 20px; }
.nav-count {
  margin-left: auto; min-width: 24px; padding: 0 .35rem; border-radius: 6px;
  font-size: .875rem; text-align: center; background: rgb(21 36 60 / 5%);
}
.sidebar-bottom { margin-top: auto; padding: 1.3rem .5rem 0; border-top: 1px solid var(--line); }
.sidebar-note { margin-bottom: 1rem; font-size: .875rem; color: var(--muted); }
.sidebar-bottom .button { width: 100%; }
.sidebar-footer { margin-top: .9rem; font-size: .8125rem; color: var(--muted); }
.workspace { min-width: 0; }
.topbar {
  min-height: 78px; padding: 1.1rem 2.5rem; display: flex; align-items: center;
  justify-content: space-between; gap: 1rem; background: rgb(255 255 255 / 85%); border-bottom: 1px solid var(--line);
}
.topbar-title { color: var(--ink); font-size: .9375rem; font-weight: 600; }
.topbar-context, .topbar-meta { color: var(--muted); font-size: .875rem; }
.topbar-actions { display: flex; align-items: center; gap: .85rem; }
.owner-badge {
  display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .65rem;
  border-radius: 6px; background: #f0f4fa; color: #4c617d; font-size: .875rem; font-weight: 550;
}
.main, .main-content { max-width: 1540px; margin: 0 auto; padding: 2.4rem 2.5rem 3rem; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.8rem; }
.page-heading p { max-width: 680px; margin-bottom: 0; color: var(--muted); }
.page-heading .button { flex: 0 0 auto; margin-top: .15rem; }
.view-heading { margin-bottom: 1.8rem; }
[data-view] { scroll-margin-top: 1.5rem; }
[data-view] + [data-view] { margin-top: 2.5rem; }
.js [data-view] + [data-view] { margin-top: 0; }

/* Metrics are facts from the database, not simulated activity. */
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 0 0 1.6rem; }
.metric-card { display: flex; flex-direction: column; align-items: flex-start; padding: 1.3rem 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.metric-label { margin: 0 0 .65rem; font-size: .9375rem; font-weight: 550; color: var(--muted); }
.metric-value { color: var(--ink); font-size: 2.2rem; line-height: 1.15; letter-spacing: -.055em; font-weight: 650; }
.metric-detail { margin-top: .6rem; color: var(--muted); font-size: .875rem; }
.metric-card.is-accent { border-color: #cbdafe; background: #f7f9ff; }
.metric-card.is-accent .metric-value { color: var(--blue); }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, 1fr); align-items: start; gap: 1.5rem; }
.stack { display: grid; gap: 1.5rem; }
.panel { margin-bottom: 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.stack .panel, .content-grid > .panel { margin-bottom: 0; }
.panel-header {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.2rem 1.5rem; border-bottom: 1px solid var(--line);
}
.panel-header h2, .panel-header h3 { margin-bottom: 0; }
.panel-header p { margin: .3rem 0 0; font-size: .875rem; color: var(--muted); }
.panel-body { padding: 1.4rem 1.5rem; }
.panel-body > :last-child { margin-bottom: 0; }
.panel-footer { padding: .9rem 1.5rem; border-top: 1px solid var(--line); font-size: .875rem; color: var(--muted); }
.section-link { flex-shrink: 0; font-size: .875rem; font-weight: 600; text-decoration: none; }
.section-link:hover { text-decoration: underline; }
.toolbar { display: flex; align-items: flex-end; gap: .8rem; flex-wrap: wrap; padding: 1.15rem 1.5rem; border-bottom: 1px solid var(--line); }
.search-field { flex: 1 1 260px; }
.search-field input { width: 100%; }
.filter-field { flex: 0 1 190px; }
.filter-field select { width: 100%; }
.toolbar label { display: block; margin-bottom: .35rem; font-size: .875rem; font-weight: 600; color: var(--body); }
.filter-count { margin-left: auto; align-self: center; font-size: .875rem; color: var(--muted); white-space: nowrap; }
.table-wrap { overflow-x: auto; }
.site-table { width: 100%; border-collapse: collapse; text-align: left; }
.site-table th {
  padding: .8rem 1.25rem; background: #fafbfd; border-bottom: 1px solid var(--line);
  color: var(--muted); font-size: .875rem; font-weight: 600; white-space: nowrap;
}
.site-table td { padding: 1.1rem 1.25rem; border-bottom: 1px solid #eaf0f5; vertical-align: middle; font-size: .9375rem; }
.site-table tbody tr:last-child td { border-bottom: 0; }
.site-table tbody tr:hover { background: #fbfcff; }
.site-name { display: block; color: var(--ink); font-weight: 650; font-size: 1rem; text-decoration: none; }
a.site-name:hover { color: var(--blue); }
.site-domain { display: block; margin-top: .2rem; color: var(--muted); font-size: .875rem; overflow-wrap: anywhere; text-decoration: none; }
a.site-domain:hover { color: var(--blue); text-decoration: underline; }
.site-description { max-width: 30rem; color: var(--muted); font-size: .875rem; }
.site-icon {
  width: 38px; height: 38px; display: inline-grid; place-items: center; flex: 0 0 auto;
  border-radius: 9px; background: #f0f4fb; border: 1px solid #e0e8f5; color: #496389;
  font-size: .875rem; font-weight: 650;
}
.site-identity { display: flex; align-items: center; gap: .8rem; }
.row-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.status {
  display: inline-flex; align-items: center; padding: .22rem .58rem; border-radius: 5px;
  font-size: .875rem; line-height: 1.4; font-weight: 550; white-space: nowrap;
  background: #f0f3f7; color: #5b6c83;
}
.status-active, .status-complete, .status-verified { background: var(--green-soft); color: var(--green); }
.status-review, .status-pending { background: var(--amber-soft); color: var(--amber); }
.status-archived, .status-unverified, .status-unknown { background: #f0f3f7; color: #5b6c83; }
.status-draft, .status-planned { background: var(--blue-soft); color: var(--blue); }
.status-error, .status-blocked { background: var(--red-soft); color: var(--red); }
.status-help { display: block; margin-top: .3rem; color: var(--muted); font-size: .8125rem; }
.empty-state { padding: 2.5rem 1.5rem; text-align: center; color: var(--muted); }
.empty-state h3 { margin-bottom: .5rem; }
.empty-state p { max-width: 410px; margin-left: auto; margin-right: auto; }
.empty-state p:last-child { margin-bottom: 0; }
.empty-symbol { display: grid; place-items: center; width: 44px; height: 44px; margin: 0 auto 1rem; border-radius: 11px; background: #f0f4fb; color: var(--blue); font-weight: 650; }
.compact-list { list-style: none; padding: 0; margin: 0; }
.compact-list li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.5rem; border-bottom: 1px solid #eaf0f5; }
.compact-list li:last-child { border: 0; }

/* Attention queue. Status and priority are always written in text. */
.task-list { list-style: none; margin: 0; padding: 0; }
.task-item { position: relative; display: flex; align-items: flex-start; gap: .85rem; padding: 1.2rem 1.5rem; border-bottom: 1px solid #eaf0f5; }
.task-item:last-child { border-bottom: 0; }
.task-marker { flex: 0 0 auto; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; color: var(--blue); background: var(--blue-soft); font-size: .875rem; font-weight: 700; }
.task-content { flex: 1; min-width: 0; }
.task-title { color: var(--ink); margin: 0 0 .35rem; font-size: 1rem; font-weight: 600; }
.task-description { color: var(--muted); font-size: .9375rem; margin: 0 0 .7rem; white-space: pre-line; overflow-wrap: anywhere; }
.task-meta { display: flex; align-items: center; gap: .5rem .8rem; flex-wrap: wrap; color: var(--muted); font-size: .875rem; }
.task-actions { display: flex; align-items: center; gap: .5rem; margin-top: .8rem; flex-wrap: wrap; }
.task-item > .task-actions { flex: 0 0 auto; margin-top: 0; }
.task-item.is-complete .task-title { color: var(--muted); }
.task-item.is-complete .task-marker { color: var(--green); background: var(--green-soft); }
.priority { display: inline-block; color: var(--muted); font-size: .875rem; font-weight: 550; }
.priority-high, .task-priority--high { color: var(--red); }
.priority-medium, .task-priority--medium { color: var(--amber); }
.priority-normal, .task-priority--normal { color: #536b8a; }
.priority-low, .task-priority--low { color: #476486; }
.connection-note { border-left: 3px solid #a9bff7; padding: .15rem 0 .15rem 1rem; color: var(--muted); font-size: .9375rem; }
.connection-note strong { color: var(--ink); }
.connection-note p { margin: 0 0 .6rem; }
.connection-note p:last-child { margin: 0; }
.detail-list { display: grid; grid-template-columns: minmax(110px, .5fr) minmax(0, 1fr); margin: 0; font-size: .9375rem; }
.detail-list dt, .detail-list dd { padding: .6rem 0; border-bottom: 1px solid #edf1f6; }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.detail-list dt:last-of-type, .detail-list dd:last-of-type { border-bottom: 0; }

/* Controls are complete native form controls and remain usable without JS. */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 42px; padding: .6rem .95rem; border: 1px solid var(--line-strong);
  border-radius: 8px; background: white; color: var(--ink);
  font-size: .9375rem; font-weight: 600; line-height: 1.3; text-decoration: none;
  transition: background-color .15s, border-color .15s, box-shadow .15s;
}
.button:hover { color: var(--ink); background: #f6f8fc; border-color: #97aac3; }
.button-primary { background: var(--blue); border-color: var(--blue); color: white; box-shadow: 0 2px 4px rgb(36 85 207 / 10%); }
.button-primary:hover { color: white; background: var(--blue-hover); border-color: var(--blue-hover); }
.button-secondary { background: white; border-color: var(--line-strong); color: var(--ink); }
.button-quiet { padding-left: .6rem; padding-right: .6rem; border-color: transparent; background: transparent; color: var(--blue); }
.button-quiet:hover { border-color: transparent; background: var(--blue-soft); color: var(--blue-hover); }
.button-danger { border-color: #e8bdc3; background: white; color: var(--red); }
.button-danger:hover { border-color: var(--red); background: var(--red-soft); color: var(--red); }
.button-small { min-height: 36px; padding: .42rem .68rem; font-size: .875rem; }
.button-block { width: 100%; }
.button svg { width: 18px; height: 18px; flex: 0 0 auto; }
.icon-button { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted); font-size: 1.5rem; line-height: 1; }
.icon-button:hover { background: #f0f3f8; color: var(--ink); }
.inline-form { display: inline; margin: 0; }
.field { margin-bottom: 1.15rem; min-width: 0; }
.field label { display: block; margin-bottom: .4rem; color: var(--ink); font-size: .9375rem; font-weight: 600; }
.field label .optional { font-weight: 400; color: var(--muted); font-size: .875rem; }
.field input:not([type="checkbox"]):not([type="radio"]), .field select, .field textarea,
.toolbar input, .toolbar select {
  width: 100%; min-height: 44px; padding: .65rem .8rem; border: 1px solid var(--line-strong);
  border-radius: 8px; background: white; color: var(--ink); outline: none; font-size: 1rem;
}
.field textarea { min-height: 110px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #78869a; opacity: 1; }
select {
  appearance: none; padding-right: 2.4rem !important;
  /* CSS-only chevron also works with the application's strict img-src policy. */
  background-image: linear-gradient(45deg, transparent 50%, #53637a 50%), linear-gradient(135deg, #53637a 50%, transparent 50%) !important;
  background-repeat: no-repeat !important;
  background-position: right 1.05rem center, right .75rem center !important;
  background-size: 5px 5px, 5px 5px !important;
}
.field .help-text { display: block; margin: .4rem 0 0; }
.field-error { color: var(--red); font-size: .875rem; margin: .4rem 0 0; }
[aria-invalid="true"] { border-color: var(--red) !important; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1rem; }
.field-full { grid-column: 1 / -1; }
.checkbox-field { display: flex; align-items: flex-start; gap: .65rem; color: var(--body); font-size: .9375rem; }
.checkbox-field input { width: 18px; height: 18px; margin-top: .2rem; accent-color: var(--blue); }
.checkbox-field label { margin: 0; font-weight: 400; }
.form-actions { display: flex; justify-content: flex-end; align-items: center; gap: .65rem; flex-wrap: wrap; margin-top: 1.3rem; }
.form-panel { max-width: 1040px; }
.form-panel .panel-header { align-items: center; }
.form-panel h1 { margin: 0; font-size: clamp(1.35rem, 2.5vw, 1.75rem); letter-spacing: -.03em; }
.form-panel .panel-body { padding-top: 1.65rem; }
.form-panel .form-actions { margin-top: .5rem; padding-top: 1.3rem; border-top: 1px solid var(--line); }
.form-panel .form-actions .button { min-width: 140px; }
.form-divider { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }
.alert { margin-bottom: 1.25rem; padding: .9rem 1.1rem; border: 1px solid #cbdafe; border-radius: 9px; color: #2a4f8e; background: #eff4ff; font-size: .9375rem; }
.alert p:last-child { margin-bottom: 0; }
.alert-success { background: var(--green-soft); border-color: #c8e5d2; color: var(--green); }
.alert-error { background: var(--red-soft); border-color: #f0ccd1; color: var(--red); }
.alert-warning { background: var(--amber-soft); border-color: #ebd9ad; color: #78551d; }
.alert ul { margin-top: .4rem; margin-bottom: 0; padding-left: 1.2rem; }

/* Native dialogs retain escape dismissal and the browser's focus management. */
dialog {
  width: min(620px, calc(100% - 2rem)); max-height: calc(100dvh - 3rem);
  margin: auto; padding: 0; border: 1px solid var(--line); border-radius: 16px;
  background: white; color: var(--body); box-shadow: 0 24px 100px rgb(15 30 55 / 24%);
}
dialog::backdrop { background: rgb(15 30 55 / 40%); backdrop-filter: blur(3px); }
.dialog-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: 1.4rem 1.5rem 1.2rem; border-bottom: 1px solid var(--line); }
.dialog-header h2 { margin-bottom: .35rem; font-size: 1.35rem; }
.dialog-header p { margin: 0; font-size: .9375rem; color: var(--muted); }
.dialog-body { padding: 1.4rem 1.5rem 1.6rem; }
.dialog-body > :last-child { margin-bottom: 0; }
.dialog-body .form-actions { margin-bottom: 0; padding-top: .3rem; }
.dialog-wide { width: min(760px, calc(100% - 2rem)); }
.noscript-note { display: block; padding: .7rem 1rem; color: var(--muted); font-size: .875rem; border-bottom: 1px solid var(--line); }

/* The signed-out page exposes no portfolio or personal information. */
.auth-page {
  min-height: 100vh; min-height: 100dvh;
  background: radial-gradient(ellipse at 20% 10%, #e9effc 0, transparent 43%), #f4f7fb;
}
.auth-shell { max-width: 460px; margin: 0 auto; padding: clamp(3rem, 10vh, 7rem) 1.25rem 2rem; }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: .8rem; margin-bottom: 2rem; }
.auth-brand .brand-mark { width: 48px; height: 48px; }
.auth-card { padding: 2rem; background: white; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 16px 50px rgb(25 52 92 / 6%); }
.auth-heading { margin-bottom: 1.6rem; }
.auth-heading h1 { margin-bottom: .55rem; font-size: 1.7rem; letter-spacing: -.035em; }
.auth-heading p { margin-bottom: 0; color: var(--muted); font-size: .9375rem; }
h1.auth-heading { margin-bottom: .65rem; font-size: 1.7rem; letter-spacing: -.035em; }
h1.auth-heading + p { margin-bottom: 1.6rem; color: var(--muted); font-size: .9375rem; }
.auth-card .button-block { margin-top: .3rem; min-height: 46px; }
.auth-note { margin: 1.5rem 0 0; padding-top: 1.1rem; border-top: 1px solid var(--line); font-size: .875rem; color: var(--muted); text-align: center; }
.auth-footer { margin: 1.5rem 0 0; text-align: center; color: var(--muted); font-size: .875rem; }
.auth-lock { display: inline-flex; align-items: center; gap: .4rem; }
.auth-lock svg { width: 15px; height: 15px; }
.password-wrap { display: flex; gap: .4rem; align-items: stretch; }
.password-wrap input { min-width: 0; flex: 1; }
.password-wrap .button { flex: 0 0 auto; }
.footer-note { margin-top: 1.5rem; color: var(--muted); font-size: .875rem; }

@media (min-width: 1700px) {
  .app-shell { grid-template-columns: 266px minmax(0, 1fr); }
  .sidebar { padding-left: 1.65rem; padding-right: 1.65rem; }
}
@media (max-width: 1180px) {
  .app-shell { grid-template-columns: 216px minmax(0, 1fr); }
  .sidebar { padding-left: 1rem; padding-right: 1rem; }
  .topbar { padding-left: 1.6rem; padding-right: 1.6rem; }
  .main, .main-content { padding-left: 1.6rem; padding-right: 1.6rem; }
  .content-grid { grid-template-columns: minmax(0, 1fr); }
  .site-table td, .site-table th { padding-left: 1rem; padding-right: 1rem; }
}
@media (max-width: 850px) {
  .app-shell { display: block; }
  .sidebar { position: static; height: auto; padding: 1.15rem 1.25rem .9rem; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar .brand { margin-bottom: 1.1rem; padding: 0; }
  .sidebar .brand-mark { width: 38px; height: 38px; }
  .sidebar .brand-caption { display: none; }
  .nav-label { display: none; }
  .sidebar-nav { display: flex; gap: .4rem; overflow-x: auto; }
  .nav-link { min-height: 42px; padding: .5rem .8rem; flex: 0 0 auto; }
  .sidebar-bottom { display: none; }
  .topbar { min-height: 60px; padding: .85rem 1.25rem; }
  .main, .main-content { padding: 1.7rem 1.25rem 2.5rem; }
  .metric-card { padding: 1.15rem; }
  .metric-value { font-size: 2rem; }
  .panel-header, .panel-body { padding-left: 1.2rem; padding-right: 1.2rem; }
}
@media (max-width: 560px) {
  .sidebar { padding-left: 1rem; padding-right: 1rem; }
  .nav-link { gap: .45rem; font-size: .875rem; padding-left: .6rem; padding-right: .6rem; }
  .nav-link svg { width: 17px; height: 17px; }
  .nav-count { display: none; }
  .topbar { padding-left: 1rem; padding-right: 1rem; }
  .topbar-context { display: none; }
  .main, .main-content { padding: 1.5rem 1rem 2rem; }
  .page-heading { display: block; }
  .page-heading .button { margin-top: 1rem; }
  .metric-grid { gap: .6rem; }
  .metric-card { padding: .9rem .7rem; border-radius: 10px; }
  .metric-label { font-size: .875rem; line-height: 1.4; min-height: 2.8em; }
  .metric-value { font-size: 1.8rem; }
  .metric-detail { font-size: .875rem; line-height: 1.4; }
  .panel-header { padding: 1rem; }
  .panel-header h2 { font-size: 1.1rem; }
  .panel-body { padding: 1.1rem 1rem; }
  .panel-footer { padding: .9rem 1rem; }
  .toolbar { padding: 1rem; }
  .search-field, .filter-field { flex-basis: 100%; }
  .filter-count { margin-left: 0; }
  .task-item { padding: 1.1rem 1rem; gap: .7rem; flex-wrap: wrap; }
  .task-item > .task-actions { margin-left: 2.6rem; }
  .task-description { font-size: .9375rem; }
  .field-grid { grid-template-columns: minmax(0, 1fr); }
  .field-full { grid-column: auto; }
  .dialog-header { padding: 1.15rem 1.1rem; }
  .dialog-body { padding: 1.1rem; }
  .form-actions .button { flex: 1; }
  .auth-shell { padding-top: 2.5rem; }
  .auth-card { padding: 1.5rem; }
  .auth-heading h1 { font-size: 1.55rem; }
  h1.auth-heading { font-size: 1.55rem; }
  .compact-list li { padding-left: 1rem; padding-right: 1rem; }
  .form-panel .panel-header { align-items: flex-start; }
  .form-panel .panel-header .button { min-height: 38px; }
  .site-table, .site-table tbody { display: block; }
  .site-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .site-table tr[data-site-row] { display: grid; grid-template-columns: minmax(0, 1fr); gap: .65rem; padding: 1rem; border-bottom: 1px solid var(--line); }
  .site-table tr[data-site-row]:last-of-type { border-bottom: 0; }
  .site-table td { display: block; padding: 0; border: 0; }
  .site-table td:nth-child(2) { padding-left: calc(38px + .8rem); }
  .site-table td:nth-child(3) { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; padding-left: calc(38px + .8rem); }
  .site-table td:nth-child(3) .status-help { margin: 0; }
  .site-table td:last-child { padding-left: calc(38px + .8rem); }
  .site-table .site-description { font-size: .875rem; }
  .site-table .row-actions { gap: .4rem; }
  .site-table .row-actions .button { min-height: 40px; padding: .48rem .65rem; font-size: .875rem; }
  .site-table [data-filter-empty] td { padding: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  body { background: white; color: black; }
  .app-shell { display: block; }
  .sidebar, .topbar-actions, .row-actions, .task-actions, .toolbar, .js-only, dialog { display: none !important; }
  .topbar { padding: 0 0 1rem; }
  .main, .main-content { padding: 1rem 0; }
  .panel, .metric-card { box-shadow: none; break-inside: avoid; }
  a { color: inherit; }
}
