/* Libro de Reclamaciones Virtual */
:root {
  --orange: #ef8e00; --orange-d: #b86d00; --orange-l: #fff4e2;
  --ink: #141416; --text: #222; --muted: #6b6b70; --line: #e3dfd8; --bg: #f6f4f0; --card: #fff;
  --ok: #1f8a50; --danger: #cc3a3f; --info: #2f6fd6;
  --r: 14px; --font: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif; --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 16px/1.6 var(--font); color: var(--text); background: var(--bg); }
a { color: var(--orange-d); }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0 0 .5em; color: var(--ink); }
.lr-wrap { width: min(980px, 100% - 32px); margin-inline: auto; }
.lr-narrow { width: min(720px, 100% - 32px); }
.lr-muted, .lr-note { color: var(--muted); }
.lr-note { font-size: .88rem; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

/* Cabecera */
.lr-header { background: var(--ink); color: #fff; border-bottom: 4px solid var(--orange); }
.lr-header-in { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 0; }
.lr-brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.lr-brand img { width: 46px; height: 46px; border-radius: 50%; }
.lr-brand strong { display: block; font: 800 1.35rem/1 var(--display); text-transform: uppercase; letter-spacing: .02em; }
.lr-brand small { color: #bbb; font-size: .85rem; }
.lr-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.lr-nav a { color: #ddd; text-decoration: none; font-weight: 600; padding: 8px 12px; border-radius: 8px; font-size: .95rem; }
.lr-nav a:hover { background: #222; color: #fff; }
.lr-nav a.is-active { background: var(--orange); color: #111; }

.lr-main { padding-bottom: 60px; min-height: 60vh; }
.lr-hero { background: linear-gradient(180deg, #1b1b1e, #26262a); color: #eee; padding: 42px 0 70px; margin-bottom: -40px; }
.lr-hero h1 { color: #fff; font-size: clamp(2.2rem, 6vw, 3.4rem); text-transform: uppercase; }
.lr-hero p { max-width: 64ch; margin: 0; }
.lr-hero-sm { padding-bottom: 64px; }
.lr-kicker { color: var(--orange) !important; font: 700 .85rem var(--font); letter-spacing: .16em; text-transform: uppercase; margin-bottom: 6px !important; }

/* Tarjetas y formulario */
.lr-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; margin: 0 0 18px; box-shadow: 0 10px 30px -22px rgba(0,0,0,.35); position: relative; }
fieldset.lr-card { min-width: 0; }
.lr-card legend { float: left; width: 100%; font: 800 1.35rem var(--display); text-transform: uppercase; color: var(--ink); margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.lr-card legend + * { clear: both; }
.lr-num { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--orange); color: #111; font-size: 1.05rem; flex: none; }
.lr-head { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; border-top: 4px solid var(--orange); }
.lr-head > div:first-child { display: flex; flex-direction: column; }
.lr-head-meta { display: flex; gap: 26px; }
.lr-local { display: inline-block; margin-top: 8px; padding: 4px 10px; border-radius: 99px; background: var(--orange-l, #fff3e0); color: #6b3d00; font-size: .92rem; align-self: flex-start; }
.lr-local-pick { margin: 12px 0 0; min-width: min(420px, 100%); }
.lr-head-meta > div { display: flex; flex-direction: column; }
.lr-label { font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.lr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.lr-span2 { grid-column: 1 / -1; }
.lr-guardian { background: var(--orange-l); border-radius: 10px; padding: 16px 16px 2px; margin-top: 4px; }
@media (max-width: 640px) { .lr-grid { grid-template-columns: 1fr; } .lr-card { padding: 18px; } }
.lr-field { margin-bottom: 14px; }
.lr-field label, .lr-flabel { display: block; font-weight: 600; font-size: .93rem; margin-bottom: 5px; color: var(--ink); }
.lr-field small { color: var(--muted); font-weight: 400; }
.lr-field input, .lr-field select, .lr-field textarea {
  width: 100%; padding: 11px 13px; border: 1.5px solid #d6d1c9; border-radius: 10px; background: #fff; color: var(--text);
  font: 400 1rem var(--font); transition: border-color .2s, box-shadow .2s;
}
.lr-field textarea { resize: vertical; }
.lr-field input:focus, .lr-field select:focus, .lr-field textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(239,142,0,.2); }
[aria-invalid="true"] { border-color: var(--danger) !important; background: #fff7f7 !important; }
.lr-err { display: block; color: var(--danger); font-size: .86rem; margin-top: 4px; font-weight: 500; }
.lr-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
@media (max-width: 640px) { .lr-options { grid-template-columns: 1fr; } }
.lr-opt { position: relative; cursor: pointer; display: block; }
.lr-opt input { position: absolute; opacity: 0; }
.lr-opt span { display: block; border: 2px solid var(--line); border-radius: 12px; padding: 13px 14px 13px 44px; transition: border-color .2s, background .2s; height: 100%; }
.lr-opt span::before { content: ''; position: absolute; left: 15px; top: 16px; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #aaa; background: #fff; transition: all .2s; }
.lr-opt b { display: block; }
.lr-opt small { color: var(--muted); font-size: .86rem; line-height: 1.4; display: block; }
.lr-opt input:checked + span { border-color: var(--orange); background: var(--orange-l); }
.lr-opt input:checked + span::before { border-color: var(--orange); background: radial-gradient(circle, var(--orange) 45%, #fff 50%); }
.lr-opt input:focus-visible + span { outline: 3px solid var(--orange); outline-offset: 2px; }
.lr-opt-sm span { padding-top: 10px; padding-bottom: 10px; }
.lr-opt-sm span::before { top: 13px; }
.lr-check { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; margin-bottom: 12px; cursor: pointer; }
.lr-check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--orange); flex: none; }
.lr-check.is-error { color: var(--danger); }
.lr-consent { border-left: 4px solid var(--orange); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.lr-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 10px; border: 1.5px solid #cfc9c0; background: #fff;
  color: var(--ink); font: 700 .95rem var(--font); cursor: pointer; text-decoration: none; transition: background .2s, border-color .2s, transform .2s; }
.lr-btn:hover { border-color: #999; transform: translateY(-1px); }
.lr-btn-primary { background: var(--orange); border-color: var(--orange); color: #111; }
.lr-btn-primary:hover { background: #ffa222; border-color: #ffa222; }
.lr-btn-lg { padding: 14px 26px; font-size: 1.05rem; width: 100%; margin-top: 8px; }
.lr-btn[disabled] { opacity: .6; cursor: wait; }

.alert { padding: 13px 16px; border-radius: 10px; margin: 0 0 18px; border-left: 4px solid; font-weight: 500; position: relative; }
.alert-error { background: #fdeeee; border-color: var(--danger); color: #7d1d21; }
.alert-success { background: #e8f6ee; border-color: var(--ok); color: #135c37; }
.alert-info { background: var(--orange-l); border-color: var(--orange); color: #6b3f00; }

/* Confirmación / hoja */
.lr-success { display: flex; gap: 18px; background: #fff; border: 2px solid var(--ok); border-radius: var(--r); padding: 22px; margin: 26px 0 18px; }
.lr-success h1 { font-size: 2rem; text-transform: uppercase; }
.lr-success p { margin: 0 0 6px; }
.lr-success-icon { flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; font-size: 1.7rem; font-weight: 800; }
.lr-code { font-family: var(--display); font-size: 1.4rem; letter-spacing: .04em; background: var(--orange-l); padding: 0 8px; border-radius: 6px; }
.lr-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 22px 0 14px; }
.lr-toolbar .lr-status { margin-left: auto; }
.lr-sheet { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 28px; overflow-x: auto; }
@media (max-width: 640px) { .lr-sheet { padding: 12px; } }

.lr-status { display: inline-block; padding: 5px 12px; border-radius: 99px; font-weight: 700; font-size: .82rem; }
.st-pendiente { background: var(--orange-l); color: var(--orange-d); }
.st-en_proceso { background: #e8efff; color: var(--info); }
.st-propuesta { background: #f1e8ff; color: #6b3fc4; }
.st-respondido, .st-acuerdo { background: #e5f5ec; color: var(--ok); }

/* Consulta */
.lr-inline-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; }
.lr-inline-form .lr-field { margin: 0; }
@media (max-width: 640px) { .lr-inline-form { grid-template-columns: 1fr; } }
.lr-result-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.lr-result-head h2 { font-size: 2rem; margin: 2px 0; }
.lr-steps { list-style: none; padding: 0; margin: 22px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; counter-reset: s; }
.lr-steps li { border-top: 4px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; font-size: .9rem; }
.lr-steps li span { color: var(--muted); }
.lr-steps li.done { border-color: var(--ok); }
.lr-steps li.current { border-color: var(--orange); }
@media (max-width: 560px) { .lr-steps { grid-template-columns: 1fr; } }
.lr-answer { background: var(--orange-l); border-left: 4px solid var(--orange); padding: 14px 16px; border-radius: 0 10px 10px 0; margin: 10px 0 12px; }
.lr-h1 { font-size: 2.2rem; text-transform: uppercase; margin-top: 4px; }

/* Pie */
.lr-footer { background: var(--ink); color: #bbb; padding: 26px 0; font-size: .9rem; text-align: center; }
.lr-footer p { margin: 4px 0; }
.lr-footer strong { color: #fff; }
.lr-legal { color: #888; font-size: .8rem; margin-top: 10px !important; }

/* Impresión: sólo la hoja, en A4 */
@media print {
  @page { size: A4; margin: 10mm; }
  body { background: #fff; }
  .no-print, .lr-header, .lr-footer, .lr-toolbar, .lr-success { display: none !important; }
  .lr-wrap { width: 100%; }
  .lr-main { padding: 0; }
  .lr-sheet { border: 0; padding: 0; border-radius: 0; overflow: visible; zoom: .9; }
  .lr-sheet td { padding-top: 4px !important; padding-bottom: 4px !important; }
  .lr-sheet div[style*="min-height"] { min-height: 40px !important; }
  .lr-sheet td[style*="height:90px"] { height: 60px !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  table { page-break-inside: auto; } tr { page-break-inside: avoid; }
}
