/* Astro Proxy — clean blue / white
   Skills: ui-stack (8px grid, 60-30-10) + better-web-ui distill/quieter
   Light-first. Lucide stroke icons. No decoration for its own sake. */

:root {
  --bg: #f7faf8;
  --sidebar: #ffffff;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --hover: #f0fdf4;
  --blue: #16a34a;
  --blue-deep: #15803d;
  --blue-soft: #ecfdf5;
  --blue-ring: rgba(22, 163, 74, 0.22);
  --good: #059669;
  --good-soft: #ecfdf5;
  --mid: #b45309;
  --mid-soft: #fffbeb;
  --bad: #dc2626;
  --bad-soft: #fef2f2;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px -12px rgba(15, 23, 42, 0.08);
  --radius: 12px;
  --font: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --display: 'IBM Plex Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
}

[hidden] { display: none !important; }

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input, select { font-family: inherit; }
code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--hover);
  padding: 0.1em 0.35em;
  border-radius: 6px;
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.ico {
  display: inline-block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask: var(--ico) center / contain no-repeat;
  mask: var(--ico) center / contain no-repeat;
}
.ico--dashboard { --ico: url('/icons/layout-dashboard.svg'); }
.ico--plus { --ico: url('/icons/plus.svg'); }
.ico--logout { --ico: url('/icons/log-out.svg'); }
.ico--copy { --ico: url('/icons/copy.svg'); }
.ico--eye { --ico: url('/icons/eye.svg'); }
.ico--refresh { --ico: url('/icons/refresh-cw.svg'); }
.ico--trash { --ico: url('/icons/trash-2.svg'); }
.ico--activity { --ico: url('/icons/activity.svg'); }
.ico--globe { --ico: url('/icons/globe.svg'); }
.ico--server { --ico: url('/icons/server.svg'); }
.ico--users { --ico: url('/icons/users.svg'); }
.ico--sessions { --ico: url('/icons/users.svg'); }
.ico--shield { --ico: url('/icons/shield.svg'); }
.ico--settings { --ico: url('/icons/settings.svg'); }
.ico--accounts { --ico: url('/icons/users.svg'); }
.ico--user-plus { --ico: url('/icons/user-plus.svg'); }
.ico--x { --ico: url('/icons/x.svg'); }
.ico--check { --ico: url('/icons/check.svg'); }
.ico--alert { --ico: url('/icons/alert-circle.svg'); }
.ico--wifi { --ico: url('/icons/wifi.svg'); }
.ico--log-in { --ico: url('/icons/log-in.svg'); }
.ico--menu { --ico: url('/icons/menu.svg'); }
.ico--key { --ico: url('/icons/key.svg'); }
.ico--skull { --ico: url('/icons/skull.svg'); }
.ico--map { --ico: url('/icons/map-pin.svg'); }
.ico--clock { --ico: url('/icons/clock.svg'); }
.ico--pencil { --ico: url('/icons/pencil.svg'); }
.ico--search { --ico: url('/icons/search.svg'); }
.ico--bell { --ico: url('/icons/bell.svg'); }
.ico--chevron-down { --ico: url('/icons/chevron-down.svg'); }
.ico--chevron-right { --ico: url('/icons/chevron-right.svg'); }
.ico--house { --ico: url('/icons/house.svg'); }
.ico--life-buoy { --ico: url('/icons/life-buoy.svg'); }
.ico--message-square { --ico: url('/icons/message-square.svg'); }

body.app-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
  align-items: start;
  background: var(--bg);
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 16px 12px 12px;
  min-height: 0;
  gap: 2px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 8px;
  padding: 4px 8px;
}
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  object-fit: cover;
}

