:root {
  color-scheme: dark;
  --blue: #1682ff;
  --blue-dark: #070b12;
  --teal: #35b4ff;
  --teal-dark: #1682ff;
  --ink: #eef5ff;
  --muted: #8292a6;
  --line: #243143;
  --surface: #0d1521;
  --soft: #0a111b;
  --background: #070b12;
  --danger: #ff717b;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--background); color: var(--ink); font-family: Inter, "Segoe UI", Arial, sans-serif; font-size: 17px; line-height: 1.65; }
button, input, select, textarea { font: inherit; }
a { color: var(--blue); }
[hidden] { display: none !important; }

.site-header { height: 80px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(24px, calc((100vw - 1180px) / 2)); background: rgba(7,11,18,.96); border-bottom: 1px solid var(--line); }
.brand { color: var(--blue); text-decoration: none; line-height: 1; }
.brand span { display: block; font-size: 27px; font-weight: 850; letter-spacing: -1px; }
.brand small { display: block; margin-top: 5px; color: var(--blue-dark); font-size: 11px; letter-spacing: 1.5px; }
.header-contact { color: var(--ink); font-size: 16px; font-weight: 700; text-decoration: none; }
.service-brand { position: relative; width: 154px; height: 50px; overflow: hidden; }
.service-brand img { position: absolute; width: 100%; height: auto; max-width: none; top: 50%; left: 50%; transform: translate(-50%,-50%) scale(.98); }
.service-header-actions, .service-language { display: flex; align-items: center; gap: 17px; }
.header-home { color: var(--muted); font-size: 14px; font-weight: 700; text-decoration: none; }
.service-language { gap: 5px; color: #56667a; font-size: 13px; font-weight: 850; }
.service-language button { padding: 5px 2px; color: #68788d; background: transparent; border: 0; cursor: pointer; }
.service-language button.active { color: white; }

.hero { padding: 52px 24px 44px; color: white; text-align: center; background: radial-gradient(circle at 50% 0%, rgba(22,130,255,.18), transparent 55%), #090f18; border-bottom: 1px solid var(--line); }
.eyebrow, .step-label { color: #bce8e7; font-size: 14px; font-weight: 800; letter-spacing: 1.6px; }
.hero h1 { margin: 9px 0 10px; font-size: clamp(32px, 4vw, 46px); line-height: 1.08; letter-spacing: -1.2px; }
.hero > p { max-width: 680px; margin: 0 auto; color: #e6f0f7; line-height: 1.65; }
.flow { display: flex; justify-content: center; gap: 42px; margin: 30px 0 0; padding: 0; list-style: none; color: #eaf6fa; font-size: 15px; font-weight: 650; }
.flow li { display: flex; align-items: center; gap: 9px; }
.flow span { width: 27px; height: 27px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,.48); border-radius: 50%; color: white; }

.page-layout { max-width: 1180px; margin: 36px auto 60px; padding: 0 20px; display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; align-items: start; }
.service-notes { position: sticky; top: 24px; display: grid; gap: 12px; }
.info-card, .help-card { display: flex; gap: 13px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; box-shadow: 0 5px 16px rgba(23,50,77,.04); }
.info-card.emphasis { border-color: rgba(22,130,255,.35); background: #0d1b29; }
.info-icon { width: 31px; height: 31px; flex: 0 0 31px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(22,130,255,.12); color: var(--teal); font-size: 13px; font-weight: 850; }
.info-card strong { font-size: 16px; }
.info-card p, .help-card p { margin: 5px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.help-card { display: block; margin-top: 3px; padding: 21px; color: white; background: var(--blue-dark); border: 0; }
.help-card > span { display: block; font-size: 12px; letter-spacing: 1.2px; opacity: .7; }
.help-card a { display: inline-block; margin-top: 9px; color: white; font-size: 17px; font-weight: 750; }
.help-card p { color: #c9d7e2; }

.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.form-intro { display: flex; justify-content: space-between; align-items: flex-end; padding: 28px 34px; border-bottom: 1px solid var(--line); }
.form-intro .step-label, .success-view .step-label { color: var(--teal-dark); }
.form-intro h2 { margin: 5px 0 0; font-size: 28px; }
.required-note { color: var(--muted); font-size: 14px; }
b { color: #ff7b84; }
.alert { margin: 24px 34px 0; padding: 14px 16px; border-radius: 7px; font-size: 16px; line-height: 1.45; }
.error-alert { color: #ffc2c7; background: rgba(255,113,123,.08); border: 1px solid rgba(255,113,123,.25); }
.error-alert strong { display: block; margin-bottom: 2px; }

.form-section { margin: 0 34px; padding: 30px 0 34px; border-bottom: 1px solid var(--line); }
.section-heading { display: flex; align-items: center; gap: 13px; margin-bottom: 24px; }
.section-heading > span { width: 37px; height: 37px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 37px; border-radius: 50%; color: var(--blue); background: rgba(22,130,255,.1); font-size: 14px; font-weight: 850; }
.section-heading h3 { margin: 0; font-size: 20px; }
.section-heading p { margin: 3px 0 0; color: var(--muted); font-size: 14px; }
fieldset { margin: 0; padding: 0; border: 0; }
fieldset legend { margin-bottom: 9px; color: #9aabc0; font-size: 14px; font-weight: 750; }
.type-selector { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; margin-bottom: 21px; }
.type-selector legend, .priority-selector legend { grid-column: 1 / -1; }
.type-selector label, .priority-selector label { position: relative; cursor: pointer; }
.type-selector input, .priority-selector input { position: absolute; opacity: 0; pointer-events: none; }
.type-selector span { display: block; padding: 12px 15px; text-align: center; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); font-size: 15px; font-weight: 700; transition: .18s ease; }
.type-selector input:checked + span { color: #dcecff; background: rgba(22,130,255,.1); border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }

.field-grid { display: grid; gap: 17px; }
.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.address-grid { margin-top: 17px; grid-template-columns: 1.3fr 1fr .65fr; }
.address-field { grid-column: 1 / -1; }
.conditional-fields { margin-top: 17px; }
.field { display: block; }
.field > span { display: block; margin-bottom: 7px; color: #9aabc0; font-size: 14px; font-weight: 750; }
.field input, .field select, .field textarea { width: 100%; min-height: 43px; padding: 10px 12px; color: var(--ink); background: #080e17; border: 1px solid #273548; border-radius: 6px; outline: none; transition: border-color .16s, box-shadow .16s; }
.field textarea { min-height: auto; resize: vertical; line-height: 1.45; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(11,92,171,.11); }
.field input.invalid, .field select.invalid, .field textarea.invalid { border-color: var(--danger); }
.field-hint { display: block; margin-top: 5px; color: var(--muted); font-size: 13px; }
.field-error { display: none; margin-top: 5px; color: var(--danger); font-size: 13px; }
.field-error.visible { display: block; }

.priority-selector { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 20px; }
.priority-selector label > span { display: flex; flex-direction: column; padding: 13px 15px; border: 1px solid var(--line); border-radius: 7px; transition: .18s ease; }
.priority-selector strong { color: var(--ink); font-size: 15px; }
.priority-selector small { margin-top: 3px; color: var(--muted); font-size: 13px; }
.priority-selector input:checked + span { background: rgba(22,130,255,.08); border-color: var(--blue); box-shadow: inset 3px 0 0 var(--blue); }

.consent-section { margin: 0 34px; padding: 27px 0 6px; }
.check-field { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; color: #8fa0b5; font-size: 14px; line-height: 1.5; cursor: pointer; }
.check-field input { width: 16px; height: 16px; margin-top: 1px; accent-color: var(--teal-dark); }
.signature-section { margin: 22px 34px 0; padding: 22px; background: var(--soft); border: 1px solid var(--line); border-radius: 10px; }
.signature-head h3 { margin: 6px 0 5px; color: var(--ink); font-size: 18px; font-weight: 750; }
.signature-head p { margin: 0 0 14px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.signature-pad-wrap { position: relative; width: 100%; }
.signature-pad { display: block; width: 100%; height: 180px; background: #fff; border: 2px dashed #b9c6d6; border-radius: 8px; touch-action: none; cursor: crosshair; }
.signature-pad.has-signature { border-style: solid; border-color: var(--teal-dark); }
.signature-placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #c2ccd8; font-size: 18px; font-style: italic; pointer-events: none; }
.signature-placeholder.hidden { display: none; }
.signature-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 10px; }
.signature-clear { padding: 8px 14px; background: #fff; color: var(--danger); border: 1px solid #e2c4c4; border-radius: 6px; font-size: 14px; font-weight: 700; cursor: pointer; transition: .18s ease; }
.signature-clear:hover { background: #fdf2f2; }
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.submit-area { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 21px; padding: 23px 34px 28px; background: var(--soft); border-top: 1px solid var(--line); }
.submit-area strong { display: block; color: var(--ink); font-size: 14px; }
.submit-area small { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; }
.submit-area button, .primary-link { display: inline-flex; align-items: center; justify-content: center; gap: 22px; min-width: 190px; padding: 13px 18px; color: white; background: var(--blue); border: 0; border-radius: 6px; font-size: 15px; font-weight: 750; text-decoration: none; cursor: pointer; transition: .18s ease; }
.submit-area button:hover, .primary-link:hover { background: #084d90; transform: translateY(-1px); }
.submit-area button:disabled { opacity: .65; cursor: wait; transform: none; }

.success-view { min-height: 660px; padding: 70px 36px; text-align: center; }
.success-mark { width: 66px; height: 66px; display: flex; align-items: center; justify-content: center; margin: 0 auto 24px; color: white; background: var(--teal); border-radius: 50%; font-size: 30px; box-shadow: 0 0 0 8px rgba(53,180,255,.12); }
.success-view h2 { margin: 8px 0 8px; font-size: 30px; }
.success-view > p { max-width: 510px; margin: 0 auto; color: var(--muted); line-height: 1.6; }
.order-number-card { max-width: 430px; margin: 30px auto 24px; padding: 22px; background: #0b1a29; border-left: 4px solid var(--teal); border-radius: 7px; }
.order-number-card span, .order-number-card small { display: block; color: var(--muted); font-size: 13px; }
.order-number-card strong { display: block; margin: 7px 0; color: var(--blue); font-size: clamp(20px, 4vw, 26px); }
.primary-link { max-width: 300px; margin: 0 auto; }
.text-button { margin-top: 20px; padding: 5px; color: var(--blue); background: transparent; border: 0; font-size: 14px; text-decoration: underline; cursor: pointer; }
.site-footer { min-height: 74px; display: flex; align-items: center; justify-content: center; gap: 25px; padding: 20px; color: #718697; background: var(--blue-dark); font-size: 14px; }
.site-footer a { color: #dbe7f0; }
.service-legal-footer { justify-content: space-between; padding: 24px max(24px, calc((100vw - 1180px) / 2)); border-top: 1px solid var(--line); }
.service-footer-contact { display: grid; grid-template-columns: repeat(3, max-content); align-items: center; gap: 7px 20px; }
.service-consumer-links { display: flex; align-items: center; gap: 20px; }
.service-footer-contact strong { grid-column: 1 / -1; max-width: 380px; color: #dbe7f0; font-size: 13px; line-height: 1.45; }
.service-footer-contact small { grid-column: 1 / -1; max-width: 420px; color: #718697; font-size: 12px; line-height: 1.55; }
.service-anpc-badge { width: 250px; height: 50px; flex: 0 0 auto; overflow: hidden; border-radius: 22px; }
.service-anpc-badge img { width: 250px; height: 50px; object-fit: fill; }
.service-anpc-link { padding: 10px 13px; border: 1px solid var(--line); border-radius: 7px; font-size: 13px; text-decoration: none; }

@media (max-width: 900px) {
  .page-layout { grid-template-columns: 1fr; }
  .service-notes { position: static; grid-template-columns: repeat(3, 1fr); }
  .help-card { display: none; }
}

@media (max-width: 680px) {
  .site-header { height: 68px; padding: 0 17px; }
  .header-contact { font-size: 14px; }
  .header-home, .header-contact { display: none; }
  .service-brand { width: 135px; height: 44px; }
  .hero { padding: 38px 18px 34px; text-align: left; }
  .hero h1 { font-size: 32px; }
  .flow { align-items: flex-start; gap: 11px; flex-direction: column; margin-top: 24px; }
  .page-layout { margin-top: 18px; padding: 0 11px; }
  .service-notes { grid-template-columns: 1fr; }
  .info-card:not(.emphasis) { display: none; }
  .form-intro { align-items: flex-start; padding: 23px 20px; }
  .required-note { margin-top: 5px; font-size: 12px; }
  .form-section { margin: 0 20px; padding: 25px 0 29px; }
  .two-columns, .address-grid, .priority-selector { grid-template-columns: 1fr; }
  .address-field { grid-column: auto; }
  .consent-section { margin: 0 20px; }
  .submit-area { align-items: stretch; flex-direction: column; padding: 21px 20px 24px; }
  .submit-area button { width: 100%; }
  .success-view { min-height: 560px; padding: 55px 20px; }
  .site-footer { align-items: flex-start; flex-direction: column; gap: 8px; }
  .service-legal-footer { align-items: stretch; gap: 20px; }
  .service-consumer-links { align-items: flex-start; flex-direction: column; gap: 10px; }
  .service-footer-contact { width: 100%; grid-template-columns: 1fr; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}


/* ---- Legal popup (Terms & Conditions / Privacy Policy) ---- */
.legal-open {
  padding: 0;
  background: none;
  border: 0;
  color: var(--blue);
  font: inherit;
  font-weight: 750;
  text-decoration: underline;
  cursor: pointer;
}
.legal-open:hover { color: var(--teal); }

.legal-dialog {
  width: min(760px, 94vw);
  max-height: 88vh;
  padding: 0;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.legal-dialog::backdrop { background: rgba(3, 7, 14, .72); }

.legal-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px 16px;
  background: var(--soft);
  border-bottom: 1px solid var(--line);
}
.legal-dialog-head h2 { margin: 0; color: var(--ink); font-size: 19px; font-weight: 800; line-height: 1.3; }
.legal-dialog-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.legal-dialog-close {
  flex: none;
  width: 32px; height: 32px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  transition: .18s ease;
}
.legal-dialog-close:hover { color: var(--ink); background: rgba(255,255,255,.06); }

.legal-dialog-body {
  padding: 20px 24px;
  overflow-y: auto;
  max-height: calc(88vh - 168px);
  color: #b6c4d6;
  font-size: 15px;
  line-height: 1.62;
}
.legal-dialog-body:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.legal-dialog-body .legal-intro {
  margin: 0 0 16px;
  padding: 12px 14px;
  color: var(--ink);
  background: rgba(22,130,255,.08);
  border-left: 3px solid var(--blue);
  border-radius: 0 8px 8px 0;
}
.legal-dialog-body h3 { margin: 18px 0 6px; color: var(--ink); font-size: 16px; font-weight: 800; }
.legal-dialog-body h3:first-of-type { margin-top: 0; }
.legal-dialog-body p { margin: 0 0 8px; }
.legal-dialog-body .legal-list-title { margin-top: 10px; color: var(--ink); font-weight: 700; }
.legal-dialog-body ul { margin: 0 0 10px; padding-left: 20px; }
.legal-dialog-body li { margin-bottom: 4px; }

.legal-dialog-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 24px 18px;
  background: var(--soft);
  border-top: 1px solid var(--line);
}
.legal-dialog-accept, .legal-dialog-dismiss {
  padding: 11px 18px;
  border-radius: 7px;
  font-size: 15px;
  font-weight: 750;
  cursor: pointer;
  transition: .18s ease;
}
.legal-dialog-accept { color: #fff; background: var(--blue); border: 0; }
.legal-dialog-accept:hover { background: #084d90; }
.legal-dialog-accept[hidden] { display: none; }
.legal-dialog-dismiss { color: var(--ink); background: transparent; border: 1px solid var(--line); }
.legal-dialog-dismiss:hover { background: rgba(255,255,255,.06); }

@media (max-width: 560px) {
  .legal-dialog-body { max-height: calc(88vh - 190px); }
  .legal-dialog-foot { flex-direction: column-reverse; }
  .legal-dialog-accept, .legal-dialog-dismiss { width: 100%; }
}

/* Footer: both ANPC badges + legal links */
.service-anpc-badges { display: flex; flex-direction: column; gap: 9px; }
.service-footer-legal { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.service-footer-legal .legal-open { font-size: 13px; font-weight: 700; }
