/* ═══════════════════════════════════════════════════════════════════════════
   WOODPARTS ORDER FORM — ALL CSS SCOPED UNDER #wpof-root
   Prevents any conflicts with WordPress / Elementor styles.
   ═══════════════════════════════════════════════════════════════════════════ */
#wpof-root {
  --wpof-orange: #e8731a; --wpof-orange-hover: #d4670f;
  --wpof-orange-glow: rgba(232,115,26,.15); --wpof-orange-soft: #fef7f0;
  --wpof-dark: #161616; --wpof-dark2: #1e1e1e; --wpof-dark3: #2a2a2a;
  --wpof-cream: #faf9f6; --wpof-warm-bg: #f0ece5; --wpof-white: #ffffff;
  --wpof-text: #1a1a1a; --wpof-text2: #555; --wpof-text3: #999;
  --wpof-border: #e2ddd5; --wpof-border-focus: #c4bfb6;
  --wpof-green: #1e8a3e; --wpof-red: #c0392b; --wpof-red-bg: #fef5f4;
  --wpof-radius: 12px; --wpof-radius-sm: 8px;
  --wpof-font: 'DM Sans', -apple-system, sans-serif;
  --wpof-font-display: 'Fraunces', Georgia, serif;
  --wpof-shadow-md: 0 4px 16px rgba(0,0,0,.08);
  --wpof-tr: .25s cubic-bezier(.4,0,.2,1);
  font-family: var(--wpof-font);
  background: var(--wpof-warm-bg);
  color: var(--wpof-text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
#wpof-root *, #wpof-root *::before, #wpof-root *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── HEADER ── */
#wpof-root .wpof-header { background: var(--wpof-dark); position: relative; }
#wpof-root .wpof-header::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--wpof-orange), transparent); }
#wpof-root .wpof-header-inner { max-width: 980px; margin: 0 auto; padding: 24px 20px; display: flex; align-items: center; justify-content: space-between; }
#wpof-root .wpof-logo { font-family: var(--wpof-font-display); font-size: 24px; color: var(--wpof-white); font-weight: 700; letter-spacing: -.5px; line-height: 1.2; }
#wpof-root .wpof-logo span { color: var(--wpof-orange); }
#wpof-root .wpof-logo-sub { font-family: var(--wpof-font); font-size: 12px; color: #777; margin-top: 2px; letter-spacing: .3px; font-weight: 400; }
#wpof-root .wpof-badge { background: rgba(232,115,26,.15); color: var(--wpof-orange); font-size: 10px; padding: 6px 14px; border-radius: 100px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; border: 1px solid rgba(232,115,26,.25); }

/* ── PROGRESS ── */
#wpof-root .wpof-progress { background: var(--wpof-dark2); padding: 24px 20px 20px; border-bottom: 1px solid #333; }
#wpof-root .wpof-progress-inner { max-width: 980px; margin: 0 auto; }
#wpof-root .wpof-steps { display: flex; justify-content: space-between; position: relative; }
#wpof-root .wpof-steps::before { content: ''; position: absolute; top: 20px; left: 40px; right: 40px; height: 2px; background: var(--wpof-dark3); z-index: 0; }
#wpof-root .wpof-step { display: flex; flex-direction: column; align-items: center; z-index: 1; flex: 1; }
#wpof-root .wpof-step-circle { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; transition: all var(--wpof-tr); border: 2.5px solid transparent; font-family: var(--wpof-font); }
#wpof-root .wpof-step-circle.done { background: var(--wpof-green); color: var(--wpof-white); border-color: var(--wpof-green); }
#wpof-root .wpof-step-circle.active { background: var(--wpof-orange); color: var(--wpof-white); border-color: var(--wpof-orange); box-shadow: 0 0 0 5px var(--wpof-orange-glow); }
#wpof-root .wpof-step-circle.pending { background: var(--wpof-dark3); color: #666; border-color: #444; }
#wpof-root .wpof-step-label { font-size: 11px; margin-top: 8px; font-weight: 500; text-align: center; transition: color var(--wpof-tr); }
#wpof-root .wpof-step-label.done { color: #aaa; }
#wpof-root .wpof-step-label.active { color: var(--wpof-orange); font-weight: 600; }
#wpof-root .wpof-step-label.pending { color: #666; }
#wpof-root .wpof-bar { height: 3px; background: var(--wpof-dark3); border-radius: 3px; margin-top: 20px; overflow: hidden; }
#wpof-root .wpof-bar-fill { height: 100%; background: linear-gradient(90deg, var(--wpof-orange), #f5a623); border-radius: 3px; transition: width .6s cubic-bezier(.4,0,.2,1); }

/* ── CONTENT ── */
#wpof-root .wpof-main { max-width: 980px; margin: 0 auto; padding: 28px 20px 48px; }
#wpof-root .wpof-card { background: var(--wpof-white); border-radius: 16px; border: 1px solid var(--wpof-border); box-shadow: var(--wpof-shadow-md); padding: 36px; min-height: 340px; animation: wpofFadeUp .4s ease-out; }
#wpof-root .wpof-card--dashboard { padding: 24px; min-height: 0; }
@keyframes wpofFadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* ── TYPOGRAPHY ── */
#wpof-root .wpof-title { font-family: var(--wpof-font-display); font-size: 28px; color: var(--wpof-dark); font-weight: 700; letter-spacing: -.3px; margin-bottom: 4px; }
#wpof-root .wpof-sub { font-size: 14px; color: var(--wpof-text2); margin-bottom: 28px; line-height: 1.5; }
#wpof-root .wpof-sub .wpof-req { color: var(--wpof-orange); font-weight: 600; }

/* ── SECTION DIVIDER ── */
#wpof-root .wpof-sec { display: flex; align-items: center; gap: 12px; margin: 28px 0 18px; }
#wpof-root .wpof-sec:first-of-type { margin-top: 8px; }
#wpof-root .wpof-sec-icon { width: 32px; height: 32px; border-radius: 8px; background: var(--wpof-orange-soft); display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }
#wpof-root .wpof-sec-text { font-size: 11px; font-weight: 700; color: var(--wpof-orange); text-transform: uppercase; letter-spacing: 1.2px; white-space: nowrap; }
#wpof-root .wpof-sec-line { flex: 1; height: 1px; background: var(--wpof-border); }

/* ── GRID ── */
#wpof-root .wpof-grid { display: grid; gap: 16px; }
#wpof-root .wpof-g2 { grid-template-columns: 1fr 1fr; }
#wpof-root .wpof-g3 { grid-template-columns: 1fr 1fr 1fr; }
#wpof-root .wpof-g4 { grid-template-columns: repeat(4,1fr); }
#wpof-root .wpof-span2 { grid-column: span 2; }

/* ── FIELDS ── */
#wpof-root .wpof-field label { display: block; font-size: 11px; font-weight: 600; color: var(--wpof-text2); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .5px; }
#wpof-root .wpof-field label .wpof-req { color: var(--wpof-orange); margin-left: 1px; }
#wpof-root .wpof-input,
#wpof-root .wpof-select,
#wpof-root .wpof-textarea { width: 100%; padding: 11px 14px; border: 1.5px solid var(--wpof-border); border-radius: var(--wpof-radius-sm); font-size: 14px; font-family: var(--wpof-font); background: var(--wpof-cream); color: var(--wpof-text); outline: none; transition: all var(--wpof-tr); }
#wpof-root .wpof-input:focus,
#wpof-root .wpof-select:focus,
#wpof-root .wpof-textarea:focus { border-color: var(--wpof-orange); box-shadow: 0 0 0 3px var(--wpof-orange-glow); background: var(--wpof-white); }
#wpof-root .wpof-input::placeholder { color: var(--wpof-text3); }
#wpof-root .wpof-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23999'%3E%3Cpath d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; cursor: pointer; }
#wpof-root .wpof-textarea { resize: vertical; min-height: 64px; }

/* ── CHECKBOXES ── */
#wpof-root .wpof-check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
#wpof-root .wpof-check { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--wpof-radius-sm); cursor: pointer; transition: all .15s; font-size: 13px; color: var(--wpof-text); user-select: none; border: 1.5px solid transparent; }
#wpof-root .wpof-check:hover { background: var(--wpof-orange-soft); }
#wpof-root .wpof-check.on { background: var(--wpof-orange-soft); border-color: rgba(232,115,26,.2); font-weight: 500; }
#wpof-root .wpof-check input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--wpof-orange); cursor: pointer; flex-shrink: 0; margin: 0; }

/* ── LINE CARDS ── */
#wpof-root .wpof-lc { background: var(--wpof-white); border-radius: var(--wpof-radius); border: 1.5px solid var(--wpof-border); margin-bottom: 12px; overflow: hidden; transition: all .3s; }
#wpof-root .wpof-lc.open { border-color: var(--wpof-orange); box-shadow: 0 4px 20px var(--wpof-orange-glow); }
#wpof-root .wpof-lh { padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; transition: background .2s; }
#wpof-root .wpof-lh:hover { background: #fdfcfa; }
#wpof-root .wpof-lc.open .wpof-lh { background: var(--wpof-orange-soft); }
#wpof-root .wpof-ln { width: 34px; height: 34px; border-radius: 50%; background: var(--wpof-orange); color: var(--wpof-white); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; flex-shrink: 0; }
#wpof-root .wpof-li { margin-left: 14px; flex: 1; }
#wpof-root .wpof-lt { font-weight: 600; font-size: 15px; color: var(--wpof-dark); }
#wpof-root .wpof-ls { font-size: 12px; color: var(--wpof-text3); margin-top: 2px; }
#wpof-root .wpof-la { font-size: 18px; color: var(--wpof-text3); transition: transform .3s; }
#wpof-root .wpof-lc.open .wpof-la { transform: rotate(180deg); }
#wpof-root .wpof-lb { padding: 24px; border-top: 1px solid var(--wpof-border); }

/* ── BUTTONS ── */
#wpof-root .wpof-btn { padding: 12px 24px; border-radius: var(--wpof-radius-sm); font-family: var(--wpof-font); font-size: 14px; font-weight: 600; cursor: pointer; transition: all .2s; border: none; display: inline-flex; align-items: center; gap: 6px; line-height: 1.4; }
#wpof-root .wpof-btn-p { background: var(--wpof-orange); color: var(--wpof-white); box-shadow: 0 2px 10px rgba(232,115,26,.3); }
#wpof-root .wpof-btn-p:hover:not(:disabled) { background: var(--wpof-orange-hover); box-shadow: 0 4px 18px rgba(232,115,26,.4); transform: translateY(-1px); }
#wpof-root .wpof-btn-p:disabled { background: #ccc; box-shadow: none; cursor: default; transform: none; }
#wpof-root .wpof-btn-s { background: var(--wpof-white); color: var(--wpof-text); border: 1.5px solid var(--wpof-border); }
#wpof-root .wpof-btn-s:hover:not(:disabled) { border-color: var(--wpof-border-focus); background: #fdfcfa; }
#wpof-root .wpof-btn-s:disabled { opacity: .4; cursor: default; }
#wpof-root .wpof-btn-sm { padding: 7px 16px; font-size: 12px; border-radius: 6px; font-family: var(--wpof-font); cursor: pointer; border: 1px solid var(--wpof-border); background: var(--wpof-white); color: var(--wpof-text2); transition: all .15s; }
#wpof-root .wpof-btn-sm:hover { background: var(--wpof-cream); }
#wpof-root .wpof-btn-d { background: var(--wpof-red-bg); color: var(--wpof-red); border-color: #f0c0c0; }
#wpof-root .wpof-btn-d:hover { background: #fdeaea; }
#wpof-root .wpof-btn-add { width: 100%; padding: 18px; border: 2px dashed var(--wpof-border); border-radius: var(--wpof-radius); background: transparent; cursor: pointer; font-family: var(--wpof-font); font-size: 14px; color: var(--wpof-text3); font-weight: 600; transition: all .2s; margin-top: 10px; }
#wpof-root .wpof-btn-add:hover { border-color: var(--wpof-orange); color: var(--wpof-orange); background: var(--wpof-orange-soft); }

/* ── UPLOAD ── */
#wpof-root .wpof-uz { border: 2px dashed var(--wpof-border); border-radius: var(--wpof-radius); padding: 56px 24px; text-align: center; background: var(--wpof-cream); transition: all .25s; cursor: pointer; position: relative; }
#wpof-root .wpof-uz:hover { border-color: var(--wpof-orange); background: var(--wpof-orange-soft); }
#wpof-root .wpof-uz.dragging { border-color: var(--wpof-orange); background: var(--wpof-orange-soft); }
#wpof-root .wpof-uz-icon { font-size: 44px; margin-bottom: 10px; opacity: .6; }
#wpof-root .wpof-uz-text { font-weight: 600; font-size: 15px; color: var(--wpof-dark); }
#wpof-root .wpof-uz-hint { font-size: 12px; color: var(--wpof-text3); margin-top: 6px; }
#wpof-root .wpof-uz input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
#wpof-root .wpof-fi { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--wpof-cream); border-radius: var(--wpof-radius-sm); border: 1px solid var(--wpof-border); margin-top: 10px; }
#wpof-root .wpof-fi-name { font-size: 13px; font-weight: 500; }
#wpof-root .wpof-fi-size { font-size: 11px; color: var(--wpof-text3); margin-left: 8px; }
#wpof-root .wpof-fi-rm { border: none; background: none; color: var(--wpof-red); cursor: pointer; font-size: 20px; padding: 0 4px; line-height: 1; }

/* ── SUMMARY ── */
#wpof-root .wpof-sc { background: var(--wpof-cream); border-radius: var(--wpof-radius); border: 1px solid var(--wpof-border); padding: 24px; margin-bottom: 16px; }
#wpof-root .wpof-sh { font-family: var(--wpof-font-display); font-size: 16px; font-weight: 600; color: var(--wpof-dark); margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
#wpof-root .wpof-sb { width: 26px; height: 26px; border-radius: 50%; background: var(--wpof-orange); color: var(--wpof-white); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; font-family: var(--wpof-font); }
#wpof-root .wpof-sr { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--wpof-border); font-size: 13px; }
#wpof-root .wpof-sr:last-child { border-bottom: none; }
#wpof-root .wpof-srl { color: var(--wpof-text2); }
#wpof-root .wpof-srv { font-weight: 600; color: var(--wpof-dark); text-align: right; max-width: 60%; }
#wpof-root .wpof-scols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
#wpof-root .wpof-totals { background: linear-gradient(135deg, var(--wpof-orange-soft), #fff8f0); border: 1px solid #f0d4b5; border-radius: var(--wpof-radius); padding: 20px 24px; margin-top: 12px; }
#wpof-root .wpof-totals p { font-size: 14px; line-height: 1.7; margin: 0; }
#wpof-root .wpof-totals strong { color: var(--wpof-dark); }

/* ── NAVIGATION ── */
#wpof-root .wpof-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; }
#wpof-root .wpof-nav-r { display: flex; gap: 10px; }

/* ── SUCCESS / ERROR ── */
#wpof-root .wpof-success { text-align: center; padding: 60px 24px; }
#wpof-root .wpof-success-icon { font-size: 64px; margin-bottom: 16px; }
#wpof-root .wpof-success h2 { font-family: var(--wpof-font-display); font-size: 26px; color: var(--wpof-green); margin-bottom: 8px; }
#wpof-root .wpof-success p { font-size: 15px; color: var(--wpof-text2); max-width: 480px; margin: 0 auto 24px; }
#wpof-root .wpof-error { background: var(--wpof-red-bg); border: 1px solid #f0c0c0; border-radius: var(--wpof-radius-sm); padding: 14px 18px; margin-bottom: 16px; color: var(--wpof-red); font-size: 14px; }

/* ── SPINNER ── */
#wpof-root .wpof-spinner { display: inline-block; width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.3); border-top-color: var(--wpof-white); border-radius: 50%; animation: wpofSpin .7s linear infinite; }
@keyframes wpofSpin { to { transform: rotate(360deg); } }

/* ══════════════ MOBILE <= 768px ══════════════ */
@media (max-width: 768px) {
  #wpof-root .wpof-header-inner { padding: 20px 16px; flex-direction: column; align-items: flex-start; gap: 10px; }
  #wpof-root .wpof-badge { display: none; }
  #wpof-root .wpof-logo { font-size: 21px; }
  #wpof-root .wpof-progress { padding: 18px 16px 16px; }
  #wpof-root .wpof-step-circle { width: 34px; height: 34px; font-size: 12px; }
  #wpof-root .wpof-step-label { font-size: 9px; }
  #wpof-root .wpof-steps::before { left: 30px; right: 30px; top: 17px; }
  #wpof-root .wpof-main { padding: 16px 12px 36px; }
  #wpof-root .wpof-card { padding: 24px 18px; border-radius: var(--wpof-radius); }
  #wpof-root .wpof-title { font-size: 22px; }
  #wpof-root .wpof-sub { font-size: 13px; }
  #wpof-root .wpof-g2, #wpof-root .wpof-g3, #wpof-root .wpof-g4 { grid-template-columns: 1fr; }
  #wpof-root .wpof-span2 { grid-column: span 1; }
  #wpof-root .wpof-check-grid { grid-template-columns: 1fr; }
  #wpof-root .wpof-lb { padding: 18px 14px; }
  #wpof-root .wpof-lb .wpof-g4 { grid-template-columns: 1fr 1fr; }
  #wpof-root .wpof-scols { grid-template-columns: 1fr; }
  #wpof-root .wpof-nav { flex-direction: column-reverse; gap: 10px; }
  #wpof-root .wpof-nav-r { width: 100%; }
  #wpof-root .wpof-nav-r .wpof-btn { flex: 1; justify-content: center; }
  #wpof-root .wpof-nav > .wpof-btn-s { width: 100%; justify-content: center; }
  #wpof-root .wpof-btn { padding: 14px 20px; }
  #wpof-root .wpof-sec { margin: 22px 0 14px; }
  #wpof-root .wpof-pin-wrap { padding: 36px 20px; }
  #wpof-root .wpof-pin-digit { width: 48px; height: 56px; font-size: 24px; }
  #wpof-root .wpof-pin-inputs { gap: 10px; }
}

/* ══════════════ SMALL MOBILE <= 480px ══════════════ */
@media (max-width: 480px) {
  #wpof-root .wpof-header-inner { padding: 16px 14px; }
  #wpof-root .wpof-logo { font-size: 19px; }
  #wpof-root .wpof-progress { padding: 14px 10px 12px; }
  #wpof-root .wpof-step-circle { width: 30px; height: 30px; font-size: 11px; }
  #wpof-root .wpof-step-label { font-size: 8px; margin-top: 5px; }
  #wpof-root .wpof-steps::before { left: 24px; right: 24px; top: 15px; }
  #wpof-root .wpof-main { padding: 12px 8px 28px; }
  #wpof-root .wpof-card { padding: 20px 14px; }
  #wpof-root .wpof-title { font-size: 20px; }
  #wpof-root .wpof-lh { padding: 12px 14px; }
  #wpof-root .wpof-ln { width: 28px; height: 28px; font-size: 12px; }
  #wpof-root .wpof-li { margin-left: 10px; }
  #wpof-root .wpof-lt { font-size: 13px; }
  #wpof-root .wpof-lb { padding: 14px 12px; }
  #wpof-root .wpof-lb .wpof-g4 { grid-template-columns: 1fr; }
  #wpof-root .wpof-sc { padding: 18px 14px; }
  #wpof-root .wpof-uz { padding: 36px 16px; }
  #wpof-root .wpof-pin-wrap { padding: 28px 14px; }
  #wpof-root .wpof-pin-icon { font-size: 40px; }
  #wpof-root .wpof-pin-title { font-size: 20px; }
  #wpof-root .wpof-pin-digit { width: 44px; height: 52px; font-size: 22px; }
  #wpof-root .wpof-pin-inputs { gap: 8px; }
}

/* ── EDIT MODE BADGE ── */
#wpof-root .wpof-edit-badge {
  background: rgba(30,138,62,.12);
  color: var(--wpof-green);
  font-size: 10px;
  padding: 6px 14px;
  border-radius: 100px;
  font-weight: 600;
  letter-spacing: .8px;
  text-transform: uppercase;
  border: 1px solid rgba(30,138,62,.25);
}

