:root {
  --bg: #07080b;
  --surface: #0e1015;
  --surface2: #13161d;
  --line: rgba(255, 255, 255, .08);
  --line2: rgba(255, 255, 255, .16);
  --text: #f4f5f7;
  --muted: #9aa1ad;
  --muted2: #6b717c;
  --gold: #d8b66a;
  --gold2: #f1d58c;
  --gold-soft: rgba(216, 182, 106, .1);
  --gold-line: rgba(216, 182, 106, .45);
  --green: #8ce6ad;
  --red: #ff9c9c;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, .7);
  --radius: 20px;
  --max: 1200px;
}

* { box-sizing: border-box }
html { scroll-behavior: smooth; scroll-padding-top: 90px }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1000px 520px at 8% -10%, rgba(216, 182, 106, .14), transparent 60%),
    radial-gradient(800px 500px at 100% 0%, rgba(120, 140, 200, .07), transparent 60%),
    var(--bg);
}

body:before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, black, transparent 60%);
  pointer-events: none;
  z-index: -1;
}

a { color: inherit; text-decoration: none }
button, input, select { font: inherit; color: inherit }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(140%) blur(18px);
  background: rgba(7, 8, 11, .72);
  border-bottom: 1px solid var(--line);
}
.nav { max-width: var(--max); margin: 0 auto; padding: 14px 24px; display: flex; justify-content: space-between; align-items: center; gap: 18px }
.brand { display: flex; align-items: center; gap: 14px; letter-spacing: .3em; text-transform: uppercase; font-weight: 800; font-size: 14px }
.brand img { width: 150px; height: auto; display: block }
.brand-fallback { display: flex; align-items: center; gap: 12px }
.brand-mark { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line2); font-size: 10px; letter-spacing: .1em }
.nav-actions { display: flex; gap: 4px; align-items: center; flex-wrap: wrap }
.nav-actions a { padding: 9px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); transition: .2s }
.nav-actions a:hover { color: var(--text); background: rgba(255, 255, 255, .06) }
.nav-actions .nav-cta { color: var(--text); border: 1px solid var(--line2); margin-left: 6px }

/* ---------- Hero ---------- */
.hero { max-width: var(--max); margin: 0 auto; padding: 72px 24px 28px }
.kicker { display: inline-flex; align-items: center; gap: 12px; color: var(--gold2); font-size: 11px; text-transform: uppercase; letter-spacing: .26em; font-weight: 700; margin-bottom: 20px }
.kicker:before { content: ""; width: 28px; height: 1px; background: var(--gold) }
h1 { font-size: clamp(40px, 6vw, 76px); line-height: .98; letter-spacing: -.045em; font-weight: 800; margin: 0 0 20px; max-width: 900px }
h1 em { font-style: normal; background: linear-gradient(120deg, var(--gold2), var(--gold) 60%, #b8914a); -webkit-background-clip: text; background-clip: text; color: transparent }
.hero p { margin: 0; max-width: 640px; color: var(--muted); font-size: clamp(16px, 1.8vw, 19px); line-height: 1.6; font-weight: 500 }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px }
.ghost-btn, .solid-btn { border: 1px solid var(--line2); border-radius: 999px; padding: 13px 20px; font-size: 14px; font-weight: 700; transition: .2s ease }
.ghost-btn:hover { background: rgba(255, 255, 255, .06) }
.solid-btn { color: #0a0b0e; background: linear-gradient(135deg, var(--gold2), var(--gold)); border-color: transparent; box-shadow: 0 10px 30px -10px rgba(216, 182, 106, .6) }
.solid-btn:hover { transform: translateY(-1px); box-shadow: 0 14px 34px -10px rgba(216, 182, 106, .75) }

.steps { list-style: none; padding: 0; margin: 44px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden }
.steps a { display: flex; gap: 10px; align-items: baseline; padding: 14px 16px; background: var(--surface); font-size: 13px; font-weight: 600; color: var(--muted); transition: .2s }
.steps a:hover { color: var(--text); background: var(--surface2) }
.steps b { color: var(--gold); font-size: 11px; letter-spacing: .1em }

.trust-strip { max-width: var(--max); margin: 0 auto; padding: 0 24px }
.trust-box { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, .02); padding: 13px 16px; color: var(--muted); font-size: 13px; line-height: 1.55 }
.trust-box .dot { flex: none; width: 7px; height: 7px; margin-top: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft) }

