:root {
  --bg: #090705;
  --ink: #f6ece4;
  --muted: #b7a398;
  --orange: #ff5c1a;
  --orange-2: #ffb347;
  --line: rgba(255, 92, 26, 0.28);
  --card: rgba(18, 10, 6, 0.78);
}

* { box-sizing: border-box; }
html {
  height: 100%;
  scroll-behavior: smooth;
}
html, body { margin: 0; height: 100%; }
[hidden] { display: none !important; }
html:has(#app:not(.is-desk):not([hidden])) {
  overflow: hidden;
}
body {
  font-family: "DM Sans", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

h1, h2, h3, .boot-name, .sc-code {
  font-family: "Space Grotesk", "DM Sans", sans-serif;
}

.boot {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  background: #070504;
  transition: transform 0.9s cubic-bezier(0.76, 0, 0.24, 1), opacity 0.7s ease;
}
.boot.is-out {
  transform: translateY(-110%);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}
.boot-glow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 42vw;
  height: 42vw;
  max-width: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 92, 26, 0.35), transparent 68%);
  filter: blur(12px);
  transform: translate(-50%, -50%);
  animation: pulse 2.2s ease-in-out infinite;
  pointer-events: none;
}
.boot-stack {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(100%, 420px);
  gap: 0.55rem;
}
.boot-logo {
  position: relative;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  margin: 0 0 0.15rem;
}
.boot-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px solid rgba(255, 92, 26, 0.2);
  border-top-color: var(--orange);
  animation: spin 1.1s linear infinite;
}
.boot-name {
  margin: 0;
  width: 100%;
  text-align: center;
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  animation: rise 1.1s ease both;
}
.boot-sub {
  margin: 0;
  width: 100%;
  text-align: center;
  color: var(--orange-2);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.72rem;
  line-height: 1.35;
  animation: rise 1.3s ease 0.15s both;
}
.boot-bar {
  width: min(220px, 56vw);
  height: 2px;
  margin: 0.85rem auto 0;
  background: rgba(255, 92, 26, 0.18);
  overflow: hidden;
  border-radius: 999px;
}
.boot-bar span {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: center;
  background: linear-gradient(90deg, var(--orange), var(--orange-2));
  animation: load 2.15s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.app {
  min-height: 100vh;
  position: relative;
  display: grid;
  place-items: center;
  padding: 2rem clamp(1rem, 3vw, 2rem);
  width: 100%;
}
.app:not(.is-desk) {
  overflow: hidden;
}
.app.is-desk {
  display: block;
  min-height: 100vh;
  padding: 0;
  width: 100%;
}

.grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 92, 26, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 92, 26, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at center, black 28%, transparent 88%);
  pointer-events: none;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  pointer-events: none;
}
.orb-a {
  width: 340px;
  height: 340px;
  background: rgba(255, 92, 26, 0.22);
  top: -80px;
  right: -40px;
}
.orb-b {
  width: 280px;
  height: 280px;
  background: rgba(255, 179, 71, 0.12);
  bottom: -90px;
  left: -50px;
}

.panel {
  position: relative;
  width: min(440px, 100%);
  padding: 1.6rem 1.5rem 1.4rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow:
    0 0 0 1px rgba(255, 92, 26, 0.08),
    0 24px 64px rgba(0, 0, 0, 0.42),
    0 0 64px rgba(255, 92, 26, 0.1);
  backdrop-filter: blur(16px);
  animation: cardIn 0.7s ease both;
}

.gate.panel { width: 100%; max-width: 460px; margin: 0 auto; }

