/* Kirana Ops Hub — shell UI. Netral, dark/light, tanpa dependency. */
:root {
  --bg: #0b0f16;
  --bg-soft: #0f151f;
  --panel: #121a26;
  --panel-2: #17202e;
  --line: #23303f;
  --text: #e6ebf2;
  --muted: #93a1b3;
  --accent: #5b8cff;
  --accent-soft: rgb(91 140 255 / .14);
  --ok: #34d399;
  --bad: #f87171;
  --warn: #fbbf24;
  --radius: 12px;
  --shadow: 0 8px 24px rgb(0 0 0 / .28);
}

html[data-theme="light"] {
  --bg: #f4f6f9;
  --bg-soft: #eef1f6;
  --panel: #ffffff;
  --panel-2: #f7f9fc;
  --line: #dde3ec;
  --text: #121a26;
  --muted: #5b6878;
  --accent: #2f6fed;
  --accent-soft: rgb(47 111 237 / .10);
  --ok: #059669;
  --bad: #dc2626;
  --warn: #b45309;
  --shadow: 0 8px 24px rgb(15 23 42 / .08);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.shell {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  height: 100vh;
  overflow: hidden;
}

/* ── sidebar ─────────────────────────────────────────────── */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px 14px;
  background: var(--bg-soft);
  border-right: 1px solid var(--line);
  min-height: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px 10px;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  flex: 0 0 auto;
}

.brand-mark svg { width: 20px; height: 20px; }

.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text b { font-size: 14.5px; letter-spacing: .1px; }
.brand-text small { color: var(--muted); font-size: 11.5px; }

.nav { display: flex; flex-direction: column; gap: 6px; }
.nav-label {
  margin: 0 0 4px 8px;
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .14s ease, border-color .14s ease;
}

.nav-item:hover { background: var(--panel-2); }

.nav-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.nav-item[aria-current="page"] {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 34%, transparent);
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--muted);
  flex: 0 0 auto;
}

.nav-item[aria-current="page"] .nav-icon { color: var(--accent); border-color: transparent; }
.nav-icon svg { width: 17px; height: 17px; }

.nav-text { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.nav-title { font-size: 13px; font-weight: 600; }
.nav-sub { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }

.note {
  margin: 0;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.55;
}

.note-title { display: block; color: var(--text); font-weight: 600; font-size: 12px; margin-bottom: 2px; }

.foot-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.port { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ── main ────────────────────────────────────────────────── */
.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 18px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}

.titles { min-width: 0; }
.titles h1 { margin: 0; font-size: 15.5px; letter-spacing: .1px; }
.titles p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }

.status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  font-size: 11.5px;
  white-space: nowrap;
}

.badge-name { color: var(--muted); }
.badge-val { font-variant-numeric: tabular-nums; font-weight: 600; }

.stamp { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }

.led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  flex: 0 0 auto;
  box-shadow: 0 0 0 0 transparent;
}

.led[data-state="ok"] { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 18%, transparent); }
.led[data-state="off"] { background: var(--bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 18%, transparent); }
.led[data-state="unknown"] { background: var(--warn); }

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-size: 12.5px;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .14s ease, background .14s ease;
}

.btn:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn svg { width: 15px; height: 15px; }

.btn-ghost { background: transparent; }

.ico { display: inline-grid; place-items: center; }
.ico svg { width: 15px; height: 15px; }
html[data-theme="dark"] .ico-sun { display: none; }
html[data-theme="light"] .ico-moon { display: none; }

/* ── stage ───────────────────────────────────────────────── */
.stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  background: var(--bg);
}

.frame-wrap {
  position: absolute;
  inset: 0;
  padding: 10px;
}

.frame-wrap[hidden] { display: none; }

.frame-wrap iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(2px);
  z-index: 5;
}

.overlay.hidden { display: none; }

.loading p { color: var(--muted); font-size: 12.5px; margin: 10px 0 0; }