/* ── CHANGE HISTORY ── */
#wpof-root .wpof-history-entry {
  padding: 14px 0;
  border-bottom: 1px solid var(--wpof-border);
}
#wpof-root .wpof-history-entry:last-child { border-bottom: none; }
#wpof-root .wpof-history-header {
  font-size: 13px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
#wpof-root .wpof-history-editor {
  font-size: 12px;
  color: var(--wpof-text2);
  background: var(--wpof-cream);
  padding: 2px 10px;
  border-radius: 100px;
  border: 1px solid var(--wpof-border);
}
#wpof-root .wpof-history-date {
  font-size: 11px;
  color: var(--wpof-text3);
  margin-left: auto;
}
#wpof-root .wpof-history-note {
  font-size: 12px;
  color: var(--wpof-text3);
  font-style: italic;
}
#wpof-root .wpof-history-changes {
  margin-top: 4px;
}
#wpof-root .wpof-change-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
  font-size: 12px;
  flex-wrap: wrap;
}
#wpof-root .wpof-change-field {
  color: var(--wpof-text2);
  min-width: 140px;
  font-weight: 500;
}
#wpof-root .wpof-change-old {
  text-decoration: line-through;
  color: var(--wpof-red);
}
#wpof-root .wpof-change-arrow {
  color: var(--wpof-text3);
}
#wpof-root .wpof-change-new {
  color: var(--wpof-green);
  font-weight: 600;
}
#wpof-root .wpof-change-added {
  color: var(--wpof-green);
  font-weight: 500;
}
#wpof-root .wpof-change-removed {
  color: var(--wpof-red);
  font-weight: 500;
  text-decoration: line-through;
}

