:root {
  --bg: #030912;
  --panel: rgba(8, 18, 34, 0.82);
  --panel-strong: rgba(11, 25, 48, 0.92);
  --panel-soft: rgba(10, 20, 38, 0.72);
  --ink: #edf7ff;
  --muted: #8ca5c2;
  --line: rgba(85, 150, 255, 0.18);
  --accent: #36c4ff;
  --accent-strong: #008dff;
  --accent-dark: #0e5fc9;
  --glow: rgba(54, 196, 255, 0.38);
  --danger: #ff6b85;
  --warning: #8be8ff;
  --shadow: 0 24px 80px rgba(0, 4, 12, 0.55);
  --page-max-width: 1520px;
  --page-gutter: clamp(16px, 2.8vw, 42px);
}

* {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: rgba(150, 158, 170, 0.9) rgba(255, 255, 255, 0.06);
}

*::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

*::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #b2b8c2 0%, #8f97a3 100%);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #c2c8d0 0%, #99a2ae 100%);
  border: 3px solid transparent;
  background-clip: padding-box;
}

*::-webkit-scrollbar-corner {
  background: transparent;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: "Segoe UI Variable Display", "Trebuchet MS", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 20% 10%, rgba(54, 196, 255, 0.22), transparent 24%),
    radial-gradient(circle at 80% 12%, rgba(0, 141, 255, 0.18), transparent 20%),
    linear-gradient(180deg, #02060d 0%, #040b16 42%, #02060d 100%);
  color: var(--ink);
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.72), transparent 92%);
  pointer-events: none;
  opacity: 0.35;
}

.app-backdrop {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(54, 196, 255, 0.1), transparent 32%),
    linear-gradient(125deg, transparent 0%, rgba(54, 196, 255, 0.08) 45%, transparent 60%),
    linear-gradient(90deg, transparent 0%, rgba(0, 141, 255, 0.08) 50%, transparent 100%);
  filter: blur(12px);
  pointer-events: none;
  z-index: 0;
}

h1,
h2,
h3,
h4,
strong,
label,
button,
dialog,
.card,
.detail-panel,
.reports-card,
.service-shell,
.settings-panel {
  color: var(--ink);
}