.sidebar-search {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 4px 12px;
  padding: 0 12px;
  height: 40px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: text;
  box-shadow: none;
}
.sidebar-search:focus-within {
  border-color: #86efac;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}
.sidebar-search .ico {
  width: 16px;
  height: 16px;
  opacity: 0.55;
  flex-shrink: 0;
  display: block;
  align-self: center;
}
.sidebar-search input,
.sidebar-search input[type="text"] {
  flex: 1;
  min-width: 0;
  width: auto !important;
  height: 22px !important;
  line-height: 22px !important;
  border: 0 !important;
  background: transparent !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  font: inherit;
  font-size: 0.9rem;
  color: var(--text);
  appearance: none;
  -webkit-appearance: none;
}
.sidebar-search input:focus {
  border: 0 !important;
  box-shadow: none !important;
}
.sidebar-search input::placeholder {
  color: #94a3b8;
  font-weight: 500;
  font-size: 0.9rem;
  opacity: 1;
}
.sidebar-empty {
  color: var(--muted);
  font-size: 0.8125rem;
  padding: 8px 12px;
  margin: 4px 0 0;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  overflow: auto;
  padding: 0 2px;
}
.sidebar-bottom {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.nav-label { display: none; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  color: #334155;
  border-radius: 10px;
  font-weight: 550;
  font-size: 0.94rem;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-link:hover { background: var(--hover); color: var(--text); }
.nav-link.is-active {
  background: var(--blue-soft);
  color: var(--blue-deep);
  font-weight: 650;
  box-shadow: none;
}
.nav-link--quiet { color: #64748b; font-size: 0.88rem; padding: 8px 12px; }
.nav-link--notify .nav-mail-badge {
  margin-left: auto;
  position: static;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
}
.sidebar-user:hover { background: var(--hover); }
.sidebar-user.is-active {
  background: var(--blue-soft);
}
.sidebar-initials {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue-deep);
  font-weight: 700;
  font-size: 0.8rem;
  display: grid;
  place-items: center;
  letter-spacing: 0.02em;
  border: 1px solid #bbf7d0;
}
.sidebar-user-meta { flex: 1; min-width: 0; }
.sidebar-user-meta strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user .ico--chevron-down {
  width: 16px;
  height: 16px;
  color: #94a3b8;
}

.sidebar-login { display: none; }
.avatar-img { display: none; }

.sidebar-foot { margin: 0; }

.workspace {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
  background: var(--bg);
  border-left: 0;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: var(--space-4) var(--space-5) var(--space-3);
  background: transparent;
}
.topbar-title { flex: 1; min-width: 0; }
.topbar-title h1 {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 650;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.topbar-title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.875rem;
}
.menu-btn { display: none; }

.pc-ping {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
}
.pc-ping-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

main {
  flex: 1;
  padding: 0 var(--space-5) var(--space-5);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: var(--space-3) var(--space-5);
  color: var(--muted);
  font-size: 0.8125rem;
  margin-top: auto;
  background: transparent;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer-brand strong {
  display: block;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 650;
}
.footer-brand span {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
}
.footer-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}
.footer-flags {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.footer-meta {
  margin: 0 0 0 auto;
  font-size: 0.75rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-left: auto;
  align-items: center;
}
.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 550;
}
.footer-links a:hover { color: var(--blue-deep); }
.check-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  cursor: pointer;
}
.check-row input { width: auto; margin-top: 3px; accent-color: var(--blue); }
.check-row strong { display: block; color: var(--text); font-size: 0.9rem; }
.check-row small { display: block; color: var(--muted); font-size: 0.78rem; margin-top: 2px; }
.type-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

/* Controls */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 16px;
  background: var(--blue);
  color: #fff;
  border: 1px solid var(--blue);
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.btn:hover { background: var(--blue-deep); border-color: var(--blue-deep); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn--small { min-height: 32px; padding: 6px 12px; font-size: 0.8125rem; }
.btn--ghost {
  background: var(--card);
  color: var(--text);
  border-color: var(--line);
}
.btn--ghost:hover { background: var(--hover); }
.btn--outline {
  background: var(--card);
  color: var(--blue-deep);
  border-color: #bbf7d0;
}
.btn--outline:hover { background: var(--blue-soft); }

.icon-btn {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #475569;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.icon-btn:hover { background: var(--hover); color: var(--blue-deep); border-color: #cbd5e1; }
.icon-btn.copied { background: var(--blue-soft); color: var(--blue-deep); border-color: #bbf7d0; }

.flash {
  margin-bottom: var(--space-3);
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}
.flash--ok { color: var(--good); border-color: #a7f3d0; background: var(--good-soft); }
.flash--error { color: var(--bad); border-color: #fecaca; background: var(--bad-soft); }

/* Login */
body.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}
body.login-page main {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 16px;
  flex: 1;
}
.login-hero { display: none; }
.auth-logo {
  width: 48px;
  height: 48px;
  margin-bottom: 8px;
  border-radius: 10px;
}
.panel {
  width: min(400px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: var(--space-5);
  box-shadow: var(--shadow);
}
.auth-head { text-align: center; margin-bottom: var(--space-4); }
.auth-head h1 {
  margin: 8px 0 0;
  font-size: 1.5rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.auth-head p { margin: 8px 0 0; color: var(--muted); font-size: 0.9rem; }
body.login-page .site-footer {
  border: 0;
  justify-content: center;
  text-align: center;
}
body.login-page .footer-inner { justify-content: center; }
body.login-page .footer-meta { margin: 0; }
.auth-switch {
  margin: 16px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.875rem;
}
.auth-switch a { font-weight: 650; }

.astro-mascot {
  width: 88px;
  height: 102px;
  margin: 0 auto 8px;
  transition: transform 0.25s ease;
}
.astro-mascot.is-peeking { transform: scale(1.03); }
.astro-face-svg { width: 100%; height: 100%; display: block; }
.astro-eyes-closed[hidden],
.astro-eyes-open[hidden] { display: none !important; }

.pw-field {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
}
.pw-field input { flex: 1; padding-right: 44px; }
.pw-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  padding: 6px;
  cursor: pointer;
  color: var(--muted);
  display: inline-flex;
}
.pw-toggle.is-on { color: var(--blue, #16a34a); }
.pw-meter {
  height: 6px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
  margin-top: -4px;
}
.pw-meter-bar {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: #ef4444;
  transition: width 0.25s ease, background 0.25s ease;
}
.pw-meter-bar[data-level="1"] { background: #ef4444; }
.pw-meter-bar[data-level="2"] { background: #f59e0b; }
.pw-meter-bar[data-level="3"] { background: #22c55e; }
.pw-meter-bar[data-level="4"] { background: #22c55e; }
.pw-meter-label {
  margin: -8px 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
  gap: 24px;
  max-width: 920px;
  margin: 0 auto;
  align-items: start;
}
.cart-main, .cart-side {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
}
.cart-side {
  position: sticky;
  top: 72px;
}
.cart-side h3 { margin: 0 0 10px; font-size: 1.05rem; }
.cart-side-note { color: #64748b; font-size: 0.9rem; margin: 0 0 14px; line-height: 1.45; }
.cart-side .btn { width: 100%; margin-bottom: 8px; }
.cart-side form { margin: 0 0 8px; }
.cart-empty { text-align: center; padding: 36px 12px; }
.cart-empty p { color: #64748b; margin: 0 0 16px; }
.cart-line {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 0;
  border-bottom: 1px solid #e2e8f0;
}
.cart-line:last-of-type { border-bottom: 0; }
.cart-line-main { flex: 1; min-width: 0; }
.cart-line-main strong { display: block; font-size: 1.05rem; }
.cart-line-main span { color: #64748b; font-size: 0.875rem; }
.cart-line-main ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: #64748b;
  font-size: 0.8125rem;
}
.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 1.05rem;
}
.cart-page .landing-section-head { margin-bottom: 1.5rem; }
.muted-tiny { font-size: 0.8rem; color: #94a3b8; text-align: center; margin-top: 8px; }
@media (max-width: 800px) {
  .cart-layout { grid-template-columns: 1fr; }
}

.stack { display: flex; flex-direction: column; gap: 12px; }
label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--muted);
  font-weight: 550;
}
input[type="text"],
input[type="password"],
input[type="email"],
select {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.9375rem;
  outline: none;
  width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-ring);
}

/* Surfaces */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: var(--shadow);
}
.card h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.card-sub { margin: 4px 0 0; color: var(--muted); font-size: 0.8125rem; }
.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: var(--space-3);
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.kpi {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.kpi-label {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.kpi strong {
  display: block;
  margin: 8px 0 6px;
  font-size: 1.75rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  color: var(--blue-deep);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.kpi-hint { color: var(--muted); font-size: 0.8125rem; }
.kpi-hint em { font-style: normal; color: var(--text); font-weight: 600; }

.kpi-row--6 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.admin-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stack-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.stack-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
}
.stack-form label span { letter-spacing: 0.02em; }
.stack-form input,
.stack-form select {
  font-weight: 500;
  color: var(--text);
}

.admin-catalog {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.admin-catalog li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.admin-catalog strong { font-weight: 650; color: var(--text); }
.admin-catalog span { color: var(--blue-deep); font-weight: 650; font-variant-numeric: tabular-nums; }

.plan-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.02em;
}
.plan-pill--pro { background: var(--blue-soft); color: var(--blue-deep); }
.plan-pill--starter { background: var(--good-soft); color: var(--good); }
.plan-pill--none { background: var(--hover); color: var(--muted); }

.muted-tiny {
  color: var(--muted);
  font-size: 0.75rem;
  margin-top: 2px;
}

.inline-plan {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}
.inline-plan select {
  min-width: 110px;
  padding: 6px 8px;
  font-size: 0.8125rem;
}

.btn--tiny {
  padding: 6px 10px;
  font-size: 0.75rem;
  min-height: 32px;
}

.admin-highlight .admin-top-server {
  text-align: right;
}
.admin-highlight .admin-top-server strong {
  display: block;
  font-size: 1.05rem;
  color: var(--blue-deep);
}
.admin-highlight .admin-top-server span {
  color: var(--muted);
  font-size: 0.8125rem;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.8fr);
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.region-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.region-list li {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.region-list strong { display: block; font-weight: 600; }
.region-list span { color: var(--muted); font-size: 0.8125rem; }

.seg {
  display: flex;
  background: var(--bg);
  border-radius: 8px;
  padding: 3px;
  border: 1px solid var(--line);
}
.seg-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.8125rem;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.seg-btn.is-active {
  background: #fff;
  color: var(--blue-deep);
  box-shadow: var(--shadow);
}
#usage-chart { width: 100%; height: 220px; }

.card--wide .proxy-list,
.card--wide .proxy {
  max-width: none;
}

.card--wide {
  width: 100%;
}

.proxy-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: none;
}
.empty-note {
  margin: 8px 0;
  color: var(--muted);
  text-align: center;
  font-size: 0.875rem;
}
.proxy {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  width: 100%;
  max-width: none;
}
.proxy:hover {
  border-color: #bbf7d0;
  box-shadow: 0 8px 24px -16px rgba(22, 163, 74, 0.25);
}
.proxy-logo img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--bg);
  object-fit: contain;
}
.proxy-body { min-width: 0; }
.proxy-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.proxy-top h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.proxy-target {
  margin: 4px 0 12px;
  color: var(--muted);
  font-size: 0.8125rem;
  font-family: var(--mono);
}
.proxy-meta { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; flex-shrink: 0; }
.motd { margin: 6px 0 12px; font-size: 0.875rem; line-height: 1.4; }
.motd-line1, .motd-line2 { margin: 0; }
.motd-brand { font-weight: 700; color: var(--blue-deep); }
.motd-up { color: var(--blue); font-weight: 600; }
.motd-line2 { color: #ca8a04; font-weight: 600; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 650;
}
.status-pill.is-online { background: var(--good-soft); color: var(--good); }
.status-pill.is-offline { background: var(--hover); color: var(--muted); }
.status-pill.is-mid { background: var(--mid-soft); color: var(--mid); }

.bot-account-list,
.bot-proxy-list,
.bot-live-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bot-proxy-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
}
.bot-proxy-main { flex: 1; min-width: 0; }
.bot-proxy-main strong { display: block; font-weight: 650; font-family: var(--mono, ui-monospace, monospace); font-size: 0.875rem; }
.bot-proxy-main span { color: var(--muted); font-size: 0.8125rem; }
.bot-action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.bot-action-row form { margin: 0; }
.bot-connect-choices { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.row-ico--tiny .ico { width: 14px; height: 14px; }
.bot-target-block { margin-top: 4px; }
.bot-account-head {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  image-rendering: pixelated;
  flex-shrink: 0;
}

.bot-head-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
  max-height: min(52vh, 420px);
  overflow: auto;
  padding: 4px;
}

.bot-head-pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 8px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  text-align: center;
  position: relative;
}

.bot-head-pick:has(input:checked) {
  border-color: var(--blue);
  background: var(--blue-soft, #ecfdf5);
}

.bot-head-pick input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.bot-head-face img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  image-rendering: pixelated;
  display: block;
}

.bot-head-name {
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1.2;
  word-break: break-word;
}

.bot-head-pick .bot-live {
  font-size: 0.6875rem;
}

.bot-live-head-img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  image-rendering: pixelated;
  flex-shrink: 0;
}
.bot-account-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
}
.bot-account-main { flex: 1; min-width: 0; }
.bot-account-main strong { display: block; font-weight: 650; }
.bot-account-main span { color: var(--muted); font-size: 0.8125rem; }
.bot-live { color: var(--good); font-style: normal; font-weight: 650; }
.botting-panel { margin-top: var(--space-3); }
.bot-pick-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.bot-pick {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 0.875rem;
  cursor: pointer;
}
.bot-pick input { accent-color: var(--blue); }
.bot-control-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.bot-live-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: var(--bg);
}
.bot-live-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.bot-live-head form { margin-left: auto; }
.bot-live-error { color: var(--bad); font-size: 0.8125rem; margin: 0 0 8px; }
.bot-log {
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: 140px;
  overflow: auto;
  font-size: 0.8125rem;
  color: var(--muted);
  font-family: var(--mono);
}
.bot-log li { padding: 2px 0; }
.check-row--inline { margin: 0; }

.host-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 0.8125rem;
  font-family: var(--mono);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.host-chip:hover { border-color: var(--blue); color: var(--blue-deep); }

.region-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 0.8125rem;
  font-weight: 600;
}
.flag {
  display: inline-flex;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
}
.flag svg { display: block; }

.login-grid { display: grid; gap: 10px; max-width: 100%; }
.login-grid--direct { grid-template-columns: 1fr; }
.login-grid--socks { grid-template-columns: 1fr; }
.copy-field { display: flex; align-items: center; gap: 6px; min-width: 0; }
.copy-field input {
  flex: 1;
  min-width: 0;
  font-size: 0.8125rem;
  font-family: var(--mono);
}
.proxy-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  margin-top: 4px;
}
.proxy-actions form { margin: 0; }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.32);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 40;
}
.modal[hidden] { display: none; }
.modal-card {
  width: min(520px, 100%);
  background: #fff;
  border-radius: 16px;
  padding: var(--space-4);
  box-shadow: 0 24px 48px -24px rgba(15, 23, 42, 0.35);
  border: 1px solid var(--line);
}
.modal-card h2 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 650;
}
.modal-card--small { width: min(400px, 100%); }
.modal-card--wide { width: min(720px, 100%); }

.bot-manage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  max-height: min(60vh, 480px);
  overflow: auto;
  padding: 4px;
}

