:root {
  font-family: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #17201d;
  background: #f4f6f5;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --sidebar: #182320;
  --sidebar-hover: #24312d;
  --sidebar-text: #c7d0cd;
  --green: #16795b;
  --green-dark: #0e6248;
  --green-soft: #e4f2ed;
  --blue: #3268b2;
  --blue-soft: #e9f0fa;
  --amber: #9b5c00;
  --amber-soft: #fff2dc;
  --red: #b33333;
  --red-soft: #fdeaea;
  --ink: #17201d;
  --muted: #5f6b66;
  --muted-2: #68736f;
  --border: #dfe4e1;
  --border-strong: #cbd3cf;
  --surface: #fff;
  --surface-subtle: #f8faf9;
  --focus: #2b80ca;
  --radius: 7px;
}

* { box-sizing: border-box; }
html { min-width: 320px; overflow-x: hidden; }
body { margin: 0; overflow-x: hidden; background: #f4f6f5; color: var(--ink); font-size: 14px; line-height: 1.5; }
a { color: var(--green-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; }
button, a, input, select { touch-action: manipulation; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 6px; font-size: 26px; line-height: 1.25; letter-spacing: -.7px; }
h2 { margin-bottom: 14px; font-size: 14px; line-height: 1.35; letter-spacing: -.2px; }
h3 { margin-bottom: 7px; font-size: 14px; }
form { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 11px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.strong { font-weight: 700; }
.green { color: var(--green-dark); }
.break { overflow-wrap: anywhere; }
.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;
  z-index: 200;
  top: 8px;
  left: 8px;
  padding: 9px 13px;
  color: #fff;
  background: var(--green-dark);
  border-radius: 5px;
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

/* Application shell */
.sidebar {
  position: fixed;
  z-index: 40;
  inset: 0 auto 0 0;
  width: 248px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  color: #fff;
  background: var(--sidebar);
}
.sidebar-brand-row {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 19px;
  border-bottom: 1px solid #2a3833;
}
.brand { min-width: 0; display: flex; align-items: center; gap: 10px; color: #fff; }
.brand:hover { text-decoration: none; }
.brand img { width: 99px; height: auto; display: block; }
.brand-product { padding-left: 10px; color: #a9b8b2; border-left: 1px solid #40504a; font-size: 9px; font-weight: 800; letter-spacing: 1.2px; white-space: nowrap; }
.sidebar-close, .mobile-menu {
  width: 38px;
  height: 38px;
  display: none;
  place-items: center;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 5px;
}
.workspace { margin: 15px 13px 7px; padding: 13px 12px; background: #202e29; border: 1px solid #2c3c36; border-radius: 6px; }
.workspace strong { display: block; overflow: hidden; margin-top: 5px; color: #edf3f1; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.role-tag { color: #8ad9b9; font-size: 9px; font-weight: 800; letter-spacing: 1.15px; }
.sidebar-nav { flex: 1; padding: 7px 12px 18px; }
.nav-group + .nav-group { margin-top: 18px; }
.nav-group-label { margin: 0 9px 6px; color: #84948e; font-size: 10px; font-weight: 700; letter-spacing: .3px; }
.nav-item {
  min-height: 39px;
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 2px 0;
  padding: 8px 11px;
  color: var(--sidebar-text);
  border-radius: 5px;
  font-size: 12px;
  font-weight: 650;
}
.nav-item svg { width: 17px; height: 17px; flex: 0 0 auto; color: #91a19b; }
.nav-item:hover { color: #fff; background: var(--sidebar-hover); text-decoration: none; }
.nav-item.active { color: #fff; background: #2a3b35; box-shadow: inset 3px 0 #43bd8c; }
.nav-item.active svg { color: #70d5ac; }
.sidebar-bottom { min-height: 66px; padding: 13px 21px; color: #d1dad6; border-top: 1px solid #2b3934; font-size: 11px; }
.sidebar-status { display: flex; align-items: center; }
.sidebar-bottom .small { display: block; margin: 5px 0 0 14px; color: #86978f; font-size: 9px; }
.dot { width: 6px; height: 6px; display: inline-block; margin-right: 8px; background: #4ec995; border-radius: 50%; box-shadow: 0 0 0 3px rgba(78, 201, 149, .1); }
.sidebar-overlay { display: none; }

.shell { min-width: 0; min-height: 100vh; display: flex; flex-direction: column; margin-left: 248px; }
.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 24px;
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--border);
}
.topbar-start { min-width: 0; display: flex; align-items: center; gap: 9px; }
.topbar-title { min-width: 0; display: flex; align-items: center; gap: 9px; }
.topbar-title span { color: #65716c; font-size: 10px; font-weight: 700; }
.topbar-title span::after { margin-left: 9px; color: #bcc5c1; content: "/"; }
.topbar-title strong { overflow: hidden; color: #2b3732; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.account { display: flex; align-items: center; gap: 13px; }
.account form { display: flex; }
.account > a, .text-button { color: #56635d; font-size: 11px; font-weight: 650; }
.account-avatar { width: 32px; height: 32px; display: grid; place-items: center; color: #146249; background: var(--green-soft); border: 1px solid #cae2d9; border-radius: 50%; font-size: 11px; font-weight: 800; }
.account-name { min-width: 78px; display: flex; flex-direction: column; line-height: 1.25; }
.account-name strong { max-width: 150px; overflow: hidden; color: #2c3732; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.account-name small { margin-top: 2px; color: #6b7772; font-size: 9px; }
.text-button { padding: 0; background: none; border: 0; }
.text-button:hover { color: var(--green-dark); text-decoration: underline; }

.page-content { min-width: 0; width: 100%; max-width: 1680px; flex: 1; margin: 0 auto; padding: 26px 28px 34px; }
.page-heading { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.page-heading p { margin-bottom: 0; font-size: 12px; }
.eyebrow { margin-bottom: 5px !important; color: var(--green-dark); font-size: 10px !important; font-weight: 800; letter-spacing: 1.4px; }
.heading-actions { display: flex; align-items: center; gap: 10px; }
.site-footer { display: flex; justify-content: space-between; gap: 14px; padding: 16px 28px 20px; color: #68756f; font-size: 10px; }

/* Actions and status */
.button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 14px;
  color: #34413c;
  background: #fff;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.25;
  white-space: nowrap;
}
.button:hover { text-decoration: none; }
.button.primary, .primary { color: #fff; background: var(--green); border-color: var(--green); }
.button.primary:hover, .primary:hover { background: var(--green-dark); border-color: var(--green-dark); }
.button.secondary, .secondary { color: #34413c; background: #fff; border-color: var(--border-strong); }
.button.secondary:hover, .secondary:hover { color: var(--green-dark); background: #f6f9f7; border-color: #9eb5ac; }
.button.danger, .danger { color: var(--red); background: #fff; border-color: #ddb8b8; }
.button.danger:hover, .danger:hover { background: var(--red-soft); }
.small-button { min-height: 30px; padding: 5px 9px; font-size: 10px; }
.full { width: 100%; }
.danger-text { color: var(--red); }
.notice { margin-bottom: 14px; padding: 10px 13px; color: #315d78; background: #eef5fa; border: 1px solid #d2e2ed; border-radius: 6px; font-size: 12px; }
.notice a { font-weight: 750; }
.notice.success { color: #1d624b; background: #edf7f3; border-color: #c8e5d9; }
.notice.error { color: #942f2f; background: #fff1f1; border-color: #edcccc; }
.badge { display: inline-flex; align-items: center; justify-content: center; padding: 3px 7px; border: 1px solid transparent; border-radius: 4px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.badge.success { color: #116848; background: #e4f4ed; border-color: #c3e2d4; }
.badge.neutral { color: #56635d; background: #eef1f0; border-color: #dce2df; }
.badge.danger { color: #982f2f; background: #fdecec; border-color: #edcaca; }

/* Overview metrics */
.stats, .metric-band { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.stat, .metric-item {
  position: relative;
  min-width: 0;
  min-height: 98px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  overflow: hidden;
  padding: 15px 17px;
  background: #fff;
  border: 1px solid #d9e0dd;
  border-radius: 6px;
  box-shadow: 0 4px 15px rgba(30, 48, 40, .04);
}
.metric-item::before { position: absolute; inset: 0 0 auto; height: 3px; background: #7a8882; content: ""; }
.metric-blue::before { background: var(--blue); }
.metric-success::before { background: var(--green); }
.metric-warning::before { background: #b87310; }
.metric-icon { width: 40px; height: 40px; display: grid; place-items: center; color: #56645e; background: #eef2f0; border-radius: 6px; }
.metric-icon svg { width: 19px; height: 19px; }
.metric-blue .metric-icon { color: #2b6098; background: var(--blue-soft); }
.metric-success .metric-icon { color: #126b4b; background: var(--green-soft); }
.metric-warning .metric-icon { color: #8f5709; background: var(--amber-soft); }
.metric-item > div { min-width: 0; display: flex; flex-direction: column; }
.metric-item > div > span { overflow: hidden; color: #596660; font-size: 11px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.metric-item strong { margin-top: 2px; color: #1c2823; font-size: 25px; font-weight: 750; line-height: 1.15; font-variant-numeric: tabular-nums; }
.metric-item strong small { margin-left: 3px; color: #66736d; font-size: 11px; font-weight: 650; }
.metric-item em { overflow: hidden; margin-top: 3px; color: #68756f; font-size: 10px; font-style: normal; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.metric-success strong { color: var(--green-dark); }

/* Panels, tables and forms */
.panel { overflow: hidden; margin-bottom: 18px; background: #fff; border: 1px solid #d8e0dc; border-radius: var(--radius); box-shadow: 0 4px 16px rgba(30, 48, 40, .035); }
.panel-toolbar { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 13px; background: #fafcfb; border-bottom: 1px solid var(--border); }
.panel-toolbar h2 { margin-bottom: 2px; font-size: 14px; }
.tenant-filter { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 12px 14px; }
.tenant-filter label { color: #34413c; font-size: 12px; font-weight: 750; }
.tenant-filter select { min-width: 0; width: min(320px, 100%); }
.search { display: flex; gap: 7px; }
.search input { width: 260px; }
.table-scroll { width: 100%; overflow-x: auto; }
table { width: 100%; min-width: 720px; border-collapse: collapse; color: #26312c; text-align: left; white-space: nowrap; }
th { height: 41px; padding: 8px 13px; color: #52615b; background: #f3f7f5; border-bottom: 1px solid var(--border); font-size: 11px; font-weight: 750; }
td { height: 57px; padding: 10px 13px; border-bottom: 1px solid #edf0ee; font-size: 12px; vertical-align: middle; }
tbody tr:nth-child(even) td { background: #fcfdfc; }
tbody tr:hover td { background: #eef7f3; }
tbody tr:last-child td { border-bottom: 0; }
.cell-title { display: block; color: #24312b; font-size: 12px; font-weight: 750; }
.cell-sub { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.cell-sub.green { color: var(--green-dark); font-weight: 700; }
.row-link { color: var(--green-dark); font-size: 11px; font-weight: 750; }
.empty { padding: 50px 20px; text-align: center; white-space: normal; }
.empty h3 { font-size: 15px; }
.empty p { margin-bottom: 17px; color: var(--muted); font-size: 12px; }
.empty-icon { display: block; margin-bottom: 10px; color: #75847d; font-size: 26px; }
.page-note { margin: 0 2px; color: #5f6d67; font-size: 11px; }

.field { margin-bottom: 17px; }
.field label { display: block; margin-bottom: 6px; color: #34413c; font-size: 11px; font-weight: 800; }
input:not([type="checkbox"]), select, textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 11px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #c7d2ce;
  border-radius: 5px;
  font-size: 12px;
}
textarea { min-height: 96px; resize: vertical; }
input:not([type="checkbox"]):focus, select:focus, textarea:focus { border-color: var(--green); }
input:disabled, select:disabled, textarea:disabled { color: #596660; background: #f0f3f1; }
input::placeholder, textarea::placeholder { color: #68756f; opacity: 1; }
.check-field { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.check-field label { margin: 0; }
.check-field input { width: 17px; height: 17px; accent-color: var(--green); }
.field-help { margin-top: 6px; color: #5f6c66; font-size: 10px; line-height: 1.55; }
.required { color: var(--red); }
.field-error, .form-errors { color: #942f2f; font-size: 11px; }
.field-error { margin-top: 5px; }
.field-error ul, .form-errors ul { margin: 0; padding: 0; list-style: none; }
.form-errors { margin-bottom: 16px; padding: 10px 12px; background: #fff1f1; border: 1px solid #edcccc; border-radius: 6px; }
.form-panel { max-width: 720px; padding: 24px 27px; }
.form-actions { margin-top: 23px; padding-top: 18px; border-top: 1px solid var(--border); }
.padded { padding: 21px; }

.summary-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); overflow: hidden; margin-bottom: 18px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.summary-strip > div { min-width: 0; min-height: 69px; display: flex; justify-content: center; flex-direction: column; padding: 12px 17px; border-right: 1px solid var(--border); }
.summary-strip > div:last-child { border-right: 0; }
.summary-strip span { margin-bottom: 4px; color: #5c6963; font-size: 10px; font-weight: 700; }
.summary-strip strong { overflow: hidden; color: #28352f; font-size: 17px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.summary-strip strong.compact { font-size: 13px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.heading-actions { display: flex; gap: 10px; }
.details { display: grid; grid-template-columns: 145px minmax(0, 1fr); gap: 12px; margin: 17px 0; font-size: 12px; }
.details dt { color: var(--muted); }
.details dd { min-width: 0; margin: 0; color: #26342e; }
.slot-number { color: #657770; font-weight: 800; }
.key-action { margin-top: 21px; padding-top: 18px; border-top: 1px solid var(--border); }
.inline-form { display: inline; margin-left: 9px; }
.error-detail { padding: 13px; overflow-wrap: anywhere; color: #942f2f; background: #fff2f2; border: 1px solid #edcccc; border-radius: 5px; font-size: 11px; white-space: pre-wrap; }
.port-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.port-chips span { padding: 5px 9px; color: #385047; background: #edf3f0; border: 1px solid #d9e2de; border-radius: 4px; }

/* Login */
.login-page { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(420px, .95fr) minmax(460px, 1.05fr); background: #fff; }
.login-visual { position: relative; display: flex; justify-content: space-between; flex-direction: column; overflow: hidden; padding: 38px 48px; color: #fff; background: #17231f; }
.login-visual::before, .login-visual::after { position: absolute; background: #293932; content: ""; }
.login-visual::before { width: 1px; inset: 0 auto 0 28%; }
.login-visual::after { height: 1px; inset: 68% 0 auto; }
.login-brand, .login-mobile-brand { display: flex; align-items: center; gap: 12px; }
.login-brand { position: relative; z-index: 2; align-self: flex-start; color: #fff; }
.login-brand:hover { text-decoration: none; }
.login-brand img { width: 110px; height: auto; }
.login-brand span, .login-mobile-brand span { padding-left: 12px; border-left: 1px solid #405149; color: #a9b9b2; font-size: 10px; font-weight: 800; letter-spacing: 1.3px; }
.login-visual-signal { position: relative; z-index: 1; width: min(49vh, 420px); max-width: 80%; aspect-ratio: 1; align-self: center; }
.signal-ring { position: absolute; border: 1px solid #385248; border-radius: 8px; transform: rotate(45deg); }
.signal-ring-1 { inset: 38%; }
.signal-ring-2 { inset: 23%; }
.signal-ring-3 { inset: 8%; }
.signal-core { position: absolute; inset: 50% auto auto 50%; width: 58px; height: 58px; display: grid; place-items: center; color: #fff; background: var(--green); border: 1px solid #4eaa87; border-radius: 8px; box-shadow: 0 0 0 10px rgba(28, 129, 96, .12); transform: translate(-50%, -50%); }
.signal-core svg { width: 28px; height: 28px; }
.signal-node { position: absolute; z-index: 2; width: 10px; height: 10px; background: #5ec99d; border: 2px solid #17231f; border-radius: 50%; box-shadow: 0 0 0 3px rgba(94, 201, 157, .12); }
.signal-node-1 { top: 8%; left: 48%; }
.signal-node-2 { top: 47%; right: 7%; background: #e6a63c; box-shadow: 0 0 0 3px rgba(230, 166, 60, .12); }
.signal-node-3 { bottom: 7%; left: 34%; }
.signal-node-4 { top: 31%; left: 22%; background: #d85d5d; box-shadow: 0 0 0 3px rgba(216, 93, 93, .12); }
.login-visual-status { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding-top: 17px; border-top: 1px solid #34463f; }
.login-visual-status div { min-width: 0; display: flex; flex-direction: column; }
.login-visual-status div + div { padding-left: 14px; border-left: 1px solid #34463f; }
.login-visual-status span { color: #a4b5ae; font-size: 10px; }
.login-visual-status strong { overflow: hidden; margin-top: 5px; color: #e8efec; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.login-form-area { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-rows: 1fr auto; place-items: center; padding: 38px; background: #fff; }
.login-form { width: min(410px, 100%); }
.login-form header { margin-bottom: 28px; }
.secure-label { display: inline-flex; align-items: center; gap: 5px; margin-bottom: 17px; color: var(--green-dark); font-size: 10px; font-weight: 800; }
.secure-label svg { width: 14px; height: 14px; }
.login-form h1 { margin-bottom: 0; color: var(--ink); font-size: 27px; }
.login-form header p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.login-field { margin-bottom: 16px; }
.login-field label { font-size: 11px; }
.login-field-control { position: relative; display: block; }
.login-field-control > svg { position: absolute; z-index: 1; top: 13px; left: 13px; width: 18px; height: 18px; color: #6e7b75; pointer-events: none; }
.login-field-control input { min-height: 44px; padding-left: 42px; font-size: 13px; }
.login-submit { min-height: 44px; margin-top: 5px; font-size: 12px; }
.login-help { margin: 20px 0 0; color: #65726c; font-size: 10px; text-align: center; }
.login-footer { justify-self: center; color: #65716c; font-size: 10px; }
.login-mobile-brand { display: none; }
.login-mobile-brand img { width: 100px; height: auto; }
.login-mobile-brand span { color: #66746e; border-color: #cbd4d0; }

/* Error pages */
.public-error { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: #f4f6f5; }
.page-content > .public-error { min-height: calc(100vh - 170px); padding: 0; }
.error-panel { width: min(480px, 100%); margin: 0; padding: 48px 30px; text-align: center; }
.error-code { display: block; margin-bottom: 9px; color: var(--green-dark); font-size: 12px; font-weight: 850; letter-spacing: 1.8px; }
.error-panel p { margin-bottom: 21px; color: var(--muted); }

@media (max-width: 1180px) {
  .page-content { padding: 24px; }
  .stats, .metric-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  body.sidebar-open { overflow: hidden; }
  .sidebar { z-index: 90; width: min(286px, 86vw); box-shadow: 16px 0 40px rgba(13, 27, 21, .3); transform: translateX(-105%); transition: transform .18s ease; }
  .sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-close { display: grid; }
  .sidebar-overlay { position: fixed; z-index: 80; inset: 0; display: block; padding: 0; background: rgba(16, 30, 24, .52); border: 0; opacity: 0; pointer-events: none; transition: opacity .18s ease; }
  .sidebar-open .sidebar-overlay { opacity: 1; pointer-events: auto; }
  .shell { margin-left: 0; }
  .mobile-menu { display: grid; color: #4f5d57; }
  .topbar { padding: 0 18px; }
  .page-content { padding: 22px 18px 28px; }
  .login-page { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .login-form-area { min-height: 100vh; min-height: 100dvh; grid-template-rows: auto auto 1fr; align-content: center; padding: 28px 22px; }
  .login-mobile-brand { width: min(410px, 100%); display: flex; align-self: end; margin-bottom: 38px; }
  .login-form-area .login-form { align-self: center; }
  .login-footer { align-self: end; }
}

@media (max-width: 700px) {
  h1 { font-size: 23px; }
  .topbar { min-height: 58px; padding: 0 13px; }
  .topbar-title span { display: none; }
  .topbar-title span::after { display: none; }
  .account { gap: 8px; }
  .account-name small { display: none; }
  .account > a, .text-button { font-size: 10px; }
  .page-content { padding: 19px 14px 25px; }
  .page-heading { align-items: flex-start; flex-wrap: wrap; margin-bottom: 15px; }
  .page-heading > .button, .page-heading > .heading-actions { margin-left: auto; }
  .button { min-height: 40px; }
  .stats, .metric-band { gap: 8px; }
  .stat, .metric-item { min-height: 91px; grid-template-columns: 34px minmax(0, 1fr); gap: 8px; padding: 11px; }
  .metric-icon { width: 34px; height: 34px; }
  .metric-item strong { font-size: 22px; }
  .metric-item > div > span { white-space: normal; }
  .panel-toolbar { align-items: flex-start; flex-direction: column; padding: 12px; }
  .tenant-filter select { flex: 1; width: auto; }
  .search { width: 100%; }
  .search input { min-width: 0; width: 100%; }
  th, td { padding-inline: 11px; }
  .summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-strip > div { border-bottom: 1px solid var(--border); }
  .summary-strip > div:nth-child(even) { border-right: 0; }
  .summary-strip > div:nth-last-child(-n + 2) { border-bottom: 0; }
  .form-panel, .padded { padding: 19px; }
  .details { grid-template-columns: 110px minmax(0, 1fr); }
  .heading-actions { align-items: flex-end; flex-direction: column; }
  .site-footer { align-items: flex-start; flex-direction: column; padding: 15px 14px; }
}

@media (max-width: 480px) {
  .account-avatar { display: none; }
  .account-name { min-width: 0; }
  .topbar-title { display: none; }
  .account { margin-left: auto; }
  .stats, .metric-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-item em { display: none; }
  .summary-strip { grid-template-columns: 1fr; }
  .summary-strip > div { border-right: 0; border-bottom: 1px solid var(--border); }
  .summary-strip > div:nth-last-child(-n + 2) { border-bottom: 1px solid var(--border); }
  .summary-strip > div:last-child { border-bottom: 0; }
  .details { grid-template-columns: 1fr; gap: 4px; }
  .details dd { margin-bottom: 8px; }
  .inline-form { display: block; margin: 7px 0 0; }
  .login-form-area { padding-inline: 18px; }
  .login-mobile-brand { margin-bottom: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

@media print {
  .sidebar, .topbar, .site-footer, .button { display: none !important; }
  .shell { margin: 0; }
  .page-content { max-width: none; padding: 0; }
  .panel { break-inside: avoid; box-shadow: none; }
}
