:root {
  --bg: #070b16;
  --bg-2: #0b1120;
  --panel: rgba(15, 23, 42, 0.8);
  --panel-strong: rgba(10, 16, 30, 0.96);
  --panel-soft: rgba(255, 255, 255, 0.04);
  --line: rgba(148, 163, 184, 0.14);
  --line-strong: rgba(124, 140, 255, 0.28);
  --text: #f8fbff;
  --muted: #9ca8c7;
  --muted-2: #7f8bb0;
  --primary: #7c8cff;
  --primary-2: #5fd0ff;
  --success: #75f0b8;
  --danger: #ff7b95;
  --warning: #ffd666;
  --shadow: 0 20px 70px rgba(3, 8, 20, 0.4);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(124, 140, 255, 0.2), transparent 30%),
    radial-gradient(circle at 88% 12%, rgba(95, 208, 255, 0.12), transparent 20%),
    linear-gradient(180deg, #060914 0%, #091120 40%, #070b16 100%);
}

.panel-standalone-body {
  background:
    radial-gradient(circle at 18% 8%, rgba(124, 140, 255, 0.15), transparent 26%),
    radial-gradient(circle at 82% 10%, rgba(95, 208, 255, 0.1), transparent 18%),
    linear-gradient(180deg, #060914 0%, #091120 40%, #070b16 100%);
}

.panel-shell {
  min-height: 100vh;
  padding: 24px;
}

.panel-utility-bar {
  max-width: 1480px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.panel-utility-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.standalone-panel-main {
  max-width: 1480px;
  margin: 0 auto;
  padding: 0;
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }

.dashboard-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}

.sidebar {
  position: relative;
  padding: 28px 22px;
  border-right: 1px solid rgba(148, 163, 184, 0.08);
  background: rgba(6, 9, 20, 0.72);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 18px 18px auto 18px;
  height: 180px;
  border-radius: 28px;
  background: radial-gradient(circle at top left, rgba(124, 140, 255, 0.14), transparent 62%);
  pointer-events: none;
}

.brand {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.brand-mark {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 0 24px rgba(124, 140, 255, 0.8);
}

.sidebar-nav {
  position: relative;
  z-index: 1;
  margin-top: 34px;
  display: grid;
  gap: 10px;
}

.sidebar-nav a {
  color: var(--muted);
  padding: 13px 15px;
  border-radius: 16px;
  border: 1px solid transparent;
  transition: 0.2s ease;
}

.sidebar-nav a.active,
.sidebar-nav a:hover {
  color: white;
  background: rgba(124, 140, 255, 0.1);
  border-color: rgba(124, 140, 255, 0.2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.sidebar-footer {
  position: relative;
  z-index: 1;
}

.ghost-button,
.outline-button,
.primary-button,
.action-button,
.panel-link {
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.ghost-button,
.outline-button,
.action-button {
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(255,255,255,0.04);
  color: white;
}

.ghost-button,
.outline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 12px 16px;
  cursor: pointer;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 16px;
  padding: 14px 18px;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, var(--primary), #5d6dff 48%, var(--primary-2));
  box-shadow: 0 14px 30px rgba(87, 108, 255, 0.26);
}

.ghost-button:hover,
.outline-button:hover,
.primary-button:hover,
.action-button:hover,
.panel-link:hover {
  transform: translateY(-1px);
}

.outline-button:hover,
.action-button:hover {
  border-color: rgba(124, 140, 255, 0.28);
  background: rgba(255,255,255,0.07);
}

.main-content {
  padding: 30px;
}

.hero-panel,
.stat-card,
.panel,
.bot-card,
.quick-link-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(17, 25, 47, 0.82), rgba(8, 13, 28, 0.92));
  box-shadow: var(--shadow);
}

.hero-panel {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  padding: 28px;
  margin-bottom: 22px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
}

.hero-panel::before {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  right: -120px;
  top: -120px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(124, 140, 255, 0.22), transparent 64%);
}

.compact-hero { padding-block: 24px; }

.eyebrow {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(124, 140, 255, 0.1);
  border: 1px solid rgba(124, 140, 255, 0.18);
  color: #d3dcff;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.hero-panel h1,
.panel h2 {
  margin: 14px 0 10px;
  letter-spacing: -0.05em;
}

.hero-panel h1 { font-size: clamp(2rem, 4vw, 3.5rem); }
.panel h2 { font-size: clamp(1.3rem, 2vw, 1.8rem); }

.hero-panel p,
.panel-heading p,
.dashboard-message,
.summary-list span,
.detail-item span,
.timeline-item span,
.placeholder-box,
.empty-state,
.bot-meta p,
.panel-section-link-meta,
.usage-meter-label,
.status-meta,
.summary-card span,
.mini-stat-card span,
.file-tree-list div span:last-child,
.file-editor-card p,
.console-session-meta span {
  color: var(--muted);
}

.hero-actions,
.bot-actions,
.cta-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.stats-grid,
.content-grid,
.detail-grid {
  display: grid;
  gap: 18px;
}

.stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 22px;
}

.stat-card {
  border-radius: 24px;
  padding: 22px;
}

.stat-card strong {
  display: block;
  font-size: 2.2rem;
  margin-top: 10px;
}

.stat-label { color: var(--muted); }
.accent-primary { box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), 0 20px 60px rgba(13, 20, 40, 0.34); }
.accent-success { box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), 0 20px 60px rgba(6, 28, 24, 0.28); }
.accent-muted { box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), 0 20px 60px rgba(18, 18, 30, 0.28); }

