:root {
  --bg-0: #f3f5f7;
  --bg-1: #ffffff;
  --line: #d7dee5;
  --text: #102030;
  --muted: #5b6b7b;
  --brand: #1f87d0;
  --brand-deep: #1a6ead;
  --warn: #cc6d00;
  --danger: #b32640;
  --ok: #16895a;
  --shadow: 0 10px 28px rgba(17, 32, 49, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  color: var(--text);
  font-family: "Space Grotesk", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, #f6f8fb 0%, #eef2f6 100%);
}

a {
  color: inherit;
}

.shell {
  width: min(1560px, 98vw);
  margin: 0 auto;
  padding: 12px 0 30px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.shell > .nav {
  grid-column: 1;
  grid-row: 1 / span 60;
}

.shell > .topbar,
.shell > .panel {
  grid-column: 2;
}

.topbar {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(120deg, #ffffff 0%, #f2f6fb 88%);
  box-shadow: var(--shadow);
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 16px 20px;
}

.title {
  margin: 0;
  font-size: 26px;
  letter-spacing: 0.2px;
}

.subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.session-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  min-width: 240px;
  text-align: right;
}

.lang-switcher {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.lang-switch-btn {
  min-height: 28px;
  min-width: 56px;
  padding: 0 10px;
}

.lang-switch-btn.is-active {
  border-color: #0f8a6b;
  background: linear-gradient(120deg, #0f8a6b, #0d7057);
  color: #fff;
}

.session-line {
  font-size: 13px;
  color: var(--muted);
}

.roles {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.role-tag {
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid #9ec2b2;
  background: #e8f7f0;
  color: #134534;
  font-size: 12px;
}

.nav {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  margin: 0;
  border-radius: 14px;
  border: 1px solid #0d304b;
  background: linear-gradient(180deg, #07243a 0%, #041a2c 100%);
  padding: 14px 10px 12px;
  box-shadow: 0 14px 26px rgba(4, 23, 39, 0.35);
  position: sticky;
  top: 10px;
}

.nav::before {
  content: "设备管理后台";
  color: #eff7ff;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.2px;
  padding: 2px 8px 12px;
  border-bottom: 1px solid rgba(159, 194, 219, 0.28);
  margin-bottom: 6px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: #c8dcec;
  text-decoration: none;
  padding: 0 12px;
  font-size: 14px;
  transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.nav-link:hover {
  color: #f2f8fd;
  background: rgba(28, 119, 184, 0.24);
  border-color: rgba(123, 177, 213, 0.45);
}

.nav-link.active {
  border-color: rgba(145, 196, 231, 0.65);
  color: #fff;
  background: linear-gradient(120deg, #1f87d0, #1a6ead);
}

.panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-1);
  box-shadow: var(--shadow);
  padding: 14px;
}

.panel + .panel {
  margin-top: 12px;
}

.aging-layer {
  position: relative;
}

.aging-zone-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.aging-zone-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid #cfe2da;
  background: #eff8f4;
  color: #2f5a4f;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.aging-page-shell .aging-overview-cards .summary-main,
.aging-page-shell .aging-latest-cards .summary-main {
  font-size: 15px;
  min-height: 46px;
  display: flex;
  align-items: center;
  line-height: 1.45;
  word-break: break-word;
}

.aging-page-shell .aging-overview-cards .summary-row strong {
  max-width: 66%;
  text-align: right;
}

.aging-page-shell .aging-subtitle {
  margin: 0;
}

.aging-page-shell .action-zone-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.aging-page-shell .action-zone-card {
  border: 1px solid #e2c8ce;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  padding: 10px;
  display: grid;
  gap: 8px;
}

.aging-page-shell .action-cluster {
  gap: 8px;
}

.aging-page-shell .action-cluster button {
  min-height: 38px;
}

.aging-page-shell .aging-layer-f {
  border-style: dashed;
}

.aging-page-shell .aging-layer-f .diagnostics-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.aging-page-shell .aging-layer-f .diag-card {
  background: #f5faf8;
}

.aging-page-shell .aging-truth-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.aging-page-shell .aging-json-box {
  margin: 0;
  border: 1px solid #d6e2dd;
  border-radius: 10px;
  background: #f8fcfa;
  color: #1f3d37;
  padding: 10px;
  font-size: 12px;
  line-height: 1.45;
  max-height: 280px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.aging-page-shell .action-zone-card.hidden {
  display: none;
}

.inventory-page-shell {
  display: grid;
  gap: 12px;
}

.inventory-breadcrumb {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.inventory-subtitle {
  margin-top: 4px;
}

.inventory-layer {
  position: relative;
}

.inventory-zone-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.inventory-zone-subtitle {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.inventory-zone-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid #cfe2da;
  background: #eff8f4;
  color: #2f5a4f;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.inventory-zone-tag-risk {
  border-color: #e4b8c2;
  background: #fff1f5;
  color: #8f2840;
}

.inventory-summary-cards .summary-main {
  min-height: 42px;
  display: flex;
  align-items: center;
}

.inventory-summary-cards .summary-row strong {
  max-width: 68%;
  text-align: right;
  word-break: break-word;
}

.inventory-field-wide {
  min-width: min(260px, 100%);
  flex: 1 1 260px;
}

.inventory-layer-filter .toolbar {
  margin-bottom: 0;
}

.inventory-layer-table .toolbar {
  align-items: center;
}

.inventory-layer-normal {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfa 100%);
}

.inventory-layer-risk .risk-toolbar {
  margin-bottom: 0;
}

.inventory-layer-tech .fold-summary {
  margin: 0;
}

.inventory-diagnostics-grid .diag-card {
  background: #f5faf8;
}

.inventory-layer-history {
  background: linear-gradient(180deg, #ffffff 0%, #f7fbf9 100%);
}

.inventory-history-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.inventory-history-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  border: 1px solid #d8e5df;
  border-radius: 10px;
  background: #fcfefd;
  padding: 8px 10px;
}

.inventory-history-item.ok {
  border-color: #b9ddca;
  background: #f1fbf6;
}

.inventory-history-item.warn {
  border-color: #ecd1aa;
  background: #fff8ee;
}

.inventory-history-item.error {
  border-color: #e7bec7;
  background: #fff2f5;
}

.inventory-history-badge {
  min-width: 66px;
  text-align: center;
  border-radius: 999px;
  border: 1px solid #d4e3dc;
  background: #f2f8f5;
  color: #35534d;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
}

.inventory-history-text {
  font-size: 13px;
  color: #21433b;
  word-break: break-word;
}

.inventory-history-time {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.inventory-history-empty {
  border: 1px dashed #d5e2dc;
  border-radius: 10px;
  background: #fafdfb;
  color: var(--muted);
  text-align: center;
  padding: 10px;
}

.index-page-shell {
  display: grid;
  gap: 12px;
}

.index-breadcrumb {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.index-subtitle {
  margin-top: 4px;
}

.index-layer {
  position: relative;
}

.index-zone-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.index-zone-subtitle {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.index-zone-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid #cfe2da;
  background: #eff8f4;
  color: #2f5a4f;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.index-field-wide {
  min-width: min(300px, 100%);
  flex: 1 1 300px;
}

.index-layer-filter {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfa 100%);
}

.index-summary-cards .summary-main {
  min-height: 42px;
  display: flex;
  align-items: center;
}

.index-summary-main-text {
  font-size: 16px;
  line-height: 1.4;
  word-break: break-word;
}

.index-layer-results .toolbar {
  align-items: center;
}

.index-tech-col {
  color: #45605a;
}

.index-tech-cell {
  color: #4f6763;
  font-size: 12px;
}

.index-layer-row-actions {
  background: linear-gradient(180deg, #ffffff 0%, #f7fbf9 100%);
}

.index-route-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  color: #24423b;
  font-size: 13px;
}

.index-layer-tools {
  border-style: dashed;
}

.index-layer-tools .toolbar {
  margin-bottom: 0;
}

.index-layer-tech .diag-card {
  background: #f5faf8;
}

.index-layer-feedback {
  background: linear-gradient(180deg, #ffffff 0%, #f7fbf9 100%);
}

.index-layer-feedback .message {
  margin-top: 0;
}

.index-history-list {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.index-history-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  border: 1px solid #d8e5df;
  border-radius: 10px;
  background: #fcfefd;
  padding: 8px 10px;
}

.index-history-item.ok {
  border-color: #b9ddca;
  background: #f1fbf6;
}

.index-history-item.warn {
  border-color: #ecd1aa;
  background: #fff8ee;
}

.index-history-item.error {
  border-color: #e7bec7;
  background: #fff2f5;
}

.index-history-badge {
  min-width: 66px;
  text-align: center;
  border-radius: 999px;
  border: 1px solid #d4e3dc;
  background: #f2f8f5;
  color: #35534d;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
}

.index-history-text {
  font-size: 13px;
  color: #21433b;
  word-break: break-word;
}

.index-history-time {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.index-history-empty {
  border: 1px dashed #d5e2dc;
  border-radius: 10px;
  background: #fafdfb;
  color: var(--muted);
  text-align: center;
  padding: 10px;
}

.usage-page-shell {
  display: grid;
  gap: 12px;
}

.usage-breadcrumb {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.usage-subtitle {
  margin-top: 4px;
}

.usage-layer {
  position: relative;
}

.usage-zone-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.usage-zone-subtitle {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.usage-zone-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid #cfe2da;
  background: #eff8f4;
  color: #2f5a4f;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.usage-layer-query {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfa 100%);
}

.usage-query-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.usage-query-actions {
  margin-bottom: 6px;
}

.usage-summary-cards {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.usage-summary-main {
  min-height: 38px;
  display: flex;
  align-items: center;
  line-height: 1.35;
  word-break: break-word;
}

.usage-summary-hint {
  margin: 0;
  font-size: 12px;
  color: #35524c;
  line-height: 1.5;
}

.usage-summary-foot {
  margin: 0;
  font-size: 12px;
  color: #35524c;
}

.usage-layer-trend .toolbar {
  margin-bottom: 8px;
}

.usage-mode-field {
  min-width: min(220px, 100%);
}

.usage-layer-consumption {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfa 100%);
}

.usage-layer-recharge {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfa 100%);
}

.usage-tech-col {
  color: #4f6763;
  font-size: 12px;
}

.usage-tech-cell {
  color: #4f6763;
  font-size: 12px;
}

.usage-layer-feedback {
  background: linear-gradient(180deg, #ffffff 0%, #f7fbf9 100%);
}

.usage-feedback-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 10px;
}

.usage-feedback-title {
  margin: 0 0 6px;
  font-size: 13px;
  color: #2f4a45;
}

.usage-history-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.usage-history-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  border: 1px solid #d8e5df;
  border-radius: 10px;
  background: #fcfefd;
  padding: 8px 10px;
}

.usage-history-item.ok {
  border-color: #b9ddca;
  background: #f1fbf6;
}

.usage-history-item.warn {
  border-color: #ecd1aa;
  background: #fff8ee;
}

.usage-history-item.error {
  border-color: #e7bec7;
  background: #fff2f5;
}

.usage-history-badge {
  min-width: 58px;
  text-align: center;
  border-radius: 999px;
  border: 1px solid #d4e3dc;
  background: #f2f8f5;
  color: #35534d;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
}

.usage-history-text {
  font-size: 13px;
  color: #21433b;
  word-break: break-word;
}

.usage-history-time {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.usage-history-empty {
  border: 1px dashed #d5e2dc;
  border-radius: 10px;
  background: #fafdfb;
  color: var(--muted);
  text-align: center;
  padding: 10px;
}

.usage-layer-tech .fold-summary {
  margin: 0;
}

.usage-tech-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 12px 14px 14px;
}

.usage-tech-list {
  margin: 8px 0 0;
  padding-left: 18px;
  color: #24423b;
  display: grid;
  gap: 4px;
}

.panel-title {
  margin: 0 0 10px;
  font-size: 17px;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.toolbar-right {
  margin-left: auto;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-size: 12px;
  color: var(--muted);
}

input,
select,
button,
textarea {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  padding: 8px 10px;
}

textarea {
  resize: vertical;
}

button {
  min-height: 36px;
  border: none;
  border-radius: 10px;
  padding: 0 12px;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
}

button:hover {
  background: var(--brand-deep);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

button.ghost {
  border: 1px solid var(--line);
  background: #eef4f1;
  color: #26423d;
}

button.warn {
  background: #bf6808;
}

button.warn:hover {
  background: #9e5506;
}

.message {
  margin: 10px 0 0;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #f8faf9;
  color: var(--muted);
  padding: 8px 10px;
  font-size: 13px;
}

.message.ok {
  border-color: #9fd7bc;
  background: #edfbf4;
  color: #1a5f43;
}

.message.warn {
  border-color: #e7c18f;
  background: #fff5e8;
  color: #875300;
}

.message.error {
  border-color: #e4a3b2;
  background: #ffeeF3;
  color: #8d2238;
}

.message:empty {
  display: none;
}

.hint {
  font-size: 12px;
  color: var(--muted);
}

.branding-preview {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fcfa;
  padding: 10px;
}

.branding-preview img {
  display: block;
  max-width: 100%;
  max-height: 96px;
  border: 1px solid #d8e3de;
  border-radius: 8px;
  background: #fff;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
}

.pill.online {
  border-color: #9fd7bc;
  background: #e7f9f0;
  color: #146247;
}

.pill.offline {
  border-color: #e1b7bf;
  background: #fceef2;
  color: #8f2840;
}

.pill.neutral {
  border-color: #d8e3de;
  background: #f3f7f5;
  color: #35534d;
}

.pill.warn {
  border-color: #e7c18f;
  background: #fff5e8;
  color: #875300;
}

.pill.danger {
  border-color: #e1b7bf;
  background: #fceef2;
  color: #8f2840;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

th,
td {
  border-bottom: 1px solid #e7efeb;
  padding: 10px 12px;
  text-align: left;
  font-size: 13px;
  vertical-align: middle;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f5faf7;
  color: #2f4a45;
}

.actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 10px;
  text-decoration: none;
  font-size: 12px;
  background: #f7fbf9;
  color: #1d423b;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.stats-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.summary-cards {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.summary-card {
  border: 1px solid #d5e2dc;
  border-radius: 12px;
  background: #f8fcfa;
  padding: 10px;
  display: grid;
  gap: 6px;
}

.summary-title {
  margin: 0;
  font-size: 13px;
  color: #294640;
}

.summary-main {
  font-size: 20px;
  font-weight: 700;
  min-height: 30px;
}

.summary-main-badge {
  display: flex;
  align-items: center;
}

.summary-main-pair {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px dashed #d8e3de;
  padding-top: 4px;
  font-size: 12px;
  color: #3a5751;
}

.summary-row strong {
  color: #18322d;
}

.key-event-strip {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.key-event-item {
  border: 1px solid #d9e6e0;
  border-radius: 12px;
  background: #f9fcfb;
  padding: 10px;
}

.key-event-label {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.2px;
  text-transform: uppercase;
}

.key-event-value {
  margin-top: 4px;
  font-size: 15px;
  font-weight: 700;
}

.key-event-sub {
  margin-top: 5px;
  font-size: 12px;
  color: #39544e;
}

.high-risk-panel {
  border-color: #e4b8c2;
  background: linear-gradient(180deg, #fff9fa 0%, #fff3f6 100%);
}

.high-risk-panel .panel-title {
  color: #8f2840;
}

.risk-toolbar {
  align-items: flex-end;
}

.diagnostics-panel {
  padding: 0;
  overflow: hidden;
}

.fold-summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  border-bottom: 1px solid #dbe7e2;
  background: #f4faf7;
}

.diagnostics-panel details[open] .fold-summary {
  background: #ecf7f1;
}

.diagnostics-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 12px 14px 14px;
}

.diag-card {
  border: 1px solid #d9e6e0;
  border-radius: 12px;
  background: #f8fbfa;
  padding: 10px;
}

.diag-title {
  margin: 0 0 8px;
  font-size: 13px;
}

.compact-grid {
  grid-template-columns: 150px 1fr;
}

.stat-card {
  border: 1px solid #d5e2dc;
  border-radius: 12px;
  background: #f8fcfa;
  padding: 10px;
}

.stat-label {
  font-size: 12px;
  color: var(--muted);
}

.stat-value {
  margin-top: 4px;
  font-size: 22px;
  font-weight: 700;
}

.stat-sub {
  margin-top: 3px;
  font-size: 12px;
  color: #35524c;
}

.detail-grid {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 8px 14px;
}

.detail-k {
  font-size: 13px;
  color: var(--muted);
}

.detail-v {
  font-size: 13px;
}

.chart-wrap {
  min-height: 320px;
}

.empty {
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.login-page-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
}

.account-create-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.route-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: #2b4257;
  font-size: 13px;
}

.login-page-card {
  width: min(560px, 100%);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow);
  padding: 20px;
  display: grid;
  gap: 14px;
}

.login-page-header {
  display: grid;
  gap: 8px;
  border-bottom: 1px solid #dce7e2;
  padding-bottom: 10px;
}

.login-state-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.login-state-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #d8e3de;
  background: #f3f7f5;
  color: #35534d;
  font-size: 12px;
  font-weight: 600;
}

.login-state-pill.state-unauth {
  border-color: #d8e3de;
  background: #f3f7f5;
  color: #35534d;
}

.login-state-pill.state-working {
  border-color: #e7c18f;
  background: #fff5e8;
  color: #875300;
}

.login-state-pill.state-error {
  border-color: #e1b7bf;
  background: #fceef2;
  color: #8f2840;
}

.login-state-pill.state-auth {
  border-color: #9fd7bc;
  background: #e7f9f0;
  color: #146247;
}

.login-state-text {
  font-size: 13px;
  color: #33554d;
}

.login-zone {
  border: 1px solid #d5e2dc;
  border-radius: 12px;
  background: #f8fcfa;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.zone-title {
  margin: 0;
  font-size: 14px;
  color: #294640;
}

.login-zone-note {
  margin: 0;
  font-size: 12px;
  color: #47625d;
}

.login-form {
  display: grid;
  gap: 10px;
}

.login-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.login-actions button {
  min-height: 38px;
}

.login-meta-grid {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 8px 10px;
}

.login-roles-label {
  margin-top: 6px;
}

.login-role-list {
  justify-content: flex-start;
}

.login-zone-tech {
  border-style: dashed;
  background: #f7faf8;
}

.login-zone-tech summary {
  cursor: pointer;
  font-size: 13px;
  color: #33554d;
  font-weight: 600;
}

.login-feedback {
  margin-top: 0;
}

.meta {
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 1100px) {
  .shell {
    width: 96vw;
    display: block;
  }

  .nav {
    position: static;
    margin-bottom: 12px;
  }

  .usage-query-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .usage-summary-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .usage-feedback-grid {
    grid-template-columns: 1fr;
  }

  .usage-tech-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .summary-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .key-event-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .aging-page-shell .action-zone-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .aging-page-shell .aging-truth-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .usage-zone-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .usage-query-grid {
    grid-template-columns: 1fr;
  }

  .usage-summary-cards {
    grid-template-columns: 1fr;
  }

  .usage-history-item {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .shell {
    width: 95vw;
    padding-top: 10px;
    display: block;
  }

  .nav {
    position: static;
    margin-bottom: 12px;
  }

  .nav::before {
    padding-bottom: 8px;
  }

  .topbar-inner {
    padding: 12px;
  }

  .title {
    font-size: 22px;
  }

  .session-box {
    text-align: left;
    min-width: 100%;
  }

  .roles {
    justify-content: flex-start;
  }

  .account-create-grid {
    grid-template-columns: 1fr;
  }

  .toolbar-right {
    margin-left: 0;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .summary-cards {
    grid-template-columns: 1fr;
  }

  .key-event-strip {
    grid-template-columns: 1fr;
  }

  .diagnostics-grid {
    grid-template-columns: 1fr;
  }

  .aging-page-shell .action-zone-grid {
    grid-template-columns: 1fr;
  }

  .aging-page-shell .aging-truth-grid {
    grid-template-columns: 1fr;
  }

  .login-actions {
    grid-template-columns: 1fr;
  }

  .login-meta-grid {
    grid-template-columns: 1fr;
  }

  .inventory-zone-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .inventory-history-item {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .index-zone-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .index-history-item {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .compact-grid {
    grid-template-columns: 1fr;
  }
}
