@import url("./fonts/fonts.css");

:root {
  --bg: #090b0f;
  --panel: #101319;
  --panel2: #151a22;
  --panel3: #1a202a;
  --line: #262d38;
  --text: #f4f6f8;
  --muted: #8e98a8;
  --accent: #e9b65a;
  --ok: #63d391;
  --warn: #e9b65a;
  --danger: #ef6a67;
  --discord: #5865f2;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
  --sans: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
}
body.light {
  --bg: #f4f6f8;
  --panel: #fff;
  --panel2: #f0f3f6;
  --panel3: #e8ecf1;
  --line: #d8dee7;
  --text: #15191f;
  --muted: #687486;
  --shadow: 0 16px 50px rgba(25, 35, 50, 0.12);
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
a {
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
::placeholder {
  color: var(--muted);
  opacity: 1;
}

/* Shared / dashboard */
.topbar {
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 22px;
  background: rgba(16, 19, 25, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
body.light .topbar {
  background: rgba(255, 255, 255, 0.94);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  letter-spacing: 0.06em;
  font: 700 12px var(--mono);
}
.brand img {
  width: 25px;
  height: 25px;
  border-radius: 7px;
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
  min-width: 0;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.topbar-links {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 14px;
  border-left: 1px solid var(--line);
}
.top-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font: 700 10px var(--mono);
  max-width: 330px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.top-status i,
.system-state i {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--muted);
}
.top-status i.ok,
.system-state i.ok {
  background: var(--ok);
  box-shadow: 0 0 12px rgba(99, 211, 145, 0.55);
}
.top-status i.warn,
.system-state i.warn {
  background: var(--warn);
}
.top-status i.down,
.system-state i.down {
  background: var(--danger);
  box-shadow: 0 0 12px rgba(239, 106, 103, 0.45);
}
.top-btn,
.icon-btn,
.top-link,
.text-btn,
.nav-item {
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  text-decoration: none;
}
.top-btn,
.top-link {
  padding: 8px 11px;
  border-radius: 8px;
  font: 600 11px var(--mono);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.top-btn:hover,
.top-link:hover,
.text-btn:hover,
.nav-item:hover {
  border-color: var(--accent);
}
.icon-btn {
  min-width: 38px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 8px;
  font-size: 15px;
  line-height: 1;
}
.icon-btn:hover {
  border-color: var(--accent);
}
.mobile-only {
  display: none;
}
.desktop-only {
  display: block;
}
.btn-ic {
  display: inline-block;
  line-height: 1;
}
.home-btn {
  display: none;
}
.app-shell {
  display: flex;
  min-height: calc(100vh - 64px);
}
.sidebar {
  position: sticky;
  top: 64px;
  align-self: flex-start;
  width: 242px;
  flex: 0 0 242px;
  height: calc(100vh - 64px);
  overflow: auto;
  padding: 20px 14px;
  border-right: 1px solid var(--line);
  background: var(--panel);
}
.sidebar-brand {
  padding: 4px 10px 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 5px;
}
.sidebar-brand span {
  display: block;
  font: 800 15px var(--mono);
  letter-spacing: 0.08em;
}
.sidebar-brand small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font: 600 9px var(--mono);
  letter-spacing: 0.08em;
}
.nav-group {
  padding: 18px 10px 7px;
  color: var(--muted);
  font: 700 10px var(--mono);
  letter-spacing: 0.08em;
}
.nav-item {
  display: block;
  width: 100%;
  text-align: left;
  border-color: transparent;
  border-radius: 8px;
  padding: 10px 11px;
  margin: 2px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.nav-item.active {
  background: var(--panel2);
  color: var(--text);
  border-color: var(--line);
  box-shadow: inset 2px 0 var(--accent);
}
.sidebar-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin: 20px 4px 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.sidebar-footer a {
  text-align: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  font: 600 10px var(--mono);
  text-decoration: none;
}
.sidebar-footer a:hover {
  color: var(--text);
  border-color: var(--accent);
}
.main {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 30px clamp(16px, 3vw, 40px) 90px;
}
.section {
  display: none;
}
.section.active {
  display: block;
}
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}
.eyebrow {
  font: 700 10px var(--mono);
  color: var(--accent);
  letter-spacing: 0.11em;
}
.page-head h1 {
  margin: 6px 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.page-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.system-state {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 230px;
  padding: 12px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.system-state strong {
  display: block;
  font: 800 10px var(--mono);
}
.system-state small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}
.kpi,
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.015);
}
.kpi {
  padding: 17px;
}
.kpi small,
.kpi span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.kpi strong {
  display: block;
  margin: 7px 0;
  font: 800 27px var(--mono);
  font-variant-numeric: tabular-nums;
}
.kpi span {
  font: 500 10px var(--mono);
}
.grid {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}
.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.card {
  padding: 18px;
}
.card h2 {
  margin: 0 0 16px;
  font-size: 14px;
  letter-spacing: -0.01em;
}
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.card-head h2 {
  margin: 0;
}
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font: 700 9px var(--mono);
  white-space: nowrap;
}
.text-btn {
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 10px;
}
.score-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.score {
  font: 800 34px var(--mono);
}
.score-xl {
  font-size: 60px;
}
.score-row strong,
.security-hero strong {
  font: 800 12px var(--mono);
}
.score-row p,
.security-hero p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}
.progress {
  height: 7px;
  margin-top: 13px;
  background: var(--panel2);
  border-radius: 99px;
  overflow: hidden;
}
.progress i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
  border-radius: inherit;
  transition: width 0.25s ease;
}
.progress.large {
  height: 10px;
}
.system-list,
.metric-list,
.config-list {
  display: grid;
  gap: 0;
}
.system-row,
.config-row {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.system-row:last-child,
.config-row:last-child {
  border-bottom: 0;
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
}
.status-dot.ok {
  background: var(--ok);
}
.status-dot.warn {
  background: var(--warn);
}
.status-dot.down {
  background: var(--danger);
}
.system-row strong,
.config-row strong {
  font-size: 11px;
}
.system-row > div > strong,
.config-row > div > strong {
  display: block;
}
.system-row > div > span,
.config-row > div > span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-family: var(--mono);
  letter-spacing: 0.01em;
}
.system-row span,
.config-row span:last-child {
  color: var(--muted);
  font-size: 10px;
}
.config-row span:last-child {
  font: 700 9px var(--mono);
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.metric-list > div {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.metric-list > div:last-child {
  border-bottom: 0;
}
.metric-list span {
  color: var(--muted);
  font-size: 11px;
}
.metric-list strong {
  font-size: 11px;
  text-align: right;
  overflow-wrap: anywhere;
}
.big-number,
.analytics-number {
  margin-bottom: 5px;
  font: 800 30px var(--mono);
}
.muted {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}
.split {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 15px;
  color: var(--muted);
  font-size: 11px;
}
.split b {
  color: var(--text);
}
.feed {
  display: grid;
  gap: 0;
}
.feed-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.feed-item:last-child {
  border-bottom: 0;
}
.feed-item strong {
  display: block;
  font-size: 11px;
}
.feed-item small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  max-width: 760px;
  line-height: 1.45;
}
.feed-item time {
  color: var(--muted);
  font: 500 9px var(--mono);
  white-space: nowrap;
}
.feed-long {
  max-height: 620px;
  overflow: auto;
}
.empty {
  padding: 20px 0;
  color: var(--muted);
  font-size: 11px;
}
.maintenance {
  margin-bottom: 15px;
  padding: 10px 14px;
  border: 1px solid rgba(233, 182, 90, 0.4);
  border-radius: 9px;
  background: rgba(233, 182, 90, 0.12);
  color: var(--warn);
  font-size: 11px;
  font-weight: 700;
}
.maintenance[hidden],
.overlay[hidden] {
  display: none;
}
.bot-list {
  display: grid;
  gap: 8px;
}
.bot-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel2);
}
.bot-row .bot-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
}
.bot-row.online .bot-dot {
  background: var(--ok);
  box-shadow: 0 0 9px rgba(99, 211, 145, 0.4);
}
.bot-row.offline .bot-dot {
  background: var(--danger);
}
.bot-row.unknown .bot-dot {
  background: var(--warn);
}
.bot-row strong {
  display: block;
  font-size: 11px;
}
.bot-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}
.bot-row .bot-state {
  text-align: right;
  color: var(--muted);
  font: 700 9px var(--mono);
}
.bot-row.online .bot-state {
  color: var(--ok);
}
.bot-row.offline .bot-state {
  color: var(--danger);
}
.bot-row.unknown .bot-state {
  color: var(--warn);
}
.issues {
  display: grid;
  gap: 8px;
}
.issue {
  padding: 11px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--warn);
  border-radius: 8px;
}
.issue.high {
  border-left-color: var(--danger);
}
.issue.low {
  border-left-color: var(--muted);
}
.issue strong {
  display: block;
  font-size: 11px;
}
.issue span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}
.security-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 12px;
}
.check-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.check {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.check i {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--ok);
}
.check.warn i {
  background: var(--warn);
}
.check strong {
  font-size: 11px;
}
.check .muted {
  margin-left: auto;
}
.table-wrap {
  overflow: auto;
  max-height: 480px;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
}
.table th,
.table td {
  text-align: left;
  padding: 9px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table th {
  color: var(--muted);
  font: 700 9px var(--mono);
}
.table td {
  font-size: 10px;
}
.table tr:last-child td {
  border-bottom: 0;
}
.chart {
  min-height: 270px;
}
.chart svg {
  display: block;
  width: 100%;
  height: 270px;
}
.chart-grid {
  stroke: var(--line);
  stroke-width: 1;
}
.chart-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
}
.chart-dot {
  fill: var(--accent);
}
.chart text {
  font: 500 11px var(--mono);
  fill: var(--muted);
}
.chart-bars rect {
  fill: var(--accent);
}
.chart-compact {
  min-height: 170px;
}
.chart-compact svg {
  height: 170px;
}
.audit-list {
  display: grid;
  gap: 8px;
}
.audit-entry {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel2);
}
.audit-entry__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.audit-entry__action {
  font-size: 12px;
  font-weight: 800;
}
.audit-entry__time {
  color: var(--muted);
  font: 500 9px var(--mono);
  white-space: nowrap;
}
.audit-entry__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}
.audit-chip {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 9px;
}
.audit-entry__reason {
  margin-top: 9px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}
