/*
 * Quotation Management System — shared by the customer / Sales pages (front layout) and the admin back-office.
 * Everything is namespaced "qt-" so it never touches the rest of the site. Navy #061A4A + red #F20D18.
 */
.qt-page, .qt-scope {
  --qt-navy: #061A4A; --qt-navy2: #0A2A6E; --qt-red: #F20D18; --qt-red-d: #c40a13;
  --qt-ink: #1E293B; --qt-text: #334155; --qt-mute: #64748B; --qt-faint: #94A3B8;
  --qt-line: #E6EBF5; --qt-soft: #F5F7FB; --qt-card: #fff;
  font-family: 'Noto Sans Thai', sans-serif; color: var(--qt-text);
}
.qt-page { max-width: 1060px; margin: 0 auto; }
.qt-page *, .qt-scope * { box-sizing: border-box; }
.qt-page h1, .qt-page h2, .qt-page h3, .qt-scope h2, .qt-scope h3 { font-family: 'Prompt', sans-serif; color: var(--qt-navy); }
.qt-mono { font-family: 'Prompt', sans-serif; font-variant-numeric: tabular-nums; }
.qt-muted { color: var(--qt-mute); }
.qt-faint { color: var(--qt-faint); }
.qt-right { text-align: right; }
.qt-center { text-align: center; }
.qt-hide { display: none !important; }

/* ---------- headings ---------- */
.qt-back { display: inline-block; font-family: 'Prompt', sans-serif; font-weight: 600; font-size: 14px; color: #2650b0; margin-bottom: 12px; }
.qt-titlebar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-bottom: 6px; }
.qt-titlebar h1 { font-size: clamp(24px, 4vw, 32px); margin: 0; letter-spacing: -.01em; }
.qt-titlebar .qt-rev { font-family: 'Prompt', sans-serif; font-weight: 600; font-size: 15px; color: var(--qt-mute); background: var(--qt-soft); border: 1px solid var(--qt-line); border-radius: 999px; padding: 3px 12px; }
.qt-project { font-size: 16px; color: var(--qt-ink); margin: 0 0 20px; }
.qt-project b { font-family: 'Prompt', sans-serif; color: var(--qt-navy); }

