:root{
  --bg:#0b0c0f;
  --card:#12141a;
  --muted:#9aa3b2;
  --text:#eef1f6;
  --line:#232736;
  --accent:#ffffff;
  --accentText:#0b0c0f;
  --danger:#ff5a6a;
  --ok:#2ee59d;
  --warn:#ffc24b;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: radial-gradient(1200px 700px at 20% 0%, #1a1d28 0%, var(--bg) 55%) fixed;
  color:var(--text);
}

.page{
  min-height:100%;
  display:flex;
  flex-direction:column;
  padding:24px;
  gap:18px;
}

.header, .footer{ max-width:900px; margin:0 auto; width:100%; }
.brand{ display:flex; align-items:center; gap:12px; }
.logo{
  width:44px; height:44px; border-radius:14px;
  display:grid; place-items:center;
  background:linear-gradient(135deg, #2a2f42, #141827);
  border:1px solid var(--line);
  font-weight:800;
  user-select:none;
}
.brand-title{ font-weight:800; letter-spacing:0.2px; }
.brand-subtitle{ color:var(--muted); font-size:13px; margin-top:2px; }

.card{
  max-width:900px;
  margin:0 auto;
  width:100%;
  background: rgba(18,20,26,0.85);
  border:1px solid var(--line);
  border-radius:22px;
  padding:22px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
  backdrop-filter: blur(10px);
}

.section{ will-change: transform, opacity; }
.section-show{
  opacity:1;
  transform: translateY(0);
  transition: opacity 220ms ease, transform 220ms ease;
}
.section-hide{
  opacity:0;
  transform: translateY(10px);
  pointer-events:none;
  transition: opacity 220ms ease, transform 220ms ease;
}

h1{ margin:0 0 8px; font-size:22px; }
h2{ margin:0; font-size:18px; }
h3{ margin:0; font-size:16px; }
.muted{ color:var(--muted); }
.small{ font-size:12px; }
.divider{ height:1px; background:var(--line); margin:18px 0; }

.form{ display:flex; flex-direction:column; gap:14px; margin-top:16px; }
.field{ display:flex; flex-direction:column; gap:8px; }
.field span{ font-size:13px; color:var(--muted); }
.field input{
  height:44px;
  padding:0 14px;
  border-radius:14px;
  border:1px solid var(--line);
  background:#0e1016;
  color:var(--text);
  outline:none;
}
.field input:focus{
  border-color:#3a425f;
  box-shadow: 0 0 0 4px rgba(88,110,255,0.12);
}
.hint{ font-size:12px; color:var(--muted); }

.btn{
  height:44px;
  border-radius:14px;
  border:1px solid var(--line);
  background:var(--accent);
  color:var(--accentText);
  font-weight:800;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
}
.btn:disabled{ opacity:0.75; cursor:not-allowed; }

.btn-ghost{
  background:transparent;
  color:var(--text);
  border-color:var(--line);
  font-weight:700;
}

.btn-spinner{
  width:16px; height:16px;
  border-radius:999px;
  border:2px solid rgba(0,0,0,0.22);
  border-top-color: rgba(0,0,0,0.75);
  display:none;
  animation: spin 700ms linear infinite;
}
.btn.loading .btn-spinner{ display:inline-block; }
.btn.loading .btn-label{ opacity:0.9; }

@keyframes spin{ to{ transform: rotate(360deg); } }

.form-msg{
  min-height:20px;
  font-size:13px;
  color:var(--muted);
}
.form-msg.error{ color:var(--danger); }
.form-msg.ok{ color:var(--ok); }

.result{
  margin-top:2px;
}

.result-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}
.result-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap:12px;
  margin-top:12px;
}
@media (max-width:720px){
  .grid{ grid-template-columns:1fr; }
}

.kv{
  border:1px solid var(--line);
  border-radius:16px;
  padding:12px;
  background:#0e1016;
}
.k{ font-size:12px; color:var(--muted); }
.v{ margin-top:6px; font-weight:800; }

.status-pill{
  display:inline-flex;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background:#0b0c0f;
  width:fit-content;
}

.items-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}

.items{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.item{
  border:1px solid var(--line);
  border-radius:16px;
  padding:12px;
  background:#0e1016;
  display:flex;
  justify-content:space-between;
  gap:12px;
}
.item .left{ display:flex; flex-direction:column; gap:4px; }
.item .title{ font-weight:900; }
.item .meta{ font-size:12px; color:var(--muted); }
.item .qty{ font-weight:900; white-space:nowrap; }

.details{ margin-top:14px; }
.raw{
  margin-top:10px;
  padding:12px;
  border-radius:16px;
  border:1px solid var(--line);
  background:#0b0c0f;
  color:#cdd5e1;
  overflow:auto;
}

.footer{ padding-bottom:6px; }

/* Timeline (SaaS feature) */
.timeline{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px;
  border:1px solid var(--line);
  background:#0e1016;
  border-radius:18px;
  margin:14px 0 6px;
}
.step{
  display:flex;
  align-items:center;
  gap:8px;
}
.step .dot{
  width:12px; height:12px;
  border-radius:999px;
  border:1px solid var(--line);
  background:#0b0c0f;
}
.step .label{
  font-size:12px;
  color:var(--muted);
  font-weight:700;
}
.bar{
  flex:1;
  height:2px;
  background: var(--line);
  border-radius:999px;
  opacity:0.8;
}

/* Active/completed styling */
.step.active .dot,
.step.done .dot{
  background: var(--accent);
  border-color: rgba(255,255,255,0.35);
}
.step.active .label,
.step.done .label{
  color: var(--text);
}
.step.active .label{ font-weight:900; }

.skeleton{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.sk-row{
  height:54px;
  border-radius:16px;
  border:1px solid var(--line);
  background: linear-gradient(90deg, #0e1016 0%, #141827 50%, #0e1016 100%);
  background-size: 200% 100%;
  animation: shimmer 900ms ease-in-out infinite;
}
@keyframes shimmer{
  0%{ background-position: 0% 0; }
  100%{ background-position: 200% 0; }
}

.support{
  margin-top:16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  border:1px solid var(--line);
  background:#0e1016;
  border-radius:16px;
  padding:12px;
}
.support-link{
  color: var(--text);
  text-decoration: none;
  font-weight:800;
  border-bottom:1px dashed rgba(255,255,255,0.25);
}
.support-link:hover{ opacity:0.9; }