.audit-changes {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}
.audit-change {
  padding: 4px 6px;
  border-radius: 5px;
  background: var(--panel3);
  color: var(--muted);
  font: 500 8px var(--mono);
}
.incident-list {
  display: grid;
  gap: 8px;
}
.incident {
  padding: 13px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--danger);
  border-radius: 8px;
}
.incident.warn {
  border-left-color: var(--warn);
}
.incident strong {
  display: block;
  font-size: 12px;
}
.incident span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}
.milestone-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.milestone-head strong {
  font: 800 30px var(--mono);
}
.milestone-head span {
  color: var(--accent);
  font: 700 10px var(--mono);
}
.staff-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px auto;
  gap: 8px;
}
.staff-form input,
.staff-form select,
.command-head input {
  width: 100%;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  outline: none;
}
.staff-form input:focus,
.staff-form select:focus,
.command-head input:focus {
  border-color: var(--accent);
}
.primary {
  padding: 10px 15px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #15100a;
  font-weight: 800;
  cursor: pointer;
}
.mod-input {
  display: block;
  width: 100%;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  outline: none;
  margin: 10px 0;
  resize: vertical;
}
.mod-input:focus {
  border-color: var(--accent);
}
.rank-num {
  font: 800 13px var(--mono);
  color: var(--accent);
  min-width: 26px;
}
.staff-list {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
}
.staff-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.staff-row img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}
.staff-row__info {
  min-width: 110px;
}
.staff-row__info strong,
.staff-row__info small {
  display: block;
  font-size: 10px;
}
.staff-row__info small {
  color: var(--muted);
}
.staff-row__roles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
}
.staff-row .role-chip {
  padding: 4px 8px;
  min-height: 24px;
  font-size: 9px;
}
.staff-search {
  position: relative;
}
.staff-search > input {
  width: 100%;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  outline: none;
  color: var(--text);
}
.staff-search > input:focus {
  border-color: var(--accent);
}
.staff-search > input::placeholder {
  color: var(--muted);
  opacity: 1;
}
.staff-search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 20;
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 260px;
  overflow-y: auto;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.staff-search-results li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  cursor: pointer;
  border-bottom: 1px solid var(--line);
}
.staff-search-results li:last-child {
  border-bottom: 0;
}
.staff-search-results li:hover {
  background: var(--panel3);
}
.staff-search-results li.empty {
  cursor: default;
}
.staff-search-results img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}
.staff-search-results strong,
.staff-search-results small {
  display: block;
  font-size: 10px;
}
.staff-search-results small {
  color: var(--muted);
}
.staff-selected {
  display: none;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel2);
  font-size: 11px;
}
.staff-selected.show {
  display: flex;
}
.staff-selected img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
}
.staff-selected button {
  margin-left: auto;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
}
.staff-selected button:hover {
  border-color: var(--danger);
  color: var(--danger);
}
.role-search {
  margin-top: 14px;
}
.role-search input {
  width: 100%;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  outline: none;
  font-size: 12px;
}
.role-search input:focus {
  border-color: var(--accent);
}
.role-results {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: grid;
  gap: 10px;
}
.role-member {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel2);
}
.role-member__head {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}
.role-member__head img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}
.role-member__head strong,
.role-member__head small {
  display: block;
  font-size: 10px;
}
.role-member__head small {
  color: var(--muted);
}
.role-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 11px;
}
.role-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: 600 10px var(--mono);
  cursor: pointer;
}
.role-chip:hover {
  border-color: var(--accent);
}
.role-chip.on {
  border-color: var(--accent);
  background: rgba(233, 182, 90, 0.12);
  color: var(--text);
}
.role-chip i {
  font-style: normal;
  font-weight: 800;
}
.role-chip.on i {
  color: var(--danger);
}
.role-chip:not(.on) i {
  color: var(--ok);
}
@media (max-width: 760px) {
  .role-chip {
    min-height: 36px;
    padding: 7px 11px;
  }
}
.overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: start center;
  padding: 10vh 16px;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(5px);
}
.command-box {
  width: min(680px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.command-head {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
}
.command-head button {
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
}
.command-result {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 13px 15px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.command-result:hover {
  background: var(--panel2);
}
.command-result strong {
  font-size: 11px;
}
.command-result span {
  color: var(--muted);
  font-size: 10px;
}
.mobile-nav {
  display: none;
}

/* Login */
.login-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 50% 15%, rgba(233, 182, 90, 0.08), transparent 34%), var(--bg);
}
.login-topbar {
  height: 72px;
  border-bottom: 1px solid var(--line);
  background: rgba(16, 19, 25, 0.88);
  backdrop-filter: blur(16px);
}
.login-topbar__inner {
  height: 100%;
  width: min(1180px, 100%);
  margin: auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.login-brand img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}
.login-brand strong {
  display: block;
  font: 700 11px var(--mono);
  letter-spacing: 0.07em;
}
.login-brand span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}
.login-access {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font: 600 9px var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.login-access i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(233, 182, 90, 0.5);
}
.login-center {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 42px 18px;
}
.login-card {
  width: min(470px, 100%);
  padding: 42px 38px 30px;
  text-align: center;
  background: rgba(16, 19, 25, 0.94);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.login-logo img {
  width: 72px;
  height: 72px;
  border-radius: 15px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}
.login-eyebrow {
  display: block;
  margin-top: 22px;
  color: var(--accent);
  font: 700 9px var(--mono);
  letter-spacing: 0.13em;
}
.login-card h1 {
  margin: 9px 0 10px;
  font-size: 30px;
  letter-spacing: -0.03em;
}
.login-subhead {
  margin: 0 auto;
  max-width: 38ch;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.discord-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 24px;
  padding: 13px 18px;
  border: 0;
  border-radius: 9px;
  background: var(--discord);
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(88, 101, 242, 0.22);
  transition:
    transform 0.15s ease,
    filter 0.15s ease;
}
.discord-btn svg {
  width: 20px;
  height: 20px;
}
.discord-btn:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
}
.login-error {
  margin: 14px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(239, 106, 103, 0.35);
  border-radius: 8px;
  background: rgba(239, 106, 103, 0.08);
  color: #ffaaa7;
  font-size: 11px;
  line-height: 1.45;
}
.login-security {
  margin-top: 22px;
  padding: 12px 13px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel2);
}
.login-security > div {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 700 10px var(--mono);
}
.secure-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px rgba(99, 211, 145, 0.4);
}
.login-security p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}
.login-note {
  display: grid;
  gap: 4px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}
