:root {
  --bg-top: #030712;
  --bg-bottom: #0f172a;
  --line: rgba(148, 163, 184, 0.12);
  --text: #e5e7eb;
  --muted: #94a3b8;
  --panel: rgba(17, 24, 39, 0.88);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --accent: #3b82f6;
  --accent-soft: rgba(59, 130, 246, 0.16);
  --warning-soft: rgba(245, 158, 11, 0.16);
  --success-soft: rgba(34, 197, 94, 0.16);
  --danger-soft: rgba(239, 68, 68, 0.16);
  --field: #0b1220;
  --field-border: #334155;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.18), transparent 24%),
    radial-gradient(circle at 85% 18%, rgba(34, 197, 94, 0.1), transparent 22%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.22;
}

.display-font {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -0.03em;
}

.glass {
  background: var(--panel);
  border: 1px solid rgba(51, 65, 85, 0.95);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.24);
}

.glass-strong {
  background: var(--panel-strong);
  border: 1px solid rgba(51, 65, 85, 0.98);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
}

.rounded-inherit {
  border-radius: inherit;
}

.panel-edge {
  position: relative;
  overflow: hidden;
}

.panel-edge::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(59, 130, 246, 0.09), transparent 18%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02), transparent 28%);
  opacity: 1;
}

.rich-content h1,
.rich-content h2,
.rich-content h3 {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  margin: 1.2rem 0 0.65rem;
  line-height: 1.15;
  font-weight: 800;
}

.rich-content h1 {
  font-size: 2rem;
}

.rich-content h2 {
  font-size: 1.65rem;
}

.rich-content h3 {
  font-size: 1.3rem;
}

.rich-content p,
.rich-content li {
  color: #cbd5e1;
  line-height: 1.7;
}

.rich-content ul {
  padding-left: 1.15rem;
}

.rich-content a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.app-shell input,
.app-shell select,
.app-shell textarea {
  background: var(--field) !important;
  border-color: var(--field-border) !important;
  color: #f8fafc !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.app-shell input::placeholder,
.app-shell textarea::placeholder {
  color: #64748b !important;
  opacity: 1;
}

.app-shell input:focus,
.app-shell select:focus,
.app-shell textarea:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.9) !important;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.45);
}

.app-shell [class*="bg-white"] {
  background-color: rgba(15, 23, 42, 0.86) !important;
}

.app-shell [class*="border-white"] {
  border-color: rgba(51, 65, 85, 0.95) !important;
}

.app-shell [class*="bg-slate-50"],
.app-shell [class*="bg-slate-100"] {
  background-color: rgba(11, 18, 32, 0.95) !important;
}

.app-shell [class*="border-slate-200"] {
  border-color: rgba(51, 65, 85, 0.95) !important;
}

.app-shell [class*="text-slate-400"] {
  color: #64748b !important;
}

.app-shell [class*="text-slate-500"] {
  color: #94a3b8 !important;
}

.app-shell [class*="text-slate-600"] {
  color: #cbd5e1 !important;
}

.app-shell .text-ink {
  color: #f8fafc !important;
}

.app-shell .bg-ink {
  background-color: #0b1220 !important;
  color: #f8fafc !important;
}

.app-shell .bg-tide {
  background-color: #2563eb !important;
}

.app-shell .bg-moss {
  background-color: #16a34a !important;
}

.app-shell .bg-ember {
  background-color: #dc2626 !important;
}

.app-shell .hover-lift:hover {
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.24);
}

.app-shell table {
  border-collapse: separate;
  border-spacing: 0 0.7rem;
}

.app-shell thead th {
  color: #64748b !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.app-shell tbody tr {
  background: rgba(15, 23, 42, 0.92);
}

.app-shell tbody td {
  border-top: 1px solid rgba(51, 65, 85, 0.7);
  border-bottom: 1px solid rgba(51, 65, 85, 0.7);
}

.app-shell tbody td:first-child {
  border-left: 1px solid rgba(51, 65, 85, 0.7);
  border-top-left-radius: 18px;
  border-bottom-left-radius: 18px;
}

.app-shell tbody td:last-child {
  border-right: 1px solid rgba(51, 65, 85, 0.7);
  border-top-right-radius: 18px;
  border-bottom-right-radius: 18px;
}

.section-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 48px;
  background: rgba(31, 41, 55, 0.95);
  border: 1px solid rgba(55, 65, 81, 1);
  border-radius: 0.85rem;
  padding: 0.45rem 0.75rem;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.toolbar-kicker {
  color: #3b82f6;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.toolbar-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 11px;
  color: #94a3b8;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.progress-bar {
  position: relative;
  overflow: hidden;
}

.progress-bar::after {
  display: none;
}

.hover-lift {
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(21, 33, 47, 0.14);
}

.fade-up {
  animation: fadeUp 420ms ease both;
}

.float-in {
  animation: floatIn 560ms ease both;
}

.hide-scrollbar::-webkit-scrollbar {
  display: none;
}

.hide-scrollbar {
  scrollbar-width: none;
}

@keyframes shimmer {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
