/* DISTEO Assist client portal. Plain CSS, no framework: fast and readable on old PCs and small screens. */
* { box-sizing: border-box; }
html { font-size: 18px; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  color: var(--disteo-text);
  background: var(--disteo-bg);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img, svg { max-width: 100%; }
a { color: var(--disteo-navy); font-weight: 600; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--disteo-red); outline-offset: 3px; }

/* ---------- Top bar ---------- */
.topbar { background: var(--disteo-surface); border-bottom: 4px solid var(--disteo-navy); }
.topbar-inner { max-width: 1040px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { height: 56px; width: auto; display: block; }
.topbar-title { color: var(--disteo-navy); font-weight: 600; font-size: 1rem; }

/* ---------- Hero ---------- */
.page { flex: 1; width: 100%; max-width: 1040px; margin: 0 auto; padding: 32px 20px 24px; }
.hero { max-width: 620px; margin: 0 auto; text-align: center; }
.reassure {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 16px;
  padding: 8px 16px; border-radius: 999px; background: #e8ebf5; color: var(--disteo-navy); font-weight: 600; font-size: .95rem;
}
.dot { width: 10px; height: 10px; border-radius: 50%; background: #2e9e5b; box-shadow: 0 0 0 4px rgba(46, 158, 91, .2); }
h1 { color: var(--disteo-navy); font-size: 1.9rem; line-height: 1.2; margin: 0 0 8px; }
.lead { margin: 0 0 24px; color: var(--disteo-grey-dark); }

.card {
  background: var(--disteo-surface); border-radius: 16px; padding: 28px 24px;
  box-shadow: 0 1px 2px rgba(31, 36, 51, .06), 0 8px 24px rgba(40, 53, 103, .10);
  text-align: left;
}

/* ---------- Code form ---------- */
.code-label { display: block; font-weight: 700; color: var(--disteo-navy); margin-bottom: 8px; text-align: center; }
.code-input {
  display: block; width: 100%; max-width: 360px; margin: 0 auto;
  font-family: Consolas, "Courier New", monospace; font-size: 2.6rem; font-weight: 700; letter-spacing: .25em; text-align: center;
  color: var(--disteo-navy); padding: 12px 8px 12px calc(8px + .25em);
  border: 3px solid var(--disteo-grey-light); border-radius: 12px; background: #fff;
}
.code-input::placeholder { color: #c9ccd6; }
.code-input:focus { border-color: var(--disteo-navy); outline: none; box-shadow: 0 0 0 4px rgba(40, 53, 103, .18); }
.code-input[aria-invalid="true"] { border-color: var(--disteo-red); }
.hint { text-align: center; color: var(--disteo-grey-dark); font-size: .9rem; margin: 10px 0 0; }
.error {
  margin: 16px 0 0; padding: 12px 14px; border-radius: 10px; background: #fbeaea; color: var(--disteo-red-dark);
  border-left: 5px solid var(--disteo-red); font-weight: 600;
}
.btn-primary {
  display: block; width: 100%; margin-top: 22px; padding: 16px 20px; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--disteo-navy); color: #fff; font-size: 1.2rem; font-weight: 700; font-family: inherit;
  transition: background .15s ease, transform .05s ease;
}
.btn-primary:hover { background: var(--disteo-navy-dark); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary[disabled] { opacity: .7; cursor: progress; }
.btn-primary .spinner {
  display: inline-block; width: 18px; height: 18px; margin-right: 10px; vertical-align: -3px;
  border: 3px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Download card ---------- */
.download-card { text-align: left; }
.download-card:focus { outline: none; }
.success-mark { color: #2e9e5b; text-align: center; }
.download-card h2 { text-align: center; color: var(--disteo-navy); margin: 8px 0 4px; }
.download-card > p { text-align: center; }
.next-steps { padding-left: 1.4em; margin: 20px 0; }
.next-steps li { margin-bottom: 12px; }
.small { font-size: .9rem; }
.muted { color: var(--disteo-grey-dark); }

/* ---------- 3 steps ---------- */
.steps { margin-top: 48px; }
.steps-title { text-align: center; color: var(--disteo-navy); font-size: 1.3rem; margin: 0 0 20px; }
.steps-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { position: relative; background: var(--disteo-surface); border-radius: 14px; padding: 20px 18px 18px; text-align: center; border-top: 4px solid var(--disteo-navy); }
.step:nth-child(2) { border-top-color: var(--disteo-grey); }
.step:nth-child(3) { border-top-color: var(--disteo-red); }
.step-illu { width: 120px; height: 80px; display: block; margin: 0 auto 8px; }
.step-num {
  position: absolute; top: -18px; left: 50%; transform: translateX(-50%);
  width: 34px; height: 34px; line-height: 34px; border-radius: 50%; background: var(--disteo-navy); color: #fff; font-weight: 700;
}
.step h3 { margin: 4px 0 6px; color: var(--disteo-navy); font-size: 1.05rem; }
.step p { margin: 0; color: var(--disteo-grey-dark); font-size: .92rem; }

/* ---------- Footer ---------- */
.footer { text-align: center; color: var(--disteo-grey-dark); font-size: .85rem; padding: 16px 20px 24px; }
.footer p { max-width: 720px; margin: 0 auto; }
.error-static { margin-top: 24px; color: var(--disteo-red-dark); font-weight: 600; }

/* ---------- Small screens ---------- */
@media (max-width: 720px) {
  html { font-size: 17px; }
  .steps-list { grid-template-columns: 1fr; gap: 28px; }
  .topbar-title { display: none; }
  .logo { height: 46px; }
  h1 { font-size: 1.5rem; }
  .code-input { font-size: 2.1rem; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