/* ---------- Layout ---------- */
.layout { max-width: var(--max); margin: 0 auto; padding: 22px 24px 40px; display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start }

.section { border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .012)); border-radius: var(--radius); padding: 28px; margin-bottom: 20px; box-shadow: var(--shadow) }
.section.plain { background: transparent; box-shadow: none }
.section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 22px }
.section-num { display: block; color: var(--gold); font-size: 11px; font-weight: 700; letter-spacing: .2em; margin-bottom: 8px }
.section h2 { margin: 0; font-size: clamp(22px, 2.6vw, 28px); letter-spacing: -.03em; font-weight: 750 }
.section-desc { margin: 8px 0 0; color: var(--muted); line-height: 1.6; font-size: 14.5px; max-width: 620px }
.badge { display: inline-flex; align-items: center; color: var(--gold2); background: var(--gold-soft); border: 1px solid rgba(216, 182, 106, .25); padding: 7px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap }
.badge.subtle { color: var(--muted); background: transparent; border-color: var(--line2) }

/* ---------- Stepper ---------- */
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line2); border-radius: 12px; background: rgba(0, 0, 0, .25); overflow: hidden }
.stepper button { width: 36px; height: 40px; border: 0; background: transparent; color: var(--muted); font-size: 18px; cursor: pointer; transition: .15s }
.stepper button:hover { color: var(--text); background: rgba(255, 255, 255, .06) }
.stepper input { width: 44px; height: 40px; border: 0; background: transparent; text-align: center; font-weight: 700; font-size: 15px; outline: none; -moz-appearance: textfield; appearance: textfield }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0 }
.stepper:focus-within { border-color: var(--gold-line) }
.stepper.sm button { width: 30px; height: 34px; font-size: 16px }
.stepper.sm input { width: 36px; height: 34px; font-size: 14px }

/* ---------- Servicios ---------- */
.service-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px }
.service-card { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); padding: 20px; display: flex; flex-direction: column; gap: 16px; transition: border-color .2s, box-shadow .2s }
.service-card.is-on { border-color: var(--gold-line); box-shadow: 0 0 0 1px rgba(216, 182, 106, .15), 0 20px 50px -30px rgba(216, 182, 106, .5) }
.service-top { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; flex-wrap: wrap }
.service-title h3 { margin: 0 0 4px; font-size: 19px; letter-spacing: -.02em }
.service-title p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45 }
.field-inline { display: flex; flex-direction: column; gap: 6px }
.field-inline label { font-size: 11px; font-weight: 600; color: var(--muted2); text-transform: uppercase; letter-spacing: .08em }

.day-table { display: grid; gap: 6px }
.day-table-head { display: grid; grid-template-columns: 1fr auto 104px; gap: 10px; padding: 0 12px; font-size: 10.5px; font-weight: 600; color: var(--muted2); text-transform: uppercase; letter-spacing: .08em }
.day-table-head span:nth-child(2) { text-align: right }
.day-table-head span:last-child { text-align: center }
.day-row { display: grid; grid-template-columns: 1fr auto 104px; gap: 10px; align-items: center; padding: 8px 8px 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .015); transition: .2s }
.day-row.is-on { border-color: var(--gold-line); background: var(--gold-soft) }
.day-name { font-weight: 650; font-size: 14px }
.day-price { text-align: right; font-weight: 700; font-size: 14px; white-space: nowrap }
.day-price small { display: block; font-weight: 500; font-size: 10.5px; color: var(--muted2) }
.day-row .stepper { justify-self: center }
.service-mini-total { display: flex; justify-content: space-between; align-items: center; padding-top: 14px; border-top: 1px dashed var(--line2); font-size: 13px; color: var(--muted) }
.service-mini-total strong { font-size: 20px; color: var(--text); letter-spacing: -.02em }
.service-card.is-on .service-mini-total strong { color: var(--gold2) }

