:root {
  --bg: #0b1020;
  --bg-soft: #121a2d;
  --panel: #161f32;
  --panel-alt: #1b2743;
  --line: rgba(255,255,255,0.08);
  --text: #edf3ff;
  --muted: #9aa9c7;
  --primary: #74a2ff;
  --primary-strong: #4d7ef2;
  --accent: #7ae1c3;
  --warning: #f4b860;
  --danger: #ff7c7c;
  --shadow: 0 18px 30px rgba(0,0,0,0.25);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: linear-gradient(180deg, #0a0f1d 0%, #101827 100%);
  color: var(--text);
  font-family: 'Inter', sans-serif;
}

body {
  min-height: 100vh;
}

button {
  font: inherit;
  cursor: pointer;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background: rgba(11, 16, 32, 0.82);
  border-right: 1px solid var(--line);
  padding: 28px 18px;
}

.brand-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: grid;
  place-items: center;
  color: #091120;
  font-weight: 800;
}

.brand-name {
  font-weight: 700;
  font-size: 1rem;
}

.brand-sub {
  color: var(--muted);
  font-size: 0.72rem;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-item {
  color: var(--text);
  text-decoration: none;
  padding: 12px 14px;
  border-radius: 10px;
  transition: 0.2s ease;
  border: 1px solid transparent;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(116, 162, 255, 0.12);
  border-color: rgba(116, 162, 255, 0.3);
}

.sidebar-card {
  margin-top: 28px;
  background: var(--panel-alt);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
}

.card-label {
  color: var(--muted);
  font-size: 0.78rem;
  margin-bottom: 10px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.72rem;
  font-weight: 600;
}

.status-live {
  background: rgba(122, 225, 195, 0.12);
  color: var(--accent);
  border: 1px solid rgba(122, 225, 195, 0.2);
}

.status-queued {
  background: rgba(244, 184, 96, 0.12);
  color: var(--warning);
  border: 1px solid rgba(244, 184, 96, 0.2);
}

.sidebar-note {
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 8px;
}

.main-panel {
  flex: 1;
  padding: 24px 28px 40px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.eyebrow {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

h1 {
  margin: 8px 0 0;
  font-size: 2rem;
}

.top-actions {
  display: flex;
  gap: 12px;
}

.primary-btn,
.ghost-btn,
.text-btn {
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 600;
}

.primary-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: white;
}

.primary-btn.small {
  padding: 8px 12px;
  font-size: 0.8rem;
}

.ghost-btn {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  color: var(--text);
}

.text-btn {
  background: transparent;
  color: var(--primary);
  padding: 0;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.metric-card,
.panel {
  background: rgba(22, 31, 50, 0.88);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.metric-card {
  padding: 18px 18px 16px;
}

.metric-card.highlight {
  background: linear-gradient(135deg, rgba(116,162,255,0.16), rgba(122,225,195,0.08));
}

.metric-label {
  color: var(--muted);
  font-size: 0.8rem;
}

.metric-value {
  font-size: 2rem;
  font-weight: 800;
  margin: 10px 0 4px;
}

.metric-sub {
  color: var(--muted);
  font-size: 0.76rem;
}

.content-grid {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

.two-col {
  grid-template-columns: 1.2fr 0.8fr;
}

.three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel {
  padding: 18px;
}

.full-width-panel {
  margin-bottom: 18px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.panel-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.list-stack,
.alert-stack,
.timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.service-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.service-item:last-child {
  border-bottom: none;
}

.service-name,
.task-title,
.mini-title,
.roadmap-text {
  font-weight: 600;
}

.meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.76rem;
  margin-top: 4px;
}

.progress-box {
  min-width: 140px;
}

.progress-bar {
  height: 8px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 4px;
}

.progress-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 999px;
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 7px;
}

.dot.high {
  background: var(--danger);
}

.dot.mid {
  background: var(--warning);
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.mini-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}

.mini-meta,
.mini-note,
.alert-text,
.team-role,
.team-stat,
.setting-row span {
  color: var(--muted);
}

.alert-box {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.alert-box.warning {
  background: rgba(244, 184, 96, 0.05);
  border-color: rgba(244, 184, 96, 0.2);
}

.alert-box.info {
  background: rgba(116, 162, 255, 0.05);
  border-color: rgba(116, 162, 255, 0.2);
}

.alert-title {
  font-weight: 700;
  margin-bottom: 6px;
}

.roadmap-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.roadmap-item {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,0.02);
}

.roadmap-month {
  color: var(--primary);
  font-weight: 700;
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
}

.data-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.8rem;
}

.team-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.team-box p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.settings-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.channel-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

@media (max-width: 980px) {
  .app-shell {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .metrics-grid,
  .two-col,
  .three-col {
    grid-template-columns: 1fr;
  }
}
