/* Kit Jornada 2027: estilos del generador (formulario, turnos, documentos, licencia, vista previa e impresión). */
.app-main { padding: 1.6rem 0 2rem; }
#app.is-loading { min-height: 50vh; }
.app-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.app-top h1 { font-size: clamp(1.5rem, 3.5vw, 2rem); margin: 0 0 0.3rem; }
.app-tools { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.notice { border-radius: var(--radius); padding: 0.75rem 1rem; margin: 0 0 1rem; }
.notice--info { background: #e9f3ef; border: 1px solid #c4ddd4; }
.notice--warn { background: #fff4e5; border: 1px solid #f1d29b; }
.companies { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.6rem 0.9rem; }
.companies select { min-height: 40px; font: inherit; border-radius: 8px; border: 1px solid var(--line); padding: 0.3rem 0.5rem; max-width: 100%; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(1rem, 3vw, 1.6rem); margin-bottom: 1.2rem; }
.step-head { margin-bottom: 1rem; }
.step-count { margin: 0 0 0.2rem; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--accent); }
.step-head h2 { margin: 0 0 0.3rem; font-size: 1.35rem; }
.step-intro { margin: 0; color: var(--muted); }
.set { border: 0; padding: 0; margin: 0; min-width: 0; }
.set legend { font-weight: 700; color: var(--ink); margin-bottom: 0.6rem; padding: 0; }
.set legend.sr-only { margin: -1px; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.9rem 1rem; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: 1 / -1; }
.field label { display: block; font-weight: 600; font-size: 0.93rem; margin-bottom: 0.25rem; }
.field input, .field select { width: 100%; min-height: 44px; font: inherit; border: 1px solid #b9c8c3; border-radius: 8px; padding: 0.45rem 0.65rem; background: #fff; color: var(--text); }
.field input:focus, .field select:focus, .week input:focus { border-color: var(--ink-2); }
.req { color: var(--accent); }
.opt { color: var(--muted); font-weight: 400; }
.hint { font-size: 0.84rem; color: var(--muted); margin: 0.25rem 0 0; }
.turno { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem; background: #fbfcfb; }
.turno__head { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; margin-bottom: 0.7rem; }
.turno__head h3 { margin: 0; }
.week-wrap { overflow-x: auto; margin-top: 0.9rem; }
.week { border-collapse: collapse; width: 100%; min-width: 360px; }
.week th, .week td { padding: 0.3rem 0.35rem; text-align: left; border-bottom: 1px solid var(--line); }
.week thead th { font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.week tbody th { font-weight: 600; font-size: 0.93rem; width: 22%; }
.week input { width: 100%; min-height: 40px; font: inherit; border: 1px solid #b9c8c3; border-radius: 8px; padding: 0.3rem 0.45rem; background: #fff; }
.turno__tools { margin-top: 0.6rem; }
.turno-sum { margin-top: 0.8rem; background: var(--soft); border-radius: 10px; padding: 0.7rem 0.9rem; }
.turno-sum__total { margin: 0 0 0.4rem; }
.yrs { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.yr { border-radius: 999px; padding: 0.2rem 0.7rem; font-size: 0.85rem; display: inline-flex; gap: 0.35rem; border: 1px solid; }
.yr--ok { background: #e6f4ec; border-color: #b7dcc6; color: var(--ok); }
.yr--over { background: #fdecea; border-color: #f2c0ba; color: var(--bad); }
.issues { border-radius: var(--radius); padding: 0.8rem 1rem; margin-bottom: 1rem; }
.issues ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.45rem; }
.issues--ok { background: #e6f4ec; border: 1px solid #b7dcc6; }
.issues--ok p { margin: 0; display: flex; gap: 0.5rem; align-items: center; }
.issues--error { background: #fdecea; border: 1px solid #f2c0ba; }
.issues--warning { background: #fff6e0; border: 1px solid #f0d699; }
.issues__head { font-weight: 700; margin: 0 0 0.5rem; }
.issue { display: flex; gap: 0.6rem; align-items: flex-start; }
.issue__tag { flex: none; font-size: 0.75rem; font-weight: 700; border-radius: 999px; padding: 0.1rem 0.55rem; margin-top: 0.15rem; }
.issue--error .issue__tag { background: var(--bad); color: #fff; }
.issue--warning .issue__tag { background: #f3c55b; color: #3b2a00; }
.tick { width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--ok); flex: none; position: relative; }
.tick::after { content: ''; position: absolute; left: 0.37rem; top: 0.2rem; width: 0.28rem; height: 0.55rem; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.docs { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1rem; align-items: start; }
.docs__main, .docs__side { min-width: 0; }
.tabs { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-bottom: 0.6rem; }
.tab { font: inherit; font-size: 0.9rem; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 0.4rem 0.8rem; cursor: pointer; display: inline-flex; gap: 0.4rem; align-items: center; min-height: 40px; }
.tab__num { display: inline-grid; place-items: center; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: var(--soft); font-size: 0.78rem; font-weight: 700; }
.tab[aria-selected='true'] { background: var(--ink); border-color: var(--ink); color: #fff; }
.tab[aria-selected='true'] .tab__num { background: #fff; color: var(--ink); }
.preview { max-height: 78vh; overflow: auto; background: #e9eeec; border-radius: var(--radius); padding: 0.8rem; border: 1px solid var(--line); }
.docs__side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; position: sticky; top: 76px; }
.side-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.side-title { margin: 0 0 0.6rem; font-size: 1.05rem; }
.tiers { list-style: none; padding: 0; margin: 0 0 0.6rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.5rem; }
.tier { display: flex; justify-content: space-between; gap: 0.6rem; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 0.6rem 0.75rem; text-decoration: none; color: var(--text); }
a.tier:hover { border-color: var(--accent); }
.tier__text { display: grid; gap: 0.1rem; font-weight: 650; }
.tier__per { font-weight: 400; font-size: 0.82rem; color: var(--muted); }
.tier__price { font-weight: 800; color: var(--ink); white-space: nowrap; }
.lic-form label { display: block; font-weight: 600; margin: 0.6rem 0 0.25rem; }
.lic-form__row { display: flex; gap: 0.4rem; }
.lic-form__row input { flex: 1; min-width: 0; min-height: 44px; font: inherit; border: 1px solid #b9c8c3; border-radius: 8px; padding: 0.4rem 0.6rem; }
.lic-msg { min-height: 1.2em; font-size: 0.88rem; margin: 0.4rem 0 0; }
.lic-msg--error, .text-error { color: var(--bad); }
.lic-ok { display: flex; gap: 0.5rem; align-items: flex-start; color: var(--ok); font-weight: 600; }
.lic-facts { display: grid; grid-template-columns: auto 1fr; gap: 0.2rem 0.8rem; margin: 0.6rem 0; font-size: 0.92rem; }
.lic-facts dt { color: var(--muted); }
.lic-facts dd { margin: 0; }
.dl-list { list-style: none; padding: 0; margin: 0.7rem 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.4rem; }
.dl-list li { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; font-size: 0.92rem; }
.dl-list__name { display: grid; }
.dl-list__why { margin: 0; }
.export-msg { min-height: 1.2em; font-size: 0.88rem; margin: 0.5rem 0 0; }
.export-msg--ok { color: var(--ok); }
.export-msg--error { color: var(--bad); }
.kit-note { margin: 1rem 0 0; font-size: 0.9rem; font-style: italic; color: var(--muted); border-left: 3px solid var(--line); padding-left: 0.7rem; }
#toast { position: fixed; left: 50%; bottom: 1.2rem; transform: translateX(-50%) translateY(150%); background: var(--ink); color: #fff; padding: 0.65rem 1rem; border-radius: 10px; transition: transform 0.25s; z-index: 60; max-width: calc(100% - 2rem); }
#toast.is-visible { transform: translateX(-50%) translateY(0); }

/* hoja de papel */
.paper { position: relative; background: #fff; color: #111; max-width: 820px; margin: 0 auto; padding: 2.2rem 2.4rem; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12); font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.5; }
.paper.is-preview { user-select: none; -webkit-user-select: none; }
.paper .watermark { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
.paper-body { position: relative; z-index: 1; }
.d-header { text-align: right; font-size: 11px; color: #555; border-bottom: 1px solid #ccd; padding-bottom: 0.3rem; margin-bottom: 1rem; }
.d-title { font-size: 20px; color: var(--ink); margin: 0 0 0.3rem; }
.d-subtitle { color: #444; font-size: 13px; border-bottom: 2px solid var(--ink); padding-bottom: 0.4rem; margin-bottom: 1rem; }
.d-heading { font-size: 15px; margin: 1.1rem 0 0.4rem; color: var(--ink); }
.d-para { margin: 0 0 0.6rem; }
.d-justify { text-align: justify; }
.d-left { text-align: left; }
.d-center { text-align: center; }
.d-right { text-align: right; }
.d-bold { font-weight: 700; }
.d-italic { font-style: italic; }
.d-small { font-size: 12px; }
.d-clause { display: grid; grid-template-columns: 3rem 1fr; gap: 0.3rem; margin: 0 0 0.45rem; text-align: justify; }
.d-num { font-variant-numeric: tabular-nums; }
.d-bullet { margin: 0 0 0.3rem 1rem; padding-left: 1rem; position: relative; }
.d-bullet::before { content: ''; position: absolute; left: 0; top: 0.6em; width: 0.35em; height: 0.35em; border-radius: 50%; background: #333; }
.d-bullet--2 { margin-left: 2.2rem; }
.d-table-wrap { overflow-x: auto; margin: 0.3rem 0 0.8rem; }
.d-table { border-collapse: collapse; width: 100%; table-layout: fixed; font-size: 12.5px; }
.d-table th, .d-table td { border: 1px solid #9aaea8; padding: 0.25rem 0.4rem; text-align: left; vertical-align: top; overflow-wrap: break-word; }
.d-table th { background: #e4eeea; }
.d-sign { margin: 1.4rem 0 0.6rem; display: grid; gap: 1.4rem; }
.d-sign p { margin: 0; display: grid; gap: 0.2rem; font-size: 12.5px; }
.d-line { display: block; border-bottom: 1px solid #333; height: 1.6rem; max-width: 360px; }
.d-note, .d-footnote { font-style: italic; font-size: 12px; color: #555; border-top: 1px solid #ccd; padding-top: 0.4rem; margin-top: 1rem; }
.d-spacer { height: 0.6rem; }
.d-pagebreak { border-top: 2px dashed #c9d3cf; margin: 1.6rem -2.4rem; }
#print-root { display: none; }

@media (max-width: 960px) {
  .docs { grid-template-columns: minmax(0, 1fr); }
  .docs__side { position: static; }
}
@media (max-width: 680px) {
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .paper { padding: 1.2rem 1rem; font-size: 13px; }
  .d-pagebreak { margin: 1.2rem -1rem; }
  .d-clause { grid-template-columns: 2.4rem 1fr; }
  .preview .paper { min-width: 600px; }
  .week tbody th { width: 18%; font-size: 0.85rem; }
  .week input { padding: 0.25rem 0.3rem; }
}
@media print {
  body.is-printing > *:not(#print-root) { display: none !important; }
  body.is-printing #print-root { display: block; }
  body.is-printing .paper { box-shadow: none; max-width: none; padding: 0; }
  .d-pagebreak { break-before: page; border: 0; margin: 0; }
  @page { size: letter; margin: 2.5cm; }
}