.info-strip { margin-top: 16px; color: var(--muted2); font-size: 12.5px; line-height: 1.6; padding-left: 14px; border-left: 2px solid var(--line2) }

/* ---------- Items ---------- */
.item-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px }
.item-card { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); transition: .2s; display: flex; flex-direction: column }
.item-card:hover { border-color: var(--line2) }
.item-card.is-on { border-color: var(--gold-line); background: linear-gradient(180deg, var(--gold-soft), var(--surface) 70%) }
.item-card.wide { margin-top: 12px }
.item-check { display: grid; grid-template-columns: 22px 1fr; gap: 12px; padding: 16px; cursor: pointer; flex: 1 }
.item-check input { position: absolute; opacity: 0; pointer-events: none }
.check-ui { width: 20px; height: 20px; margin-top: 1px; border-radius: 6px; border: 1.5px solid var(--line2); display: grid; place-items: center; transition: .15s }
.check-ui:after { content: ""; width: 9px; height: 5px; border-left: 2px solid #0a0b0e; border-bottom: 2px solid #0a0b0e; transform: rotate(-45deg) translate(1px, -1px); opacity: 0 }
.item-check input:checked + .check-ui { background: var(--gold); border-color: var(--gold) }
.item-check input:checked + .check-ui:after { opacity: 1 }
.item-check input:focus-visible + .check-ui { outline: 2px solid var(--gold2); outline-offset: 2px }
.item-title { display: block; font-weight: 700; font-size: 15px; margin-bottom: 4px }
.item-text { display: block; color: var(--muted); font-size: 13px; line-height: 1.5 }
.item-price { display: block; margin-top: 10px; font-weight: 750; color: var(--gold2) }
.item-price small { color: var(--muted2); font-weight: 500 }
.item-fields { display: grid; gap: 8px; padding: 0 16px 16px 50px }
.quantity-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted) }

.sub-head { margin: 26px 0 12px; font-size: 15px; font-weight: 700; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap }
.sub-head span { font-size: 12px; font-weight: 500; color: var(--muted2) }
.km-input { width: 104px }

/* ---------- Filas vinculadas (urgente / horas extra) ---------- */
.link-panel { padding: 0 16px 16px; display: grid; gap: 8px }
.link-panel.open { padding: 0 }
.link-panel[hidden] { display: none }
.link-head { font-size: 10.5px; font-weight: 600; color: var(--muted2); text-transform: uppercase; letter-spacing: .08em; padding: 0 4px }
.link-rows { display: grid; gap: 8px }
.urgent-grid { display: grid; grid-template-columns: minmax(150px, 1fr) 104px 92px 84px 30px; gap: 10px; align-items: center }
.hours-grid { display: grid; grid-template-columns: minmax(140px, 1fr) 104px 104px 84px 30px; gap: 10px; align-items: center }
.link-head span:nth-child(4) { text-align: right }
.link-row { padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0, 0, 0, .2) }
.link-row select { height: 36px; border: 1px solid var(--line2); border-radius: 10px; background: var(--surface2); padding: 0 10px; font-size: 13.5px; font-weight: 600; outline: none; min-width: 0; width: 100% }
.link-row select:focus { border-color: var(--gold-line) }
.pieces-cell[data-disabled] { opacity: .3; pointer-events: none }
.pct-input { display: flex; align-items: center; height: 36px; border: 1px solid var(--line2); border-radius: 10px; background: rgba(0, 0, 0, .25); padding: 0 10px; gap: 4px }
.pct-input:focus-within { border-color: var(--gold-line) }
.pct-input input { width: 100%; border: 0; background: transparent; font-weight: 700; text-align: right; outline: none; -moz-appearance: textfield; appearance: textfield }
.pct-input input::-webkit-inner-spin-button { -webkit-appearance: none }
.pct-input span { color: var(--muted2); font-size: 13px }
.row-amount { text-align: right; font-size: 14px; color: var(--gold2); white-space: nowrap }
.row-remove { width: 30px; height: 30px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--muted2); font-size: 18px; cursor: pointer }
.row-remove:hover { color: var(--red); border-color: var(--line2) }
.add-btn { justify-self: start; border: 1px dashed var(--line2); background: transparent; color: var(--muted); border-radius: 10px; padding: 9px 14px; font-size: 13px; font-weight: 600; cursor: pointer; transition: .2s }
.add-btn:hover { color: var(--gold2); border-color: var(--gold-line) }
.empty-inline { color: var(--muted2); font-size: 13px; padding: 4px }

