/* ============================================================
   Certificate de Origine — Formular public
   Sistem vizual dedicat paginii publice (peste tokens din style.css)
   ============================================================ */

:root {
  --navy-mid: #24365C;
  --seal-bright: #D9AE55;
  --paper-warm: #F1EBDA;
  --shadow-soft: 0 1px 2px rgba(19,29,51,0.06), 0 12px 32px -8px rgba(19,29,51,0.16);
  --shadow-lift: 0 20px 50px -12px rgba(19,29,51,0.35);
}

.pf-body { background: var(--paper); }

/* ---------- Top bar ---------- */
.pf-topbar {
  background: var(--navy-deep);
  border-bottom: 3px solid var(--seal);
  padding: 0 28px;
  height: 60px;
  display: flex; align-items: center; justify-content: space-between;
}
.pf-topbar .brand { display: flex; align-items: center; gap: 10px; color: #fff; font-family: 'Source Serif 4', serif; font-weight: 600; font-size: 1.05rem; }
.pf-topbar .brand .mark { width: 28px; height: 28px; }
.pf-topbar .contact { font-size: 0.8rem; color: #C7CBDB; text-align: right; line-height: 1.4; }
.pf-topbar .contact a { color: var(--seal-bright); text-decoration: none; }
.pf-topbar .contact a:hover { text-decoration: underline; }

/* ---------- Hero ---------- */
.pf-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 900px 500px at 15% -10%, rgba(184,134,46,0.22), transparent 60%),
    linear-gradient(160deg, var(--navy-deep) 0%, var(--navy) 55%, var(--navy-mid) 100%);
  color: #EDEFF5;
  padding: 64px 28px 84px;
}
.pf-hero .watermark-seal {
  position: absolute;
  top: 50%; right: -80px;
  transform: translateY(-50%);
  width: 460px; height: 460px;
  opacity: 0.09;
  animation: pf-rotate 90s linear infinite;
  pointer-events: none;
}
@keyframes pf-rotate { from { transform: translateY(-50%) rotate(0deg); } to { transform: translateY(-50%) rotate(360deg); } }

