/* ============================================================
   Oku PCB Service — Quote Form v3  (JLCPCB-matched style)
   ============================================================ */

.oku-pcb-wrap {
  --blue:        #1677ff;
  --blue-light:  #e8f0fe;
  --green:       #1D9E75;
  --green-light: #e6f7f1;
  --green-dark:  #085041;
  --orange:      #d97706;
  --red:         #dc2626;
  --border:      #e4e7ec;
  --bg:          #f7f8fa;
  --white:       #ffffff;
  --text:        #1f2937;
  --text-2:      #6b7280;
  --text-3:      #9ca3af;
  --radius:      4px;
  --radius-md:   8px;
  --font:        -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --shadow:      0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);

  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  max-width: 1080px;
  margin: 0 auto;
  padding-bottom: 60px;
  line-height: 1.5;
}
.oku-pcb-wrap *, .oku-pcb-wrap *::before, .oku-pcb-wrap *::after {
  box-sizing: border-box; margin: 0; padding: 0;
}
.oku-pcb-wrap button { font-family: var(--font); cursor: pointer; border: none; background: none; }
.oku-pcb-wrap input  { font-family: var(--font); }

/* ── TOP BAR ── */
.oku-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.oku-topbar__title { font-size: 15px; font-weight: 700; color: var(--text); }
.oku-topbar__right { display: flex; align-items: center; gap: 10px; }
.oku-topbar__btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 12px; color: var(--text-2);
  transition: .15s;
}
.oku-topbar__btn:hover { border-color: var(--blue); color: var(--blue); }
.oku-topbar__flag { font-size: 12px; color: var(--text-3); }
.oku-topbar__filename {
  font-size: 12px; color: var(--text-2);
  max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ── UPLOAD PANEL ── */
.oku-upload-panel { margin-bottom: 20px; }

.oku-drop-zone {
  background: #eef4fe;
  border: 1.5px dashed #b8cef5;
  border-radius: var(--radius-md);
  padding: 44px 20px 36px;
  text-align: center;
  cursor: pointer;
  transition: .15s;
  outline: none;
  user-select: none;
}
.oku-drop-zone:hover, .oku-drop-zone:focus, .oku-drop-zone.is-dragover {
  background: #e0ecfd;
  border-color: var(--blue);
}

/* ── TOP PAGE LOADING BAR ── */
.oku-page-loader {
  position: fixed;
  top: 0; left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, #1677ff, #40a9ff);
  z-index: 99999;
  transition: width 0.25s ease;
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 8px rgba(22,119,255,.5);
  pointer-events: none;
  opacity: 0;
}
.oku-page-loader.is-loading { opacity: 1; }
.oku-page-loader.is-done {
  width: 100% !important;
  opacity: 0;
  transition: opacity 0.4s ease 0.2s;
}

/* ── BIG PILL BUTTON (JLCPCB style) — high specificity to beat themes ── */
.oku-pcb-wrap .oku-add-gerber-btn,
.oku-pcb-wrap .oku-add-gerber-btn:link,
.oku-pcb-wrap .oku-add-gerber-btn:visited {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  padding: 0 44px !important;
  height: 54px !important;
  min-width: 220px !important;
  background: #1677ff !important;
  background-color: #1677ff !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 999px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  font-family: var(--font) !important;
  letter-spacing: .01em !important;
  cursor: pointer !important;
  transition: background .15s, transform .1s, box-shadow .15s !important;
  box-shadow: 0 4px 18px rgba(22,119,255,.35) !important;
  margin-bottom: 14px !important;
  pointer-events: auto !important;
  text-decoration: none !important;
  outline: none !important;
  line-height: 1 !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}
.oku-pcb-wrap .oku-add-gerber-btn:hover {
  background: #0958d9 !important;
  background-color: #0958d9 !important;
  color: #ffffff !important;
  box-shadow: 0 6px 24px rgba(22,119,255,.45) !important;
  text-decoration: none !important;
}
.oku-pcb-wrap .oku-add-gerber-btn:active {
  transform: scale(.97) !important;
  background: #003eb3 !important;
}

.oku-drop-accept {
  font-size: 12px; color: #6b7280; margin-bottom: 8px;
}
.oku-drop-secure {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; color: #6b7280;
}
.oku-drop-secure svg { color: #6b7280; flex-shrink: 0; }

/* Upload progress — large bar style matching reference */
.oku-drop-state {}
.oku-uploading-state {
  padding: 8px 0 4px;
}
.oku-uploading-text {
  font-size: 14px; font-weight: 500; color: #374151;
  margin-bottom: 18px; text-align: center;
}
.oku-big-progress-wrap {
  display: flex; align-items: center; gap: 14px;
  width: 100%; max-width: 680px; margin: 0 auto;
}
.oku-big-progress-track {
  flex: 1; height: 22px;
  background: #e5e7eb;
  border-radius: 11px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.08);
}
.oku-big-progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #1677ff, #40a9ff);
  border-radius: 11px;
  transition: width 0.3s ease;
  position: relative;
  overflow: hidden;
}
.oku-big-progress-fill::after {
  content: '';
  position: absolute; top: 0; left: -100%; right: 0; bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.25), transparent);
  animation: oku-sheen 1.4s ease infinite;
}
@keyframes oku-sheen {
  0% { left: -100%; }
  100% { left: 100%; }
}
.oku-big-progress-pct {
  font-size: 15px; font-weight: 700;
  color: #1677ff; min-width: 42px; text-align: right;
  flex-shrink: 0;
}

