:root {
  color-scheme: dark;
  --bg: #0d1117;
  --sidebar: #11161d;
  --surface: #151b23;
  --surface-raised: #1a212b;
  --surface-hover: #202936;
  --input: #0f141b;
  --border: #2a3543;
  --border-strong: #3a4859;
  --text: #edf2f7;
  --text-soft: #bcc7d5;
  --muted: #8794a5;
  --primary: #4f8ff7;
  --primary-hover: #6da4ff;
  --primary-soft: rgba(79,143,247,.14);
  --success: #42c78a;
  --success-soft: rgba(66,199,138,.12);
  --warning: #e8ac4c;
  --warning-soft: rgba(232,172,76,.13);
  --danger: #ed6b78;
  --danger-soft: rgba(237,107,120,.13);
  --info-soft: rgba(104,182,232,.12);
  --radius-sm: .4rem;
  --radius: .65rem;
  --radius-lg: .9rem;
  --shadow: 0 14px 36px rgba(0,0,0,.22);
  --sidebar-width: 16rem;
  font: 16px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

*,*::before,*::after { box-sizing: border-box; }
html { min-width: 0; background: var(--bg); }
body {
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background: radial-gradient(circle at 80% -10%,rgba(79,143,247,.07),transparent 28rem),var(--bg);
}
body.dashboard-layout { display: grid; grid-template-columns: var(--sidebar-width) minmax(0,1fr); }
a { color: var(--primary-hover); text-underline-offset: .18em; }
a:hover { color: #92baff; }
button,input,select,textarea { font: inherit; }
button,a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid rgba(109,164,255,.72); outline-offset: 2px; }
.skip-link {
  position: fixed; z-index: 100; top: .75rem; left: .75rem; padding: .65rem .9rem;
  color: #fff; background: var(--primary); border-radius: var(--radius-sm);
  transform: translateY(-180%); transition: transform .15s ease;
}
.skip-link:focus { transform: translateY(0); }
.icon { display: inline-block; flex: 0 0 auto; fill: currentColor; vertical-align: -.18em; }

.sidebar {
  position: sticky; top: 0; z-index: 20; display: flex; flex-direction: column;
  width: var(--sidebar-width); height: 100vh; min-height: 34rem; padding: 1.15rem .85rem .85rem;
  background: rgba(17,22,29,.97); border-right: 1px solid var(--border);
}
.brand { display: flex; align-items: center; min-height: 2.9rem; gap: .75rem; padding: .25rem .5rem; color: var(--text); text-decoration: none; }
.brand:hover { color: #fff; }
.brand__mark {
  display: grid; place-items: center; width: 2.15rem; height: 2.15rem; flex: 0 0 auto;
  border-radius: .62rem; color: #fff; background: linear-gradient(145deg,#5798ff,#306fdb);
  box-shadow: 0 7px 18px rgba(48,111,219,.25); font-size: 1rem; font-weight: 800;
}
.brand>span:last-child { display: flex; min-width: 0; flex-direction: column; line-height: 1.2; }
.brand strong { color: inherit; font-size: .94rem; letter-spacing: .01em; }
.brand small { margin-top: .18rem; color: var(--muted); font-size: .72rem; }
.primary-nav { flex: 1; margin: 1.6rem 0; overflow-y: auto; scrollbar-width: thin; }
.nav-group+.nav-group { margin-top: 1.25rem; }
.nav-group__label {
  display: block; padding: 0 .65rem .38rem; color: #68778a; font-size: .67rem;
  font-weight: 750; letter-spacing: .11em; text-transform: uppercase;
}
.nav-link {
  position: relative; display: flex; align-items: center; min-height: 2.55rem; gap: .72rem;
  margin: .08rem 0; padding: .58rem .68rem; border: 0; border-radius: .5rem;
  color: #9facbb; background: transparent; font-size: .88rem; font-weight: 590;
  text-decoration: none; text-align: left;
}
.nav-link:hover { color: var(--text); background: rgba(255,255,255,.035); }
.nav-link.is-active { color: #dce9ff; background: var(--primary-soft); }
.nav-link.is-active::before {
  position: absolute; inset: .5rem auto .5rem -.85rem; width: .18rem;
  border-radius: 0 .2rem .2rem 0; background: var(--primary); content: "";
}
.nav-link--button { width: 100%; cursor: pointer; }
.sidebar-user {
  display: flex; align-items: center; min-width: 0; gap: .65rem; padding: .75rem .55rem .2rem;
  border-top: 1px solid var(--border);
}
.avatar {
  display: grid; place-items: center; width: 2rem; height: 2rem; flex: 0 0 auto;
  border-radius: 50%; color: #dbe8ff; background: #25344a; font-size: .78rem; font-weight: 750;
}
.sidebar-user__identity { display: flex; min-width: 0; flex: 1; flex-direction: column; line-height: 1.25; }
.sidebar-user__identity strong,.sidebar-user__identity small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user__identity strong { color: var(--text-soft); font-size: .78rem; }
.sidebar-user__identity small { color: var(--muted); font-size: .68rem; }
.icon-button {
  display: grid; place-items: center; width: 2.4rem; height: 2.4rem; padding: 0;
  border: 0; border-radius: .48rem; color: var(--muted); background: transparent; cursor: pointer;
}
.icon-button:hover { color: var(--text); background: var(--surface-hover); }
.mobile-header { display: none; }

.content-column { display: flex; min-width: 0; min-height: 100vh; flex-direction: column; }
main { width: 100%; max-width: 100rem; min-width: 0; margin: 0 auto; padding: 2.15rem clamp(1rem,3vw,3rem) 3.5rem; }
.page-footer {
  display: flex; width: calc(100% - clamp(2rem,6vw,6rem)); max-width: 94rem; justify-content: space-between;
  gap: 1rem; margin: auto auto 0; padding: 1.25rem 0 1.75rem; border-top: 1px solid rgba(42,53,67,.65);
  color: var(--muted); font-size: .72rem;
}
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.65rem; }
.page-header--compact { margin-bottom: 1.1rem; }
.page-header__copy { min-width: 0; }
.eyebrow { margin: 0 0 .28rem; color: var(--primary-hover); font-size: .7rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
h1,h2,h3 { color: var(--text); line-height: 1.22; text-wrap: balance; }
h1 { margin: 0; font-size: clamp(1.58rem,2vw,2.05rem); letter-spacing: -.025em; }
h2 { margin: 0; font-size: 1.04rem; letter-spacing: -.012em; }
h3 { margin: 0; font-size: .92rem; }
p { margin: 0; }
.page-description { max-width: 52rem; margin-top: .42rem; color: var(--muted); font-size: .9rem; }
.page-header__actions,.button-row { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.section-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 2rem 0 .85rem; }
.section-header p { margin-top: .25rem; color: var(--muted); font-size: .82rem; }
.section-header--flush { margin: 0 0 .8rem; }

.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 2.55rem; gap: .42rem;
  padding: .58rem .86rem; border: 1px solid transparent; border-radius: .5rem; color: #fff;
  background: var(--primary); font-size: .82rem; font-weight: 680; line-height: 1.15;
  text-decoration: none; cursor: pointer;
}
.button:hover { color: #fff; background: var(--primary-hover); }
.button--secondary { border-color: var(--border-strong); color: var(--text-soft); background: var(--surface); }
.button--secondary:hover { border-color: #53657a; color: var(--text); background: var(--surface-hover); }
.button--danger { border-color: rgba(237,107,120,.55); color: #ffdce0; background: var(--danger-soft); }
.button--danger:hover { border-color: var(--danger); color: #fff; background: rgba(237,107,120,.22); }
.button--success { border-color: rgba(66,199,138,.45); color: #c9f9e1; background: var(--success-soft); }
.button--compact { min-height: 2.2rem; padding: .45rem .68rem; font-size: .75rem; }
.button.is-disabled { opacity: .42; pointer-events: none; }

.kpi-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .85rem; }
.kpi-card {
  position: relative; display: flex; min-width: 0; min-height: 8rem; flex-direction: column;
  padding: 1rem 1.05rem; border: 1px solid var(--border); border-radius: var(--radius);
  color: inherit; background: linear-gradient(145deg,rgba(255,255,255,.012),transparent),var(--surface);
  text-decoration: none;
}
.kpi-card:hover { border-color: var(--border-strong); color: inherit; background: var(--surface-raised); }
.kpi-card--success { border-top-color: rgba(66,199,138,.75); }
.kpi-card--warning { border-top-color: rgba(232,172,76,.8); }
.kpi-card--danger { border-top-color: rgba(237,107,120,.8); }
.kpi-card--primary { border-top-color: rgba(79,143,247,.85); }
.kpi-card__label { color: var(--muted); font-size: .74rem; font-weight: 680; }
.kpi-card__value { margin-top: .35rem; color: var(--text); font-size: clamp(1.45rem,2vw,1.85rem); line-height: 1.15; overflow-wrap: anywhere; }
.kpi-card__detail { margin-top: .28rem; color: var(--text-soft); font-size: .72rem; }
.kpi-card__link { display: flex; align-items: center; gap: .1rem; margin-top: auto; padding-top: .55rem; color: var(--primary-hover); font-size: .7rem; font-weight: 650; }

.panel,.record-card,.confirmation-panel { min-width: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.panel { padding: 1rem; }
.panel--raised { background: var(--surface-raised); box-shadow: var(--shadow); }
.panel--flush { padding: 0; overflow: hidden; }
.panel--danger { border-color: rgba(237,107,120,.35); }
.panel-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .9rem; }
.panel-grid--wide { grid-template-columns: minmax(0,1.55fr) minmax(17rem,.75fr); }
.stack { display: grid; min-width: 0; gap: .8rem; }
.stack--tight { gap: .45rem; }
.cluster { display: flex; min-width: 0; flex-wrap: wrap; align-items: center; gap: .45rem; }

.badge {
  display: inline-flex; align-items: center; min-height: 1.55rem; max-width: 100%; padding: .16rem .48rem;
  border: 1px solid transparent; border-radius: 999px; color: var(--text-soft);
  background: rgba(135,148,165,.1); font-size: .66rem; font-weight: 720;
  line-height: 1.15; text-transform: capitalize; overflow-wrap: anywhere;
}
.badge--success { border-color: rgba(66,199,138,.28); color: #8be4b8; background: var(--success-soft); }
.badge--warning { border-color: rgba(232,172,76,.3); color: #f4c777; background: var(--warning-soft); }
.badge--danger { border-color: rgba(237,107,120,.3); color: #ff9ca6; background: var(--danger-soft); }
.badge--primary,.badge--info { border-color: rgba(79,143,247,.3); color: #92baff; background: var(--primary-soft); }
.badge--muted { border-color: var(--border); color: var(--muted); background: transparent; }

.inline-notice,.flash {
  display: flex; align-items: flex-start; gap: .65rem; padding: .78rem .88rem;
  border: 1px solid rgba(104,182,232,.28); border-radius: var(--radius-sm);
  color: #cfeaff; background: var(--info-soft); font-size: .8rem;
}
.inline-notice__icon { display: inline-flex; margin-top: .06rem; }
.inline-notice p { margin-top: .14rem; color: var(--text-soft); }
.inline-notice--success,.flash--success { border-color: rgba(66,199,138,.3); color: #b8f0d4; background: var(--success-soft); }
.inline-notice--warning,.flash--warning { border-color: rgba(232,172,76,.32); color: #f6d18e; background: var(--warning-soft); }
.inline-notice--danger,.flash--danger,.flash--error { border-color: rgba(237,107,120,.32); color: #ffc0c6; background: var(--danger-soft); }
.flash-stack { display: grid; gap: .55rem; margin-bottom: 1rem; }

.filter-bar {
  display: grid; grid-template-columns: repeat(6,minmax(8rem,1fr)); align-items: end; gap: .7rem;
  margin: 0 0 1rem; padding: .85rem; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--surface);
}
.filter-bar__actions { display: flex; align-items: center; gap: .45rem; }
.field { display: grid; min-width: 0; gap: .3rem; }
.field label,.field-label { color: var(--text-soft); font-size: .7rem; font-weight: 680; }
.field small { color: var(--muted); font-size: .67rem; }
input,select,textarea {
  width: 100%; min-width: 0; min-height: 2.55rem; padding: .55rem .65rem;
  border: 1px solid var(--border-strong); border-radius: .45rem; color: var(--text); background: var(--input);
}
input::placeholder,textarea::placeholder { color: #617083; }
input:hover,select:hover,textarea:hover { border-color: #53657a; }
input:focus,select:focus,textarea:focus { border-color: var(--primary); outline: 2px solid rgba(79,143,247,.18); }
textarea { min-height: 6rem; resize: vertical; }
select { cursor: pointer; }
.checkbox-field { display: flex; align-items: center; min-height: 2.55rem; gap: .5rem; }
.checkbox-field input { width: 1.05rem; min-height: 1.05rem; }

.table-wrap {
  width: 100%; min-width: 0; overflow-x: auto; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--surface); scrollbar-color: var(--border-strong) var(--surface);
}
table { width: 100%; border-collapse: collapse; font-size: .78rem; }
caption { padding: .8rem; color: var(--text-soft); font-weight: 680; text-align: left; }
thead { color: #9caabd; background: #11171f; }
th,td { padding: .72rem .78rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { font-size: .67rem; font-weight: 740; letter-spacing: .035em; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(255,255,255,.015); }
td { max-width: 28rem; color: var(--text-soft); overflow-wrap: anywhere; }
td strong,.record-title { color: var(--text); }
.cell-primary { min-width: 13rem; }
.cell-primary strong,.cell-primary span { display: block; }
.cell-primary span { margin-top: .18rem; color: var(--muted); font-size: .7rem; }
.cell-number { font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-actions { display: flex; flex-wrap: wrap; gap: .38rem; }

pre,code,.mono { font-family: ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; }
code,.mono { font-size: .76rem; }
pre { max-width: 100%; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.document {
  padding: .9rem; border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: #d6dee8; background: var(--input); font: inherit; line-height: 1.58;
}
.document--code { color: #bfc9d5; font-family: ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; font-size: .75rem; }
.source-block { padding: .85rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--input); }
.source-block__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin-bottom: .58rem; color: var(--muted); font-size: .67rem; }
.source-block__text { color: var(--text-soft); white-space: pre-wrap; overflow-wrap: anywhere; }
.meta-list { display: grid; grid-template-columns: minmax(7rem,.45fr) minmax(0,1fr); margin: 0; }
.meta-list dt,.meta-list dd { margin: 0; padding: .5rem 0; border-bottom: 1px solid rgba(42,53,67,.72); overflow-wrap: anywhere; }
.meta-list dt { color: var(--muted); font-size: .7rem; font-weight: 650; }
.meta-list dd { color: var(--text-soft); font-size: .78rem; }
.meta-list dt:last-of-type,.meta-list dd:last-of-type { border-bottom: 0; }

.record-list { display: grid; gap: .75rem; }
.record-card { padding: .9rem 1rem; }
.record-card__header { display: flex; align-items: flex-start; justify-content: space-between; gap: .8rem; }
.record-card__header p,.record-card__body { color: var(--text-soft); font-size: .8rem; }
.record-card__meta { display: flex; flex-wrap: wrap; gap: .35rem .8rem; margin-top: .35rem; color: var(--muted); font-size: .68rem; }
.record-card__body { margin-top: .75rem; }
.tabs { display: flex; gap: .25rem; margin-bottom: 1rem; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tab { flex: 0 0 auto; padding: .62rem .8rem; border-bottom: 2px solid transparent; color: var(--muted); font-size: .78rem; font-weight: 650; text-decoration: none; }
.tab:hover { color: var(--text); }
.tab.is-active { border-bottom-color: var(--primary); color: #dbe8ff; }
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: .75rem; margin-top: 1rem; color: var(--muted); font-size: .73rem; }
.empty-state {
  display: grid; place-items: center; min-height: 14rem; padding: 2rem;
  border: 1px dashed var(--border-strong); border-radius: var(--radius); color: var(--muted); text-align: center;
}
.empty-state__mark { display: block; width: 2.4rem; height: 2.4rem; margin-bottom: .4rem; border: .35rem solid var(--border-strong); border-radius: 50%; opacity: .7; }
.empty-state h2 { font-size: .95rem; }
.empty-state p { max-width: 34rem; margin: .3rem 0 .8rem; font-size: .78rem; }
.disclosure { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.disclosure summary { padding: .68rem .8rem; color: var(--text-soft); font-size: .76rem; font-weight: 650; cursor: pointer; user-select: none; }
.disclosure[open] summary { border-bottom: 1px solid var(--border); }
.disclosure__body { min-width: 0; padding: .8rem; }

.meter+.meter { margin-top: .9rem; }
.meter__label { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .34rem; color: var(--muted); font-size: .7rem; }
.meter__label strong { color: var(--text-soft); font-variant-numeric: tabular-nums; }
.meter__native { display: block; width: 100%; height: .55rem; border: 0; border-radius: 999px; background: #0d1218; accent-color: var(--primary); }
.meter__native::-webkit-meter-bar { border: 0; border-radius: 999px; background: #0d1218; }
.meter__native::-webkit-meter-optimum-value { border-radius: 999px; background: var(--primary); }
.meter__native--success { accent-color: var(--success); }
.meter__native--warning { accent-color: var(--warning); }
.meter__native--danger { accent-color: var(--danger); }
.flow-top { margin-top: .9rem; }
.flow-tight-top { margin-top: .8rem; }
.meter__track { height: .45rem; overflow: hidden; border-radius: 999px; background: #0d1218; }
.meter__fill { display: block; height: 100%; border-radius: inherit; background: var(--primary); }
.meter__fill--success { background: var(--success); }
.meter__fill--warning { background: var(--warning); }
.meter__fill--danger { background: var(--danger); }
.timeline { display: grid; }
.timeline-item { position: relative; display: grid; grid-template-columns: 1.6rem minmax(0,1fr); gap: .65rem; padding-bottom: .9rem; }
.timeline-item::before { position: absolute; top: 1.15rem; bottom: 0; left: .49rem; width: 1px; background: var(--border); content: ""; }
.timeline-item:last-child::before { display: none; }
.timeline-item__dot { z-index: 1; width: 1rem; height: 1rem; margin-top: .14rem; border: .25rem solid var(--surface); border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 1px var(--border-strong); }
.timeline-item__body { color: var(--text-soft); font-size: .77rem; }
.timeline-item__body small { display: block; margin-top: .16rem; color: var(--muted); }

.confirmation-panel {
  display: grid; max-width: 43rem; grid-template-columns: 3rem minmax(0,1fr); gap: 1rem;
  margin: clamp(2rem,8vh,6rem) auto 0; padding: 1.3rem; box-shadow: var(--shadow);
}
.confirmation-panel__icon { display: grid; place-items: center; width: 2.8rem; height: 2.8rem; border-radius: .65rem; color: #ffd2d7; background: var(--danger-soft); }
.confirmation-panel__icon--warning { color: #f6d18e; background: var(--warning-soft); }
.confirmation-panel p { margin: .45rem 0 1rem; color: var(--text-soft); font-size: .85rem; }

.auth-layout {
  display: grid; min-height: 100vh; place-items: center;
  background: radial-gradient(circle at 50% 12%,rgba(79,143,247,.16),transparent 32rem),var(--bg);
}
.auth-column { width: 100%; }
.auth-column main { display: grid; min-height: 100vh; place-items: center; padding: 1rem; }
.auth-card {
  width: min(100%,27rem); padding: 1.5rem; border: 1px solid var(--border);
  border-radius: var(--radius-lg); background: rgba(21,27,35,.92); box-shadow: 0 24px 60px rgba(0,0,0,.35);
}
.auth-card__brand { display: flex; justify-content: center; margin-bottom: 1.35rem; }
.auth-card h1 { text-align: center; }
.auth-card>p { margin: .5rem auto 1.25rem; color: var(--muted); font-size: .83rem; text-align: center; }
.discord-button { width: 100%; min-height: 2.85rem; margin-top: .25rem; background: #5865f2; }
.discord-button:hover { background: #6874f5; }
.discord-mark { display: grid; place-items: center; width: 1.45rem; height: 1.45rem; border-radius: .38rem; background: rgba(255,255,255,.13); font-size: .72rem; font-weight: 850; }
.auth-note { margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--border); color: var(--muted); font-size: .68rem; text-align: center; }
.status-code { display: block; margin-bottom: .35rem; color: var(--primary-hover); font-size: .72rem; font-weight: 780; letter-spacing: .08em; }
.sr-only { position: absolute!important; width: 1px!important; height: 1px!important; padding: 0!important; margin: -1px!important; overflow: hidden!important; clip: rect(0,0,0,0)!important; white-space: nowrap!important; border: 0!important; }
.truncate { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.muted { color: var(--muted); }
.text-danger { color: #ff9ca6; }
.text-success { color: #8be4b8; }

@media (max-width:1200px) {
  .kpi-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .filter-bar { grid-template-columns: repeat(3,minmax(8rem,1fr)); }
}
@media (max-width:900px) {
  body.dashboard-layout { display: block; padding-top: 4rem; }
  .sidebar { display: none; }
  .mobile-header {
    position: fixed; inset: 0 0 auto 0; z-index: 30; display: flex; height: 4rem;
    align-items: center; justify-content: space-between; padding: .55rem .9rem;
    border-bottom: 1px solid var(--border); background: rgba(17,22,29,.97); backdrop-filter: blur(10px);
  }
  .brand--mobile { padding: 0; }
  .mobile-menu { position: relative; }
  .mobile-menu>summary {
    display: grid; width: 2.75rem; height: 2.75rem; place-content: center; gap: .25rem;
    border: 1px solid var(--border-strong); border-radius: .5rem; background: var(--surface);
    cursor: pointer; list-style: none;
  }
  .mobile-menu>summary::-webkit-details-marker { display: none; }
  .mobile-menu>summary span { display: block; width: 1.1rem; height: 2px; border-radius: 1px; background: var(--text-soft); }
  .mobile-menu[open]>summary { border-color: var(--primary); }
  .mobile-menu nav {
    position: fixed; top: 4rem; right: .65rem; left: .65rem; max-height: calc(100vh - 4.8rem);
    padding: .5rem; overflow-y: auto; border: 1px solid var(--border-strong);
    border-radius: var(--radius); background: var(--sidebar); box-shadow: var(--shadow);
  }
  .mobile-menu .nav-link.is-active::before { inset: .5rem auto .5rem -.5rem; }
  main { padding-top: 1.45rem; }
  .panel-grid--wide { grid-template-columns: 1fr; }
}
@media (max-width:700px) {
  main { padding-right: .85rem; padding-left: .85rem; }
  .page-header { align-items: flex-start; flex-direction: column; gap: .85rem; }
  .page-header__actions,.page-header__actions .button { width: 100%; }
  .kpi-grid,.panel-grid,.filter-bar { grid-template-columns: 1fr; }
  .filter-bar__actions,.filter-bar__actions .button { width: 100%; }
  .responsive-table { border: 0; background: transparent; }
  .responsive-table table,.responsive-table tbody,.responsive-table tr,.responsive-table td { display: block; width: 100%; }
  .responsive-table thead { display: none; }
  .responsive-table table { display: grid; gap: .65rem; }
  .responsive-table tr { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
  .responsive-table td {
    display: grid; max-width: none; grid-template-columns: minmax(6.25rem,.42fr) minmax(0,1fr);
    gap: .65rem; padding: .58rem .72rem; border-bottom: 1px solid var(--border);
  }
  .responsive-table td::before { color: var(--muted); content: attr(data-label); font-size: .66rem; font-weight: 720; }
  .responsive-table td:last-child { border-bottom: 0; }
  .responsive-table .cell-primary { min-width: 0; }
  .pagination { justify-content: space-between; flex-wrap: wrap; }
  .pagination>span:not(.button) { width: 100%; order: -1; text-align: center; }
  .meta-list { grid-template-columns: 1fr; }
  .meta-list dt { padding-bottom: .1rem; border-bottom: 0; }
  .meta-list dd { padding-top: 0; }
  .record-card__header { flex-direction: column; }
  .page-footer { align-items: flex-start; flex-direction: column; }
}
@media (max-width:420px) {
  .brand--mobile small { display: none; }
  .kpi-card { min-height: 7.4rem; }
  .confirmation-panel { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { scroll-behavior: auto!important; transition-duration: .001ms!important; animation-duration: .001ms!important; animation-iteration-count: 1!important; }
}