.pf-hero .inner { max-width: 760px; margin: 0 auto; position: relative; z-index: 1; }
.pf-hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--seal-bright); font-weight: 600; margin-bottom: 18px;
}
.pf-hero .eyebrow::before { content: ''; width: 18px; height: 1px; background: var(--seal-bright); display: inline-block; }
.pf-hero h1 {
  font-family: 'Source Serif 4', serif; font-weight: 600;
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  line-height: 1.15; color: #fff; margin: 0 0 16px; letter-spacing: -0.01em;
}
.pf-hero h1 em { color: var(--seal-bright); font-style: normal; }
.pf-hero p.lede { font-size: 1.02rem; color: #C7CBDB; max-width: 520px; margin: 0 0 32px; line-height: 1.6; }

.pf-stats { display: flex; gap: 34px; flex-wrap: wrap; }
.pf-stats .stat-item { display: flex; align-items: baseline; gap: 8px; }
.pf-stats .stat-item .num { font-family: 'Source Serif 4', serif; font-size: 1.5rem; font-weight: 700; color: #fff; }
.pf-stats .stat-item .lbl { font-size: 0.78rem; color: #A7ACC2; max-width: 90px; line-height: 1.3; }

/* ---------- How it works strip ---------- */
.pf-how {
  max-width: 900px; margin: -46px auto 0; padding: 0 28px;
  position: relative; z-index: 2;
}
.pf-how .strip {
  background: var(--surface);
  border-radius: 6px;
  box-shadow: var(--shadow-lift);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
}
.pf-how .step {
  padding: 22px 18px;
  border-right: 1px solid var(--border);
  text-align: left;
}
.pf-how .step:last-child { border-right: none; }
.pf-how .step .ic { width: 30px; height: 30px; color: var(--seal); margin-bottom: 10px; }
.pf-how .step .t { font-weight: 600; font-size: 0.85rem; color: var(--navy-deep); margin-bottom: 3px; }
.pf-how .step .d { font-size: 0.76rem; color: var(--ink-muted); line-height: 1.4; }
@media (max-width: 700px) {
  .pf-how .strip { grid-template-columns: 1fr 1fr; }
  .pf-how .step { border-bottom: 1px solid var(--border); }
}

/* ---------- Wizard card ---------- */
.pf-wizard-wrap { max-width: 720px; margin: 56px auto 0; padding: 0 20px 90px; }

.pf-stepper { display: flex; justify-content: space-between; margin-bottom: 36px; position: relative; }
.pf-stepper::before {
  content: ''; position: absolute; top: 19px; left: 30px; right: 30px; height: 2px;
  background: repeating-linear-gradient(90deg, var(--border) 0 6px, transparent 6px 11px);
  z-index: 0;
}
.pf-step-dot {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  position: relative; z-index: 1; flex: 1;
}
.pf-step-dot .circle {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Roboto Mono', monospace; font-weight: 700; font-size: 0.82rem;
  color: var(--ink-muted);
  transition: all 0.35s cubic-bezier(.34,1.56,.64,1);
}
.pf-step-dot .label { font-size: 0.68rem; color: var(--ink-muted); text-align: center; max-width: 76px; line-height: 1.25; }
.pf-step-dot.active .circle { border-color: var(--seal); color: var(--seal); background: #fff; transform: scale(1.12); box-shadow: 0 0 0 5px var(--seal-light); }
.pf-step-dot.active .label { color: var(--navy-deep); font-weight: 600; }
.pf-step-dot.done .circle { border-color: var(--valid); background: var(--valid); color: #fff; }
.pf-step-dot.done .circle::after { content: '✓'; }
.pf-step-dot.done .circle span { display: none; }

.pf-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: var(--shadow-soft);
  padding: 34px 32px;
}
@media (max-width: 560px) { .pf-card { padding: 24px 18px; } }

.pf-step-panel { display: none; animation: pf-fade-in 0.4s ease both; }
.pf-step-panel.active { display: block; }
@keyframes pf-fade-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.no-js .pf-step-panel { display: block !important; animation: none; }
.no-js .pf-stepper, .no-js .pf-nav-row { display: none !important; }

.pf-step-panel h2 { font-size: 1.2rem; margin: 0 0 4px; }
.pf-step-panel .step-sub { color: var(--ink-muted); font-size: 0.86rem; margin: 0 0 24px; }

.pf-field { margin-bottom: 18px; position: relative; }
.pf-field label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--navy-deep); margin-bottom: 6px; }
.pf-field .opt { font-weight: 400; color: var(--ink-muted); }
.pf-field input[type=text], .pf-field input[type=email], .pf-field input[type=tel],
.pf-field textarea, .pf-field select {
  width: 100%; padding: 11px 13px;
  border: 1.5px solid #D9D4C4; border-radius: 5px;
  font-family: inherit; font-size: 0.92rem; background: #fff; color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.pf-field input:focus, .pf-field textarea:focus, .pf-field select:focus {
  outline: none; border-color: var(--seal); box-shadow: 0 0 0 3px var(--seal-light);
}
.pf-field input:invalid:not(:placeholder-shown) { border-color: var(--suspect); }
.pf-field textarea { resize: vertical; min-height: 76px; }
.pf-field .hint { color: var(--ink-muted); font-size: 0.76rem; margin-top: 5px; }
.pf-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; }
@media (max-width: 560px) { .pf-grid-2 { grid-template-columns: 1fr; } }

.pf-radio-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
@media (max-width: 560px) { .pf-radio-cards { grid-template-columns: 1fr; } }
.pf-radio-card {
  border: 1.5px solid #D9D4C4; border-radius: 6px; padding: 14px 16px;
  cursor: pointer; font-size: 0.85rem; transition: all 0.15s;
  display: flex; align-items: flex-start; gap: 10px;
}
.pf-radio-card:hover { border-color: var(--seal); }
.pf-radio-card input { accent-color: var(--seal); margin-top: 2px; flex-shrink: 0; }
.pf-radio-card.checked { border-color: var(--seal); background: var(--seal-light); }
.pf-radio-card .rc-title { font-weight: 600; color: var(--navy-deep); display: block; margin-bottom: 3px; }
.pf-radio-card .rc-desc { color: var(--ink-muted); font-size: 0.78rem; line-height: 1.4; display: block; }

/* ---------- Goods rows ---------- */
.pf-goods-row {
  display: grid; grid-template-columns: 1fr 110px 110px auto;
  gap: 10px; align-items: end; margin-bottom: 12px;
  padding: 12px; background: #FBFAF6; border-radius: 5px; border: 1px solid var(--border);
}
@media (max-width: 620px) { .pf-goods-row { grid-template-columns: 1fr; } }
.pf-goods-row .pf-field { margin-bottom: 0; }
.pf-remove-row {
  background: none; border: 1px solid var(--suspect); color: var(--suspect);
  border-radius: 5px; width: 34px; height: 38px; cursor: pointer; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
}
.pf-remove-row:hover { background: var(--suspect); color: #fff; }
.pf-add-link {
  background: none; border: 1.5px dashed var(--seal); color: var(--seal);
  border-radius: 5px; padding: 10px; width: 100%; font-size: 0.85rem; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
}
.pf-add-link:hover { background: var(--seal-light); }

/* ---------- File drop zones ---------- */
.pf-dropzone {
  border: 1.5px dashed #D9D4C4; border-radius: 6px;
  padding: 16px; margin-bottom: 12px;
  display: flex; align-items: center; gap: 14px;
  cursor: pointer; transition: all 0.18s; position: relative;
  background: #FBFAF6;
}
.pf-dropzone:hover, .pf-dropzone.drag { border-color: var(--seal); background: var(--seal-light); }
.pf-dropzone.filled { border-color: var(--valid); background: var(--valid-bg); border-style: solid; }
.pf-dropzone .dz-icon {
  width: 38px; height: 38px; flex-shrink: 0; border-radius: 50%;
  background: #fff; border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center; color: var(--seal);
}
.pf-dropzone.filled .dz-icon { color: var(--valid); border-color: var(--valid); }
.pf-dropzone .dz-icon svg { width: 18px; height: 18px; }
.pf-dropzone .dz-text { flex: 1; min-width: 0; }
.pf-dropzone .dz-label { font-weight: 600; font-size: 0.86rem; color: var(--navy-deep); }
.pf-dropzone .dz-sub { font-size: 0.76rem; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.pf-dropzone .dz-clear {
  font-size: 0.72rem; color: var(--suspect); text-decoration: underline; cursor: pointer;
  background: none; border: none; padding: 4px; position: relative; z-index: 2;
}

/* ---------- Recap ---------- */
.pf-recap-group { margin-bottom: 20px; }
.pf-recap-group h3 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--seal); margin: 0 0 10px; }
.pf-recap-row { display: flex; justify-content: space-between; gap: 14px; padding: 7px 0; border-bottom: 1px dashed var(--border); font-size: 0.86rem; }
.pf-recap-row:last-child { border-bottom: none; }
.pf-recap-row .k { color: var(--ink-muted); }
.pf-recap-row .v { font-weight: 500; text-align: right; }
.pf-edit-link { font-size: 0.72rem; color: var(--navy); cursor: pointer; background: none; border: none; text-decoration: underline; padding: 0; }

/* ---------- Nav row / checkbox / submit ---------- */
.pf-nav-row { display: flex; justify-content: space-between; align-items: center; margin-top: 28px; gap: 12px; }
.pf-btn {
  display: inline-flex; align-items: center; gap: 8px;
  border-radius: 6px; padding: 12px 24px; font-size: 0.9rem; font-weight: 600;
  cursor: pointer; border: none; font-family: inherit; transition: all 0.15s;
}
.pf-btn-primary { background: var(--navy); color: #fff; box-shadow: 0 4px 14px -4px rgba(27,42,74,0.5); }
.pf-btn-primary:hover { background: var(--navy-deep); transform: translateY(-1px); box-shadow: 0 8px 20px -6px rgba(27,42,74,0.55); }
.pf-btn-ghost { background: none; color: var(--ink-muted); border: 1.5px solid var(--border); }
.pf-btn-ghost:hover { border-color: var(--navy); color: var(--navy); }
.pf-btn-seal { background: var(--seal); color: #2B1E05; box-shadow: 0 4px 14px -4px rgba(184,134,46,0.55); }
.pf-btn-seal:hover { background: var(--seal-bright); transform: translateY(-1px); }
.pf-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; }

.pf-checkbox { display: flex; align-items: flex-start; gap: 10px; font-size: 0.85rem; margin: 22px 0 6px; color: var(--ink); }
.pf-checkbox input { margin-top: 3px; accent-color: var(--seal); }
.pf-checkbox a { color: var(--navy); }

.pf-error-banner {
  background: var(--suspect-bg); color: var(--suspect); border: 1px solid #E5B9B2;
  padding: 12px 16px; border-radius: 5px; font-size: 0.85rem; margin-bottom: 20px;
  display: flex; align-items: center; gap: 10px;
}

/* ---------- Pricing pills (shown in step 1 aside note) ---------- */
.pf-price-note {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 22px;
}
.pf-price-pill {
  font-size: 0.72rem; background: var(--paper-warm); border: 1px solid var(--border);
  border-radius: 20px; padding: 5px 12px; color: var(--ink-muted);
}
.pf-price-pill strong { color: var(--navy-deep); }

.pf-footer { text-align: center; padding: 30px 20px; color: var(--ink-muted); font-size: 0.8rem; border-top: 1px solid var(--border); }
.pf-footer a { color: var(--navy); }

/* ---------- Confirmation page ---------- */
.pf-confirm-wrap {
  min-height: calc(100vh - 60px);
  display: flex; align-items: center; justify-content: center;
  background: var(--paper);
  padding: 40px 20px;
}
.pf-confirm-card {
  max-width: 480px; text-align: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  padding: 48px 36px; box-shadow: var(--shadow-lift);
}
.pf-stamp-wrap { width: 128px; height: 128px; margin: 0 auto 24px; }
.pf-stamp-wrap svg {
  width: 100%; height: 100%;
  animation: pf-stamp-down 0.7s cubic-bezier(.2,1.4,.4,1) both;
}
@keyframes pf-stamp-down {
  0% { opacity: 0; transform: scale(2.2) rotate(-18deg); }
  60% { opacity: 1; }
  100% { opacity: 1; transform: scale(1) rotate(-8deg); }
}
.pf-confirm-card h1 { font-size: 1.5rem; margin: 0 0 10px; }
.pf-confirm-card p { color: var(--ink-muted); font-size: 0.92rem; margin: 0 0 6px; }
.pf-ref-number {
  font-family: 'Roboto Mono', monospace; font-weight: 700; font-size: 1.4rem;
  color: var(--navy-deep); background: var(--seal-light);
  display: inline-block; padding: 10px 24px; border-radius: 6px; margin: 18px 0;
  letter-spacing: 0.03em;
}
.pf-confirm-card .next-steps {
  text-align: left; background: #FBFAF6; border: 1px solid var(--border);
  border-radius: 6px; padding: 16px 18px; margin: 24px 0; font-size: 0.85rem;
}
.pf-confirm-card .next-steps li { margin-bottom: 6px; }
