
:root {
  --bg: #09111d;
  --bg2: #0f1a2b;
  --panel: rgba(13, 23, 40, 0.78);
  --panel-strong: rgba(17, 29, 49, 0.92);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #ecf3ff;
  --muted: #9fb0cb;
  --primary: #59a7ff;
  --primary-2: #88f0ff;
  --accent: #8b5cf6;
  --success: #34d399;
  --warning: #f59e0b;
  --danger: #fb7185;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  --radius: 24px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(89, 167, 255, 0.18), transparent 32%),
    radial-gradient(circle at top right, rgba(139, 92, 246, 0.14), transparent 28%),
    linear-gradient(180deg, #07101a, #0a1321 36%, #0a0f19 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.18;
}

a { color: inherit; }

.shell {
  width: min(1500px, calc(100% - 32px));
  margin: 24px auto 56px;
}

.hero {
  display: grid;
  grid-template-columns: 1.35fr 0.95fr;
  gap: 20px;
  margin-bottom: 20px;
}

.heroCard,
.panel,
.stickyCard,
.kpi,
.summaryCard,
.tableWrap,
.formCard,
.toast {
  background: linear-gradient(180deg, rgba(17, 29, 49, 0.88), rgba(9, 16, 29, 0.9));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.heroCard,
.heroAside,
.panel,
.tableWrap,
.formCard {
  padding: 22px;
}

.heroCard h1,
.formCard h1 {
  margin: 0 0 8px;
  font-size: clamp(1.9rem, 3vw, 3rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.subtitle {
  color: var(--muted);
  font-size: 0.98rem;
  max-width: 880px;
}

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

.kpi {
  padding: 14px 16px;
}

.kpi strong {
  display: block;
  font-size: 1.2rem;
  margin-bottom: 6px;
}

.kpi span {
  color: var(--muted);
  font-size: 0.9rem;
}

.heroAside {
  display: grid;
  gap: 14px;
  align-content: start;
}

.heroAside .cardStat {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background: rgba(255,255,255,0.03);
}

.cardStat .eyebrow,
.sectionHead .eyebrow {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(89, 167, 255, 0.13);
  border: 1px solid rgba(89, 167, 255, 0.18);
  color: #d7edff;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.cardStat h3 {
  margin: 12px 0 8px;
  font-size: 1.1rem;
}

.cardStat p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(360px, 0.72fr);
  gap: 20px;
}

.leftCol {
  display: grid;
  gap: 18px;
}

.stickyCol {
  position: sticky;
  top: 18px;
  align-self: start;
}

.stickyCard {
  padding: 22px;
}

.sectionHead {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.sectionHead h2,
.stickyCard h2,
.tableWrap h2,
.formCard h2 {
  margin: 0;
  font-size: 1.16rem;
  letter-spacing: -0.02em;
}

.sectionHead p,
.stickyCard .muted,
.helper,
.empty,
.small {
  color: var(--muted);
}

.grid.two,
.grid.three,
.grid.four,
.grid.five {
  display: grid;
  gap: 14px;
}

.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-size: 0.88rem;
  color: #dce9ff;
}

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

input,
select,
textarea {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: rgba(2, 10, 20, 0.72);
  color: var(--text);
  padding: 14px 15px;
  outline: none;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

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

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(89, 167, 255, 0.8);
  box-shadow: 0 0 0 4px rgba(89, 167, 255, 0.12);
}

.chipGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.checkCard,
.optionCard {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,0.03);
  padding: 14px;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.checkCard:hover,
.optionCard:hover {
  transform: translateY(-2px);
  border-color: rgba(89, 167, 255, 0.34);
}

.checkCard label,
.optionCard label {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
}

.checkCard input,
.optionCard input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.cardTitle {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.cardTitle strong {
  font-size: 0.96rem;
}

.priceTag {
  white-space: nowrap;
  color: #ddf4ff;
  font-size: 0.84rem;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(89, 167, 255, 0.12);
  border: 1px solid rgba(89, 167, 255, 0.16);
}

.desc {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.inlinePills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  color: #e5efff;
  font-size: 0.85rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

button {
  border: 0;
  border-radius: 16px;
  padding: 13px 18px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

button:hover { transform: translateY(-1px); }
button:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btnPrimary {
  color: #08111d;
  background: linear-gradient(135deg, var(--primary-2), var(--primary));
  box-shadow: 0 18px 42px rgba(89, 167, 255, 0.25);
  font-weight: 700;
}

.btnSecondary {
  color: var(--text);
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--line);
}

.btnDanger {
  color: #fff;
  background: linear-gradient(135deg, #fb7185, #e11d48);
}

.statsGrid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 16px;
}

.summaryCard {
  padding: 16px;
  min-height: 104px;
}

.summaryCard .label {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 10px;
}

.summaryCard .value {
  font-size: clamp(1.28rem, 2.5vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.summaryCard .sub {
  color: var(--muted);
  margin-top: 8px;
  font-size: 0.85rem;
}

.summaryBlock {
  margin-top: 16px;
  display: grid;
  gap: 14px;
}

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

.summaryLine {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(255,255,255,0.08);
}

.summaryLine:last-child { border-bottom: 0; }

.summaryLine strong {
  font-size: 0.95rem;
}

.summaryLine span,
.summaryLine small {
  color: var(--muted);
}

.tableWrap {
  overflow: hidden;
}

.tableScroller {
  overflow: auto;
  border-radius: 18px;
  border: 1px solid var(--line);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 840px;
  background: rgba(0,0,0,0.16);
}

th,
td {
  text-align: left;
  padding: 14px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  vertical-align: top;
}

th {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #d9ecff;
  background: rgba(255,255,255,0.04);
}

td {
  font-size: 0.93rem;
  color: #eaf2ff;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(255,255,255,0.06);
  color: #e0eeff;
  font-size: 0.75rem;
  border: 1px solid rgba(255,255,255,0.08);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.tableActions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.notice {
  margin-top: 16px;
  padding: 15px 16px;
  border-radius: 18px;
  border: 1px solid rgba(52, 211, 153, 0.2);
  background: rgba(52, 211, 153, 0.08);
  color: #d9fff0;
  line-height: 1.5;
}

.warn {
  border-color: rgba(245, 158, 11, 0.22);
  background: rgba(245, 158, 11, 0.08);
  color: #ffeec6;
}

.error {
  border-color: rgba(251, 113, 133, 0.22);
  background: rgba(251, 113, 133, 0.08);
  color: #ffe4ea;
}

.hidden {
  display: none !important;
}

.footerNote {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: min(360px, calc(100% - 32px));
  padding: 16px 18px;
  z-index: 50;
  transform: translateY(22px);
  opacity: 0;
  pointer-events: none;
  transition: transform .2s ease, opacity .2s ease;
}

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

hr.sep {
  border: 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin: 18px 0;
}

@media (max-width: 1180px) {
  .hero,
  .layout {
    grid-template-columns: 1fr;
  }

  .stickyCol {
    position: static;
  }
}

@media (max-width: 860px) {
  .grid.two,
  .grid.three,
  .grid.four,
  .grid.five,
  .heroGrid,
  .statsGrid {
    grid-template-columns: 1fr;
  }

  .shell {
    width: min(100% - 20px, 1400px);
    margin: 14px auto 42px;
  }

  .heroCard,
  .heroAside,
  .panel,
  .stickyCard,
  .tableWrap,
  .formCard {
    padding: 18px;
  }
}
