/* Product Wizard — Layout A chrome. All rules scoped under .pw */
.pw { padding: 20px; }
.pw-card {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 13px;
  box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 10px 30px rgba(16,24,40,.06);
  overflow: hidden; font-size: 13px; color: #111827;
}
/* ---- landing ---- */
.pw-landing-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.pw-landing-title { font-size: 18px; font-weight: 650; margin: 0 0 3px; }
.pw-landing-sub { color: #6b7280; font-size: 13px; margin: 0; }
.pw-draft-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.pw-draft-card {
  text-align: left; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
  padding: 14px 15px; cursor: pointer; display: flex; flex-direction: column; gap: 8px;
  box-shadow: 0 1px 2px rgba(16,24,40,.04); transition: .15s border-color, .15s box-shadow, .15s transform;
}
.pw-draft-card:hover { border-color: #99f6e4; box-shadow: 0 6px 18px rgba(16,24,40,.08); transform: translateY(-2px); }
.pw-draft-top { display: flex; align-items: center; gap: 8px; }
.pw-draft-name { flex: 1; font-weight: 620; font-size: 14px; color: #111827; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pw-draft-untitled { color: #9ca3af; font-style: italic; font-weight: 500; }
.pw-draft-type { flex: none; font-size: 10.5px; font-weight: 700; color: #0f766e; background: #f0fdfa; border: 1px solid #ccfbf1; border-radius: 999px; padding: 1px 8px; }
.pw-draft-meta { font-size: 12px; color: #6b7280; display: flex; gap: 8px; min-height: 16px; }
.pw-draft-comp { color: #9ca3af; }
.pw-draft-foot { font-size: 12px; font-weight: 600; color: #0f766e; margin-top: 2px; }
.pw-landing-empty { color: #9ca3af; font-size: 13px; padding: 32px; text-align: center; border: 1px dashed #e5e7eb; border-radius: 12px; }

.pw-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 18px; border-bottom: 1px solid #e5e7eb;
}
.pw-bar-left { display: flex; align-items: center; gap: 14px; }
.pw-back { border: none; background: none; color: #0f766e; font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 0; }
.pw-back:hover { text-decoration: underline; }
.pw-title { font-weight: 640; font-size: 15px; }
.pw-muted { color: #9ca3af; font-weight: 500; }
.pw-bar-right { display: flex; align-items: center; gap: 12px; }
.pw-save-status { font-size: 12px; }
.pw-status-saving { color: #6b7280; }
.pw-status-ok { color: #0f766e; }
.pw-status-error { color: #dc2626; }

.pw-row { display: flex; }

.pw-nav { width: 30%; max-width: 280px; border-right: 1px solid #e5e7eb; padding: 12px; background: #fcfcfd; }
.pw-nav-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  border: none; background: none; padding: 9px 11px; border-radius: 9px;
  color: #374151; font-size: 13px; cursor: pointer;
}
.pw-nav-item:hover { background: #f3f4f6; }
.pw-nav-item.active { background: #f0fdfa; color: #0f766e; font-weight: 640; }
.pw-nav-label { flex: 1; }

.pw-dot {
  flex: none; width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: #fff; font-weight: 700;
}
.pw-dot.pw-done { background: #0d9488; }
.pw-dot.pw-part { background: #d97706; }
.pw-dot.pw-empty { background: #fff; border: 1.5px solid #9ca3af; }

.pw-prog { margin: 12px 6px 2px; font-size: 11.5px; color: #6b7280; }
.pw-bar-progress { height: 6px; border-radius: 4px; background: #e5e7eb; margin-top: 6px; overflow: hidden; }
.pw-bar-progress > i { display: block; height: 100%; background: #0d9488; border-radius: 4px; }

.pw-panel { flex: 1; padding: 18px 22px; display: flex; flex-direction: column; }
.pw-content { flex: 1; }
.pw-h { margin: 0 0 3px; font-size: 15px; font-weight: 640; }
.pw-sub { color: #6b7280; font-size: 12.5px; margin: 0 0 16px; }
.pw-placeholder {
  color: #9ca3af; font-size: 13px; padding: 28px; text-align: center;
  border: 1px dashed #e5e7eb; border-radius: 10px;
}

/* form fields */
.pw-group { margin-bottom: 20px; }
.pw-glabel {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: #9ca3af;
  font-weight: 700; margin: 0 0 12px; padding-bottom: 5px; border-bottom: 1px solid #f1f5f9;
}
.pw-glabel-mut { font-weight: 500; text-transform: none; letter-spacing: 0; }
.pw-grid { display: grid; gap: 12px 16px; grid-template-columns: 1fr 1fr 1fr; }
.pw-grid .pw-span2 { grid-column: span 2; }
.pw-field label {
  display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .03em;
  color: #6b7280; margin-bottom: 4px; font-weight: 600;
}
.pw-field .form-control, .pw-field .form-select { font-size: 12.5px; }
.pw-req { color: #dc2626; }
.pw-hint { font-size: 12px; color: #6b7280; margin-top: 14px; }
@media (max-width: 880px) { .pw-grid { grid-template-columns: 1fr; } }

/* clickable field that opens an editor modal (e.g. Description) */
.pw-clickfield {
  min-height: 31px; border: 1px solid #d1d5db; border-radius: 7px; background: #fff;
  padding: 5px 11px; font-size: 12.5px; display: flex; align-items: center; gap: 8px; cursor: pointer;
}
.pw-clickfield:hover { border-color: #9ca3af; }
.pw-clickfield-val { flex: 1; color: #1f2937; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pw-clickfield-ph { flex: 1; color: #9ca3af; }
.pw-clickfield-ic { color: #9ca3af; font-size: 13px; }

.pw-modal-overlay {
  position: fixed; inset: 0; background: rgba(17,24,39,.45);
  display: flex; align-items: center; justify-content: center; z-index: 1080; padding: 20px;
}
.pw-modal { background: #fff; border-radius: 13px; box-shadow: 0 20px 60px rgba(0,0,0,.3); width: min(640px, 100%); padding: 18px; }
.pw-modal-head { display: flex; align-items: center; justify-content: space-between; font-weight: 640; font-size: 15px; margin-bottom: 12px; }
.pw-modal-x { border: none; background: none; font-size: 22px; line-height: 1; color: #9ca3af; cursor: pointer; }
.pw-modal textarea { font-size: 13px; }
.pw-modal-foot { display: flex; justify-content: flex-end; margin-top: 14px; }

/* Option C contextual type banner (used once sections gain content) */
.pw-typenote {
  display: flex; align-items: flex-start; gap: 10px;
  background: #f8fafc; border: 1px solid #eef2f7; border-radius: 10px;
  padding: 11px 13px; font-size: 12.5px; color: #374151; margin-bottom: 16px;
}
.pw-typenote .pw-ic {
  flex: none; width: 18px; height: 18px; border-radius: 50%; margin-top: 1px;
  background: #f0fdfa; color: #0f766e; border: 1px solid #ccfbf1;
  font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.pw-typenote b { color: #111827; }

/* tranche tabs */
.pw-tranche-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.pw-ttab {
  border: 1px solid #e5e7eb; background: #fff; color: #374151; cursor: pointer;
  font-size: 12.5px; font-weight: 600; border-radius: 8px; padding: 6px 12px;
}
.pw-ttab:hover { border-color: #99f6e4; }
.pw-ttab.active { background: #f0fdfa; border-color: #5eead4; color: #0f766e; }
.pw-ttab-isin { font-weight: 500; color: #9ca3af; }
.pw-ttab.active .pw-ttab-isin { color: #0f766e; }
.pw-ttab-add {
  border: 1px dashed #cbd5e1; background: #fff; color: #0f766e; cursor: pointer;
  font-size: 12.5px; font-weight: 600; border-radius: 8px; padding: 6px 12px;
}
.pw-ttab-add:hover { border-color: #5eead4; background: #f0fdfa; }

.pw-check { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: #374151; font-weight: 500; text-transform: none; letter-spacing: 0; margin: 0; height: 31px; }
.pw-check input { width: 15px; height: 15px; }
.pw-interest-toggle { height: auto; margin: -4px 0 12px; }

/* Listing & custody Yes/No segmented rows (untouched=white, Yes=teal, No=slate) */
.pw-seg-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #f1f5f9; max-width: 520px; }
.pw-seg-row:last-child { border-bottom: none; }
.pw-seg-lbl { font-size: 12.5px; color: #374151; font-weight: 500; }
.pw-seg { display: inline-flex; border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden; }
.pw-seg button { border: none; background: #fff; font-size: 12px; font-weight: 600; padding: 4px 16px; color: #6b7280; cursor: pointer; }
.pw-seg button + button { border-left: 1px solid #e5e7eb; }
.pw-seg button:hover { background: #f9fafb; }
.pw-seg button.on-yes { background: #0d9488; color: #fff; }
.pw-seg button.on-no { background: #64748b; color: #fff; }

/* inline bank-account picker */
.pw-bankpick { display: flex; flex-direction: column; gap: 6px; }
.pw-bankpick-list { border: 1px solid #e5e7eb; border-radius: 8px; max-height: 184px; overflow-y: auto; background: #fff; }
.pw-bankpick-row {
  display: flex; align-items: baseline; gap: 9px; width: 100%; text-align: left;
  border: none; border-bottom: 1px solid #f1f5f9; background: #fff; cursor: pointer;
  padding: 6px 11px; font-size: 12px; color: #374151;
}
.pw-bankpick-row:last-child { border-bottom: none; }
.pw-bankpick-row:hover { background: #f0fdfa; }
.pw-bankpick-id { flex: none; color: #0f766e; font-weight: 600; }
.pw-bankpick-name { font-weight: 500; color: #111827; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pw-bankpick-meta { margin-left: auto; flex: none; color: #9ca3af; }
.pw-bankpick-empty { padding: 9px 11px; color: #9ca3af; font-size: 12px; }
.pw-bankpick-selected {
  display: flex; align-items: center; gap: 8px; min-height: 31px;
  border: 1px solid #d1d5db; border-radius: 7px; padding: 5px 11px; font-size: 12.5px; color: #1f2937;
}
.pw-bankpick-selected span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pw-bankpick-clear { flex: none; border: none; background: none; color: #9ca3af; font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; }
.pw-bankpick-clear:hover { color: #dc2626; }

/* create-new underlying form (Option C: tinted accent panel) */
.pw-pickrow { display: flex; gap: 8px; align-items: flex-start; }
.pw-pickrow .pw-bankpick { flex: 1; }
.pw-newbtn {
  flex: none; border: 1px dashed #cbd5e1; background: #fff; color: #0f766e; cursor: pointer;
  font-size: 12.5px; font-weight: 600; border-radius: 8px; padding: 6px 13px; transition: .15s;
}
.pw-newbtn:hover { border-color: #5eead4; background: #f0fdfa; }
.pw-newbtn.is-open { background: #0d9488; border-color: #0d9488; color: #fff; border-style: solid; }
.pw-uform {
  margin-top: 14px; background: #f7fefd; border: 1px solid #e6faf6; border-left: 3px solid #2dd4bf;
  border-radius: 0 12px 12px 0; padding: 16px 18px; max-width: 760px;
}
.pw-uform-title { margin: 0 0 12px; padding: 0; border: 0; }
.pw-sublabel { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: #9ca3af; font-weight: 700; margin: 16px 0 6px; }
.pw-bm { max-width: 660px; }
.pw-bm-row { display: grid; grid-template-columns: 1.25fr 1fr 26px; gap: 8px; align-items: center; padding: 5px 0; }
.pw-bm-row + .pw-bm-row { border-top: 1px solid #f4f5f7; }
.pw-bm-x { border: none; background: none; color: #cbd5e1; font-size: 17px; line-height: 1; cursor: pointer; padding: 0; }
.pw-bm-x:hover { color: #dc2626; }
.pw-bm-add { border: none; background: none; color: #0f766e; font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 6px 0 0; }
.pw-uform-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.pw-btn-ghost { background: #fff; border: 1px solid #d1d5db; color: #374151; font-size: 12.5px; font-weight: 600; border-radius: 8px; padding: 6px 14px; cursor: pointer; }
.pw-btn-ghost:hover { background: #f9fafb; }

/* account-underlyings (product-level bank-account links) */
.pw-au-divider { border: 0; border-top: 1px solid #eef0f3; margin: 22px 0 18px; }
.pw-au-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; max-width: 640px; }
.pw-au-row { border: 1px solid #e5e7eb; border-radius: 9px; padding: 9px 11px; }
.pw-au-row-top { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.pw-au-row-top span { flex: 1; font-size: 12.5px; font-weight: 500; color: #1f2937; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pw-au-notelbl { font-size: 10px; text-transform: uppercase; letter-spacing: .03em; color: #9ca3af; font-weight: 600; margin-bottom: 3px; }
.pw-au-row textarea { font-size: 12.5px; }
.pw-au-pick { max-width: 620px; margin-top: 4px; }
.pw-au-pickfoot { display: flex; justify-content: flex-end; margin-top: 8px; }

/* Linked Bankaccounts cards (role badge + account + notes) */
.pw-lb-card { border: 1px solid #e5e7eb; border-radius: 9px; padding: 9px 11px; }
.pw-lb-top { display: flex; align-items: center; gap: 9px; }
.pw-lb-acct { flex: 1; font-size: 12.5px; font-weight: 500; color: #1f2937; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pw-relbadge { flex: none; font-size: 10.5px; font-weight: 700; color: #0f766e; background: #f0fdfa; border: 1px solid #ccfbf1; border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.pw-au-notefield { margin-top: 12px; }

/* Contacts table (teal-accented, borderless cells) */
.pw-ct { border: 1px solid #e5e7eb; border-radius: 11px; overflow: hidden; margin-bottom: 14px; }
.pw-ct-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.pw-ct-table thead th {
  text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .04em;
  color: #0f766e; font-weight: 700; padding: 9px 10px; background: #f0fdfa; border-bottom: 1px solid #ccfbf1;
}
.pw-ct-table tbody td { padding: 4px 6px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.pw-ct-table tbody tr:last-child td { border-bottom: none; }
.pw-ct-table tbody tr:hover { background: #f7fefd; }
.pw-ct-table th.pw-ct-role { width: 165px; }
.pw-ct-table th.pw-ct-phone { width: 140px; }
.pw-ct-table th.pw-ct-x { width: 30px; }
.pw-ct-table .form-control, .pw-ct-table .form-select {
  border-color: transparent; background: transparent; box-shadow: none; padding: 4px 7px;
}
.pw-ct-table tr:hover .form-control, .pw-ct-table tr:hover .form-select { border-color: #e5e7eb; }
.pw-ct-table .form-control:focus, .pw-ct-table .form-select:focus {
  border-color: #5eead4; background: #fff; box-shadow: 0 0 0 2px rgba(45,212,191,.18);
}
.pw-ct-table td .pw-bankpick-clear { display: block; margin: 0 auto; }

/* undo banner after removing a tranche */
.pw-undo {
  display: flex; align-items: center; gap: 10px; margin-bottom: 16px;
  background: #fffbeb; border: 1px solid #fde68a; border-radius: 9px; padding: 9px 13px; font-size: 12.5px; color: #92400e;
}
.pw-undo-msg { flex: 1; }
.pw-undo-btn { border: none; background: none; color: #b45309; font-weight: 700; cursor: pointer; padding: 0; }
.pw-undo-btn:hover { text-decoration: underline; }
.pw-undo-x { border: none; background: none; color: #b45309; font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; opacity: .7; }
.pw-undo-x:hover { opacity: 1; }

.pw-tranche-actions { margin-top: 4px; }
.pw-remove { border: none; background: none; color: #dc2626; font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 0; }
.pw-remove:hover { text-decoration: underline; }

.pw-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  margin-top: 18px; padding-top: 14px; border-top: 1px solid #e5e7eb;
}
.pw-foot-right { display: flex; gap: 10px; }
.pw-btn-teal {
  background: #0d9488; border: 1px solid #0d9488; color: #fff;
  font-size: 12.5px; font-weight: 600; border-radius: 8px; padding: 6px 14px; cursor: pointer;
}
.pw-btn-teal:hover { background: #0f766e; border-color: #0f766e; }

/* Review & promote — recap cards + gate panel */
.rv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.rv-sec { border: 1px solid #e5e7eb; border-radius: 11px; padding: 13px 15px; }
.rv-sec-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.rv-sec-title { font-size: 13px; font-weight: 680; color: #111827; }
.rv-pill { flex: none; font-size: 10px; font-weight: 700; border-radius: 999px; padding: 2px 9px; text-transform: uppercase; letter-spacing: .03em; }
.rv-pill.done { color: #0f766e; background: #f0fdfa; border: 1px solid #ccfbf1; }
.rv-pill.part { color: #b45309; background: #fffbeb; border: 1px solid #fde68a; }
.rv-pill.empty { color: #6b7280; background: #f9fafb; border: 1px solid #e5e7eb; }
.rv-edit { margin-left: auto; font-size: 12px; font-weight: 600; color: #0f766e; text-decoration: none; cursor: pointer; }
.rv-edit:hover { text-decoration: underline; }
.rv-kv { display: grid; grid-template-columns: 132px 1fr; gap: 3px 12px; font-size: 12.5px; margin: 0; }
.rv-kv dt { color: #9ca3af; font-weight: 500; }
.rv-kv dd { color: #1f2937; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-kv dd.muted { color: #cbd5e1; }
.rv-line { font-size: 12.5px; color: #374151; padding: 3px 0; border-bottom: 1px solid #f4f5f7; display: flex; gap: 8px; align-items: baseline; }
.rv-line:last-child { border-bottom: none; }
.rv-line.rv-bad { color: #b91c1c; }
.rv-badge { flex: none; font-size: 10px; font-weight: 700; color: #0f766e; background: #f0fdfa; border: 1px solid #ccfbf1; border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.rv-line.rv-bad .rv-badge { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.rv-bad-tag { margin-left: auto; flex: none; font-size: 10px; font-weight: 700; color: #b91c1c; }
.rv-none { color: #cbd5e1; }
.rv-empty { font-size: 12.5px; color: #9ca3af; padding: 2px 0; }

.rv-gate { border-radius: 12px; padding: 16px 18px; }
.rv-gate.block { background: #fef2f2; border: 1px solid #fecaca; }
.rv-gate.ok { background: #f0fdfa; border: 1px solid #99f6e4; }
.rv-gate-h { font-size: 13px; font-weight: 700; margin: 0 0 10px; }
.rv-gate.block .rv-gate-h { color: #b91c1c; }
.rv-gate.ok .rv-gate-h { color: #0f766e; }
.rv-item { display: flex; gap: 8px; align-items: baseline; font-size: 12.5px; padding: 3px 0; }
.rv-item .ic { flex: none; width: 16px; text-align: center; font-weight: 700; }
.rv-item.rv-block .ic { color: #dc2626; }
.rv-item.rv-warn .ic { color: #d97706; }
.rv-item .what { color: #374151; }
.rv-optional { color: #9ca3af; }
.rv-item .fix { margin-left: auto; flex: none; font-size: 11.5px; color: #0f766e; font-weight: 600; cursor: pointer; }
.rv-item .fix:hover { text-decoration: underline; }
.rv-promote-row { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 14px; }
.rv-promote-hint { font-size: 12px; color: #6b7280; }

/* Issue price: value input + derived unit label (unit follows tranche.quotation_type) */
.pw-pricerow { display: flex; gap: 6px; align-items: center; }
.pw-pricerow input { flex: 1; min-width: 0; }
.pw-pricerow span { flex: none; white-space: nowrap; }

/* Product sheet section (Review step) — wraps the <product-sheet-generator> component */
.pw-ps { margin-top: 20px; padding-top: 16px; border-top: 1px solid #e5e7eb; }

/* inline field warning (e.g. issue-price unit vs quotation type) */
.pw-warn { font-size: 12px; color: #b45309; margin: 8px 0 0; }

@media (max-width: 880px) {
  .pw-row { flex-direction: column; }
  .pw-nav { width: 100%; max-width: none; border-right: none; border-bottom: 1px solid #e5e7eb; }
  .rv-grid { grid-template-columns: 1fr; }
}
