:root {
  --black: #16465a;
  --cyan: #009cc4;
  --cyan-dark: #087c9b;
  --lime: #7dbb3b;
  --ink: #173f50;
  --muted: #64747b;
  --line: #d1dde1;
  --canvas: #f3f8f9;
  --surface: #fff;
  --success: #2c9f76;
  --danger: #c43b3b;
  --shadow: 0 8px 18px rgba(0,0,0,.16);
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 13% 7%, rgba(125,187,59,.18), transparent 31rem),
    radial-gradient(circle at 84% 5%, rgba(0,156,196,.18), transparent 38rem),
    linear-gradient(180deg, #fbfdfd 0, #edf5f6 100%);
  font-family: Arial, Helvetica, sans-serif;
}
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible {
  outline: 3px solid rgba(16,189,231,.42);
  outline-offset: 2px;
}
.hidden { display: none !important; }

.topbar {
  min-height: 80px;
  display: grid;
  grid-template-columns: minmax(190px,1fr) auto auto;
  align-items: center;
  gap: 0;
  padding: 8px 28px;
  color: var(--black);
  background: #fff;
  border-bottom: 6px solid var(--cyan);
}
.brand { display: flex; align-items: center; }
.brand img {
  width: 132px;
  height: 92px;
  object-fit: contain;
  object-position: left center;
}
.space-name {
  align-self: center;
  display: flex;
  align-items: center;
  height: 42px;
  padding: 0 20px;
  color: #fff;
  background: var(--cyan-dark);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.ghost {
  justify-self: end;
  align-self: center;
  height: 42px;
  min-height: 42px;
  padding: 0 17px;
  color: var(--black);
  background: #fff;
  border: 2px solid var(--cyan-dark);
  border-radius: 0;
  font-weight: 850;
}

.workspace { width: min(1280px,100%); margin: auto; padding: 34px 28px 70px; }
.eyebrow {
  margin: 0 0 8px;
  color: #555a60;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .17em;
  text-transform: uppercase;
}
h1 {
  margin: 0;
  color: var(--black);
  font-size: clamp(38px,5vw,55px);
  line-height: .98;
  font-weight: 950;
  letter-spacing: -.05em;
}
h2 { margin: 0 0 18px; color: var(--black); font-size: 21px; }
.muted { color: var(--muted); line-height: 1.55; }

form { display: grid; gap: 13px; }
label {
  display: grid;
  gap: 7px;
  color: #30343a;
  font-size: 13px;
  font-weight: 850;
}
input {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  color: var(--black);
  border: 1px solid #b9bec2;
  border-radius: 0;
  background: #fafafa;
}
button, .install-links a {
  min-height: 50px;
  padding: 10px 16px;
  color: var(--black);
  border: 0;
  border-radius: 0;
  background: var(--lime);
  font-weight: 900;
  text-decoration: none;
  transition: filter .16s ease, transform .16s ease;
}
button:hover, .install-links a:hover { filter: brightness(.96); transform: translateY(-1px); }
button:disabled { cursor: wait; opacity: .58; transform: none; }

.login-card, .install-card {
  position: relative;
  width: min(620px,100%);
  margin: 68px auto;
  padding: 44px 48px 48px;
  border: 1px solid #d4d7d9;
  border-top: 11px solid var(--cyan);
  border-radius: 0;
  background: #fff;
  box-shadow: var(--shadow);
}
.login-card > .muted { margin: 23px 0; font-size: 16px; }
.login-card input { height: 60px; font-size: 16px; }
.login-card button { min-height: 60px; margin-top: 3px; font-size: 16px; }
.login-badge {
  position: absolute;
  right: -34px;
  top: 55px;
  padding: 8px 11px;
  color: var(--black);
  background: var(--lime);
  box-shadow: 3px 5px 8px rgba(0,0,0,.18);
  font-size: 15px;
  font-weight: 950;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.install-card .brand { margin-bottom: 24px; }
.install-card .brand img { width: 190px; height: 74px; }
.install-links { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }

.heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 25px;
}
.heading strong {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 10px;
  color: var(--black);
  background: var(--cyan);
  font-size: 19px;
}
.live {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 14px;
  color: var(--black);
  border: 2px solid var(--cyan-dark);
  background: #fff;
  font-weight: 800;
}
.live i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 5px rgba(44,159,118,.15);
}