.login-note strong {
  color: var(--text);
  font: 700 9px var(--mono);
}
.legal-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}
.legal-links a {
  color: var(--muted);
  font-size: 9px;
  text-decoration: none;
}
.legal-links a:hover {
  color: var(--text);
}
.login-footer {
  padding: 0 20px 24px;
  text-align: center;
  color: var(--muted);
  font: 500 9px var(--mono);
}
.login-footer span {
  display: block;
  margin-top: 10px;
}
.discord-invite-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}
.discord-invite-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--discord);
  text-decoration: none;
  font: 700 10px var(--mono);
  letter-spacing: 0.03em;
  transition: filter 0.15s ease;
}
.discord-invite-link svg {
  width: 15px;
  height: 15px;
}
.discord-invite-link:hover {
  filter: brightness(1.2);
}

/* Backups / legacy shared pages */
.board {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 48px 24px 60px;
}
.board__header {
  margin-bottom: 34px;
}
.title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.title-row img {
  width: 40px;
  height: 40px;
  border-radius: 7px;
}
.title-row h1 {
  margin: 0;
  font-size: 32px;
}
.subhead {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  max-width: 70ch;
}
.board__header .subhead {
  margin-top: 10px;
}
.backup-warning {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel2);
}
.backup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.backup-card {
  margin: 0;
}
.backup-drop {
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 22px 14px;
  border: 1px dashed var(--line);
  border-radius: 9px;
  background: var(--panel2);
  cursor: pointer;
  text-align: center;
}
.backup-drop:hover,
.backup-drop--active {
  border-color: var(--accent);
  background: var(--panel3);
}
.backup-drop__label {
  font-size: 11px;
  font-weight: 700;
}
.backup-drop__hint {
  color: var(--muted);
  font: 500 9px var(--mono);
}
.backup-progress {
  width: 100%;
  margin-top: 7px;
}
.backup-progress__bar {
  height: 5px;
  width: 0;
  background: var(--accent);
  border-radius: 99px;
}
.backup-progress__label {
  margin-top: 4px;
  color: var(--muted);
  font: 500 9px var(--mono);
}
.backup-error {
  padding: 8px;
  border-radius: 7px;
  background: rgba(239, 106, 103, 0.08);
  color: #ffaaa7;
  font-size: 10px;
}
.backup-list {
  margin-top: 10px;
}
.backup-item__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.backup-item__name {
  font-size: 10px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.backup-item__actions {
  display: flex;
  gap: 6px;
}
.backup-btn {
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  text-decoration: none;
  font-size: 9px;
  cursor: pointer;
}
.backup-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}
.backup-btn--delete:hover {
  border-color: var(--danger);
  color: var(--danger);
}
.module-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.module-item {
  padding: 12px;
  border-bottom: 1px solid var(--line);
}
.module-item:last-child {
  border-bottom: 0;
}
.module-empty {
  padding: 15px;
  color: var(--muted);
  font-size: 10px;
}
.module-item__time {
  margin-top: 6px;
  color: var(--muted);
  font: 500 9px var(--mono);
}
.cookie-bar {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 12px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.cookie-bar__text {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}
.cookie-bar__text a {
  color: var(--text);
}
.cookie-bar__btn {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  font-size: 10px;
  cursor: pointer;
}

@media (max-width: 1100px) {
  .sidebar {
    width: 220px;
    flex-basis: 220px;
  }
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid.three {
    grid-template-columns: 1fr;
  }
  .staff-form {
    grid-template-columns: 1fr 1fr auto;
  }
}
@media (max-width: 760px) {
  .topbar {
    height: 58px;
    padding: 0 11px;
    gap: 7px;
  }
  .brand strong {
    font-size: 9px;
  }
  .brand img {
    width: 23px;
    height: 23px;
  }
  .top-status,
  .desktop-only {
    display: none;
  }
  .topbar-left {
    gap: 9px;
  }
  .topbar-right {
    gap: 6px;
  }
  .topbar-actions {
    gap: 6px;
  }
  .top-btn {
    min-width: 40px;
    min-height: 40px;
    padding: 8px;
    justify-content: center;
  }
  .btn-label {
    display: none;
  }
  .icon-btn {
    min-width: 40px;
    min-height: 40px;
  }
  .mobile-only {
    display: block;
  }
  .home-btn {
    display: inline-flex;
  }
  .app-shell {
    display: block;
  }
  .sidebar {
    position: fixed;
    left: -270px;
    top: 58px;
    bottom: 0;
    z-index: 180;
    width: 258px;
    max-height: calc(100vh - 58px);
    transition: left 0.18s ease;
    box-shadow: 20px 0 55px rgba(0, 0, 0, 0.4);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .sidebar.open {
    left: 0;
  }
  .sidebar-overlay {
    position: fixed;
    inset: 58px 0 0 0;
    z-index: 170;
    background: rgba(0, 0, 0, 0.5);
  }
  .sidebar-overlay[hidden] {
    display: none;
  }
  .sidebar-close {
    position: sticky;
    top: 0;
    float: right;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--panel2);
    color: var(--text);
    font-size: 15px;
    margin-bottom: 8px;
    z-index: 2;
  }
  .main {
    padding: 18px 11px 82px;
  }
  .page-head {
    display: block;
    margin-bottom: 18px;
  }
  .system-state {
    min-width: 0;
    margin-top: 12px;
  }
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .kpi {
    padding: 13px;
  }
  .kpi strong {
    font-size: 22px;
  }
  .grid.two {
    grid-template-columns: 1fr;
  }
  .card {
    padding: 14px;
  }
  .card h2 {
    font-size: 13px;
  }
  .score-xl {
    font-size: 46px;
  }
  .security-hero {
    align-items: flex-start;
  }
  .check-list {
    grid-template-columns: 1fr;
  }
  .staff-form {
    grid-template-columns: 1fr;
  }
  .staff-row__roles {
    margin-left: 0;
    width: 100%;
  }
  .staff-row .access-revoke-btn,
  .staff-row .warn-revoke-btn,
  .staff-row .watch-remove-btn {
    margin-left: 0;
    width: 100%;
    min-height: 38px;
    text-align: center;
  }
  .text-btn.danger {
    min-height: 40px;
    width: 100%;
    text-align: center;
  }
  .text-btn {
    min-height: 36px;
    padding: 8px 10px;
  }
  .mod-input {
    padding: 10px;
  }
  #warnSubmitBtn,
  #watchAddBtn {
    width: 100%;
    margin-top: 8px;
    min-height: 40px;
  }
  .viewer-banner {
    font-size: 10.5px;
    line-height: 1.5;
  }
  .bot-row {
    grid-template-columns: 9px minmax(0, 1fr) auto;
  }
  .audit-entry__top {
    display: block;
  }
  .audit-entry__time {
    display: block;
    margin-top: 6px;
  }
  .feed-item {
    display: block;
  }
  .feed-item time {
    display: block;
    margin-top: 6px;
  }
  .mobile-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 170;
    display: flex;
    overflow-x: auto;
    height: 62px;
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(16, 19, 25, 0.96);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(16px);
  }
  body.light .mobile-nav {
    background: rgba(255, 255, 255, 0.96);
  }
  .mobile-nav button {
    flex: 1 0 46px;
    border: 0;
    border-right: 1px solid var(--line);
    background: transparent;
    color: var(--muted);
    font-size: 8px;
    font-weight: 700;
    min-width: 0;
  }
  .mobile-nav button.active {
    background: var(--panel2);
    color: var(--accent);
  }
  .table-wrap {
    margin: 0 -4px;
  }
  .chart {
    min-height: 220px;
  }
  .chart svg {
    height: 220px;
  }
  .login-topbar {
    height: 64px;
  }
  .login-topbar__inner {
    padding: 0 15px;
  }
  .login-access {
    display: none;
  }
  .login-center {
    padding: 28px 14px;
  }
  .login-card {
    padding: 32px 20px 24px;
  }
  .login-card h1 {
    font-size: 26px;
  }
  .login-logo img {
    width: 62px;
    height: 62px;
  }
  .board {
    padding: 32px 14px 48px;
  }
  .backup-grid {
    grid-template-columns: 1fr;
  }
  .title-row h1 {
    font-size: 27px;
  }
  .cookie-bar {
    left: 10px;
    right: 10px;
    bottom: 10px;
    align-items: flex-start;
  }
  .cookie-bar__btn {
    margin-top: 1px;
    min-height: 34px;
  }
  .nav-item {
    padding: 12px 11px;
    min-height: 40px;
  }
  .backup-btn {
    padding: 7px 10px;
    min-height: 32px;
  }
  .staff-selected button {
    padding: 6px 9px;
    min-height: 30px;
  }
  .command-result {
    padding: 14px 15px;
    min-height: 44px;
  }
}
@media (max-width: 420px) {
  .brand strong {
    display: none;
  }
  .page-head h1 {
    font-size: 27px;
  }
  .kpi strong {
    font-size: 20px;
  }
  .login-card {
    border-radius: 12px;
  }
  .login-logo img {
    width: 56px;
    height: 56px;
  }
}
@media (max-width: 380px) {
  .kpi-grid {
    grid-template-columns: 1fr 1fr;
  }
  .bot-detail-grid {
    grid-template-columns: 1fr;
  }
  .check-list {
    grid-template-columns: 1fr;
  }
  .staff-row img {
    width: 28px;
    height: 28px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* v3.2 polish */
.home-brand {
  flex: 0 0 auto;
}
.nav-group {
  text-transform: none;
}
.nav-item {
  text-transform: none;
  letter-spacing: 0;
}
.top-link {
  text-transform: none;
}
.bot-detail-grid-wrap {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.bot-detail-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel2);
}
.bot-detail-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.bot-detail-head h3 {
  margin: 0;
  font-size: 13px;
}
.bot-detail-head small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font: 500 9px var(--mono);
  word-break: break-all;
}
.bot-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--panel3);
  border: 1px solid var(--line);
  font: 800 13px var(--mono);
  overflow: hidden;
}
.bot-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.bot-detail-head .badge {
  margin-left: auto;
}
.bot-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 14px;
}
.bot-detail-grid > div {
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.bot-detail-grid span,
.bot-detail-grid strong {
  display: block;
}
.bot-detail-grid span {
  color: var(--muted);
  font-size: 9px;
}
.bot-detail-grid strong {
  margin-top: 4px;
  font: 700 11px var(--mono);
}
.bot-detail-card > .muted {
  margin: 10px 0 0;
  font-size: 9px;
}
.badge-ok {
  border-color: rgba(99, 211, 145, 0.35);
  color: var(--ok);
}
.badge-warn {
  border-color: rgba(233, 182, 90, 0.35);
  color: var(--warn);
}
.badge-muted {
  color: var(--muted);
}
.yes {
  color: var(--ok);
}
.no {
  color: var(--muted);
}
.delta-up {
  color: var(--ok);
}
.delta-down {
  color: var(--danger);
}
.subblock {
  margin: 18px 0 10px !important;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.audit-entry__technical {
  margin-top: 9px;
  color: var(--muted);
  font: 500 8px var(--mono);
  word-break: break-word;
}
.audit-change {
  display: inline-block;
}
.audit-change strong {
  font-weight: 700;
  color: var(--text);
}
.empty {
  min-height: 54px;
  display: grid;
  place-items: center;
  padding: 15px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}
.board__footer {
  margin-top: 32px;
  color: var(--muted);
  font-size: 10px;
}
.board__footer .legal-links {
  justify-content: flex-start;
}
.backup-topbar {
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 22px;
  background: rgba(16, 19, 25, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.backup-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font: 700 9px var(--mono);
}
.backup-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 10px rgba(99, 211, 145, 0.4);
}
@media (max-width: 760px) {
  .backup-topbar .desktop-only {
    display: none !important;
  }
}
@media (max-width: 900px) {
  .bot-detail-grid-wrap {
    grid-template-columns: 1fr;
  }
  .bot-detail-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 760px) {
  .backup-topbar {
    height: 58px;
    padding: 0 11px;
  }
  .board {
    padding-top: 24px;
  }
}
@media (max-width: 420px) {
  .mobile-nav button {
    font-size: 7px;
  }
  .bot-detail-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.login-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--panel2);
  font: 600 9px var(--mono);
}
.backup-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.015);
}
.backup-card .channels__title {
  margin: 0 0 14px;
  font: 800 12px var(--mono);
  letter-spacing: 0.05em;
}
.backup-warning {
  margin-top: 12px;
}
#updatedAt {
  transition: opacity 0.2s ease;
}
#updatedAt.is-syncing {
  opacity: 0.6;
}
#updatedAt.is-error {
  color: var(--danger);
}