/* ---------- Condiciones ---------- */
.conditions { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; counter-reset: c }
.conditions li { position: relative; padding-left: 28px; color: var(--muted); font-size: 13.5px; line-height: 1.6; counter-increment: c }
.conditions li:before { content: counter(c, decimal-leading-zero); position: absolute; left: 0; top: 1px; font-size: 11px; font-weight: 700; color: var(--gold) }

/* ---------- Resumen ---------- */
.summary { position: sticky; top: 84px; border: 1px solid var(--line2); border-radius: var(--radius); background: rgba(14, 16, 21, .92); backdrop-filter: blur(14px); box-shadow: var(--shadow); overflow: hidden }
.summary-head { padding: 20px 22px 16px; border-bottom: 1px solid var(--line) }
.summary-head small { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .14em }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(140, 230, 173, .15); animation: pulse 2s infinite }
@keyframes pulse { 50% { opacity: .35 } }
.summary-head h2 { margin: 6px 0 0; font-size: 22px; letter-spacing: -.03em }
.summary-body { padding: 16px 22px }
#summaryList { max-height: 28vh; overflow-y: auto; padding-right: 4px; scrollbar-width: thin }
.summary-list { display: grid; gap: 8px }
.summary-item { display: flex; justify-content: space-between; gap: 14px; font-size: 13px; line-height: 1.45 }
.summary-item span:first-child { color: var(--muted) }
.summary-item span:last-child { font-weight: 700; white-space: nowrap }
.discount-summary { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line2) }
.discount-line span:last-child { color: var(--green) }
.empty { color: var(--muted2); font-size: 13px; line-height: 1.5; padding: 14px; border: 1px dashed var(--line2); border-radius: 12px; text-align: center }

.coupon-box { margin-top: 16px }
.coupon-box > label { display: block; margin-bottom: 8px; font-size: 11px; font-weight: 600; color: var(--muted2); text-transform: uppercase; letter-spacing: .08em }
.coupon-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px }
.coupon-input, .contact-field input, .contact-field textarea { width: 100%; border: 1px solid var(--line2); border-radius: 10px; background: rgba(0, 0, 0, .3); padding: 10px 12px; outline: none; font-size: 14px }
.coupon-input { text-transform: uppercase }
.coupon-input:focus, .contact-field input:focus, .contact-field textarea:focus { border-color: var(--gold-line) }
.coupon-btn { border: 1px solid var(--line2); border-radius: 10px; padding: 0 14px; background: rgba(255, 255, 255, .06); font-weight: 700; font-size: 13px; cursor: pointer }
.coupon-btn:hover { background: rgba(255, 255, 255, .12) }
.coupon-message { min-height: 16px; margin-top: 6px; color: var(--muted); font-size: 12px; font-weight: 600 }
.coupon-message.success { color: var(--green) }
.coupon-message.error { color: var(--red) }

