:root {
  color-scheme: dark;
  --bg: #070b12;
  --bg-elevated: rgba(10, 15, 24, 0.78);
  --bg-panel: rgba(15, 20, 31, 0.84);
  --border: rgba(176, 196, 222, 0.16);
  --border-strong: rgba(255, 255, 255, 0.08);
  --text: #edf2ff;
  --muted: #9fb0c7;
  --muted-2: #7d8fa8;
  --accent: #d9a441;
  --accent-2: #4db6ac;
  --accent-3: #5c8bf3;
  --danger: #f97316;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  --radius: 22px;
  --radius-sm: 14px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(217, 164, 65, 0.12), transparent 32%),
    radial-gradient(circle at top right, rgba(77, 182, 172, 0.10), transparent 26%),
    linear-gradient(135deg, #05070b 0%, #09101b 42%, #0b1320 100%);
  font-family: "Bahnschrift", "Segoe UI", sans-serif;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 82%);
  opacity: 0.65;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.07;
  mix-blend-mode: screen;
  background-image: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.35) 0 1px, transparent 1px);
  background-size: 4px 4px;
}

.ambient {
  position: fixed;
  inset: auto;
  border-radius: 999px;
  filter: blur(70px);
  opacity: 0.35;
  pointer-events: none;
}

.ambient-one {
  width: 360px;
  height: 360px;
  top: -120px;
  left: -80px;
  background: rgba(217, 164, 65, 0.22);
}

.ambient-two {
  width: 420px;
  height: 420px;
  right: -140px;
  top: 26vh;
  background: rgba(77, 182, 172, 0.18);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border-strong);
  background: rgba(5, 8, 14, 0.82);
  color: var(--text);
  border-radius: 14px;
  padding: 0.8rem 0.95rem;
  outline: none;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(217, 164, 65, 0.8);
  box-shadow: 0 0 0 4px rgba(217, 164, 65, 0.12);
}

textarea {
  resize: vertical;
  min-height: 112px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--accent);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-lockup-wide {
  margin-bottom: 1.5rem;
}

.brand-badge {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 8px rgba(217, 164, 65, 0.08);
}

.brand-name {
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-sub {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 0.15rem;
}

.primary-btn,
.accent-btn,
.ghost-btn,
.icon-btn {
  border: 0;
  border-radius: 14px;
  padding: 0.85rem 1rem;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.primary-btn:hover,
.accent-btn:hover,
.ghost-btn:hover,
.icon-btn:hover {
  transform: translateY(-1px);
}

.primary-btn {
  color: #09101a;
  background: linear-gradient(135deg, #ffe08f, var(--accent));
  box-shadow: 0 14px 30px rgba(217, 164, 65, 0.18);
}

.accent-btn {
  color: #07131d;
  background: linear-gradient(135deg, #8fe7df, var(--accent-2));
  box-shadow: 0 14px 30px rgba(77, 182, 172, 0.18);
}

.ghost-btn,
.icon-btn {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-strong);
}

.icon-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  padding: 0;
}

.login-screen {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.5rem;
  min-height: 100vh;
  padding: 2.5rem;
  max-width: 1500px;
  margin: 0 auto;
  align-items: center;
}

.login-marketing,
.login-card,
.panel,
.sidebar {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.login-marketing {
  border-radius: 30px;
  padding: 3rem;
  position: relative;
  overflow: hidden;
}

.login-marketing::after {
  content: "";
  position: absolute;
  inset: auto -14% -30% auto;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217, 164, 65, 0.18), transparent 72%);
}

.login-marketing h1 {
  margin: 0.4rem 0 1rem;
  font-size: clamp(2.6rem, 5vw, 5.5rem);
  line-height: 0.94;
  max-width: 10ch;
}

.login-marketing p {
  max-width: 58ch;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.8;
}

.login-points {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
  max-width: 760px;
}

.login-points article {
  display: grid;
  gap: 0.35rem;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.login-points strong {
  color: #fff;
}

.login-points span,
.login-meta span,
.inline-error,
.muted {
  color: var(--muted);
}

.login-card {
  border-radius: 30px;
  padding: 2rem;
}

.login-header h2,
.panel h2,
.topbar h1,
.dialog-head h3 {
  margin: 0.25rem 0 0.35rem;
}

.login-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.4rem;
}

.login-form label,
.dialog-form label {
  display: grid;
  gap: 0.45rem;
  color: #dbe7fb;
  font-size: 0.92rem;
}

.login-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.9rem;
  margin-top: 1.4rem;
  font-size: 0.86rem;
}

.login-meta span {
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
}

.app-shell {
  display: grid;
  grid-template-columns: 288px minmax(0, 1fr);
  min-height: 100vh;
  gap: 1.25rem;
  padding: 1.25rem;
  max-width: 1800px;
  margin: 0 auto;
}

.sidebar {
  position: sticky;
  top: 1.25rem;
  height: calc(100vh - 2.5rem);
  border-radius: 28px;
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.side-nav {
  display: grid;
  gap: 0.35rem;
}

.side-nav a {
  padding: 0.85rem 1rem;
  border-radius: 14px;
  color: var(--muted);
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.side-nav a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  transform: translateX(2px);
}

.sidebar-footer {
  display: grid;
  gap: 0.8rem;
}

.session-chip {
  padding: 0.75rem 0.85rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 0.88rem;
}

.workspace {
  display: grid;
  gap: 1.15rem;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.3rem 1.4rem;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(12, 18, 28, 0.96), rgba(18, 25, 38, 0.86));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.topbar p {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.7rem;
}

.search {
  min-width: min(28vw, 420px);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1rem;
}

.stat-card {
  position: relative;
  overflow: hidden;
  padding: 1.1rem 1.15rem;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(18, 24, 35, 0.92), rgba(12, 17, 26, 0.88));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.stat-card::after {
  content: "";
  position: absolute;
  inset: auto -18% -28% auto;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.07), transparent 70%);
}