.page {
  position: relative;
  z-index: 1;
  width: min(var(--page-max-width), calc(100% - (var(--page-gutter) * 2)));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.hero {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  padding: 24px 26px;
  border-radius: 30px;
  border: 1px solid rgba(77, 152, 255, 0.18);
  background:
    radial-gradient(circle at left center, rgba(54, 196, 255, 0.16), transparent 28%),
    linear-gradient(180deg, rgba(9, 20, 38, 0.9) 0%, rgba(6, 13, 24, 0.95) 100%);
  box-shadow: var(--shadow);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: #7fe7ff;
  font-size: 12px;
  font-weight: 700;
  margin: 0 0 10px;
}

h1 {
  font-size: clamp(34px, 5vw, 58px);
  line-height: 0.92;
  margin: 0;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.subtitle,
.settings-subtitle,
.reports-subtitle,
.service-subtitle {
  margin: 8px 0 0;
  max-width: 860px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.hero-brand {
  display: flex;
  align-items: center;
  gap: 22px;
  padding-right: 300px;
}

.hero-brand {
  flex: 1 1 860px;
}

.hero-copy,
.brand-copy,
.auth-copy {
  min-width: 0;
}

.hero-logo-shell,
.auth-visual {
  border-radius: 28px;
  border: 1px solid rgba(77, 152, 255, 0.16);
  background:
    radial-gradient(circle at center, rgba(54, 196, 255, 0.08), transparent 55%),
    rgba(4, 10, 19, 0.72);
  overflow: hidden;
}

.hero-logo-shell {
  width: min(360px, 28vw);
  padding: 10px;
  flex: 0 0 auto;
}

.hero-logo {
  width: 100%;
  display: block;
  border-radius: 18px;
}

.auth-visual {
  padding: 14px;
}

.brand-logo {
  width: 100%;
  display: block;
  border-radius: 18px;
}

.toolbar,
.actions,
.settings-head,
.settings-actions,
.reports-head,
.reports-meta,
.service-actions,
.detail-head,
.detail-head-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.settings-head,
.settings-actions,
.reports-head,
.detail-head {
  justify-content: space-between;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 20px;
}

.service-card,
.reports-shell {
  margin-bottom: 18px;
}

.service-shell,
.reports-card,
.card,
.settings-panel {
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
}

.service-shell {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(54, 196, 255, 0.16), transparent 24%),
    linear-gradient(180deg, rgba(9, 20, 38, 0.94) 0%, rgba(5, 12, 22, 0.98) 100%);
}

.service-copy {
  flex: 1 1 420px;
}

.service-statuses {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.service-status {
  min-width: 120px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.service-status span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.service-status strong {
  font-size: 14px;
  color: var(--danger);
}

.service-status-on strong {
  color: var(--accent);
}

.reports-card {
  border-radius: 28px;
  padding: 24px;
  background:
    radial-gradient(circle at top left, rgba(31, 191, 143, 0.14), transparent 24%),
    linear-gradient(180deg, rgba(19, 35, 48, 0.96) 0%, rgba(15, 27, 38, 1) 100%);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(239, 107, 115, 0.14);
  color: var(--danger);
  font-weight: 700;
  font-size: 13px;
}

.status-badge-on {
  background: rgba(31, 191, 143, 0.14);
  color: var(--accent);
}

.report-warning {
  margin: 0 0 18px;
  color: #f7b0b5;
}

.report-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}

.report-tab {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.report-tab-active {
  background: var(--accent);
  color: #04120e;
  border-color: transparent;
}

.report-stage {
  min-height: 180px;
}

.report-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.summary-card,
.report-panel {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
}

.summary-card {
  padding: 16px;
  width: 100%;
  min-width: 0;
}

.summary-inline {
  height: 100%;
  max-width: 100%;
}

.summary-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}

.summary-card strong {
  display: block;
  font-size: 28px;
  line-height: 1;
  margin-bottom: 8px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.summary-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.summary-compact strong {
  font-size: 24px;
  line-height: 1.08;
}

.sales-overview {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 4px 0 0;
}

.sales-overview span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.sales-overview strong {
  display: block;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.05;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.sales-overview p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.report-panel {
  padding: 18px;
  min-width: 0;
}

.report-panel-full {
  grid-column: 1 / -1;
}

.report-panel h3 {
  margin: 0 0 14px;
  font-size: 18px;
}

.table-shell {
  overflow: auto;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.report-table th,
.report-table td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
}

.report-table th {
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.list-row,
.rank-row {
  display: grid;
  gap: 4px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.list-row:last-child,
.rank-row:last-child {
  border-bottom: none;
}

.list-row span,
.rank-row span {
  color: var(--accent);
  font-weight: 700;
}

.list-row small {
  color: var(--muted);
}

.rank-row {
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.rank-row em {
  color: var(--muted);
  font-style: normal;
}

.card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(9, 20, 38, 0.9) 0%, rgba(5, 12, 22, 0.96) 100%);
  border-radius: 28px;
  padding: 22px;
  border: 1px solid rgba(77, 152, 255, 0.16);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(54, 196, 255, 0.9) 20%, rgba(0, 141, 255, 0.95) 80%, transparent 100%);
}

.card .actions {
  margin-top: 8px;
}

.card .actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.card .actions .button {
  flex: 1 1 180px;
}

.card-stopped {
  opacity: 0.88;
}

.card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.card-head-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.bot-avatar-shell {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  overflow: hidden;
  flex: 0 0 58px;
  border: 1px solid rgba(77, 152, 255, 0.16);
  background:
    radial-gradient(circle at 30% 30%, rgba(54, 196, 255, 0.22), transparent 42%),
    linear-gradient(180deg, rgba(15, 30, 48, 0.96) 0%, rgba(8, 17, 28, 0.96) 100%);
}

.bot-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.bot-avatar-shell.has-image .bot-avatar {
  display: block;
}

.bot-avatar-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.bot-avatar-shell.has-image .bot-avatar-fallback {
  display: none;
}

.bot-name {
  margin: 0;
  font-size: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.name-edit-button {
  border: 1px solid rgba(86, 163, 255, 0.18);
  border-radius: 999px;
  padding: 6px 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.card-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  cursor: pointer;
  user-select: none;
}

.card-toggle-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.card-toggle-track {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 52px;
  height: 30px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 107, 133, 0.16);
  border: 1px solid rgba(255, 107, 133, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: background 120ms ease, border-color 120ms ease, opacity 120ms ease;
}

.card-toggle-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffffff 0%, #dcecff 100%);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.28);
  transition: transform 120ms ease;
}

.card-toggle-input:checked + .card-toggle-track {
  background: rgba(49, 201, 124, 0.18);
  border-color: rgba(49, 201, 124, 0.3);
}

.card-toggle-input:checked + .card-toggle-track .card-toggle-thumb {
  transform: translateX(22px);
}

.card-toggle-input:disabled + .card-toggle-track {
  opacity: 0.6;
}

.card-toggle-copy {
  display: grid;
  gap: 2px;
}

.card-toggle-copy strong {
  font-size: 13px;
  line-height: 1.1;
}

.card-toggle-copy small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.1;
}

.card-license-note {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 107, 133, 0.28);
  background: rgba(255, 107, 133, 0.1);
  color: #ffd7df;
  font-size: 13px;
  line-height: 1.5;
}

.rename-panel {
  width: min(560px, calc(100vw - 24px));
}

.confirm-modal {
  width: min(560px, calc(100vw - 24px));
}

.confirm-panel {
  width: 100%;
}

.rename-form {
  display: grid;
  gap: 10px;
  margin: 18px 0 22px;
}

.rename-form input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 13px 14px;
  font: inherit;
  background: rgba(7, 17, 26, 0.76);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.rename-form input:focus {
  outline: 2px solid rgba(54, 196, 255, 0.25);
  border-color: rgba(54, 196, 255, 0.45);
}

.rename-form textarea,
.rename-form select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 13px 14px;
  font: inherit;
  background: rgba(7, 17, 26, 0.76);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  resize: vertical;
}

.rename-form textarea:focus,
.rename-form select:focus {
  outline: 2px solid rgba(54, 196, 255, 0.25);
  border-color: rgba(54, 196, 255, 0.45);
}

.form-hint {
  margin: -2px 2px 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.add-bot-panel {
  width: 100%;
}

.add-bot-form {
  max-height: 62vh;
  overflow: auto;
  padding-right: 6px;
  scrollbar-gutter: stable both-edges;
}

.add-bot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

.add-bot-grid-span {
  grid-column: 1 / -1;
}

.add-bot-license-toggle {
  margin-top: -4px;
}

.add-bot-section {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.add-bot-section-head h3 {
  margin: 0;
  font-size: 18px;
}

.add-bot-section-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.add-bot-file-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.add-bot-file-button {
  white-space: nowrap;
}

.add-bot-extra-fields {
  display: grid;
  gap: 10px;
}

.add-bot-extra-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr) minmax(0, 1.4fr) auto auto;
  gap: 10px;
  align-items: center;
}

.add-bot-inline-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.add-bot-install-status {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(54, 196, 255, 0.12);
  border: 1px solid rgba(54, 196, 255, 0.18);
  color: #b8ecff;
  white-space: pre-wrap;
}

.add-bot-install-status.is-error {
  background: rgba(255, 107, 133, 0.12);
  border-color: rgba(255, 107, 133, 0.2);
  color: #ffc0cb;
}

.bot-path {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  word-break: break-word;
  display: none;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 107, 133, 0.16);
  color: #ffb7c3;
  border: 1px solid rgba(255, 107, 133, 0.26);
}

.status-pill[data-status="running"],
.status-pill[data-status="online"] {
  background: rgba(49, 201, 124, 0.16);
  border-color: rgba(49, 201, 124, 0.28);
  color: #86f0b5;
}

.status-pill[data-status="grace"] {
  background: rgba(255, 196, 92, 0.16);
  color: #ffd68a;
  border-color: rgba(255, 196, 92, 0.28);
}

.status-pill[data-status="stopped"],
.status-pill[data-status="error"],
.status-pill[data-status="offline"],
.status-pill[data-status="expired"] {
  background: rgba(239, 107, 115, 0.14);
  color: var(--danger);
  border-color: rgba(255, 107, 133, 0.26);
}

.client-status-pill {
  min-width: 88px;
  justify-content: center;
}

.client-status-pill[data-status="running"],
.client-status-pill[data-status="online"] {
  background: rgba(49, 201, 124, 0.16);
  border-color: rgba(49, 201, 124, 0.28);
  color: #86f0b5;
}

.client-status-pill[data-status="grace"] {
  background: rgba(255, 196, 92, 0.16);
  border-color: rgba(255, 196, 92, 0.28);
  color: #ffd68a;
}

.client-status-pill[data-status="stopped"],
.client-status-pill[data-status="error"],
.client-status-pill[data-status="offline"],
.client-status-pill[data-status="expired"] {
  background: rgba(255, 107, 133, 0.16);
  border-color: rgba(255, 107, 133, 0.26);
  color: #ffb7c3;
}

.meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.meta-item {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px 12px;
}

.meta-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.meta-item strong {
  font-size: 14px;
}

.meta-item-client-status strong {
  color: #86f0b5;
}

.meta-item-client-status[data-status="grace"] strong {
  color: #ffd68a;
}

.meta-item-client-status[data-status="stopped"] strong,
.meta-item-client-status[data-status="error"] strong,
.meta-item-client-status[data-status="offline"] strong,
.meta-item-client-status[data-status="expired"] strong {
  color: #ffb7c3;
}

.button,
.icon-button {
  border: 1px solid rgba(86, 163, 255, 0.18);
  border-radius: 999px;
  padding: 11px 16px;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(14, 28, 50, 0.96) 0%, rgba(9, 18, 33, 0.96) 100%);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: transform 120ms ease, opacity 120ms ease, background 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.button:hover:not(:disabled),
.icon-button:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(54, 196, 255, 0.38);
  box-shadow: 0 0 0 1px rgba(54, 196, 255, 0.06), 0 8px 28px rgba(0, 141, 255, 0.16);
}

