:root {
  color-scheme: light;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f3f5f7;
  color: #182230;
}

* { box-sizing: border-box; }
body { margin: 0; background: #f3f5f7; color: #182230; }
button, input { font: inherit; }

.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.admin-shell__side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  padding: 22px 16px 18px; background: #111827; border-right: 1px solid #273244; color: #f8fafc;
}
.admin-shell__brand { display: flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; margin: 0 8px 28px; }
.admin-shell__brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 7px; background: #2f6fed; color: #fff; font-weight: 800; }
.admin-shell__brand strong, .admin-shell__brand small { display: block; }
.admin-shell__brand strong { font-size: 15px; line-height: 1.25; }
.admin-shell__brand small { margin-top: 2px; color: #98a2b3; font-size: 11px; }
.admin-shell__nav { display: grid; gap: 20px; overflow-y: auto; }
.admin-shell__nav-group { display: grid; gap: 3px; }
.admin-shell__nav-group h2 { margin: 0 10px 6px; color: #667085; font-size: 10px; line-height: 1.4; text-transform: uppercase; letter-spacing: .08em; }
.admin-shell__nav-item { position: relative; display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 8px 10px; border-radius: 6px; color: #cbd5e1; font-size: 13px; font-weight: 550; text-decoration: none; }
.admin-shell__nav-marker { width: 5px; height: 5px; border-radius: 50%; background: #475467; }
.admin-shell__nav-item:hover, .admin-shell__nav-item:focus-visible { background: #1e293b; color: #fff; outline: none; }
.admin-shell__nav-item.is-active { background: #263449; color: #fff; }
.admin-shell__nav-item.is-active .admin-shell__nav-marker { background: #5b8def; box-shadow: 0 0 0 3px rgba(91,141,239,.18); }
.admin-shell__environment { display: flex; align-items: center; gap: 8px; margin: auto 8px 0; padding-top: 18px; border-top: 1px solid #273244; color: #98a2b3; font-size: 12px; }
.admin-shell__environment span { width: 7px; height: 7px; border-radius: 50%; background: #17b26a; box-shadow: 0 0 0 3px rgba(23,178,106,.14); }

.admin-shell__main { width: 100%; max-width: 1560px; padding: 30px 34px 48px; }
.admin-shell__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.admin-shell__eyebrow { margin: 0 0 6px; color: #667085; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.admin-shell__title { margin: 0; color: #101828; font-size: 26px; line-height: 1.2; letter-spacing: 0; }
.admin-shell__subtitle { margin: 7px 0 0; color: #667085; font-size: 14px; }
.admin-shell__header button, .admin-login button { min-height: 38px; padding: 8px 13px; border: 1px solid #cfd6df; border-radius: 6px; background: #fff; color: #344054; cursor: pointer; font-weight: 650; }
.admin-shell__header button:hover, .admin-shell__header button:focus-visible { border-color: #98a2b3; background: #f9fafb; outline: 2px solid #dbe7ff; }

.admin-shell__metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 18px; border: 1px solid #d8dee8; border-radius: 8px; background: #fff; overflow: hidden; }
.admin-shell__metrics > div { display: grid; grid-template-columns: 1fr auto; gap: 3px 16px; padding: 17px 20px; border-right: 1px solid #e4e7ec; }
.admin-shell__metrics > div:last-child { border-right: 0; }
.admin-shell__metrics span { color: #667085; font-size: 12px; font-weight: 650; }
.admin-shell__metrics strong { grid-row: span 2; align-self: center; color: #101828; font-size: 24px; line-height: 1; }
.admin-shell__metrics small { color: #98a2b3; font-size: 11px; }

.admin-shell__grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr); gap: 18px; align-items: start; }
.admin-shell__panel { min-width: 0; padding: 20px; border: 1px solid #d8dee8; border-radius: 8px; background: #fff; box-shadow: 0 1px 2px rgba(16,24,40,.03); }
.admin-shell__panel--wide { width: 100%; }
.admin-shell__panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid #eaecf0; }
.admin-shell__panel-heading span { color: #667085; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.admin-shell__panel-heading h2 { margin: 4px 0 0; color: #101828; font-size: 17px; letter-spacing: 0; }
.admin-shell__panel-heading .admin-shell__status { padding: 4px 8px; border-radius: 999px; background: #ecfdf3; color: #067647; font-size: 10px; white-space: nowrap; }
.admin-shell__contracts, .admin-shell__repair, .admin-shell__directory { display: grid; gap: 0; margin: 5px 0 0; padding: 0; list-style: none; }
.admin-shell__contracts li, .admin-shell__repair > li, .admin-shell__directory li { min-width: 0; padding: 12px 2px; border-bottom: 1px solid #eef1f4; }
.admin-shell__contracts li { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.admin-shell__contracts li > span { padding: 3px 7px; border-radius: 4px; background: #f2f4f7; color: #475467; font-size: 10px; font-weight: 700; }
.admin-shell__repair > li { display: grid; gap: 7px; }
.admin-shell__repair > li:has(> a) { grid-template-columns: 1fr auto; }
.admin-shell__repair a { color: #245fc5; font-weight: 650; text-decoration: none; }
.admin-shell__repair a:hover, .admin-shell__directory a:hover strong { text-decoration: underline; }
.admin-shell__repair li > div { display: flex; justify-content: space-between; gap: 12px; }
.admin-shell__repair li > div span, .admin-shell__repair li > span { color: #667085; font-size: 12px; }
.admin-shell__directory li a { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: inherit; text-decoration: none; }
.admin-shell__directory li span { color: #667085; font-size: 12px; }
.admin-shell__empty { display: grid !important; justify-content: start !important; }
.admin-shell__empty span { padding: 0 !important; background: none !important; font-size: 12px !important; font-weight: 400 !important; }
.admin-shell__empty-state { display: grid; justify-items: start; gap: 5px; min-height: 150px; align-content: center; padding: 24px; color: #667085; }
.admin-shell__empty-state strong { color: #344054; font-size: 14px; }
.admin-shell__empty-state span { font-size: 12px; }
.admin-shell__module-intro { margin: 16px 0 10px; color: #667085; font-size: 13px; line-height: 1.5; }
.admin-shell__capabilities { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.admin-shell__capability { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, .9fr) auto; gap: 18px; align-items: center; padding: 14px 2px; border-bottom: 1px solid #eef1f4; }
.admin-shell__capability > div { display: grid; gap: 4px; min-width: 0; }
.admin-shell__capability strong { color: #344054; font-size: 13px; }
.admin-shell__capability span { color: #667085; font-size: 12px; line-height: 1.4; }
.admin-shell__capability code { min-width: 0; }
.admin-shell__capability-link, .admin-shell__capability-action { justify-self: end; padding: 6px 9px; border-radius: 6px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.admin-shell__capability-link { color: #245fc5; text-decoration: none; background: #eff4ff; }
.admin-shell__capability-link:hover, .admin-shell__capability-link:focus-visible { text-decoration: underline; outline: 2px solid #dbe7ff; outline-offset: 2px; }
.admin-shell__capability-action { color: #b54708; background: #fff8ed; }
.admin-shell__queue-status { display: grid; }
.admin-shell__queue-row { display: grid; grid-template-columns: minmax(0, 1fr) 88px 88px; gap: 16px; align-items: center; padding: 14px 2px; border-bottom: 1px solid #eef1f4; }
.admin-shell__queue-row > div { display: grid; gap: 3px; }
.admin-shell__queue-row > div:not(:first-child) { text-align: right; }
.admin-shell__queue-row strong { color: #344054; font-size: 13px; }
.admin-shell__queue-row span { color: #667085; font-size: 11px; }
code { min-width: 0; color: #344054; font-family: "SFMono-Regular", Consolas, monospace; font-size: 11px; overflow-wrap: anywhere; }

.admin-shell__repair-confirm { display: grid; gap: 9px; width: 100%; padding: 10px 12px; border-radius: 6px; background: #fff8ed; }
.admin-shell__repair-confirm summary { cursor: pointer; color: #b54708; font-size: 12px; font-weight: 700; }
.admin-shell__repair-confirm p, .admin-shell__repair-confirm label { margin: 0; color: #475467; font-size: 12px; }
.admin-shell__repair-confirm form { display: grid; gap: 9px; }
.admin-shell__repair-confirm button { width: fit-content; min-height: 36px; padding: 7px 11px; border: 0; border-radius: 6px; background: #b42318; color: #fff; cursor: pointer; font-weight: 700; }

.admin-login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #111827; }
.admin-login .admin-shell__panel { width: min(420px, 100%); padding: 28px; }
.admin-login .admin-shell__brand { color: #101828; margin: 0 0 24px; }
.admin-login h1 { margin: 0; font-size: 22px; }
.admin-login p { color: #667085; }
.admin-login form { display: grid; gap: 10px; margin-top: 20px; }
.admin-login label { color: #344054; font-size: 12px; font-weight: 650; }
.admin-login input { min-height: 42px; padding: 9px 12px; border: 1px solid #b8c1d1; border-radius: 6px; }
.admin-login input:focus { border-color: #2f6fed; outline: 3px solid #dbe7ff; }
.admin-login button { background: #245fc5; border-color: #245fc5; color: #fff; }
.admin-login__error { color: #b42318 !important; font-weight: 650; }

@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-shell__side { position: static; height: auto; padding: 16px; }
  .admin-shell__brand { margin-bottom: 16px; }
  .admin-shell__nav { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; overflow: visible; }
  .admin-shell__environment { margin-top: 16px; }
  .admin-shell__main { padding: 24px; }
}

@media (max-width: 640px) {
  .admin-shell__nav { grid-template-columns: 1fr; }
  .admin-shell__nav-group { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; }
  .admin-shell__nav-group h2 { grid-column: 1 / -1; }
  .admin-shell__nav-item { min-height: 34px; padding: 7px 8px; }
  .admin-shell__header { align-items: stretch; }
  .admin-shell__header form { flex: 0 0 auto; }
  .admin-shell__title { font-size: 22px; }
  .admin-shell__metrics, .admin-shell__grid { grid-template-columns: 1fr; }
  .admin-shell__metrics > div { border-right: 0; border-bottom: 1px solid #e4e7ec; }
  .admin-shell__metrics > div:last-child { border-bottom: 0; }
  .admin-shell__main { padding: 20px 14px 36px; }
  .admin-shell__panel { padding: 16px; }
  .admin-shell__contracts li { align-items: flex-start; flex-direction: column; }
  .admin-shell__capability { grid-template-columns: 1fr; gap: 8px; }
  .admin-shell__capability-link, .admin-shell__capability-action { justify-self: start; }
  .admin-shell__queue-row { grid-template-columns: minmax(0, 1fr) 72px 72px; gap: 10px; }
}

/* Shared Tiberia client-app visual language. */
:root { color-scheme: dark; background: #09111f; color: #f3f7ff; }
body { background: radial-gradient(circle at 12% 8%, rgba(49,233,129,.12), transparent 28rem), linear-gradient(135deg, #070c15, #09111f); color: #f3f7ff; }
.admin-shell__side { background: rgba(7, 18, 27, .96); border-color: #26364f; }
.admin-shell__brand-mark { background: #31e981; color: #04110a; }
.admin-shell__brand small, .admin-shell__environment { color: #9fb0cc; }
.admin-shell__nav-group h2 { color: #6f83a8; }
.admin-shell__nav-item { color: #9fb0cc; }
.admin-shell__nav-marker { background: #415474; }
.admin-shell__nav-item:hover, .admin-shell__nav-item:focus-visible { background: #18263a; color: #f3f7ff; }
.admin-shell__nav-item.is-active { background: #202d44; color: #f3f7ff; }
.admin-shell__nav-item.is-active .admin-shell__nav-marker { background: #31e981; box-shadow: 0 0 0 3px rgba(49,233,129,.16); }
.admin-shell__environment span { background: #31e981; box-shadow: 0 0 0 3px rgba(49,233,129,.14); }
.admin-shell__eyebrow { color: #7cb2ff; }
.admin-shell__title, .admin-shell__panel-heading h2, .admin-shell__metrics strong { color: #f3f7ff; }
.admin-shell__subtitle, .admin-shell__metrics span, .admin-shell__metrics small { color: #9fb0cc; }
.admin-shell__header button, .admin-login button { border-color: #26364f; background: #202d44; color: #f3f7ff; }
.admin-shell__header button:hover, .admin-shell__header button:focus-visible { border-color: #415474; background: #293953; outline-color: rgba(124,178,255,.35); }
.admin-shell__metrics, .admin-shell__panel { border-color: #26364f; background: rgba(19, 29, 46, .94); box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.admin-shell__metrics > div, .admin-shell__panel-heading, .admin-shell__contracts li, .admin-shell__repair > li, .admin-shell__directory li, .admin-shell__queue-row { border-color: rgba(255,255,255,.07); }
.admin-shell__panel-heading span, .admin-shell__repair li > div span, .admin-shell__repair li > span, .admin-shell__directory li span, .admin-shell__queue-row span, .admin-shell__empty-state { color: #9fb0cc; }
.admin-shell__panel-heading .admin-shell__status { background: rgba(49,233,129,.13); color: #31e981; }
.admin-shell__repair a { color: #7cb2ff; }
.admin-shell__module-intro { color: #9fb0cc; }
.admin-shell__capability { border-color: rgba(255,255,255,.07); }
.admin-shell__capability strong { color: #f3f7ff; }
.admin-shell__capability span { color: #9fb0cc; }
.admin-shell__capability-link { color: #7cb2ff; background: rgba(124,178,255,.12); }
.admin-shell__capability-link:hover, .admin-shell__capability-link:focus-visible { outline-color: rgba(124,178,255,.35); }
.admin-shell__capability-action { color: #f5c26b; background: rgba(245,165,36,.12); }
.admin-shell__queue-row strong, .admin-shell__empty-state strong, code { color: #f3f7ff; }
.admin-shell__repair-confirm { background: rgba(245,165,36,.12); }
.admin-shell__repair-confirm p, .admin-shell__repair-confirm label { color: #d7e6ff; }
.admin-login { background: radial-gradient(circle at 50% 35%, rgba(49,233,129,.12), transparent 24rem), #09111f; }
.admin-login .admin-shell__brand, .admin-login h1 { color: #f3f7ff; }
.admin-login p, .admin-login label { color: #9fb0cc; }
.admin-login input { border-color: #26364f; background: #0c1625; color: #f3f7ff; }
.admin-login input:focus { border-color: #31e981; outline-color: rgba(49,233,129,.18); }
.admin-login button { background: #31e981; border-color: #31e981; color: #04110a; }
