:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #1d1d1f;
  --blue: #1769e0;
  --blue-dark: #0f4eac;
  --border: #e2e5ea;
  --muted: #68717d;
  --panel: #ffffff;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: #f5f6f8; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(23, 105, 224, .24); outline-offset: 2px; }
.shell { width: min(1420px, calc(100% - 40px)); margin: 0 auto; padding: 32px 0 56px; }
.login-layout { min-height: calc(100vh - 88px); display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 72px; }
.brand-panel { padding: 20px 0; }
.brand-mark { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 16px; background: #1d1d1f; color: #fff; font-size: 28px; font-weight: 700; margin-bottom: 28px; }
.eyebrow { margin: 0 0 10px; color: var(--blue); font-size: 12px; font-weight: 700; letter-spacing: 1.2px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 10px; font-size: clamp(30px, 4vw, 48px); line-height: 1.1; letter-spacing: 0; }
h2 { margin-bottom: 0; font-size: 22px; letter-spacing: 0; }
.muted { color: var(--muted); line-height: 1.6; }
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 16px 40px rgba(24, 32, 42, .06); }
.login-panel { width: min(100%, 460px); padding: 32px; justify-self: end; }
.panel-heading { margin-bottom: 24px; }
label { display: grid; gap: 8px; margin-bottom: 16px; color: #313a45; font-size: 14px; font-weight: 600; }
input, select { width: 100%; min-height: 44px; border: 1px solid #d5dae1; border-radius: 6px; background: #fff; color: #1d1d1f; padding: 10px 12px; }
button { min-height: 42px; border: 0; border-radius: 6px; padding: 0 16px; font-weight: 650; transition: background .18s ease, color .18s ease, border-color .18s ease; }
button.primary { width: 100%; background: var(--blue); color: #fff; }
button.primary:hover { background: var(--blue-dark); }
button.secondary { background: #eef3fc; color: #1b58ad; border: 1px solid #d5e2fa; }
button.secondary:hover { background: #e1ebfb; }
button.ghost { background: transparent; color: #59636f; }
button.ghost:hover { background: #edf0f4; }
.error-text { min-height: 20px; color: #b42318; font-size: 13px; line-height: 1.5; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 28px; border-bottom: 1px solid var(--border); }
.topbar h1 { margin-bottom: 0; font-size: 30px; }
.topbar-actions, .filters, .dialog-actions { display: flex; align-items: center; gap: 10px; }
.user-label { color: #59636f; font-size: 14px; }
.notice { margin: 20px 0 0; padding: 12px 14px; border: 1px solid #f0c36d; border-radius: 6px; background: #fff7e6; color: #8b5e13; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 24px 0; }
.stat { padding: 20px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.stat span { display: block; color: var(--muted); font-size: 13px; }
.stat strong { display: block; margin-top: 8px; font-size: 30px; line-height: 1; }
.records-panel { padding: 24px; }
.toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.toolbar p { margin: 8px 0 0; font-size: 13px; }
.filters { align-items: stretch; }
.filters input { width: 260px; }
.filters select { width: 130px; }
.table-message { min-height: 22px; font-size: 13px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 14px 10px; text-align: left; vertical-align: top; border-top: 1px solid #edf0f3; }
th { color: #6b7480; font-size: 12px; font-weight: 700; white-space: nowrap; }
td strong { display: block; color: #1d1d1f; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; }
.subline { display: block; max-width: 270px; margin-top: 5px; overflow: hidden; color: #727b87; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.status { display: inline-flex; min-width: 64px; justify-content: center; padding: 5px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.status.active { background: #e8f7ef; color: #137a45; }
.status.disabled { background: #fcebea; color: #b42318; }
.action-row { display: flex; flex-wrap: wrap; gap: 7px; }
.action-row button { min-height: 32px; padding: 0 9px; font-size: 12px; }
.dialog { width: min(420px, calc(100% - 28px)); border: 0; border-radius: 10px; padding: 0; box-shadow: 0 22px 60px rgba(0, 0, 0, .2); }
.dialog::backdrop { background: rgba(21, 28, 38, .45); }
.dialog-content { padding: 28px; }
.dialog-actions { justify-content: flex-end; margin-top: 8px; }
.dialog-actions button { width: auto; }
@media (max-width: 980px) { .login-layout { grid-template-columns: 1fr; gap: 28px; max-width: 560px; margin: 0 auto; } .login-panel { justify-self: stretch; } .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .toolbar { align-items: stretch; flex-direction: column; } .filters { flex-wrap: wrap; } .filters input { flex: 1 1 220px; width: auto; } }
@media (max-width: 640px) { .shell { width: min(100% - 24px, 1420px); padding-top: 18px; } .topbar { align-items: flex-start; flex-direction: column; } .topbar-actions { width: 100%; flex-wrap: wrap; } .user-label { width: 100%; } .stats-grid { gap: 9px; } .stat { padding: 14px; } .stat strong { font-size: 24px; } .records-panel, .login-panel { padding: 18px; } .filters > * { width: 100% !important; } }