/* ── CONFLICT BANNER ── */
#wpof-root .wpof-conflict {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: var(--wpof-radius-sm);
  padding: 14px 18px;
  margin-bottom: 16px;
  color: #856404;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── PIN VERIFICATION SCREEN ── */
#wpof-root .wpof-pin-wrap {
  text-align: center;
  padding: 48px 36px;
  max-width: 440px;
  margin: 0 auto;
}
#wpof-root .wpof-pin-icon {
  font-size: 52px;
  margin-bottom: 12px;
  line-height: 1;
}
#wpof-root .wpof-pin-title {
  font-family: var(--wpof-font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--wpof-dark);
  margin-bottom: 16px;
}
#wpof-root .wpof-pin-subtitle {
  font-size: 14px;
  color: var(--wpof-text2);
  margin-bottom: 4px;
}
#wpof-root .wpof-pin-email {
  font-size: 15px;
  font-weight: 600;
  color: var(--wpof-dark);
  margin-bottom: 24px;
  letter-spacing: .3px;
}
#wpof-root .wpof-pin-inputs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}
#wpof-root .wpof-pin-digit {
  width: 56px;
  height: 64px;
  border: 2px solid var(--wpof-border);
  border-radius: var(--wpof-radius-sm);
  background: var(--wpof-cream);
  font-family: var(--wpof-font);
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  color: var(--wpof-dark);
  outline: none;
  transition: all var(--wpof-tr);
  caret-color: var(--wpof-orange);
}
#wpof-root .wpof-pin-digit:focus {
  border-color: var(--wpof-orange);
  box-shadow: 0 0 0 3px var(--wpof-orange-glow);
  background: var(--wpof-white);
}
#wpof-root .wpof-pin-digit:disabled {
  opacity: .45;
  cursor: not-allowed;
}
#wpof-root .wpof-pin-error {
  font-size: 13px;
  color: var(--wpof-red);
  font-weight: 500;
  margin-bottom: 8px;
}
#wpof-root .wpof-pin-resend {
  margin-top: 20px;
  font-size: 13px;
  color: var(--wpof-text3);
}
#wpof-root .wpof-pin-resend button {
  background: none;
  border: none;
  color: var(--wpof-orange);
  font-family: var(--wpof-font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color .15s;
}
#wpof-root .wpof-pin-resend button:hover:not(:disabled) {
  color: var(--wpof-orange-hover);
}
#wpof-root .wpof-pin-resend button:disabled {
  color: var(--wpof-text3);
  cursor: default;
  text-decoration: none;
}
#wpof-root .wpof-pin-expiry {
  margin-top: 12px;
  font-size: 12px;
  color: var(--wpof-text3);
}