.gate .brand h1 {
  font-size: 1.08rem;
  line-height: 1.35;
}
.brand {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  margin-bottom: 1.3rem;
}
.brand.compact {
  margin: 0;
  gap: 0.7rem;
  align-items: center;
}
.brand-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.08rem;
}
.brand-kicker {
  margin: 0;
  color: var(--orange);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.68rem;
  line-height: 1.15;
}
.brand h1, .brand strong {
  display: block;
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.25;
}
.brand-title {
  font-family: "Space Grotesk", "DM Sans", sans-serif;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand-name {
  color: var(--orange);
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  background: #110c09;
  padding: 0.28rem;
  border-radius: 14px;
  margin-bottom: 1.15rem;
  border: 1px solid var(--line);
}
.tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0.65rem 0.55rem;
  border-radius: 11px;
  cursor: pointer;
  font: inherit;
  font-weight: 650;
  letter-spacing: 0.04em;
  line-height: 1;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tab.on {
  background: rgba(255, 92, 26, 0.16);
  color: var(--orange-2);
  border: 1px solid rgba(255, 92, 26, 0.32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.gate .tab.on {
  background: rgba(255, 92, 26, 0.14);
  color: var(--ink);
}

.form { display: grid; gap: 0.75rem; }
label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.86rem;
}
input {
  width: 100%;
  border: 1px solid rgba(255, 92, 26, 0.22);
  background: #100b08;
  color: var(--ink);
  border-radius: 10px;
  padding: 0.72rem 0.8rem;
  font: inherit;
}
input:focus {
  outline: 2px solid var(--orange);
  outline-offset: 1px;
}
.tg {
  display: flex;
  align-items: center;
  border: 1px solid rgba(255, 92, 26, 0.22);
  border-radius: 10px;
  background: #100b08;
  overflow: hidden;
  min-height: 44px;
}
.tg span {
  display: grid;
  place-items: center;
  align-self: stretch;
  min-width: 2.2rem;
  color: var(--orange);
  font-weight: 700;
  background: rgba(255, 92, 26, 0.08);
}
.tg input {
  border: 0;
  border-radius: 0;
  outline: none;
  min-height: 0;
  padding-top: 0.68rem;
  padding-bottom: 0.68rem;
}
.tg:focus-within {
  outline: 2px solid var(--orange);
  outline-offset: 1px;
}

.btn {
  border: 0;
  background: linear-gradient(90deg, var(--orange), #ff7a3a);
  color: #1a0b04;
  font: inherit;
  font-weight: 750;
  padding: 0.8rem 1rem;
  border-radius: 11px;
  cursor: pointer;
  letter-spacing: 0.04em;
  line-height: 1.1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.btn:hover { filter: brightness(1.06); }
.btn:disabled { opacity: 0.55; cursor: wait; }

.btn-soft {
  background: rgba(255, 92, 26, 0.14);
  color: var(--ink);
  border: 1px solid rgba(255, 92, 26, 0.34);
  box-shadow: none;
}

.btn-soft:hover {
  background: rgba(255, 92, 26, 0.22);
  filter: none;
}

.btn-soft:active {
  transform: translateY(1px);
}

.btn-soft-ghost {
  color: var(--muted);
  border-color: rgba(255, 255, 255, 0.1);
}

.btn-soft-ghost:hover {
  color: var(--ink);
  border-color: rgba(255, 92, 26, 0.22);
  background: rgba(255, 255, 255, 0.03);
}

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.hint, .lede { color: var(--muted); font-size: 0.84rem; line-height: 1.45; margin: 0; }
.error {
  background: #3a140c;
  color: #ffb4a0;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  margin: 0 0 0.8rem;
  font-size: 0.88rem;
}
.empty {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 1.2rem 0 0;
  padding: 1rem;
  border: 1px dashed var(--line);
  border-radius: 12px;
  text-align: center;
}
#admin-error {
  position: fixed;
  left: 50%;
  bottom: 1.2rem;
  transform: translateX(-50%);
  z-index: 50;
  width: min(520px, calc(100vw - 2rem));
  margin: 0;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
}

.desk {
  position: relative;
  min-height: 100vh;
  width: 100%;
  padding: 1.25rem clamp(1rem, 3vw, 2rem) 4rem;
  animation: cardIn 0.55s ease both;
}
.desk-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
}
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 0.7rem 0;
  min-height: 56px;
  background: rgba(9, 7, 5, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 92, 26, 0.12);
}
#member-view,
#admin-view {
  width: 100%;
}
.admin-panel,
.member-panel {
  padding-bottom: 1rem;
  width: 100%;
}
.desk-head {
  width: 100%;
}
.desk-head .lede {
  max-width: 52rem;
}
.who {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--muted);
  flex-shrink: 0;
}
.top .btn.ghost {
  min-height: 38px;
  padding: 0.45rem 0.85rem;
}
.desk-head h2 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.35rem, 3vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.sc-list {
  list-style: none;
  margin: 1.6rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}
.sc-list li {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 0.65rem 1rem;
  align-items: center;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  background: rgba(16, 10, 7, 0.72);
  border-radius: 16px;
  animation: rise 0.6s ease both;
}
.sc-member-row--collapsed {
  grid-template-columns: 1fr;
  padding: 0.85rem 1rem;
}
.sc-member-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}
.sc-member-compact h3 {
  margin: 0;
  font-size: 1.08rem;
}
.sc-member-row--open {
  grid-template-columns: 1fr;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
  border-color: rgba(255, 92, 26, 0.32);
  background: linear-gradient(155deg, rgba(24, 15, 10, 0.96), rgba(10, 7, 5, 0.9));
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 92, 26, 0.08);
}
.sc-member-detail {
  display: block;
  width: 100%;
}
.sc-member-row--open .sc-member-detail[hidden] {
  display: none !important;
}
.sc-member-card {
  padding: 1.15rem 1.2rem 1.3rem;
}
.sc-member-card-head {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.sc-member-badge {
  flex: 0 0 auto;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 92, 26, 0.35);
  background: rgba(255, 92, 26, 0.1);
  font-size: 0.74rem;
}
.sc-member-meta h3 {
  margin: 0 0 0.25rem;
  font-size: 1.2rem;
}
.sc-member-summary {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}
.sc-member-meta .install-notes {
  margin: 0.55rem 0 0;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px dashed rgba(255, 92, 26, 0.22);
  background: rgba(255, 92, 26, 0.05);
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1.45;
}
.sc-member-card-content {
  display: grid;
  gap: 0.85rem;
}
.sc-member-wait {
  margin: 0;
  padding: 0.75rem 0;
}
.sc-list li:nth-child(2) { animation-delay: 0.06s; }
.sc-list li:nth-child(3) { animation-delay: 0.12s; }
.sc-list li:nth-child(4) { animation-delay: 0.18s; }
.sc-list li:nth-child(5) { animation-delay: 0.24s; }
.sc-code {
  font-family: Consolas, "Cascadia Mono", monospace;
  color: var(--orange);
  letter-spacing: 0.08em;
  font-size: 0.82rem;
}
.sc-list h3 { margin: 0 0 0.2rem; font-size: 1.05rem; }
.sc-list p { margin: 0; color: var(--muted); font-size: 0.88rem; }
.pill {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #1a0b04;
  background: var(--orange);
  padding: 0.28rem 0.5rem;
  border-radius: 999px;
  font-weight: 700;
}
.pill.off {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}
.admin-add {
  display: grid;
  grid-template-columns: 110px 1fr 1.4fr auto;
  gap: 0.55rem;
  margin: 1.2rem 0 0.6rem;
}
.admin-add input {
  margin: 0;
}
.admin-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.btn.small {
  padding: 0.45rem 0.7rem;
  font-size: 0.82rem;
}

