@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600&family=IBM+Plex+Sans:wght@400;500;600&display=swap');

:root {
  --bg0: #faf7f0;
  --bg1: #f6f1e6;
  --ink: #151515;
  --muted: rgba(21, 21, 21, 0.64);
  --muted2: rgba(21, 21, 21, 0.38);
  --card: rgba(255, 255, 255, 0.68);
  --stroke: rgba(21, 21, 21, 0.12);
  --stroke2: rgba(21, 21, 21, 0.18);

  --a: #0a6f6a;
  --a2: #0c9b93;
  --b: #d46b42;

  --shadow: 0 18px 50px rgba(10, 12, 16, 0.12);
  --shadow2: 0 10px 22px rgba(10, 12, 16, 0.12);

  --r1: 14px;
  --r2: 22px;
  --pad: 18px;
  --max: 1200px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background: radial-gradient(1200px 900px at 30% -20%, rgba(12, 155, 147, 0.18), transparent 60%),
              radial-gradient(1200px 900px at 80% 10%, rgba(212, 107, 66, 0.14), transparent 55%),
              linear-gradient(180deg, var(--bg0), var(--bg1));
  font-family: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

.bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(0,0,0,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0,0,0,0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(650px 550px at 35% 0%, rgba(0,0,0,0.85), transparent 70%);
  opacity: 0.45;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--stroke);
  background: rgba(250, 247, 240, 0.72);
  backdrop-filter: blur(10px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}
.brandMark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
  background: linear-gradient(140deg, rgba(10, 111, 106, 0.16), rgba(212, 107, 66, 0.14));
  border: 1px solid var(--stroke2);
  box-shadow: var(--shadow2);
}
.brandName {
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.brandTag {
  font-size: 12px;
  color: var(--muted);
}

.tabs {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.tab {
  text-decoration: none;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}
.tab:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.52);
  border-color: var(--stroke);
}
.tab.active {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(10, 111, 106, 0.26);
}

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

.app {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px;
}

.panel {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--r2);
  box-shadow: var(--shadow);
}

.hero {
  padding: 20px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
}
.hero h1 {
  margin: 0;
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -0.03em;
  font-size: 34px;
  line-height: 1.05;
}
.hero p {
  margin: 10px 0 0;
  color: var(--muted);
  max-width: 58ch;
}
.heroCard {
  border-radius: 18px;
  border: 1px dashed rgba(21, 21, 21, 0.25);
  padding: 14px;
  background: rgba(255,255,255,0.52);
}

.grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
  margin-top: 16px;
}

.filters {
  padding: 14px;
}
.filters h2 {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
}

.field {
  margin-top: 12px;
}
.label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.input, select {
  width: 100%;
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid var(--stroke2);
  background: rgba(255,255,255,0.86);
  color: var(--ink);
  outline: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(10, 111, 106, 0.28);
  background: linear-gradient(180deg, rgba(10, 111, 106, 0.10), rgba(10, 111, 106, 0.04));
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow2);
}
.btn:active {
  transform: translateY(0);
}
.btnGhost {
  border-color: var(--stroke2);
  background: rgba(255, 255, 255, 0.34);
}
.btnDanger {
  border-color: rgba(212, 107, 66, 0.35);
  background: linear-gradient(180deg, rgba(212, 107, 66, 0.12), rgba(212, 107, 66, 0.04));
}

.cards {
  padding: 14px;
}
.cardsHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.cardsHeader h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
}
.small {
  color: var(--muted);
  font-size: 12px;
}

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

.card {
  border-radius: var(--r1);
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.72);
  padding: 12px;
  transition: border-color 140ms ease, transform 140ms ease;
}
.card:hover {
  transform: translateY(-1px);
  border-color: rgba(10, 111, 106, 0.22);
}

.cardTop {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.cardName {
  font-weight: 600;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.badge {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  color: var(--muted);
  background: rgba(250, 247, 240, 0.7);
}

.cardActions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.split {
  display: grid;
  grid-template-columns: 320px 1fr 280px;
  gap: 14px;
  padding: 14px;
}

.box {
  border-radius: 16px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.72);
}

.boxHeader {
  padding: 12px;
  border-bottom: 1px solid var(--stroke);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.boxHeader h3 {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
}

.boxBody {
  padding: 12px;
}

.preview {
  height: 420px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}

.previewSvg {
  width: min(520px, 92%);
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(10, 111, 106, 0.06), rgba(212, 107, 66, 0.06));
}

.player {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.progress {
  height: 8px;
  border-radius: 999px;
  background: rgba(21, 21, 21, 0.10);
  overflow: hidden;
  width: 100%;
  margin-top: 10px;
}
.progress > div {
  height: 100%;
  width: 22%;
  background: linear-gradient(90deg, rgba(10, 111, 106, 0.72), rgba(12, 155, 147, 0.84));
}

.steps {
  display: grid;
  gap: 8px;
}
.step {
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: rgba(250, 247, 240, 0.72);
  padding: 10px;
  cursor: pointer;
}
.step strong {
  display: block;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.step span {
  display: block;
  margin-top: 4px;
}
.step.active {
  border-color: rgba(212, 107, 66, 0.35);
  background: rgba(255, 255, 255, 0.82);
}

.footer {
  max-width: var(--max);
  margin: 18px auto;
  padding: 12px 18px 24px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.footerRight {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.pill {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.55);
}

.iconBtn {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.62);
  cursor: pointer;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 50;
}
.modal[aria-hidden="false"] {
  display: flex;
}
.modalBackdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
}
.modalPanel {
  position: relative;
  width: min(640px, 100%);
  border-radius: 20px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(255,255,255,0.35);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.modalHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--stroke);
}
.modalTitle {
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
}
.modalBody {
  padding: 14px;
}
.modalFooter {
  padding: 12px 14px;
  border-top: 1px solid var(--stroke);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--stroke);
}
.table th,
.table td {
  text-align: left;
  padding: 10px 10px;
  border-bottom: 1px solid var(--stroke);
  font-size: 13px;
}
.table th {
  color: var(--muted);
  font-weight: 600;
  background: rgba(250, 247, 240, 0.72);
}

.kstatus {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.7);
  color: var(--muted);
}
.kdot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(212, 107, 66, 0.75);
}
.kdot.ok { background: rgba(12, 155, 147, 0.8); }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  .cardList { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .preview { height: 340px; }
}