.button:disabled,
.icon-button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.button-primary {
  background: linear-gradient(135deg, #4ae1ff 0%, #00afff 52%, #0078ff 100%);
  color: #031321;
  border-color: rgba(74, 225, 255, 0.44);
}

.button-danger {
  background: linear-gradient(135deg, #ff7d98 0%, #ee456d 100%);
  color: white;
  border-color: rgba(255, 107, 133, 0.26);
}

.logs {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  display: grid;
  gap: 8px;
  min-height: 92px;
}

.log-line {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 10px;
  font-size: 12px;
  align-items: start;
}

.log-line span {
  color: var(--muted);
}

.log-line code {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: Consolas, monospace;
}

.log-line[data-type="stderr"] code,
.log-line[data-type="error"] code {
  color: var(--danger);
}

.empty {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.settings-modal {
  border: none;
  padding: 0;
  background: transparent;
  width: min(920px, calc(100% - 24px));
}

.detail-modal {
  border: none;
  padding: 0;
  background: transparent;
  width: min(1280px, calc(100% - 24px));
}

.detail-modal::backdrop {
  background: rgba(2, 8, 13, 0.78);
}

.detail-panel {
  background:
    radial-gradient(circle at top right, rgba(54, 196, 255, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(9, 20, 38, 0.98) 0%, rgba(4, 10, 19, 1) 100%);
  border: 1px solid rgba(77, 152, 255, 0.18);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.detail-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  word-break: break-word;
}

.detail-body {
  margin-top: 18px;
}

.txfree-panel-modal {
  width: min(1460px, calc(100% - 24px));
}

.txfree-panel-shell {
  padding-bottom: 18px;
}

.txfree-panel-body {
  margin-top: 18px;
  height: calc(100vh - 170px);
  min-height: 720px;
}

.txfree-panel-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background: rgba(4, 10, 19, 0.96);
}

.access-body {
  margin-top: 18px;
  max-height: calc(100vh - 180px);
  overflow: auto;
  padding-right: 6px;
  scrollbar-gutter: stable both-edges;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.detail-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 24px;
  padding: 20px;
  min-width: 0;
}

.detail-card-full {
  grid-column: 1 / -1;
}

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

.detail-card-head h3 {
  margin: 0;
  font-size: 20px;
}

.muted-label {
  color: var(--muted);
  font-size: 12px;
}

.detail-logs {
  margin-top: 0;
  min-height: 0;
}

.detail-log-command {
  margin-bottom: 14px;
}

.detail-log-command .empty {
  margin-top: 6px;
}

.settings-modal::backdrop {
  background: rgba(2, 8, 13, 0.7);
}

.settings-panel {
  background:
    radial-gradient(circle at top right, rgba(54, 196, 255, 0.16), transparent 28%),
    linear-gradient(180deg, rgba(9, 20, 38, 0.98) 0%, rgba(4, 10, 19, 1) 100%);
  border-radius: 28px;
  padding: 24px;
}

.settings-form {
  margin: 0 0 20px;
  display: grid;
  gap: 18px;
  max-height: 62vh;
  overflow: auto;
  padding-right: 6px;
  scrollbar-gutter: stable both-edges;
}

.settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.settings-tab {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.settings-tab span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
}

.settings-tab-active {
  background: var(--accent);
  color: #04120e;
  border-color: transparent;
}

.settings-tab-active span {
  background: rgba(4, 18, 14, 0.16);
}

.settings-group {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.settings-group-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.settings-group-head h3 {
  margin: 0;
  font-size: 22px;
}

.settings-group-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.field-full,
.field-checkbox {
  grid-column: 1 / -1;
}

.field label,
.checkbox span {
  font-size: 13px;
  font-weight: 700;
}

.field-hint {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 13px 14px;
  font: inherit;
  background: rgba(7, 17, 26, 0.76);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.field input:focus,
.field textarea:focus {
  outline: 2px solid rgba(31, 191, 143, 0.25);
  border-color: rgba(31, 191, 143, 0.5);
}

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

.checkbox {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  background: linear-gradient(180deg, rgba(12, 24, 40, 0.94) 0%, rgba(8, 17, 28, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card,
.license-banner,
.access-section,
.access-list-section,
.session-chip,
.access-entry {
  border: 1px solid rgba(77, 152, 255, 0.16);
  box-shadow: var(--shadow);
}

.auth-card {
  width: min(980px, 100%);
  padding: 34px;
  border-radius: 32px;
  background:
    radial-gradient(circle at top left, rgba(54, 196, 255, 0.18), transparent 28%),
    linear-gradient(180deg, rgba(9, 20, 38, 0.94) 0%, rgba(4, 10, 19, 0.98) 100%);
}

.auth-card-brand {
  display: grid;
  grid-template-columns: minmax(360px, 1.05fr) minmax(320px, 0.95fr);
  align-items: center;
  gap: 32px;
}

.auth-copy {
  display: grid;
  gap: 18px;
}

.auth-form,
.access-form {
  display: grid;
  gap: 10px;
}

.auth-form {
  margin-top: 0;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(77, 152, 255, 0.14);
  background: rgba(7, 17, 30, 0.6);
}

.auth-submit {
  margin-top: 8px;
}

.auth-error {
  margin: 0;
  color: #ff9da6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  align-self: center;
  justify-content: flex-end;
}

.session-chip-button,
.license-banner {
  padding: 14px 16px;
  background: rgba(8, 18, 34, 0.78);
}

.session-menu {
  position: relative;
  margin-left: auto;
  z-index: 4;
}

.session-chip-button {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
  border: 1px solid rgba(77, 152, 255, 0.16);
  border-radius: 20px;
  color: var(--ink);
  cursor: pointer;
  background:
    radial-gradient(circle at top left, rgba(54, 196, 255, 0.1), transparent 42%),
    rgba(8, 18, 34, 0.9);
  box-shadow: var(--shadow);
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.session-chip-button:hover {
  transform: translateY(-1px);
  border-color: rgba(54, 196, 255, 0.34);
  box-shadow: 0 0 0 1px rgba(54, 196, 255, 0.06), 0 12px 28px rgba(0, 141, 255, 0.12);
}

.session-chip-button:focus-visible {
  outline: 2px solid rgba(54, 196, 255, 0.28);
  outline-offset: 2px;
}

.session-chip-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
  text-align: left;
  flex: 1 1 auto;
}

.session-chip-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-avatar-shell {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  overflow: hidden;
  flex: 0 0 48px;
  border: 1px solid rgba(77, 152, 255, 0.18);
  background:
    radial-gradient(circle at 30% 30%, rgba(54, 196, 255, 0.22), transparent 42%),
    linear-gradient(180deg, rgba(15, 30, 48, 0.96) 0%, rgba(8, 17, 28, 0.96) 100%);
}

.session-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.session-avatar-shell.has-image .session-avatar {
  display: block;
}

.session-avatar-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.session-avatar-shell.has-image .session-avatar-fallback {
  display: none;
}

.session-menu-caret {
  width: 10px;
  height: 10px;
  border-right: 2px solid rgba(140, 165, 194, 0.9);
  border-bottom: 2px solid rgba(140, 165, 194, 0.9);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 140ms ease;
}

.session-menu.is-open .session-menu-caret {
  transform: rotate(-135deg) translateY(-1px);
}

.session-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 15;
  display: grid;
  gap: 6px;
  min-width: 220px;
  padding: 8px;
  border-radius: 18px;
  border: 1px solid rgba(77, 152, 255, 0.16);
  background:
    radial-gradient(circle at top right, rgba(54, 196, 255, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(9, 20, 38, 0.98) 0%, rgba(4, 10, 19, 0.98) 100%);
  box-shadow: 0 18px 38px rgba(0, 4, 12, 0.42);
}

.session-menu-item {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.03);
  transition: background 140ms ease, border-color 140ms ease;
}

.session-menu-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(54, 196, 255, 0.24);
}

.license-banner {
  display: grid;
  gap: 4px;
  border-radius: 20px;
  border: 1px solid rgba(77, 152, 255, 0.16);
  box-shadow: var(--shadow);
}

.session-chip-copy span,
.license-banner span {
  color: var(--muted);
  font-size: 13px;
}

.license-banner {
  margin: 0 0 18px;
}

.license-banner-warning {
  background: linear-gradient(180deg, rgba(255, 204, 92, 0.22) 0%, rgba(181, 132, 33, 0.16) 100%);
  border-color: rgba(255, 210, 104, 0.42);
}

.license-banner-warning strong {
  color: #ffe38a;
}

.license-banner-warning span {
  color: #fff1bf;
}

.license-banner-danger {
  background: linear-gradient(180deg, rgba(255, 104, 132, 0.24) 0%, rgba(135, 30, 52, 0.2) 100%);
  border-color: rgba(255, 126, 149, 0.42);
}

.license-banner-danger strong {
  color: #ffb7c3;
}

.license-banner-danger span {
  color: #ffd5dc;
}

.access-modal {
  width: min(1320px, calc(100vw - 24px));
}

.logs-modal {
  width: min(920px, calc(100vw - 24px));
}

.access-panel {
  width: 100%;
  max-height: calc(100vh - 40px);
  overflow: hidden;
}

.logs-panel {
  width: 100%;
  max-height: calc(100vh - 40px);
  overflow: hidden;
}

.logs-modal-body {
  margin-top: 18px;
  max-height: calc(100vh - 180px);
  overflow: auto;
  padding-right: 6px;
  scrollbar-gutter: stable both-edges;
}

.access-layout,
.access-lists {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.access-layout {
  margin-top: 0;
}

.logs-view-shell {
  display: grid;
  gap: 16px;
}

.logs-list-section {
  margin-top: 0;
}

.admin-logs-page {
  margin-bottom: 18px;
}

.txfree-config-page {
  margin-bottom: 18px;
}

.admin-logs-shell {
  display: grid;
  gap: 18px;
  padding: 24px;
  border-radius: 28px;
  border: 1px solid rgba(77, 152, 255, 0.18);
  background:
    radial-gradient(circle at top right, rgba(54, 196, 255, 0.14), transparent 26%),
    linear-gradient(180deg, rgba(9, 20, 38, 0.94) 0%, rgba(4, 10, 19, 0.98) 100%);
  box-shadow: var(--shadow);
}

.txfree-config-shell {
  display: grid;
  gap: 18px;
  padding: 28px 30px;
  border-radius: 28px;
  border: 1px solid rgba(77, 152, 255, 0.18);
  background:
    radial-gradient(circle at top right, rgba(54, 196, 255, 0.14), transparent 26%),
    linear-gradient(180deg, rgba(9, 20, 38, 0.94) 0%, rgba(4, 10, 19, 0.98) 100%);
  box-shadow: var(--shadow);
}

.admin-logs-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.txfree-config-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.admin-logs-stats {
  margin: 0;
}

.admin-logs-tabs {
  margin: 0;
}

.admin-logs-content {
  display: grid;
  gap: 16px;
}

.txfree-config-body {
  min-height: 0;
}

.txfree-config-frame {
  display: block;
  width: 100%;
  height: 1120px;
  min-height: 900px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  background: rgba(4, 10, 19, 0.96);
  overflow: hidden;
}

.admin-logs-panel {
  padding: 22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  min-width: 0;
}

.admin-logs-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.admin-logs-panel-head h3 {
  margin: 0;
}

.admin-logs-helper {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

/* Keep the home dashboard compact even if an older app.js render slips through. */
#admin-dashboard .audit-grid,
#admin-dashboard .dashboard-columns,
#admin-dashboard .executive-strip {
  display: none !important;
}

.logs-window-mode .page {
  width: min(1680px, calc(100% - 32px));
  padding-top: 18px;
}

.logs-window-mode .admin-logs-page {
  margin-bottom: 0;
}

.logs-window-mode .admin-logs-shell {
  min-height: calc(100vh - 48px);
}

.logs-window-mode .txfree-config-page {
  margin-bottom: 0;
}

.logs-window-mode .txfree-config-shell {
  min-height: calc(100vh - 48px);
}

.txfree-config-mode .page {
  width: min(1880px, calc(100% - 24px));
  padding-top: 18px;
}

.txfree-config-mode .txfree-config-page {
  margin-bottom: 0;
}

.txfree-config-mode .txfree-config-shell {
  min-height: calc(100vh - 48px);
}

.access-lists {
  margin-top: 20px;
}

.access-section,
.access-list-section {
  padding: 22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.03);
  min-width: 0;
  overflow: hidden;
}

.access-section-head h3 {
  margin: 0 0 4px;
}

.access-section-head p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
}

.bot-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pick-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(18, 31, 48, 0.9) 0%, rgba(11, 21, 34, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

.pick-item:hover {
  transform: translateY(-1px);
  border-color: rgba(54, 196, 255, 0.28);
  box-shadow: 0 10px 26px rgba(0, 12, 28, 0.22);
}

.checkbox input[type="checkbox"],
.pick-item input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin: 0;
  flex: 0 0 18px;
  border-radius: 6px;
  border: 1px solid rgba(138, 154, 178, 0.5);
  background: rgba(4, 12, 22, 0.92);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.checkbox input[type="checkbox"]::after,
.pick-item input[type="checkbox"]::after {
  content: "";
  width: 100%;
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(135deg, #6de8ff 0%, #13b8ff 45%, #0a7eff 100%);
  transform: scale(0);
  transition: transform 120ms ease;
  box-shadow: 0 0 18px rgba(54, 196, 255, 0.45);
}

.checkbox input[type="checkbox"]:hover,
.pick-item input[type="checkbox"]:hover {
  border-color: rgba(109, 232, 255, 0.74);
}

.checkbox input[type="checkbox"]:checked,
.pick-item input[type="checkbox"]:checked {
  border-color: rgba(109, 232, 255, 0.8);
  background: linear-gradient(135deg, #6de8ff 0%, #13b8ff 45%, #0a7eff 100%);
  box-shadow: 0 0 0 3px rgba(54, 196, 255, 0.12);
}

.checkbox input[type="checkbox"]:checked::after,
.pick-item input[type="checkbox"]:checked::after {
  transform: scale(1);
}

.checkbox input[type="checkbox"]:focus-visible,
.pick-item input[type="checkbox"]:focus-visible {
  outline: 2px solid rgba(109, 232, 255, 0.34);
  outline-offset: 2px;
}

.pick-item:has(input[type="checkbox"]:checked) {
  border-color: rgba(54, 196, 255, 0.34);
  background: linear-gradient(180deg, rgba(20, 40, 63, 0.94) 0%, rgba(10, 24, 38, 0.94) 100%);
  box-shadow: 0 12px 30px rgba(0, 16, 36, 0.26);
}

.checkbox:has(input[type="checkbox"]:checked) {
  border-color: rgba(54, 196, 255, 0.28);
  background: linear-gradient(180deg, rgba(15, 30, 48, 0.96) 0%, rgba(9, 20, 32, 0.94) 100%);
}

.access-list {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.access-list-licenses {
  max-height: 236px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
  scrollbar-gutter: stable;
}

.access-entry-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
  min-width: 0;
}

.access-form input,
.access-form textarea,
.access-form select {
  width: 100%;
  max-width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 13px 14px;
  font: inherit;
  background: rgba(7, 17, 26, 0.76);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  box-sizing: border-box;
  min-width: 0;
}

.access-form input:focus,
.access-form textarea:focus,
.access-form select:focus {
  outline: 2px solid rgba(31, 191, 143, 0.25);
  border-color: rgba(31, 191, 143, 0.5);
}

.access-entry {
  display: grid;
  gap: 4px;
  width: 100%;
  min-width: 0;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
  overflow: hidden;
}

.access-entry span,
.access-entry small {
  color: var(--muted);
  min-width: 0;
  overflow-wrap: anywhere;
}

.access-delete-button {
  width: 52px;
  min-width: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 126, 149, 0.18);
  border-radius: 18px;
  background: rgba(255, 107, 133, 0.08);
  color: #ffb7c3;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease, opacity 120ms ease;
}

.access-delete-button:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(255, 126, 149, 0.34);
  background: rgba(255, 107, 133, 0.16);
}

.access-delete-button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.access-delete-button svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.access-license-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.access-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.access-status-active {
  background: rgba(54, 196, 255, 0.12);
  color: #8be8ff;
  border: 1px solid rgba(54, 196, 255, 0.22);
}

.access-status-grace {
  background: rgba(255, 204, 92, 0.18);
  color: #ffe38a;
  border: 1px solid rgba(255, 210, 104, 0.32);
}

.access-status-blocked,
.access-status-inactive {
  background: rgba(255, 104, 132, 0.18);
  color: #ffb7c3;
  border: 1px solid rgba(255, 126, 149, 0.3);
}

select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 13px 14px;
  font: inherit;
  background: rgba(7, 17, 26, 0.76);
  color: var(--ink);
}

@media (max-width: 900px) {
  .report-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .txfree-panel-body {
    height: calc(100vh - 140px);
    min-height: 560px;
  }

  .auth-card-brand {
    grid-template-columns: 1fr;
  }

  .hero-brand {
    padding-right: 0;
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-logo-shell,
  .auth-visual {
    width: 100%;
  }

  .access-layout,
  .access-lists {
    grid-template-columns: 1fr;
  }

  .session-menu {
    position: relative;
    margin-left: 0;
    width: 100%;
  }

  .session-chip-button,
  .session-menu-panel {
    width: 100%;
    min-width: 0;
  }
}

@media (min-width: 901px) {
  .hero-actions {
    width: 100%;
    justify-content: flex-start;
    align-self: flex-end;
    padding-right: 300px;
  }

  .session-menu {
    position: absolute;
    top: 24px;
    right: 26px;
    width: auto;
    margin-left: 0;
  }
}

@media (max-width: 640px) {
  .page {
    width: calc(100% - 20px);
    padding-top: 20px;
  }

  .meta,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 1fr;
  }
}

.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, rgba(54, 196, 255, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(2, 7, 14, 0.98) 0%, rgba(3, 10, 19, 0.98) 100%);
  transition: opacity 420ms ease, visibility 420ms ease;
}

.splash-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-card {
  width: min(720px, calc(100vw - 32px));
  padding: 28px;
  border-radius: 32px;
  text-align: center;
  border: 1px solid rgba(77, 152, 255, 0.16);
  background:
    radial-gradient(circle at top center, rgba(54, 196, 255, 0.18), transparent 28%),
    linear-gradient(180deg, rgba(9, 20, 38, 0.95) 0%, rgba(4, 10, 19, 0.98) 100%);
  box-shadow: var(--shadow);
}

.splash-logo {
  width: min(420px, 100%);
  display: block;
  margin: 0 auto 22px;
  border-radius: 22px;
}

.dashboard-shell {
  display: grid;
  gap: 18px;
  margin: 0 0 18px;
}

.dashboard-grid,
.audit-grid {
  display: grid;
  gap: 16px;
}

.executive-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.executive-alert {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background:
    radial-gradient(circle at top right, rgba(54, 196, 255, 0.12), transparent 24%),
    linear-gradient(180deg, rgba(9, 20, 38, 0.94) 0%, rgba(5, 12, 22, 0.98) 100%);
  box-shadow: var(--shadow);
}

.executive-alert span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.executive-alert strong {
  display: block;
  font-size: 18px;
  line-height: 1.35;
}

.executive-alert.is-ok::before,
.executive-alert.is-warning::before,
.executive-alert.is-danger::before,
.executive-alert.is-muted::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
}

.executive-alert.is-ok::before {
  background: linear-gradient(180deg, #49e2a1, #18bf78);
}

.executive-alert.is-warning::before {
  background: linear-gradient(180deg, #ffe38a, #ffb64d);
}

.executive-alert.is-danger::before {
  background: linear-gradient(180deg, #ff97a9, #ec476c);
}

.executive-alert.is-muted::before {
  background: linear-gradient(180deg, #7d92ad, #4f637f);
}

.dashboard-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
}

.audit-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.audit-grid-executive {
  grid-template-columns: 1.25fr 1fr;
  align-items: start;
}

.dashboard-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.dashboard-columns-single {
  grid-template-columns: minmax(0, 1fr);
}

.dashboard-column {
  display: grid;
  gap: 16px;
  align-content: start;
}

.dashboard-card,
.audit-card {
  border-radius: 24px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background:
    radial-gradient(circle at top right, rgba(54, 196, 255, 0.12), transparent 24%),
    linear-gradient(180deg, rgba(9, 20, 38, 0.94) 0%, rgba(5, 12, 22, 0.98) 100%);
  box-shadow: var(--shadow);
}

.dashboard-card {
  position: relative;
  overflow: hidden;
}

.dashboard-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, rgba(74, 225, 255, 0.95), rgba(0, 120, 255, 0.1));
}

.dashboard-card::after {
  content: "";
  position: absolute;
  inset: auto -40px -40px auto;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(54, 196, 255, 0.18), transparent 70%);
  pointer-events: none;
}

.dashboard-card span,
.audit-list small,
.license-microcopy {
  color: var(--muted);
}

.dashboard-card strong {
  display: block;
  margin-top: 8px;
  font-size: 34px;
  line-height: 1;
}

.audit-list {
  display: grid;
  gap: 10px;
}

.audit-row {
  display: grid;
  gap: 4px;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.audit-row:first-child {
  border-top: none;
  padding-top: 0;
}

.audit-row strong {
  font-size: 14px;
}

.audit-row span {
  color: var(--muted);
  font-size: 13px;
}

.audit-card-chart {
  min-height: 280px;
}

.audit-fold {
  padding: 0;
  overflow: hidden;
  align-self: start;
}

.audit-fold-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  cursor: pointer;
}

.audit-fold-summary::-webkit-details-marker {
  display: none;
}

.audit-fold-summary h3 {
  margin: 0 0 4px;
}

.audit-fold-arrow {
  font-size: 22px;
  line-height: 1;
  color: var(--muted);
  transition: transform 160ms ease, color 160ms ease;
}

.audit-fold[open] .audit-fold-arrow {
  transform: rotate(180deg);
  color: var(--ink);
}

.audit-fold-body {
  padding: 0 20px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.dashboard-log-menu {
  display: grid;
  gap: 16px;
}

.dashboard-log-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-log-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.dashboard-log-tab:hover {
  transform: translateY(-1px);
  border-color: rgba(54, 196, 255, 0.28);
}

.dashboard-log-tab:focus-visible {
  outline: 2px solid rgba(54, 196, 255, 0.28);
  outline-offset: 2px;
}

.dashboard-log-tab span {
  text-align: left;
  font-weight: 700;
}

.dashboard-log-tab strong {
  min-width: 32px;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
  text-align: center;
}

.dashboard-log-tab-active {
  border-color: rgba(54, 196, 255, 0.34);
  background:
    radial-gradient(circle at top left, rgba(54, 196, 255, 0.12), transparent 55%),
    rgba(8, 20, 34, 0.9);
  box-shadow: inset 0 0 0 1px rgba(54, 196, 255, 0.08);
}

.dashboard-log-tab-active strong {
  background: rgba(54, 196, 255, 0.16);
  color: var(--ink);
}

.dashboard-log-caption {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.access-chart {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(22px, 1fr));
  align-items: end;
  gap: 10px;
  min-height: 180px;
  padding-top: 10px;
}

.access-bar-shell {
  display: grid;
  gap: 8px;
  align-items: end;
  justify-items: center;
  min-height: 180px;
}

.access-bar {
  width: 100%;
  min-height: 18px;
  border-radius: 999px 999px 10px 10px;
  background: linear-gradient(180deg, #6de8ff 0%, #0a7eff 100%);
  box-shadow: 0 12px 24px rgba(0, 132, 255, 0.2);
}

.access-bar-login {
  background: linear-gradient(180deg, #6de8ff 0%, #0a7eff 100%);
}

.access-bar-bot_view {
  background: linear-gradient(180deg, #7ef0b7 0%, #1cbf73 100%);
}

.access-bar-logout {
  background: linear-gradient(180deg, #ffd786 0%, #ffab47 100%);
}

.access-bar-shell span {
  color: var(--muted);
  font-size: 11px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.search-toolbar {
  margin: 0 0 18px;
}

.search-toolbar-rich {
  gap: 14px;
  justify-content: space-between;
  align-items: center;
}

.search-input {
  width: 100%;
  max-width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 13px 14px;
  font: inherit;
  background: rgba(7, 17, 26, 0.76);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.search-toolbar-rich .search-input:not(.search-select) {
  flex: 1 1 540px;
  min-width: min(100%, 360px);
  max-width: 760px;
}

.search-select {
  flex: 0 0 220px;
  width: 220px;
}

.filter-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 10px;
  margin: 0 0 12px;
}

.search-input-tight {
  width: 100%;
  margin: 0 0 12px;
}

.search-input:focus {
  outline: 2px solid rgba(54, 196, 255, 0.25);
  border-color: rgba(54, 196, 255, 0.45);
}

.license-visual {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.license-progress {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.license-progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #49e2ff 0%, #009cff 100%);
}

.license-progress-bar.is-warning {
  background: linear-gradient(90deg, #ffe38a 0%, #ffb64d 100%);
}

.license-progress-bar.is-danger {
  background: linear-gradient(90deg, #ff97a9 0%, #ec476c 100%);
}

.access-entry {
  position: relative;
  background:
    radial-gradient(circle at top right, rgba(54, 196, 255, 0.08), transparent 22%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.03));
}

.access-entry:hover {
  border-color: rgba(54, 196, 255, 0.26);
  box-shadow: 0 16px 32px rgba(0, 10, 28, 0.22);
}

.detail-stack {
  display: grid;
  gap: 16px;
}

.activity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.detail-install-card {
  background:
    radial-gradient(circle at top right, rgba(54, 196, 255, 0.12), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.03));
}

.detail-install-copy {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.6;
}

.detail-install-grid {
  display: grid;
  gap: 12px;
}

.detail-install-presence {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.detail-install-presence > strong {
  color: var(--ink);
  font-size: 14px;
}

.detail-install-presence-item {
  display: grid;
  gap: 8px;
}

.detail-install-presence-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.detail-install-presence-row:hover {
  border-color: rgba(54, 196, 255, 0.2);
  background: rgba(255, 255, 255, 0.055);
}

.detail-install-presence-row:focus-visible {
  outline: 2px solid rgba(54, 196, 255, 0.32);
  outline-offset: 2px;
}

.detail-install-presence-item.is-open .detail-install-presence-row {
  border-color: rgba(54, 196, 255, 0.26);
  background: rgba(255, 255, 255, 0.06);
}

.detail-install-presence-row > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.detail-install-presence-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.detail-install-presence-caret {
  width: 10px;
  height: 10px;
  border-right: 2px solid rgba(255, 255, 255, 0.46);
  border-bottom: 2px solid rgba(255, 255, 255, 0.46);
  transform: rotate(45deg);
  transition: transform 140ms ease, border-color 140ms ease;
}

.detail-install-presence-item.is-open .detail-install-presence-caret {
  transform: rotate(-135deg);
  border-color: rgba(54, 196, 255, 0.9);
}

.detail-install-presence-row strong {
  color: var(--ink);
  font-size: 14px;
}

.detail-install-presence-row span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.detail-install-presence-menu {
  display: flex;
  justify-content: flex-end;
  padding: 0 4px 2px;
}

.detail-install-empty {
  margin: 0;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.detail-install-grid label {
  display: grid;
  gap: 6px;
}

.detail-install-grid select {
  width: 100%;
}

.detail-install-note {
  margin: 0;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--ink);
  line-height: 1.6;
}

.detail-install-note.is-warning {
  border-color: rgba(255, 211, 125, 0.28);
  background: rgba(255, 211, 125, 0.08);
}

.detail-install-note.is-error {
  border-color: rgba(255, 126, 126, 0.3);
  background: rgba(255, 126, 126, 0.08);
}

.detail-install-guild-hint {
  display: grid;
  gap: 4px;
  margin: 0;
  color: var(--muted);
}

.detail-install-guild-hint strong {
  color: var(--ink);
  font-size: 14px;
}

@media (max-width: 900px) {
  .executive-strip,
  .audit-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-columns {
    grid-template-columns: 1fr;
  }

  .dashboard-log-tabs {
    grid-template-columns: 1fr;
  }

  .filter-row {
    grid-template-columns: 1fr;
  }

  .search-toolbar-rich .search-input:not(.search-select),
  .search-select {
    flex-basis: 100%;
    max-width: 100%;
    width: 100%;
  }
}