/* ── TAB NAVIGATION (manufacturer only) ── */
#wpof-root .wpof-tabs {
  display: flex;
  background: var(--wpof-dark2);
  border-bottom: 2px solid #333;
  padding: 0 20px;
}
#wpof-root .wpof-tab {
  font-family: var(--wpof-font);
  font-size: 14px;
  font-weight: 600;
  color: #888;
  background: none;
  border: none;
  padding: 14px 24px;
  cursor: pointer;
  position: relative;
  transition: color .2s;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
}
#wpof-root .wpof-tab:hover { color: #ccc; }
#wpof-root .wpof-tab.active {
  color: var(--wpof-orange);
  border-bottom-color: var(--wpof-orange);
}

/* ── MANUFACTURER DASHBOARD ── */
#wpof-root .wpof-dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
#wpof-root .wpof-dash-search {
  display: flex;
  gap: 8px;
  flex: 1;
  max-width: 400px;
}
#wpof-root .wpof-dash-search .wpof-input {
  flex: 1;
  padding: 9px 14px;
  font-size: 13px;
}
#wpof-root .wpof-dash-filters {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
#wpof-root .wpof-dash-filter {
  font-family: var(--wpof-font);
  font-size: 13px;
  font-weight: 500;
  color: var(--wpof-text2);
  background: var(--wpof-cream);
  border: 1.5px solid var(--wpof-border);
  border-radius: 100px;
  padding: 7px 16px;
  cursor: pointer;
  transition: all .15s;
}
#wpof-root .wpof-dash-filter:hover { background: var(--wpof-orange-soft); border-color: rgba(232,115,26,.3); }
#wpof-root .wpof-dash-filter.active {
  background: var(--wpof-orange);
  color: var(--wpof-white);
  border-color: var(--wpof-orange);
}
#wpof-root .wpof-dash-filter-count {
  font-size: 11px;
  font-weight: 700;
  opacity: .7;
  margin-left: 4px;
}
#wpof-root .wpof-dash-filter.active .wpof-dash-filter-count { opacity: .9; }

