:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #eef2e9;
  background: #090c08;
  font-size: 14px;
  --bg: #090c08;
  --surface: #11160f;
  --line: #293322;
  --muted: #9aa592;
  --accent: #97ff18;
  --danger: #ff9393;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.42;
  cursor: wait;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
button {
  color: inherit;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 32px;
  letter-spacing: -1.2px;
  font-weight: 650;
}
h2 {
  font-size: 17px;
  letter-spacing: -0.35px;
}
h3 {
  font-size: 15px;
}
small,
.muted {
  color: var(--muted);
}
.sidebar {
  width: 224px;
  position: fixed;
  inset: 0 auto 0 0;
  padding: 34px 20px;
  border-right: 1px solid var(--line);
  background: #0b1009;
  z-index: 10;
}
.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 0 0 28px;
}
.brand-logo {
  display: block;
  width: 148px;
  height: 148px;
  object-fit: contain;
  border-radius: 50%;
  box-shadow: 0 0 34px #97ff1814;
}
.brand-sub {
  font-size: 8px;
  letter-spacing: 1.8px;
  color: #a5b494;
}
.mobile-brand {
  display: none;
}
.nav-caption {
  font-size: 9px;
  letter-spacing: 1.5px;
  color: #77816e;
  margin: 0 12px 16px;
}
nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
nav a {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 15px;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 9px;
}
nav a > span {
  font-size: 23px;
  width: 25px;
  text-align: center;
  font-weight: 400;
}
nav a b {
  font-size: 13px;
  font-weight: 500;
}
nav a:hover {
  background: #182111;
  color: #f4ffe9;
}
nav a.active {
  color: var(--accent);
  background: #97ff180c;
  border-color: #97ff1822;
}
.sidebar-bottom {
  font-size: 11px;
  color: #c9d1c2;
}
.sidebar-bottom small {
  display: block;
  margin: 8px 0 0 15px;
  font-size: 10px;
}
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 7px;
  box-shadow: 0 0 9px #97ff1833;
}
.workspace {
  margin-left: 224px;
  max-width: 1600px;
}
header {
  height: 78px;
  border-bottom: 1px solid var(--line);
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.breadcrumb {
  font-size: 11px;
  color: var(--muted);
}
.breadcrumb span {
  padding: 0 12px;
  color: #46533c;
}
.breadcrumb b {
  font-weight: 500;
  color: #e3e9dc;
}
.admin-chip {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 11px;
}
main {
  padding: 36px 40px 20px;
  min-height: calc(100vh - 130px);
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 30px;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 2px;
  color: #90a178;
  margin-bottom: 10px;
}
#subtitle {
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
  line-height: 1.5;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 7px;
  min-height: 39px;
  padding: 10px 15px;
  background: var(--accent);
  color: #142004;
  font-size: 12px;
  font-weight: 600;
}
.button:hover {
  filter: brightness(1.08);
}
.button.secondary {
  background: #192313;
  border-color: #34442a;
  color: #d8e2ce;
}
.button.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--muted);
}
.button.danger {
  background: #ff939310;
  color: var(--danger);
  border-color: #ff939330;
}
.button.small {
  min-height: 31px;
  padding: 6px 11px;
  font-size: 11px;
}
.toolbar {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.toolbar[hidden] {
  display: none;
}
.search {
  display: flex;
  gap: 10px;
  align-items: center;
  background: #0f150c;
  border: 1px solid var(--line);
  border-radius: 7px;
  max-width: 370px;
  width: 100%;
  padding: 0 12px;
}
.search span {
  font-size: 24px;
  color: var(--muted);
}
input,
select,
textarea {
  background: #0c1209;
  border: 1px solid #35452a;
  border-radius: 6px;
  color: #eef2e9;
  padding: 10px 12px;
  max-width: 100%;
  min-width: 0;
}
input::placeholder,
textarea::placeholder {
  color: #7d8b70;
}
.search input {
  width: 100%;
  border: none;
  background: none;
  font-size: 12px;
  padding-left: 0;
}
.period-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.period-label select {
  font-size: 12px;
  padding: 9px 12px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.metric {
  background: linear-gradient(135deg, #1a2512, #0f150c);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 21px;
}
.metric-label {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
}
.metric-icon {
  color: #b4f16b;
}
.metric-value {
  font-size: 29px;
  font-weight: 600;
  letter-spacing: -1px;
  margin: 16px 0 9px;
  font-variant-numeric: tabular-nums;
}
.metric-note {
  font-size: 10px;
  color: #9aa88f;
  line-height: 1.5;
}
.accent {
  color: var(--accent);
}
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 20px;
  margin-bottom: 22px;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.panel-heading {
  padding: 21px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}
.panel-heading p {
  font-size: 10px;
  color: var(--muted);
  margin-top: 7px;
}
.panel-body {
  padding: 0 22px 22px;
}
.chart {
  height: 180px;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 0;
  border-bottom: 1px solid var(--line);
  background: repeating-linear-gradient(
    to top,
    var(--line) 0 1px,
    transparent 1px 25%
  );
}
.bar {
  height: 100%;
  flex: 1;
  display: flex;
  align-items: flex-end;
  position: relative;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
}
.bar span {
  display: block;
  width: 100%;
  background: linear-gradient(#a2ff32, #4b851b70);
  border-radius: 3px 3px 0 0;
  min-height: 0;
}
.bar[aria-pressed="true"] {
  background: #97ff1818;
  box-shadow: inset 0 0 0 1px #97ff1850;
}
.bar[aria-pressed="true"] span {
  background: var(--accent);
}
.bar:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.traffic-chart {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 10px;
}
.traffic-y-axis {
  position: relative;
  color: var(--muted);
  font-size: 10px;
  text-align: right;
  white-space: nowrap;
}
.traffic-y-axis span {
  position: absolute;
  right: 0;
  transform: translateY(-50%);
}
.traffic-y-axis span:nth-child(1) {
  top: 0;
}
.traffic-y-axis span:nth-child(2) {
  top: 25%;
}
.traffic-y-axis span:nth-child(3) {
  top: 50%;
}
.traffic-y-axis span:nth-child(4) {
  top: 75%;
}
.traffic-y-axis span:nth-child(5) {
  top: 100%;
}
.traffic-legend {
  margin-left: 74px;
}
.traffic-detail {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.traffic-detail strong {
  flex-basis: 100%;
}
.traffic-detail small,
.traffic-hint {
  color: var(--muted);
}
.traffic-rx {
  color: var(--accent);
}
.traffic-tx {
  color: #a6c9ff;
}
.traffic-hint {
  margin: 9px 0 0;
  font-size: 10px;
}
@media (max-width: 600px) {
  .traffic-chart {
    gap: 7px;
    grid-template-columns: 52px minmax(0, 1fr);
  }
  .traffic-chart .chart {
    gap: 2px;
  }
  .traffic-y-axis {
    font-size: 9px;
  }
  .traffic-legend {
    margin-left: 59px;
  }
}
.chart-legend {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: #8c9c7b;
  padding-top: 11px;
}
.chart-empty {
  height: 180px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
}
.client-summary {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid #29332280;
}
.client-summary:last-child {
  border: 0;
}
.person {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
.avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #97ff1810;
  color: #97ff18;
  border: 1px solid #97ff1820;
  font-size: 11px;
  flex: none;
}
.person-name {
  font-size: 12px;
  font-weight: 550;
  overflow-wrap: anywhere;
}
.person-meta {
  font-size: 10px;
  color: var(--muted);
  margin-top: 5px;
}
.usage {
  text-align: right;
  white-space: nowrap;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.usage small {
  display: block;
  margin-top: 5px;
  font-size: 9px;
}
.section-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.tabs {
  display: flex;
  gap: 5px;
  overflow: auto;
  scrollbar-width: none;
  max-width: 100%;
}
.tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  padding: 8px 11px;
  font-size: 11px;
  white-space: nowrap;
  border-radius: 6px;
}
.tab.active {
  background: #24331a;
  color: #eff7e8;
  border-color: #42582f;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
}
th {
  font-size: 9px;
  letter-spacing: 0.7px;
  color: #8e9e7f;
  font-weight: 500;
  text-transform: uppercase;
  padding: 13px 20px;
  background: #10170c;
  white-space: nowrap;
}
td {
  padding: 17px 20px;
  border-top: 1px solid #29332280;
  vertical-align: middle;
  white-space: nowrap;
}
td.name {
  white-space: normal;
  min-width: 180px;
  max-width: 300px;
  overflow-wrap: anywhere;
}
tbody tr.clickable {
  cursor: pointer;
}
tbody tr.clickable:hover {
  background: #1a2512;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  padding: 5px 8px;
  border-radius: 5px;
  background: #97ff180d;
  color: #97ff18;
  white-space: nowrap;
}
.badge.pending {
  color: #f6d48a;
  background: #f6d48a0d;
}
.badge.blocked,
.badge.rejected {
  color: #ff9393;
  background: #ff93930d;
}
.badge.paused {
  color: #a1ac95;
  background: #a1ac9510;
}
.badge.neutral {
  color: #a0ad94;
  background: #a0ad940c;
}
.badge-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}
.list-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: var(--muted);
}
.pagination {
  display: flex;
  gap: 10px;
  align-items: center;
}
.empty {
  padding: 46px 24px;
  text-align: center;
  color: var(--muted);
  line-height: 1.8;
  font-size: 13px;
}
.empty h2 {
  color: #e7efdf;
  margin-bottom: 12px;
}
.detail-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 23px;
}
.detail-title {
  display: flex;
  gap: 15px;
  align-items: center;
  min-width: 0;
}
.detail-title h2 {
  font-size: 22px;
  overflow-wrap: anywhere;
}
.detail-title p {
  color: var(--muted);
  font-size: 11px;
  margin-top: 6px;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 18px 0;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
}
.kv {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 17px;
  font-size: 12px;
  margin: 6px 0 22px;
}
.kv dt {
  color: var(--muted);
}
.kv dd {
  margin: 0;
  text-align: right;
  overflow-wrap: anywhere;
  max-width: 280px;
}
.kv code {
  font-size: 11px;
}
.info-note {
  padding: 13px 15px;
  background: #97ff1808;
  border: 1px solid #97ff1819;
  border-radius: 7px;
  font-size: 11px;
  color: #b3c69d;
  line-height: 1.7;
}
.info-note.warning {
  background: #f6d48a07;
  border-color: #f6d48a25;
  color: #c8b892;
}
.stats-table td,
.stats-table th {
  padding: 13px 18px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 17px;
}
.field label {
  font-size: 11px;
  color: #c4d0b9;
}
.field small {
  font-size: 10px;
  line-height: 1.6;
}
.field textarea {
  min-height: 160px;
  resize: vertical;
  line-height: 1.7;
  font-size: 13px;
}
.settings-form {
  display: flex;
  gap: 10px;
}
.settings-form input {
  width: 150px;
}
.broadcast-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
}
.announcement-panel {
  margin-bottom: 22px;
}
#announcement-status {
  margin-bottom: 18px;
  font-size: 12px;
}
#announcement-actions {
  flex-wrap: wrap;
}
.announcement-notify {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 16px 0 6px;
  font-size: 13px;
  cursor: pointer;
}
.announcement-notify input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--accent);
}
.announcement-notify-hint {
  display: block;
  color: var(--muted);
  margin-bottom: 18px;
  font-size: 11px;
}
.history-item {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.history-item button {
  margin-top: 9px;
}
.history-item p {
  margin: 8px 0;
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}
.preview-message {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #172638;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13px;
}
.preview-message a {
  color: #b9ff75;
  text-decoration: underline;
}
.progress {
  height: 7px;
  border-radius: 5px;
  background: #2c3a22;
  overflow: hidden;
  margin: 16px 0;
}
.progress progress {
  width: 100%;
  height: 100%;
  accent-color: var(--accent);
  display: block;
  border: 0;
}
.page-footer {
  display: flex;
  justify-content: space-between;
  margin: 15px 40px 0;
  border-top: 1px solid var(--line);
  padding: 19px 0;
  font-size: 8px;
  letter-spacing: 1px;
  color: #7f8e70;
}
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 90px 15px;
  color: var(--muted);
  font-size: 12px;
}
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
dialog {
  color: #eef2e9;
  background: #131c0f;
  border: 1px solid #3a4d2d;
  border-radius: 13px;
  max-width: min(520px, calc(100vw - 30px));
  width: 520px;
  padding: 25px;
  box-shadow: 0 25px 100px #0008;
  max-height: 90dvh;
  overflow: auto;
}
dialog::backdrop {
  background: #020501bb;
  backdrop-filter: blur(4px);
}
dialog h2 {
  font-size: 20px;
  margin: 0 0 20px;
}
dialog p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  margin-bottom: 18px;
}
dialog .modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 24px;
}
.qr {
  display: block;
  max-width: 100%;
  max-height: 55vh;
  margin: auto;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: calc(50% + 112px);
  transform: translateX(-50%);
  padding: 14px 20px;
  background: #23391a;
  color: #deffc4;
  border: 1px solid #648c3b;
  border-radius: 9px;
  box-shadow: 0 12px 40px #0005;
  max-width: min(500px, 90vw);
  z-index: 100;
  font-size: 12px;
  line-height: 1.6;
}
#toast.error {
  background: #3a2228;
  border-color: #75404e;
  color: #ffc2c2;
}
.back {
  display: inline-block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 22px;
}
.inline-link {
  color: var(--accent);
  font-size: 11px;
}
.truncate {
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (min-width: 1500px) {
  main {
    padding: 42px 52px;
  }
  header {
    padding: 0 52px;
  }
}
@media (max-width: 1100px) {
  .sidebar {
    width: 190px;
    padding: 28px 14px;
  }
  .workspace {
    margin-left: 190px;
  }
  header {
    padding: 0 26px;
  }
  main {
    padding: 28px 26px;
  }
  .nav-caption {
    font-size: 8px;
  }
  .brand {
    margin-left: 5px;
  }
  .metrics {
    gap: 10px;
  }
  .metric {
    padding: 17px;
  }
  .metric-value {
    font-size: 25px;
  }
  .dashboard-grid {
    grid-template-columns: 1.3fr 1fr;
  }
  td,
  th {
    padding-left: 15px;
    padding-right: 15px;
  }
  #toast {
    left: calc(50% + 95px);
  }
}
@media (max-width: 760px) {
  .sidebar {
    inset: auto 0 0 0;
    width: 100%;
    height: calc(65px + env(safe-area-inset-bottom));
    padding: 0 8px env(safe-area-inset-bottom);
    border: 0;
    border-top: 1px solid #34442a;
    background: #0b1009f5;
    backdrop-filter: blur(18px);
  }
  .brand,
  .nav-caption,
  .sidebar-bottom {
    display: none;
  }
  nav {
    height: 64px;
    flex-direction: row;
    gap: 0;
    justify-content: space-around;
  }
  nav a {
    flex: 1;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 7px 0;
    border-radius: 0;
    border: 0;
  }
  nav a > span {
    font-size: 21px;
    line-height: 24px;
  }
  nav a b {
    font-size: 9px;
    font-weight: 500;
  }
  nav a.active {
    background: transparent;
  }
  .workspace {
    margin-left: 0;
  }
  header {
    height: 57px;
    padding: 0 20px;
  }
  .breadcrumb {
    font-size: 10px;
  }
  .breadcrumb span {
    padding: 0 7px;
  }
  .admin-chip {
    font-size: 9px;
    padding: 7px 8px;
  }
  main {
    padding: 25px 18px 12px;
    min-height: calc(100dvh - 160px);
  }
  .page-heading {
    margin-bottom: 22px;
    align-items: center;
  }
  h1 {
    font-size: 28px;
  }
  .eyebrow {
    font-size: 8px;
    margin-bottom: 7px;
  }
  #subtitle {
    font-size: 11px;
    max-width: 260px;
  }
  #refresh {
    padding: 10px 12px;
  }
  #refresh span {
    display: none;
  }
  .toolbar {
    gap: 10px;
    margin-bottom: 20px;
  }
  .period-label {
    gap: 6px;
    font-size: 0;
  }
  .period-label select {
    font-size: 11px;
    max-width: 115px;
  }
  .search {
    max-width: none;
  }
  .search input {
    font-size: 11px;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
  }
  .metric {
    padding: 16px;
  }
  .metric-value {
    font-size: 26px;
    margin-top: 13px;
  }
  .metric-note {
    font-size: 9px;
  }
  .metric-label {
    font-size: 10px;
  }
  .dashboard-grid,
  .detail-grid,
  .broadcast-layout {
    grid-template-columns: 1fr;
    gap: 17px;
  }
  .panel-heading {
    padding: 18px;
  }
  .panel-body {
    padding: 0 18px 18px;
  }
  .chart {
    height: 160px;
  }
  .section-row {
    flex-wrap: wrap;
    gap: 13px;
  }
  .tabs {
    width: 100%;
  }
  .tab {
    padding: 8px 10px;
  }
  .section-row > .button {
    margin-left: auto;
  }
  .panel-heading .button {
    padding: 6px 9px;
  }
  .page-footer {
    margin: 14px 18px 78px;
    padding: 16px 0;
    gap: 10px;
    font-size: 7px;
    letter-spacing: 0.6px;
  }
  td,
  th {
    padding: 13px 14px;
  }
  th {
    font-size: 8px;
  }
  td {
    font-size: 11px;
  }
  td.name {
    min-width: 160px;
  }
  .detail-heading {
    align-items: flex-start;
  }
  .detail-title h2 {
    font-size: 20px;
  }
  .actions {
    gap: 7px;
  }
  .actions .button {
    font-size: 11px;
    padding: 9px 12px;
  }
  .kv dd {
    max-width: 200px;
  }
  #toast {
    left: 50%;
    bottom: 86px;
    max-width: calc(100vw - 30px);
    width: max-content;
  }
  dialog {
    padding: 22px 19px;
  }
  .list-footer {
    padding: 13px 14px;
  }
  .usage {
    font-size: 11px;
  }
  .person-name {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

.top-space {
  margin-top: 20px;
}

[hidden] {
  display: none !important;
}
@media (min-width: 761px) and (max-width: 1100px) {
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-grid,
  .detail-grid,
  .broadcast-layout {
    grid-template-columns: 1fr;
  }
}

.mobile-row-summary {
  display: none;
}
@media (max-width: 760px) {
  .user-list td:not(:first-child):not(:last-child),
  .user-list th:not(:first-child):not(:last-child),
  .peer-list td:not(:first-child):not(:last-child),
  .peer-list th:not(:first-child):not(:last-child) {
    display: none;
  }
  .mobile-row-summary {
    display: block;
    font-size: 10px;
    color: var(--muted);
    line-height: 2.2;
    margin-top: 5px;
  }
  .user-list td.name,
  .peer-list td.name {
    min-width: 0;
    max-width: none;
    width: 100%;
  }
  .user-list .person {
    align-items: flex-start;
  }
  .mobile-row-summary .badge {
    font-size: 9px;
    padding: 2px 6px;
  }
}

.support-message {
  padding: 16px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: var(--bg);
  overflow-wrap: anywhere;
}
.support-message p {
  white-space: pre-wrap;
  margin: 10px 0;
}
.support-message small {
  color: var(--muted);
}
.support-message.from-admin {
  border-left: 3px solid var(--accent);
}
.support-message .delivery-error {
  color: #ff9191;
}
@media (max-width: 760px) {
  nav a {
    padding-left: 3px;
    padding-right: 3px;
    min-width: 0;
  }
  nav a b {
    font-size: 9px;
  }
}

nav a[data-nav="support"] {
  position: relative;
}
.support-count {
  margin-left: auto;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 10px;
  background: #f07865;
  color: #142004;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
@media (max-width: 760px) {
  .support-count {
    position: absolute;
    top: 2px;
    right: calc(50% - 25px);
    height: 16px;
    min-width: 16px;
    font-size: 10px;
    padding: 0 4px;
  }
}

.access-placeholder {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #737780;
  background: #101114;
  font:
    14px system-ui,
    sans-serif;
}

/* VovanVPN: dark surfaces, lime signal, a quiet glow around active controls. */
#admin-shell {
  min-height: 100dvh;
  background: radial-gradient(ellipse at 85% 0%, #97ff1809, transparent 50%),
    var(--bg);
}
.sidebar {
  background: linear-gradient(180deg, #111a0b, #090d07 60%);
}
header {
  background: #090c08b8;
}
nav a.active {
  box-shadow:
    inset 2px 0 var(--accent),
    0 0 20px #97ff1806;
}
.button:not(.secondary):not(.ghost):not(.danger) {
  box-shadow: 0 3px 18px #97ff181a;
}
.button.secondary:hover,
.button.ghost:hover {
  border-color: #6c963e;
  background: #202d16;
}
.metric {
  background: linear-gradient(135deg, #1a2512, #10160d 70%);
  position: relative;
}
.metric::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20px;
  right: 20px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #97ff1860, transparent);
}
.metric-icon {
  color: var(--accent);
}
.bar span {
  box-shadow: 0 0 12px #97ff1815;
}
.panel {
  box-shadow: 0 8px 30px #00000020;
}
.tab.active {
  border-color: #97ff1840;
  color: #caff8b;
  background: #97ff1810;
}
.support-count {
  background: var(--accent);
  box-shadow: 0 0 10px #97ff1826;
}
.status-dot {
  box-shadow: 0 0 10px #97ff1850;
}
.eyebrow {
  color: #a4bc8b;
  letter-spacing: 1.7px;
}
.mobile-brand img {
  display: block;
  border-radius: 50%;
  object-fit: contain;
}
.mobile-brand strong {
  font-size: 16px;
  letter-spacing: -0.5px;
}
.mobile-brand strong span {
  color: var(--accent);
}
@media (min-width: 761px) {
  .sidebar {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
  }
  .sidebar > * {
    flex-shrink: 0;
  }
  .sidebar-bottom {
    margin-top: auto;
    padding: 24px 0 0;
  }
}
@media (max-height: 760px) and (min-width: 761px) {
  .sidebar {
    padding-top: 20px;
  }
  .brand {
    gap: 8px;
    margin-bottom: 22px;
  }
  .brand-logo {
    width: 112px;
    height: 112px;
  }
  nav {
    gap: 4px;
  }
}
@media (max-width: 760px) {
  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  header {
    height: 66px;
    padding: 0 18px;
  }
  .breadcrumb {
    display: none;
  }
  nav a.active {
    box-shadow: inset 0 2px var(--accent);
    background: #97ff1808;
  }
  .sidebar {
    background: #0b1009f5;
  }
  .brand {
    display: none;
  }
  .eyebrow {
    font-size: 7px;
  }
}

/* VPS monitoring shares the existing cards and neon palette. */
#server-settings {
  margin-top: 24px;
}
.monitor-status {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 16px;
}
.monitor-status > span:last-child {
  color: var(--accent);
  letter-spacing: 1px;
  white-space: nowrap;
}
.monitor-metrics {
  margin-top: 16px;
}
.monitor-trends {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 16px 0 24px;
}
.monitor-trends > div {
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
}
.monitor-sparkline {
  display: block;
  width: 100%;
  height: 36px;
  margin-top: 8px;
}
.monitor-sparkline path,
.monitor-chart path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}
.monitor-chart {
  height: 180px;
}
.monitor-chart svg {
  display: block;
  width: 100%;
  height: 100%;
}
.monitor-chart .monitor-grid {
  stroke: var(--line);
  stroke-width: 1;
  stroke-dasharray: 4 5;
}
.monitor-chart .network-tx {
  stroke: #a2c5ff;
}
.network-speeds {
  display: flex;
  gap: 18px;
  font-weight: 600;
  font-size: 16px;
}
.network-speeds > span:first-child {
  color: var(--accent);
}
.network-speeds > span:last-child {
  color: #a2c5ff;
}
.monitor-note {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 14px;
}
.monitor-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 12px;
  font-size: 12px;
}
@media (max-width: 760px) {
  .monitor-network .panel-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }
  .network-speeds {
    font-size: 14px;
  }
  .monitor-metrics .metric-value {
    font-size: 25px;
  }
  .monitor-status {
    font-size: 10px;
  }
}
.monitor-network .chart-labels {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  font-size: 10px;
  color: var(--muted);
}
.client-tag {
  display: inline-block;
  margin: 5px 5px 0 0;
  padding: 3px 7px;
  border: 1px solid #97ff1833;
  border-radius: 5px;
  font-size: 10px;
  color: #c2ed94;
  overflow-wrap: anywhere;
}
.tag-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}
.tag-filter select {
  width: auto;
  max-width: 220px;
}
.profile-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px;
  margin-bottom: 20px;
}
.profile-summary strong {
  display: block;
  margin: 7px 0;
}
.badge.expired {
  background: #ffd16615;
  color: #ffd166;
}
.forgotten-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}
.forgotten-item label {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}
.forgotten-item input,
.backup-schedule input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  flex-shrink: 0;
}
.forgotten-item strong {
  overflow-wrap: anywhere;
}
.forgotten-item small,
.backup-row small {
  display: block;
  margin-top: 7px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.backup-schedule {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 22px 0;
}
.backup-schedule > label:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
}
.backup-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.backup-row > div {
  min-width: 0;
}
.diagnostic-checks {
  display: grid;
  gap: 10px;
  margin: 20px 0;
}
.diagnostic-check {
  border-left: 3px solid var(--muted);
  padding: 8px 12px;
  background: var(--surface);
}
.diagnostic-check p {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.5;
}
.diagnostic-check.ok {
  border-color: var(--accent);
}
.diagnostic-check.warning {
  border-color: #ffd166;
}
.diagnostic-check.error {
  border-color: var(--danger);
}
@media (max-width: 760px) {
  .profile-summary {
    align-items: flex-start;
    flex-direction: column;
  }
  .forgotten-item {
    align-items: flex-start;
  }
  .forgotten-item .inline-link {
    font-size: 11px;
    white-space: nowrap;
  }
}
.monitor-chart.interactive-network {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 10px;
}
.monitor-y-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
  padding: 1px 0;
  text-align: right;
  white-space: nowrap;
}
.network-plot {
  position: relative;
  min-width: 0;
  height: 100%;
  cursor: crosshair;
  touch-action: pan-y;
}
.network-plot #network-cursor {
  stroke: #eaf2e4;
  stroke-width: 1;
  stroke-dasharray: 4 3;
  vector-effect: non-scaling-stroke;
}
.network-plot circle {
  stroke: #10170c;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
#network-rx-dot {
  fill: var(--accent);
}
#network-tx-dot {
  fill: #a2c5ff;
}
.network-tooltip {
  position: absolute;
  top: 8px;
  max-width: 100%;
  padding: 10px 12px;
  background: #111a0bf2;
  border: 1px solid #51623e;
  border-radius: 7px;
  pointer-events: none;
  box-shadow: 0 5px 20px #0008;
  z-index: 1;
  font-size: 11px;
  line-height: 1.7;
}
.network-tooltip strong,
.network-tooltip span {
  display: block;
  white-space: nowrap;
}
.network-tooltip span:nth-child(2) {
  color: var(--accent);
}
.network-tooltip span:nth-child(3) {
  color: #a2c5ff;
}
.monitor-network .chart-labels {
  padding-left: 92px;
}
@media (max-width: 760px) {
  .monitor-chart.interactive-network {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 6px;
  }
  .monitor-y-axis {
    font-size: 9px;
  }
  .monitor-network .chart-labels {
    padding-left: 70px;
    font-size: 9px;
  }
  .network-tooltip {
    font-size: 10px;
    padding: 7px;
  }
}
.monitor-chart.interactive-network {
  grid-template-rows: minmax(0, 1fr);
}
.monitor-y-axis,
.network-plot {
  min-height: 0;
}
.network-plot svg {
  position: absolute;
  inset: 0;
}
.network-plot:focus {
  outline: none;
}
.network-plot:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}
.backup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
}
.backup-row > div:first-child {
  flex: 1;
}
@media (max-width: 760px) {
  .backup-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

.table-sort { border: 0; background: none; color: inherit; font: inherit; padding: 6px 0; cursor: pointer; text-align: left; white-space: nowrap; }
.table-sort:hover, .table-sort:focus-visible { color: var(--accent, #c7f65a); }