/* Legal pages (confidentialitate.html, cookie-uri.html, termeni.html) */
body:has(.legal) {
  background:
    radial-gradient(circle at 50% 0%, rgba(233, 182, 90, 0.06), transparent 38%), var(--bg);
}
.topbar__inner {
  height: 100%;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}
a.topbar__inner {
  cursor: pointer;
  transition: opacity 0.15s ease;
}
a.topbar__inner:hover {
  opacity: 0.8;
}
.brand-badge__mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
}
.brand-badge__text {
  font: 700 12px var(--mono);
  letter-spacing: 0.06em;
}
.legal {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 56px 24px 80px;
}
.legal h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.legal .subhead {
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  font: 700 10px var(--mono);
  letter-spacing: 0.06em;
  color: var(--accent);
  text-transform: uppercase;
}
.legal h2 {
  margin: 38px 0 14px;
  padding-top: 2px;
  font-size: 16px;
  letter-spacing: -0.01em;
  color: var(--text);
}
.legal h2::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 10px;
  margin-bottom: 1px;
  border-radius: 2px;
  background: var(--accent);
  vertical-align: middle;
}
.legal p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.75;
}
.legal strong {
  color: var(--text);
  font-weight: 700;
}
.legal a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(233, 182, 90, 0.35);
}
.legal a:hover {
  border-bottom-color: var(--accent);
}
.legal code {
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--panel2);
  border: 1px solid var(--line);
  color: var(--text);
  font: 500 12px var(--mono);
}
.legal ul {
  margin: 0 0 14px;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 9px;
}
.legal ul li {
  position: relative;
  padding-left: 20px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.7;
}
.legal ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line);
  border: 1px solid var(--accent);
}
.legal-table {
  width: 100%;
  margin: 6px 0 26px;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  display: block;
  overflow-x: auto;
  white-space: nowrap;
  background: var(--panel);
}
.legal-table thead {
  background: var(--panel2);
}
.legal-table th {
  padding: 12px 14px;
  text-align: left;
  color: var(--muted);
  font: 700 10px var(--mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
}
.legal-table td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
  white-space: normal;
  vertical-align: top;
}
.legal-table tbody tr:last-child td {
  border-bottom: 0;
}
.legal-table tbody tr:hover {
  background: var(--panel2);
}
.legal-table td code {
  white-space: nowrap;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 44px;
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--text);
  text-decoration: none;
  font: 700 11px var(--mono);
  letter-spacing: 0.03em;
  background: var(--panel2);
  transition:
    border-color 0.15s ease,
    transform 0.15s ease;
}
.back-link:hover {
  border-color: var(--accent);
  transform: translateX(-2px);
}
@media (max-width: 760px) {
  .legal {
    padding: 32px 16px 56px;
  }
  .legal h1 {
    font-size: 26px;
  }
  .legal h2 {
    font-size: 14px;
    margin: 30px 0 12px;
  }
  .topbar__inner {
    padding: 0 15px;
  }
}

