:root {
  --bg: #f4f6f9;
  --panel: #ffffff;
  --panel-soft: #f8f9fc;
  --sidebar: #353a3f;
  --sidebar-soft: #41474d;
  --text: #343a40;
  --muted: #8393a3;
  --line: #e7ebf0;
  --violet: #6f66e6;
  --violet-soft: #efedff;
  --blue: #4285e5;
  --green: #25a679;
  --amber: #d99423;
  --red: #dc5b67;
  --shadow: 0 10px 35px rgba(43, 52, 69, .07);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; }
body { margin: 0; min-height: 100vh; background: var(--bg); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--violet); text-decoration: none; }
[hidden] { display: none !important; }

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 20; width: 240px;
  display: flex; flex-direction: column; background: var(--sidebar); color: #fff;
}
.sidebar-brand {
  height: 72px; display: flex; align-items: center; gap: 13px; padding: 0 28px;
  color: #fff; font-size: 18px; letter-spacing: -.2px; border-bottom: 1px solid rgba(255,255,255,.06);
}
.sidebar-brand img { width: 32px; height: 32px; }
.sidebar-brand b { font-weight: 750; }
.sidebar-nav { padding: 24px 14px; display: grid; gap: 6px; }
.nav-item {
  min-height: 46px; display: flex; align-items: center; gap: 13px; padding: 0 14px;
  border-radius: 10px; color: #c6ced5; font-size: 14px; font-weight: 600; transition: .16s ease;
}
.nav-item:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav-item.active { color: #fff; background: var(--violet); box-shadow: 0 8px 24px rgba(42,34,122,.22); }
.nav-icon { width: 22px; text-align: center; font-size: 17px; font-weight: 800; }
.sidebar-foot {
  margin-top: auto; padding: 18px 24px 24px; display: flex; align-items: center; gap: 10px;
  color: #d9dee3; border-top: 1px solid rgba(255,255,255,.06);
}
.sidebar-foot div { display: grid; gap: 2px; }
.sidebar-foot strong { font-size: 12px; }
.sidebar-foot small { color: #8f9aa5; font-size: 11px; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #3fd29c; box-shadow: 0 0 0 5px rgba(63,210,156,.11); }

.workspace { min-height: 100vh; margin-left: 240px; }
.topbar {
  height: 72px; padding: 0 34px; display: flex; align-items: center; justify-content: space-between;
  background: rgba(255,255,255,.95); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 12;
  backdrop-filter: blur(15px);
}
.topbar h1 { margin: 1px 0 0; font-size: 20px; line-height: 1.2; letter-spacing: -.35px; }
.eyebrow { margin: 0; color: var(--violet); font-size: 10px; text-transform: uppercase; letter-spacing: 1.3px; font-weight: 800; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.identity { display: grid; gap: 2px; text-align: right; }
.identity strong { font-size: 11px; }
.identity small { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .4px; }
.health-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px;
  color: #73808d; background: #f1f4f7; font-size: 11px; font-weight: 700;
}
.health-badge span { width: 7px; height: 7px; border-radius: 50%; background: #aab5bf; }
.health-badge.ready { color: #1b8762; background: #e9f8f2; }
.health-badge.ready span { background: #25a679; box-shadow: 0 0 0 4px rgba(37,166,121,.1); }
.health-badge.degraded { color: #a36712; background: #fff5df; }
.health-badge.degraded span { background: var(--amber); }
.user-chip {
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px;
  color: #fff; background: linear-gradient(145deg, #8279ef, #5a51cd); font-size: 13px; font-weight: 800;
}
.icon-button {
  width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line);
  border-radius: 10px; color: #72808d; background: #fff; cursor: pointer; transition: .16s ease;
}
.icon-button:hover { color: var(--violet); border-color: #cec9ff; background: #f8f7ff; }

.content { width: min(1500px, 100%); margin: 0 auto; padding: 34px; }
.hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 0 0 24px; }
.hero-row h2 { margin: 0 0 7px; font-size: 24px; letter-spacing: -.55px; }
.hero-row p { margin: 0; color: var(--muted); font-size: 14px; }
.button {
  min-height: 40px; padding: 0 18px; border: 0; border-radius: 10px; font-size: 13px; font-weight: 750;
  cursor: pointer; transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.button-primary { color: #fff; background: var(--violet); box-shadow: 0 8px 22px rgba(111,102,230,.22); }
.button-primary:hover { background: #6259da; }
.button-secondary { color: #5e5a95; background: var(--violet-soft); }
.button-secondary:hover { background: #e5e1ff; }
.button-ghost { color: #66727e; background: #f1f4f7; }
.button-ghost:hover { background: #e7ebef; }
.button-danger { color: #b54450; background: #ffeaed; }
.button-danger:hover { background: #ffdde1; }
.button-wide { width: 100%; }
.button-small { min-height: 34px; padding: 0 12px; font-size: 11px; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card {
  position: relative; overflow: hidden; min-height: 136px; display: flex; flex-direction: column; justify-content: center;
  padding: 22px 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); box-shadow: var(--shadow);
}
.stat-card::after { content: ""; position: absolute; top: 0; right: 0; width: 5px; height: 100%; background: var(--accent); }
.stat-card::before { content: ""; position: absolute; width: 90px; height: 90px; right: -30px; top: -35px; border-radius: 50%; background: var(--accent-soft); }
.stat-card span { color: var(--muted); font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .6px; }
.stat-card strong { margin: 8px 0 5px; font-size: 31px; line-height: 1; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.stat-card small { color: #9ba8b4; font-size: 11px; }
.accent-violet { --accent: var(--violet); --accent-soft: #f0eeff; }
.accent-blue { --accent: var(--blue); --accent-soft: #eaf3ff; }
.accent-amber { --accent: var(--amber); --accent-soft: #fff4df; }
.accent-green { --accent: var(--green); --accent-soft: #e6f7f1; }

.panel { border: 1px solid var(--line); border-radius: 15px; background: var(--panel); box-shadow: var(--shadow); overflow: hidden; }
.app-view { animation: view-in .18s ease; }
.app-view[hidden] { display: none; }
@keyframes view-in { from { opacity: .3; transform: translateY(4px); } }
.admin-panel + .admin-panel { margin-top: 20px; }
.panel-head { min-height: 84px; padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 0 0 4px; font-size: 16px; letter-spacing: -.2px; }
.panel-head p { margin: 0; color: var(--muted); font-size: 11px; }
.search-field {
  width: 250px; min-height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 10px; color: #9aa6b1; background: #fbfcfd;
}
.search-field input { width: 100%; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 12px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { padding: 13px 20px; color: #97a4b0; background: #fafbfc; text-align: left; text-transform: uppercase; letter-spacing: .5px; font-size: 9px; font-weight: 800; white-space: nowrap; }
td { padding: 17px 20px; border-top: 1px solid #eef1f4; color: #5d6975; vertical-align: middle; }
tbody tr { transition: background .12s ease; }
tbody tr[data-badge] { cursor: pointer; }
tbody tr[data-badge]:hover { background: #fbfaff; }
.badge-cell { display: flex; align-items: center; gap: 11px; }
.badge-avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: #5f56d4; background: var(--violet-soft); font-weight: 800; }
.badge-cell strong { display: block; color: var(--text); font-size: 12px; }
.badge-cell small { display: block; max-width: 215px; margin-top: 3px; overflow: hidden; color: #a2adb7; font-size: 9px; text-overflow: ellipsis; }
.number { color: var(--text); font-variant-numeric: tabular-nums; font-weight: 700; }
.muted-value { color: #788591; font-size: 10px; }
.cell-sub { display: block; margin-top: 4px; color: #9aa6b1; font-size: 9px; font-weight: 500; }
.table-actions { display: flex; justify-content: flex-end; gap: 6px; min-width: 330px; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 999px; font-size: 10px; font-weight: 750; white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-idle { color: #7d8994; background: #f0f2f4; }
.status-queued, .status-processing, .status-dcp_running { color: #9a650f; background: #fff4dc; }
.status-completed { color: #208563; background: #e6f7f1; }
.status-failed { color: #bd4a55; background: #ffebed; }
.row-action { color: var(--violet); font-weight: 800; }
.empty-state { padding: 70px 24px; text-align: center; }
.empty-icon { width: 52px; height: 52px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 16px; color: var(--violet); background: var(--violet-soft); font-size: 24px; }
.empty-state h3 { margin: 0 0 7px; font-size: 15px; }
.empty-state p { margin: 0; color: var(--muted); font-size: 12px; }
.skeleton-row { height: 42px; border-radius: 9px; background: linear-gradient(90deg,#f3f5f7 25%,#fafbfc 50%,#f3f5f7 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.footer { padding: 27px 0 0; color: #9ba7b1; text-align: center; font-size: 10px; }

.drawer-backdrop { position: fixed; inset: 0; z-index: 30; background: rgba(28,32,36,.28); backdrop-filter: blur(2px); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 31; width: min(780px, 100vw); transform: translateX(102%); background: #fff; box-shadow: -20px 0 70px rgba(33,39,47,.16); transition: transform .24s ease; }
.drawer.open { transform: translateX(0); }
.drawer-head { height: 82px; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 4px 0 0; font-size: 18px; }
.drawer-body { height: calc(100vh - 82px); overflow-y: auto; padding: 22px 24px 40px; }
.drawer-loading { padding: 50px; color: var(--muted); text-align: center; }
.detail-meta { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-bottom: 22px; }
.detail-meta div { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-soft); }
.detail-meta span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .5px; }
.detail-meta strong { display: block; overflow-wrap: anywhere; font-size: 11px; }
.drawer-section { margin-top: 24px; }
.drawer-section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.drawer-section h3 { margin: 0; font-size: 13px; }
.file-list, .analysis-list { display: grid; gap: 8px; }
.file-row, .analysis-card { padding: 13px 14px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.file-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; }
.file-row strong { overflow: hidden; color: #4a5661; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.file-row span { color: var(--muted); font-size: 10px; }
.analysis-card { cursor: default; transition: .14s ease; }
.analysis-card:hover { border-color: #d5d1ff; background: #fbfaff; }
.analysis-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.analysis-card small { color: var(--muted); }
.analysis-result { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.analysis-result h4 { margin: 0 0 8px; font-size: 11px; }
.analysis-result pre { max-height: 280px; overflow: auto; margin: 0; padding: 12px; border-radius: 9px; color: #46535e; background: #f6f7f9; white-space: pre-wrap; font: 11px/1.55 inherit; }
.analysis-card details { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.analysis-card summary { color: #4d5964; cursor: pointer; font-size: 11px; font-weight: 800; }
.analysis-card details pre { max-height: 390px; overflow: auto; margin: 10px 0 0; padding: 13px; border-radius: 9px; color: #46535e; background: #f6f7f9; white-space: pre-wrap; overflow-wrap: anywhere; font: 11px/1.58 inherit; }
.processing-summary { margin-top: 11px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.processing-summary span { color: #4b5661; font-size: 11px; font-weight: 750; }
.processing-summary small { overflow-wrap: anywhere; text-align: right; }
.request-attribution { margin-top: 7px; color: var(--muted); font-size: 9px; }
.snapshot-grid { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 5px 12px; margin-top: 10px; font-size: 10px; }
.snapshot-grid span { color: var(--muted); }
.download-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.download-row .button { display: inline-flex; align-items: center; }
.template-assignment { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-soft); }
.template-assignment > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.template-assignment span { color: var(--muted); font-size: 10px; font-weight: 750; }
.compact-select { max-width: 360px; min-height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; color: var(--text); background: #fff; font-size: 11px; }
.error-text { margin-top: 8px; color: var(--red); font-size: 10px; overflow-wrap: anywhere; }
.toast { position: fixed; left: 50%; bottom: 25px; z-index: 50; max-width: min(460px,calc(100vw - 30px)); padding: 12px 17px; border-radius: 10px; color: #fff; background: #343a40; box-shadow: 0 12px 35px rgba(0,0,0,.2); font-size: 12px; opacity: 0; pointer-events: none; transform: translate(-50%,12px); transition: .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%,0); }

.auth-page { display: grid; place-items: center; padding: 24px; background: #eef1f5; }
.auth-card { width: min(410px,100%); padding: 28px 30px 30px; border: 1px solid #e4e8ed; border-radius: 16px; background: #fff; box-shadow: 0 18px 60px rgba(42,50,62,.09); }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 17px; }
.auth-brand img { width: 32px; height: 32px; }
.auth-heading { margin: 30px 0 22px; text-align: center; }
.auth-heading h1 { margin: 7px 0; font-size: 22px; letter-spacing: -.5px; }
.auth-heading > p:last-child { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.auth-form { display: grid; gap: 14px; }
.auth-form label { display: grid; gap: 7px; color: #65727e; font-size: 11px; font-weight: 750; }
.auth-form input { height: 50px; width: 100%; padding: 0 14px; border: 2px solid #e4eaf0; border-radius: 11px; outline: 0; color: var(--text); background: #fff; }
.auth-form input:focus { border-color: var(--violet); }
.auth-form .button { margin-top: 4px; min-height: 48px; }
.auth-note { margin: 20px 0 0; color: #a1adb8; text-align: center; font-size: 10px; }
.alert { margin-bottom: 15px; padding: 11px 13px; border-radius: 9px; font-size: 11px; }
.alert-error { color: #a83b47; background: #ffedef; border: 1px solid #ffd8dc; }
.alert-warning { color: #835b17; background: #fff6df; border: 1px solid #f6e5b9; line-height: 1.5; }

.card-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; padding: 20px; }
.template-card { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.template-card.disabled { opacity: .62; }
.template-card-head { display: flex; justify-content: space-between; gap: 14px; }
.template-card h3, .model-group h3, .guide-step h3 { margin: 0; font-size: 13px; }
.template-card p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.template-card pre { height: 92px; overflow: hidden; margin: 13px 0; padding: 11px; border-radius: 9px; color: #596571; background: #f6f7f9; white-space: pre-wrap; overflow-wrap: anywhere; font: 10px/1.5 inherit; }
.template-models { margin-top: 14px; display: flex; align-items: center; gap: 7px; color: #687581; font-size: 10px; }
.template-models span { padding: 5px 7px; border-radius: 7px; background: var(--violet-soft); }
.card-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pill { display: inline-flex; padding: 5px 8px; border-radius: 999px; color: #5a51c8; background: var(--violet-soft); font-size: 9px; font-weight: 800; white-space: nowrap; }
.model-groups { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; padding: 20px; }
.model-group { min-width: 0; display: grid; align-content: start; gap: 8px; }
.model-group > h3 { margin-bottom: 4px; }
.model-row { min-height: 62px; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--line); border-radius: 10px; }
.model-row > div:first-child { min-width: 0; }
.model-row strong { display: block; font-size: 11px; }
.model-row small { display: block; max-width: 190px; margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; }
.model-actions { display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
.empty-inline { padding: 30px; color: var(--muted); text-align: center; font-size: 11px; }

.guide-grid { display: grid; gap: 0; padding: 8px 22px 22px; }
.guide-step { display: grid; grid-template-columns: 28px minmax(0,1fr); gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.guide-step:last-child { border-bottom: 0; }
.guide-step > span { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; color: #fff; background: var(--violet); font-size: 10px; font-weight: 800; }
.guide-step p { margin: 7px 0; color: var(--muted); font-size: 10px; }
.guide-step pre { overflow-x: auto; margin: 8px 0 0; padding: 12px; border-radius: 9px; color: #3d4954; background: #f5f7f9; white-space: pre-wrap; font: 10px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; }
.copy-link { margin-top: 8px; padding: 0; border: 0; color: var(--violet); background: none; cursor: pointer; font-size: 10px; font-weight: 800; }

.modal-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(28,32,36,.38); backdrop-filter: blur(3px); }
.modal { position: fixed; top: 50%; left: 50%; z-index: 41; width: min(520px,calc(100vw - 28px)); max-height: calc(100vh - 36px); overflow: auto; transform: translate(-50%,-48%); border-radius: 16px; background: #fff; box-shadow: 0 25px 90px rgba(28,33,40,.28); animation: modal-in .16s ease forwards; }
.modal-wide { width: min(820px,calc(100vw - 28px)); }
@keyframes modal-in { to { transform: translate(-50%,-50%); } }
.modal-head { min-height: 76px; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 4px 0 0; font-size: 17px; }
.modal-body { padding: 20px; }
.form-grid { display: grid; gap: 15px; }
.form-grid.two-column { grid-template-columns: repeat(2,minmax(0,1fr)); }
.field { display: grid; gap: 7px; color: #67737f; font-size: 10px; font-weight: 750; }
.field input:not([type="checkbox"]), .field select, .field textarea { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid #dfe5ea; border-radius: 9px; outline: none; color: var(--text); background: #fff; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(111,102,230,.09); }
.field-full { grid-column: 1 / -1; }
.checkbox-field { display: flex; align-items: center; align-self: end; min-height: 42px; grid-template-columns: auto 1fr; }
.checkbox-field input { accent-color: var(--violet); }
.form-note { margin: 0; padding: 10px 12px; border-radius: 9px; color: #5f6b76; background: #f4f6f8; font-size: 11px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 5px; }
.secret-reveal { display: grid; gap: 16px; }
.secret-field { display: grid; grid-template-columns: 1fr auto; gap: 7px; }
.secret-field span { grid-column: 1 / -1; color: var(--muted); font-size: 9px; text-transform: uppercase; font-weight: 800; }
.secret-field code { min-width: 0; padding: 11px; overflow-x: auto; border-radius: 8px; color: #38444f; background: #f3f5f7; white-space: nowrap; font-size: 10px; }
.credential-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.credential-grid > div { min-width: 0; padding: 11px; border: 1px solid var(--line); border-radius: 9px; }
.credential-grid span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 8px; text-transform: uppercase; }
.credential-grid strong, .credential-grid code { display: block; overflow-x: auto; font-size: 10px; white-space: nowrap; }
.credential-full { grid-column: 1 / -1; }

@media (max-width: 1050px) {
  .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .card-grid, .model-groups { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .sidebar { width: 72px; }
  .sidebar-brand { justify-content: center; padding: 0; }
  .sidebar-brand span, .nav-item > span:last-child, .sidebar-foot div { display: none; }
  .sidebar-nav { padding: 20px 10px; }
  .nav-item { justify-content: center; padding: 0; }
  .sidebar-foot { justify-content: center; padding: 20px 0; }
  .workspace { margin-left: 72px; }
  .topbar { padding: 0 18px; }
  .health-badge { display: none; }
  .identity { display: none; }
  .content { padding: 22px 16px; }
  .hero-row { align-items: flex-start; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { min-height: 116px; padding: 17px; }
  .stat-card strong { font-size: 25px; }
  .panel-head { align-items: flex-start; flex-direction: column; }
  .search-field { width: 100%; }
  .form-grid.two-column { grid-template-columns: 1fr; }
  .field-full { grid-column: auto; }
  .table-actions { min-width: 290px; }
}
@media (max-width: 500px) {
  .stats-grid { grid-template-columns: 1fr; }
  .hero-row { flex-direction: column; }
  .topbar h1 { font-size: 17px; }
  .user-chip { display: none; }
  .detail-meta { grid-template-columns: 1fr; }
}
