:root {
  --bg: #020617;
  --bg-soft: #020617;
  --card: #020617;
  --accent: #26c3d4;
  --accent-soft: rgba(250, 204, 21, 0.16);
  --border-subtle: rgba(148, 163, 184, 0.35);
  --text: #e5e7eb;
  --text-muted: #9ca3af;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-soft: 0 22px 45px rgba(15, 23, 42, 0.7);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #0b1120, #020617 55%, #020617 100%);
  color: var(--text);
}

body {
  display: flex;
  flex-direction: column;
}

/* Shell + header brand */

.shell {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 16px 16px 32px;
}

header.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, #facc15, #f97316 55%, #b91c1c);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  color: #020617;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.85);
}

.brand-main {
  font-family: "Playfair Display", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", serif;
  font-size: 20px;
}

.brand-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.85);
  font-size: 12px;
  color: var(--text-muted);
}

.user-avatar {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, #facc15, #fb923c);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: #111827;
}

/* Tabs */

.tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.tab {
  padding: 8px 14px;
  border-radius: 10px 10px 0 0;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  border: 1px solid transparent;
  border-bottom: none;
  background: transparent;
}

.tab.active {
  color: var(--text);
  background: rgba(15, 23, 42, 0.96);
  border-color: rgba(148, 163, 184, 0.5);
  border-bottom-color: rgba(15, 23, 42, 1);
}

.tab-panels {
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: radial-gradient(circle at top left, rgba(148, 163, 184, 0.18), transparent 40%),
    linear-gradient(135deg, #020617, #030712);
  box-shadow: var(--shadow-soft);
  padding: 16px;
  font-size: 13px;
}

.panel {
  display: none;
}

.panel.active {
  display: block;
}

/* Cards / lists / badges */

.card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.96);
  padding: 12px 12px 10px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.card-title {
  font-size: 13px;
  font-weight: 600;
}

.section-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

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

.list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.list-item {
  padding: 8px 8px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(31, 41, 55, 1);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.list-item-title {
  font-size: 13px;
  font-weight: 500;
}

.list-item-meta {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge,
.pill {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.5);
  color: var(--text-muted);
}

/* Layout helpers */

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

@media (max-width: 860px) {
  .grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Forms / buttons / flash */

.field-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.input {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.95);
  color: var(--text);
  font-size: 13px;
  padding: 7px 11px;
  outline: none;
}

.input:focus {
  border-color: rgba(250, 204, 21, 0.8);
  box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.3);
}

.btn {
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 13px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 120ms ease-out;
}

.btn-primary {
  background: linear-gradient(135deg, #06b5fa, #009fc6);
  color: #111827;
  border-color: rgba(250, 204, 21, 0.2);
  box-shadow: 0 12px 24px rgba(8, 181, 234, 0.3);
}

.btn-primary:hover {
  filter: brightness(0.98);
  box-shadow: 0 16px 30px rgba(8, 185, 234, 0.4);
}

.btn-ghost {
  border-color: rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.85);
  color: var(--text-muted);
}

.btn-ghost:hover {
  border-color: rgba(148, 163, 184, 0.9);
  color: var(--text);
}

.flash {
  font-size: 12px;
  padding: 6px 9px;
  border-radius: 8px;
  margin-bottom: 8px;
  display: none;
}

.flash.show {
  display: block;
}

.flash.success {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.6);
  color: #bbf7d0;
}

.flash.error {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.6);
  color: #fecaca;
}
