/* ===== Quotations: list, create dialog, builder, public quote ===== */

.qs svg.bk-ico, .qb svg.bk-ico, .qp-overlay svg.bk-ico, .cq-overlay svg.bk-ico, .pq svg.bk-ico, .qm-columns svg.bk-ico {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: 0 0 auto;
    vertical-align: -3px;
}
.qb-ico svg.bk-ico { width: 20px; height: 20px; }
.qb-fold summary svg.bk-ico { margin-right: 0.25rem; }
.qb-day__head svg.bk-ico { color: #64748b; }

.ql-route { display: inline-flex; align-items: center; gap: 0.35rem; color: #1d4ed8; font-weight: 600; text-decoration: none; }
.ql-route:hover { text-decoration: underline; }
.ql-chip { display: inline-block; margin-left: 0.35rem; padding: 0.05rem 0.45rem; border-radius: 999px; font-size: 0.68rem; font-weight: 700; background: #eef2ff; color: #4338ca; vertical-align: middle; }
.ql-chip--sent { background: #dcfce7; color: #15803d; }
.ql-chip--manual { background: #fef3c7; color: #b45309; }
.ql-money { font-weight: 700; color: #0f172a; white-space: nowrap; }
.ql-actions { display: flex; gap: 0.25rem; justify-content: flex-end; }

/* Create quote dialog */
.cq-overlay { position: fixed; inset: 0; z-index: 1300; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(15, 23, 42, 0.45); }
.cq-panel { width: min(100%, 460px); background: #fff; border-radius: 14px; box-shadow: 0 24px 60px rgba(15, 23, 42, 0.3); padding: 1.1rem 1.1rem 0.9rem; }
.cq-head { display: flex; justify-content: space-between; align-items: center; }
.cq-head h3 { margin: 0; font-size: 1.05rem; font-weight: 700; color: #0f172a; }
.cq-sub { margin: 0.2rem 0 0.9rem; font-size: 0.82rem; color: #475569; }
.cq-option { display: block; width: 100%; text-align: left; margin-bottom: 0.6rem; padding: 0.75rem 0.85rem; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.cq-option:hover { border-color: #93c5fd; background: #f8fbff; }
.cq-option strong { display: block; font-size: 0.9rem; color: #0f172a; }
.cq-option span { display: block; margin-top: 0.2rem; font-size: 0.78rem; color: #64748b; }
.cq-foot { display: flex; justify-content: flex-end; }
.cq-close { border: 0; background: transparent; font-size: 1.25rem; line-height: 1; color: #64748b; cursor: pointer; }

/* Builder: step 1 */
.qs { max-width: 980px; margin: 0 auto; }
.qs-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; overflow: hidden; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04); }
.qs-card__head { background: #12355b; color: #fff; padding: 0.9rem 1.2rem; }
.qs-card__head h2 { margin: 0; font-size: 1.15rem; font-weight: 700; }
.qs-card__head p { margin: 0.15rem 0 0; font-size: 0.82rem; opacity: 0.85; }
.qs-body { padding: 1.1rem 1.2rem 1.3rem; display: grid; gap: 1rem; }
.qs-section { border: 1px solid #e2e8f0; border-radius: 12px; padding: 0.9rem 1rem; }
.qs-section__title { margin: 0 0 0.7rem; padding-left: 0.55rem; border-left: 3px solid #2563eb; font-size: 0.92rem; font-weight: 700; color: #0f172a; }
.qs-stay { display: grid; grid-template-columns: 1fr 150px auto; gap: 0.6rem; align-items: end; margin-bottom: 0.6rem; padding: 0.6rem; border-radius: 10px; background: #f8fafc; }
.qs-hint { margin: 0.2rem 0 0; font-size: 0.75rem; color: #64748b; }
.qs-rooms-summary { display: flex; gap: 0.5rem; padding: 0.55rem 0.7rem; border-radius: 10px; background: #eff6ff; margin-bottom: 0.7rem; }
.qs-pill { display: inline-flex; align-items: center; gap: 0.35rem; white-space: nowrap; padding: 0.35rem 0.75rem; border-radius: 999px; background: #fff; font-size: 0.78rem; font-weight: 600; color: #1e3a8a; }
.qs-room { border: 1px solid #e2e8f0; border-radius: 12px; padding: 0.7rem 0.9rem; margin-bottom: 0.6rem; }
.qs-room__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.3rem; font-weight: 700; font-size: 0.85rem; color: #0f172a; }
.qs-counter { display: flex; justify-content: space-between; align-items: center; padding: 0.45rem 0; border-bottom: 1px dashed #eef2f7; }
.qs-counter:last-child { border-bottom: 0; }
.qs-counter strong { display: block; font-size: 0.85rem; color: #0f172a; }
.qs-counter small { font-size: 0.72rem; color: #64748b; }
.qs-stepper { display: flex; align-items: center; gap: 0.6rem; }
.qs-stepper button { width: 28px; height: 28px; border-radius: 999px; border: 1px solid #1d4ed8; background: #fff; color: #1d4ed8; font-weight: 700; cursor: pointer; line-height: 1; }
.qs-stepper button:disabled { border-color: #cbd5e1; color: #cbd5e1; cursor: default; }
.qs-stepper span { min-width: 1.2rem; text-align: center; font-weight: 700; }
.qs-add-room { width: 100%; padding: 0.6rem; border: 1px dashed #2563eb; border-radius: 10px; background: #fff; color: #1d4ed8; font-weight: 600; cursor: pointer; }
.qs-generate { width: 100%; padding: 0.8rem; border: 0; border-radius: 10px; background: #2563eb; color: #fff; font-weight: 700; font-size: 0.95rem; cursor: pointer; box-shadow: 0 6px 14px rgba(37, 99, 235, 0.25); }
.qs-generate:disabled { opacity: 0.6; cursor: default; }

/* Builder: step 2 */
.qb { display: flex; flex-direction: column; gap: 1rem; }
.qb-main { display: grid; gap: 1rem; min-width: 0; }
.qb-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 1rem 1.1rem; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04); }
.qb-card__head { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.8rem; }
.qb-card__title { display: flex; align-items: center; gap: 0.6rem; }
.qb-card__title h3 { margin: 0; font-size: 1rem; font-weight: 700; color: #0f172a; }
.qb-card__title p { margin: 0; font-size: 0.78rem; color: #64748b; }
.qb-ico { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: #eff6ff; color: #1d4ed8; flex-shrink: 0; }
.qb-back { display: inline-flex; align-items: center; gap: 0.3rem; border: 0; background: transparent; color: #1d4ed8; font-weight: 600; font-size: 0.85rem; cursor: pointer; padding: 0; }
.qb-hero__eyebrow { margin: 0; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; color: #64748b; text-transform: uppercase; }
.qb-hero__title { margin: 0.1rem 0 0; font-size: 1.6rem; font-weight: 800; color: #0f172a; }
.qb-hero__sub { margin: 0.1rem 0 0.6rem; color: #475569; font-size: 0.88rem; }
.qb-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.qb-chip { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.25rem 0.65rem; border: 1px solid #e2e8f0; border-radius: 999px; font-size: 0.78rem; font-weight: 600; color: #334155; background: #fff; }
.qb-chip--action { border-color: #93c5fd; color: #1d4ed8; background: #eff6ff; cursor: pointer; }
.qb-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.7rem; }
.qb-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.qb-label { display: block; margin-bottom: 0.25rem; font-size: 0.75rem; font-weight: 600; color: #334155; }
.qb-input { width: 100%; height: 38px; padding: 0 0.6rem; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 0.86rem; color: #0f172a; background: #fff; font-family: inherit; }
.qb-input:focus { outline: 2px solid #bfdbfe; border-color: #3b82f6; }
.qb-input:disabled { background: #f1f5f9; color: #64748b; }
textarea.qb-input { height: auto; padding: 0.5rem 0.6rem; resize: vertical; line-height: 1.45; }
.qb-btn { display: inline-flex; align-items: center; gap: 0.35rem; height: 34px; padding: 0 0.85rem; border-radius: 8px; border: 1px solid transparent; font-size: 0.82rem; font-weight: 600; cursor: pointer; white-space: nowrap; background: #fff; }
.qb-btn:disabled { opacity: 0.55; cursor: default; }
.qb-btn--primary { background: #12355b; color: #fff; }
.qb-btn--blue { background: #2563eb; color: #fff; }
.qb-btn--light { border-color: #cbd5e1; color: #0f172a; }
.qb-btn--danger { border-color: #fecaca; color: #b91c1c; background: #fef2f2; }
.qs-stay .qb-btn { height: 38px; min-width: 38px; justify-content: center; padding: 0 0.6rem; }
.qb-btn--sm { height: 28px; padding: 0 0.6rem; font-size: 0.75rem; }
.qb-empty { padding: 1rem; border: 1px dashed #cbd5e1; border-radius: 10px; text-align: center; color: #64748b; font-size: 0.85rem; }
.qb-warn { padding: 0.6rem 0.8rem; border-radius: 10px; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; font-size: 0.8rem; }
.qb-warn ul { margin: 0.25rem 0 0; padding-left: 1.1rem; }

.qb-item { border: 1px solid #e2e8f0; border-radius: 12px; padding: 0.85rem; margin-bottom: 0.8rem; container-type: inline-size; min-width: 0; }
.qb-item__head { display: flex; justify-content: space-between; gap: 0.6rem; margin-bottom: 0.6rem; }
.qb-item__name { margin: 0; font-size: 1rem; font-weight: 700; color: #0f766e; }
.qb-item__meta { display: flex; flex-wrap: wrap; gap: 0.6rem; font-size: 0.75rem; color: #64748b; margin-top: 0.15rem; }
.qb-item__price { text-align: right; }
.qb-item__price strong { display: block; font-size: 1.05rem; color: #0f172a; }
.qb-item__price span { font-size: 0.72rem; color: #64748b; }
.qb-item__body { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 0.8rem; }
.qb-thumb { width: 100%; aspect-ratio: 4 / 3; border-radius: 10px; object-fit: cover; background: #e2e8f0; display: block; }
.qb-thumb--empty { display: flex; align-items: center; justify-content: center; color: #94a3b8; font-size: 0.75rem; }
.qb-item__actions { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.7rem; }
.qb-fold { margin-top: 0.6rem; border: 1px solid #e2e8f0; border-radius: 10px; }
.qb-fold summary { cursor: pointer; padding: 0.5rem 0.7rem; font-size: 0.8rem; font-weight: 600; color: #334155; }
.qb-fold__body { padding: 0 0.7rem 0.7rem; }
.qb-rates { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
.qb-rates th { text-align: left; font-weight: 600; color: #64748b; padding: 0.25rem; }
.qb-rates td { padding: 0.25rem; }
.qb-rates .qb-input { height: 32px; }
.qb-nights { display: flex; flex-wrap: wrap; gap: 0.35rem; min-height: 38px; align-items: center; }
.qb-night-chip { display: inline-flex; align-items: center; gap: 0.3rem; height: 28px; padding: 0 0.65rem; border-radius: 999px; background: #eff6ff; border: 1px solid #dbeafe; color: #1d4ed8; font-size: 0.75rem; font-weight: 600; }
.qb-night-chip svg { width: 13px; height: 13px; }

/* Hotel card: details row + prices row */
.qh-section { border: 1px solid #e2e8f0; border-radius: 12px; padding: 0.9rem 1rem; background: #fff; }
.qh-section + .qh-section { margin-top: 0.75rem; }
.qh-section--prices { background: #f8fafc; }
.qh-section__title { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.8rem; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #475569; }
.qh-section__title > span { display: inline-flex; align-items: center; gap: 0.4rem; }
.qh-section__title:not(:has(> span)) { justify-content: flex-start; gap: 0.4rem; }
.qh-section__title svg { width: 15px; height: 15px; color: #2563eb; }
.qh-section__tools { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; text-transform: none; letter-spacing: 0; font-weight: 600; }
.qh-setall { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; color: #64748b; }
.qh-setall .qb-input { width: 96px; height: 32px; }

.qh-details { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 1rem; }
.qh-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.7rem 0.75rem; }
.qh-span-2 { grid-column: span 2; }
.qh-span-4 { grid-column: 1 / -1; }

.qh-subhead { display: flex; justify-content: space-between; align-items: center; margin: 1rem 0 0.5rem; padding-top: 0.9rem; border-top: 1px solid #f1f5f9; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #475569; }
.qh-subhead .qb-linkbtn { display: inline-flex; align-items: center; gap: 0.3rem; text-transform: none; letter-spacing: 0; }
.qh-subhead .qb-linkbtn svg { width: 14px; height: 14px; }
.qh-occ { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border: 1px solid #e2e8f0; border-radius: 10px; overflow: hidden; }
.qh-occ__cell { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; padding: 0.6rem 0.55rem; border-right: 1px solid #e2e8f0; background: #fff; }
.qh-occ__cell:last-child { border-right: 0; }
.qh-occ__cell label { font-size: 0.8rem; font-weight: 700; color: #0f172a; }
.qh-occ__cell small { font-size: 0.7rem; color: #94a3b8; margin-bottom: 0.35rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qh-occ__cell .qb-input { height: 36px; text-align: center; font-weight: 600; }
.qh-occ__cell--static { background: #f8fafc; }
.qh-occ__value { height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 8px; background: #ecfdf5; color: #047857; font-weight: 700; }
.qh-note { margin-top: 0.8rem; }

.qh-table-wrap { overflow-x: auto; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; }
.qh-table { width: 100%; border-collapse: collapse; font-size: 0.83rem; }
.qh-table th { padding: 0.6rem 0.75rem; background: #f1f5f9; color: #475569; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; text-align: left; white-space: nowrap; }
.qh-table td { padding: 0.55rem 0.75rem; border-top: 1px solid #f1f5f9; vertical-align: middle; color: #0f172a; }
.qh-table .qh-num { text-align: right; white-space: nowrap; }
.qh-money { width: 115px; height: 36px; text-align: right; font-weight: 600; margin-left: auto; }
.qh-strong { font-weight: 600; }
.qh-muted { color: #94a3b8; font-size: 0.72rem; }
.qh-badge { display: inline-flex; align-items: center; height: 24px; padding: 0 0.55rem; border-radius: 6px; background: #eff6ff; color: #1d4ed8; font-size: 0.72rem; font-weight: 700; white-space: nowrap; }
.qh-badge--grey { background: #f1f5f9; color: #475569; }
.qh-na { display: inline-flex; height: 22px; align-items: center; padding: 0 0.5rem; border-radius: 999px; background: #fff7ed; color: #c2410c; font-size: 0.7rem; font-weight: 600; }
.qh-pos { color: #047857; font-weight: 600; }
.qh-neg { color: #dc2626; font-weight: 600; }
.qh-extra { display: flex; align-items: center; gap: 0.6rem; white-space: nowrap; }
.qh-qty { display: inline-flex; align-items: center; height: 22px; padding: 0 0.5rem; border-radius: 999px; background: #eff6ff; color: #1d4ed8; font-size: 0.72rem; font-weight: 700; }
.qh-table td:nth-child(2) { white-space: nowrap; }
.qh-group__head td { background: #f8fafc; color: #64748b; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding-top: 0.5rem; padding-bottom: 0.5rem; }
.qh-dim .qh-extra, .qh-dim td:last-child { opacity: 0.55; }

.qh-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.6rem; margin-top: 0.75rem; }
.qh-summary > div { display: flex; flex-direction: column; gap: 0.1rem; padding: 0.65rem 0.8rem; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; }
.qh-summary small { font-size: 0.7rem; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: 0.04em; }
.qh-summary strong { font-size: 1.05rem; color: #0f172a; }
.qh-summary span { font-size: 0.74rem; color: #94a3b8; }
.qh-summary__main { background: #1e3a8a !important; border-color: #1e3a8a !important; }
.qh-summary__main small, .qh-summary__main span { color: #bfdbfe; }
.qh-summary__main strong { color: #fff; }
.qh-actions { justify-content: flex-end; }
.qh-details > *, .qh-fields > *, .qh-summary > * { min-width: 0; }

/* Day-wise lines: transport service / activity-ticket */
.ql-cabbar { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.8rem; padding: 0.6rem 0.8rem; border: 1px solid #dbeafe; border-radius: 10px; background: #eff6ff; }
.ql-cabbar .qb-input { width: 220px; height: 34px; }
.ql-cabbar small { margin-left: auto; display: inline-flex; align-items: center; gap: 0.3rem; color: #475569; font-size: 0.75rem; }
.ql-cabbar small svg { width: 14px; height: 14px; }
.ql-check { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; font-weight: 600; color: #0f172a; cursor: pointer; white-space: nowrap; }
.ql-check input { width: 15px; height: 15px; accent-color: #2563eb; }
.ql-check svg { width: 15px; height: 15px; color: #2563eb; }

.ql { container-type: inline-size; border: 1px solid #e2e8f0; border-left: 4px solid #2563eb; border-radius: 12px; background: #fff; overflow: hidden; }
.ql--transfer { border-left-color: #f59e0b; }
.ql-head { display: flex; align-items: center; gap: 0.75rem; padding: 0.65rem 0.85rem; background: #f8fafc; border-bottom: 1px solid #e2e8f0; }
.ql-type { display: inline-flex; align-items: center; gap: 0.3rem; flex-shrink: 0; height: 24px; padding: 0 0.55rem; border-radius: 6px; background: #dbeafe; color: #1d4ed8; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.ql--transfer .ql-type { background: #fef3c7; color: #b45309; }
.ql-type svg { width: 14px; height: 14px; }
.ql-head__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ql-head__main strong { font-size: 0.92rem; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ql-head__main > span { display: flex; flex-wrap: wrap; gap: 0.7rem; font-size: 0.72rem; color: #64748b; }
.ql-head__main > span span { display: inline-flex; align-items: center; gap: 0.25rem; }
.ql-head__main svg { width: 13px; height: 13px; }
.ql-foc { padding: 0 0.4rem; border-radius: 999px; background: #ecfdf5; color: #047857; font-weight: 700; }
.ql-head__price { text-align: right; flex-shrink: 0; }
.ql-head__price strong { display: block; font-size: 1rem; color: #0f172a; }
.ql-head__price span { font-size: 0.7rem; color: #64748b; white-space: nowrap; }
.ql-tools { display: flex; gap: 0.25rem; flex-shrink: 0; }
.ql-tool { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 1px solid #e2e8f0; border-radius: 7px; background: #fff; color: #475569; cursor: pointer; }
.ql-tool:hover { background: #f1f5f9; color: #0f172a; }
.ql-tool svg { width: 14px; height: 14px; }
.ql-tool--danger { color: #dc2626; }
.ql-tool--danger:hover { background: #fef2f2; color: #b91c1c; }

.ql-details { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 0.9rem; padding: 0.85rem; }
.ql--transfer .ql-details { grid-template-columns: minmax(0, 1fr); }
.ql-details > * { min-width: 0; }
.ql-thumb { display: flex; flex-direction: column; gap: 0.35rem; align-items: flex-start; }
.ql-thumb .qb-linkbtn { display: inline-flex; align-items: center; gap: 0.25rem; }
.ql-thumb .qb-linkbtn svg { width: 13px; height: 13px; }

.ql-prices { padding: 0.75rem 0.85rem 0.85rem; background: #f8fafc; border-top: 1px solid #e2e8f0; display: grid; gap: 0.55rem; }
.ql-prices__head { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; flex-wrap: wrap; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: #475569; }
.ql-prices__head > span { display: inline-flex; align-items: center; gap: 0.35rem; }
.ql-prices__head svg { width: 14px; height: 14px; color: #2563eb; }
.ql-prices__head .ql-check { text-transform: none; letter-spacing: 0; }
.ql-prices__foot { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; font-size: 0.8rem; color: #334155; }
.ql-check--transfer { padding: 0.5rem 0.65rem; border: 1px dashed #cbd5e1; border-radius: 8px; background: #fff; }
.ql-inline-select { width: 150px; height: 32px; text-transform: none; letter-spacing: 0; font-weight: 600; }
.ql-type-input { min-width: 130px; height: 36px; }
.ql-qty { width: 70px; height: 36px; text-align: center; font-weight: 600; margin-left: auto; }
.ql-add { display: flex; gap: 0.45rem; flex-wrap: wrap; padding-top: 0.2rem; }
.ql-add svg { width: 14px; height: 14px; }

@container (max-width: 640px) {
    .ql-head { flex-wrap: wrap; }
    .ql-head__main { flex-basis: 100%; order: 3; }
    .ql-head__price { margin-left: auto; }
    .ql-details { grid-template-columns: minmax(0, 1fr); }
    .ql .qh-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ql .qh-span-2 { grid-column: 1 / -1; }
}
.qh-fields input[type="date"] { padding: 0 0.4rem; }

@container (max-width: 820px) {
    .qh-details { grid-template-columns: 130px minmax(0, 1fr); gap: 0.8rem; }
    .qh-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .qh-span-2 { grid-column: 1 / -1; }
    .qh-occ { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .qh-occ__cell:nth-child(3) { border-right: 0; }
    .qh-occ__cell:nth-child(-n+3) { border-bottom: 1px solid #e2e8f0; }
    .qh-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@container (max-width: 560px) {
    .qh-details { grid-template-columns: minmax(0, 1fr); }
    .qh-details .qb-thumb { max-height: 180px; }
    .qh-section { padding: 0.75rem; }
    .qh-setall { width: 100%; }
}
.qb-row-total { display: flex; justify-content: space-between; font-size: 0.8rem; color: #334155; padding: 0.15rem 0; }
.qb-row-total--strong { font-weight: 700; color: #0f172a; border-top: 1px solid #e2e8f0; margin-top: 0.25rem; padding-top: 0.35rem; }

.qb-totals-row { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 0.6rem; align-items: center; padding: 0.6rem 0.7rem; border: 1px solid #e2e8f0; border-radius: 10px; margin-bottom: 0.5rem; }
.qb-totals-row > span { font-size: 0.85rem; font-weight: 600; color: #0f172a; }

.qb-day { border: 1px solid #e2e8f0; border-radius: 12px; margin-bottom: 0.7rem; overflow: hidden; }
.qb-day__head { display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 0.8rem; background: #f8fafc; cursor: pointer; user-select: none; }
.qb-day__badge { padding: 0.15rem 0.55rem; border-radius: 999px; background: #12355b; color: #fff; font-size: 0.75rem; font-weight: 700; }
.qb-day__title { flex: 1; font-size: 0.86rem; font-weight: 600; color: #0f172a; }
.qb-day__meta { font-size: 0.75rem; color: #64748b; }
.qb-day__body { padding: 0.8rem; display: grid; gap: 0.7rem; }
.qb-swap { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; font-size: 0.78rem; }
.qb-swap select { height: 30px; border: 1px solid #cbd5e1; border-radius: 8px; padding: 0 0.4rem; }

.qb-policies { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.7rem; }
.qb-policy { border: 1px solid #e2e8f0; border-radius: 12px; padding: 0.7rem; display: flex; flex-direction: column; gap: 0.5rem; }
.qb-policy--inc { background: linear-gradient(#f0fdf4, #fff 60px); }
.qb-policy--exc { background: linear-gradient(#fff7ed, #fff 60px); }
.qb-policy--term { background: linear-gradient(#eff6ff, #fff 60px); }
.qb-policy__head { display: flex; justify-content: space-between; align-items: flex-start; }
.qb-policy__head small { display: block; font-size: 0.65rem; font-weight: 700; letter-spacing: 0.06em; color: #64748b; text-transform: uppercase; }
.qb-policy__head strong { font-size: 0.92rem; color: #0f172a; }
.qb-policy__count { font-size: 0.7rem; padding: 0.1rem 0.45rem; border-radius: 999px; background: #fff; border: 1px solid #e2e8f0; color: #334155; white-space: nowrap; }
.qb-policy__list { max-height: 220px; overflow-y: auto; display: grid; gap: 0.35rem; }
.qb-check { display: flex; gap: 0.45rem; align-items: flex-start; padding: 0.4rem 0.5rem; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; font-size: 0.8rem; color: #0f172a; cursor: pointer; }
.qb-check--on { border-color: #93c5fd; background: #eff6ff; }
.qb-check input { margin-top: 0.15rem; }
.qb-linkbtn { border: 0; background: transparent; color: #1d4ed8; font-size: 0.75rem; font-weight: 600; cursor: pointer; padding: 0 0.3rem 0 0; }

/* Builder sidebar */
.qb-side { min-width: 0; display: grid; gap: 0.8rem; }
.qb-side__card { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; overflow: hidden; }
.qb-side__title { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; flex-wrap: wrap; padding: 0.8rem 1.1rem; background: #eff6ff; border-bottom: 1px solid #dbeafe; font-weight: 700; font-size: 0.92rem; color: #0f172a; }
.qb-side__title > span:first-child { display: inline-flex; align-items: center; gap: 0.4rem; }
.qb-side__title svg { width: 16px; height: 16px; color: #2563eb; }
.qb-side__total { font-size: 0.8rem; font-weight: 600; color: #475569; }
.qb-side__total strong { margin-left: 0.3rem; font-size: 1.05rem; color: #1e3a8a; }
.qb-side__body { padding: 1rem 1.1rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; align-items: start; }
.qb-side__col { display: grid; gap: 0.7rem; align-content: start; min-width: 0; }
.qb-savebar { position: sticky; bottom: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 0.65rem 1rem; border: 1px solid #e2e8f0; border-radius: 14px; background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(6px); box-shadow: 0 -6px 20px rgba(15, 23, 42, 0.08); }
.qb-savebar__stats { display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: center; }
.qb-savebar__stats > div { display: flex; flex-direction: column; }
.qb-savebar__stats small { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: #64748b; }
.qb-savebar__stats strong { font-size: 0.98rem; color: #0f172a; }
.qb-savebar__stats strong span { font-size: 0.75rem; font-weight: 600; }
.qb-savebar__final strong { font-size: 1.2rem; color: #1e3a8a; }
.qb-savebar__btn { width: auto !important; min-width: 180px; margin: 0 !important; }
.qb-side__group small { display: block; margin-bottom: 0.3rem; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.08em; color: #64748b; text-transform: uppercase; }
.qb-kv { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.8rem; color: #334155; padding: 0.12rem 0; }
.qb-kv strong { color: #0f172a; font-weight: 600; }
.qb-kv--total { font-weight: 700; color: #0f172a; font-size: 0.86rem; border-top: 1px solid #e2e8f0; padding-top: 0.4rem; margin-top: 0.2rem; }
.qb-pricebox { border: 1px solid #e2e8f0; border-radius: 10px; padding: 0.55rem 0.6rem; }
.qb-pricebox__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.35rem; font-size: 0.78rem; font-weight: 600; color: #0f172a; }
.qb-auto { padding: 0.05rem 0.45rem; border-radius: 999px; font-size: 0.65rem; font-weight: 700; background: #dbeafe; color: #1d4ed8; }
.qb-auto--manual { background: #fef3c7; color: #b45309; }
.qb-tax { display: grid; grid-template-columns: auto 1fr 90px; gap: 0.45rem; align-items: center; font-size: 0.8rem; margin-bottom: 0.35rem; }
.qb-tax .qb-input { height: 30px; text-align: right; }
.qb-quick { display: flex; gap: 0.3rem; flex-wrap: wrap; margin-top: 0.35rem; }
.qb-quick button { border: 1px solid #cbd5e1; background: #fff; border-radius: 999px; padding: 0.1rem 0.55rem; font-size: 0.72rem; cursor: pointer; }
.qb-profit { border-radius: 10px; background: #f8fafc; padding: 0.55rem 0.65rem; }
.qb-profit--neg { background: #fef2f2; }
.qb-final { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.08em; color: #64748b; text-transform: uppercase; }
.qb-final__price { font-size: 1.9rem; font-weight: 800; color: #2563eb; line-height: 1.1; }
.qb-perhead { display: grid; grid-template-columns: 1fr 120px; gap: 0.4rem; align-items: center; font-size: 0.8rem; }
.qb-checkline { display: flex; gap: 0.45rem; align-items: center; font-size: 0.8rem; color: #334155; }
.qb-save { width: 100%; height: 42px; border: 0; border-radius: 10px; background: #12355b; color: #fff; font-weight: 700; cursor: pointer; }
.qb-save:disabled { opacity: 0.6; cursor: default; }
.qb-error-text { color: #b91c1c; font-size: 0.75rem; }

/* Pickers */
.qp-overlay { position: fixed; inset: 0; z-index: 1300; display: flex; justify-content: flex-end; background: rgba(15, 23, 42, 0.4); }
.qp-drawer { width: min(100%, 560px); height: 100%; background: #fff; display: flex; flex-direction: column; box-shadow: -10px 0 30px rgba(15, 23, 42, 0.2); }
.qp-head { display: flex; justify-content: space-between; align-items: center; padding: 0.9rem 1rem; border-bottom: 1px solid #e2e8f0; }
.qp-head h3 { margin: 0; font-size: 1rem; font-weight: 700; }
.qp-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; padding: 0.7rem 1rem; border-bottom: 1px solid #e2e8f0; }
.qp-list { flex: 1; overflow-y: auto; padding: 0.8rem 1rem; display: grid; gap: 0.6rem; align-content: start; }
.qp-card { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 0.7rem; border: 1px solid #e2e8f0; border-radius: 10px; padding: 0.6rem; }
.qp-card h4 { margin: 0; font-size: 0.9rem; color: #0f172a; }
.qp-card p { margin: 0.15rem 0 0; font-size: 0.75rem; color: #64748b; }
.qp-card__foot { display: flex; gap: 0.4rem; align-items: center; margin-top: 0.45rem; flex-wrap: wrap; }
.qp-card__foot select { height: 30px; border: 1px solid #cbd5e1; border-radius: 8px; padding: 0 0.4rem; font-size: 0.78rem; max-width: 220px; }
.qp-stay { display: grid; grid-template-columns: 1.3fr 0.7fr 1fr; gap: 0.5rem; padding: 0.6rem 1rem 0.7rem; border-bottom: 1px solid #e2e8f0; background: #f8fafc; }
.qp-stay .qb-input { height: 34px; }
.qp-stay__note { grid-column: 1 / -1; font-size: 0.72rem; color: #64748b; }
.qp-card--rated { grid-template-columns: 96px minmax(0, 1fr) 120px; }
.qp-rate { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 0.1rem; padding-left: 0.6rem; border-left: 1px dashed #e2e8f0; text-align: right; }
.qp-rate small { font-size: 0.68rem; color: #64748b; text-transform: uppercase; letter-spacing: 0.04em; }
.qp-rate strong { font-size: 1.05rem; color: #0f172a; }
.qp-rate span { font-size: 0.72rem; color: #334155; }
.qp-rate .qp-rate__muted { color: #94a3b8; }
.qp-rate .qp-rate__none { color: #c2410c; font-weight: 600; }
.qp-rate .qp-rate__warn { margin-top: 0.15rem; padding: 0.05rem 0.4rem; border-radius: 999px; background: #fff7ed; color: #c2410c; font-weight: 600; font-size: 0.68rem; }
@media (max-width: 480px) {
    .qp-card--rated { grid-template-columns: 80px minmax(0, 1fr); }
    .qp-rate { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; gap: 0.5rem; justify-content: flex-end; border-left: 0; border-top: 1px dashed #e2e8f0; padding: 0.4rem 0 0; }
}
.qp-foot { padding: 0.7rem 1rem; border-top: 1px solid #e2e8f0; display: flex; justify-content: space-between; gap: 0.5rem; }

/* Policy masters */
.qm-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.qm-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.4rem; align-items: center; padding: 0.45rem 0; border-bottom: 1px solid #f1f5f9; font-size: 0.85rem; }
.qm-item--inactive { opacity: 0.5; }
.qm-item__flags { display: flex; gap: 0.3rem; align-items: center; font-size: 0.7rem; color: #64748b; }

@media (max-width: 1100px) {
    .qb-side { position: static; }
    .qb-policies, .qm-columns { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
    .qb-item__body { grid-template-columns: minmax(0, 1fr); }
    .qs-stay { grid-template-columns: minmax(0, 1fr); }
    .qb-totals-row { grid-template-columns: minmax(0, 1fr); }
    .qb-grid--2 { grid-template-columns: minmax(0, 1fr); }
}

/* ===== Public quote ===== */
.pq-page { min-height: 100vh; background: #eef2f7; padding: 1.5rem 0.75rem 3rem; font-family: "Manrope", "Segoe UI", sans-serif; color: #0f172a; }
.pq { max-width: 900px; margin: 0 auto; background: #fff; border-radius: 16px; box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08); padding: 1.5rem; }
.pq-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.pq-brand { display: flex; align-items: center; gap: 0.75rem; }
.pq-brand img { height: 56px; width: auto; max-width: 160px; object-fit: contain; }
.pq-brand strong { font-size: 1.15rem; }
.pq-badge { padding: 0.4rem 0.9rem; border-radius: 8px; background: #1e5a96; color: #fff; font-size: 0.8rem; font-weight: 700; }
.pq-hero { position: relative; min-height: 240px; border-radius: 12px; overflow: hidden; background: #12355b center / cover no-repeat; color: #fff; display: flex; align-items: flex-end; }
.pq-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15, 23, 42, 0.15), rgba(15, 23, 42, 0.75)); }
.pq-hero__body { position: relative; padding: 1.2rem 1.4rem; width: 100%; }
.pq-hero__code { display: inline-block; padding: 0.15rem 0.6rem; border-radius: 999px; background: rgba(255, 255, 255, 0.2); font-size: 0.72rem; }
.pq-hero h1 { margin: 0.4rem 0 0.2rem; font-size: 1.7rem; font-weight: 800; }
.pq-hero__meta { font-size: 0.82rem; opacity: 0.9; }
.pq-hero__total { display: inline-block; margin-top: 0.6rem; padding: 0.4rem 0.8rem; border-radius: 8px; background: #fff; color: #0f172a; font-weight: 700; font-size: 0.88rem; }
.pq-hero__book { position: absolute; top: 1rem; right: 1rem; padding: 0.3rem 0.75rem; border-radius: 999px; background: #fff; color: #0f172a; font-size: 0.72rem; font-weight: 700; }
.pq-section { margin-top: 1.2rem; border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden; }
.pq-section__head { padding: 0.65rem 1rem; background: #1e5a96; color: #fff; font-weight: 800; font-size: 0.9rem; letter-spacing: 0.04em; text-transform: uppercase; }
.pq-section__head--green { background: #15803d; }
.pq-section__body { padding: 1rem; }
.pq-brief { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1.2rem; }
.pq-brief p { margin: 0 0 0.7rem; font-size: 0.88rem; line-height: 1.55; color: #334155; }
.pq-assist { padding: 0.55rem 0.75rem; border-radius: 8px; background: #eff6ff; color: #1e3a8a; font-size: 0.8rem; font-weight: 600; }
.pq-kv { display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.4rem 0; border-bottom: 1px solid #f1f5f9; font-size: 0.84rem; }
.pq-kv span { color: #64748b; }
.pq-kv strong { text-align: right; }
.pq-kv--green strong { color: #15803d; }
.pq-stay { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 1rem; padding: 0.8rem 0; border-bottom: 1px solid #f1f5f9; }
.pq-stay:last-child { border-bottom: 0; }
.pq-img { width: 100%; aspect-ratio: 4 / 3; border-radius: 10px; object-fit: cover; background: #e2e8f0; display: block; }
.pq-stay h3 { margin: 0; font-size: 1rem; }
.pq-stars { color: #f59e0b; margin-left: 0.3rem; font-size: 0.85rem; }
.pq-muted { color: #64748b; font-size: 0.8rem; }
.pq-dates { display: inline-block; margin: 0.4rem 0; padding: 0.2rem 0.55rem; border-radius: 6px; background: #eff6ff; color: #1e3a8a; font-size: 0.78rem; font-weight: 700; }
.pq-day { border-bottom: 1px solid #e2e8f0; }
.pq-day:last-child { border-bottom: 0; }
.pq-day__head { display: flex; align-items: center; gap: 0.6rem; padding: 0.75rem 1rem; }
.pq-day__badge { padding: 0.15rem 0.5rem; border-radius: 6px; background: #1e5a96; color: #fff; font-size: 0.75rem; font-weight: 700; white-space: nowrap; }
.pq-day__title { flex: 1; font-weight: 700; font-size: 0.88rem; text-transform: uppercase; }
.pq-day__date { padding: 0.15rem 0.5rem; border: 1px solid #e2e8f0; border-radius: 6px; font-size: 0.72rem; color: #475569; white-space: nowrap; }
.pq-day__text { margin: 0; padding: 0 1rem 0.75rem; font-size: 0.84rem; line-height: 1.55; color: #334155; white-space: pre-line; }
.pq-activity { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 0.9rem; padding: 0.75rem 1rem; border-top: 1px dashed #e2e8f0; }
.pq-activity h4 { margin: 0; font-size: 0.9rem; color: #1e5a96; }
.pq-activity p { margin: 0.25rem 0 0; font-size: 0.8rem; line-height: 1.5; color: #475569; white-space: pre-line; }
.pq-activity .pq-dates { display: block; }
.pq-transfer { display: flex; gap: 0.7rem; align-items: flex-start; padding: 0.6rem 1rem; border-top: 1px dashed #e2e8f0; }
.pq-transfer__ico { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 32px; height: 32px; border-radius: 8px; background: #fef3c7; color: #b45309; }
.pq-transfer__ico svg { width: 18px; height: 18px; }
.pq-transfer strong { display: block; font-size: 0.88rem; color: #1e5a96; }
.pq-transfer span { font-size: 0.75rem; color: #64748b; }
.pq-transfer p { margin: 0.2rem 0 0; font-size: 0.8rem; line-height: 1.5; color: #475569; white-space: pre-line; }
.pq-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.pq-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; font-size: 0.84rem; }
.pq-list li { display: flex; gap: 0.4rem; }
.pq-list--yes li::before { content: "✓"; color: #15803d; font-weight: 700; }
.pq-list--no li::before { content: "✕"; color: #dc2626; font-weight: 700; }
.pq-list--term li::before { content: "•"; color: #1e5a96; font-weight: 700; }
.pq-price { display: grid; gap: 0.1rem; max-width: 420px; margin-left: auto; }
.pq-price .pq-kv--total { font-size: 1rem; font-weight: 800; border-top: 2px solid #0f172a; border-bottom: 0; }
.pq-expert { display: flex; align-items: center; gap: 1rem; padding: 1rem; border-radius: 12px; background: #eff6ff; margin-top: 1.2rem; }
.pq-avatar { width: 64px; height: 64px; border-radius: 999px; background: #1e5a96; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; font-weight: 800; flex-shrink: 0; }
.pq-expert small { display: block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; color: #64748b; text-transform: uppercase; }
.pq-expert strong { font-size: 1.1rem; }
.pq-bank { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 1rem; align-items: start; }
.pq-qr { text-align: center; border: 1px solid #e2e8f0; border-radius: 10px; padding: 0.6rem; }
.pq-qr img { width: 100%; max-width: 180px; }
.pq-note { margin-top: 0.6rem; padding: 0.45rem 0.65rem; border-radius: 8px; background: #f0fdf4; color: #166534; font-size: 0.75rem; }
.pq-actions { display: flex; justify-content: center; gap: 0.6rem; margin-top: 1.4rem; flex-wrap: wrap; }
.pq-btn { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.6rem 1.1rem; border-radius: 10px; border: 1px solid #1e5a96; background: #1e5a96; color: #fff; font-weight: 700; font-size: 0.85rem; text-decoration: none; cursor: pointer; }
.pq-btn--light { background: #fff; color: #1e5a96; }
.pq-btn--green { background: #16a34a; border-color: #16a34a; }
.pq-foot { margin-top: 1.4rem; text-align: center; font-size: 0.78rem; color: #64748b; }
.pq-state { max-width: 520px; margin: 4rem auto; text-align: center; background: #fff; border-radius: 16px; padding: 2rem; color: #334155; }

@media (max-width: 720px) {
    .pq { padding: 1rem; }
    .pq-brief, .pq-lists, .pq-bank, .pq-stay, .pq-activity { grid-template-columns: minmax(0, 1fr); }
    .pq-hero h1 { font-size: 1.3rem; }
}

@media print {
    .pq-page { background: #fff; padding: 0; }
    .pq { box-shadow: none; border-radius: 0; max-width: none; padding: 0; }
    .pq-actions { display: none; }
    .pq-section, .pq-stay, .pq-activity, .pq-day__head { break-inside: avoid; }
    .pq-hero, .pq-section__head, .pq-day__badge, .pq-badge { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---- Pricing & summary (bottom panel) ---- */
.qx { display: grid; gap: 1rem; }
.qx-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 1rem 1.25rem; border-radius: 14px; background: linear-gradient(120deg, #12355b 0%, #1e4f86 100%); color: #fff; }
.qx-head h3 { margin: 0; display: flex; align-items: center; gap: 0.5rem; font-size: 1.05rem; font-weight: 700; color: #fff; }
.qx-head h3 svg { width: 18px; height: 18px; }
.qx-head p { margin: 0.2rem 0 0; font-size: 0.82rem; color: #bfdbfe; }
.qx-head__total { text-align: right; }
.qx-head__total small { display: block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #bfdbfe; }
.qx-head__total strong { font-size: 1.6rem; line-height: 1.1; }

.qx-overview { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0.6rem; }
.qx-stat { display: flex; align-items: center; gap: 0.65rem; padding: 0.7rem 0.85rem; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; min-width: 0; }
.qx-stat > div { min-width: 0; }
.qx-stat small { display: block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: #64748b; }
.qx-stat strong { display: block; font-size: 0.9rem; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qx-stat__icon { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #eff6ff; color: #2563eb; }
.qx-stat__icon svg { width: 17px; height: 17px; }
.qx-stat--money { background: #f8fafc; border-style: dashed; }
.qx-stat--money strong { font-size: 1rem; color: #12355b; }

.qx-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: 1rem; align-items: start; }
.qx-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 1rem 1.25rem; min-width: 0; }
.qx-card__title { margin-bottom: 0.6rem; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #475569; }

.qx-ledger { display: grid; }
.qx-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0.5rem 1rem; padding: 0.85rem 0; border-top: 1px solid #f1f5f9; }
.qx-row:first-child { border-top: 0; padding-top: 0.2rem; }
.qx-row__label { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.qx-row__label strong { display: block; font-size: 0.92rem; color: #0f172a; }
.qx-row__label small { display: block; font-size: 0.78rem; color: #64748b; }
.qx-row__ctrl { display: flex; align-items: center; justify-content: flex-end; gap: 0.5rem; flex-wrap: wrap; }
.qx-row__note { grid-column: 1 / -1; padding-left: 2.6rem; }
.qx-step { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #eff6ff; color: #1d4ed8; font-size: 0.8rem; font-weight: 700; }
.qx-amount { width: 140px !important; text-align: right; font-weight: 600; }
.qx-badge { padding: 0.2rem 0.55rem; border: 0; border-radius: 999px; background: #dcfce7; color: #15803d; font-size: 0.7rem; font-weight: 700; }
.qx-badge--manual { background: #fef3c7; color: #b45309; cursor: pointer; }

.qx-taxes { gap: 0.5rem 1rem; }
.qx-tax { display: flex; align-items: center; gap: 0.5rem; margin: 0; cursor: pointer; }
.qx-tax > span { font-size: 0.85rem; font-weight: 600; color: #0f172a; white-space: nowrap; }
.qx-tax em { margin-left: 0.2rem; padding: 0.1rem 0.4rem; border-radius: 999px; background: #eff6ff; color: #1d4ed8; font-size: 0.68rem; font-style: normal; font-weight: 700; }
.qx-tax .qx-amount { width: 110px !important; }
.qx-tax.is-off > span { color: #94a3b8; text-decoration: line-through; }

.qx-subtotal { display: flex; justify-content: space-between; align-items: center; margin: 0.15rem 0; padding: 0.65rem 0.9rem; border-radius: 10px; background: #f8fafc; font-size: 0.88rem; color: #334155; }
.qx-subtotal strong { font-size: 1rem; color: #0f172a; }

.qx-chips { display: inline-flex; border: 1px solid #e2e8f0; border-radius: 9px; overflow: hidden; }
.qx-chips button { padding: 0.35rem 0.6rem; border: 0; border-left: 1px solid #e2e8f0; background: #fff; color: #334155; font-size: 0.76rem; font-weight: 600; cursor: pointer; }
.qx-chips button:first-child { border-left: 0; }
.qx-chips button:hover { background: #eff6ff; color: #1d4ed8; }
.qx-chips__clear { color: #dc2626 !important; }

.qx-final { position: sticky; top: 1rem; display: grid; gap: 0.75rem; padding: 1.25rem; border-radius: 14px; background: linear-gradient(160deg, #0f2a47 0%, #12355b 60%, #1e4f86 100%); color: #e2e8f0; box-shadow: 0 10px 30px rgba(18, 53, 91, 0.25); }
.qx-final__label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #93c5fd; }
.qx-final__price { margin-top: -0.5rem; font-size: 2.1rem; font-weight: 800; line-height: 1.1; color: #fff; }
.qx-final__sub { margin-top: -0.55rem; font-size: 0.78rem; color: #bfdbfe; }
.qx-perhead { display: grid; gap: 0.5rem; padding: 0.75rem; border-radius: 10px; background: rgba(255, 255, 255, 0.08); }
.qx-perhead label { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin: 0; font-size: 0.82rem; color: #dbeafe; }
.qx-perhead input { width: 120px !important; text-align: right; font-weight: 600; }
.qx-final__link { justify-self: start; padding: 0; border: 0; background: none; color: #93c5fd; font-size: 0.78rem; text-decoration: underline; cursor: pointer; }
.qx-profit { display: grid; gap: 0.35rem; padding-top: 0.75rem; border-top: 1px dashed rgba(191, 219, 254, 0.35); }
.qx-profit > div { display: flex; justify-content: space-between; font-size: 0.82rem; }
.qx-profit span { color: #bfdbfe; }
.qx-profit strong { color: #fff; font-weight: 600; }
.qx-net { display: flex; justify-content: space-between; align-items: center; padding: 0.6rem 0.8rem; border-radius: 10px; background: rgba(34, 197, 94, 0.18); color: #bbf7d0; font-size: 0.85rem; font-weight: 600; }
.qx-net strong { color: #fff; font-size: 1rem; }
.qx-net em { margin-left: 0.3rem; padding: 0.1rem 0.45rem; border-radius: 999px; background: rgba(34, 197, 94, 0.35); font-size: 0.72rem; font-style: normal; }
.qx-net--neg { background: rgba(239, 68, 68, 0.2); color: #fecaca; }
.qx-net--neg em { background: rgba(239, 68, 68, 0.4); }

.qx-guest { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.75rem; }
.qx-guest label { display: grid; gap: 0.3rem; margin: 0; }
.qx-foot { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem 1.5rem; flex-wrap: wrap; margin-top: 0.9rem; padding-top: 0.9rem; border-top: 1px solid #f1f5f9; }
.qx-toggles { display: flex; gap: 0.5rem 1.5rem; flex-wrap: wrap; }
.qx-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.qx-switch { display: inline-flex; align-items: center; gap: 0.55rem; margin: 0; font-size: 0.85rem; color: #334155; cursor: pointer; }
.qx-switch input { position: absolute; opacity: 0; pointer-events: none; }
.qx-switch span { position: relative; flex: none; width: 34px; height: 19px; border-radius: 999px; background: #cbd5e1; transition: background 0.15s; }
.qx-switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); transition: transform 0.15s; }
.qx-switch input:checked + span { background: #2563eb; }
.qx-switch input:checked + span::after { transform: translateX(15px); }
.qx-switch input:focus-visible + span { outline: 2px solid #93c5fd; outline-offset: 2px; }

@media (max-width: 900px) {
    .qx-grid { grid-template-columns: minmax(0, 1fr); }
    .qx-final { position: static; }
}
@media (max-width: 640px) {
    .qx-row { grid-template-columns: minmax(0, 1fr); }
    .qx-row__ctrl { justify-content: flex-start; }
    .qx-row__note { padding-left: 0; }
    .qx-head__total { text-align: left; }
}