.admin-nav {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
  padding: 0.28rem;
  background: #110c09;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.admin-tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0.55rem 0.85rem;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  font-weight: 650;
  letter-spacing: 0.03em;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.admin-tab.on {
  background: rgba(255, 92, 26, 0.14);
  color: var(--orange-2);
  border: 1px solid rgba(255, 92, 26, 0.28);
}
.admin-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 1.2rem;
  width: 100%;
}
.admin-stats article {
  background: rgba(16, 10, 7, 0.72);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
}
.admin-stats span {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.admin-stats strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.6rem;
}
.sc-admin-row {
  grid-template-columns: auto 1fr;
  align-items: start;
}
.sc-admin-row .admin-actions {
  grid-column: 1 / -1;
  justify-content: flex-start;
  margin-top: 0.35rem;
}
.domain-row {
  display: flex;
  gap: 0.45rem;
  margin-top: 0.55rem;
}
.domain-row input {
  flex: 1;
  min-width: 0;
}
.cf-info { margin-top: 0.35rem; }
.log-wrap {
  overflow: auto;
  max-height: none;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(16, 10, 7, 0.72);
}
.log-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}
.log-table th,
.log-table td {
  text-align: left;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  word-break: break-word;
}
.log-table th {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.log-table tr:last-child td { border-bottom: 0; }

.member-nav {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
  padding: 0.28rem;
  background: #110c09;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.member-nav-scroll {
  flex-wrap: nowrap;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}

.member-nav-scroll .member-tab {
  flex-shrink: 0;
}

.member-tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0.55rem 0.85rem;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  font-weight: 650;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.member-tab.on {
  background: rgba(255, 92, 26, 0.14);
  color: var(--orange-2);
  border: 1px solid rgba(255, 92, 26, 0.28);
}
.profile-card {
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(16, 10, 7, 0.72);
  margin-bottom: 1rem;
}
.profile-form {
  max-width: 420px;
  margin-top: 0.5rem;
}
.profile-form h3 { margin: 0 0 0.75rem; font-size: 1rem; }
textarea, select {
  width: 100%;
  border: 1px solid rgba(255, 92, 26, 0.22);
  background: #100b08;
  color: var(--ink);
  border-radius: 10px;
  padding: 0.72rem 0.8rem;
  font: inherit;
}
textarea:focus, select:focus {
  outline: 2px solid var(--orange);
  outline-offset: 1px;
}
.hint.ok { color: #8fd4a0; }
.health-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.health-dot.up { background: #3ecf6e; box-shadow: 0 0 8px rgba(62, 207, 110, 0.6); }
.health-dot.down { background: #e5484d; box-shadow: 0 0 8px rgba(229, 72, 77, 0.5); }
.health-dot.unknown { background: #8a7a70; }
.status-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.65rem;
  width: 100%;
}
.status-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(16, 10, 7, 0.72);
  min-height: 100%;
}
.status-row > div {
  flex: 1;
  min-width: 0;
}
.row-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
  align-items: center;
}
.filter-bar select,
.filter-bar input { width: auto; min-width: 120px; }
.ns-list {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
  font-family: Consolas, monospace;
  font-size: 0.82rem;
  color: var(--orange-2);
}
.ns-list li { padding: 0.15rem 0; }
.cf-block { margin-top: 0.35rem; }
.mono {
  display: block;
  padding: 0.55rem 0.65rem;
  background: #100b08;
  border-radius: 8px;
  font-family: Consolas, monospace;
  word-break: break-all;
  margin: 0.5rem 0;
}
.inline-form {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 0.75rem;
}
.inline-form input { max-width: 160px; }
.groups-msg-form {
  display: grid;
  gap: 0.35rem;
  min-width: 12rem;
}
.groups-msg-form textarea {
  width: 100%;
  min-height: 3.5rem;
  resize: vertical;
}
.domain-row select { max-width: 130px; }

.sc-form-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.1rem 1.2rem;
  background: rgba(16, 10, 7, 0.72);
  margin-bottom: 1.4rem;
}
.sc-form-card h3 { margin: 0 0 0.85rem; font-size: 1rem; }
.sc-form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
}
.sc-form-grid label.wide { grid-column: 1 / -1; }
.sc-admin-list .sc-admin-row { grid-template-columns: 1fr; }
.sc-card { align-items: stretch; }
.sc-card-body { width: 100%; display: grid; gap: 0.85rem; }
.sc-card-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}
.sc-card-head h3 { margin: 0.35rem 0 0.2rem; }
.sc-card-head p { margin: 0; color: var(--muted); font-size: 0.88rem; }
.sc-section {
  border-top: 1px solid var(--line);
  padding-top: 0.75rem;
}
.sc-section h4 {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange-2);
}
.sc-edit-panel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
  padding: 0.85rem;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: rgba(10, 7, 5, 0.5);
}
.sc-edit-panel label { display: grid; gap: 0.3rem; font-size: 0.82rem; color: var(--muted); }
.sc-edit-panel label.wide { grid-column: 1 / -1; }
.member-install-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem;
  align-items: end;
  margin-top: 0.75rem;
}
.member-install-form--panel {
  display: block;
  margin-top: 0;
  padding: 1rem 1.05rem 1.05rem;
  border: 1px solid rgba(255, 92, 26, 0.22);
  border-radius: 14px;
  background: rgba(6, 4, 3, 0.55);
}
.install-fields-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 0.9rem;
}
.install-fields-grid label {
  display: grid;
  gap: 0.35rem;
}
.install-fields-grid label.wide {
  grid-column: 1 / -1;
}
.field-label {
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.field-label em {
  color: var(--orange-2);
  font-style: normal;
}
.field-tag {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.member-install-form label { display: grid; gap: 0.3rem; font-size: 0.82rem; color: var(--muted); }
.member-install-form input,
.member-install-form textarea {
  padding: 0.62rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(8, 6, 4, 0.92);
  color: var(--text);
  font: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.member-install-form input:focus,
.member-install-form textarea:focus {
  outline: none;
  border-color: rgba(255, 92, 26, 0.45);
  box-shadow: 0 0 0 3px rgba(255, 92, 26, 0.12);
}
.member-install-form textarea {
  min-height: 4.5rem;
  resize: vertical;
  line-height: 1.4;
}
.member-install-form--panel .form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-top: 0.15rem;
}
.member-install-form--panel .form-hint {
  margin: 0;
  flex: 1 1 220px;
  font-size: 0.82rem;
}
.member-install-form--panel .form-actions .btn {
  min-width: 9.5rem;
  padding: 0.65rem 1.1rem;
}
.member-install-form--panel .install-wizard {
  margin-bottom: 1rem;
}
.member-install-result { margin-top: 0.75rem; }
.member-install-result.error { color: #ff8a80; }
.member-install-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.member-install-head .install-result-title { margin: 0; }
.member-sites-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
  width: 100%;
}
.member-site-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(16, 10, 7, 0.72);
  padding: 1rem;
}
.member-site-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}
.member-install-box {
  margin-top: 0.85rem;
  padding: 0.85rem;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: rgba(10, 7, 5, 0.45);
}
.member-site-card .member-install-box {
  margin-top: 0;
  border-color: rgba(255, 92, 26, 0.22);
  background: rgba(10, 7, 5, 0.35);
}
.install-result-title { margin: 0 0 0.35rem; color: var(--orange-2); }
.ns-list { margin: 0.35rem 0 0; padding-left: 1.1rem; }
.ns-list.member-ns li { font-family: ui-monospace, monospace; font-size: 0.85rem; }
.catalog-table { width: 100%; border-collapse: collapse; }
.catalog-table th, .catalog-table td { text-align: left; padding: 0.65rem 0.55rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.catalog-table code { font-size: 0.78rem; }
.catalog-paths { margin: 0.5rem 0 0; padding-left: 1.1rem; }
.catalog-help { margin-bottom: 1rem; }
.member-sc-actions { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; min-width: 220px; }
.member-sc-actions .btn { text-decoration: none; display: inline-block; text-align: center; }
.install-notes { margin-top: 0.35rem; white-space: pre-wrap; }
input[type="file"] {
  padding: 0.45rem 0.55rem;
  font-size: 0.82rem;
}

.sites-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 1rem;
  width: 100%;
}
.sites-hosting { margin-bottom: 1rem; }
.sites-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}
.sites-filter {
  border: 1px solid var(--line);
  background: #110c09;
  color: var(--muted);
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
}
.sites-filter.on {
  background: var(--orange);
  color: #1a0b04;
  border-color: var(--orange);
}
.sites-wrap {
  overflow-x: auto;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(16, 10, 7, 0.72);
}
.sites-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}
.sites-table th,
.sites-table td {
  text-align: left;
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  word-break: break-word;
}
.sites-table th {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.sites-table tr:last-child td { border-bottom: 0; }
.sites-table a { color: var(--orange-2); }
.sites-actions .admin-actions { justify-content: flex-start; flex-wrap: wrap; }
.pill.warn {
  background: rgba(255, 179, 71, 0.2);
  color: var(--orange-2);
  border: 1px solid rgba(255, 179, 71, 0.35);
}
.pill.down {
  background: rgba(229, 72, 77, 0.15);
  color: #ffb4a0;
  border: 1px solid rgba(229, 72, 77, 0.35);
}
.issues { margin: 0.25rem 0 0; font-size: 0.78rem; }

.users-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 1rem;
  width: 100%;
}
.users-toolbar { margin-bottom: 0.85rem; }
.users-toolbar input { min-width: 200px; flex: 1; }
.users-wrap {
  overflow: auto;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(16, 10, 7, 0.72);
  margin-bottom: 1rem;
}
.users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}
.users-table th,
.users-table td {
  text-align: left;
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  word-break: break-word;
}
.users-table th {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.users-table tr:last-child td { border-bottom: 0; }
.user-detail {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.1rem 1.2rem;
  background: rgba(16, 10, 7, 0.72);
  margin-bottom: 1rem;
}
.user-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.user-detail-head h3 { margin: 0; font-size: 1.2rem; }
.user-note-label {
  display: grid;
  gap: 0.35rem;
  margin: 0.85rem 0;
  color: var(--muted);
  font-size: 0.86rem;
}
.user-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0;
}
.user-detail-grid h4 {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange-2);
}
.mini-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
  max-height: 220px;
  overflow: auto;
}
.mini-list li {
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.82rem;
  background: rgba(10, 7, 5, 0.45);
}
.user-detail-actions { margin-top: 0.75rem; justify-content: flex-start; }