.oku-drop-heading { font-size: 14px; font-weight: 600; margin-bottom: 10px; color: var(--text); }
.oku-spin-lg {
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid rgba(22,119,255,.18); border-top-color: var(--blue);
  animation: oku-spin .7s linear infinite;
  margin: 0 auto 14px;
}
@keyframes oku-spin { to { transform: rotate(360deg); } }
.oku-progress { width: 200px; height: 4px; background: #dde5f4; border-radius: 2px; margin: 10px auto 0; overflow: hidden; }
.oku-progress__bar { height: 100%; width: 0%; background: var(--blue); border-radius: 2px; animation: oku-pulse 1.4s ease infinite; }
@keyframes oku-pulse { 0%,100%{opacity:1} 50%{opacity:.55} }

/* ── BOARD PREVIEW PANEL ── */
.oku-board-panel {
  background: #f0f2f5;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 16px;
}
.oku-board-preview-wrap {
  display: flex;
  gap: 0;
  padding: 20px 24px;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  background: #f0f2f5;
}
.oku-board-canvas-front,
.oku-board-canvas-back {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  max-width: 420px;
}
.oku-board-canvas-front canvas,
.oku-board-canvas-back canvas {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 3px;
  box-shadow: 0 2px 12px rgba(0,0,0,.18);
}
.oku-board-detect-bar {
  padding: 10px 20px 14px;
  border-top: 1px solid rgba(0,0,0,.06);
  background: #f0f2f5;
}
.oku-board-detect-text {
  font-size: 13px; color: #374151; font-weight: 400;
}
.oku-parse-tag { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 99px; }
.oku-parse-tag--ok   { background: var(--green-light); color: var(--green); }
.oku-parse-tag--warn { font-size: 13px; color: #92400e; background: transparent; padding: 0; }

/* Gerber Viewer button */
.oku-topbar__btn--viewer {
  border-color: var(--border);
  color: var(--text-2);
}
.oku-topbar__btn--viewer:hover {
  border-color: var(--text-2);
  color: var(--text);
  background: #f5f5f5;
}

/* ── MAIN LAYOUT ── */
.oku-layout {
  display: grid;
  grid-template-columns: 1fr 284px;
  gap: 18px;
  align-items: start;
}
@media (max-width: 820px) {
  .oku-layout { grid-template-columns: 1fr; }
  .oku-price-panel { position: static !important; }
}

/* ── SPEC PANEL ── */
.oku-spec-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* Each spec row */
.oku-row {
  display: flex; align-items: flex-start;
  padding: 13px 20px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
  min-height: 52px;
}
.oku-row:last-child { border-bottom: none; }
.oku-row--inner {
  background: var(--bg);
  padding-left: 24px;
}

.oku-row__label {
  width: 138px; flex-shrink: 0;
  font-size: 13px; font-weight: 500; color: var(--text);
  display: flex; align-items: center; gap: 4px;
  padding-top: 4px;
}
.oku-row__ctrl { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.oku-row__ctrl--dim { flex-direction: row; align-items: center; gap: 6px; flex-wrap: wrap; }

/* Help badge */
.oku-help {
  display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px; border-radius: 50%;
  border: 1px solid #c0c8d4; font-size: 10px; font-weight: 700;
  color: var(--text-3); cursor: help; flex-shrink: 0;
  line-height: 1;
}

/* ── CHIPS (text only) ── */
.oku-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.oku-chip {
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 12.5px; color: var(--text);
  background: var(--white);
  transition: .12s; position: relative;
  white-space: nowrap;
}
.oku-chip:hover:not(:disabled) { border-color: var(--blue); color: var(--blue); }
.oku-chip.is-active {
  border-color: var(--blue); color: var(--blue);
  background: #f0f5ff; font-weight: 500;
}
/* Blue corner tick — exactly like JLCPCB */
.oku-chip.is-active::after {
  content: '';
  position: absolute; bottom: 0; right: 0;
  width: 0; height: 0;
  border-style: solid;
  border-width: 0 0 10px 10px;
  border-color: transparent transparent var(--blue) transparent;
}
.oku-chip.is-disabled, .oku-chip:disabled {
  color: #c0c8d4; border-color: #e9eaec; cursor: not-allowed;
  background: #f9f9f9;
}

/* ── COLOR CHIPS (dot + label, JLCPCB style) ── */
.oku-color-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.oku-color-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px 4px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 12.5px; color: var(--text);
  background: var(--white);
  transition: .12s; position: relative;
  cursor: pointer;
}
.oku-color-chip:hover { border-color: var(--blue); color: var(--blue); }
.oku-color-chip.is-active {
  border-color: var(--blue); color: var(--blue);
  background: #f0f5ff;
}
.oku-color-chip.is-active::after {
  content: '';
  position: absolute; bottom: 0; right: 0;
  width: 0; height: 0;
  border-style: solid;
  border-width: 0 0 10px 10px;
  border-color: transparent transparent var(--blue) transparent;
}
.oku-color-chip__dot {
  width: 13px; height: 13px; border-radius: 50%;
  flex-shrink: 0; display: block;
}
.oku-color-chip__label { font-size: 12.5px; }

/* ── DIMENSION INPUTS ── */
.oku-dim {
  width: 86px; height: 32px;
  padding: 0 8px; text-align: center;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 13px; color: var(--text);
  transition: .12s;
}
.oku-dim:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 2px rgba(22,119,255,.12); }
.oku-dim-x { font-size: 14px; color: var(--text-3); }
.oku-dim-unit { font-size: 12px; color: var(--text-3); }

/* ── QTY STEPPER ── */
.oku-qty-wrap { display: flex; flex-direction: column; gap: 8px; }
.oku-stepper {
  display: inline-flex; align-items: stretch;
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; width: fit-content;
}
.oku-stepper__btn {
  width: 30px; background: var(--bg); font-size: 16px;
  color: var(--text-2); border: none; transition: .12s; line-height: 1;
}
.oku-stepper__btn:hover { background: #e8f0fe; color: var(--blue); }
.oku-stepper__input {
  width: 60px; border: none;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  text-align: center; font-size: 13px; font-weight: 600;
  height: 30px; -moz-appearance: textfield;
}
.oku-stepper__input::-webkit-outer-spin-button,
.oku-stepper__input::-webkit-inner-spin-button { -webkit-appearance: none; }
.oku-stepper__input:focus { outline: none; background: #f0f5ff; }
.oku-qty-pills { display: flex; flex-wrap: wrap; gap: 5px; }
.oku-qty-pill {
  padding: 3px 9px; border: 1px solid var(--border);
  border-radius: 99px; font-size: 12px; color: var(--text-2);
  background: var(--white); transition: .12s;
}
.oku-qty-pill:hover { border-color: var(--blue); color: var(--blue); }

/* ── ACCORDION ── */
.oku-accordion { border-top: 1px solid var(--border); }
.oku-accordion__hd {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 13px 20px; background: var(--bg);
  font-size: 13px; font-weight: 700; color: var(--text);
  cursor: pointer; transition: .12s;
}
.oku-accordion__hd:hover { background: #eef0f3; }
.oku-accordion__chevron { transition: transform .2s; flex-shrink: 0; }
.oku-accordion__hd[aria-expanded="false"] .oku-accordion__chevron { transform: rotate(-90deg); }
.oku-accordion__bd { display: none; }
.oku-accordion__bd.is-open { display: block; }

/* ── PRICE PANEL ── */
.oku-price-panel { position: sticky; top: 72px; }
.oku-price-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.oku-price-card__head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.oku-price-card__title { font-size: 13px; font-weight: 700; }
.oku-price-card__cur {
  font-size: 11px; font-weight: 700; color: var(--green);
  background: var(--green-light); padding: 2px 8px; border-radius: 99px;
}

.oku-price-big { padding: 16px 16px 12px; border-bottom: 1px solid var(--border); }
.oku-price-big__amt {
  display: block; font-size: 30px; font-weight: 800;
  color: var(--green); line-height: 1; margin-bottom: 4px;
}
.oku-price-big__sub { font-size: 12px; color: var(--text-3); }

.oku-price-table {
  width: 100%; border-collapse: collapse;
  padding: 10px 16px; display: block;
}
.oku-price-table td { padding: 4px 16px; font-size: 12.5px; color: var(--text-2); }
.oku-price-table td:last-child { text-align: right; font-weight: 600; color: var(--text); }

.oku-price-card__btns { padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--border); }

.oku-btn-cart {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 42px;
  background: var(--green); color: #fff;
  border-radius: var(--radius); font-size: 13px; font-weight: 700;
  transition: .15s;
}
.oku-btn-cart:not(:disabled):hover { background: #168a62; }
.oku-btn-cart:not(:disabled):active { transform: scale(.98); }
.oku-btn-cart:disabled { opacity: .4; cursor: not-allowed; }

.oku-btn-checkout {
  width: 100%; height: 38px;
  border: 1.5px solid var(--blue); color: var(--blue);
  border-radius: var(--radius); font-size: 12.5px; font-weight: 600;
  transition: .15s; background: transparent;
}
.oku-btn-checkout:hover { background: var(--blue-light); }

.oku-price-msg {
  margin: 0 12px 10px; padding: 7px 10px;
  font-size: 12px; border-radius: var(--radius);
}
.oku-price-msg:empty { display: none; }
.oku-msg--success { background: var(--green-light); color: var(--green-dark); }
.oku-msg--error   { background: #fef2f2; color: var(--red); }
.oku-msg--info    { background: #eff6ff; color: #1d4ed8; }

.oku-upload-cue {
  display: flex; align-items: center; gap: 5px;
  padding: 0 16px 12px; font-size: 11.5px; color: var(--orange);
}

.oku-trust-list {
  padding: 10px 16px 14px;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 5px;
}
.oku-trust-item { font-size: 11px; color: var(--text-3); }

/* ── SHIMMER ── */
@keyframes oku-shimmer { 0%{background-position:-300px 0} 100%{background-position:300px 0} }
.oku-shimmer {
  background: linear-gradient(90deg,#f0f0f0 25%,#e4e4e4 50%,#f0f0f0 75%);
  background-size: 600px 100%;
  animation: oku-shimmer 1s ease infinite;
  border-radius: 3px; color: transparent !important;
  display: inline-block; min-width: 70px;
}

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .oku-row { flex-direction: column; gap: 8px; padding: 12px 14px; }
  .oku-row__label { width: auto; padding-top: 0; }
  .oku-preview-strip { flex-direction: column; }
}

/* ── DARK MODE ── */
@media (prefers-color-scheme: dark) {
  .oku-pcb-wrap {
    --border: rgba(255,255,255,.1); --bg: #1a1d22;
    --white: #22262d; --text: #e5e7eb; --text-2: #9ca3af; --text-3: #6b7280;
  }
  .oku-chip, .oku-color-chip, .oku-qty-pill { background: #22262d; color: #ddd; }
  .oku-chip.is-active, .oku-color-chip.is-active { background: #1e3a5f; }
  .oku-dim, .oku-stepper__input { background: #22262d; color: #e5e7eb; border-color: rgba(255,255,255,.15); }
  .oku-stepper__btn { background: #1a1d22; }
  .oku-preview-strip { background: #111315; }
  .oku-accordion__hd { background: #1a1d22; color: #e5e7eb; }
  .oku-drop-zone { background: #1a2235; border-color: #2a3a5a; }
  .oku-price-card__head { background: #1a1d22; }
  .oku-row--inner { background: #1e2128; }
}

/* ── REMARK TEXTAREA ── */
.oku-remark-input {
  width: 100%; padding: 8px 10px;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-family: var(--font); font-size: 13px; color: var(--text);
  resize: vertical; min-height: 68px;
  transition: .12s; line-height: 1.5;
  background: var(--white);
}
.oku-remark-input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 2px rgba(22,119,255,.12); }
.oku-remark-input::placeholder { color: var(--text-3); }
.oku-remark-counter { font-size: 11px; color: var(--text-3); text-align: right; display: block; margin-top: 4px; }

/* ── STENCIL PANEL ── */
.oku-stencil-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-top: 16px;
  grid-column: 1 / -1; /* spans full width below main layout */
}
.oku-stencil-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap; gap: 10px;
}
.oku-stencil-hd__left { display: flex; align-items: center; gap: 10px; }
.oku-stencil-hd__icon {
  width: 32px; height: 32px;
  background: #e8eaf0; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: #555; flex-shrink: 0;
}
.oku-stencil-hd__icon svg { width: 20px; height: 20px; }
.oku-stencil-hd__title { font-size: 14px; font-weight: 700; color: var(--text); }
.oku-stencil-hd__right { display: flex; align-items: center; gap: 10px; }
.oku-stencil-hd__note { font-size: 12px; color: var(--text-3); }

/* Toggle switch */
.oku-toggle { display: inline-flex; align-items: center; cursor: pointer; }
.oku-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.oku-toggle__track {
  width: 40px; height: 22px; border-radius: 11px;
  background: #d0d5dd; transition: .2s;
  position: relative; display: block;
}
.oku-toggle__track::after {
  content: ''; position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  border-radius: 50%; background: #fff;
  transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.oku-toggle input:checked + .oku-toggle__track { background: var(--blue); }
.oku-toggle input:checked + .oku-toggle__track::after { left: 21px; }

/* Stencil body rows */
.oku-row--stencil {
  display: flex; align-items: flex-start;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  gap: 12px; background: var(--white);
}
.oku-row--stencil:last-child { border-bottom: none; }
.oku-row--stencil .oku-row__label {
  width: 168px; flex-shrink: 0;
  font-size: 13px; font-weight: 500; color: var(--text);
  display: flex; align-items: center; gap: 4px;
  padding-top: 4px; flex-wrap: wrap;
}

/* Select field */
.oku-select-field {
  margin-top: 8px; width: auto; max-width: 100%;
  padding: 5px 28px 5px 10px; height: 32px;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 12.5px; color: var(--text); background: var(--white);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 5 5-5z' fill='%239ca3af'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center;
  transition: .12s; cursor: pointer;
}
.oku-select-field:focus { outline: none; border-color: var(--blue); }

/* "New" badge */
.oku-badge-new {
  display: inline-block; padding: 1px 5px;
  background: #f97316; color: #fff;
  border-radius: 3px; font-size: 9px; font-weight: 700;
  letter-spacing: .03em; line-height: 1.4;
  vertical-align: middle; margin-left: 2px;
}

/* Stencil panel spans full width in grid */
.oku-layout { position: relative; }
.oku-stencil-panel {
  width: 100%;
  grid-column: 1 / -1; /* span both columns */
}

/* Dark mode additions */
@media (prefers-color-scheme: dark) {
  .oku-remark-input { background: #22262d; border-color: rgba(255,255,255,.15); color: #e5e7eb; }
  .oku-stencil-panel { background: #22262d; }
  .oku-stencil-hd { background: #1a1d22; }
  .oku-stencil-hd__icon { background: #2a2f3a; color: #aaa; }
  .oku-row--stencil { background: #22262d; border-color: rgba(255,255,255,.1); }
  .oku-select-field { background: #22262d; color: #e5e7eb; border-color: rgba(255,255,255,.15); }
  .oku-toggle__track { background: #3a3f4a; }
}

/* ═══════════════════════════════════════════
   GERBER VIEWER (frontend)
═══════════════════════════════════════════ */
.oku-gv-wrap {
  background: #0f1117;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid #1e2330;
}

/* Header bar */
.oku-gv-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  height: 42px;
  background: #0d0f14;
  border-bottom: 1px solid #1e2330;
  flex-wrap: wrap;
}
.oku-gv-bar__left {
  display: flex; align-items: center; gap: 10px;
  overflow: hidden; flex: 1;
}
.oku-gv-filename {
  font-size: 11.5px; font-weight: 600;
  color: #64748b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.oku-gv-detect {
  font-size: 11px; color: #475569; white-space: nowrap;
}
.oku-gv-bar__right { flex-shrink: 0; }

/* Tabs */
.oku-gv-tabs {
  display: flex; align-items: center; gap: 2px;
  background: #0a0c11; border-radius: 6px; padding: 3px;
  flex-shrink: 0;
}
.oku-gv-tab {
  padding: 4px 20px;
  border-radius: 4px;
  font-size: 12px; font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: .15s;
  border: none; background: transparent;
}
.oku-gv-tab:hover { color: #94a3b8; }
.oku-gv-tab.active {
  background: #1677ff;
  color: #ffffff;
}

/* Canvas area */
.oku-gv-canvas-area {
  height: 360px;
  position: relative;
  overflow: hidden;
  background: #111318;
}
@media (max-width: 640px) { .oku-gv-canvas-area { height: 260px; } }

/* Loading */
.oku-gv-loading {
  position: absolute; inset: 0; z-index: 20;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; background: rgba(15,17,23,.9);
}
.oku-gv-spinner {
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid rgba(22,119,255,.18);
  border-top-color: #1677ff;
  animation: gv-spin .7s linear infinite;
}
@keyframes gv-spin { to { transform: rotate(360deg); } }
.oku-gv-loading p { font-size: 12px; color: #475569; }

/* Views */
.oku-gv-view {
  position: absolute; inset: 0;
  display: none;
}
.oku-gv-view.active { display: block; }

/* 2D */
#okuGVView2d {
  background: #1a2e1a;
  cursor: grab;
  overflow: hidden;
}
#okuGVView2d.panning { cursor: grabbing; }
.oku-gv-2d-mount {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  transform-origin: center center;
}
.oku-gv-2d-mount svg {
  max-width: 95%;
  max-height: 340px;
  display: block;
  filter: drop-shadow(0 4px 24px rgba(0,0,0,.6));
}

/* Zoom controls */
.oku-gv-zoom {
  position: absolute; bottom: 10px; right: 10px;
  display: flex; flex-direction: column; gap: 3px; z-index: 10;
}
.oku-gv-zoom-btn {
  width: 28px; height: 28px; border-radius: 5px;
  background: rgba(13,15,20,.88);
  border: 1px solid #1e2330;
  color: #94a3b8; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: .15s;
}
.oku-gv-zoom-btn:hover { background: #161820; color: #e2e8f0; }

/* 3D */
#okuGVView3d { background: #0f1117; }
.oku-gv-canvas3d { width: 100%; height: 100%; display: block; }
.oku-gv-3d-hint {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  font-size: 11px; color: #334155;
  background: rgba(13,15,20,.8); border-radius: 4px; padding: 3px 10px;
  pointer-events: none; white-space: nowrap;
}

/* Layers grid */
#okuGVViewLayers {
  overflow-y: auto;
  padding: 12px;
  background: #0a0c11;
}
.oku-gv-layers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.oku-gv-layer-card {
  background: #131620;
  border: 1px solid #1e2330;
  border-radius: 6px;
  overflow: hidden;
}
.oku-gv-layer-card__hd {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 10px;
  border-bottom: 1px solid #1e2330;
}
.oku-gv-layer-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.oku-gv-layer-name { font-size: 11px; font-weight: 700; color: #94a3b8; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oku-gv-layer-type { font-size: 10px; color: #334155; white-space: nowrap; }
.oku-gv-layer-body {
  background: #0a0c11;
  height: 100px;
  display: flex; align-items: center; justify-content: center; padding: 8px;
}
.oku-gv-layer-body svg { max-width: 100%; max-height: 90px; display: block; }
.oku-gv-layer-empty { font-size: 10px; color: #1e2330; }
