:root{
    --orange:  #f24735;
    --bg: #faf5f2;
    --muted: #777;
    --container-w: 22.5rem; /* ~360px */
  }

  /* Reset / base */
  * { box-sizing: border-box; }
  html, body { height: 100%; }
  body{
    margin: 0;
    font-family: "Roboto", sans-serif;
    background: #f7f7f7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 1.25rem;
    color: #222;
  }

  /* Page card centered (mobile width) */
  .page {
    width: 100%;
    max-width: var(--container-w);
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 6px 20px rgba(10,10,10,0.06);
    overflow: hidden;
    margin-top: 1rem;
  }

  /* Top area title */
  .page-header {
    padding: 1rem 1rem 0.6rem;
    text-align: center;
    border-bottom: 1px solid #eee;
  }
  .page-header h1 {
    font-size: 1.125rem;
    margin: 0;
    font-weight: 500;
  }

  /* ---------- SVG loader shared styling ---------- */
  /* Default loader SVG container */
  .circle-loader,
  .btn .btn-progress svg {
    display: block;
    width: 70px;
    height: 70px;
  }

  /* Circle stroke defaults (no progress shown until JS sets dashoffset) */
  .circle-loader circle,
  .btn .btn-progress svg circle {
    fill: none;
    stroke: var(--orange);
    stroke-width: 6;
    stroke-linecap: round;
    /* JS will set strokeDasharray/strokeDashoffset based on circumference */
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    transition: stroke-dashoffset linear;
  }

  /* Smaller button spinner sizing (overrides base) */
  .btn .btn-progress svg {
    width: 26px;
    height: 26px;
  }

  /* Larger overlay spinner */
  .full-overlay .circle-loader {
    width: 100px;
    height: 100px;
  }

  /* ---------- Overlay wrappers (initial + full) ---------- */
  .initial-overlay,
  .full-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255,255,255,0.85);
    z-index: 2000;
    transition: opacity 220ms ease;
    pointer-events: auto;
  }
  /* initial overlay hidden state uses opacity so fade works */
  .initial-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    /* keep in DOM (display:flex) so reflow/animation works reliably */
  }
  .initial-overlay:not(.hidden) {
    opacity: 1;
  }

  /* full overlay hidden/visible */
  .full-overlay {
    display: none;
    opacity: 0;
    pointer-events: none;
  }
  .full-overlay.active {
    display: flex;
    opacity: 1;
    pointer-events: auto;
  }

  /* ---------- Page content ---------- */
  .page-body { padding: 1rem; }

  /* Option toggles */
  .toggle-row {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1rem;
  }
  .toggle-btn {
    flex: 1;
    padding: 0.56rem 0.5rem;
    border-radius: 0.5rem;
    border: 1px solid #eee;
    background: #fff;
    font-weight: 500;
    cursor: pointer;
    font-size: 0.95rem;
  }
  .toggle-btn.active {
    background: linear-gradient(180deg, #fff 0%, #fff 50%);
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04) inset;
    color: var(--orange);
  }

  /* Forms */
  form { display: block; }
  .field { margin-bottom: 0.75rem; }
  label {
    display: block;
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 0.3rem;
  }

  .input-row { display:flex; gap:0.5rem; }
  input[type="text"], input[type="tel"], input[type="password"] {
    width:100%;
    padding:0.72rem 0.6rem;
    border-radius:0.38rem;
    border:1px solid #e6e6e6;
    font-size:1rem;
    outline:none;
    background:#fff;
  }
  .prefix {
    min-width:3.25rem;
    display:flex;
    align-items:center;
    justify-content:center;
    border:1px solid #e6e6e6;
    border-radius:0.38rem;
    background:#f8f8f8;
    color:var(--muted);
    font-weight:500;
  }

  /* ---------- Buttons & small loader inside button ---------- */
  .btn {
    position: relative;
    display: inline-block;
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.4rem;
    background: #007BFF;
    color: #fff;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    overflow: hidden;
  }
  .btn.disabled {
    background: #cfcfcf;
    cursor: default;
    color: #666;
  }

  /* container inside button where small SVG sits */
  .btn .btn-progress {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 26px;
    height: 26px;
    display: none; /* shown only when .loading */
    z-index: 3;
  }

  /* show loader when button has .loading */
  .btn.loading .btn-progress { display: block; }

  /* dim text while loading */
  .btn.loading > span { opacity: 0.36; }

  /* ensure button text sits above loader if needed */
  .btn span, .btn { position: relative; z-index: 2; }

  /* ---------- Notes / helper text ---------- */
  .note {
    margin-top: 0.8rem;
    font-size: 0.78rem;
    color: var(--muted);
    text-align: center;
  }

  /* ---------- Full-overlay fallback/progress area (kept for compatibility) ---------- */
  .full-progress { display:none; } /* unused but kept to avoid layout shifts */

  /* ---------- Error text ---------- */
  .error {
    font-size:0.85rem;
    color:#c64b4b;
    margin-top:0.35rem;
  }

  /* utility for two-column inputs on card form */
  .two-col { display:flex; gap:0.5rem; }
  .two-col > * { flex:1; }

  /* ---------- Responsive desktop appearance ---------- */
  @media (min-width: 600px){
    body { align-items: center; }
    .page { margin-top: 0; box-shadow: 0 10px 30px rgba(0,0,0,0.06); }
  }