/* =========================================================================
   Premium polish pass
   -------------------------------------------------------------------------
   Purely additive: no existing rule above is modified, so nothing that
   already worked can break. This only refines depth, motion and rhythm —
   card elevation, a softer ambient background, a themed scrollbar and a
   touch more presence on headings/numbers.
   ========================================================================= */

/* Subtle ambient depth behind the whole app, echoing the login page's
   radial glow instead of a flat black canvas. */
body:not(.light) {
  background:
    radial-gradient(circle at 15% 0%, rgba(233, 182, 90, 0.05), transparent 40%),
    radial-gradient(circle at 85% 100%, rgba(88, 101, 242, 0.04), transparent 45%), var(--bg);
}

/* Real elevation on cards/KPIs instead of the near-invisible 1px inset,
   plus a gentle lift on hover so the panel feels tactile rather than flat.
   Reduced-motion users already get all transitions disabled globally
   (see the existing prefers-reduced-motion rule above). */
.kpi,
.card {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.02),
    0 10px 30px -18px rgba(0, 0, 0, 0.55);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}
.kpi:hover,
.card:hover {
  border-color: rgba(233, 182, 90, 0.28);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.03),
    0 16px 40px -16px rgba(0, 0, 0, 0.6);
  transform: translateY(-1px);
}