.content-grid.two-up,
.get-started-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 22px; }
.panel-layout { grid-template-columns: 1.1fr 0.9fr; }

.panel {
  border-radius: 28px;
  padding: 24px;
  margin-bottom: 22px;
}

.panel-highlight {
  background: linear-gradient(180deg, rgba(19, 29, 55, 0.9), rgba(8, 13, 28, 0.96));
}

.panel-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.panel-heading.compact {
  align-items: start;
}

.panel-link {
  color: #d9e1ff;
  font-weight: 600;
}

.quick-links,
.summary-list,
.timeline-list,
.bots-list,
.summary-card-stack,
.usage-card-stack,
.panel-section-nav,
.panel-sidebar-stack,
.panel-primary-column {
  display: grid;
  gap: 14px;
}

.quick-link-card {
  border-radius: 22px;
  padding: 18px;
}

.quick-link-card span,
.quick-link-card strong {
  display: block;
}

.quick-link-card span {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #d6deff;
  margin-bottom: 10px;
}

.quick-link-card strong {
  font-size: 1rem;
  line-height: 1.5;
}

.summary-list > div,
.timeline-item,
.detail-item,
.summary-card,
.usage-card,
.mini-stat-card,
.panel-section-link,
.file-tree-card,
.file-editor-card {
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(255,255,255,0.03);
  padding: 16px 18px;
}

.summary-list strong,
.timeline-item strong,
.detail-item strong,
.summary-card strong,
.usage-card strong,
.mini-stat-card strong,
.file-tree-list div span:first-child {
  display: block;
  margin-bottom: 6px;
  color: white;
}

.bots-list {
  min-height: 40px;
}

.bot-card {
  border-radius: 24px;
  padding: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 18px;
  align-items: center;
}