.spinner {
  width: 26px;
  height: 26px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.down-card {
  max-width: 380px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
  text-align: center;
}

.down-card .led { margin: 0 auto 10px; width: 10px; height: 10px; }
.down-card h2 { margin: 0 0 6px; font-size: 14.5px; }
.down-card p { margin: 0 0 14px; color: var(--muted); font-size: 12.5px; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .sidebar { flex-direction: row; align-items: center; gap: 12px; overflow-x: auto; padding: 10px 12px; }
  .brand { border-bottom: 0; padding: 0 8px 0 0; border-right: 1px solid var(--line); }
  .brand-text small, .nav-sub, .nav-label, .sidebar-foot { display: none; }
  .nav { flex-direction: row; }
  .nav-item { padding: 7px 9px; }
  .nav-text { flex: 0 0 auto; }
  .topbar { flex-wrap: wrap; gap: 10px; padding: 10px 12px; }
  .status { margin-left: 0; }
  .actions { margin-left: auto; }
  .frame-wrap { padding: 6px; }
}

/* ── menu Dokumen (pane native, bukan iframe) ─────────────── */
/* [hidden] harus menang atas display milik komponen (.btn/.modal/.docs-grid). */
[hidden] { display: none !important; }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
  font-weight: 600;
}

.btn-primary:hover {
  background: color-mix(in srgb, var(--accent) 86%, var(--text));
  border-color: color-mix(in srgb, var(--accent) 86%, var(--text));
}

.btn-small { padding: 5px 9px; font-size: 11.5px; border-radius: 8px; }

.btn-danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 38%, var(--line)); }
.btn-danger:hover { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); }

.btn:disabled { opacity: .6; cursor: default; }

.docs {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  min-height: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.docs-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 0 0 auto;
}

.docs-search {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1 1 260px;
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--muted);
}

.docs-search-ico { display: inline-grid; place-items: center; flex: 0 0 auto; }
.docs-search-ico svg { width: 15px; height: 15px; }

.docs-search input {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 12.5px;
}

.docs-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }

.docs-select {
  height: 34px;
  max-width: 220px;
  min-width: 0;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
}

.docs-select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.docs-count {
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  margin-left: auto;
}

.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 12px;
  align-content: start;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
}

.doc-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  padding: 13px 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.doc-card:hover { border-color: color-mix(in srgb, var(--accent) 34%, var(--line)); }

.doc-head { display: flex; align-items: center; gap: 6px; min-height: 0; }
.doc-head:empty { display: none; }

.doc-chip {
  display: inline-block;
  max-width: 100%;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-title {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.35;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.doc-desc {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.doc-url {
  display: block;
  max-width: 100%;
  color: var(--muted);
  font-size: 11px;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-bottom: 1px dotted var(--line);
  padding-bottom: 1px;
}

.doc-url:hover { color: var(--accent); border-bottom-color: currentColor; }

.doc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.docs-empty {
  display: grid;
  place-items: center;
  gap: 4px;
  flex: 1 1 auto;
  padding: 40px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 12.5px;
  text-align: center;
}

.docs-empty b { color: var(--text); font-size: 13.5px; }

/* ── modal + toast ───────────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgb(0 0 0 / .5);
  z-index: 60;
}

.modal-card {
  width: min(520px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

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

.modal-head h2 { margin: 0; font-size: 15px; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.icon-btn:hover { color: var(--text); border-color: var(--accent); }

.field { display: block; margin-bottom: 10px; }

.field-label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11.5px;
}

.field-label i { color: var(--bad); font-style: normal; font-size: 10.5px; }

.field input,
.field textarea {
  width: 100%;
  padding: 8px 10px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--text);
  font: inherit;
  font-size: 13px;
}

.field textarea { resize: vertical; min-height: 72px; }

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.form-error { margin: 2px 0 8px; color: var(--bad); font-size: 12px; }

.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

.toast-wrap {
  position: fixed;
  right: 16px;
  bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 80;
  pointer-events: none;
}

.toast {
  max-width: 340px;
  padding: 9px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 12.5px;
  transition: opacity .2s ease, transform .2s ease;
}

.toast-ok { border-left-color: var(--ok); }
.toast-bad { border-left-color: var(--bad); }
.toast-out { opacity: 0; transform: translateY(6px); }

@media (max-width: 860px) {
  .docs { padding: 9px; gap: 9px; }
  .docs-bar { gap: 6px; }
  .docs-search { flex: 1 1 100%; }
  .docs-select { flex: 1 1 auto; max-width: none; }
  .docs-count { margin-left: 0; }
  .docs-grid { grid-template-columns: 1fr; }
  .toast-wrap { left: 12px; right: 12px; bottom: 12px; }
  .toast { max-width: none; }
}

/* ── login & halaman tengah ───────────────────────────────── */
.center-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 15%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 45%),
    var(--bg);
}

.login-card {
  width: min(400px, 100%);
  padding: 24px 24px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.login-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  flex: 0 0 auto;
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
}

.login-mark svg { width: 21px; height: 21px; }

.login-brand-text { display: flex; flex-direction: column; min-width: 0; }
.login-brand-text b { font-size: 14.5px; }
.login-brand-text small { color: var(--muted); font-size: 11.5px; }

.login-card h1 { margin: 0 0 4px; font-size: 19px; letter-spacing: -.01em; }
.login-sub { margin: 0 0 16px; color: var(--muted); font-size: 12.5px; line-height: 1.55; }

.login-submit { width: 100%; justify-content: center; margin-top: 4px; padding: 9px 12px; font-size: 13px; }

.login-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

/* ── identitas user di topbar ─────────────────────────────── */
.userbox {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 14px;
  border-left: 1px solid var(--line);
  flex: 0 0 auto;
}

.user-name {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
  font-weight: 600;
}

.role-badge {
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .08em;
  white-space: nowrap;
}

.role-badge[data-role="super_admin"] {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  background: var(--accent-soft);
}

.role-badge[data-role="operator"] {
  color: var(--warn);
  border-color: color-mix(in srgb, var(--warn) 35%, var(--line));
  background: color-mix(in srgb, var(--warn) 10%, transparent);
}

.pwd-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px 18px;
  background: color-mix(in srgb, var(--warn) 13%, var(--panel));
  border-bottom: 1px solid color-mix(in srgb, var(--warn) 32%, var(--line));
  color: var(--text);
  font-size: 12.5px;
  flex: 0 0 auto;
}