/* Headings gain a touch of contrast/weight so page titles read as titles,
   not just larger body text. */
.page-head h1 {
  font-weight: 700;
  background: linear-gradient(180deg, var(--text), rgba(244, 246, 248, 0.78));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
body.light .page-head h1 {
  background: linear-gradient(180deg, var(--text), rgba(21, 25, 31, 0.82));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Big tabular numbers (KPIs, scores, milestones) get a hair more breathing
   room between digits — tabular-nums already keeps them aligned, this just
   keeps large figures from feeling cramped. */
.kpi strong,
.score,
.big-number,
.analytics-number,
.milestone-head strong {
  letter-spacing: 0.01em;
}

/* Themed scrollbars for the panels that actually scroll internally
   (sidebar, tables, feeds, command palette) so they match the dashboard
   instead of showing the browser's default light-grey bar on a dark UI. */
.sidebar,
.table-wrap,
.feed-long,
.staff-search-results,
.overlay,
main {
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.sidebar::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar,
.feed-long::-webkit-scrollbar,
.staff-search-results::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.sidebar::-webkit-scrollbar-thumb,
.table-wrap::-webkit-scrollbar-thumb,
.feed-long::-webkit-scrollbar-thumb,
.staff-search-results::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 99px;
}
.sidebar::-webkit-scrollbar-thumb:hover,
.table-wrap::-webkit-scrollbar-thumb:hover,
.feed-long::-webkit-scrollbar-thumb:hover,
.staff-search-results::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* Themed text selection instead of the browser's default blue highlight. */
::selection {
  background: rgba(233, 182, 90, 0.28);
  color: var(--text);
}

/* Active sidebar item gets a touch more presence than a 2px inset shadow
   alone, so the current section is unmistakable at a glance. */
.nav-item.active {
  background: linear-gradient(180deg, rgba(233, 182, 90, 0.1), rgba(233, 182, 90, 0.03));
}

@media (prefers-reduced-motion: reduce) {
  .kpi:hover,
  .card:hover {
    transform: none;
  }
}

/* Sistemul de acces echipa (invitatie) - reutilizeaza in totalitate
   tokenii de design existenti (culori, radius, spatiere), nu introduce
   o paleta noua. Bannerul de rol "viewer" foloseste accentul discord
   (albastru) in loc de warn (galben), ca sa fie clar ca e informativ,
   nu un avertisment de sistem. */
.viewer-banner {
  border-color: rgba(88, 101, 242, 0.4);
  background: rgba(88, 101, 242, 0.12);
  color: var(--discord);
}
.text-btn.danger {
  color: var(--danger);
  border: 1px solid rgba(239, 106, 103, 0.35);
  margin-top: 10px;
}
.text-btn.danger:hover {
  background: rgba(239, 106, 103, 0.12);
}
.staff-row .access-revoke-btn,
.staff-row .warn-revoke-btn,
.staff-row .watch-remove-btn {
  margin-left: auto;
}
/* Ascundere garantata pentru elementele owner-only inainte ca JS sa
   confirme rolul - dublu strat cu atributul HTML "hidden", ca sa nu
   depinda doar de un singur mecanism. */
.owner-only[hidden] {
  display: none !important;
}
body.is-viewer .role-chip[disabled],
body.is-viewer .staff-role-remove[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}



/* Dashboard footer — responsive and safe around the fixed mobile navigation. */
.dashboard-footer {
  width: 100%;
  margin-top: 34px;
  padding: 22px 2px 4px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  color: var(--muted);
}
.dashboard-footer__brand {
  min-width: 0;
}
.dashboard-footer__brand span {
  display: block;
  color: var(--text);
  font: 800 11px var(--mono);
  letter-spacing: 0.08em;
}
.dashboard-footer__brand small {
  display: block;
  margin-top: 3px;
  font: 600 8px var(--mono);
  letter-spacing: 0.07em;
}
.dashboard-footer__links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px 16px;
  min-width: 0;
}
.dashboard-footer__links a {
  color: var(--muted);
  text-decoration: none;
  font: 600 9px var(--mono);
  transition: color 0.15s ease;
}
.dashboard-footer__links a:hover {
  color: var(--accent);
}
.dashboard-footer__copyright {
  text-align: right;
  white-space: nowrap;
  font: 500 8px var(--mono);
}

@media (max-width: 760px) {
  .dashboard-footer {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 10px;
    margin-top: 28px;
    padding: 20px 4px 12px;
    text-align: center;
  }
  .dashboard-footer__links {
    width: 100%;
    gap: 8px 14px;
  }
  .dashboard-footer__links a {
    font-size: 8px;
    padding: 4px 2px;
  }
  .dashboard-footer__copyright {
    white-space: normal;
    text-align: center;
    line-height: 1.5;
  }

  /* Audit cards: keep every label/value inside the viewport on phones. */
  .audit-entry {
    min-width: 0;
    overflow: hidden;
  }
  .audit-entry__top {
    min-width: 0;
  }
  .audit-entry__action {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.4;
  }
  .audit-entry__time {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.45;
  }
  .audit-entry__meta,
  .audit-changes {
    min-width: 0;
    max-width: 100%;
  }
  .audit-chip,
  .audit-change {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .audit-entry__technical {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.55;
  }
  .card-head {
    min-width: 0;
  }
  .card-head h2 {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  #auditBadge {
    flex: 0 1 auto;
    max-width: 48%;
    white-space: normal;
    text-align: center;
    line-height: 1.3;
  }
}
@media (max-width: 420px) {
  .audit-entry {
    padding: 11px;
  }
  .audit-entry__action {
    font-size: 11px;
  }
  .audit-entry__time {
    font-size: 8px;
  }
  .audit-chip {
    font-size: 8px;
  }
}
