﻿:root {
  --bg: #0b1016;
  --bg-soft: #111825;
  --card: #151f2e;
  --card-bright: #192538;
  --accent: #ff6f4f;
  --accent-soft: rgba(255, 111, 79, 0.25);
  --accent-2: #51d6c5;
  --text: #f5f7fb;
  --muted: #a7b0c0;
  --stroke: rgba(255, 255, 255, 0.08);
  --success: #68e891;
  --warning: #f3b63a;
  --danger: #ff5e6c;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "IBM Plex Sans KR", sans-serif;
  background: radial-gradient(circle at top, #152133, #0b1016 55%);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.orb {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  filter: blur(0px);
  opacity: 0.45;
  animation: float 18s ease-in-out infinite;
}

.orb-one {
  background: radial-gradient(circle, rgba(255, 111, 79, 0.65), transparent 65%);
  top: -80px;
  right: 10%;
}

.orb-two {
  background: radial-gradient(circle, rgba(81, 214, 197, 0.5), transparent 60%);
  bottom: -120px;
  left: 5%;
  animation-delay: -4s;
}

.orb-three {
  background: radial-gradient(circle, rgba(126, 174, 255, 0.4), transparent 60%);
  top: 40%;
  left: 60%;
  width: 260px;
  height: 260px;
  animation-delay: -8s;
}

@keyframes float {
  0%, 100% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(-24px) translateX(14px); }
}

header, main, footer {
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 6vw;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 2px;
  background: var(--accent);
  color: #0b1016;
  padding: 10px 12px;
  border-radius: 14px;
}

.brand-title {
  font-weight: 600;
  font-size: 18px;
}

.brand-sub {
  font-size: 12px;
  color: var(--muted);
}

.nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-btn {
  background: transparent;
  border: 1px solid var(--stroke);
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}

.primary, .ghost {
  border: none;
  font-family: "IBM Plex Sans KR", sans-serif;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary {
  background: linear-gradient(120deg, var(--accent), #ffa071);
  color: #0b1016;
  box-shadow: 0 12px 28px rgba(255, 111, 79, 0.3);
}

.ghost {
  background: transparent;
  border: 1px solid var(--stroke);
  color: var(--text);
}

.primary:hover, .ghost:hover {
  transform: translateY(-2px);
}

main {
  padding: 0 6vw 80px;
  display: flex;
  flex-direction: column;
  gap: 80px;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 36px;
  align-items: center;
  padding-top: 20px;
}

.hero-text h1 {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.2;
  margin-bottom: 16px;
}

.subtitle {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

.chip {
  display: inline-block;
  background: rgba(81, 214, 197, 0.12);
  color: var(--accent-2);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.stats {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.stats span {
  font-family: "Space Grotesk", sans-serif;
  font-size: 22px;
  font-weight: 600;
}

.stats small {
  color: var(--muted);
}

.hero-panel {
  background: var(--card);
  border-radius: 22px;
  padding: 24px;
  border: 1px solid var(--stroke);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.badge {
  background: rgba(81, 214, 197, 0.12);
  color: var(--accent-2);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid rgba(81, 214, 197, 0.2);
}

.meter {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.meter .bar {
  height: 6px;
  background: var(--bg-soft);
  border-radius: 999px;
  overflow: hidden;
}

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

.panel-foot {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.panel-foot strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 20px;
}

.section-title {
  margin-bottom: 24px;
}

.section-title h2 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 28px;
  margin-bottom: 8px;
}

.section-title p {
  color: var(--muted);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
}

.card {
  background: var(--card);
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--stroke);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card h3 {
  font-family: "Space Grotesk", sans-serif;
}

.tag {
  align-self: flex-start;
  background: rgba(255, 111, 79, 0.16);
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.timeline {
  margin-top: 28px;
  display: grid;
  gap: 18px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  align-items: center;
  background: var(--card);
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px solid var(--stroke);
}

.timeline-item span {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 111, 79, 0.2);
  color: var(--accent);
  font-weight: 600;
}

.timeline-item.active {
  border-color: var(--accent);
  box-shadow: 0 0 18px rgba(255, 111, 79, 0.2);
}

.logic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.logic-panel {
  background: var(--card);
  border-radius: 20px;
  padding: 20px;
  border: 1px solid var(--stroke);
}

.logic-panel.summary {
  background: linear-gradient(150deg, rgba(81, 214, 197, 0.12), rgba(255, 111, 79, 0.08));
}

.control {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 14px;
}

.control input, .control select, .control textarea {
  background: var(--bg-soft);
  border: 1px solid var(--stroke);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 10px;
  font-family: "IBM Plex Sans KR", sans-serif;
}

.control input[type="range"] {
  accent-color: var(--accent);
}

.control .value {
  align-self: flex-end;
  font-family: "Space Grotesk", sans-serif;
}

.result {
  background: var(--card-bright);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 14px;
  border: 1px solid var(--stroke);
}

.result .status {
  color: var(--accent-2);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 1px;
}

.result.pass {
  border-color: rgba(104, 232, 145, 0.6);
  box-shadow: 0 0 16px rgba(104, 232, 145, 0.2);
}

.result.review {
  border-color: rgba(243, 182, 58, 0.6);
  box-shadow: 0 0 16px rgba(243, 182, 58, 0.2);
}

.result.hold {
  border-color: rgba(255, 94, 108, 0.6);
  box-shadow: 0 0 16px rgba(255, 94, 108, 0.2);
}

.rule-list {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.rule-list div {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

.alerts ul {
  list-style: none;
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.spc-layout {
  display: grid;
  grid-template-columns: minmax(280px, 2fr) minmax(220px, 1fr);
  gap: 24px;
}

.spc-chart {
  background: var(--card);
  border-radius: 18px;
  padding: 18px;
  border: 1px solid var(--stroke);
}

.spc-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.spc-controls label {
  display: grid;
  gap: 6px;
  font-size: 13px;
}

.spc-side {
  display: grid;
  gap: 14px;
}

.kpi {
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
  border: 1px solid var(--stroke);
  display: grid;
  gap: 6px;
}

.kpi strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 20px;
}

.spc-list {
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
  border: 1px solid var(--stroke);
}

.spc-list ul {
  list-style: none;
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.coa-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.coa-form, .coa-preview {
  background: var(--card);
  border-radius: 18px;
  padding: 20px;
  border: 1px solid var(--stroke);
}

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

.coa-preview {
  display: grid;
  gap: 16px;
}

.coa-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.coa-body {
  display: grid;
  gap: 10px;
  font-size: 14px;
}

.coa-body .row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px dashed var(--stroke);
  padding-bottom: 6px;
}

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

.audit {
  background: var(--bg-soft);
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
}

.audit ul {
  list-style: none;
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

footer {
  text-align: center;
  padding: 20px 6vw 40px;
  color: var(--muted);
}

@media (max-width: 900px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }
  .nav {
    width: 100%;
  }
  .spc-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .stats {
    flex-direction: column;
  }
  .coa-body .row {
    flex-direction: column;
    align-items: flex-start;
  }
}