@media (max-width: 1100px) {
  .admin-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sites-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .users-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .admin-add { grid-template-columns: 1fr; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .sites-summary { grid-template-columns: repeat(2, 1fr); }
  .users-summary { grid-template-columns: repeat(2, 1fr); }
  .user-detail-grid { grid-template-columns: 1fr; }
  .sc-form-grid { grid-template-columns: 1fr; }
  .sc-edit-panel { grid-template-columns: 1fr; }
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.7; }
  50% { transform: translate(-50%, -50%) scale(1.12); opacity: 1; }
}
@keyframes load {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.nav-badge {
  display: inline-flex;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.35rem;
  margin-left: 0.35rem;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  background: var(--accent);
  color: #111;
}

.diag-box {
  margin-top: 0.35rem;
  padding: 0;
  border: none;
  background: transparent;
}

.diag-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.diag-card {
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(255, 92, 26, 0.18);
  border-radius: 12px;
  background: rgba(255, 92, 26, 0.05);
  min-width: 0;
}

.diag-card h4 {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 650;
}

.diag-card dl {
  margin: 0;
  display: grid;
  gap: 0.35rem;
}

.diag-card dl > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.65rem;
}

.diag-card dt {
  color: var(--muted);
  font-size: 0.75rem;
}

.diag-card dd {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 600;
  text-align: right;
  word-break: break-all;
}

