:root {
  color-scheme: light;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: #f5f3ed;
  color: #1e2925;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 0%, rgba(66, 139, 113, .15), transparent 35rem),
    #f5f3ed;
}

button, input { font: inherit; }

.page-shell {
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
  padding: 52px 0 72px;
}

.hero {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 30px;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 58px;
  height: 58px;
  border-radius: 18px;
  background: #176b51;
  color: white;
  font-size: 28px;
  font-weight: 800;
  box-shadow: 0 12px 30px rgba(23, 107, 81, .22);
}

h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 10px; font-size: clamp(30px, 5vw, 44px); letter-spacing: -.04em; }
h2 { margin-bottom: 0; font-size: 22px; }

.eyebrow, .step-label {
  margin-bottom: 7px;
  color: #176b51;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.intro { margin-bottom: 0; color: #5d6b65; line-height: 1.75; }

.card {
  margin-top: 18px;
  padding: 24px;
  border: 1px solid rgba(29, 56, 47, .11);
  border-radius: 22px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 16px 45px rgba(55, 70, 63, .08);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
}

.status, .phase-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.status-waiting, .phase-chip { background: #eeeae0; color: #695f4b; }
.status-online { background: #dcf4e9; color: #126046; }
.status-error { background: #fbe2de; color: #9d352a; }

.device-details {
  min-height: 54px;
  padding: 16px;
  border-radius: 14px;
  background: #f4f7f5;
  color: #43514c;
  line-height: 1.5;
}

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

.button {
  min-height: 44px;
  padding: 10px 17px;
  border: 0;
  border-radius: 13px;
  cursor: pointer;
  font-weight: 750;
  transition: transform .15s ease, opacity .15s ease;
}

.button:not(:disabled):hover { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: .42; }
.button-primary { background: #176b51; color: white; }
.button-secondary { background: #e8ece9; color: #30443d; }
.button-wide { width: 100%; margin-top: 16px; }

.small-note { margin: 12px 0 0; color: #75817d; font-size: 13px; line-height: 1.5; }

.file-picker {
  display: block;
  padding: 22px;
  border: 1.5px dashed #8ba79d;
  border-radius: 16px;
  background: #f7faf8;
  cursor: pointer;
  text-align: center;
}

.file-picker-title, .file-picker-subtitle { display: block; }
.file-picker-title { font-weight: 780; }
.file-picker-subtitle { margin-top: 7px; color: #72807b; font-size: 13px; }
#file-input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }

.file-list { display: grid; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.file-list li { display: flex; justify-content: space-between; gap: 12px; padding: 11px 13px; border-radius: 11px; background: #f1f4f2; font-size: 14px; }
.file-list li span:first-child { overflow-wrap: anywhere; }
.file-list li span:last-child { flex: 0 0 auto; color: #77827e; }

.result-card { background: #1e2925; color: #edf4f1; }
.result-card .step-label { color: #7ed0b1; }
.result-log { margin-top: 16px; padding: 16px; border-radius: 14px; background: rgba(255,255,255,.07); color: #cdd9d4; line-height: 1.65; overflow-wrap: anywhere; }
.result-log[data-kind="success"] { color: #a7ebcf; }
.result-log[data-kind="error"] { color: #ffc0b7; }

@media (max-width: 600px) {
  .page-shell { width: min(100% - 22px, 760px); padding-top: 28px; }
  .hero { gap: 14px; }
  .brand-mark { flex-basis: 48px; height: 48px; border-radius: 15px; }
  .card { padding: 19px; border-radius: 18px; }
  .section-heading { align-items: flex-start; }
  .actions .button { width: 100%; }
}