/* Dashboard cards */
#wpof-root .wpof-dash-cards { display: flex; flex-direction: column; gap: 10px; }
#wpof-root .wpof-dash-card {
  background: var(--wpof-white);
  border: 1.5px solid var(--wpof-border);
  border-radius: var(--wpof-radius);
  overflow: hidden;
  transition: all .2s;
}
#wpof-root .wpof-dash-card.expanded {
  border-color: var(--wpof-orange);
  box-shadow: 0 4px 20px var(--wpof-orange-glow);
}
#wpof-root .wpof-dash-card-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  gap: 16px;
}
#wpof-root .wpof-dash-card-left { flex: 1; min-width: 0; }
#wpof-root .wpof-dash-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
#wpof-root .wpof-dash-order-num {
  font-family: var(--wpof-font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--wpof-dark);
}
#wpof-root .wpof-dash-status {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
#wpof-root .wpof-dash-status-pending { background: #fff8e1; color: #f39c12; border: 1px solid #f5d89a; }
#wpof-root .wpof-dash-status-confirmed { background: #e8f5e9; color: #27ae60; border: 1px solid #a5d6a7; }
#wpof-root .wpof-dash-status-cancelled { background: var(--wpof-red-bg); color: var(--wpof-red); border: 1px solid #f0c0c0; }
#wpof-root .wpof-dash-card-info {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
#wpof-root .wpof-dash-customer { font-size: 14px; font-weight: 600; color: var(--wpof-dark); }
#wpof-root .wpof-dash-email { font-size: 12px; color: var(--wpof-text3); }
#wpof-root .wpof-dash-card-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--wpof-text3);
}
#wpof-root .wpof-dash-card-meta span::before {
  content: '';
}
#wpof-root .wpof-dash-card-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
#wpof-root .wpof-dash-actions { display: flex; gap: 6px; }
#wpof-root .wpof-dash-btn {
  font-family: var(--wpof-font);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 6px;
  border: 1.5px solid;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