.bot-manage-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  text-align: center;
}

.bot-manage-body {
  image-rendering: pixelated;
  display: block;
  margin: 0 auto;
}

.bot-manage-card strong {
  font-size: 0.8125rem;
  font-weight: 650;
  word-break: break-word;
}

.bot-manage-card .bot-live {
  font-size: 0.6875rem;
}

.bot-manage-card form { margin-top: 4px; }
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}
.field-label {
  margin: 0 0 6px;
  font-size: 0.8125rem;
  color: var(--muted);
  font-weight: 550;
}
.field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.field-row .field-label { margin: 0; }

.region-picks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.region-pick {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  background: #fff;
  color: var(--text);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.region-pick input { width: auto; margin: 0; accent-color: var(--blue); }
.region-pick:has(input:checked) {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.toast-host {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 600;
}
.toast--ok { border-color: #a7f3d0; background: var(--good-soft); color: var(--good); }
.toast--error { border-color: #fecaca; background: var(--bad-soft); color: var(--bad); }
.toast--join { border-color: #bbf7d0; background: var(--blue-soft); color: var(--blue-deep); }

.nav-mail-badge {
  display: inline-flex;
  margin-left: auto;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 6px;
  border-radius: 8px;
  background: #ef4444;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}

.avail-count {
  margin-left: auto;
  font-style: normal;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
}
.region-pick .avail-count { white-space: nowrap; }
.avail-count--dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
}
.avail-count--dot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #94a3b8;
}
.avail-count--dot.is-online { background: #ecfdf5; color: #15803d; }
.avail-count--dot.is-online::before { background: #16a34a; }

.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.choice {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  color: var(--text);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.choice strong { font-weight: 650; }
.choice span { color: var(--muted); font-size: 0.78rem; }
.choice.is-active {
  border-color: var(--blue);
  background: var(--blue-soft);
}
.choice-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue-deep);
  margin-bottom: 6px;
}

.ping-badge {
  margin-left: 4px;
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.ping-badge--good { background: var(--good-soft); color: var(--good); }
.ping-badge--mid { background: var(--mid-soft); color: var(--mid); }
.ping-badge--bad { background: var(--bad-soft); color: var(--bad); }
.ping-badge--na { background: var(--hover); color: var(--muted); }
.ping-badge[title] { cursor: help; }
.region-list .ping-badge { margin-left: 0; }

.session-list,
.session-proxy-list { display: flex; flex-direction: column; gap: 8px; }
.session-row,
.session-proxy-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.session-body,
.session-proxy-main { flex: 1; min-width: 0; }
.session-body strong,
.session-proxy-row strong { display: block; font-weight: 650; }
.session-body span,
.session-proxy-row span { color: var(--muted); font-size: 0.8125rem; }
.session-proxy-row form { margin-left: auto; }
.bot-row-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex-shrink: 0;
}
.session-proxy-row .bot-row-actions form { margin-left: 0; }
.session-row img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}
.row-ico {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue-deep);
}

.settings-card + .settings-card { margin-top: 16px; }

.table-wrap { overflow-x: auto; }
.routes { width: 100%; border-collapse: collapse; }
.routes th, .routes td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 0.875rem;
}
.routes th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.75rem;
}
.empty-row td { text-align: center; color: var(--muted); padding: 28px 10px; }

/* Dark (optional, still blue-tinted — not pure black) */
html[data-theme="dark"],
html.theme-dark {
  --bg: #0b1220;
  --sidebar: #0f172a;
  --card: #111827;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --line: #1e293b;
  --hover: #1e293b;
  --blue: #22c55e;
  --blue-deep: #86efac;
  --blue-soft: #052e1a;
  --blue-ring: rgba(34, 197, 94, 0.28);
  --good-soft: #052e1a;
  --mid-soft: #3f2f05;
  --bad-soft: #2a0b0b;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .kpi,
html[data-theme="dark"] .proxy,
html[data-theme="dark"] .session-row,
html[data-theme="dark"] .session-proxy-row,
html[data-theme="dark"] .region-list li,
html[data-theme="dark"] .region-pick,
html[data-theme="dark"] .choice,
html[data-theme="dark"] .modal-card,
html[data-theme="dark"] .pc-ping,
html[data-theme="dark"] .icon-btn,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .toast,
html.theme-dark .card,
html.theme-dark .kpi,
html.theme-dark .proxy,
html.theme-dark .session-row,
html.theme-dark .session-proxy-row,
html.theme-dark .region-list li,
html.theme-dark .region-pick,
html.theme-dark .choice,
html.theme-dark .modal-card,
html.theme-dark .pc-ping,
html.theme-dark .icon-btn,
html.theme-dark .panel,
html.theme-dark .toast {
  background: var(--card);
  border-color: var(--line);
  color: var(--text);
}

html[data-theme="dark"] .seg-btn.is-active,
html.theme-dark .seg-btn.is-active {
  background: var(--hover);
  color: var(--blue-deep);
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html.theme-dark input,
html.theme-dark select {
  background: #0b1220;
  border-color: var(--line);
  color: var(--text);
}

html[data-theme="dark"] .btn--ghost,
html.theme-dark .btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

html[data-theme="dark"] .btn--outline,
html.theme-dark .btn--outline {
  background: transparent;
  border-color: #14532d;
}

html[data-theme="dark"] .region-pick:has(input:checked),
html[data-theme="dark"] .choice.is-active,
html.theme-dark .region-pick:has(input:checked),
html.theme-dark .choice.is-active {
  background: var(--blue-soft);
  border-color: var(--blue);
}

html[data-theme="dark"] .ping-badge--good,
html.theme-dark .ping-badge--good { background: #052e1a; color: #6ee7b7; }
html[data-theme="dark"] .ping-badge--mid,
html.theme-dark .ping-badge--mid { background: #3f2f05; color: #fde68a; }
html[data-theme="dark"] .ping-badge--bad,
html.theme-dark .ping-badge--bad { background: #2a0b0b; color: #fca5a5; }
html[data-theme="dark"] .status-pill.is-online,
html.theme-dark .status-pill.is-online { background: #052e1a; color: #6ee7b7; }
html[data-theme="dark"] .host-chip,
html[data-theme="dark"] .region-pill,
html.theme-dark .host-chip,
html.theme-dark .region-pill {
  background: var(--hover);
  border-color: var(--line);
}
html[data-theme="dark"] .nav-link.is-active,
html.theme-dark .nav-link.is-active {
  background: var(--blue-soft);
  color: var(--blue-deep);
}
html[data-theme="dark"] .sidebar-login,
html.theme-dark .sidebar-login {
  background: var(--bg);
  border-color: var(--line);
}
html[data-theme="dark"] body.login-page,
html.theme-dark body.login-page { background: var(--bg); }

@media (max-width: 1100px) {
  .kpi-row { grid-template-columns: 1fr 1fr; }
  .kpi-row--6 { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; }
  .admin-grid,
  .admin-grid--2 { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .pc-ping { display: none; }
  body.app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 248px;
    transform: translateX(-105%);
    z-index: 50;
    transition: transform 0.2s ease;
    box-shadow: var(--shadow);
  }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    z-index: 45;
  }
  .sidebar-backdrop.is-open { display: block; }
  .menu-btn { display: inline-flex; }
  main { padding: 0 16px 24px; }
  .topbar { padding: 16px; }
  .region-picks, .choice-grid, .login-grid--socks, .bot-connect-choices { grid-template-columns: 1fr; }
  .bot-control-grid { grid-template-columns: 1fr; }
  .proxy { grid-template-columns: 48px 1fr; }
  .proxy-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: flex-end;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.admin-quick-links {
  margin: 0 0 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Admin: mascot preview */
.admin-mascot-section {
  margin-top: 24px;
}
.admin-mascot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 12px;
}
@media (max-width: 720px) {
  .admin-mascot-grid { grid-template-columns: 1fr; }
}
.admin-mascot-tile {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background:
    linear-gradient(0deg, rgba(15, 23, 42, 0.02), rgba(15, 23, 42, 0.02)),
    repeating-conic-gradient(#f8fafc 0% 25%, #ffffff 0% 50%) 50% / 20px 20px;
}
.admin-mascot-tile img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 360px;
  object-fit: contain;
  background: transparent;
}
.admin-mascot-tile figcaption {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  background: var(--card);
}
.admin-mascot-tile figcaption strong {
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--text);
}
.admin-mascot-tile figcaption a { color: var(--blue-deep); }

/* Dedicated IPs card */
.dedip-head-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.dedip-region {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue-deep);
  font-size: 0.8125rem;
  font-weight: 600;
}
.dedip-region--all {
  background: linear-gradient(135deg, var(--blue-soft), #fef3c7);
  color: var(--blue-deep);
  border-color: #fde68a;
}
.dedip-region--all svg { color: var(--blue-deep); }
.region-picks--edit {
  grid-template-columns: 1fr 1fr 1fr;
  margin-top: 4px;
}
@media (max-width: 640px) {
  .region-picks--edit { grid-template-columns: 1fr; }
}

.ip-group-label {
  margin: 18px 0 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ip-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.ip-group-header .ip-group-label { margin-bottom: 0; }
.ip-add-form { margin: 0; }
.ip-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}
.ip-badge--good { background: var(--good-soft); color: var(--good); }
.ip-badge--pending { background: var(--mid-soft); color: var(--mid); }
.ip-badge--muted { background: var(--hover); color: var(--muted); border: 1px solid var(--line); }
.ip-empty {
  margin: 10px 0 0;
  padding: 14px;
  background: var(--hover);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.875rem;
  text-align: center;
}
.dedip-slot--public {
  display: inline-flex;
  align-items: center;
  min-width: 24px;
}
.dedip-slot--public .flag { display: inline-flex; }
.dedip-menu-item--muted { color: var(--muted); font-weight: 500; }
.dedip-menu-item--muted:hover { background: var(--hover); }

.ip-warning {
  margin: 18px 0 6px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid #fde68a;
  background: var(--mid-soft);
  border-radius: var(--radius);
  color: #78350f;
}
.ip-warning strong { color: #78350f; }
.ip-warning p { margin: 4px 0 0; color: #92400e; font-size: 0.875rem; line-height: 1.5; }
.ip-warning-ico {
  display: inline-flex;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(180, 83, 9, 0.14);
  align-items: center;
  justify-content: center;
  color: #b45309;
  flex-shrink: 0;
}
.ip-warning-ico .ico { color: currentColor; }
.dedip-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dedip-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}
.dedip-row.is-banned {
  border-color: var(--bad);
  background: var(--bad-soft);
}
.dedip-slot {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 650;
  min-width: 24px;
}
.dedip-ip {
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 650;
  color: var(--text);
  letter-spacing: 0.01em;
  background: none;
  padding: 0;
}
.dedip-copy {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 4px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}
.dedip-copy:hover { color: var(--blue-deep); background: var(--hover); }
.dedip-copy.copied { color: var(--good); }
.dedip-spacer { flex: 1; }
.dedip-menu { position: relative; }
.dedip-menu-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}
.dedip-menu-btn:hover { color: var(--text); background: var(--hover); }
.dedip-menu-pop {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 180px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 4px;
  z-index: 30;
}
.dedip-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--bad);
  font-size: 0.9rem;
  font-weight: 600;
}
.dedip-menu-item:hover { background: var(--bad-soft); }
.dedip-menu-item--primary { color: var(--text); }
.dedip-menu-item--primary:hover { background: var(--hover); color: var(--blue-deep); }
.dedip-menu-item--primary .ico { color: var(--blue-deep); }
.dedip-menu-pop hr,
.dedip-menu-pop::after {
  content: '';
  display: block;
  height: 1px;
  background: var(--line);
  margin: 4px 2px;
}
.dedip-menu-pop::after { display: none; }
.btn--danger {
  background: var(--bad);
  border-color: var(--bad);
  color: #fff;
}
.btn--danger:hover {
  background: #b91c1c;
  border-color: #b91c1c;
}
.region-picks--signup {
  grid-template-columns: 1fr 1fr;
  margin-top: 8px;
}

/* Register: disabled region + free-count chip */
.region-pick.is-disabled { opacity: 0.55; cursor: not-allowed; }
.region-pick .region-free {
  margin-left: auto;
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--good);
  background: var(--good-soft);
  border-radius: 999px;
  padding: 2px 8px;
}
.region-pick .region-free--low { color: var(--mid); background: var(--mid-soft); }
.region-pick .region-free--none { color: var(--bad); background: var(--bad-soft); }

/* Reroll inline form on IP row */
.dedip-inline-form { margin: 0; }
.dedip-inline-form .btn { display: inline-flex; align-items: center; gap: 6px; }

/* Admin IP inventory grid */
.ip-inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 8px;
}
.ip-inventory-cell {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  background: var(--card);
}
.ip-inventory-cell.is-full { border-color: var(--bad); background: var(--bad-soft); }
.ip-inventory-region {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.ip-inventory-nums {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 8px;
}
.ip-inventory-nums strong { font-size: 1.4rem; color: var(--text); }
.ip-inventory-nums span { color: var(--muted); font-size: 0.8rem; }
.ip-inventory-bar {
  height: 6px;
  background: var(--hover);
  border-radius: 999px;
  overflow: hidden;
}
.ip-inventory-bar span {
  display: block;
  height: 100%;
  background: var(--blue);
  transition: width 0.3s ease;
}
.ip-inventory-cell.is-full .ip-inventory-bar span { background: var(--bad); }