/* ---------- status badges ---------- */
.qt-badge { display: inline-flex; align-items: center; gap: 6px; font-family: 'Prompt', sans-serif; font-weight: 600; font-size: 12.5px; padding: 4px 12px; border-radius: 999px; white-space: nowrap; line-height: 1.5; }
.qt-badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.qt-st-pending               { background: #FFF4E0; color: #B45309; }
.qt-st-quoted                { background: #E7EDFB; color: #1E40AF; }
.qt-st-negotiating           { background: #FDEAEB; color: #C0262D; }
.qt-st-revision_issued       { background: #EDE9FE; color: #5B21B6; }
.qt-st-no_discount           { background: #EEF1F6; color: #475569; }
.qt-st-awaiting_confirmation { background: #DDF6FA; color: #0E7490; }
.qt-st-confirmed             { background: #E6F7EF; color: #127A52; }
.qt-st-po_created            { background: #CFF5E1; color: #065F46; }
.qt-st-cancelled             { background: #F1F5F9; color: #94A3B8; text-decoration: line-through; }
.qt-chip { display: inline-block; font-family: 'Prompt', sans-serif; font-weight: 500; font-size: 12px; padding: 2px 10px; border-radius: 999px; background: var(--qt-soft); border: 1px solid var(--qt-line); color: var(--qt-mute); }
.qt-chip.-red { background: #FDEAEB; border-color: #F8C9CC; color: #C0262D; }
.qt-chip.-green { background: #E6F7EF; border-color: #BDE6D2; color: #127A52; }
.qt-chip.-navy { background: #E7EDFB; border-color: #CBD9F5; color: #1E40AF; }

/* ---------- cards ---------- */
.qt-card { background: var(--qt-card); border: 1px solid var(--qt-line); border-radius: 16px; box-shadow: 0 10px 30px rgba(6,26,74,.05); padding: 22px 26px; margin-bottom: 22px; }
.qt-card > h2 { font-size: 18px; margin: 0 0 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.qt-card > h2 small { font-family: 'Noto Sans Thai', sans-serif; font-weight: 400; font-size: 13px; color: var(--qt-mute); }
.qt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px 28px; }
.qt-kv dt { font-size: 12.5px; color: var(--qt-faint); font-weight: 600; margin-bottom: 2px; }
.qt-kv dd { margin: 0 0 4px; font-size: 15px; color: var(--qt-ink); word-break: break-word; }
.qt-kv { margin: 0; }
.qt-two { display: grid; grid-template-columns: 1fr 330px; gap: 22px; align-items: start; }
.qt-two > * { min-width: 0; }
@media (max-width: 900px) { .qt-two { grid-template-columns: 1fr; } }

/* ---------- next-step banner ---------- */
.qt-banner { display: flex; gap: 14px; align-items: flex-start; border-radius: 14px; padding: 16px 20px; margin-bottom: 20px; border: 1px solid; }
.qt-banner .qt-ico { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-family: 'Prompt', sans-serif; font-weight: 700; font-size: 18px; }
.qt-banner b { display: block; font-family: 'Prompt', sans-serif; font-weight: 600; font-size: 16.5px; color: var(--qt-navy); margin-bottom: 2px; }
.qt-banner p { margin: 0; font-size: 14.5px; line-height: 1.7; color: var(--qt-text); }
.qt-banner.-act  { background: #FFF1F1; border-color: #F8C9CC; } .qt-banner.-act  .qt-ico { background: var(--qt-red); }
.qt-banner.-wait { background: #FFF8E8; border-color: #F5DDA6; } .qt-banner.-wait .qt-ico { background: #E8A317; }
.qt-banner.-done { background: #ECFDF5; border-color: #BBF7D0; } .qt-banner.-done .qt-ico { background: #1aae6f; }
.qt-banner.-off  { background: #F5F7FB; border-color: var(--qt-line); } .qt-banner.-off  .qt-ico { background: #94A3B8; }

/* ---------- buttons ---------- */
.qt-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 0 0 22px; }
.qt-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: 'Prompt', sans-serif; font-weight: 600; font-size: 15px; line-height: 1.2; padding: 12px 22px; border-radius: 12px; border: 1.5px solid transparent; cursor: pointer; text-decoration: none; transition: background .16s, transform .16s, box-shadow .16s, border-color .16s, color .16s; }
.qt-btn:hover { transform: translateY(-1px); }
.qt-btn:disabled, .qt-btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.qt-btn.-primary { background: var(--qt-red); color: #fff; box-shadow: 0 6px 16px rgba(242,13,24,.25); }
.qt-btn.-primary:hover { background: var(--qt-red-d); color: #fff; }
.qt-btn.-navy { background: var(--qt-navy); color: #fff; } .qt-btn.-navy:hover { background: var(--qt-navy2); color: #fff; }
.qt-btn.-light { background: #fff; color: var(--qt-navy); border-color: #CBD9F5; } .qt-btn.-light:hover { border-color: var(--qt-red); color: var(--qt-red); }
.qt-btn.-ghost { background: transparent; color: var(--qt-mute); padding: 10px 12px; font-size: 14px; } .qt-btn.-ghost:hover { color: var(--qt-red); }
.qt-btn.-sm { padding: 8px 14px; font-size: 13.5px; border-radius: 10px; }
.qt-btn.-block { width: 100%; }
.qt-link { font-family: 'Prompt', sans-serif; font-weight: 600; color: #2650b0; background: none; border: none; padding: 0; cursor: pointer; font-size: inherit; }
.qt-link:hover { color: var(--qt-red); text-decoration: underline; }

/* ---------- filter tabs ---------- */
.qt-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 18px; }
.qt-tab { font-family: 'Prompt', sans-serif; font-weight: 600; font-size: 14px; color: var(--qt-mute); background: #fff; border: 1.5px solid var(--qt-line); border-radius: 999px; padding: 8px 16px; transition: .15s; display: inline-flex; gap: 7px; align-items: center; }
.qt-tab:hover { border-color: #CBD9F5; color: var(--qt-navy); }
.qt-tab.is-on { background: var(--qt-navy); border-color: var(--qt-navy); color: #fff; }
.qt-tab em { font-style: normal; font-size: 11.5px; font-weight: 700; background: var(--qt-red); color: #fff; border-radius: 99px; padding: 1px 8px; }
.qt-tab:not(.is-on) em.-quiet { background: #EEF1F7; color: #7d8aa3; }

/* ---------- stat tiles ---------- */
.qt-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 20px; }
.qt-stat { background: var(--qt-soft); border: 1px solid var(--qt-line); border-radius: 14px; padding: 14px 12px; text-align: center; }
.qt-stat b { display: block; font-family: 'Prompt', sans-serif; font-weight: 800; font-size: 28px; line-height: 1.1; color: var(--qt-navy); }
.qt-stat span { font-size: 12.5px; color: var(--qt-mute); }
.qt-stat.-hot { background: #FEF2F2; border-color: #FBD5D5; } .qt-stat.-hot b { color: var(--qt-red); }
.qt-stat.-ok  { background: #ECFDF5; border-color: #BBF7D0; } .qt-stat.-ok b { color: #1aae6f; }

/* ---------- list rows ---------- */
.qt-list { display: flex; flex-direction: column; gap: 12px; }
.qt-row { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.1fr) 150px 36px; gap: 8px 18px; align-items: center; background: #fff; border: 1px solid var(--qt-line); border-radius: 14px; padding: 15px 20px; box-shadow: 0 6px 18px rgba(6,26,74,.04); transition: border-color .16s, transform .16s; color: var(--qt-text); }
a.qt-row:hover { border-color: #CBD9F5; transform: translateY(-2px); color: var(--qt-text); }
.qt-row.-hot { border-left: 4px solid var(--qt-red); }
.qt-row-main b { font-family: 'Prompt', sans-serif; font-weight: 600; font-size: 15.5px; color: var(--qt-navy); }
.qt-row-main .qt-no { font-family: 'Prompt', sans-serif; font-weight: 700; color: var(--qt-red); margin-right: 8px; }
.qt-row-sub { font-size: 13px; color: var(--qt-mute); margin-top: 3px; }
.qt-row-money { font-family: 'Prompt', sans-serif; font-weight: 700; color: var(--qt-navy); font-size: 16px; }
.qt-row-money small { display: block; font-family: 'Noto Sans Thai', sans-serif; font-weight: 400; color: var(--qt-faint); font-size: 12px; }
.qt-row-go { color: #CBD5E1; font-size: 22px; text-align: right; }
.qt-late { color: var(--qt-red); font-weight: 600; }
@media (max-width: 760px) {
  .qt-row { grid-template-columns: 1fr auto; }
  .qt-row > :nth-child(2) { grid-column: 1 / -1; order: 3; }
  .qt-row .qt-row-go { display: none; }
}
.qt-empty { text-align: center; padding: 50px 20px; color: var(--qt-faint); background: #fff; border: 1px dashed #D5DEEE; border-radius: 16px; }
.qt-empty b { display: block; font-family: 'Prompt', sans-serif; font-size: 17px; color: var(--qt-mute); margin-bottom: 4px; }

/* ---------- revision pills ---------- */
.qt-revs { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0 0 16px; }
.qt-revs .qt-rp { font-family: 'Prompt', sans-serif; font-weight: 600; font-size: 13.5px; padding: 6px 14px; border-radius: 999px; background: #fff; border: 1.5px solid var(--qt-line); color: var(--qt-mute); }
.qt-revs .qt-rp:hover { border-color: #CBD9F5; color: var(--qt-navy); }
.qt-revs .qt-rp.is-on { background: var(--qt-navy); border-color: var(--qt-navy); color: #fff; }
.qt-revs .qt-rp small { font-weight: 400; opacity: .75; margin-left: 4px; }
.qt-revnote { background: #FFF8E8; border: 1px solid #F5DDA6; color: #8A5A00; border-radius: 12px; padding: 10px 16px; font-size: 14px; margin-bottom: 14px; }
.qt-changes { background: #F5F7FB; border: 1px solid var(--qt-line); border-radius: 12px; padding: 12px 18px; margin-bottom: 16px; font-size: 14px; }
.qt-changes b { font-family: 'Prompt', sans-serif; color: var(--qt-navy); }
.qt-changes ul { margin: 6px 0 0; padding-left: 20px; }
.qt-changes li { margin: 2px 0; }

/* ---------- the quotation / PO document ---------- */
.qt-doc { background: #fff; border: 1px solid var(--qt-line); border-radius: 14px; box-shadow: 0 12px 34px rgba(6,26,74,.08); padding: 32px 36px; }
.qt-doc-head { display: flex; justify-content: space-between; gap: 22px; flex-wrap: wrap; border-bottom: 2px solid var(--qt-navy); padding-bottom: 18px; }
.qt-doc-brand { display: flex; gap: 14px; align-items: flex-start; min-width: 0; }
.qt-doc-logo { width: 58px; height: 58px; object-fit: contain; border-radius: 10px; background: #fff; flex: 0 0 auto; }
.qt-doc-org { font-family: 'Prompt', sans-serif; font-weight: 700; font-size: 17px; color: var(--qt-navy); margin-bottom: 3px; }
.qt-doc-brand div div, .qt-doc-brand .qt-doc-sub { font-size: 12.5px; color: var(--qt-mute); line-height: 1.65; }
.qt-doc-title { text-align: right; }
.qt-doc-title .big { font-family: 'Prompt', sans-serif; font-weight: 800; font-size: 26px; color: var(--qt-red); line-height: 1; }
.qt-doc-title .en { font-size: 12px; letter-spacing: .22em; color: var(--qt-faint); font-weight: 600; margin: 4px 0 8px; }
.qt-doc-meta { margin-left: auto; font-size: 13px; border-collapse: collapse; }
.qt-doc-meta td { padding: 2px 0 2px 14px; color: var(--qt-text); text-align: left; }
.qt-doc-meta td:first-child { color: var(--qt-faint); }
.qt-doc-meta b { font-family: 'Prompt', sans-serif; color: var(--qt-navy); }
.qt-doc-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 18px 0; }
.qt-doc-party { background: var(--qt-soft); border-radius: 12px; padding: 12px 16px; min-width: 0; }
.qt-doc-party small { display: block; font-size: 12px; font-weight: 700; color: var(--qt-faint); margin-bottom: 2px; }
.qt-doc-party div { font-size: 14.5px; color: var(--qt-navy); word-break: break-word; }
.qt-doc-party span { display: block; font-size: 12.5px; color: var(--qt-mute); margin-top: 2px; }
@media (max-width: 640px) { .qt-doc { padding: 20px 16px; } .qt-doc-parties { grid-template-columns: 1fr; } .qt-doc-title { text-align: left; } .qt-doc-meta { margin-left: 0; } }
.qt-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.qt-table { width: 100%; border-collapse: collapse; min-width: 520px; }
.qt-table thead th { background: var(--qt-navy); color: #fff; font-family: 'Prompt', sans-serif; font-weight: 600; font-size: 13.5px; padding: 10px 12px; text-align: left; white-space: nowrap; }
.qt-table tbody td { padding: 10px 12px; border-bottom: 1px solid #EEF2F9; font-size: 14px; color: var(--qt-text); vertical-align: top; }
.qt-table tfoot td { padding: 5px 12px; font-family: 'Prompt', sans-serif; font-size: 14px; color: #475569; }
.qt-table tfoot tr.-first td { padding-top: 10px; }
.qt-table tfoot tr.-grand td { padding-top: 10px; font-size: 16.5px; font-weight: 700; color: var(--qt-navy); border-top: 2px solid var(--qt-navy); }
.qt-table tfoot tr.-grand td:last-child { color: var(--qt-red); }
.qt-table .qt-sp { font-size: 12px; color: var(--qt-mute); margin-top: 2px; line-height: 1.5; }
.qt-table .qt-br { font-size: 12px; font-weight: 600; color: #c0392b; margin-top: 2px; }
.qt-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.qt-table .ctr { text-align: center; }
.qt-terms { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-top: 18px; }
.qt-term { border: 1px solid var(--qt-line); border-radius: 12px; padding: 11px 15px; }
.qt-term small { display: block; font-size: 12px; color: var(--qt-faint); font-weight: 700; }
.qt-term b { font-family: 'Prompt', sans-serif; font-weight: 600; font-size: 15px; color: var(--qt-navy); }
.qt-term.-warn { background: #FFF1F1; border-color: #F8C9CC; } .qt-term.-warn b { color: var(--qt-red); }
.qt-note { margin-top: 14px; font-size: 14px; color: var(--qt-text); background: #FFF7ED; border: 1px solid #FED7AA; border-radius: 12px; padding: 11px 16px; line-height: 1.7; white-space: pre-line; }
.qt-note b { color: #7C3D12; }
.qt-sign { display: flex; gap: 40px; margin-top: 36px; flex-wrap: wrap; }
.qt-sign > div { flex: 1; min-width: 190px; text-align: center; font-size: 13px; color: var(--qt-mute); }
.qt-sign i { display: block; border-top: 1px dashed var(--qt-faint); height: 42px; margin-bottom: 6px; }

/* requested-items list (before Rev.0 exists) */
.qt-req-table { width: 100%; border-collapse: collapse; min-width: 480px; }
.qt-req-table th { text-align: left; font-family: 'Prompt', sans-serif; font-weight: 600; font-size: 13px; color: var(--qt-mute); background: var(--qt-soft); padding: 9px 12px; }
.qt-req-table td { padding: 10px 12px; border-top: 1px solid #EEF2F9; font-size: 14px; vertical-align: top; }

/* ---------- activity timeline ---------- */
.qt-tl { list-style: none; margin: 0; padding: 0 0 0 4px; position: relative; }
.qt-tl::before { content: ''; position: absolute; left: 13px; top: 6px; bottom: 6px; width: 2px; background: var(--qt-line); }
.qt-tl li { position: relative; padding: 0 0 18px 40px; }
.qt-tl li:last-child { padding-bottom: 2px; }
.qt-tl .dot { position: absolute; left: 4px; top: 3px; width: 20px; height: 20px; border-radius: 50%; border: 4px solid #fff; box-shadow: 0 0 0 2px var(--qt-line); background: #94A3B8; }
.qt-tl .dot.-doc { background: var(--qt-navy); box-shadow: 0 0 0 2px #CBD9F5; }
.qt-tl .dot.-ask { background: var(--qt-red); box-shadow: 0 0 0 2px #F8C9CC; }
.qt-tl .dot.-ok  { background: #1aae6f; box-shadow: 0 0 0 2px #BBE6D2; }
.qt-tl .dot.-off { background: #94A3B8; }
.qt-tl .dot.-sys { background: #fff; box-shadow: 0 0 0 2px #CBD5E1; }
.qt-tl-when { font-size: 12.5px; color: var(--qt-faint); font-weight: 600; }
.qt-tl-who { display: inline-block; font-family: 'Prompt', sans-serif; font-weight: 600; font-size: 11.5px; padding: 1px 9px; border-radius: 999px; margin-left: 8px; background: var(--qt-soft); border: 1px solid var(--qt-line); color: var(--qt-mute); }
.qt-tl-who.-user { background: #FFF1F1; border-color: #F8C9CC; color: #C0262D; }
.qt-tl-who.-sales { background: #E7EDFB; border-color: #CBD9F5; color: #1E40AF; }
.qt-tl-who.-admin { background: #F3E8FF; border-color: #E2CCFB; color: #6B21A8; }
.qt-tl-title { font-family: 'Prompt', sans-serif; font-weight: 600; font-size: 15px; color: var(--qt-navy); margin-top: 2px; }
.qt-tl-line { font-size: 13.5px; color: var(--qt-mute); margin-top: 2px; }
.qt-tl-note { font-size: 13.5px; color: var(--qt-text); background: var(--qt-soft); border-left: 3px solid #CBD9F5; border-radius: 0 8px 8px 0; padding: 6px 12px; margin-top: 6px; white-space: pre-line; }
.qt-tl-st { margin-top: 5px; font-size: 12px; }
.qt-tl-st .arrow { color: var(--qt-faint); margin: 0 4px; }

/* ---------- forms ---------- */
.qt-form .qt-field { margin-bottom: 16px; }
.qt-form label.qt-cap, .qt-cap { display: block; font-family: 'Prompt', sans-serif; font-weight: 600; font-size: 13.5px; color: var(--qt-navy); margin-bottom: 6px; }
.qt-cap .req { color: var(--qt-red); }
.qt-input, .qt-select, .qt-textarea { width: 100%; font-family: 'Noto Sans Thai', sans-serif; font-size: 15px; color: var(--qt-navy); background: #fff; border: 1.5px solid #D8E0F0; border-radius: 10px; padding: 10px 14px; transition: border-color .15s, box-shadow .15s; }
.qt-input:focus, .qt-select:focus, .qt-textarea:focus { outline: none; border-color: var(--qt-red); box-shadow: 0 0 0 3px rgba(242,13,24,.1); }
.qt-textarea { resize: vertical; min-height: 84px; line-height: 1.6; }
.qt-hint { font-size: 12.5px; color: var(--qt-faint); margin-top: 5px; line-height: 1.6; }
.qt-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0 20px; }
.qt-money { text-align: right; font-family: 'Prompt', sans-serif; font-weight: 600; font-variant-numeric: tabular-nums; }
.qt-price-in { width: 130px; text-align: right; font-family: 'Prompt', sans-serif; font-weight: 600; background: #FFFDF5; border: 2px solid #F0C674; border-radius: 9px; padding: 8px 11px; font-size: 15px; color: var(--qt-navy); }
.qt-price-in:focus { outline: none; border-color: var(--qt-red); }
.qt-qty-in { width: 76px; text-align: center; font-family: 'Prompt', sans-serif; font-weight: 600; background: var(--qt-soft); border: 2px solid #E1E8F5; border-radius: 9px; padding: 8px 6px; font-size: 15px; color: var(--qt-navy); }
.qt-qty-in:focus { outline: none; border-color: var(--qt-red); }
.qt-sum { margin-left: auto; width: min(100%, 360px); background: var(--qt-soft); border: 1px solid var(--qt-line); border-radius: 12px; padding: 12px 16px; margin-top: 14px; }
.qt-sum div { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 3px 0; font-size: 14px; color: #475569; }
.qt-sum .-total { border-top: 2px solid var(--qt-navy); margin-top: 6px; padding-top: 8px; font-family: 'Prompt', sans-serif; font-weight: 700; font-size: 16.5px; color: var(--qt-navy); }
.qt-sum .-total span:last-child { color: var(--qt-red); }
.qt-sum input { width: 130px; }

/* Sales response accordions */
.qt-acc { border: 1.5px solid var(--qt-line); border-radius: 14px; background: #fff; margin-bottom: 14px; overflow: hidden; }
.qt-acc > summary { list-style: none; cursor: pointer; padding: 16px 22px; display: flex; align-items: center; gap: 12px; font-family: 'Prompt', sans-serif; font-weight: 600; font-size: 16px; color: var(--qt-navy); }
.qt-acc > summary::-webkit-details-marker { display: none; }
.qt-acc > summary::after { content: '＋'; margin-left: auto; color: var(--qt-faint); font-size: 18px; }
.qt-acc[open] > summary::after { content: '－'; }
.qt-acc[open] { border-color: #CBD9F5; box-shadow: 0 10px 28px rgba(6,26,74,.07); }
.qt-acc[open] > summary { border-bottom: 1px solid var(--qt-line); background: #FBFCFE; }
.qt-acc > .qt-acc-body { padding: 20px 22px; }
.qt-acc .qt-tag { font-size: 12px; font-weight: 600; border-radius: 99px; padding: 2px 10px; background: var(--qt-red); color: #fff; }

/* the customer's open request (shown to Sales) */
.qt-ask { background: #FFF1F1; border: 1px solid #F8C9CC; border-radius: 14px; padding: 16px 20px; margin-bottom: 18px; }
.qt-ask h3 { font-size: 16px; margin: 0 0 6px; color: var(--qt-red); }
.qt-ask .big { font-family: 'Prompt', sans-serif; font-weight: 800; font-size: 24px; color: var(--qt-navy); }
.qt-ask p { margin: 4px 0 0; font-size: 14.5px; }

/* ---------- modal ---------- */
.qt-modal { position: fixed; inset: 0; z-index: 400; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(6,26,74,.55); backdrop-filter: blur(2px); }
.qt-modal.is-open { display: flex; }
.qt-modal-box { background: #fff; border-radius: 18px; width: min(100%, 560px); max-height: calc(100vh - 32px); overflow-y: auto; box-shadow: 0 30px 80px rgba(0,0,0,.35); animation: qtpop .18s ease-out; }
@keyframes qtpop { from { transform: translateY(10px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.qt-modal-h { padding: 20px 26px 14px; border-bottom: 1px solid var(--qt-line); display: flex; align-items: center; gap: 10px; }
.qt-modal-h h2 { font-size: 20px; margin: 0; flex: 1; }
.qt-modal-x { border: none; background: var(--qt-soft); width: 34px; height: 34px; border-radius: 10px; cursor: pointer; color: var(--qt-mute); font-size: 16px; }
.qt-modal-x:hover { background: #FEE2E2; color: var(--qt-red); }
.qt-modal-b { padding: 20px 26px; }
.qt-modal-f { padding: 14px 26px 22px; display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; }
.qt-legal { background: #FFF8E8; border: 1px solid #F5DDA6; border-radius: 12px; padding: 14px 16px; font-size: 14.5px; line-height: 1.8; color: #6B4600; margin-bottom: 16px; }
.qt-sumbox { background: var(--qt-soft); border: 1px solid var(--qt-line); border-radius: 12px; padding: 4px 16px; margin-bottom: 16px; }
.qt-sumbox div { display: flex; justify-content: space-between; gap: 14px; padding: 7px 0; border-bottom: 1px solid #E9EEF8; font-size: 14px; }
.qt-sumbox div:last-child { border-bottom: none; }
.qt-sumbox span:first-child { color: var(--qt-mute); }
.qt-sumbox b { font-family: 'Prompt', sans-serif; color: var(--qt-navy); text-align: right; }
.qt-sumbox .-total b { color: var(--qt-red); font-size: 17px; }
.qt-check { display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 2px solid #D8E0F0; border-radius: 12px; padding: 13px 15px; cursor: pointer; font-size: 14.5px; line-height: 1.7; color: var(--qt-ink); }
.qt-check:has(input:checked) { border-color: #1aae6f; background: #F3FCF8; }
.qt-check input { width: 20px; height: 20px; margin-top: 3px; flex: 0 0 auto; accent-color: var(--qt-red); }

/* ---------- admin extras ---------- */
.qt-filter { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; padding: 16px 24px; border-bottom: 1px solid var(--qt-line, #e9ecf3); background: linear-gradient(180deg, #fbfcfe, #fff); }
.qt-filter label { display: flex; flex-direction: column; gap: 4px; font-family: 'Prompt', sans-serif; font-weight: 600; font-size: 12.5px; color: #8898aa; }
.qt-filter .form-control { min-width: 160px; padding: 8px 12px; font-size: 14px; }
.qt-late-row td:first-child { border-left: 4px solid var(--qt-red, #F20D18); }
.qt-pill-red { display: inline-block; background: #FDEAEB; color: #C0262D; border-radius: 999px; font-family: 'Prompt', sans-serif; font-weight: 600; font-size: 12px; padding: 2px 10px; }
.qt-mail-body { width: 100%; height: 520px; border: 1px solid #e9ecf3; border-radius: 10px; background: #fff; }

/* ---------- print ---------- */
.qt-printbar { display: flex; gap: 12px; align-items: center; margin: 0 0 18px; flex-wrap: wrap; }
body.qt-print-body { background: #EEF2F9; margin: 0; font-family: 'Noto Sans Thai', sans-serif; }
.qt-print-wrap { max-width: 900px; margin: 0 auto; padding: 24px 16px 60px; }
@media print {
  header, footer, .no-print, .qt-printbar, .qt-back { display: none !important; }
  body, body.qt-print-body, .page-main, .content-section { background: #fff !important; padding: 0 !important; margin: 0 !important; }
  .content-inner, .qt-page, .qt-print-wrap { max-width: 100% !important; padding: 0 !important; }
  .qt-doc { box-shadow: none !important; border: none !important; padding: 0 !important; }
  @page { margin: 14mm; }
}

/* member page headings + cart project-name field */
.qt-member-h { font-family: 'Prompt', sans-serif; font-weight: 700; font-size: 15px; color: #061A4A; text-align: left; margin: 0 0 10px; }
.partner-dash + .partner-dash { margin-top: 26px; }
.quote-request-card .qr-project { margin-bottom: 14px; }

/* admin tables that live inside .qt-scope: tighter cells, quotation number never wraps */
.qt-scope table.data th, .qt-scope table.data td { padding-left: 14px; padding-right: 14px; }
.qt-scope table.data td:first-child { white-space: nowrap; }

/* Sales price form on phones: each item becomes a small card (no sideways scrolling to reach the price box) */
@media (max-width: 640px) {
  form[data-qt-prices] .qt-table { min-width: 0; display: block; }
  form[data-qt-prices] .qt-table thead { display: none; }
  form[data-qt-prices] .qt-table tbody { display: block; }
  form[data-qt-prices] .qt-table tr[data-line] { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; padding: 14px 0; border-bottom: 1px solid #EEF2F9; }
  form[data-qt-prices] .qt-table td { display: block; padding: 0; border: none; text-align: left; }
  form[data-qt-prices] .qt-table td:first-child { grid-column: 1 / -1; }
  form[data-qt-prices] .qt-table td.ctr::before { content: 'จำนวน'; display: block; font-size: 12px; font-weight: 600; color: var(--qt-mute); margin-bottom: 3px; }
  form[data-qt-prices] .qt-table td.num:not(.qt-line-total)::before { content: 'ราคา/หน่วย (บาท)'; display: block; font-size: 12px; font-weight: 600; color: var(--qt-mute); margin-bottom: 3px; }
  form[data-qt-prices] .qt-table td.qt-line-total { grid-column: 1 / -1; text-align: right; font-size: 15px; color: var(--qt-navy); }
  form[data-qt-prices] .qt-table td.qt-line-total::before { content: 'รวม  '; font-size: 12px; font-weight: 600; color: var(--qt-mute); }
  form[data-qt-prices] .qt-price-in, form[data-qt-prices] .qt-qty-in { width: 100%; }
  .qt-sum { width: 100%; }
}