#wpof-root .wpof-dash-btn-confirm {
  background: #e8f5e9;
  color: #27ae60;
  border-color: #a5d6a7;
}
#wpof-root .wpof-dash-btn-confirm:hover { background: #c8e6c9; }
#wpof-root .wpof-dash-btn-cancel {
  background: var(--wpof-red-bg);
  color: var(--wpof-red);
  border-color: #f0c0c0;
}
#wpof-root .wpof-dash-btn-cancel:hover { background: #fdeaea; }
#wpof-root .wpof-dash-btn-revert {
  background: #fff8e1;
  color: #f39c12;
  border-color: #f5d89a;
}
#wpof-root .wpof-dash-btn-revert:hover { background: #fff3cd; }
#wpof-root .wpof-dash-btn-delete {
  background: #fff;
  color: #999;
  border-color: #ddd;
}
#wpof-root .wpof-dash-btn-delete:hover { background: var(--wpof-red-bg); color: var(--wpof-red); border-color: #f0c0c0; }
#wpof-root .wpof-dash-btn-edit {
  background: #fff;
  color: var(--wpof-orange);
  border-color: #f5d0a9;
}
#wpof-root .wpof-dash-btn-edit:hover { background: var(--wpof-orange-soft); }
#wpof-root .wpof-dash-toggle {
  font-family: var(--wpof-font);
  font-size: 12px;
  color: var(--wpof-text3);
  background: none;
  border: 1px solid var(--wpof-border);
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  transition: all .15s;
  display: flex;
  align-items: center;
  gap: 4px;
}
#wpof-root .wpof-dash-toggle:hover { color: var(--wpof-orange); border-color: var(--wpof-orange); }
#wpof-root .wpof-dash-toggle .wpof-la { font-size: 10px; transition: transform .25s; }
#wpof-root .wpof-dash-toggle.open .wpof-la { transform: rotate(180deg); }
#wpof-root .wpof-dash-updating {
  font-size: 12px;
  color: var(--wpof-text3);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Detail section */