.pwd-banner-text { flex: 1 1 260px; }

/* ── halaman administrator ────────────────────────────────── */
.admin-page {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

.admin-header {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 11px 20px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.admin-brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.admin-brand .login-mark { width: 32px; height: 32px; border-radius: 9px; }
.admin-brand .login-mark svg { width: 18px; height: 18px; }

.admin-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}

.admin-main {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 20px 32px;
}

.admin-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.tab {
  padding: 9px 13px;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.tab:hover { color: var(--text); }

.tab[aria-selected="true"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.admin-count { margin-left: auto; color: var(--muted); font-size: 11.5px; }

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 14px;
  align-items: start;
}

.admin-card {
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

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

.admin-card-head h2 { margin: 0; font-size: 14px; }

.table-scroll { overflow-x: auto; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.data-table th {
  padding: 8px 10px;
  text-align: left;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.data-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: var(--panel-2); }

.data-table .col-actions { text-align: right; white-space: nowrap; }
.data-table td.col-actions .btn { margin-left: 6px; }
.data-table td.cell-time { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.data-table td.cell-detail { color: var(--muted); max-width: 360px; }
.data-table tr.row-self { background: color-mix(in srgb, var(--accent) 6%, transparent); }

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }

.chip-me {
  display: inline-block;
  margin-left: 7px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .05em;
  vertical-align: 1px;
}

.status-pill {
  display: inline-block;
  margin-right: 7px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  border: 1px solid var(--line);
}

.status-pill.is-on {
  color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 35%, var(--line));
  background: color-mix(in srgb, var(--ok) 10%, transparent);
}

.status-pill.is-off {
  color: var(--muted);
  background: var(--panel-2);
}

.field-select {
  width: 100%;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.field-select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.field-select-sm { width: auto; height: 29px; font-size: 11.5px; }
.role-select { width: auto; min-width: 128px; }

.hint {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.55;
}

.empty-note {
  margin: 12px 0 0;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-size: 12.5px;
  text-align: center;
}

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

.field-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11.5px;
}

@media (max-width: 900px) {
  .admin-grid { grid-template-columns: 1fr; }
  .admin-header { padding: 10px 12px; gap: 10px; }
  .admin-head-actions { width: 100%; margin-left: 0; }
  .admin-main { padding: 12px; }
  .userbox { padding-left: 0; border-left: 0; }
}

@media (max-width: 860px) {
  .pwd-banner { padding: 8px 12px; }
  .topbar .userbox { width: 100%; justify-content: flex-end; }
}