.total-box { margin-top: 14px; padding: 16px; border-radius: 14px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); display: grid; gap: 7px }
.total-mini { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted) }
.total-mini[hidden] { display: none }
.total-mini strong { color: var(--text); font-weight: 700 }
.discount-total strong { color: var(--green) }
.total-mini.emphasized { color: var(--text); font-weight: 600 }
.irpf-row strong { color: var(--red) }
.tax-divider { height: 1px; background: var(--line); margin: 4px 0 }
.total-row { display: flex; justify-content: space-between; align-items: baseline; margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--line2) }
.total-row span { font-weight: 700; font-size: 14px }
.total { font-size: 34px; font-weight: 800; letter-spacing: -.04em; background: linear-gradient(120deg, #fff, var(--gold2)); -webkit-background-clip: text; background-clip: text; color: transparent }
.invoice-note { font-size: 11px; color: var(--muted2) }

.summary-actions { padding: 14px 22px; border-top: 1px solid var(--line); display: grid; gap: 8px }
.contact-btn { width: 100%; border: 0; border-radius: 12px; padding: 14px 16px; font-weight: 750; font-size: 14px; cursor: pointer; transition: .2s; background: linear-gradient(135deg, var(--gold2), var(--gold)); color: #0a0b0e; box-shadow: 0 10px 30px -12px rgba(216, 182, 106, .7) }
.contact-btn:hover { transform: translateY(-1px) }
.action-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px }
.copy-btn, .print-btn, .reset-btn { border: 1px solid var(--line2); background: transparent; border-radius: 10px; padding: 10px; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; transition: .2s }
.copy-btn:hover, .print-btn:hover, .reset-btn:hover { color: var(--text); background: rgba(255, 255, 255, .05) }
.legal { padding: 0 22px 18px; font-size: 11px; line-height: 1.5; color: var(--muted2) }
.legal strong { color: var(--muted) }

/* ---------- Letra pequeña ---------- */
.fineprint { max-width: var(--max); margin: 0 auto; padding: 18px 24px 40px; border-top: 1px solid var(--line); color: var(--muted2); font-size: 11px; line-height: 1.6; opacity: .75; transition: opacity .2s }
.fineprint:hover, .fineprint:focus-within { opacity: 1 }
.fp-title { margin: 0 0 8px; text-transform: uppercase; letter-spacing: .14em; font-size: 10px }
.fp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 32px }
.fp-block label { display: inline-flex; align-items: center; gap: 6px; color: var(--muted) }
.fp-block input { width: 52px; padding: 2px 6px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--muted); font-size: 11px; text-align: right; outline: none }
.fp-block input:focus { border-color: var(--line2); color: var(--text) }
.fp-block p { margin: 3px 0 0 }

