/* register.css — KAHE GROUP INDONESIA public registration shell (P01–P04, Emergency Registration V0).
   Visual reference: KAHE_TALENT_WORKER_V1_MOCKUP_MASTER P01–P04. The mockup's photographic background is not
   shipped (no approved hero asset was supplied, and nothing is cropped from screenshots): the stage uses the
   brand navy gradient until a hero image is approved. */
:root {
  --rg-navy: #0a2463;
  --rg-navy-2: #061c4e;
  --rg-blue: #1152d6;
  --rg-blue-2: #0b3fb3;
  --rg-cyan: #5ad1f0;
  --rg-gold: #f2c14e;
  --rg-ink: #10204a;
  --rg-muted: #5b6b86;
  --rg-line: #d9e3f2;
  --rg-soft: #eef4ff;
  --rg-red: #c62828;
  --rg-green: #1fa855;
  --rg-font: "Segoe UI", "Nunito Sans", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body.rg { font-family: var(--rg-font); color: var(--rg-ink); font-size: 15px; line-height: 1.5; min-height: 100vh; display: flex; flex-direction: column;
  background: radial-gradient(120% 90% at 30% 30%, #1c4fa8 0%, #0d2f78 45%, var(--rg-navy-2) 100%); }
:focus-visible { outline: 3px solid #7aa7ff; outline-offset: 2px; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* top bar */
.rg-top { display: flex; align-items: center; gap: 24px; padding: 10px 40px; background: #fff; box-shadow: 0 2px 10px rgba(6, 28, 78, 0.12); }
.rg-brand { line-height: 0; margin-right: auto; }
.rg-brand img { display: block; height: 60px; width: auto; max-width: 100%; }
.rg-motto { margin: 0; color: var(--rg-navy); font-style: italic; font-family: "Brush Script MT", "Segoe Script", cursive; font-size: 1.35rem; white-space: nowrap; }
.rg-lang { display: flex; align-items: center; gap: 8px; color: var(--rg-navy); }
.rg-lang button { border: 0; background: none; font: inherit; font-weight: 700; color: var(--rg-muted); cursor: pointer; padding: 4px 2px; }
.rg-lang button[aria-pressed="true"] { color: var(--rg-navy); }

/* stage */
.rg-stage { flex: 1; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.15fr); gap: 40px; align-items: start; padding: 36px 40px 40px; max-width: 1760px; width: 100%; margin: 0 auto; }
.rg-pitch { color: #fff; padding-top: 20px; }
.rg-pitch h1 { margin: 0; font-size: clamp(1.9rem, 3vw, 2.9rem); line-height: 1.15; font-weight: 800; }
.rg-pitch h1 span { display: block; }
.rg-gold { color: var(--rg-gold); }
.rg-pitch-sub { margin: 14px 0 12px; font-size: 1.35rem; }
.rg-pitch-body { margin: 0 0 26px; max-width: 34em; color: #dce7ff; font-size: 1.05rem; }
.rg-features { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.rg-features li { display: flex; align-items: center; gap: 16px; font-size: 1rem; }
.rg-ficon { width: 50px; height: 50px; border-radius: 50%; border: 2px solid var(--rg-cyan); display: grid; place-items: center; color: #fff; flex: none; background: rgba(90, 209, 240, 0.12); }
.rg-quote { margin: 30px 0 0; font-family: "Brush Script MT", "Segoe Script", cursive; font-size: 1.7rem; line-height: 1.2; }

/* card */
.rg-card { background: rgba(255, 255, 255, 0.97); border-radius: 16px; padding: 24px 24px 20px; box-shadow: 0 18px 40px rgba(3, 14, 40, 0.35); }
.rg-card-head { display: flex; align-items: center; gap: 16px; margin-bottom: 10px; }
.rg-card-head h2 { margin: 0; color: var(--rg-navy); font-size: 1.5rem; }
.rg-card-head p { margin: 2px 0 0; color: var(--rg-muted); }
.rg-card-icon { width: 50px; height: 50px; border-radius: 12px; background: var(--rg-soft); color: var(--rg-blue); display: grid; place-items: center; flex: none; }
.rg-card-icon svg { width: 28px; height: 28px; }

.rg-stepper { list-style: none; margin: 8px 0 16px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); position: relative; }
.rg-stepper li { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--rg-muted); font-size: 0.9rem; position: relative; text-align: center; }
.rg-stepper li + li::before { content: ""; position: absolute; top: 18px; right: 50%; width: 100%; height: 2px; background: var(--rg-line); z-index: 0; }
.rg-stepper li.is-done + li::before, .rg-stepper li.is-current::before { background: var(--rg-blue); }
.rg-dot { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #e8eef9; color: var(--rg-navy); font-weight: 700; position: relative; z-index: 1; }
.rg-stepper li.is-current .rg-dot, .rg-stepper li.is-done .rg-dot { background: var(--rg-blue); color: #fff; }
.rg-stepper li.is-current { color: var(--rg-navy); font-weight: 700; }

.rg-step { border: 1px solid var(--rg-line); border-radius: 12px; margin: 0; padding: 0; min-width: 0; }
.rg-sec { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 18px; background: var(--rg-soft); border-radius: 12px 12px 0 0; float: left; }
.rg-sec strong { display: block; color: var(--rg-navy); font-size: 1.1rem; }
.rg-sec small { color: var(--rg-muted); }
.rg-sec-icon { color: var(--rg-navy); }
.rg-grid { clear: both; display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; padding: 16px 18px 6px; }
.rg-col { display: grid; align-content: start; gap: 12px; min-width: 0; }
.rg-grid .rg-col + .rg-col { border-left: 1px solid var(--rg-line); padding-left: 24px; }
.rg-field { display: grid; gap: 6px; font-size: 0.92rem; color: var(--rg-navy); font-weight: 600; min-width: 0; }
.rg-field b { color: var(--rg-red); }
.rg-field i, .rg-hint { font-style: normal; font-weight: 400; color: var(--rg-muted); font-size: 0.85rem; }
.rg-field input:not([type=radio]):not([type=checkbox]):not([type=file]), .rg-field select, #rgLocInput {
  width: 100%; min-height: 42px; padding: 8px 12px; border: 1px solid var(--rg-line); border-radius: 8px; background: #f7faff; font: inherit; font-weight: 400; color: var(--rg-ink); }
.rg-field input:focus, .rg-field select:focus { border-color: var(--rg-blue); background: #fff; }
.rg-field.has-error input, .rg-field.has-error select { border-color: var(--rg-red); }
.rg-err { color: var(--rg-red); font-style: normal; font-weight: 500; font-size: 0.82rem; min-height: 0; }
.rg-err:empty { display: none; }
.rg-phone { display: grid; grid-template-columns: 92px 1fr; gap: 8px; }
.rg-radios { display: flex; flex-wrap: wrap; gap: 8px 20px; font-weight: 400; color: var(--rg-ink); }
.rg-radios label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.rg-radios input { width: 18px; height: 18px; accent-color: var(--rg-blue); }
.rg-exp { display: grid; gap: 12px; }
.rg-exp[hidden] { display: none; }
.rg-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rg-chip { border: 1px solid #c9d8f3; background: #eef3fc; color: var(--rg-navy); border-radius: 8px; padding: 7px 12px; font: inherit; font-size: 0.88rem; cursor: pointer; }
.rg-chip[aria-pressed="true"] { background: var(--rg-blue); border-color: var(--rg-blue); color: #fff; }
.rg-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.rg-tag { display: inline-flex; align-items: center; gap: 6px; background: var(--rg-soft); border: 1px solid #c9d8f3; border-radius: 999px; padding: 3px 4px 3px 10px; font-weight: 400; font-size: 0.85rem; }
.rg-tag button { border: 0; background: none; cursor: pointer; font-size: 1rem; line-height: 1; color: var(--rg-muted); padding: 0 4px; }
.rg-note { display: grid; gap: 2px; padding: 10px 12px 10px 40px; border-radius: 8px; font-size: 0.85rem; color: var(--rg-ink); position: relative; }
.rg-note strong { color: var(--rg-navy); }
.rg-note::before { position: absolute; left: 12px; top: 10px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 0.8rem; }
.rg-info { background: #e8f1ff; }
.rg-info::before { content: "i"; background: var(--rg-blue); color: #fff; }
.rg-star { background: #f3f6fb; }
.rg-star::before { content: "★"; color: var(--rg-gold); font-size: 1.1rem; }
.rg-note-sm { padding-top: 8px; padding-bottom: 8px; }
.rg-drop { display: grid; justify-items: center; gap: 4px; padding: 18px 12px; border: 2px dashed #b9cbe9; border-radius: 10px; background: #f7faff; text-align: center; cursor: pointer; color: var(--rg-navy); font-weight: 500; }
.rg-drop:hover, .rg-drop:focus-within { border-color: var(--rg-blue); }
.rg-drop small { color: var(--rg-muted); font-weight: 400; }
.rg-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.rg-file-list { font-size: 0.82rem; color: var(--rg-blue); word-break: break-all; }
.rg-consent { display: grid; grid-template-columns: 20px 1fr; gap: 10px; font-size: 0.85rem; color: var(--rg-ink); cursor: pointer; }
.rg-consent input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--rg-blue); }
.rg-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.rg-alert { margin: 0 0 12px; padding: 10px 14px; border-radius: 8px; background: #fdecec; color: var(--rg-red); font-weight: 600; }
.rg-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; }
.rg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 10px 22px; border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer; border: 1px solid transparent; }
.rg-btn svg { width: 20px; height: 20px; }
.rg-btn-ghost { background: #e8eef9; color: var(--rg-navy); }
.rg-btn-primary { background: linear-gradient(180deg, var(--rg-blue), var(--rg-blue-2)); color: #fff; }
.rg-btn:disabled { opacity: 0.6; cursor: progress; }

/* P04 */
.rg-success { text-align: center; padding: 12px 8px; }
.rg-check { width: 88px; height: 88px; border-radius: 50%; background: var(--rg-green); color: #fff; display: inline-grid; place-items: center; box-shadow: 0 0 0 8px rgba(31, 168, 85, 0.15); }
.rg-check svg { width: 50px; height: 50px; stroke-width: 3; }
.rg-success h2 { margin: 18px 0 6px; color: var(--rg-navy); font-size: 1.9rem; outline: none; }
.rg-success-sub { margin: 0 0 20px; color: var(--rg-navy); font-size: 1.05rem; }
.rg-success-sub strong { display: block; }
.rg-receipt { display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; text-align: left; margin: 0 0 16px; padding: 18px 24px; border: 1px solid var(--rg-line); border-radius: 12px; background: #f7faff; }
.rg-receipt dt { color: var(--rg-muted); }
.rg-receipt dd { margin: 0; color: var(--rg-ink); font-weight: 600; }
.rg-reg-id { color: var(--rg-blue) !important; font-weight: 800 !important; letter-spacing: 0.02em; }
.rg-status { display: inline-block; padding: 4px 12px; border-radius: 999px; background: #dfe9ff; color: var(--rg-blue-2); font-size: 0.85rem; font-weight: 700; }
.rg-success .rg-note { text-align: left; }
.rg-success .rg-actions .rg-btn { flex: 1; }

.rg-foot { background: var(--rg-navy-2); color: #fff; text-align: right; padding: 14px 40px; }
.rg-foot p { margin: 0; font-family: "Brush Script MT", "Segoe Script", cursive; font-size: 1.35rem; }

@media (min-width: 2200px) { body.rg { font-size: 17px; } .rg-brand img { height: 72px; } }
@media (max-width: 1280px) { .rg-stage { grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr); gap: 28px; padding: 28px 24px; } .rg-motto { display: none; } }
@media (max-width: 1024px) {
  .rg-stage { grid-template-columns: 1fr; }
  .rg-pitch { padding-top: 0; }
  .rg-pitch-body, .rg-features, .rg-quote { display: none; }
}
@media (max-width: 720px) {
  .rg-top { padding: 8px 14px; }
  .rg-brand img { height: 40px; }
  .rg-stage { padding: 16px 12px 24px; }
  .rg-card { padding: 16px 12px; }
  .rg-grid { grid-template-columns: 1fr; padding: 12px; }
  .rg-grid .rg-col + .rg-col { border-left: 0; padding-left: 0; margin-top: 12px; }
  .rg-stepper li { font-size: 0.78rem; }
  .rg-actions { flex-direction: column-reverse; }
  .rg-receipt { grid-template-columns: 1fr; gap: 2px; }
  .rg-receipt dd { margin-bottom: 8px; }
  .rg-foot { text-align: center; padding: 10px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* ===== Responsive QA patch (Emergency Registration V0, 2026-09-22) ===========================================
   Layout/touch only — no content, field or behaviour change. Desktop (> 1024 px wide, not a short phone landscape)
   is untouched. */

/* Tablet and phone: touch targets ≥ 44 px (WCAG 2.5.5 / platform guidance). */
@media (max-width: 1024px), (pointer: coarse) {
  .rg-lang button { min-width: 44px; min-height: 44px; padding: 0 6px; }
  .rg-field input:not([type=radio]):not([type=checkbox]):not([type=file]), .rg-field select, #rgLocInput { min-height: 44px; }
  .rg-radios { gap: 0 16px; }
  .rg-radios label { min-height: 44px; padding-right: 4px; }
  .rg-chip { min-height: 44px; min-width: 44px; padding: 8px 14px; }
  .rg-tag { padding-top: 0; padding-bottom: 0; }
  .rg-tag button { min-width: 44px; min-height: 44px; font-size: 1.2rem; }
  .rg-consent { min-height: 44px; align-items: start; padding: 6px 0; }
  .rg-consent input { width: 22px; height: 22px; }
  .rg-radios input { width: 20px; height: 20px; }
  .rg-btn { min-height: 48px; }
}

/* Phone portrait AND phone landscape (short viewport): mobile-first single column, compact hero. */
@media (max-width: 720px), (max-height: 500px) and (max-width: 1000px) {
  body.rg { font-size: 15px; }
  .rg-top { padding: 6px 12px; gap: 8px; }
  .rg-brand img { height: 40px; }
  .rg-motto { display: none; }
  .rg-stage { grid-template-columns: 1fr; gap: 12px; padding: 12px 12px 20px; }
  .rg-pitch { padding-top: 0; }
  .rg-pitch h1 { font-size: 1.3rem; line-height: 1.2; }
  .rg-pitch-sub { margin: 6px 0 0; font-size: 0.95rem; color: #dce7ff; }
  .rg-pitch-body, .rg-features, .rg-quote { display: none; }
  .rg-card { padding: 14px 12px 16px; border-radius: 14px; }
  .rg-card-head { gap: 12px; margin-bottom: 6px; }
  .rg-card-head h2 { font-size: 1.15rem; line-height: 1.25; }
  .rg-card-head p { font-size: 0.88rem; }
  .rg-card-icon { width: 40px; height: 40px; }
  .rg-stepper { margin: 6px 0 12px; }
  .rg-stepper li { font-size: 0.78rem; line-height: 1.25; padding: 0 2px; }
  .rg-sec { padding: 10px 12px; gap: 10px; }
  .rg-sec strong { font-size: 1rem; }
  .rg-grid { grid-template-columns: 1fr; padding: 12px; }
  .rg-grid .rg-col + .rg-col { border-left: 0; padding-left: 0; margin-top: 12px; }
  /* 16 px form text: mobile browsers do not auto-zoom the page when a field gets focus */
  .rg-field input:not([type=radio]):not([type=checkbox]):not([type=file]), .rg-field select, #rgLocInput { font-size: 16px; }
  .rg-phone { grid-template-columns: 88px minmax(0, 1fr); }
  .rg-drop { padding: 14px 10px; }
  .rg-status { border-radius: 10px; line-height: 1.35; }
  .rg-file-list { overflow-wrap: anywhere; }
  .rg-actions { flex-direction: column-reverse; gap: 10px; }
  .rg-actions .rg-btn { width: 100%; }
  .rg-receipt { grid-template-columns: 1fr; gap: 2px; padding: 14px 16px; }
  .rg-receipt dd { margin-bottom: 8px; overflow-wrap: anywhere; }
  .rg-reg-id { font-size: 1.15rem; user-select: all; }
  .rg-check { width: 72px; height: 72px; }
  .rg-check svg { width: 40px; height: 40px; }
  .rg-success h2 { font-size: 1.45rem; }
  .rg-foot { text-align: center; padding: 10px; }
  .rg-foot p { font-size: 1.15rem; }
}

/* Very narrow phones (≤ 360 px): keep the stepper and phone field readable. */
@media (max-width: 360px) {
  .rg-pitch h1 { font-size: 1.15rem; }
  .rg-stepper li { font-size: 0.74rem; }
  .rg-phone { grid-template-columns: 80px minmax(0, 1fr); }
  .rg-card-icon { display: none; }
}

/* Phone landscape: the hero shrinks to its two title lines so the form starts in the first screen. */
@media (max-height: 500px) and (max-width: 1000px) {
  .rg-pitch h1 span { display: inline; }
  .rg-pitch h1 .rg-gold::before { content: " "; }
  .rg-pitch-sub { display: none; }
}

/* The visually hidden native file input stays inside its drop zone (never positioned against the page). */
.rg-drop { position: relative; }