.stat-label {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.stat-value {
  margin-top: 0.6rem;
  font-size: clamp(1.7rem, 2vw, 2.5rem);
  font-weight: 800;
}

.stat-hint {
  margin-top: 0.35rem;
  color: var(--muted-2);
  font-size: 0.9rem;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 1rem;
}

.panel {
  border-radius: 28px;
  padding: 1.2rem;
}

.panel-main,
.panel-wide {
  min-height: 0;
}

.panel-wide {
  padding: 1.25rem;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.toggle,
.select-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.table-wrap {
  overflow: auto;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
}

thead th {
  text-align: left;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  padding: 0.95rem 1rem;
  background: rgba(255, 255, 255, 0.035);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

tbody td {
  padding: 0.95rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: top;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
}

.table-actions .ghost-btn {
  border-radius: 12px;
  padding: 0.55rem 0.68rem;
  font-size: 0.82rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.36rem 0.65rem;
  font-size: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.pill.success {
  color: #8ef2bf;
}

.pill.warning {
  color: #ffe08f;
}

.pill.danger {
  color: #ffb199;
}

.pill.neutral {
  color: var(--muted);
}

.meta-list {
  display: grid;
  gap: 0.9rem;
}

.meta-list dt {
  color: var(--muted);
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.meta-list dd {
  margin: 0.25rem 0 0;
  line-height: 1.6;
}

.meta-list.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.meta-list.compact > div {
  min-width: 0;
  padding: 0.75rem 0.85rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.055);
}

.meta-list.compact dd {
  overflow-wrap: anywhere;
}

.panel-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.95rem;
}

.timeline {
  display: grid;
  gap: 0.8rem;
}

.timeline-item {
  padding: 1rem 1.05rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.timeline-item strong {
  display: block;
  margin-bottom: 0.35rem;
}

.timeline-item .meta {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.35rem;
}

.dialog-shell {
  width: min(1060px, calc(100vw - 2rem));
  border: 0;
  padding: 0;
  border-radius: 28px;
  background: rgba(8, 12, 20, 0.95);
  color: var(--text);
  box-shadow: var(--shadow);
}

.dialog-shell::backdrop {
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
}

.dialog-large {
  width: min(1200px, calc(100vw - 2rem));
}

.dialog-form {
  display: grid;
  gap: 1rem;
  padding: 1.3rem;
}

.dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.dialog-note {
  margin: -0.35rem 0 0.2rem;
  color: var(--muted);
  line-height: 1.6;
}

.field-row {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dialog-toggle {
  margin-top: -0.2rem;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.module-card {
  padding: 0.9rem 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
}

.module-card input {
  width: 18px;
  height: 18px;
  margin-top: 0.2rem;
  accent-color: var(--accent);
}

.module-card strong {
  display: block;
  margin-bottom: 0.15rem;
}

.module-card span {
  color: var(--muted);
  font-size: 0.87rem;
  line-height: 1.5;
}

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

.result-card {
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  padding: 1rem;
}

.result-title {
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.demo-primer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  padding: 1rem;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(217, 164, 65, 0.13), rgba(77, 182, 172, 0.09)),
    rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(217, 164, 65, 0.2);
}

.demo-primer div {
  display: grid;
  gap: 0.28rem;
}

.demo-primer span,
.demo-summary-grid span {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
}

.demo-primer strong,
.demo-summary-grid strong {
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.demo-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.demo-summary-grid > div {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 0.35rem;
  padding: 0.95rem;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.062), rgba(255, 255, 255, 0.032));
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.demo-summary-grid > div::after {
  content: "";
  position: absolute;
  width: 90px;
  height: 90px;
  right: -36px;
  bottom: -42px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(143, 231, 223, 0.16), transparent 70%);
}

.demo-checklists {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.demo-checklists section,
.demo-package-dialog .result-card {
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.065);
  padding: 1rem;
}

.demo-checklists h4,
.demo-package-dialog h4 {
  margin: 0 0 0.75rem;
}

.demo-checklists ol {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--muted);
}

.demo-checklists li {
  margin: 0.45rem 0;
  line-height: 1.5;
}

.message-block {
  min-height: 170px;
  padding: 1rem;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(5, 8, 14, 0.74), rgba(9, 20, 28, 0.72)),
    rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(143, 231, 223, 0.14);
}

.code-block {
  margin: 0;
  max-height: 55vh;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.86rem;
  color: #f4f7fb;
}

.code-block-soft {
  color: #bfeae5;
}

.inline-error {
  padding: 0.7rem 0.8rem;
  border-radius: 14px;
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(249, 115, 22, 0.25);
}

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  background: rgba(10, 15, 24, 0.96);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 0.9rem 1rem;
  box-shadow: var(--shadow);
  z-index: 1000;
  min-width: 220px;
}

@media (max-width: 1280px) {
  .login-screen,
  .app-shell,
  .content-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .toolbar {
    justify-content: flex-start;
  }
}

@media (max-width: 860px) {
  .login-screen,
  .app-shell {
    padding: 1rem;
  }

  .login-marketing,
  .login-card,
  .panel,
  .sidebar,
  .topbar {
    border-radius: 22px;
  }

  .field-row,
  .module-grid,
  .result-grid,
  .demo-primer,
  .demo-summary-grid,
  .demo-checklists,
  .meta-list.compact {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
  }

  .search {
    min-width: 0;
    width: 100%;
  }

  .dialog-shell {
    width: min(100vw - 1rem, 1000px);
  }

  table {
    min-width: 720px;
  }
}