/* ---------- Toast & modal ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; padding: 12px 18px; border-radius: 999px; background: #fff; color: #0a0b0e; font-weight: 700; font-size: 13px; transition: .25s; pointer-events: none; z-index: 120 }
.toast.show { opacity: 1; transform: translate(-50%, 0) }
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, .7); backdrop-filter: blur(8px) }
.modal-backdrop[hidden] { display: none }
.contact-modal { width: min(560px, 100%); max-height: 90vh; overflow: auto; border: 1px solid var(--line2); border-radius: 20px; padding: 26px; background: var(--surface); box-shadow: var(--shadow) }
.contact-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 20px }
.contact-modal h2 { margin: 0 0 6px; font-size: 24px; letter-spacing: -.03em }
.contact-modal p { margin: 0; color: var(--muted); line-height: 1.5; font-size: 14px }
.modal-close { border: 1px solid var(--line2); border-radius: 50%; width: 36px; height: 36px; background: transparent; font-size: 20px; cursor: pointer; flex: none }
.contact-form { display: grid; gap: 14px }
.contact-field label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600 }
.contact-field textarea { min-height: 100px; resize: vertical }
.contact-consent { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: 12px; line-height: 1.45 }
.send-email-btn { border: 0; border-radius: 12px; padding: 14px 16px; background: linear-gradient(135deg, var(--gold2), var(--gold)); color: #0a0b0e; font-weight: 750; cursor: pointer }
.modal-note { color: var(--muted2); font-size: 11px; line-height: 1.45 }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .layout { grid-template-columns: 1fr }
  .summary { position: relative; top: 0 }
  #summaryList { max-height: none }
}
@media (max-width: 760px) {
  .nav-actions a:not(.nav-cta) { display: none }
  .hero { padding-top: 44px }
  .steps { grid-template-columns: repeat(2, 1fr) }
  .section { padding: 20px }
  .section-head { flex-direction: column }
  .service-grid { grid-template-columns: 1fr }
  .urgent-grid, .hours-grid { grid-template-columns: 1fr 1fr; }
  .link-head { display: none }
  .link-row select { grid-column: 1 / -1 }
  .row-amount { text-align: left }
  .row-remove { justify-self: end }
  .fp-grid { grid-template-columns: 1fr }
}
@media (max-width: 430px) {
  .brand img { width: 120px }
  .day-table-head, .day-row { grid-template-columns: 1fr auto 96px; gap: 6px }
  .item-fields { padding-left: 16px }
  .coupon-row { grid-template-columns: 1fr }
  .coupon-btn { padding: 10px }
}


/* ================= v3: jornadas ================= */
.service-stack { display: grid; gap: 16px }
.rate-legend { text-align: right }
.rate-legend small { display: block; font-size: 10.5px; font-weight: 600; color: var(--muted2); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px }
.rate-legend div { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end }
.rate-legend span { font-size: 12.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px }
.rate-legend b { color: var(--text); font-weight: 700; margin-right: 4px }
.day-list { display: grid; gap: 8px }
.day-list:empty { display: none }
.day-row { display: grid; grid-template-columns: 82px auto auto 1fr 30px; gap: 16px; align-items: end; padding: 12px 12px 12px 16px; border: 1px solid var(--gold-line); border-radius: 14px; background: var(--gold-soft) }
.day-idx { align-self: center; font-weight: 750; font-size: 14px }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0 }
.field > small { font-size: 10.5px; font-weight: 600; color: var(--muted2); text-transform: uppercase; letter-spacing: .07em; white-space: nowrap }
.field.grow { flex: 1 }
.field.amount { text-align: right; align-items: flex-end }
.field.amount small { text-transform: none; letter-spacing: 0; font-size: 12px; color: var(--muted) }
.field.amount strong { font-size: 18px; color: var(--gold2); letter-spacing: -.02em; line-height: 34px }
.seg { display: inline-flex; border: 1px solid var(--line2); border-radius: 10px; overflow: hidden; background: rgba(0, 0, 0, .25) }
.seg button { border: 0; background: transparent; padding: 0 14px; height: 34px; font-size: 13px; font-weight: 650; color: var(--muted); cursor: pointer; transition: .15s }
.seg button + button { border-left: 1px solid var(--line) }
.seg button:hover { color: var(--text) }
.seg button.on { background: var(--gold); color: #0a0b0e }
.day-row .row-remove { align-self: center }
.service-card > .add-btn { margin-top: -4px }

/* ================= v3: tarjetas vinculadas ================= */
.stack-list { display: grid; gap: 10px }
.stack-list:empty { display: none }
.link-card { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; padding: 14px; border: 1px solid var(--line2); border-radius: 14px; background: rgba(0, 0, 0, .22) }
.link-card .field.grow { min-width: 300px }
.link-card select { height: 36px; border: 1px solid var(--line2); border-radius: 10px; background: var(--surface2); padding: 0 10px; font-size: 13.5px; font-weight: 600; outline: none; width: 100% }
.link-card select:focus { border-color: var(--gold-line) }
.link-card .pct-input { width: 92px }
.link-card .field.amount { min-width: 110px; margin-left: auto }
.link-card .row-remove { align-self: center }
#urgentPanel { padding: 0 16px 16px; display: grid; gap: 10px }
#urgentPanel[hidden] { display: none }
#horas-extra .add-btn { margin-top: 10px }
#horas-extra .empty-inline { padding: 8px 0 0 }
#horas-extra .empty-inline[hidden] { display: none }

/* ================= v3: cálculo de gastos ================= */
.calc { margin: 0 16px 16px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0, 0, 0, .25); padding: 10px 12px; font-size: 12.5px; transition: opacity .2s }
.calc.muted { opacity: .45 }
.calc-rows { display: grid; gap: 6px }
.calc-row { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; color: var(--muted) }
.calc-row span:nth-child(2) { color: var(--muted2); text-align: right; font-variant-numeric: tabular-nums }
.calc-row b { color: var(--text); font-weight: 650; min-width: 64px; text-align: right; font-variant-numeric: tabular-nums }
.calc-total { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line2); font-weight: 700 }
.calc-total b { color: var(--gold2) }
.calc-hint { color: var(--muted2) }
.expense-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) }

