:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif;
  color: #eaf1fb;
  background: #050a12;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 70% 15%, rgba(34, 103, 187, .18), transparent 30%),
    linear-gradient(145deg, #050a12, #0a1422 55%, #07101b);
}
.app { min-height: 100vh; padding: 22px; }
.topbar {
  max-width: 1540px;
  margin: 0 auto 18px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
}
.eyebrow {
  margin: 0 0 5px;
  font-size: 12px;
  letter-spacing: .18em;
  color: #7fa9d9;
}
h1 { margin: 0; font-size: clamp(22px, 3vw, 38px); font-weight: 680; }
.status {
  border: 1px solid rgba(123, 168, 220, .25);
  background: rgba(9, 22, 38, .75);
  padding: 10px 14px;
  border-radius: 999px;
  white-space: nowrap;
}
.status span {
  display: inline-block;
  width: 9px; height: 9px;
  margin-right: 7px;
  border-radius: 50%;
  background: #37d985;
  box-shadow: 0 0 15px #37d985;
}
.workspace {
  max-width: 1540px;
  margin: auto;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 16px;
}
.panel, .viewer-card {
  border: 1px solid rgba(122, 161, 206, .18);
  background: rgba(8, 18, 31, .76);
  box-shadow: 0 25px 70px rgba(0,0,0,.34);
  backdrop-filter: blur(15px);
}
.panel { padding: 20px; border-radius: 20px; }
.panel h2 { margin: 0 0 17px; font-size: 17px; }
.step {
  display: flex; gap: 12px; align-items: center;
  padding: 12px 0;
  border-top: 1px solid rgba(255,255,255,.07);
}
.step b {
  display: grid; place-items: center;
  width: 36px; height: 36px;
  border-radius: 10px;
  color: #8fc5ff;
  background: rgba(38, 112, 192, .16);
}
.step span { font-size: 14px; line-height: 1.35; }
.step small { color: #8496aa; }
.viewer-card {
  min-height: 720px;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
}
model-viewer {
  width: 100%;
  height: 660px;
  --poster-color: transparent;
  background:
    radial-gradient(circle at 52% 42%, #243348 0%, #111b29 38%, #070d16 78%);
}
.toolbar {
  min-height: 60px;
  padding: 10px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
button {
  border: 1px solid rgba(140, 184, 233, .22);
  border-radius: 10px;
  background: #101f32;
  color: #e9f3ff;
  padding: 10px 13px;
  cursor: pointer;
}
button:hover { background: #17304d; }
.progress {
  position: absolute;
  left: 10%; right: 10%; bottom: 20px;
  height: 5px; overflow: hidden; border-radius: 999px;
  background: rgba(255,255,255,.10);
}
.progress-fill {
  width: 0; height: 100%;
  background: linear-gradient(90deg, #2b80de, #55d7ff);
  transition: width .15s;
}
.ar-button { display: none; }
footer {
  max-width: 1540px;
  margin: 12px auto 0;
  text-align: center;
  color: #6f8399;
  font-size: 12px;
}
@media (max-width: 900px) {
  .app { padding: 12px; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .workspace { grid-template-columns: 1fr; }
  .panel { display: none; }
  .viewer-card { min-height: 620px; }
  model-viewer { height: 555px; }
}

.status.error span {
  background: #ff5e68;
  box-shadow: 0 0 15px #ff5e68;
}
.status.ready span {
  background: #37d985;
  box-shadow: 0 0 15px #37d985;
}
.model-error {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: min(520px, calc(100% - 40px));
  padding: 22px;
  border: 1px solid rgba(255, 102, 112, .36);
  border-radius: 16px;
  background: rgba(26, 8, 14, .94);
  color: #ffe8eb;
  text-align: center;
  z-index: 20;
  box-shadow: 0 25px 60px rgba(0,0,0,.45);
}
.model-error h3 { margin: 0 0 10px; }
.model-error p { margin: 7px 0; color: #d9bfc3; line-height: 1.5; }
.model-error code {
  color: #fff;
  word-break: break-all;
}