.bot-card.bot-card-simple {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.bot-card.bot-card-invoice {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.bot-meta h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.meta-chip {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(148, 163, 184, 0.12);
  color: #dbe4ff;
  font-size: 0.84rem;
}

.status-pill {
  min-width: 110px;
  padding: 10px 14px;
  border-radius: 999px;
  text-align: center;
  font-weight: 700;
}

.status-pill.running,
.status-pill.paid,
.status-pill.free {
  background: rgba(117, 240, 184, 0.16);
  color: var(--success);
}

.status-pill.stopped {
  background: rgba(255, 123, 149, 0.14);
  color: var(--danger);
}

.status-pill.awaiting_payment {
  background: rgba(255, 214, 102, 0.16);
  color: var(--warning);
}

.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
}

.action-button[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.bot-actions-panel {
  margin-top: 10px;
}

.simple-bot-actions {
  justify-content: flex-end;
}

.panel-open-button {
  min-width: 132px;
}

.dashboard-main-hero h1 {
  font-size: clamp(2rem, 3.2vw, 3rem);
}

.compact-stats-grid {
  margin-bottom: 18px;
}

.dashboard-main-panel {
  margin-bottom: 0;
}

.launch-grid-single {
  grid-template-columns: 1fr;
}

.launch-panel {
  max-width: 920px;
}

.launch-steps-list {
  margin-bottom: 22px;
}

.launch-cta-row {
  margin-top: 8px;
}

.panel-dashboard-shell .sidebar {
  min-height: 100vh;
}

.panel-shared-hero {
  margin-bottom: 18px;
}

.panel-activity-stack {
  margin-top: 16px;
}

.file-manager-panel {
  padding: 20px;
}

.file-manager-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.file-manager-toolbar-actions {
  display: flex;
  gap: 10px;
}

.file-manager-search-wrap {
  flex: 1;
}

.file-search-input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  color: white;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 14px;
  padding: 14px 16px;
}

.file-manager-breadcrumbs-bar {
  margin-bottom: 16px;
}

.file-manager-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) 320px;
  gap: 18px;
}

.file-manager-table-card,
.file-manager-sidebar {
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(255,255,255,0.03);
}

.file-manager-table-head,
.file-table-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px 190px;
  gap: 16px;
  align-items: center;
}

.file-manager-table-head {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  color: var(--muted);
  font-size: 0.9rem;
}

.file-manager-table-body {
  display: grid;
}

.file-table-row {
  width: 100%;
  text-align: left;
  background: transparent;
  color: white;
  border: none;
  padding: 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  cursor: pointer;
}

.file-table-row:last-child {
  border-bottom: none;
}

.file-table-row:hover {
  background: rgba(124, 140, 255, 0.08);
}

.file-name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.invoice-amount {
  color: #dbe4ff;
  font-weight: 700;
  padding: 0 4px;
}

.dashboard-message {
  min-height: 22px;
  margin-top: 0;
}
.dashboard-message.success { color: var(--success); }
.dashboard-message.error { color: #ffb4b4; }

.empty-state {
  padding: 26px;
  border-radius: 20px;
  border: 1px dashed rgba(148, 163, 184, 0.16);
  background: rgba(255,255,255,0.02);
}

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

.detail-grid-tight {
  gap: 12px;
}

.detail-grid-single {
  grid-template-columns: 1fr;
}

.detail-grid-strong .detail-item {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  min-height: 92px;
}

.placeholder-box {
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(255,255,255,0.03);
  padding: 18px;
  line-height: 1.7;
}

.placeholder-box pre,
.console-shell pre {
  margin: 0;
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #d6deff;
}

.placeholder-tag {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(124, 140, 255, 0.12);
  border: 1px solid rgba(124, 140, 255, 0.2);
  color: #d6deff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.feature-list {
  display: grid;
  gap: 14px;
}

.feature-list > div {
  display: grid;
  gap: 6px;
}

.link-button { text-decoration: none; }

.panel-page-main {
  padding-bottom: 34px;
}

.panel-topbar {
  align-items: center;
}

.panel-topbar-main,
.panel-status-wrap,
.panel-title-row,
.console-session-meta,
.console-toolbar,
.panel-rail-footer {
  display: grid;
  gap: 10px;
}

.panel-title-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 22px;
}

.panel-status-wrap {
  justify-items: end;
}

.status-meta {
  font-size: 0.92rem;
}

.panel-header-actions {
  align-items: center;
  justify-content: flex-end;
}

.panel-workspace {
  display: grid;
  grid-template-columns: 250px minmax(0, 1.2fr) 340px;
  gap: 22px;
  align-items: start;
}

.panel-rail,
.panel-sidebar-card,
.panel-console-card,
.panel-subsection-card {
  margin-bottom: 0;
}

.panel-rail {
  position: sticky;
  top: 24px;
}