/* ================= v3: resumen agrupado ================= */
.summary-list { gap: 14px }
.sum-group { display: grid; gap: 7px }
.sum-group + .sum-group { padding-top: 12px; border-top: 1px solid var(--line) }
.sum-group-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--gold2) }
.sum-group-head b { font-size: 13px; letter-spacing: 0; color: var(--text) }
.summary-item small { display: block; font-size: 11.5px; color: var(--muted2); margin-top: 1px }
#discountList .sum-group-head { color: var(--green); margin-bottom: 2px }

@media (max-width: 760px) {
  .col-main { min-width: 0 }
  .day-row { display: flex; flex-wrap: wrap; gap: 12px; position: relative; padding-right: 40px }
  .day-row .day-idx { flex-basis: 100% }
  .day-row .row-remove { position: absolute; top: 8px; right: 8px }
  .day-row .field.amount { flex-basis: 100%; flex-direction: row; justify-content: space-between; align-items: baseline }
  .link-card { position: relative; padding-right: 44px }
  .link-card .field.grow { min-width: 100% }
  .link-card .row-remove { position: absolute; top: 8px; right: 8px }
  .link-card .field.amount { flex-basis: 100%; flex-direction: row; justify-content: space-between; align-items: baseline }
  .rate-legend { text-align: left }
  .rate-legend div { justify-content: flex-start }
  .link-card .field.amount { margin-left: 0 }
}