.diag-note {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.35;
}

.diag-checked { margin: 0.55rem 0 0; }

.install-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.75rem;
}

.site-card-side { min-width: 0; }

.site-card .member-install-box {
  margin-top: 0;
  padding: 0;
  border: none;
  background: transparent;
}

.domain-change-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.55rem;
  margin-top: 0.75rem;
}

.domain-change-form label {
  flex: 1 1 220px;
}

.history-list li + li { margin-top: 0.65rem; }

.faq-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.faq-item {
  padding: 0.85rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}
.faq-cat {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.65;
  margin-bottom: 0.35rem;
}
.faq-item details summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
.faq-item details summary::-webkit-details-marker { display: none; }
.faq-item details p { margin-top: 0.65rem; }

.announcement-card {
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}
.announcement-card.is-read { opacity: 0.72; }
.announcement-card h3 { margin-bottom: 0.35rem; }

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.domain-change-form { margin-top: 0.75rem; }

.file-btn { position: relative; overflow: hidden; cursor: pointer; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.admin-faq-item .admin-actions { margin-top: 0.65rem; }

@media (max-width: 640px) {
  .sc-list li { grid-template-columns: 1fr; }
  .sc-member-row--open { grid-template-columns: 1fr; }
  .sc-member-compact { flex-wrap: wrap; }
  .install-fields-grid { grid-template-columns: 1fr; }
  .member-install-form--panel .form-actions { flex-direction: column; align-items: stretch; }
  .member-install-form--panel .form-actions .btn { width: 100%; }
  .status-list { grid-template-columns: 1fr; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .site-card-grid { grid-template-columns: 1fr; }
  .site-card { grid-template-columns: 1fr; }
  .diag-grid { grid-template-columns: 1fr; }
  .domain-change-form { flex-direction: column; align-items: stretch; }
  .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sites-summary,
  .users-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* —— v17 UI polish —— */
.glass-card {
  border: 1px solid rgba(255, 92, 26, 0.14);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(22, 12, 8, 0.88), rgba(12, 8, 6, 0.72));
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.offline-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 0.55rem 1rem;
  text-align: center;
  font-size: 0.86rem;
  background: #5c1a00;
  color: #ffe8dc;
  border-bottom: 1px solid rgba(255, 92, 26, 0.35);
}

.toast-stack {
  position: fixed;
  bottom: 1.2rem;
  right: 1rem;
  z-index: 60;
  display: grid;
  gap: 0.5rem;
  max-width: min(360px, calc(100vw - 2rem));
  pointer-events: none;
}

.toast {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.88rem;
  background: rgba(18, 10, 6, 0.95);
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: auto;
}

.toast.is-in { opacity: 1; transform: none; }
.toast-success { border-color: rgba(80, 200, 120, 0.45); }
.toast-error { border-color: rgba(255, 80, 80, 0.45); }
.toast-info { border-color: var(--line); }

.skeleton-line {
  height: 0.85rem;
  border-radius: 8px;
  margin: 0.45rem 0;
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s ease infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.is-loading { min-height: 2.5rem; }

.empty-state {
  text-align: center;
  padding: 2rem 1.25rem;
  border: 1px dashed rgba(255, 92, 26, 0.22);
  border-radius: 16px;
  background: rgba(255, 92, 26, 0.03);
}

.empty-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  opacity: 0.85;
}

.empty-slot { margin: 1rem 0; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.status-ico { font-size: 0.82em; }

.field-error {
  display: block;
  color: #ff8a65;
  font-size: 0.78rem;
  margin-top: 0.25rem;
}

input.is-invalid {
  border-color: rgba(255, 80, 80, 0.55) !important;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0;
}

.dash-card {
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}

.dash-card h3 {
  margin: 0 0 0.75rem;
  font-size: 0.92rem;
  color: var(--orange-2);
}

.chart-box { min-height: 120px; }

.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 0.45rem;
  height: 140px;
  padding-top: 0.5rem;
}

.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  height: 100%;
  justify-content: flex-end;
}

.bar-fill {
  width: 100%;
  max-width: 36px;
  min-height: 4px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, var(--orange-2), var(--orange));
  transition: height 0.4s ease;
}