.panel-rail-heading {
  margin-bottom: 14px;
}

.panel-section-link {
  display: grid;
  gap: 4px;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.panel-section-link:hover,
.panel-section-link.active {
  border-color: rgba(124, 140, 255, 0.28);
  background: rgba(124, 140, 255, 0.08);
  transform: translateY(-1px);
}

.panel-section-link-label {
  font-weight: 700;
  color: #eef2ff;
}

.panel-rail-footer {
  margin-top: 12px;
}

.mini-stat-card strong {
  font-size: 1.05rem;
  margin-bottom: 0;
}

.panel-console-card {
  background: linear-gradient(180deg, rgba(14, 21, 40, 0.95), rgba(8, 12, 22, 0.98));
}

.console-toolbar {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  padding: 14px 16px;
  border-radius: 18px 18px 0 0;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-bottom: none;
  background: rgba(255,255,255,0.03);
}

.console-lights {
  display: inline-flex;
  gap: 8px;
}

.console-lights span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
}

.console-lights span:nth-child(1) { background: #ff6e7f; }
.console-lights span:nth-child(2) { background: #ffd666; }
.console-lights span:nth-child(3) { background: #75f0b8; }

.console-session-meta strong {
  font-size: 0.95rem;
  color: #edf3ff;
}

.console-shell {
  min-height: 420px;
  border-radius: 0 0 24px 24px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background:
    linear-gradient(180deg, rgba(3, 8, 20, 0.66), rgba(2, 6, 16, 0.9)),
    radial-gradient(circle at top right, rgba(124, 140, 255, 0.1), transparent 36%);
  padding: 22px;
}

.console-shell pre {
  line-height: 1.8;
  color: #c9d6ff;
}

.file-placeholder-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  gap: 16px;
}

.file-tree-list {
  display: grid;
  gap: 12px;
}

.file-tree-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.file-tree-list div:last-child {
  border-bottom: none;
}

.file-editor-card {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.summary-card {
  display: grid;
  gap: 4px;
}

.summary-card strong {
  font-size: 1.08rem;
  margin-bottom: 0;
}

.summary-card span {
  font-size: 0.92rem;
}

.usage-card {
  display: grid;
  gap: 12px;
}

.usage-meter {
  position: relative;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.usage-meter-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
}

.usage-meter-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9rem;
}

.panel-message {
  margin-top: 14px;
}

@media (max-width: 1320px) {
  .panel-workspace {
    grid-template-columns: 220px minmax(0, 1fr) 320px;
  }
}

@media (max-width: 1120px) {
  .dashboard-shell { grid-template-columns: 1fr; }
  .sidebar { border-right: none; border-bottom: 1px solid rgba(148, 163, 184, 0.08); }
  .content-grid.two-up,
  .get-started-grid,
  .panel-layout,
  .panel-workspace,
  .file-placeholder-grid { grid-template-columns: 1fr; }
  .panel-rail { position: static; }
}

@media (max-width: 820px) {
  .main-content { padding: 20px; }
  .hero-panel,
  .panel-heading,
  .bot-card,
  .stats-grid,
  .detail-grid,
  .panel-title-row { grid-template-columns: 1fr; display: grid; }
  .hero-panel { align-items: start; }
  .bot-card,
  .bot-card.bot-card-invoice { grid-template-columns: 1fr; }
  .panel-status-wrap { justify-items: start; }
  .panel-header-actions { justify-content: flex-start; }
}

@media (max-width: 560px) {
  .main-content { padding: 14px; }
  .sidebar { padding: 18px 14px; }
  .hero-panel,
  .panel,
  .stat-card,
  .quick-link-card,
  .summary-list > div,
  .timeline-item,
  .detail-item,
  .placeholder-box,
  .bot-card,
  .summary-card,
  .usage-card,
  .mini-stat-card,
  .panel-section-link,
  .file-tree-card,
  .file-editor-card { border-radius: 20px; }

  .console-toolbar,
  .console-shell { border-radius: 20px; }

  .detail-grid,
  .file-placeholder-grid { grid-template-columns: 1fr; }
}
