:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172033;
  background: #f4f7fb;
  letter-spacing: 0;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #edf2f8;
}

.login-panel {
  width: min(420px, 100%);
  background: #fff;
  border: 1px solid #dce5ef;
  border-radius: 8px;
  padding: 38px;
  box-shadow: 0 18px 48px rgba(23, 32, 51, 0.12);
}

.brand-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e90820;
  color: #fff;
  font-weight: 900;
  border: 6px solid #075798;
  margin-bottom: 24px;
}
      .footer {
        border-top: 1px solid var(--line);
        padding: 16px 26px;
        color: #ffffff;
        font-size: 12px;
        line-height: 1.5;
}

.brand-mark.small { width: 42px; height: 42px; margin: 0; font-size: 12px; border-width: 4px; }
.logo-mark {
  display: block;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
}
.login-logo {
  width: 74px;
  height: 74px;
  margin: 0 0 20px;
  padding: 4px;
  box-shadow: 0 8px 24px rgba(7, 63, 116, 0.12);
}
.sidebar-logo {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  padding: 3px;
}
.login-panel h1 { margin: 0; color: #063d73; font-size: 28px; }
.login-panel > p { margin: 6px 0 28px; color: #718096; }
label { display: grid; gap: 8px; margin-bottom: 18px; color: #344054; font-size: 13px; font-weight: 700; }
input, textarea, select {
  width: 100%;
  border: 1px solid #cfd9e6;
  border-radius: 6px;
  background: #fff;
  color: #172033;
  padding: 12px 14px;
  outline: none;
}
input:focus, textarea:focus, select:focus { border-color: #075798; box-shadow: 0 0 0 3px rgba(7, 87, 152, 0.12); }
button {
  border: 0;
  border-radius: 6px;
  background: #075798;
  color: #fff;
  padding: 11px 16px;
  font-weight: 800;
}
button:hover { background: #064b84; }
button.danger-button { background: #c8192e; }
button.danger-button:hover { background: #a81225; }
button.warning-button { background: #b65c00; }
button.warning-button:hover { background: #984d00; }
.login-panel form > button { width: 100%; min-height: 48px; }
.form-error { min-height: 20px; margin-top: 14px; color: #c8192e; font-size: 13px; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: #083d70;
  color: #fff;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 28px; border-bottom: 1px solid rgba(255,255,255,.12); }
.brand strong, .brand span { display: block; }
.brand span { margin-top: 3px; color: #b7cee5; font-size: 12px; }
nav { display: grid; gap: 6px; margin-top: 24px; }
.nav-item {
  text-align: left;
  color: #c9d9e9;
  background: transparent;
  padding: 12px 14px;
}
.nav-item:hover, .nav-item.active { color: #fff; background: rgba(255,255,255,.12); }
.logout-button { margin-top: auto; background: transparent; border: 1px solid rgba(255,255,255,.28); }
.logout-button:hover { background: rgba(255,255,255,.1); }
.workspace { min-width: 0; padding: 0 34px 40px; }
.topbar {
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #dce5ef;
  margin-bottom: 30px;
}
.topbar h2 { margin: 0 0 5px; color: #073f74; font-size: 23px; }
.topbar span { color: #7b8798; font-size: 12px; }
.icon-button { width: 42px; height: 42px; padding: 0; font-size: 22px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.metric, .service-row, .cache-grid article, .tool-panel, .history-panel, .action-band, .log-toolbar, pre {
  background: #fff;
  border: 1px solid #dce5ef;
  border-radius: 8px;
}
.metric { padding: 20px; min-height: 140px; }
.metric span { display: block; color: #6c7889; font-size: 13px; font-weight: 700; }
.metric strong { display: block; margin: 16px 0 8px; color: #073f74; font-size: 27px; }
.metric small { color: #8793a4; }
.progress { height: 7px; margin-top: 16px; background: #e8eef5; overflow: hidden; border-radius: 4px; }
.progress i { display: block; height: 100%; width: 0; background: #e90820; transition: width .25s ease; }
.section-heading { display: flex; justify-content: space-between; align-items: end; margin: 30px 0 14px; }
h3 { margin: 0; color: #073f74; }
.section-heading p, .action-band p, .log-toolbar p { margin: 5px 0 0; color: #7b8798; font-size: 13px; }
.service-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.service-row { padding: 18px 20px; display: flex; justify-content: space-between; align-items: center; }
.service-row b { color: #16834a; font-size: 12px; }
.service-row b.offline { color: #c8192e; }
.action-band, .log-toolbar { padding: 22px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.cache-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.cache-grid article { padding: 20px; display: flex; justify-content: space-between; align-items: center; }
.cache-grid span { color: #697586; font-size: 13px; font-weight: 700; }
.cache-grid strong { color: #073f74; font-size: 24px; }
.cache-date { margin-top: 16px; color: #697586; font-size: 13px; }
.notice { margin-top: 16px; padding: 13px 15px; border-radius: 6px; background: #eaf6ef; color: #17643c; font-size: 13px; }
.notice.error { background: #fdecee; color: #a81225; }
.notification-layout { display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 1fr); gap: 18px; }
.category-fieldset {
  border: 1px solid #dce5ef;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
  padding: 14px;
}
.category-fieldset legend {
  color: #344054;
  font-size: 13px;
  font-weight: 800;
  padding: 0 6px;
}
.check-option {
  align-items: center;
  display: flex;
  gap: 10px;
  margin: 0;
}
.check-option input { width: auto; }
.notification-history-list { display: grid; gap: 10px; }
.notification-history-item {
  padding: 14px;
  border: 1px solid #dce5ef;
  border-radius: 8px;
  background: #fff;
}
.notification-history-item strong,
.notification-history-item p,
.notification-history-item small { display: block; }
.notification-history-item p { margin: 8px 0; color: #425466; }
.notification-history-item small { color: #748399; }
.notification-breakdown { margin-top: 6px; font-weight: 700; color: #003f73 !important; }
.notification-errors {
  margin-top: 8px;
  border-radius: 8px;
  background: #fff1f2;
  color: #b91c1c;
  font-size: 12px;
  line-height: 1.5;
  padding: 8px 10px;
}
.digital-id-list { display: grid; gap: 10px; margin-top: 16px; }
.digital-id-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 14px;
  padding: 16px;
  border: 1px solid #dce5ef;
  border-radius: 8px;
  background: #fff;
}
.digital-id-item b {
  align-self: start;
  grid-row: span 3;
  border-radius: 999px;
  padding: 7px 10px;
  color: #fff;
  font-size: 12px;
}
.digital-id-item b.valid { background: #16834a; }
.digital-id-item b.invalid { background: #c8192e; }
.digital-id-item strong { color: #073f74; font-size: 15px; }
.digital-id-item p { margin: 0; color: #425466; }
.digital-id-item small { color: #748399; line-height: 1.45; }
.form-list { display: grid; gap: 10px; margin-top: 16px; }
.form-item {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 6px 14px;
  padding: 14px 16px;
  border: 1px solid #dce5ef;
  border-radius: 8px;
  background: #fff;
}
.form-type-badge {
  align-self: start;
  grid-row: span 3;
  border-radius: 999px;
  padding: 5px 9px;
  background: #0b5fa5;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
}
.form-item strong { color: #073f74; font-size: 15px; }
.form-item small { color: #748399; line-height: 1.45; }
.form-field-list {
  display: grid;
  gap: 5px;
  margin: 4px 0 0;
}
.form-field-list div {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 10px;
}
.form-field-list dt {
  color: #697586;
  font-size: 13px;
  font-weight: 800;
}
.form-field-list dd {
  margin: 0;
  color: #243b53;
  font-size: 14px;
  line-height: 1.35;
  word-break: break-word;
}
.tool-panel, .history-panel { padding: 24px; }
.tool-panel h3, .history-panel h3 { margin-bottom: 22px; }
.tool-description { margin: -10px 0 22px; color: #7b8798; font-size: 13px; line-height: 1.55; }
.tool-panel button { width: 100%; }
.settings-panel { width: min(560px, 100%); }
.server-layout { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 18px; }
.server-actions { display: grid; gap: 10px; }
.command-row { display: grid; grid-template-columns: minmax(0, 1fr) 140px; gap: 10px; }
.command-row button { width: auto; }
.empty-state { padding: 40px 16px; text-align: center; color: #8793a4; border: 1px dashed #cfd9e6; }
pre {
  margin: 16px 0 0;
  min-height: 460px;
  max-height: 65vh;
  overflow: auto;
  padding: 20px;
  background: #101722;
  color: #d8e4ef;
  font: 12px/1.65 "Cascadia Code", Consolas, monospace;
  white-space: pre-wrap;
}

@media (max-width: 1000px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .notification-layout { grid-template-columns: 1fr; }
  .server-layout { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; padding: 16px; }
  .brand { padding-bottom: 16px; }
  nav { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 16px; }
  .logout-button { margin-top: 14px; }
  .workspace { padding: 0 16px 28px; }
  .topbar { height: 78px; }
  .metric-grid, .service-grid, .cache-grid { grid-template-columns: 1fr; }
  .action-band, .log-toolbar { align-items: stretch; flex-direction: column; }
  .action-band button, .log-toolbar button { width: 100%; }
  .command-row { grid-template-columns: 1fr; }
  .command-row button { width: 100%; }
}
