/* BRC brand palette — mirrors brcShared/ui/theme (BrcRed 0xFF9C1F1B, BrcGreen 0xFF38B84E). */
:root {
  --brc-red: #9C1F1B;
  --brc-green: #38B84E;
  --brc-black: #333333;
  --line: #cccccc;
  --bg: #faf7f7;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  background: var(--bg);
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--brc-black);
}

.maker { text-align: center; }
.maker a {
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #A79893;
  text-decoration: none;
}
.maker a:hover, .maker a:focus-visible { color: var(--brc-red); text-decoration: underline; }

.card {
  width: min(420px, 92vw);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .08);
  overflow: hidden;
  padding-bottom: 28px;
}

.brand {
  background: var(--brc-red);
  color: #fff;
  text-align: center;
  padding: 22px 16px;
  border-radius: 0 0 40px 40px;
  margin-bottom: 22px;
}

.brand-roundel {
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 58px;
  background: #fff;
  border-radius: 50%;
  margin-bottom: 8px;
}
.brand-roundel img { width: 40px; height: 40px; }

.brand-mark {
  font-weight: 900;
  letter-spacing: 3px;
  font-size: 22px;
}

.brand h1 { font-size: 13px; font-weight: 400; margin: 6px 0 0; opacity: .9; }

.step { padding: 0 26px; text-align: center; }
.step h2 { font-size: 18px; margin: 0 0 4px; }
.hint { font-size: 12px; color: #777; margin: 0 0 18px; }

.phone-row { display: flex; gap: 8px; }

.country-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 48px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
}
.country-chip .flag { font-size: 18px; }
.country-chip .dial { font-weight: 600; }
.country-chip .caret { color: #999; font-size: 11px; }

.phone-field {
  flex: 1;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  font-size: 15px;
  outline: none;
}
.phone-field:focus { border-color: var(--brc-red); }

.cta {
  margin-top: 18px;
  width: 200px;
  height: 42px;
  border: 0;
  border-radius: 24px;
  background: var(--brc-green);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.cta:disabled { opacity: .45; cursor: default; }

.link-btn {
  display: block;
  margin: 10px auto 0;
  background: none;
  border: 0;
  color: var(--brc-red);
  font-size: 12px;
  cursor: pointer;
}

.otp-row { display: flex; justify-content: center; gap: 8px; margin: 6px 0 4px; }
.otp {
  width: 38px;
  height: 46px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  border: 0;
  border-radius: 8px;
  background: #e0d7d7;
  outline: none;
}
.otp:focus { box-shadow: 0 0 0 2px var(--brc-red); }

.error { color: var(--brc-red); font-size: 12px; margin: 10px 0 0; }

dialog {
  width: min(380px, 92vw);
  max-height: 70vh;
  border: 0;
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
  display: none;
  flex-direction: column;
}
dialog[open] { display: flex; }
dialog::backdrop { background: rgba(0, 0, 0, .35); }

.dialog-head {
  background: var(--brc-red);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 16px;
}

#country-search {
  margin: 10px 12px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  font-size: 13px;
  outline: none;
}
#country-search:focus { border-color: var(--brc-red); }

#country-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
}
#country-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  font-size: 14px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
}
#country-list li:hover, #country-list li.selected { background: #fbeaea; }
#country-list .dial { margin-left: auto; color: #888; font-size: 13px; font-weight: 600; }
#country-list li.selected .dial { color: var(--brc-red); }
