/* ═══ CALCULATOR DE PREȚ ═══ (folosește variabilele din style.css) */
body { background: var(--bg-alt); }
.print-only { display: none; }
[hidden] { display: none !important; }
.navbar .btn { white-space: nowrap; padding: 8px 14px; font-size: 0.88rem; }

.calc-head { background: linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff; padding: 44px 0 48px; }
.calc-head .eyebrow { color: var(--signal); font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 10px; }
.calc-head h1 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); font-weight: 800; }
.calc-lead { margin-top: 14px; max-width: 78ch; color: rgba(255, 255, 255, 0.78); }

.calc { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; padding-top: 32px; padding-bottom: 72px; }
.calc-main { display: grid; gap: 28px; min-width: 0; }
.calc h2 { font-size: 1.15rem; font-weight: 800; }

.panel { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow); }
.param-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 16px; margin-top: 18px; }
.field { display: grid; gap: 6px; font-size: 0.82rem; font-weight: 600; color: var(--text-secondary); align-content: end; }
.field-wide { grid-column: 1 / -1; }
.field-hint { font-size: 0.74rem; font-weight: 500; line-height: 1.4; }
.field-hint a { color: var(--accent); }
.field input, .x-price { font: inherit; font-size: 0.95rem; font-weight: 600; color: var(--text); padding: 9px 12px; border: 1px solid var(--border); border-radius: 9px; background: #fff; width: 100%; font-variant-numeric: tabular-nums; }
.field input:focus, .x-price:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9rem; color: var(--text); cursor: pointer; }
input[type="checkbox"] { width: 18px; height: 18px; flex: none; accent-color: var(--accent); cursor: pointer; margin-top: 2px; }
input[type="checkbox"]:disabled { cursor: not-allowed; }

