:root {
  --bg: #091017;
  --panel: #111a22;
  --panel-2: #17232d;
  --line: #263845;
  --text: #edf4f8;
  --muted: #91a3af;
  --soft: #c9d6dd;
  --accent: #4fd1a5;
  --accent-2: #66a6ff;
  --warning: #f6c768;
  --danger: #ff7a7a;
  --ok: #5ce1a9;
  --info: #8bb7ff;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.32);
  --shadow-soft: 0 10px 34px rgba(0, 0, 0, 0.22);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 18% 0%, rgba(79, 209, 165, 0.08), transparent 32%),
    linear-gradient(180deg, #0c151d 0%, var(--bg) 42%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 22px;
  border-right: 1px solid var(--line);
  background: rgba(10, 18, 25, 0.98);
}

.brand {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: center;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: linear-gradient(135deg, #2dd4bf, #5b8cff);
  color: #061118;
  font-weight: 900;
}

.brand small,
.operator-card small,
.muted {
  display: block;
  color: var(--muted);
  line-height: 1.45;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav a {
  color: var(--soft);
  text-decoration: none;
  padding: 11px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.nav a.active,
.nav a:hover {
  background: var(--panel);
  border-color: var(--line);
  color: var(--text);
  transform: translateX(2px);
}

.operator-card {
  margin-top: auto;
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 12px;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.pulse {
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 6px rgba(92, 225, 169, 0.12);
}

.kernel-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

main {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 22px 30px;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 17, 23, 0.92);
  backdrop-filter: blur(14px);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 28px;
  line-height: 1.15;
}

h2 {
  font-size: 20px;
}

h3 {
  font-size: 15px;
}

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.top-actions,
.actions,
.tabs,
.filters,
.presentation-controls,
.inline {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

button,
.button {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 38px;
  padding: 9px 13px;
  color: var(--text);
  background: var(--panel-2);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

button:hover,
.button:hover {
  border-color: #3c5362;
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.primary {
  background: var(--accent);
  color: #061118;
  border-color: var(--accent);
  font-weight: 800;
  box-shadow: 0 10px 28px rgba(79, 209, 165, 0.18);
}

.ghost {
  background: transparent;
}

.demo-banner {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid rgba(139, 183, 255, 0.28);
  border-radius: 8px;
  color: var(--soft);
  background: rgba(139, 183, 255, 0.08);
  font-size: 12px;
  font-weight: 800;
}

.hero-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.danger {
  color: #fff;
  border-color: rgba(255, 122, 122, 0.55);
  background: rgba(255, 122, 122, 0.12);
}

.view {
  padding: 28px 30px 44px;
  animation: view-in 0.28s ease both;
}

.grid {
  display: grid;
  gap: 16px;
}

.kpi-grid {
  grid-template-columns: repeat(6, minmax(140px, 1fr));
}

.two-col {
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
}

.three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  box-shadow: var(--shadow);
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.card:hover {
  border-color: #345061;
  transform: translateY(-1px);
  box-shadow: 0 20px 64px rgba(0, 0, 0, 0.38);
}

.kpi {
  min-height: 112px;
  position: relative;
  overflow: hidden;
}

.kpi::after {
  content: "";
  position: absolute;
  inset: auto 14px 12px 14px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), rgba(102, 166, 255, 0.2));
}

.kpi strong {
  display: block;
  margin-top: 10px;
  font-size: 32px;
  line-height: 1;
}

.kpi span {
  color: var(--muted);
  font-size: 13px;
}

.hero-panel {
  margin-bottom: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 360px);
  gap: 22px;
  align-items: center;
  padding: 24px;
  border: 1px solid rgba(139, 183, 255, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(79, 209, 165, 0.16), rgba(139, 183, 255, 0.07)),
    #101922;
  box-shadow: var(--shadow);
}

.hero-panel p {
  max-width: 880px;
}

.hero-panel h2 {
  max-width: 860px;
  margin-top: 8px;
  font-size: 36px;
  line-height: 1.08;
}

.hero-copy > .muted {
  margin-top: 12px;
  font-size: 15px;
}

.hero-pills {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.hero-pills div,
.hero-side {
  border: 1px solid rgba(201, 214, 221, 0.14);
  border-radius: 8px;
  background: rgba(9, 16, 23, 0.48);
}

.hero-pills div {
  min-height: 104px;
  padding: 13px;
}

.hero-pills strong,
.hero-pills span,
.demo-chip,
.hero-metric span {
  display: block;
}

.hero-pills span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.42;
}

.hero-side {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.demo-chip {
  color: var(--info);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-metric strong {
  display: block;
  margin-top: 4px;
  font-size: 48px;
  line-height: 1;
}

.hero-metric span {
  color: var(--muted);
}

.attention-panel {
  margin-bottom: 18px;
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.4fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(246, 199, 104, 0.42);
  border-radius: 8px;
  background: rgba(246, 199, 104, 0.08);
}

.attention-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  gap: 10px;
}

.attention-grid div {
  min-height: 78px;
  padding: 12px;
  border: 1px solid rgba(246, 199, 104, 0.28);
  border-radius: 8px;
  background: rgba(11, 17, 23, 0.4);
  transition: border-color 0.18s ease, background 0.18s ease;
}

.attention-grid div:hover {
  border-color: rgba(246, 199, 104, 0.58);
  background: rgba(246, 199, 104, 0.1);
}

.attention-grid strong {
  display: block;
  font-size: 26px;
  line-height: 1;
}

.attention-grid span {
  display: block;
  margin-top: 8px;
  color: var(--soft);
  font-size: 13px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

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

th,
td {
  padding: 12px 13px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(201, 214, 221, 0.18);
  color: var(--soft);
  background: rgba(255, 255, 255, 0.03);
  font-size: 12px;
  font-weight: 700;
}

.tag.info {
  color: var(--info);
  border-color: rgba(139, 183, 255, 0.42);
  background: rgba(139, 183, 255, 0.08);
}

.tag.ok {
  color: var(--ok);
  border-color: rgba(92, 225, 169, 0.42);
  background: rgba(92, 225, 169, 0.08);
}

.tag.warn {
  color: var(--warning);
  border-color: rgba(246, 199, 104, 0.42);
  background: rgba(246, 199, 104, 0.08);
}

.tag.bad {
  color: var(--danger);
  border-color: rgba(255, 122, 122, 0.42);
  background: rgba(255, 122, 122, 0.08);
}

.status-stack {
  display: grid;
  gap: 4px;
}

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

.meter {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #24313b;
}

.meter > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.list {
  display: grid;
  gap: 10px;
}

.row-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  transition: background 0.18s ease;
}

.row-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

.row-item:last-child {
  border-bottom: 0;
}

.tabs button.active {
  background: var(--text);
  color: #071018;
  border-color: var(--text);
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  color: var(--text);
  background: #0d151d;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.upload-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 12px;
}

.upload-box {
  display: grid;
  place-items: center;
  min-height: 108px;
  border: 1px dashed #46606e;
  border-radius: 8px;
  background: #0d151d;
  color: var(--soft);
  cursor: pointer;
  text-align: center;
}

.upload-box.done {
  border-color: var(--accent);
  background: rgba(79, 209, 165, 0.08);
}

.upload-box.required {
  border-color: rgba(246, 199, 104, 0.65);
  background: rgba(246, 199, 104, 0.08);
}

.upload-box small {
  margin-top: 5px;
}

.step-list {
  display: grid;
  gap: 10px;
}

.step-item {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: start;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}

.step-index {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: #061118;
  background: var(--accent);
  font-weight: 900;
}

.checklist {
  display: grid;
  gap: 10px;
}

.check {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.timeline {
  position: relative;
  display: grid;
  gap: 12px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  color: var(--soft);
}

.dot {
  width: 12px;
  height: 12px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--line);
}

.dot.done {
  background: var(--accent);
}

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

.story-step {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.big-number {
  color: var(--accent);
  font-size: 34px;
  font-weight: 900;
}

.presentation-shell {
  display: grid;
  gap: 16px;
}

.presentation-card {
  min-height: 360px;
  display: grid;
  align-content: space-between;
  gap: 24px;
  background:
    linear-gradient(135deg, rgba(139, 183, 255, 0.1), rgba(79, 209, 165, 0.06)),
    var(--panel);
}

.presentation-card h2 {
  font-size: 28px;
}

.presentation-card p {
  max-width: 820px;
  font-size: 17px;
}

.value-prop {
  max-width: 840px;
  color: var(--soft);
  font-size: 19px;
  line-height: 1.5;
}

.presenter-note {
  margin-top: 18px;
  display: grid;
  gap: 6px;
  max-width: 820px;
  padding: 13px;
  border: 1px solid rgba(139, 183, 255, 0.3);
  border-radius: 8px;
  background: rgba(139, 183, 255, 0.08);
}

.presenter-note span {
  color: var(--soft);
  line-height: 1.45;
}

.presentation-index {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.presentation-progress {
  width: min(420px, 100%);
  height: 7px;
  margin: 10px 0 22px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.presentation-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.22s ease;
}

.presentation-dots {
  display: flex;
  gap: 7px;
}

.presentation-dot {
  width: 34px;
  height: 4px;
  border-radius: 999px;
  background: var(--line);
}

.presentation-dot.active {
  background: var(--accent);
}

.payment-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.currency-total strong {
  font-size: 24px;
}

.due-badge {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 122, 122, 0.55);
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 122, 122, 0.16);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.feedback-context {
  display: grid;
  gap: 5px;
  margin-bottom: 16px;
  padding: 13px;
  border: 1px solid rgba(79, 209, 165, 0.28);
  border-radius: 8px;
  background: rgba(79, 209, 165, 0.07);
}

.feedback-context span {
  color: var(--soft);
  line-height: 1.45;
}

.tabs button.urgent-tab {
  color: #071018;
  background: var(--warning);
  border-color: var(--warning);
}

.careful-note {
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid rgba(79, 209, 165, 0.28);
  border-radius: 8px;
  color: var(--soft);
  background: rgba(79, 209, 165, 0.07);
  line-height: 1.45;
}

.audit-proof {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.feedback-form label {
  text-transform: none;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 5;
  max-width: 360px;
  padding: 13px 15px;
  border: 1px solid rgba(92, 225, 169, 0.28);
  border-radius: 8px;
  background: linear-gradient(135deg, #101922, #14212b);
  color: var(--text);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(10px);
}

.modal {
  width: min(560px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  box-shadow: var(--shadow);
  animation: modal-in 0.2s ease both;
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

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

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

  .kpi-grid,
  .payment-summary,
  .three-col,
  .story-grid,
  .two-col {
    grid-template-columns: 1fr 1fr;
  }

  .hero-panel {
    grid-template-columns: 1fr;
  }

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

  .attention-panel {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px;
  }

  .view {
    padding: 18px;
  }

  .kpi-grid,
  .payment-summary,
  .three-col,
  .story-grid,
  .two-col,
  .form-grid,
  .upload-grid {
    grid-template-columns: 1fr;
  }

  .nav {
    grid-template-columns: 1fr;
  }

  .attention-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .hero-pills {
    grid-template-columns: 1fr;
  }

  .hero-panel h2 {
    font-size: 28px;
  }
}