.summary {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 15px;
  margin-bottom: 20px;
}
.summary article, .card, .scan-card, .info-card {
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  box-shadow: var(--shadow);
}
.summary article {
  display: grid;
  gap: 7px;
  min-height: 104px;
  padding: 21px;
  border-top: 8px solid var(--cyan);
}
.summary article:nth-child(2) { border-top-color: var(--lime); }
.summary small { color: var(--muted); font-weight: 750; }
.summary b { color: var(--black); font-size: 18px; }
.layout { display: grid; grid-template-columns: minmax(0,1fr) 350px; gap: 22px; }
.card, .scan-card, .info-card { padding: 25px; }
.progress-row { display: flex; justify-content: space-between; gap: 18px; font-size: 18px; }
.progress-row strong { color: var(--black); font-size: 28px; }
.progress {
  height: 13px;
  margin: 14px 0 30px;
  overflow: hidden;
  background: #dfe2e4;
}
.progress i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg,var(--cyan),var(--lime));
  transition: width .45s ease;
}
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 14px;
  min-height: 76px;
  border-top: 1px solid #e0e3e5;
}
.timeline li > div { display: grid; gap: 5px; }
.timeline small, .meta { color: var(--muted); font-size: 12px; }
.step-number {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--black);
  border: 2px solid var(--cyan-dark);
  background: #fff;
  font-weight: 950;
}
.validated .step-number { border-color: var(--cyan); background: var(--cyan); }
.meta { text-align: right; }
.scan-card { border-top: 10px solid var(--cyan); }
.info-card { border-top: 10px solid var(--lime); }
.camera {
  position: relative;
  height: 195px;
  margin-bottom: 14px;
  overflow: hidden;
  border: 3px solid var(--cyan-dark);
  background: #090a0b;
}
.camera video { width: 100%; height: 100%; object-fit: cover; }
.camera span {
  position: absolute;
  left: 9px; right: 9px; bottom: 9px;
  padding: 7px;
  color: #fff;
  background: rgba(0,0,0,.78);
  font-size: 11px;
  text-align: center;
}
.scan-card > button, .scan-card form button { width: 100%; margin-bottom: 13px; }
.scan-card form { margin-top: 14px; }
.secondary {
  color: var(--black) !important;
  border: 2px solid var(--cyan-dark) !important;
  background: #fff !important;
}
.notice { margin: 0 0 18px; padding: 14px 17px; font-weight: 800; }
.notice.ok { color: #075f48; border-left: 8px solid var(--success); background: #eaf8f3; }
.notice.error { color: #8f2929; border-left: 8px solid var(--danger); background: #fff0f0; }

body[data-space="client"] .topbar,
body[data-space="atelier"] .topbar { grid-template-columns: minmax(190px,1fr) auto auto; }
body[data-space="client"] #login { width: min(660px,100%); }
body[data-space="client"] #login h1 { max-width: 500px; font-size: clamp(48px,6vw,68px); }

@media (max-width: 850px) {
  .topbar { grid-template-columns: 1fr auto; padding: 7px 18px; }
  .brand img { width: 116px; height: 80px; }
  .space-name { font-size: 12px; padding: 9px 12px; }
  .ghost { grid-column: 1 / -1; width: 100%; min-height: 38px; margin-top: 7px; }
  .workspace { padding: 28px 18px 55px; }
  .summary, .layout { grid-template-columns: 1fr; }
  .heading { align-items: flex-start; flex-direction: column; }
  .live { width: 100%; }
}
@media (max-width: 560px) {
  .topbar { min-height: 70px; border-bottom-width: 5px; }
  .brand img { width: 98px; height: 68px; }
  .space-name { font-size: 10px; letter-spacing: .1em; }
  .workspace { padding-inline: 13px; }
  .login-card, .install-card { margin: 38px auto; padding: 36px 21px 32px; }
  .login-badge { right: 14px; top: 30px; font-size: 12px; }
  body[data-space="client"] #login h1 { max-width: 78%; font-size: 43px; }
  .summary { gap: 11px; }
  .card, .scan-card, .info-card { padding: 19px 14px; }
  .timeline li { grid-template-columns: 40px minmax(0,1fr); gap: 9px; }
  .meta { grid-column: 2; text-align: left; }
  .install-links { grid-template-columns: 1fr; }
}
