:root {
  --brand: #0073bc;
  --brand-dark: #0361b1;
  --brand-deep: #126cb5;
  --ink: #1a2333;
  --text: #2c3a4d;
  --muted: #8a94a6;
  --border: #e6e9f0;
  --card-bg: #f7f8fb;
  --tile-bg: #ffffff;
  --icon-bg: #dbe8f8;
  --error: #d93025;
  --success: #137333;
  --success-bg: #e6f4ea;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "Anuphan", "Segoe UI", sans-serif;
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(60rem 40rem at 15% 0%, #dce9f7 0%, transparent 55%),
    radial-gradient(50rem 35rem at 100% 20%, #f6e7e9 0%, transparent 50%),
    radial-gradient(45rem 40rem at 30% 100%, #e3eefa 0%, transparent 55%),
    #f4f6fa;
}

.container {
  flex: 1;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 48px 20px 56px;
}

/* Hero */
.hero { text-align: center; margin-bottom: 34px; }
.hero-logo { height: 120px; margin-bottom: 24px; mix-blend-mode: multiply; }

/* Language toggle */
.lang-toggle {
  position: fixed;
  top: 18px;
  right: 20px;
  z-index: 10;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
  display: flex;
  gap: 2px;
  box-shadow: 0 2px 10px #1a41750d;
}
.lang-toggle button {
  border: none;
  background: transparent;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  color: #aab3c2;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.lang-toggle button.active {
  background: var(--brand);
  color: #fff;
}
.hero-icon {
  width: 74px;
  height: 74px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: var(--icon-bg);
  color: var(--brand-deep);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
}
.hero-sub { font-size: 1.05rem; color: #6b7688; }

/* Card */
.card {
  background: var(--card-bg);
  border-radius: 24px;
  box-shadow: 0 10px 40px #1a417508;
  padding: 36px 32px;
}

h1 { font-size: 1.4rem; color: var(--ink); }
.subtitle { color: var(--muted); font-size: 0.92rem; margin-bottom: 24px; }

.field { margin-bottom: 26px; }
.field > label {
  display: block;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 12px;
  font-size: 1rem;
}
.req { color: var(--error); }
.hint-inline { font-weight: 400; color: var(--muted); font-size: 0.85rem; }

input[type="tel"], .other-input {
  width: 100%;
  padding: 15px 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--tile-bg);
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
input::placeholder { color: #aab3c2; }
input[type="tel"]:focus, .other-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px #0073bc14;
}
.hint { font-size: 0.8rem; color: var(--muted); margin-top: 8px; }

/* Option tiles */
.option-group { display: grid; gap: 12px; }
.option {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--tile-bg);
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 15px 18px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  font-size: 0.98rem;
  box-shadow: 0 2px 10px #1a417506;
}
.option:hover { border-color: #b9d4ee; }
.option input {
  accent-color: var(--brand);
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}
.option.selected {
  border-color: var(--brand);
  background: #eaf2fb;
  font-weight: 600;
  color: var(--brand-deep);
  box-shadow: 0 2px 12px #0073bc1a;
}

.other-input { margin-top: 12px; }

.sub-field { margin-top: 14px; }
.sub-field > label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--brand-deep);
  margin-bottom: 8px;
}

/* Buttons */
.btn-primary, .btn-secondary {
  display: block;
  width: 100%;
  padding: 17px;
  border: none;
  border-radius: 999px;
  font: inherit;
  font-size: 1.08rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s, transform 0.05s, box-shadow 0.15s;
}
.btn-primary {
  background: linear-gradient(100deg, #a9c9ec, #6fa6dc 60%, #5c98d4);
  color: #fff;
  box-shadow: 0 8px 24px #5c98d440;
  margin-top: 6px;
}
.btn-primary:hover { filter: brightness(1.05); box-shadow: 0 10px 28px #5c98d45c; }
.btn-primary:active { transform: scale(0.99); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-secondary {
  background: transparent;
  color: var(--brand-dark);
  border: 1.5px solid var(--brand-dark);
  margin-top: 22px;
}
.btn-secondary:hover { background: #eaf2fb; }

/* Consent */
.consent-box {
  background: var(--tile-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
}
.consent-title { font-weight: 700; color: var(--brand-deep); margin-bottom: 6px; }
.consent-text { font-size: 0.85rem; color: var(--muted); margin-bottom: 14px; }
.consent-option { background: #fbfcfe; border-color: var(--border); box-shadow: none; }

/* Messages */
.error {
  background: #fdecea;
  color: var(--error);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 0.9rem;
  margin-bottom: 18px;
}
.info {
  background: var(--success-bg);
  color: var(--success);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 0.9rem;
  margin-bottom: 18px;
}

/* Success */
.success { text-align: center; padding-top: 44px; padding-bottom: 44px; }
.success-icon {
  width: 74px;
  height: 74px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: var(--success-bg);
  color: var(--success);
  font-size: 2.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.success .btn-secondary { max-width: 340px; margin-left: auto; margin-right: auto; }

.footer {
  text-align: center;
  color: #a3acbb;
  font-size: 0.8rem;
  padding: 22px;
}

.hidden { display: none !important; }

/* Legacy topbar (admin page) */
.topbar {
  background: linear-gradient(90deg, var(--brand-dark), var(--brand));
  color: #fff;
  box-shadow: 0 2px 8px #0000001a;
}
.topbar-inner {
  max-width: 680px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-badge {
  background: #fff;
  border-radius: 8px;
  padding: 3px 8px;
  display: inline-flex;
  align-items: center;
}
.logo-badge img { height: 26px; display: block; }
.brand-mark { font-size: 1.15rem; font-weight: 700; letter-spacing: 0.02em; }
.brand-sub { font-size: 0.85rem; opacity: 0.85; }

select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font: inherit;
  background: #fff;
}

@media (max-width: 520px) {
  .container { padding-top: 32px; }
  .card { padding: 26px 18px; border-radius: 20px; }
  .hero-title { font-size: 1.55rem; }
  .hero-logo { height: 56px; margin-bottom: 20px; }
}