.bar-label {
  font-size: 0.65rem;
  color: var(--muted);
}

.health-map {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.health-cell {
  min-width: 44px;
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.health-cell.up { background: rgba(60, 180, 100, 0.18); border-color: rgba(60, 180, 100, 0.4); }
.health-cell.down { background: rgba(220, 70, 70, 0.18); border-color: rgba(220, 70, 70, 0.4); }
.health-cell.unknown { background: rgba(255, 180, 60, 0.12); }
.health-cell:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.25); }

.activity-feed {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
  max-height: 280px;
  overflow: auto;
}

.activity-feed li {
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.2);
  font-size: 0.84rem;
}

.activity-feed li strong {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.site-card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.site-card {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 1rem 1.35rem;
  align-items: start;
  padding: 1rem 1.1rem;
  animation: cardIn 0.35s ease both;
}

.site-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.site-card-head h3 {
  margin: 0;
  font-size: 1.05rem;
  word-break: break-word;
}

.row-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.toggle-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.84rem;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.toggle-switch {
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 92, 26, 0.12);
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.toggle-switch:hover {
  border-color: rgba(255, 92, 26, 0.22);
  background: rgba(255, 92, 26, 0.04);
}

.toggle-switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

.toggle-track {
  position: relative;
  flex-shrink: 0;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.toggle-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(246, 236, 228, 0.82);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  transition: transform 0.22s ease, background 0.22s ease;
}

.toggle-switch input:checked + .toggle-track {
  background: rgba(255, 92, 26, 0.22);
  border-color: rgba(255, 92, 26, 0.42);
  box-shadow: inset 0 0 0 1px rgba(255, 92, 26, 0.08);
}

.toggle-switch input:checked + .toggle-track::after {
  transform: translateX(18px);
  background: linear-gradient(180deg, #ffb347, var(--orange));
}

.toggle-switch input:focus-visible + .toggle-track {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.toggle-label {
  line-height: 1.25;
  white-space: nowrap;
}

.sites-table input[type="checkbox"],
.site-row-check,
#sites-select-all {
  width: 1rem;
  height: 1rem;
  min-height: 0;
  accent-color: var(--orange);
  cursor: pointer;
}

.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 25;
  padding: 0.35rem 0.5rem calc(0.35rem + env(safe-area-inset-bottom));
  background: rgba(8, 5, 4, 0.92);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(12px);
  grid-template-columns: repeat(5, 1fr);
  gap: 0.25rem;
}

.bottom-nav-btn {
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}

.bottom-nav-btn.on {
  color: var(--orange);
  background: rgba(255, 92, 26, 0.12);
}

.admin-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 25;
  padding: 0.35rem 0.5rem calc(0.35rem + env(safe-area-inset-bottom));
  background: rgba(8, 5, 4, 0.94);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(12px);
  gap: 0.25rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.admin-bottom-nav::-webkit-scrollbar { display: none; }

.admin-bottom-nav-btn {
  flex: 0 0 auto;
  min-height: 44px;
  min-width: 4.6rem;
  padding: 0.45rem 0.55rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.admin-bottom-nav-btn.on {
  color: var(--orange);
  background: rgba(255, 92, 26, 0.12);
}

#admin-nav-more {
  min-width: 3.8rem;
  border: 1px solid rgba(255, 92, 26, 0.22);
}

.bulk-bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 92, 26, 0.06);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.55);
}

