:root {
  color-scheme: dark;
  --bg: #282828; --surface: #323232; --raised: #191919; --ink: #eee;
  --muted: #aaa; --dim: #858585; --purple: #7f48a3; --line: #191919;
  --danger: #df7777; --good: #a8c99a;
  font: 12px Verdana, Arial, sans-serif; font-synthesis: none;
}
* { box-sizing: border-box; scrollbar-width: thin; scrollbar-color: var(--purple) #191919; }
body { margin: 0; height: 100svh; min-height: 300px; padding: 8px; display: flex; flex-direction: column; gap: 7px; background: #404040; color: var(--ink); }
button, input, select, textarea { font: inherit; border-radius: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: default; opacity: .5; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 1px solid #b48acd; outline-offset: 2px; }
a { color: inherit; }
h1, h2, h3, p, dl { margin: 0; }
h1, h2, h3 { font-size: 12px; font-weight: bold; }
p { line-height: 1.65; color: #bbb; }
small, .eyebrow { font-size: 10px; color: var(--dim); }
strong { font-weight: normal; }
h1, h2, h3, button, .brand-name, .breadcrumb, .toolbar-account, .page-footer, .status-tag, .panel-title, th, td, .detail, .stat, .form-note, .field>span, .auth-copy p { text-shadow: -1px -1px 0 #111, 1px -1px 0 #111, -1px 1px 0 #111, 1px 1px 0 #111; }
/* Thin chrome and nested borders inspired by the saved site. */
.shell { min-height: 0; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.sidebar { flex: none; display: flex; align-items: center; min-height: 34px; padding: 2px 8px; gap: 9px; position: relative; border: 1px solid #191919; outline: 1px solid #323232; outline-offset: -2px; background: linear-gradient(#323232, #282828); box-shadow: 0 0 4px #0006; border-top: 2px solid var(--purple); }
.brand { display: flex; gap: 7px; align-items: center; flex: none; padding-right: 12px; margin-right: 2px; border-right: 1px solid #111; }
.brand img { width: 18px; height: 21px; }
.brand-name { font-size: 13px; font-weight: bold; }
.brand small, .nav-label { display: none; }
.site-navigation { display: contents; }
.menu-toggle { display: none; }
.cell-content { min-width: 0; }
.nav { display: flex; gap: 3px; flex: none; }
.nav[aria-label="administration"] { padding-left: 9px; border-left: 1px solid #111; }
.nav button { padding: 4px 7px; border: 1px solid transparent; background: none; font-size: 11px; white-space: nowrap; }
.nav button:hover { color: #b180ce; }
.nav button.active { border-color: #191919; box-shadow: inset 0 1px #414141; background: linear-gradient(#3b3b3b, #303030); color: white; }
.sidebar-bottom { margin-left: auto; padding-left: 8px; white-space: nowrap; color: var(--muted); font-size: 10px; }
.connection::before { content: ''; display: inline-block; width: 4px; height: 4px; background: #99b48c; margin: 0 7px 2px 0; }
.connection.offline::before { background: var(--danger); }
.workspace { min-height: 0; flex: 1; display: flex; flex-direction: column; border: 1px solid #191919; border-top: 2px solid var(--purple); outline: 1px solid #323232; outline-offset: -2px; background: linear-gradient(#323232, #282828 50px); box-shadow: 0 0 4px #0006; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 27px; flex: none; padding: 4px 8px; background: #191919; border-bottom: 1px solid #323232; font-size: 10px; }
.breadcrumb { display: flex; align-items: center; gap: 7px; color: #999; }
.breadcrumb span:last-child { color: #ddd; }
.toolbar-account { display: flex; gap: 11px; align-items: center; }
.uid { font-family: Consolas, monospace; color: #ccc; }
.content { padding: 6px; overflow: auto; flex: 1; min-height: 0; }
.initial-state { border: 1px solid #191919; background: #282828; padding: 15px; }
.page-footer { min-height: 24px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 3px 8px; font-size: 10px; color: #aaa; background: linear-gradient(#323232, #282828); border: 1px solid #191919; border-top: 2px solid var(--purple); outline: 1px solid #323232; outline-offset: -2px; }
/* Compact section headers and data rows rather than oversized dashboard tiles. */
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 4px 9px; }
.page-heading h1 { font-size: 12px; }
.page-heading p { font-size: 10px; margin-top: 3px; }
.page-heading .eyebrow { display: none; }
.status-tag { font-size: 10px; white-space: nowrap; color: #ccc; }
.status-tag.good { color: var(--good); }
.status-tag.bad { color: var(--danger); }
.stats { display: flex; flex-wrap: wrap; border: 1px solid #191919; padding: 3px; gap: 4px; margin-bottom: 6px; background: #282828; }
.stat { display: flex; align-items: center; flex: 1 1 180px; gap: 7px; padding: 6px; min-width: 0; font-size: 11px; border: 1px solid #191919; background: linear-gradient(#363636, #2d2d2d); box-shadow: inset 0 0 0 1px #3b3b3b; }
.stat>small { color: #aaa; white-space: nowrap; font-size: 10px; }
.stat>small::after { content: ':'; }
.stat>strong { font-size: 11px; color: white; overflow-wrap: anywhere; }
.stat>span { display: none; }
.columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; align-items: start; }
.panel { min-width: 0; border: 1px solid #191919; background: linear-gradient(#323232, #282828 50px); box-shadow: inset 0 0 0 1px #373737; }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 7px; background: #191919; border-bottom: 1px solid #383838; color: #ddd; font-size: 11px; font-weight: normal; min-height: 25px; }
.panel-body { padding: 9px; }
.panel-body>p { font-size: 11px; margin-bottom: 12px; }
.details { display: grid; }
.detail { display: flex; justify-content: space-between; align-items: start; gap: 15px; padding: 6px 3px; font-size: 11px; border-bottom: 1px solid #353535; }
.detail:last-child { border-bottom: 0; }
.detail dt { color: #aaa; }
.detail dd { margin: 0; max-width: 70%; overflow-wrap: anywhere; text-align: right; }
.section-gap { margin-top: 6px; }
.member-stack { display: grid; gap: 6px; min-width: 0; }
.member-columns { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.license-editor + .license-editor { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px; }
.license-editor-heading { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); }
.member-stack summary { cursor: pointer; color: var(--muted); padding: 6px 0; font-size: 11px; }
.member-stack form > .button { justify-self: start; }
.guide { border-left: 2px solid var(--purple); padding-left: 9px; margin-top: 12px; display: grid; gap: 8px; }
.guide p { font-size: 10px; }
.guide strong { color: #ddd; }
.note { margin-top: 10px; border-left: 2px solid #654078; background: #303030; padding: 8px; color: #aaa; font-size: 10px; line-height: 1.65; }
.button { border: 1px solid #121212; padding: 5px 10px; min-height: 25px; background: linear-gradient(#444, #303030); box-shadow: inset 0 0 0 1px #4b4b4b; font-size: 11px; }
.button:hover { background: linear-gradient(#505050, #393939); }
.button:active { background: #2b2b2b; box-shadow: inset 0 0 0 1px #353535; }
.button.primary { background: linear-gradient(#80519b, #573869); box-shadow: inset 0 0 0 1px #9264ac; }
.button.primary:hover { background: linear-gradient(#9160ad, #65417b); }
.button.danger { color: #df9999; }
.button.small { font-size: 10px; padding: 3px 7px; min-height: 22px; }
.button.quiet { min-height: 0; padding: 0; border: 0; background: none; box-shadow: none; font-size: 10px; color: #bbb; }
.button.quiet:hover { color: #b787d0; }
.button-row { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.button-row.end { justify-content: flex-end; }
.form { display: grid; gap: 11px; }
.field { display: grid; gap: 5px; }
.field>span { color: #bbb; font-size: 11px; }
.field>small { font-size: 10px; line-height: 1.6; }
.input { width: 100%; min-width: 0; border: 1px solid #191919; background: #252525; box-shadow: inset 0 0 0 1px #363636; color: white; font-size: 11px; min-height: 27px; padding: 5px 7px; }
.input::placeholder { color: #777; }
.input:focus { outline: 1px solid #79508f; outline-offset: 0; }
.field textarea { min-height: 70px; resize: vertical; }
.form-error { color: var(--danger); font-size: 11px; line-height: 1.5; }
.form-error:empty { display: none; }
.form-note { font-size: 10px; line-height: 1.7; color: #aaa; }
.inline-form { display: flex; align-items: end; gap: 6px; }
.inline-form>.field { flex: 1; }
.table-wrap { overflow: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: 11px; }
th { background: #2b2b2b; color: #aaa; font-size: 10px; font-weight: normal; padding: 7px 9px; border-bottom: 1px solid #191919; white-space: nowrap; }
td { border-bottom: 1px solid #373737; padding: 8px 9px; vertical-align: middle; color: #ddd; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #ffffff04; }
td .sub { display: block; margin-top: 4px; color: #999; font-size: 10px; line-height: 1.6; }
.table-actions { display: flex; flex-wrap: wrap; gap: 4px; }
.empty { color: #bbb; padding: 20px 10px; font-size: 11px; }
.empty p { font-size: 10px; margin-top: 5px; }
.search { width: 190px; max-width: 50%; min-height: 23px; padding: 3px 6px; font-size: 10px; }
.key-result { background: #28232c; border: 1px solid #75448c; padding: 10px; margin-top: 10px; }
.key-result p { font-size: 10px; }
.key-result code { display: block; font-size: 12px; padding: 10px 0; overflow-wrap: anywhere; }
/* Plain member login with account rules alongside it. */
.auth-layout { width: min(720px, 100%); margin: 36px auto; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; align-items: start; }
.auth-form { grid-column: 1; grid-row: 1; }
.auth-copy { grid-column: 2; grid-row: 1; }
.auth-copy .detail { flex-direction: column; gap: 3px; padding: 8px 0; }
.auth-copy .detail dd { max-width: 100%; text-align: left; font-size: 10px; color: #aaa; }
.auth-tabs { display: flex; gap: 3px; padding: 5px; border-bottom: 1px solid #191919; background: #303030; }
.auth-tabs button { font-size: 11px; padding: 4px 9px; background: none; border: 1px solid transparent; }
.auth-tabs button.active { border-color: #191919; background: linear-gradient(#444, #333); box-shadow: inset 0 0 0 1px #4c4c4c; }
.auth-form .form { padding: 11px; }
.auth-form .button.primary { justify-self: start; }
.auth-foot { padding: 0 11px 11px; font-size: 10px; color: #999; line-height: 1.6; }
.toasts { position: fixed; left: 13px; bottom: 42px; max-width: min(400px, calc(100vw - 26px)); display: grid; gap: 4px; z-index: 20; }
.toast { padding: 8px 10px; background: linear-gradient(#383838, #282828); border: 1px solid #191919; border-left: 2px solid var(--purple); font-size: 11px; line-height: 1.6; animation: toast-in .18s ease-out; }
.toast.error { border-left-color: var(--danger); }
.toast.leaving { opacity: 0; transition: opacity .18s; }
.confirm-dialog { padding: 14px; max-width: 390px; color: #eee; background: linear-gradient(#383838, #282828 50px); border: 1px solid #191919; border-top: 2px solid var(--purple); box-shadow: inset 0 0 0 1px #444; border-radius: 0; }
.confirm-dialog::backdrop { background: #0008; }
.confirm-dialog h2 { margin-bottom: 10px; font-size: 12px; }
.confirm-dialog p { font-size: 11px; margin-bottom: 15px; }
@keyframes toast-in { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: translateX(0); } }
@media (max-width: 900px) {
  .sidebar { flex-wrap: wrap; gap: 3px 5px; padding: 4px 6px; }
  .brand { padding-right: 8px; }
  .sidebar-bottom { padding: 3px; }
  .nav button { padding: 4px 5px; font-size: 10px; }
  .nav[aria-label="administration"] { padding-left: 4px; }
}
@media (max-width: 700px) {
  html { scroll-padding-top: 12px; }
  body { height: auto; min-height: 100svh; padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)); gap: 8px; font-size: 14px; }
  .shell { gap: 8px; min-width: 0; }
  .sidebar { gap: 6px; padding: 5px 9px; }
  .sidebar-bottom { display: none; }
  .brand { border: 0; padding-right: 5px; min-height: 44px; }
  .brand-name { font-size: 15px; }
  .brand img { width: 19px; height: 23px; }
  .menu-toggle { display: block; margin-left: auto; }
  .site-navigation { display: none; width: 100%; border-top: 1px solid var(--line); padding: 8px 0 3px; }
  .menu-open .site-navigation { display: grid; gap: 6px; }
  .nav-label { display: block; padding: 3px 2px; font-size: 11px; }
  .nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; min-width: 0; }
  .nav[aria-label="administration"] { border: 0; padding: 0; }
  .nav button { padding: 8px 5px; font-size: 12px; min-height: 44px; white-space: normal; line-height: 1.4; }
  .workspace { flex: auto; min-width: 0; }
  .toolbar { flex-wrap: wrap; gap: 0 8px; padding: 4px 9px; font-size: 11px; }
  .breadcrumb { min-width: 0; padding: 6px 0; flex-wrap: wrap; }
  .toolbar-account { gap: 8px; flex-wrap: wrap; min-width: 0; margin-left: auto; }
  .toolbar-account .username { max-width: min(160px, 43vw); overflow: hidden; text-overflow: ellipsis; }
  .content { padding: 8px; overflow: visible; flex: auto; min-width: 0; }
  .columns, .auth-layout, .member-columns { grid-template-columns: 1fr; }
  .columns, .member-stack { gap: 10px; }
  .auth-layout { margin: 4px auto; max-width: 440px; gap: 10px; }
  .auth-copy, .auth-form { grid-column: auto; grid-row: auto; }
  .auth-form { order: -1; }
  .auth-copy { order: 1; }
  .auth-tabs button { flex: 1; font-size: 14px; min-height: 44px; }
  .auth-foot, .auth-copy .detail dd { font-size: 12px; }
  .page-heading { align-items: start; flex-wrap: wrap; padding: 4px 2px 12px; gap: 8px; }
  .page-heading>div { min-width: 0; overflow-wrap: anywhere; }
  .page-heading h1 { font-size: 16px; }
  .page-heading p { font-size: 12px; line-height: 1.6; }
  .page-heading>.button { margin-left: 0; }
  .panel-title { font-size: 13px; padding: 9px 10px; flex-wrap: wrap; gap: 8px; }
  .panel-body { padding: 12px; }
  .panel-body>p, .confirm-dialog p { font-size: 13px; }
  .form { gap: 14px; }
  .field { gap: 7px; }
  .field>span, .form-error { font-size: 13px; }
  .field>small, .form-note, .note, .guide p { font-size: 12px; }
  .input { font-size: 16px; min-height: 44px; padding: 10px; }
  .field textarea { min-height: 110px; }
  .button, .button.small, .button.quiet { min-height: 44px; padding: 10px 13px; font-size: 13px; }
  .button-row { gap: 8px; }
  .button-row>.button { flex: 1; }
  .form>button[type="submit"], .auth-form .button.primary, .member-stack form>.button { width: 100%; justify-self: stretch; }
  label.form-note { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
  input[type="checkbox"] { width: 20px; height: 20px; flex: none; accent-color: var(--purple); }
  .inline-form { align-items: stretch; flex-direction: column; }
  .inline-form .button { align-self: stretch; }
  .stats { gap: 6px; }
  .stat { flex-basis: 130px; padding: 10px; }
  .stat>small, .stat>strong { font-size: 12px; }
  .detail { font-size: 13px; padding: 9px 0; gap: 10px; }
  .detail dd { max-width: 62%; }
  .section-gap { margin-top: 10px; }
  .status-tag { font-size: 12px; }
  .search { width: 100%; max-width: 100%; font-size: 16px; min-height: 44px; }
  .table-wrap { overflow: visible; padding: 8px; }
  .table-wrap table, .table-wrap tbody { display: block; width: 100%; }
  .table-wrap thead { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .table-wrap tbody tr { display: block; border: 1px solid var(--line); background: #2b2b2b; margin-bottom: 8px; }
  .table-wrap tbody tr:last-child { margin-bottom: 0; }
  .table-wrap tbody tr[hidden] { display: none; }
  .table-wrap td { display: grid; grid-template-columns: minmax(68px, .32fr) minmax(0, 1fr); align-items: start; gap: 10px; padding: 10px; font-size: 13px; overflow-wrap: anywhere; }
  .table-wrap td::before { content: attr(data-label); color: var(--muted); font-size: 12px; line-height: 1.5; }
  td .sub { font-size: 12px; }
  .table-actions { gap: 8px; }
  .table-actions>.button { flex: 1; }
  .license-editor-heading { flex-wrap: wrap; font-size: 13px; }
  .member-stack summary { font-size: 13px; padding: 12px 0; min-height: 44px; }
  .key-result code { font-size: 14px; }
  .page-footer { padding: 8px 10px; min-height: 34px; font-size: 11px; }
  .toasts { left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); max-width: none; pointer-events: none; }
  .toast { font-size: 13px; padding: 11px 13px; overflow-wrap: anywhere; }
  .confirm-dialog { margin: auto; width: calc(100% - 24px); max-width: 390px; max-height: calc(100dvh - 32px); overflow: auto; padding: 16px; }
  .confirm-dialog h2 { font-size: 15px; }
  .confirm-dialog .button-row { display: grid; grid-template-columns: 1fr 1fr; }
}
@media (min-width: 701px) and (pointer: coarse) {
  .button, .button.small, .button.quiet, .nav button, .auth-tabs button { min-height: 44px; }
  .input { min-height: 44px; font-size: 16px; }
  label.form-note { display: flex; align-items: center; gap: 8px; min-height: 44px; }
  input[type="checkbox"] { width: 20px; height: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none!important; transition: none!important; scroll-behavior: auto!important; }
}