#wpof-root .wpof-dash-detail {
  border-top: 1px solid var(--wpof-border);
  padding: 20px;
  background: var(--wpof-cream);
}
#wpof-root .wpof-dash-detail-section {
  margin-bottom: 20px;
}
#wpof-root .wpof-dash-detail-section:last-child { margin-bottom: 0; }
#wpof-root .wpof-dash-detail-section h4 {
  font-family: var(--wpof-font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--wpof-dark);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--wpof-border);
}
#wpof-root .wpof-dash-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 20px;
  font-size: 13px;
}
#wpof-root .wpof-dash-info-grid div span { color: var(--wpof-text3); }
#wpof-root .wpof-dash-info-grid div strong { color: var(--wpof-dark); }
#wpof-root .wpof-dash-full-row { grid-column: span 2; }
#wpof-root .wpof-dash-line-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--wpof-border);
}
#wpof-root .wpof-dash-line-item:last-child { border-bottom: none; }
#wpof-root .wpof-dash-line-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--wpof-orange);
  color: var(--wpof-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
#wpof-root .wpof-dash-line-dims { font-size: 13px; font-weight: 600; color: var(--wpof-dark); }
#wpof-root .wpof-dash-line-extras { font-size: 12px; color: var(--wpof-text2); margin-top: 2px; }
#wpof-root .wpof-dash-file-link {
  display: inline-block;
  font-size: 12px;
  color: var(--wpof-orange);
  text-decoration: none;
  padding: 4px 10px;
  background: var(--wpof-orange-soft);
  border-radius: 4px;
  margin: 2px 4px 2px 0;
  font-weight: 500;
}
#wpof-root .wpof-dash-file-link:hover { text-decoration: underline; }
#wpof-root .wpof-dash-history-entry {
  padding: 8px 0;
  border-bottom: 1px solid var(--wpof-border);
  font-size: 12px;
}
#wpof-root .wpof-dash-history-entry:last-child { border-bottom: none; }
#wpof-root .wpof-dash-history-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
#wpof-root .wpof-dash-history-rev { font-weight: 700; color: var(--wpof-dark); }
#wpof-root .wpof-dash-history-who {
  background: var(--wpof-cream);
  padding: 1px 8px;
  border-radius: 100px;
  border: 1px solid var(--wpof-border);
  color: var(--wpof-text2);
  font-size: 11px;
}
#wpof-root .wpof-dash-history-date { color: var(--wpof-text3); margin-left: auto; }
#wpof-root .wpof-dash-history-change { margin: 2px 0; }
#wpof-root .wpof-dash-history-field { color: var(--wpof-text2); font-weight: 500; }
#wpof-root .wpof-dash-history-more { font-style: italic; color: var(--wpof-text3); margin-top: 4px; }

/* Pagination */
#wpof-root .wpof-dash-pagination {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 20px;
}
#wpof-root .wpof-dash-page-btn,
#wpof-root .wpof-dash-page-num {
  font-family: var(--wpof-font);
  font-size: 13px;
  padding: 8px 14px;
  border: 1px solid var(--wpof-border);
  border-radius: 6px;
  background: var(--wpof-white);
  color: var(--wpof-text);
  cursor: pointer;
  transition: all .15s;
}
#wpof-root .wpof-dash-page-btn:hover:not(:disabled),
#wpof-root .wpof-dash-page-num:hover { border-color: var(--wpof-orange); color: var(--wpof-orange); }
#wpof-root .wpof-dash-page-btn:disabled { opacity: .3; cursor: default; }
#wpof-root .wpof-dash-page-num.active {
  background: var(--wpof-orange);
  color: var(--wpof-white);
  border-color: var(--wpof-orange);
}

/* Confirmation dialog overlay */
#wpof-root .wpof-dash-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: wpofFadeUp .2s ease-out;
}
#wpof-root .wpof-dash-dialog {
  background: var(--wpof-white);
  border-radius: var(--wpof-radius);
  padding: 32px;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
#wpof-root .wpof-dash-dialog h3 {
  font-family: var(--wpof-font-display);
  font-size: 20px;
  margin-bottom: 12px;
  color: var(--wpof-dark);
}
#wpof-root .wpof-dash-dialog p { font-size: 14px; color: var(--wpof-text2); margin-bottom: 8px; }
#wpof-root .wpof-dash-dialog-note { font-size: 12px; color: var(--wpof-text3); font-style: italic; }
#wpof-root .wpof-dash-dialog-btns { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

/* Trash bar above order list */
#wpof-root .wpof-dash-trash-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  margin-bottom: 16px;
  background: #fef3e2;
  border: 1.5px solid #f5d89a;
  border-radius: var(--wpof-radius-sm);
  font-size: 13px;
  color: #d68300;
}
/* Trashed card styling */
#wpof-root .wpof-dash-card.trashed {
  opacity: .8;
  border-color: #f5d89a;
  background: #fffcf5;
}
#wpof-root .wpof-dash-card.trashed:hover { opacity: 1; }
/* Trash button (lighter, non-destructive look) */
#wpof-root .wpof-dash-btn-trash {
  background: #fff;
  color: #999;
  border-color: #ddd;
}
#wpof-root .wpof-dash-btn-trash:hover { background: var(--wpof-red-bg); color: var(--wpof-red); border-color: #f0c0c0; }
/* Disabled purge button */
#wpof-root .wpof-dash-dialog-btns .wpof-btn:disabled {
  opacity: .4;
  cursor: not-allowed;
}