.mod-toolbar { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 20px; margin-bottom: 6px; }
.mod-actions { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.link-btn { background: none; border: 0; padding: 4px 0; font: inherit; font-size: 0.88rem; font-weight: 600; color: var(--accent); cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.link-btn.danger { color: var(--red); }

.cat-title { margin: 26px 0 10px; font-size: 0.76rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); }
.mod { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 10px; overflow: hidden; }
.mod.off { background: #fbfcfe; box-shadow: none; }
.mod.off .mod-name, .mod.off .mod-price { color: var(--text-secondary); }
.mod-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.mod-title { flex: 1; min-width: 0; display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.mod-name { display: block; font-weight: 700; font-size: 0.98rem; line-height: 1.3; }
.mod-perk { display: inline-block; margin-top: 4px; padding: 2px 10px; border-radius: 999px; background: rgba(21, 160, 90, 0.12); color: var(--green); font-size: 0.74rem; font-weight: 700; }
.mod-info { display: block; font-size: 0.8rem; color: var(--text-secondary); margin-top: 2px; }
.mod-price { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mod-toggle { flex: none; width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--border); background: #fff; cursor: pointer; font-size: 0.8rem; color: var(--text-secondary); transition: transform .15s; }
.mod-toggle:hover { border-color: var(--accent); color: var(--accent); }
.mod-toggle[aria-expanded="true"] { transform: rotate(180deg); }
.mod-body { border-top: 1px solid var(--border); padding: 8px 16px 14px; }
.mod-body h4 { margin: 12px 0 4px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-secondary); }
.item { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--border); font-size: 0.92rem; }
.item:last-child { border-bottom: 0; }
.item label { flex: 1; min-width: 0; display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.item.off label { color: var(--text-secondary); text-decoration: line-through; text-decoration-color: #c4cad8; }
.item-price { width: 74px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.item.off .item-price { color: #aab1c2; }
.cx { flex: none; width: 84px; padding: 4px 0; border-radius: 999px; border: 1px solid transparent; font: inherit; font-size: 0.72rem; font-weight: 700; cursor: pointer; text-align: center; }
.cx-S { background: #dff5e9; color: #0f6b3c; }
.cx-M { background: #fff4d1; color: #8a6400; }
.cx-C { background: #fde8e8; color: #a32020; }
.cx:hover { border-color: currentColor; }
.x-price { width: 96px; padding: 5px 8px; text-align: right; font-size: 0.9rem; }

/* sumar */
.summary { position: sticky; top: 88px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-lg); max-height: calc(100vh - 108px); overflow-y: auto; }
.sum-count { margin-top: 4px; font-size: 0.85rem; color: var(--text-secondary); }
.sum-table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 0.88rem; }
.sum-table td { padding: 6px 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.sum-table td:last-child { text-align: right; font-weight: 600; white-space: nowrap; padding-left: 12px; font-variant-numeric: tabular-nums; }
.totals { margin-top: 16px; display: grid; gap: 6px; font-size: 0.92rem; }
.totals > div { display: flex; justify-content: space-between; gap: 12px; }
.totals dd { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.totals .total-main { margin-top: 10px; padding-top: 12px; border-top: 2px solid var(--navy); font-weight: 800; align-items: baseline; }
.totals .total-main dd { font-size: 1.45rem; font-weight: 800; color: var(--navy); }
.totals .total-main.monthly dd { color: var(--accent); }
.totals .total-alt { margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--border); font-weight: 700; }
.setup-box { margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: var(--bg-alt); font-size: 0.86rem; }
.totals .total-sub { font-size: 0.84rem; color: var(--text-secondary); }
.totals .total-sub dd { font-weight: 500; }
.sum-perks { list-style: none; margin: 16px 0 0; padding: 12px 14px; display: grid; gap: 6px; border-radius: 10px; background: rgba(21, 160, 90, 0.08); border: 1px solid rgba(21, 160, 90, 0.35); font-size: 0.85rem; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.sum-perks li { position: relative; padding-left: 20px; }
.sum-perks li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 800; }
.sum-perks strong { color: var(--navy); }
.sum-note { margin-top: 14px; font-size: 0.8rem; color: var(--text-secondary); }
.sum-actions { display: grid; gap: 10px; margin-top: 18px; justify-items: center; }
.sum-actions .btn { width: 100%; justify-content: center; }
.btn-ghost { border-color: var(--border); background: #fff; color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.copy-ok { min-height: 1.2em; margin-top: 8px; text-align: center; font-size: 0.85rem; color: var(--green); font-weight: 600; }

@media (max-width: 960px) {
    .calc { grid-template-columns: 1fr; }
    .summary { position: static; max-height: none; }
}
@media (max-width: 560px) {
    .mod-head { flex-wrap: wrap; }
    .mod-title { flex-basis: calc(100% - 50px); }
    .mod-price { margin-left: 30px; }
    .item { flex-wrap: wrap; }
    .item label { flex-basis: 100%; }
    .cx { margin-left: 28px; }
    .item-price, .x-price { margin-left: auto; }
}

/* ═══ TIPĂRIRE: oferta curată, fără parametri ═══ */
@media print {
    body { background: #fff; font-size: 11pt; }
    .no-print, .mod-toolbar, #modList { display: none !important; }
    .print-only { display: block; }
    .calc-head { background: none; color: var(--text); padding: 0 0 12px; border-bottom: 3px solid var(--navy); }
    .calc-head .eyebrow { color: var(--accent); }
    .offer-meta { margin-top: 8px; }
    .calc { display: block; padding: 18px 24px 0; }
    .summary { position: static; max-height: none; overflow: visible; box-shadow: none; border: 0; padding: 0; }
    #printDetail { padding-top: 24px; }
    #printDetail h2 { font-size: 1.1rem; margin-bottom: 10px; }
    #printDetail h3 { font-size: 0.98rem; margin: 14px 0 4px; break-after: avoid; }
    #printDetail ul { list-style: disc; padding-left: 20px; font-size: 0.9rem; color: var(--text-secondary); }
    #printDetail .pd-mod { break-inside: avoid; }
}