/* ================= Hoja de impresión (A4 vertical) ================= */
.print-sheet { display: none }
@page { size: A4 portrait; margin: 14mm 14mm 16mm }
@media print {
  html, body { background: #fff !important; color: #111 }
  body:before { display: none }
  body > *:not(.print-sheet) { display: none !important }
  .print-sheet { display: block; font-family: Inter, Arial, sans-serif; font-size: 10pt; color: #111 }
  .ps-head { display: flex; justify-content: space-between; align-items: flex-end; padding-bottom: 10pt; margin-bottom: 14pt; border-bottom: 2px solid #111 }
  .ps-brand { font-size: 18pt; font-weight: 800; letter-spacing: .3em }
  .ps-sub { font-size: 9pt; color: #555; margin-top: 3pt }
  .ps-date { text-align: right; font-size: 9pt; color: #333 }
  .ps-date span { color: #888; font-size: 8pt }
  .ps-table th:nth-child(1) { width: 46% } .ps-table th:nth-child(2) { width: 36% }
  .ps-table { width: 100%; table-layout: fixed; border-collapse: collapse; margin-bottom: 12pt; page-break-inside: avoid }
  .ps-table th { text-align: left; font-size: 9pt; text-transform: uppercase; letter-spacing: .08em; padding: 5pt 6pt; background: #f1ede4; border-bottom: 1px solid #b89a55 }
  .ps-table td { padding: 5pt 6pt; border-bottom: 1px solid #e6e6e6; vertical-align: top }
  .ps-table tfoot td { font-weight: 700; border-bottom: 0; border-top: 1px solid #999 }
  .ps-detail { color: #666; font-size: 9pt }
  .ps-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums }
  .ps-totals { margin: 6pt 0 0 auto; width: 60%; border-collapse: collapse; page-break-inside: avoid }
  .ps-totals td { padding: 4pt 6pt }
  .ps-totals td:last-child { text-align: right; font-variant-numeric: tabular-nums }
  .ps-grand td { font-size: 14pt; font-weight: 800; border-top: 2px solid #111; padding-top: 7pt }
  .ps-legal { margin-top: 18pt; font-size: 8pt; color: #666; line-height: 1.5 }
  .ps-foot { margin-top: 10pt; font-size: 8pt; color: #999; text-align: center; letter-spacing: .1em }
}

/* ================= v4: jornadas visuales ================= */
.service-top .rate-legend { display: none }
.day-list { position: relative; gap: 10px }
.day-row { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: stretch; padding: 0; border: 0; background: none; position: relative }
.day-row:not(:last-child) .day-badge:after { content: ""; position: absolute; left: 50%; top: 40px; bottom: -14px; width: 1px; background: linear-gradient(var(--gold-line), transparent); transform: translateX(-50%) }
.day-badge { position: relative }
.day-badge span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--gold2), var(--gold)); color: #0a0b0e; font-weight: 800; font-size: 13px; box-shadow: 0 0 0 4px rgba(216, 182, 106, .12) }
.day-body { border: 1px solid var(--line2); border-radius: 16px; background: linear-gradient(180deg, rgba(216, 182, 106, .07), rgba(255, 255, 255, .015)); padding: 12px 14px 14px; min-width: 0 }
.day-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px }
.day-head strong { font-size: 14.5px; white-space: nowrap }
.day-tools { display: flex; gap: 4px; align-items: center }
.tool-btn { border: 1px solid transparent; background: transparent; color: var(--muted2); font-size: 12px; font-weight: 600; padding: 5px 9px; border-radius: 8px; cursor: pointer }
.tool-btn:hover { color: var(--gold2); border-color: var(--line2) }
.day-main { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px }
.dur-tiles { display: grid; grid-template-columns: repeat(3, 84px); gap: 6px }
.dur-tile { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 4px; border: 1px solid var(--line2); border-radius: 12px; background: rgba(0, 0, 0, .25); cursor: pointer; transition: .15s }
.dur-tile b { font-size: 15px }
.dur-tile span { font-size: 11.5px; color: var(--muted) }
.dur-tile:hover { border-color: var(--gold-line) }
.dur-tile.on { background: linear-gradient(135deg, var(--gold2), var(--gold)); border-color: transparent; color: #0a0b0e; box-shadow: 0 8px 22px -10px rgba(216, 182, 106, .8) }
.dur-tile.on span { color: rgba(10, 11, 14, .75) }
.pros-box small { display: block; font-size: 10.5px; font-weight: 600; color: var(--muted2); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 5px }
.pros-line { display: flex; align-items: center; gap: 10px }
.people { display: flex; align-items: center; gap: 1px; color: var(--gold2) }
.people svg { width: 15px; height: 15px; fill: currentColor }
.people em { font-style: normal; font-size: 12px; margin-left: 4px; color: var(--muted) }
.day-amount { margin-left: auto; text-align: right }
.day-amount small { display: block; font-size: 12px; color: var(--muted) }
.day-amount strong { font-size: 20px; color: var(--gold2); letter-spacing: -.02em }
.fp-title span { text-transform: none; letter-spacing: 0; opacity: .7 }
.fineprint[hidden] { display: none }

@media (max-width: 760px) {
  .day-row { grid-template-columns: 30px 1fr; gap: 10px; padding-right: 0 }
  .day-badge span { width: 30px; height: 30px; font-size: 11px }
  .day-row:not(:last-child) .day-badge:after { top: 30px }
  .dur-tiles { grid-template-columns: repeat(3, 1fr); width: 100% }
  .day-amount { margin-left: 0; width: 100%; display: flex; justify-content: space-between; align-items: baseline }
  .day-row .row-remove { position: static }
}

/* ================= v5: alineación de tarjetas ================= */
.item-check > span:last-child { display: flex; flex-direction: column; min-height: 100% }
.item-check .item-price { margin-top: auto; padding-top: 10px }
#edicion .item-grid { grid-template-columns: 1fr; gap: 10px }
#edicion .item-card { flex-direction: row; align-items: center; gap: 12px }
#edicion .item-check { flex: 1; min-width: 0 }
#edicion .item-check .item-price { margin-top: 8px; padding-top: 0 }
#edicion .item-fields { display: flex; gap: 22px; padding: 16px 18px 16px 0; flex: none }
#edicion .quantity-line { flex-direction: column; align-items: flex-start; gap: 6px; font-size: 10.5px; font-weight: 600; color: var(--muted2); text-transform: uppercase; letter-spacing: .07em }
.expense-grid .item-fields { padding: 0 16px 12px }
@media (max-width: 760px) {
  #edicion .item-card { flex-direction: column; align-items: stretch }
  #edicion .item-fields { padding: 0 16px 16px 50px; gap: 16px; flex-wrap: wrap }
}
#extras > .section-head + .item-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) }
.expense-grid .item-check { flex: none }
.expense-grid .item-check .item-price { margin-top: 8px; padding-top: 0 }
.expense-grid .calc { margin-top: auto }
@media (max-width: 760px) { #extras > .section-head + .item-grid { grid-template-columns: 1fr } }