/* ══════════════ TABLET 769-1024px ══════════════ */
@media (min-width: 769px) and (max-width: 1024px) {
  #wpof-root .wpof-g4 { grid-template-columns: 1fr 1fr 1fr; }
  #wpof-root .wpof-card { padding: 30px 28px; }
}

/* ══════════════ DESKTOP >= 1025px ══════════════ */
@media (min-width: 1025px) {
  #wpof-root .wpof-main { padding: 36px 20px 56px; }
}

/* ══════════════ DASHBOARD MOBILE ══════════════ */
@media (max-width: 768px) {
  #wpof-root .wpof-card--dashboard { padding: 16px 14px; }
  #wpof-root .wpof-tabs { padding: 0 12px; }
  #wpof-root .wpof-tab { padding: 12px 16px; font-size: 13px; }

  /* Header + search: stack vertically */
  #wpof-root .wpof-dash-header { flex-direction: column; align-items: stretch; gap: 12px; }
  #wpof-root .wpof-dash-header .wpof-title { font-size: 20px; }
  #wpof-root .wpof-dash-search { max-width: none; }

  /* Filters: allow full-width scroll on very narrow screens */
  #wpof-root .wpof-dash-filters { gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; padding-bottom: 4px; }
  #wpof-root .wpof-dash-filter { flex-shrink: 0; }

  /* Card: stack main content vertically */
  #wpof-root .wpof-dash-card-main { flex-direction: column; align-items: stretch; gap: 10px; padding: 14px 16px; }

  /* Card right: buttons wrap into rows */
  #wpof-root .wpof-dash-card-right { flex-wrap: wrap; gap: 8px; }
  #wpof-root .wpof-dash-actions { flex-wrap: wrap; gap: 6px; flex: 1; }
  #wpof-root .wpof-dash-toggle { margin-left: auto; }

  /* Meta: wrap and space better */
  #wpof-root .wpof-dash-card-meta { flex-wrap: wrap; gap: 6px 12px; }

  /* Detail section: tighter on mobile */
  #wpof-root .wpof-dash-detail { padding: 16px; }
  #wpof-root .wpof-dash-info-grid { grid-template-columns: 1fr; gap: 4px; }
  #wpof-root .wpof-dash-full-row { grid-column: span 1; }

  /* History meta: allow date to wrap below */
  #wpof-root .wpof-dash-history-meta { gap: 6px; }
  #wpof-root .wpof-dash-history-date { margin-left: 0; font-size: 11px; }

  /* Pagination: smaller on mobile */
  #wpof-root .wpof-dash-page-btn,
  #wpof-root .wpof-dash-page-num { padding: 6px 10px; font-size: 12px; }

  /* Dialog */
  #wpof-root .wpof-dash-dialog { padding: 24px 20px; }
  #wpof-root .wpof-dash-dialog-btns { flex-direction: column; }
  #wpof-root .wpof-dash-dialog-btns .wpof-btn { width: 100%; justify-content: center; text-align: center; }
}

@media (max-width: 480px) {
  #wpof-root .wpof-card--dashboard { padding: 10px 8px; }
  #wpof-root .wpof-tab { padding: 10px 12px; font-size: 12px; }
  #wpof-root .wpof-dash-header .wpof-title { font-size: 18px; }

  /* Search input: full width, stack button below on very small */
  #wpof-root .wpof-dash-search { flex-direction: column; }
  #wpof-root .wpof-dash-search .wpof-btn-sm { width: 100%; text-align: center; }

  /* Cards: tighter padding */
  #wpof-root .wpof-dash-card-main { padding: 12px; gap: 8px; }

  /* Order number + status: stack if needed */
  #wpof-root .wpof-dash-card-top { gap: 6px; }
  #wpof-root .wpof-dash-order-num { font-size: 15px; }
  #wpof-root .wpof-dash-status { font-size: 10px; padding: 2px 8px; }

  /* Customer info: stack */
  #wpof-root .wpof-dash-card-info { flex-direction: column; gap: 2px; }
  #wpof-root .wpof-dash-customer { font-size: 13px; }
  #wpof-root .wpof-dash-email { font-size: 11px; }

  /* Meta */
  #wpof-root .wpof-dash-card-meta { font-size: 11px; gap: 4px 10px; }

  /* Buttons: smaller sizing */
  #wpof-root .wpof-dash-btn { padding: 5px 10px; font-size: 11px; }
  #wpof-root .wpof-dash-toggle { padding: 5px 10px; font-size: 11px; }

  /* Detail: tighter */
  #wpof-root .wpof-dash-detail { padding: 12px; }
  #wpof-root .wpof-dash-detail-section h4 { font-size: 13px; }
  #wpof-root .wpof-dash-info-grid { font-size: 12px; }
  #wpof-root .wpof-dash-line-dims { font-size: 12px; }
  #wpof-root .wpof-dash-line-extras { font-size: 11px; }

  /* Filters: smaller */
  #wpof-root .wpof-dash-filter { padding: 5px 10px; font-size: 11px; }

  /* Files: smaller */
  #wpof-root .wpof-dash-file-link { font-size: 11px; padding: 3px 8px; }

  /* Pagination */
  #wpof-root .wpof-dash-page-btn,
  #wpof-root .wpof-dash-page-num { padding: 5px 8px; font-size: 11px; }
}