.site-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 45;
  width: min(420px, 92vw);
  height: 100%;
  background: rgba(12, 8, 6, 0.98);
  border-left: 1px solid var(--line);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  animation: slideIn 0.25s ease;
}

@keyframes slideIn {
  from { transform: translateX(100%); }
  to { transform: none; }
}

.site-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--line);
}

.site-drawer-head h3 { margin: 0; font-size: 1.05rem; }

.site-drawer-body {
  padding: 1rem 1.1rem;
  overflow: auto;
  flex: 1;
  font-size: 0.9rem;
}

.desk-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0 0.5rem;
  margin-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.78rem;
  color: var(--muted);
}

.install-wizard {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

.wizard-step {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  color: var(--muted);
  padding: 0.35rem 0.45rem;
  border-radius: 8px;
  border: 1px solid transparent;
}

.wizard-step span {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  display: grid;
  place-content: center;
  font-size: 0.68rem;
  background: rgba(255, 255, 255, 0.06);
}

.wizard-step.on {
  color: var(--orange-2);
  border-color: rgba(255, 92, 26, 0.25);
  background: rgba(255, 92, 26, 0.08);
}

.wizard-step.on span { background: var(--orange); color: #111; }

.ns-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.onboarding-overlay {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: grid;
  place-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.65);
}

.onboarding-card {
  max-width: 380px;
  padding: 1.25rem 1.35rem;
}

.onboarding-step {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0 0 0.35rem;
}

.onboarding-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}

.btn, .bottom-nav-btn, .health-cell, input:not([type="checkbox"]):not([type="radio"]), select, textarea, button {
  min-height: 44px;
}

.btn.tiny, .btn.small { min-height: 36px; }

.btn:focus-visible,
.bottom-nav-btn:focus-visible,
.health-cell:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  html:has(#app:not(.is-desk):not([hidden])) {
    overflow: hidden;
  }

  body.is-member #member-bottom-nav,
  body.is-admin #admin-bottom-nav {
    display: flex;
  }

  .app:not(.is-desk) {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.85rem;
    width: 100%;
  }

  .app:not(.is-desk) .panel {
    width: 100%;
    max-width: 440px;
  }

  .app.is-desk {
    padding-bottom: 0;
  }

  .panel {
    width: 100%;
    padding: 1.2rem 1rem;
    border-radius: 18px;
  }

  .gate.panel {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
  }

  .desk {
    padding: 0.85rem 0.85rem calc(5.75rem + env(safe-area-inset-bottom));
  }

  body.is-admin .desk {
    padding-bottom: calc(5.75rem + env(safe-area-inset-bottom));
  }

  .top {
    flex-direction: row;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0 0.7rem;
    min-height: 0;
  }

  .brand.compact {
    flex: 1;
    min-width: 0;
    gap: 0.55rem;
  }

  .brand-title {
    font-size: 0.88rem;
    white-space: normal;
    line-height: 1.2;
  }

  .who {
    flex-shrink: 0;
    gap: 0.45rem;
  }

  .who span {
    display: none;
  }

  .top .btn.ghost {
    min-height: 38px;
    padding: 0.4rem 0.65rem;
    font-size: 0.82rem;
  }

  .member-nav {
    display: none;
  }

  .admin-nav {
    position: fixed;
    left: 0.85rem;
    right: 0.85rem;
    bottom: calc(4.35rem + env(safe-area-inset-bottom));
    z-index: 28;
    margin: 0;
    max-height: min(48vh, 360px);
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateY(calc(110% + 1rem));
    opacity: 0;
    pointer-events: none;
    transition: transform 0.24s ease, opacity 0.24s ease;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.45);
  }

  body.admin-menu-open .admin-nav {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  body.admin-menu-open::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 27;
    background: rgba(0, 0, 0, 0.55);
  }

  .admin-tab,
  .member-tab,
  .tab,
  .btn,
  .bottom-nav-btn,
  .admin-bottom-nav-btn,
  .sites-filter,
  .ticket-filter {
    touch-action: manipulation;
  }

  .row-head {
    flex-direction: column;
    align-items: stretch;
  }

  .row-head .btn,
  .row-head .toggle-inline {
    width: 100%;
    justify-content: center;
  }

  .desk-head h2 {
    font-size: 1.25rem;
  }

  .desk-head .lede {
    font-size: 0.82rem;
  }

  .sites-filters,
  .ticket-filters,
  .attacks-filter {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    gap: 0.4rem;
    padding-bottom: 0.15rem;
    scrollbar-width: none;
  }

  .sites-filters::-webkit-scrollbar,
  .ticket-filters::-webkit-scrollbar,
  .attacks-filter::-webkit-scrollbar {
    display: none;
  }

  .sites-filter,
  .ticket-filter {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .attacks-filter {
    flex-direction: row;
    align-items: flex-end;
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .attacks-filter label {
    flex: 0 0 auto;
    min-width: 8.5rem;
  }

  .sites-wrap,
  .users-wrap,
  .log-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }

  .sites-table { min-width: 640px; }
  .users-table { min-width: 680px; }
  .log-table { min-width: 540px; }
  .catalog-table { min-width: 560px; }

  .domain-row {
    flex-direction: column;
    align-items: stretch;
  }

  .domain-row select,
  .domain-row input,
  .domain-row .btn {
    width: 100%;
    max-width: none;
  }

  .inline-form {
    flex-direction: column;
    align-items: stretch;
  }

  .inline-form input,
  .inline-form .btn {
    width: 100%;
    max-width: none;
  }

  .bulk-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .bulk-bar .btn {
    width: 100%;
  }

  .site-drawer {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: min(88vh, 720px);
    max-height: calc(100vh - env(safe-area-inset-top));
    border-left: 0;
    border-top: 1px solid var(--line);
    border-radius: 18px 18px 0 0;
    animation: slideUp 0.25s ease;
  }

  .site-drawer-head {
    padding-top: calc(0.85rem + env(safe-area-inset-top));
  }

  .desk-footer {
    flex-direction: column;
    gap: 0.2rem;
    text-align: center;
    font-size: 0.78rem;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .bottom-nav {
    display: none;
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    grid-template-columns: none;
  }

  .bottom-nav::-webkit-scrollbar { display: none; }

  .bottom-nav-btn {
    flex: 0 0 auto;
    min-width: 4.4rem;
    white-space: nowrap;
  }
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: none; }
}

@media (min-width: 641px) {
  .bottom-nav,
  .admin-bottom-nav { display: none !important; }
}

.maintenance-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 49;
  padding: 0.55rem 1rem;
  text-align: center;
  font-size: 0.86rem;
  background: rgba(120, 70, 20, 0.95);
  color: #ffe8dc;
  border-bottom: 1px solid rgba(255, 180, 80, 0.35);
}

.system-status-card h3,
.locked-users-strip h3 { margin-top: 0; }

.locked-users-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
}

.ticket-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.ticket-filter,
#btn-users-locked.on {
  border: 1px solid rgba(255, 92, 26, 0.28);
  background: rgba(255, 92, 26, 0.14);
  color: var(--orange-2);
}

.ticket-filter {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
}

.ticket-admin-item {
  flex-direction: column;
  align-items: stretch;
  gap: 0.65rem;
}

.ticket-note-label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.ticket-note-label textarea {
  min-height: 4.5rem;
}

.maintenance-flags {
  display: grid;
  gap: 0.45rem;
  margin: 0.5rem 0 0.75rem;
  font-size: 0.86rem;
  color: var(--muted);
}

.maintenance-flags label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.maintenance-flags input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  min-height: 0;
  accent-color: var(--orange);
}

.admin-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 860px) {
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
}

.attacks-filter,
.activity-summary {
  margin-bottom: 0.85rem;
}

.attacks-filter {
  flex-wrap: wrap;
  gap: 0.65rem 0.85rem;
}

.attacks-summary,
.activity-detail-stats {
  margin-bottom: 0.75rem;
}

.attacks-table td,
.activity-table td {
  vertical-align: top;
}

.truncate {
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attacks-table .truncate { max-width: 10rem; }
.ua-cell { max-width: 14rem; }

.sev-pill {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.sev-high {
  background: rgba(220, 53, 69, 0.16);
  color: #ff8a96;
}

.sev-medium {
  background: rgba(255, 193, 7, 0.14);
  color: #ffd666;
}

.sev-low {
  background: rgba(108, 117, 125, 0.18);
  color: #b8c0c8;
}

.tag {
  display: inline-block;
  padding: 0.12rem 0.4rem;
  border-radius: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
}

.tag-bad {
  background: rgba(220, 53, 69, 0.18);
  color: #ff8a96;
}

.tag-warn {
  background: rgba(255, 193, 7, 0.14);
  color: #ffd666;
}

.activity-row.live td:first-child strong {
  color: var(--orange);
}

.activity-detail {
  margin-top: 1rem;
}

.activity-detail h4 {
  margin: 1rem 0 0.45rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.attacks-table.compact .truncate { max-width: 8rem; }
