/* MedDocs · estilos */
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
:root {
  --bg: #f5f3ef; --panel: #ffffff; --ink: #1d1d1b; --ink-2: #3b3934; --muted: #676159; --line: #e4dfd6; --line-2: #efebe4;
  --beige: #ddd2bf; --beige-soft: #f1ece3; --accent: #e5007e; --accent-dark: #c2006b; --accent-soft: #fde7f2;
  --ok: #1b6e3b; --ok-soft: #e0f4e7; --warn: #b77f00; --warn-soft: #fff4d6; --bad: #cf2e25; --bad-soft: #fde3e1;
  --blue: #2563a8; --blue-soft: #e6eefa; --grey: #7c7c7c; --grey-soft: #ececec;
  --radius: 10px; --shadow: 0 1px 2px rgba(29,29,27,.06), 0 4px 16px rgba(29,29,27,.06);
  --header-h: 56px; --side-w: 290px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif; font-size: 15px; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.callout a, .hint a, .md a { text-decoration: underline; text-underline-offset: 2px; }
.hidden { display: none !important; }
.grow { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
kbd { display: inline-block; padding: 1px 6px; border: 1px solid #cfc9bf; border-bottom-width: 2px; border-radius: 5px; background: #fff; font-size: 12px; font-family: inherit; color: var(--ink-2); }
code { background: var(--beige-soft); padding: 1px 5px; border-radius: 4px; font-size: 13px; }

/* barra de progreso */
#progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--accent); z-index: 200; transition: width .3s ease, opacity .3s; opacity: 0; }
#progress.on { width: 85%; opacity: 1; transition: width 8s cubic-bezier(.1,.7,.2,1), opacity .2s; }

/* cabecera */
header.top { height: var(--header-h); display: flex; align-items: center; gap: 14px; padding: 0 14px; background: #1d1d1b; color: #fff; position: sticky; top: 0; z-index: 40; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 19px; letter-spacing: .6px; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand small { font-weight: 400; color: #a9a59e; font-size: 12.5px; letter-spacing: 0; }
/* logo: tres barras rosas, la central a media altura */
.logo { display: inline-flex; gap: 3px; align-items: flex-end; height: 18px; }
.logo i { display: block; width: 5px; height: 18px; background: var(--accent); border-radius: 1.5px; }
.logo i:nth-child(2) { height: 9px; }
.gsearch { position: relative; flex: 1; max-width: 520px; margin-left: 8px; }
.gsearch input { width: 100%; padding: 8px 12px; border-radius: 8px; border: 1px solid #3c3a36; background: #2b2a27; color: #fff; }
.gsearch input::placeholder { color: #9c978f; }
.gsearch input:focus { outline: none; border-color: var(--accent); background: #fff; color: var(--ink); }
.gresults { position: absolute; top: 44px; left: 0; right: 0; background: #fff; color: var(--ink); border-radius: 10px; box-shadow: 0 12px 40px rgba(0,0,0,.25); max-height: 70vh; overflow: auto; padding: 6px 0; }
.gresults h6 { margin: 8px 14px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.gresults a { display: block; padding: 7px 14px; color: var(--ink); }
.gresults a:hover, .gresults a.sel { background: var(--accent-soft); text-decoration: none; }
.gresults a small { color: var(--muted); margin-left: 6px; }
.gresults .none { padding: 10px 14px; color: var(--muted); }
.mainnav { display: flex; gap: 2px; margin-left: auto; }
.mainnav a { color: #d6d2cb; padding: 8px 12px; border-radius: 7px; font-size: 14.5px; white-space: nowrap; }
.mainnav a:hover { background: #2f2d2a; text-decoration: none; }
.mainnav a.active { background: var(--accent); color: #fff; }
.iconbtn { background: transparent; border: 0; cursor: pointer; color: var(--muted); width: 32px; height: 32px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; }
.iconbtn:hover { background: var(--line-2); color: var(--ink); }
.iconbtn.light { color: #d6d2cb; font-size: 18px; }
.iconbtn.light:hover { background: #2f2d2a; color: #fff; }
.iconbtn.help { border: 1.5px solid #5b5852; border-radius: 50%; width: 30px; height: 30px; font-weight: 700; font-size: 15px; }
#btnMenu { display: none; }

/* layout */
.layout { display: flex; height: calc(100vh - var(--header-h)); }
#sidebar { width: var(--side-w); min-width: var(--side-w); background: var(--panel); border-right: 1px solid var(--line); overflow: auto; transition: margin .2s; }
body.wide #sidebar { margin-left: calc(-1 * var(--side-w)); }
body.wide.side-open #sidebar { margin-left: 0; }
#main { flex: 1; overflow: auto; min-width: 0; }
#view { padding: 20px 26px 90px; max-width: 1500px; margin: 0 auto; }
body.wide #view { max-width: none; padding: 0 0 40px; }
#scrim { display: none; }

/* árbol */
.side-head { display: flex; gap: 6px; padding: 10px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 2; }
.side-head input { flex: 1; min-width: 0; padding: 7px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); }
.side-head .btn { white-space: nowrap; }
.cliente > .cnombre { display: flex; align-items: center; gap: 6px; padding: 9px 10px 9px 8px; font-weight: 700; cursor: pointer; background: var(--beige-soft); border-bottom: 1px solid var(--line); font-size: 14px; letter-spacing: .3px; user-select: none; }
.cliente > .cnombre .caret { width: 14px; color: var(--muted); transition: transform .15s; font-size: 11px; }
.cliente.closed > .cnombre .caret { transform: rotate(-90deg); }
.cliente.closed > .zonas { display: none; }
.cliente > .cnombre .count { color: var(--muted); font-weight: 400; font-size: 12px; }
.cliente > .cnombre .tools { margin-left: auto; display: flex; opacity: 0; transition: opacity .15s; }
.cliente > .cnombre:hover .tools { opacity: 1; }
.cliente > .cnombre .tools button { width: 26px; height: 26px; }
.zona { display: grid; grid-template-columns: 1fr auto; padding: 7px 12px 7px 30px; border-bottom: 1px solid var(--line-2); color: var(--ink); position: relative; }
.zona:hover { background: #faf8f4; text-decoration: none; }
.zona.active { background: var(--accent-soft); }
.zona.active::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent); }
.zona .zn { font-size: 14px; }
.zona .meta { grid-column: 1; color: var(--muted); font-size: 12px; }
.zona .badge { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.badge { display: inline-block; min-width: 20px; padding: 1px 7px; border-radius: 10px; background: var(--blue-soft); color: var(--blue); font-size: 11.5px; font-weight: 700; text-align: center; }

/* botones */
.btn { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid #cdc7bc; color: var(--ink); padding: 8px 14px; border-radius: 8px; cursor: pointer; font-size: 14px; line-height: 1.2; white-space: nowrap; transition: background .12s, border-color .12s; }
.btn:hover { background: #f7f4ee; text-decoration: none; }
.btn:focus-visible, .iconbtn:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn.primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn.dark { background: #1d1d1b; border-color: #1d1d1b; color: #fff; }
.btn.dark:hover { background: #33312d; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--line-2); }
.btn.danger { color: var(--bad); border-color: #eab8b3; }
.btn.danger:hover { background: var(--bad-soft); }
.btn.small { padding: 5px 10px; font-size: 13px; border-radius: 7px; }
.btn.icon { padding: 5px 8px; }
.btn:disabled { opacity: .5; cursor: default; }
.btn .k { font-size: 11px; opacity: .7; font-weight: 400; }

/* cabeceras de página */
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.page-head h1 { margin: 2px 0 6px; font-size: 26px; letter-spacing: .2px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs { color: var(--muted); font-size: 13px; }
.crumbs a { color: var(--muted); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 20px; background: #fff; border: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2); }
a.chip:hover { text-decoration: none; border-color: var(--accent); }
.chip.warn { background: var(--blue-soft); border-color: #c9daf2; color: var(--blue); font-weight: 600; }
.chip.bad { background: var(--bad-soft); border-color: #f3c3bf; color: var(--bad); font-weight: 600; }

/* pestañas */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs a { padding: 9px 16px; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; font-weight: 600; font-size: 14.5px; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.active { color: var(--ink); border-bottom-color: var(--accent); }
.tabs a span { font-weight: 400; color: var(--muted); font-size: 12.5px; margin-left: 3px; }

/* tarjetas */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 14px; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 12px; font-size: 15.5px; display: flex; align-items: center; gap: 8px; }
.card h3 .grow + * { font-weight: 400; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; }
.grid-cards .card { margin: 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); color: var(--ink); }
a.tile:hover { text-decoration: none; border-color: var(--accent); }
.tile .v { font-size: 28px; font-weight: 800; line-height: 1.1; }
.tile .l { color: var(--muted); font-size: 13px; }
.tile.accent .v { color: var(--blue); }
.tile.bad .v { color: var(--bad); }
.list-simple { list-style: none; margin: 0; padding: 0; }
.list-simple li { display: flex; align-items: center; gap: 8px; padding: 8px 2px; border-bottom: 1px solid var(--line-2); }
.list-simple li:last-child { border-bottom: 0; }
.list-simple li .grow { min-width: 0; }
.list-simple .sub { color: var(--muted); font-size: 12.5px; }
.empty-state { text-align: center; color: var(--muted); padding: 30px 10px; }
.empty-state b { color: var(--ink); }
.hero { background: linear-gradient(120deg, #1d1d1b 0%, #34312c 100%); color: #fff; border-radius: 14px; padding: 22px 26px; margin-bottom: 18px; display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.hero h1 { margin: 0 0 4px; font-size: 24px; }
.hero p { margin: 0; color: #cfcac2; max-width: 720px; }
.hero .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.hero .btn { background: transparent; color: #fff; border-color: #5b5852; }
.hero .btn:hover { background: #3c3935; }
.hero .btn.primary { background: var(--accent); border-color: var(--accent); }

/* tablas */
.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; box-shadow: var(--shadow); }
table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; background: var(--beige-soft); font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-2); padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; z-index: 1; }
table.list td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; font-size: 14px; }
table.list tr:last-child td { border-bottom: 0; }
table.list tbody tr.click { cursor: pointer; }
table.list tbody tr.click:hover td { background: #fbf9f5; }
table.list tr.sel td { background: var(--accent-soft) !important; }
table.list tr.inactivo td { color: #a8a39b; }
table.list td.acts { text-align: right; white-space: nowrap; }
table.list td.acts > * { margin-left: 4px; }
table.list .ref { font-weight: 700; }
table.list .sub { color: var(--muted); font-size: 12.5px; }
table.list input[type=checkbox] { width: 17px; height: 17px; cursor: pointer; accent-color: var(--accent); }
.tag { display: inline-block; padding: 2px 9px; border-radius: 12px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.tag.operativo { background: var(--warn-soft); color: var(--warn); }
.tag.buen_estado { background: var(--ok-soft); color: var(--ok); }
.tag.no_usar { background: var(--bad-soft); color: var(--bad); }
.tag.borrador { background: var(--blue-soft); color: var(--blue); }
.tag.final { background: var(--grey-soft); color: #555; }
.tag.tipo { background: var(--beige-soft); color: #5a4a2a; font-weight: 500; }
.pdf-link { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 6px; background: var(--bad-soft); color: var(--bad); font-size: 12px; font-weight: 700; }
.pdf-link:hover { text-decoration: none; filter: brightness(.96); }

/* barra de filtros */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.toolbar input[type=search], .toolbar input[type=text], .toolbar select { padding: 7px 10px; border: 1px solid #d3cdc3; border-radius: 7px; background: #fff; }
.toolbar input[type=search] { min-width: 220px; }
.toolbar label.check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink-2); }

/* barra de acciones en bloque */
.bulkbar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); width: max-content; z-index: 30; background: #1d1d1b; color: #fff; border-radius: 12px; padding: 10px 12px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; box-shadow: 0 12px 40px rgba(0,0,0,.3); max-width: calc(100vw - 40px); animation: up .18s ease; }
@keyframes up { from { transform: translate(-50%, 20px); opacity: 0; } }
.bulkbar .n { font-weight: 700; padding: 0 6px; }
.bulkbar .sep { width: 1px; align-self: stretch; background: #45423d; margin: 0 2px; }
.bulkbar input, .bulkbar select { padding: 5px 8px; border-radius: 6px; border: 1px solid #45423d; background: #2b2a27; color: #fff; }
.bulkbar .btn { background: #2f2d2a; border-color: #45423d; color: #fff; }
.bulkbar .btn:hover { background: #3c3935; }
.bulkbar .btn.primary { background: var(--accent); border-color: var(--accent); }
.bulkbar .btn.danger { color: #ff9c95; }

/* modal */
.modal { position: fixed; inset: 0; background: rgba(20,18,14,.5); display: flex; align-items: flex-start; justify-content: center; z-index: 60; padding: 6vh 16px 16px; overflow: auto; animation: fade .12s; }
@keyframes fade { from { opacity: 0; } }
.modal-box { background: #fff; border-radius: 14px; width: min(760px, 100%); padding: 22px 24px 0; box-shadow: 0 24px 70px rgba(0,0,0,.3); }
.modal-box.wide { width: min(1100px, 100%); }
.modal.modal-confirm { z-index: 80; align-items: center; padding-top: 16px; background: rgba(20,18,14,.62); }
.modal-box.confirm { width: min(460px, 100%); }
.modal-box h2 { margin: 0 0 6px; font-size: 20px; }
.modal-box .lead { color: var(--muted); margin: 0 0 16px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin: 18px -24px 0; padding: 14px 24px; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: #fff; border-radius: 0 0 14px 14px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px 14px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 3px; }
.field input, .field select, .field textarea { width: 100%; padding: 8px 10px; border: 1px solid #d3cdc3; border-radius: 7px; background: #fff; }
.field input:focus, .field select:focus, .field textarea:focus, .toolbar input:focus, .toolbar select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.voz-control { display: flex; align-items: flex-start; gap: 7px; }
.voz-control textarea { flex: 1; min-width: 0; }
.obs-row .voz-control { flex: 1; min-width: 0; }
.obs-row .voz-btn { flex-basis: 36px; min-height: 36px; padding: 6px; }
.voz-btn { flex: 0 0 40px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 7px; }
.voz-btn .ic { width: 19px; height: 19px; }
.voz-btn.grabando { color: #fff; background: var(--bad); border-color: var(--bad); animation: voz-pulso 1.2s ease-in-out infinite; }
.voz-btn.corrigiendo { opacity: .65; cursor: progress; }
@keyframes voz-pulso { 50% { box-shadow: 0 0 0 5px var(--bad-soft); } }
.check-list { max-height: 300px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 4px 0; }
.check-list label { display: flex; gap: 8px; align-items: center; padding: 6px 12px; cursor: pointer; }
.check-list label:hover { background: #faf8f4; }
.check-list .grp { padding: 8px 12px 2px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.check-list input { accent-color: var(--accent); width: 16px; height: 16px; }
.callout { background: var(--beige-soft); border-left: 4px solid var(--beige); border-radius: 8px; padding: 10px 14px; font-size: 13.5px; color: var(--ink-2); margin: 10px 0; }
.callout.info { background: var(--blue-soft); border-color: #9dbbe6; }
.callout.tip { background: #fff8e1; border-color: #f1d27a; }
.dropzone { display: block; border: 2px dashed #cfc8bc; border-radius: 12px; padding: 28px; text-align: center; color: var(--muted); cursor: pointer; background: #fcfbf8; transition: .15s; }
.dropzone.over, .dropzone:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.files { list-style: none; padding: 0; margin: 8px 0; }
.files li { padding: 6px 0; border-bottom: 1px dashed var(--line); }

/* menú emergente */
.popmenu { position: fixed; z-index: 90; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 36px rgba(0,0,0,.18); padding: 5px; min-width: 200px; }
.popmenu button { display: flex; width: 100%; text-align: left; gap: 8px; background: none; border: 0; padding: 8px 12px; border-radius: 7px; cursor: pointer; font-size: 14px; }
.popmenu button:hover { background: var(--line-2); }
.popmenu button.danger { color: var(--bad); }
.popmenu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }

/* panel lateral (ayuda, vista previa) */
.drawer { position: fixed; top: var(--header-h); right: 0; bottom: 0; width: min(620px, 100vw); background: #fff; z-index: 50; box-shadow: -12px 0 40px rgba(0,0,0,.18); display: flex; flex-direction: column; animation: slide .18s ease; }
.drawer.big { width: min(900px, 100vw); }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.drawer-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px 10px 18px; border-bottom: 1px solid var(--line); }
.drawer-body { flex: 1; overflow: auto; padding: 18px 22px; }
.drawer-body.flush { padding: 0; }
.drawer-body iframe { width: 100%; height: 100%; border: 0; display: block; }

/* avisos */
#toasts { position: fixed; bottom: 20px; right: 20px; z-index: 120; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.toast { background: #1d1d1b; color: #fff; padding: 11px 16px; border-radius: 9px; box-shadow: 0 8px 26px rgba(0,0,0,.28); max-width: 420px; animation: fade .15s; display: flex; gap: 10px; align-items: center; }
.toast.error { background: var(--bad); }
.toast .ic { width: 18px; height: 18px; color: #7ee2a1; }
.toast.error .ic { color: #fff; }
.toast { cursor: pointer; }

/* ===== editor de ficha ===== */
.ed-top { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--line); padding: 10px 20px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; box-shadow: 0 2px 10px rgba(0,0,0,.04); }
.ed-top .title { min-width: 0; }
.ed-top .title h1 { margin: 0; font-size: 20px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ed-top .navpos { display: flex; align-items: center; gap: 2px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 2px; }
.ed-top .navpos span { padding: 0 8px; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.ed-top .dirty { color: var(--warn); font-size: 13px; font-weight: 600; }
.ed-body { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 18px; padding: 18px 20px; align-items: start; }
.ed-side { position: sticky; top: 76px; max-height: calc(100vh - var(--header-h) - 96px); overflow: auto; padding-right: 2px; }
.ed-side .card { padding: 14px 16px; }
.ed-side h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-2); margin-bottom: 10px; }
.seg:not(.cell) { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }  /* .cell.seg es la columna Seguridad de la rejilla */
.seg button { padding: 9px 6px; border-radius: 8px; border: 2px solid var(--line); background: #fff; cursor: pointer; font-weight: 700; font-size: 13.5px; color: var(--ink-2); }
.seg button:hover { border-color: #cdc6b9; }
.seg button.on.buen_estado { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); }
.seg button.on.operativo { border-color: var(--warn); background: var(--warn-soft); color: var(--warn); }
.seg button.on.no_usar { border-color: var(--bad); background: var(--bad-soft); color: var(--bad); }
.seg button.on.borrador { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); }
.seg button.on.final { border-color: #555; background: var(--grey-soft); color: #333; }
.hdr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; }
.hdr-grid .field input { padding: 6px 8px; font-size: 14px; }
.hdr-grid .full { grid-column: 1 / -1; }
details.sec > summary { cursor: pointer; list-style: none; font-size: 14px; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-2); font-weight: 700; display: flex; align-items: center; gap: 6px; }
details.sec > summary::before { content: "▸"; font-size: 11px; color: var(--muted); transition: transform .15s; }
details.sec[open] > summary::before { transform: rotate(90deg); }
details.sec > summary .sum { margin-left: auto; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--muted); font-size: 12.5px; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
details.sec[open] > summary { margin-bottom: 10px; }
.obs-row { display: flex; gap: 4px; margin-bottom: 6px; align-items: flex-start; }
.obs-row .num { width: 18px; color: var(--muted); font-size: 12px; padding-top: 8px; text-align: right; }
.obs-row textarea { flex: 1; min-height: 36px; resize: vertical; padding: 7px 9px; border: 1px solid #d3cdc3; border-radius: 7px; font-size: 13.5px; line-height: 1.35; overflow: hidden; }
.obs-row textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.obs-row .extra { opacity: .55; }
.obs-add { display: flex; gap: 6px; margin-top: 8px; }
.obs-add input { flex: 1; min-width: 0; padding: 6px 9px; border: 1px solid #d3cdc3; border-radius: 7px; font-size: 13.5px; }
.grid-card { padding: 0; }
.grid-card .grid-tools { border-radius: var(--radius) var(--radius) 0 0; }
.grid-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); background: #fff; }
.counts { display: flex; gap: 6px; flex-wrap: wrap; }
.counts span { font-size: 12.5px; padding: 3px 9px; border-radius: 12px; background: var(--grey-soft); color: #444; font-weight: 600; }
.counts .c-ok { background: var(--ok-soft); color: var(--ok); }
.counts .c-bad { background: var(--bad-soft); color: var(--bad); }
.counts .c-nt { background: #e9e9e9; color: #555; }
.counts .c-none { background: var(--warn-soft); color: var(--warn); }
table.checks { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.checks thead th { background: var(--beige); padding: 7px 4px; font-size: 11px; text-align: center; position: sticky; top: var(--edtop, 60px); z-index: 2; line-height: 1.15; font-weight: 700; color: var(--ink-2); }
table.checks thead th.col { cursor: pointer; width: 62px; }
table.checks thead th.col:hover { background: #d3c6ae; }
table.checks thead th.partes { text-align: left; padding-left: 10px; }
table.checks tr.section td { background: var(--beige-soft); font-weight: 800; padding: 8px 12px; text-transform: uppercase; font-size: 12px; letter-spacing: .6px; color: var(--ink-2); position: sticky; top: calc(var(--edtop, 60px) + 33px); z-index: 1; }
table.checks tbody tr.row td { border-bottom: 1px solid var(--line-2); }
table.checks tbody tr.row:hover td { background: #fcfaf6; }
table.checks td.n { color: var(--muted); width: 38px; text-align: right; padding-right: 8px; cursor: pointer; font-variant-numeric: tabular-nums; }
table.checks td.n:hover { color: var(--ok); font-weight: 700; }
table.checks td.label { padding: 7px 8px; line-height: 1.3; }
table.checks td.cell { text-align: center; cursor: pointer; user-select: none; padding: 3px 2px; }
table.checks td.cell span { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 6px; border: 1.5px solid #dcd5c8; font-weight: 800; font-size: 13px; color: transparent; background: #fff; transition: transform .08s; }
table.checks td.cell:hover span { border-color: #a9a194; }
table.checks td.cell:active span { transform: scale(.9); }
table.checks td.cell.on span { background: #1d1d1b; color: #fff; border-color: #1d1d1b; }
table.checks td.cell.ok.on span { background: var(--ok); border-color: var(--ok); }
table.checks td.cell.no_ok.on span { background: var(--bad); border-color: var(--bad); }
table.checks td.cell.no_tiene.on span { background: var(--grey); border-color: var(--grey); }
table.checks td.cell.tiene.on span { background: var(--blue); border-color: var(--blue); }
table.checks tr.bad td.label { color: var(--bad); font-weight: 600; }
table.checks tr.bad td:first-child { box-shadow: inset 4px 0 0 var(--bad); }
table.checks tr.nt td.label { color: #8a857c; }
table.checks tr.blank td.label { color: #b3ada3; font-style: italic; }
table.checks tr.blank.hide { display: none; }
table.checks tr.focus td { background: #fff7fb !important; }

/* archivo */
details.folder { border-bottom: 1px solid var(--line-2); }
details.folder > summary { list-style: none; cursor: pointer; padding: 8px 10px; display: flex; align-items: center; gap: 8px; }
details.folder > summary:hover { background: #faf8f4; }
details.folder > summary::before { content: "▸"; font-size: 11px; color: var(--muted); width: 12px; transition: transform .15s; }
details.folder[open] > summary::before { transform: rotate(90deg); }
details.folder > summary .fname { font-weight: 600; }
details.folder > summary .cnt { color: var(--muted); font-size: 12.5px; }
details.folder > summary .zip { margin-left: auto; font-size: 12.5px; }
details.folder .inner { padding-left: 20px; }
.file { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.file:hover { background: #fcfbf8; }
.file .fi { width: 32px; text-align: center; font-size: 10.5px; font-weight: 800; color: var(--bad); background: var(--bad-soft); border-radius: 4px; padding: 2px 0; }
.file .fi.img { color: var(--blue); background: var(--blue-soft); }
.file .fi.doc { color: #555; background: var(--grey-soft); }
.file a { color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file .size { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
mark { background: #ffe58a; padding: 0 1px; border-radius: 2px; }

/* ayuda */
.help-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 22px; align-items: start; }
.help-nav { position: sticky; top: 16px; }
.help-nav a { display: block; padding: 7px 12px; border-radius: 7px; color: var(--ink-2); font-size: 14px; }
.help-nav a:hover { background: #fff; text-decoration: none; }
.help-nav a.active { background: var(--accent-soft); color: var(--ink); font-weight: 600; }
.help-nav h6 { margin: 14px 12px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.md { line-height: 1.6; font-size: 15px; max-width: 860px; }
.md h1 { font-size: 26px; margin: 0 0 12px; }
.md h2 { font-size: 20px; margin: 28px 0 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.md h3 { font-size: 16.5px; margin: 20px 0 8px; }
.md h4 { font-size: 15px; margin: 16px 0 6px; }
.md p { margin: 0 0 12px; }
.md ul, .md ol { margin: 0 0 12px; padding-left: 24px; }
.md li { margin: 3px 0; }
.md li > ul, .md li > ol { margin: 4px 0 6px; }
.md table { border-collapse: collapse; margin: 8px 0 16px; font-size: 14px; width: 100%; background: #fff; }
.md th, .md td { border: 1px solid var(--line); padding: 7px 10px; text-align: left; vertical-align: top; }
.md th { background: var(--beige-soft); }
.md blockquote { margin: 12px 0; padding: 10px 14px; background: #fff8e1; border-left: 4px solid #f1d27a; border-radius: 8px; }
.md blockquote p:last-child { margin: 0; }
.md pre { background: #1d1d1b; color: #f2efe9; padding: 12px 14px; border-radius: 8px; overflow: auto; font-size: 13px; }
.md pre code { background: none; color: inherit; padding: 0; }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.drawer .md { font-size: 14.5px; }

/* visita guiada */
.tour { position: fixed; inset: 0; z-index: 150; }
.tour-hole { position: fixed; border-radius: 10px; box-shadow: 0 0 0 9999px rgba(20,18,14,.55); transition: all .25s ease; pointer-events: none; outline: 3px solid var(--accent); }
.tour-pop { position: fixed; width: 340px; background: #fff; border-radius: 12px; padding: 16px 18px; box-shadow: 0 16px 50px rgba(0,0,0,.35); transition: top .25s, left .25s; }
.tour-pop h4 { margin: 0 0 6px; font-size: 16px; }
.tour-pop p { margin: 0 0 12px; font-size: 14px; color: var(--ink-2); line-height: 1.45; }
.tour-pop .foot { display: flex; align-items: center; gap: 6px; }
.tour-pop .dots { color: var(--muted); font-size: 12.5px; margin-right: auto; }

/* adaptable */
/* informe fotográfico */
#edInforme.over { outline: 3px dashed var(--accent); outline-offset: -6px; background: var(--accent-soft); }
.inf-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 10px; }
.inf-thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); background: #eee; }
.inf-thumbs img.pagina { aspect-ratio: .707; object-fit: contain; background: #fff; }
.inf-thumbs .more { display: flex; align-items: center; justify-content: center; border-radius: 6px; background: var(--beige-soft); font-weight: 700; color: var(--ink-2); aspect-ratio: 1; }
.inf-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.inf-acts label.btn { cursor: pointer; }
.lay-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.lay-opt { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 8px; border: 2px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; text-align: center; }
.lay-opt:hover { border-color: #cdc6b9; }
.lay-opt.on { border-color: var(--accent); background: var(--accent-soft); }
.lay-opt svg { width: 34px; height: 46px; }
.lay-opt svg rect { fill: #b9ae9b; }
.lay-opt svg rect.pg { fill: #fff; stroke: #9a9185; stroke-width: 1; }
.lay-opt.on svg rect:not(.pg) { fill: var(--accent); }
.lay-opt b { font-size: 13px; }
.lay-opt small { font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.small-dz { padding: 14px; font-size: 14px; }
.inf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-top: 10px; }
.inf-foto { position: relative; border: 1px solid var(--line); border-radius: 10px; padding: 6px; background: #fff; cursor: grab; transition: box-shadow .15s, opacity .15s; }
.inf-foto.dragging { opacity: .4; }
.inf-foto.drop { box-shadow: 0 0 0 3px var(--accent); }
.inf-foto img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 6px; display: block; background: #eee; pointer-events: none; }
.inf-foto .n { position: absolute; top: 10px; left: 10px; background: rgba(29,29,27,.8); color: #fff; font-size: 12px; font-weight: 700; border-radius: 10px; padding: 1px 8px; }
.inf-foto .pie { width: 100%; margin-top: 6px; padding: 5px 7px; border: 1px solid #d3cdc3; border-radius: 6px; font-size: 12.5px; }
.inf-foto .pie-ro { font-size: 12.5px; margin-top: 6px; color: var(--ink-2); }
.inf-foto .ops { display: flex; justify-content: space-between; margin-top: 4px; }
.inf-foto .ops .del:hover { background: var(--bad-soft); color: var(--bad); }
.p-sel { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.foto-ind { font-size: 12px; white-space: nowrap; }
.foto-ind.pend { opacity: .7; }

/* solo lectura */
#view.ro .obs-row .iconbtn, #view.ro .obs-add { display: none; }
#view.ro .seg button:disabled { cursor: default; }
#view.ro .seg button:not(.on) { opacity: .45; }
#view.ro table.checks td.cell, #view.ro table.checks td.n { cursor: default; }

/* sesión y usuarios */
.userbtn { display: inline-flex; align-items: center; gap: 8px; background: transparent; border: 1px solid #45423d; color: #e7e3dc; border-radius: 20px; padding: 3px 12px 3px 3px; cursor: pointer; max-width: 200px; }
.userbtn:hover { background: #2f2d2a; }
.userbtn .avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; flex: none; }
.userbtn .caret { font-size: 10px; opacity: .7; }
.userbtn[aria-expanded=true] { background: #2f2d2a; border-color: var(--accent); }
.acct { position: fixed; top: calc(var(--header-h) - 4px); right: 12px; width: 320px; max-width: calc(100vw - 24px); background: #fff; color: var(--ink); border-radius: 14px; box-shadow: 0 18px 50px rgba(0,0,0,.28); z-index: 95; padding: 8px; animation: fade .12s; }
.acct-head { display: flex; gap: 12px; align-items: center; padding: 10px 10px 12px; }
.acct-head .who { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.acct-head .who b { font-size: 15.5px; }
.acct-head .who > span { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-tags { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.avatar.big { width: 46px; height: 46px; border-radius: 50%; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 20px; flex: none; }
.acct-sep { height: 1px; background: var(--line); margin: 4px 6px; }
.acct-item { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; padding: 9px 10px; border-radius: 8px; cursor: pointer; font-size: 14.5px; text-align: left; color: var(--ink); }
.acct-item:hover, .acct-item:focus-visible { background: var(--line-2); outline: none; }
.acct-item .ic { width: 22px; text-align: center; }
.acct-item .tx { flex: 1; }
.acct-item.danger { color: var(--bad); font-weight: 600; }
.acct-item.danger:hover { background: var(--bad-soft); }
.acct-foot { font-size: 11.5px; color: var(--muted); padding: 8px 10px 4px; border-top: 1px solid var(--line); margin-top: 4px; }
.perm-ro { display: flex; gap: 8px; align-items: center; padding: 4px 0; font-size: 14px; }
.perm-ro span { width: 20px; height: 20px; border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; flex: none; }
.perm-ro.si span { background: var(--ok-soft); color: var(--ok); }
.perm-ro.no { color: #a39d93; }
.perm-ro.no span { background: var(--grey-soft); color: #9a948a; }
.amb-zonas span { font-size: 13.5px; }
.login-err.info { color: var(--ok); }
.userbtn .uname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.login { position: fixed; inset: 0; z-index: 180; background: linear-gradient(135deg, #1d1d1b 0%, #3a352e 100%); display: flex; align-items: center; justify-content: center; padding: 16px; }
.login-box { background: #fff; border-radius: 16px; padding: 30px 30px 22px; width: min(400px, 100%); box-shadow: 0 30px 80px rgba(0,0,0,.4); display: flex; flex-direction: column; gap: 12px; }
.login-brand { display: flex; align-items: center; gap: 10px; font-size: 26px; font-weight: 800; letter-spacing: .6px; }
.login-box > p { margin: -6px 0 6px; }
.login-box .btn.primary { justify-content: center; padding: 11px; font-size: 15px; }
.login-box .check { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--ink-2); }
.login-err { color: var(--bad); font-size: 14px; min-height: 18px; font-weight: 600; }
.sec-title { font-size: 15px; margin: 20px 0 10px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.perm-group { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fcfbf8; }
.perm-group h4 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.perm { display: flex; gap: 8px; align-items: flex-start; padding: 5px 0; cursor: pointer; }
.perm input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.perm b { font-size: 14px; font-weight: 600; }
.perm small { display: block; color: var(--muted); font-size: 12px; line-height: 1.35; }
.perm .tag { font-size: 10.5px; padding: 1px 6px; margin-left: 4px; }
.amb-tree { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin-top: 10px; max-height: 320px; overflow: auto; }
.amb-cli { padding: 6px 0; border-bottom: 1px solid var(--line-2); }
.amb-cli:last-child { border-bottom: 0; }
.amb-cli > label { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.amb-zonas { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 2px 12px; padding: 4px 0 2px 26px; }
.amb-zonas label { display: flex; gap: 6px; align-items: center; font-size: 13.5px; cursor: pointer; }
.amb-tree input { accent-color: var(--accent); }
.clave-temp { display: flex; gap: 10px; align-items: center; background: var(--beige-soft); border-radius: 10px; padding: 14px 16px; margin: 10px 0; }
.clave-temp code { font-size: 20px; background: none; letter-spacing: 1px; font-weight: 700; }
.popmenu button span.muted { pointer-events: none; }

@media (max-width: 1150px) {
  .ed-body { grid-template-columns: 1fr; }
  .ed-side { position: static; max-height: none; }
  .brand small { display: none; }
}
@media (max-width: 900px) {
  #btnMenu { display: inline-flex; }
  #sidebar { position: fixed; top: var(--header-h); bottom: 0; left: 0; z-index: 45; margin-left: calc(-1 * var(--side-w)); box-shadow: 8px 0 30px rgba(0,0,0,.2); }
  body.side-open #sidebar { margin-left: 0; }
  body.side-open #scrim { display: block; position: fixed; inset: var(--header-h) 0 0 0; background: rgba(0,0,0,.3); z-index: 44; }
  .mainnav a[data-nav=tipos] { display: none; }
  #view { padding: 16px 14px 90px; }
  .help-layout { grid-template-columns: 1fr; }
  .help-nav { position: static; display: flex; flex-wrap: wrap; gap: 4px; }
  .help-nav h6 { width: 100%; }
  .page-head .actions { margin-left: 0; }
  table.list .hide-sm { display: none; }
}
@media (max-width: 640px) {
  .userbtn .uname { display: none; }
  .userbtn { padding: 3px; }
  .brand > span:not(.logo) { display: none; }
  .mainnav a[data-nav=archivo] { display: none; }
  .gsearch { margin-left: 0; }
  .mainnav a { padding: 8px 8px; }
  .ed-top { padding: 10px 12px; }
  .ed-body { padding: 12px; }
  .checks-scroll { overflow-x: auto; }
  .checks-scroll table.checks { min-width: 620px; }
  table.checks thead th, table.checks tr.section td { position: static; }
  table.checks thead th.col { width: 40px; font-size: 9.5px; }
  table.checks td.cell span { width: 22px; height: 22px; }
}
@media print { header.top, #sidebar, .bulkbar { display: none; } }


/* ================= pulido v2: iconos, animaciones y estados de carga ================= */
.ic { width: 1.1em; height: 1.1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.18em; }
.ic.sep { width: .9em; height: .9em; opacity: .55; margin: 0 1px; }
.ic.big { width: 30px; height: 30px; stroke-width: 1.6; margin-bottom: 4px; }
.ic.ok { color: var(--ok); }
.iconbtn .ic { width: 18px; height: 18px; }
.iconbtn.light .ic { width: 20px; height: 20px; }
.btn .ic { width: 16px; height: 16px; }
.btn.small .ic { width: 14px; height: 14px; }
.popmenu button .ic, .acct-item .ic { width: 17px; height: 17px; color: var(--muted); }
.popmenu button.danger .ic, .acct-item.danger .ic { color: var(--bad); }
.acct-item .ai { width: 18px; height: 18px; color: var(--muted); }
.acct-item:hover .ai { color: var(--ink); }
.acct-item.danger .ai { color: var(--bad); }
.cnombre .caret .ic { width: 13px; height: 13px; }
.cnombre .caret { display: inline-flex; }
.userbtn .caret .ic { width: 13px; height: 13px; }
details.folder > summary .fold { width: 17px; height: 17px; color: #c69a2b; }
details.folder[open] > summary .fold { color: #d8a93a; }
.foto-ind .ic { width: 13px; height: 13px; }
.perm-ro span .ic { width: 12px; height: 12px; stroke-width: 3; }
table.checks td.cell span .ic { width: 15px; height: 15px; stroke-width: 3; opacity: 0; transition: opacity .1s; }
table.checks td.cell.on span .ic { opacity: 1; }
table.checks td.cell span { color: #fff; }
.mainnav a { display: inline-flex; align-items: center; gap: 7px; }
.mainnav a .ic { width: 16px; height: 16px; opacity: .85; }

/* buscador con icono */
.gsearch { display: flex; align-items: center; }
.gsearch .gs-ic { position: absolute; left: 11px; width: 16px; height: 16px; color: #8d887f; pointer-events: none; z-index: 1; }
.gsearch input { padding-left: 34px; padding-right: 64px; transition: background .15s, border-color .15s, box-shadow .15s; }
.gsearch input:focus { box-shadow: 0 0 0 3px rgba(229,0,126,.25); }
.gsearch .gs-k { position: absolute; right: 8px; background: #3a3833; border-color: #4a4741; color: #aaa49b; font-size: 11px; pointer-events: none; }
.gsearch:focus-within .gs-k { opacity: 0; }
.gsearch:focus-within .gs-ic { color: var(--accent); }

/* login con iconos */
.ic-field { position: relative; }
.ic-field > .ic { position: absolute; left: 11px; bottom: 11px; width: 16px; height: 16px; color: var(--muted); }
.ic-field input { padding-left: 34px !important; }
.login-box { animation: pop .28s cubic-bezier(.2,.9,.3,1.2); }
.login-brand .logo { height: 24px; }
.login-brand .logo i { width: 6px; height: 24px; }
.login-brand .logo i:nth-child(2) { height: 12px; }

/* animaciones */
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(24px); } }
@keyframes tick { 0% { transform: scale(.7); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { from { background-position: -400px 0; } to { background-position: 400px 0; } }
#view.enter > * { animation: fadeUp .22s ease backwards; } /* backwards: al terminar no deja transform (si no, los position:fixed de dentro se anclan a la vista) */
#view.enter > *:nth-child(2) { animation-delay: .03s; }
#view.enter > *:nth-child(3) { animation-delay: .06s; }
#view.enter > *:nth-child(4) { animation-delay: .09s; }
.modal-box { animation: pop .18s cubic-bezier(.2,.9,.3,1.1); }
.popmenu, .acct { animation: pop .12s ease; transform-origin: top right; }
.toast { animation: toastIn .2s ease; }
.toast.out { animation: toastOut .2s ease forwards; }
table.checks td.cell.on span { animation: tick .18s ease; }
.tile, .card, .btn, .iconbtn, .chip, .zona, table.list td { transition: background .15s, border-color .15s, box-shadow .15s, color .15s, transform .15s; }
a.tile:hover, .grid-cards .card:hover { box-shadow: 0 2px 4px rgba(29,29,27,.06), 0 10px 24px rgba(29,29,27,.08); }
.btn:active:not(:disabled), .iconbtn:active:not(:disabled) { transform: scale(.97); }
.btn.primary { box-shadow: 0 1px 2px rgba(229,0,126,.25); }
.btn.primary:hover { box-shadow: 0 4px 14px rgba(229,0,126,.28); }
.tabs a { position: relative; transition: color .15s; }
.tabs a::after { content: ""; position: absolute; left: 50%; right: 50%; bottom: -1px; height: 3px; background: var(--accent); border-radius: 3px 3px 0 0; transition: left .2s, right .2s; }
.tabs a.active { border-bottom-color: transparent; }
.tabs a.active::after, .tabs a:hover::after { left: 10px; right: 10px; }
.tabs a:hover:not(.active)::after { background: var(--beige); }
.inf-thumbs img, .inf-foto img { animation: fadeIn .3s ease; }
@keyframes fadeIn { from { opacity: 0; } }

/* botón ocupado */
.btn.loading, .iconbtn.loading { position: relative; pointer-events: none; }
.btn.loading > *, .btn.loading { color: transparent !important; }
.btn.loading::after { content: ""; position: absolute; inset: 0; margin: auto; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-color: var(--ink-2) transparent var(--ink-2) transparent; animation: spin .7s linear infinite; }
.btn.primary.loading::after, .bulkbar .btn.loading::after, .btn.dark.loading::after { border-color: #fff transparent #fff transparent; }
.btn.loading .ic { opacity: 0; }

/* esqueletos de carga */
.sk { background: linear-gradient(90deg, #ece7df 0px, #f6f3ee 160px, #ece7df 320px); background-size: 800px 100%; animation: shimmer 1.2s linear infinite; border-radius: 8px; }
.sk-line { height: 12px; margin: 8px 0; }
.sk-title { height: 28px; width: 260px; margin: 8px 0 14px; }
.sk-chip { height: 22px; width: 110px; border-radius: 12px; display: inline-block; margin-right: 6px; }
.sk-card { height: 120px; }
.sk-row { height: 46px; margin: 0 0 1px; border-radius: 0; }
.sk-wrap { padding: 4px 0; }
.sk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 14px 0; }

/* estados vacíos con icono */
.empty-state .ic.vacio { width: 38px; height: 38px; color: #c8c0b2; stroke-width: 1.5; display: block; margin: 0 auto 10px; }

/* detalles */
::selection { background: #fbc7e2; }
:focus-visible { outline-color: var(--accent); }
table.list tbody tr { animation: fadeIn .2s ease both; }
.zona.active::before { animation: fadeIn .2s; }
.badge { transition: transform .15s; }
.zona:hover .badge { transform: scale(1.08); }
#progress { background: linear-gradient(90deg, var(--accent), #ff5fb0); box-shadow: 0 0 8px rgba(229,0,126,.5); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .btn.loading::after { animation: spin 1.5s linear infinite !important; animation-duration: 1.5s !important; animation-iteration-count: infinite !important; }
}
@media (max-width: 900px) { .mainnav a span { display: none; } .gsearch .gs-k { display: none; } }
.gsearch { min-width: 0; }
header.top { min-width: 0; }
@media (max-width: 640px) {
  header.top { gap: 8px; padding: 0 8px; }
  #btnHelp { display: none; }
  .userbtn .caret { display: none; }
  .mainnav { gap: 0; }
  .mainnav a { padding: 8px 7px; }
}

/* ===== indicadores y jerarquía visual ===== */
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; flex: none; background: #c9c3b8; }
.dot.ok, .dot.buen_estado { background: var(--ok); }
.dot.warn, .dot.operativo { background: var(--warn); }
.dot.bad, .dot.no_usar { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
.dot.none, .dot.sin { background: #c9c3b8; }
.zona .zn { display: flex; align-items: center; min-width: 0; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 12px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; color: var(--ink); transition: border-color .15s, transform .15s, box-shadow .15s; }
a.kpi:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-1px); }
.kpi-ic { position: absolute; top: 12px; right: 12px; color: var(--muted); opacity: .7; }
.kpi-v { font-size: 28px; font-weight: 700; line-height: 1.1; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.kpi-v.small-v { font-size: 20px; padding-top: 5px; }
.kpi-l { color: var(--muted); font-size: 13px; display: flex; align-items: center; flex-wrap: wrap; }
.kpi-accent { border-color: var(--accent); background: linear-gradient(180deg, var(--accent-soft), #fff 70%); }
.kpi-accent .kpi-v, .kpi-accent .kpi-ic { color: var(--accent); opacity: 1; }
.kpi-bad .kpi-v, .kpi-bad .kpi-ic { color: var(--bad); opacity: 1; }
.kpi-warn { border-left: 4px solid var(--warn); } .kpi-bad { border-left: 4px solid var(--bad); } .kpi-ok { border-left: 4px solid var(--ok); }
.kpi-wide { grid-column: span 2; justify-content: center; gap: 8px; }
@media (max-width: 700px) { .kpi-wide { grid-column: 1 / -1; } .kpis { grid-template-columns: repeat(2, 1fr); } .kpi-v { font-size: 24px; } }

.stackbar { display: flex; height: 10px; border-radius: 6px; overflow: hidden; background: var(--line-2); gap: 2px; }
.stackbar.big { height: 16px; border-radius: 8px; margin: 4px 0 10px; }
.stackbar span { min-width: 4px; transition: flex .4s ease; }
.sb-buen_estado { background: var(--ok); } .sb-operativo { background: var(--warn); } .sb-no_usar { background: var(--bad); } .sb-sin { background: #d6d0c5; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13.5px; }
.legend.small { font-size: 12.5px; gap: 4px 12px; color: var(--ink-2); }
.estado-card .estado-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.estado-card h3 { margin: 0; }

.meta-line { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--muted); font-size: 13.5px; }
.meta-line span { display: inline-flex; align-items: center; gap: 5px; }
.zona-kpis { margin-top: 4px; }

.row-link { display: flex; align-items: center; gap: 10px; width: 100%; color: var(--ink); padding: 2px 4px; margin: -2px -4px; border-radius: 8px; transition: background .12s; min-width: 0; }
.row-link:hover { text-decoration: none; background: var(--beige-soft); }
.row-link .grow { min-width: 0; display: flex; flex-direction: column; }
.row-link .grow b { display: flex; align-items: center; }
.row-link .go { color: var(--muted); opacity: 0; transition: opacity .12s, transform .12s; flex: none; }
.row-link:hover .go { opacity: 1; transform: translateX(2px); }
.list-simple li:has(.row-link) { padding: 6px 2px; }
.when { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.when.bad { color: var(--bad); font-weight: 600; } .when.warn { color: var(--warn); font-weight: 600; }
.empty-state.small { padding: 16px 8px; font-size: 14px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty-state .vacio { width: 26px; height: 26px; opacity: .5; }
.empty-state .vacio.ok { color: var(--ok); opacity: .8; }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.home-head h1 { font-size: 28px; }
.home-head .crumbs::first-letter { text-transform: uppercase; }

table.list tr.grp-row td { background: var(--beige-soft) !important; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-2); padding-top: 7px; padding-bottom: 7px; cursor: default; }
table.list tr.row-bad td:first-child { box-shadow: inset 4px 0 0 var(--bad); }
table.eq-table td .nowrap { display: flex; align-items: center; }

/* ===== selector de técnicos ===== */
.tecpick { position: relative; }
.tp-box { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 5px; min-height: 38px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: text; }
.tecpick:focus-within .tp-box { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tecpick.disabled .tp-box { background: var(--beige-soft); cursor: default; }
.tp-chips { display: contents; }
.tp-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 4px 2px 3px; border-radius: 20px; background: var(--accent-soft); color: var(--ink); font-size: 13px; font-weight: 600; animation: pop .15s ease; }
.tp-chip.off { background: var(--line-2); color: var(--muted); }
.tp-chip button { border: 0; background: transparent; cursor: pointer; color: var(--muted); display: inline-flex; padding: 2px; border-radius: 50%; }
.tp-chip button:hover { background: #fff; color: var(--bad); }
.tp-chip button .ic { width: 13px; height: 13px; }
.tp-in { flex: 1; min-width: 120px; border: 0 !important; outline: none; box-shadow: none !important; padding: 4px !important; background: transparent; font: inherit; }
.tp-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 60; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.12); padding: 4px; max-height: 280px; overflow: auto; }
.tp-op { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 7px; cursor: pointer; font-size: 14px; }
.tp-op.on, .tp-op:hover { background: var(--accent-soft); }
.tp-empty { padding: 8px; }
.tp-pdf { margin-top: 4px; min-height: 16px; }
.av { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .3px; flex: none; }
.av.big { width: 42px; height: 42px; font-size: 15px; }
.tp-chip.off .av, .tec-card.off .av { background: #b9b3a8; }
@keyframes pop { from { transform: scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }

/* ===== pantalla técnicos ===== */
.tec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.tec-card { margin: 0; display: flex; flex-direction: column; gap: 12px; transition: border-color .15s, box-shadow .15s; }
.tec-card:hover { border-color: var(--beige); box-shadow: 0 6px 18px rgba(0,0,0,.06); }
.tec-card.off { opacity: .7; }
.tec-top { display: flex; align-items: center; gap: 12px; }
.tec-name { font-weight: 700; font-size: 16px; }
.tec-top .sub { color: var(--muted); font-size: 12.5px; }
.tec-stats { display: grid; grid-template-columns: 1fr 1.6fr; gap: 8px; background: var(--beige-soft); border-radius: 8px; padding: 8px 12px; }
.tec-stats div { display: flex; flex-direction: column; }
.tec-stats b { font-size: 16px; display: flex; align-items: center; }
.tec-stats span { color: var(--muted); font-size: 12px; }
.tec-contact { display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; }
.tec-contact a { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.tec-dni { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; padding: 0; border: 0; background: none; font: inherit; color: var(--ink-2); cursor: copy; font-variant-numeric: tabular-nums; }
.tec-dni:hover { color: var(--ink); }
.field input.invalid { border-color: var(--bad); }
.field .hint.err { color: var(--bad); }
.tec-zonas { display: flex; flex-wrap: wrap; gap: 5px; }
.tec-notas { white-space: pre-wrap; }
.tec-foot { margin-top: auto; border-top: 1px solid var(--line-2); padding-top: 8px; }
.sug-card { border-color: #f0c6dc; background: linear-gradient(180deg, #fff7fb, #fff); }
.sug-row .sub { display: block; }
.sug-ops { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.sug-row .grow { display: block; }
.ft-zona { margin-bottom: 14px; }
.ft-zh { padding: 6px 0; border-bottom: 2px solid var(--line); }
#ftBody { max-height: 62vh; overflow: auto; margin: 0 -8px; padding: 0 8px; }
.ac-wrap { position: relative; flex: 1; min-width: 0; display: flex; }
.ac-wrap > input { flex: 1; min-width: 0; }
.ac-list { top: calc(100% + 4px); }
.ac-pie { display: flex; align-items: center; gap: 6px; padding: 7px 8px; }
.tp-op[data-i] + .ac-pie { border-top: 1px solid var(--line); margin-top: 4px; }
.tp-op .tag { flex: none; }
.tf .ac-list { min-width: min(420px, calc(100vw - 32px)); }
.tp-op mark, .gresults mark, .zona mark, .tec-name mark { background: #ffe58a; color: inherit; }

/* =====================================================================
   MÓVIL (≤ 700 px) · ver analisis/MOVIL.md
   Mismas pantallas reorganizadas: barra inferior, buscador a pantalla
   completa, listas en tarjetas, editor con casillas grandes y barra fija.
   ===================================================================== */
.only-m, .bottomnav, .gs-close { display: none; }
.pdf-listo { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 18px 6px; }
.pdf-listo .ic.big { width: 44px; height: 44px; color: var(--accent); }
.pdf-listo .btn { width: 100%; justify-content: center; min-height: 48px; font-size: 16px; }
@media (hover: none) { .btn .k, .gs-k, kbd.k { display: none !important; } .row-link .go { opacity: .45; } }

@media (max-width: 700px) {
  :root { --bn-h: 58px; --safe-b: env(safe-area-inset-bottom, 0px); }
  .only-m { display: inline-flex; }
  .hide-m { display: none !important; }
  input, select, textarea, .toolbar input[type=search], .toolbar select, .hdr-grid .field input, .obs-add input, .obs-row textarea { font-size: 16px !important; }

  /* --- cabecera y barra inferior --- */
  header.top { padding: 0 10px; gap: 8px; }
  .mainnav, #btnHelp, #btnMenu { display: none !important; }
  .brand > span:not(.logo) { display: inline; font-size: 18px; }
  .brand { margin-right: auto; }
  .gsearch { display: none; }
  .layout { height: calc(100dvh - var(--header-h) - var(--bn-h) - var(--safe-b)); }
  #view { padding: 14px 12px 28px; }
  .bottomnav { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 42; height: calc(var(--bn-h) + var(--safe-b)); padding-bottom: var(--safe-b); background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(0,0,0,.05); }
  .bottomnav > * { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; background: none; border: 0; color: var(--muted); font: inherit; font-size: 11px; font-weight: 600; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .bottomnav > *:hover { text-decoration: none; }
  .bottomnav .ic { width: 22px; height: 22px; }
  .bottomnav .active { color: var(--accent); }
  .bottomnav .active .ic { transform: translateY(-1px); }
  body.side-open .bottomnav #bnZonas { color: var(--accent); }
  #sidebar { bottom: calc(var(--bn-h) + var(--safe-b)) !important; width: min(88vw, var(--side-w)); }
  body.side-open #scrim { inset: var(--header-h) 0 calc(var(--bn-h) + var(--safe-b)) 0 !important; }
  .side-head input { min-height: 42px; }
  .zona { padding-top: 10px; padding-bottom: 10px; }
  #toasts { left: 12px; right: 12px; bottom: calc(var(--bn-h) + var(--safe-b) + 12px); align-items: stretch; }
  .popmenu { min-width: 230px; max-width: calc(100vw - 16px); }
  .popmenu button { min-height: 44px; font-size: 15px; align-items: center; }
  .acct { top: calc(var(--header-h) + 4px); right: 8px; left: 8px; width: auto; max-width: none; }

  /* --- buscador a pantalla completa --- */
  body.search-open .gsearch { display: flex; position: fixed; top: 0; left: 0; right: 0; height: var(--header-h); z-index: 85; background: #1d1d1b; padding: 0 6px 0 10px; margin: 0; max-width: none; gap: 6px; }
  body.search-open .gsearch .gs-ic { left: 21px; }
  body.search-open .gsearch input { height: 42px; padding-right: 12px; background: #fff; color: var(--ink); border-color: var(--accent); }
  body.search-open .gs-close { display: inline-flex; width: 42px; height: 42px; flex: none; }
  .gresults { position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; max-height: none; border-radius: 0; box-shadow: none; padding: 4px 0 calc(20px + var(--safe-b)); }
  .gresults a { padding: 11px 16px; border-bottom: 1px solid var(--line-2); font-size: 15.5px; }
  .gresults a small { display: block; margin: 2px 0 0; font-size: 13px; }
  .gresults h6 { margin: 14px 16px 6px; }

  /* --- zonas táctiles --- */
  .btn { min-height: 42px; padding: 9px 14px; font-size: 15px; }
  .btn.small { min-height: 38px; padding: 7px 12px; font-size: 14px; }
  .btn.icon { min-width: 42px; justify-content: center; }
  .iconbtn { width: 40px; height: 40px; }
  .userbtn .avatar { width: 32px; height: 32px; font-size: 14px; }
  table.list input[type=checkbox] { width: 22px; height: 22px; }
  .row-link { padding: 6px 4px; }
  .file a, .folder summary { min-height: 40px; display: flex; align-items: center; }
  .folder .zip { padding: 8px 6px; }
  label.check { min-height: 36px; }
  input[type=checkbox] { width: 20px; height: 20px; }

  /* --- cabeceras de página, indicadores y pestañas --- */
  .page-head { align-items: flex-start; gap: 10px; margin-bottom: 10px; }
  .page-head h1 { font-size: 23px; }
  .page-head .actions { width: 100%; margin-left: 0; flex-wrap: nowrap; }
  .page-head .actions .btn.primary { flex: 1; justify-content: center; }
  .home-head .actions { display: none; }
  .zona-kpis { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; margin: 0 -12px 12px; padding: 2px 12px 6px; scrollbar-width: none; }
  .zona-kpis::-webkit-scrollbar { display: none; }
  .zona-kpis .kpi { flex: 0 0 auto; min-width: 136px; scroll-snap-align: start; padding: 10px 12px; }
  .zona-kpis .kpi-wide { min-width: 250px; }
  .zona-kpis .kpi-v { font-size: 22px; }
  .zona-kpis .kpi-v.small-v { font-size: 17px; }
  .kpi-ic { top: 10px; right: 10px; }
  .tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; margin: 0 -12px 12px; padding: 0 8px; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs a { white-space: nowrap; padding: 11px 12px; }

  /* --- barras de filtros --- */
  .toolbar { gap: 8px; }
  .toolbar input[type=search] { min-width: 0; flex: 1 1 160px; min-height: 42px; }
  .toolbar select { min-height: 42px; }
  .toolbar .fsel { display: none; }
  .toolbar.open .fsel { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; order: 5; }
  .toolbar.open .fsel select, .toolbar.open .fsel .btn { width: 100%; min-width: 0; }
  .toolbar.open #fToggle { background: var(--accent-soft); border-color: var(--accent); }
  #bUnaUna { order: 6; flex: 1; justify-content: center; }
  #nF { order: 6; }

  /* --- listas de equipos y fichas en tarjetas --- */
  #zonaBody .table-wrap { overflow: visible; border: 0; background: transparent; box-shadow: none; }
  #zonaBody table.list, #zonaBody table.list tbody { display: block; }
  #zonaBody table.list thead { display: none; }
  #zonaBody table.list tr.click { display: grid; gap: 4px 10px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; margin-bottom: 8px; box-shadow: var(--shadow); }
  #zonaBody table.list tr.click td { display: block; padding: 0; border: 0; background: none !important; min-width: 0; }
  #zonaBody table.list tr.click.sel { border-color: var(--accent); background: var(--accent-soft); }
  #zonaBody table.list tr.row-bad { border-left: 4px solid var(--bad); }
  #zonaBody table.list tr.row-bad td:first-child { box-shadow: none; }
  #zonaBody table.list tr.grp-row { display: block; }
  #zonaBody table.list tr.grp-row td { display: block; background: none !important; padding: 12px 2px 6px; border: 0; }
  #zonaBody table.list tr:not(.click):not(.grp-row) td { display: block; }
  #zonaBody table.list tr.click td.hide-sm { display: none !important; }
  /* equipos */
  #eqBody tr.click { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "eq acts" "est est" "rev rev"; }
  #eqBody .c-eq { grid-area: eq; } #eqBody .acts { grid-area: acts; } #eqBody .c-est { grid-area: est; } #eqBody .c-rev { grid-area: rev; text-align: left; font-size: 13.5px; }
  #eqBody .acts .btn:not([data-menu]):not(.pdf-btn) { display: none; }
  /* fichas */
  #fBody tr.click { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "sel eq est" "sel fecha fecha" "sel sit acts"; }
  #fBody .c-sel { grid-area: sel; align-self: stretch; display: flex !important; align-items: center; padding-right: 2px !important; }
  #fBody .c-eq { grid-area: eq; } #fBody .c-fecha { grid-area: fecha; font-size: 14px; } #fBody .c-est { grid-area: est; text-align: right; } #fBody .c-sit { grid-area: sit; }
  #fBody .c-acts { grid-area: acts; } #fBody .c-acts .btn:not(.pdf-btn) { display: none; } #fBody .c-acts:not(:has(a)) { display: none !important; }
  #fBody .c-fecha .sub { display: inline; margin-left: 6px; }
  .pdf-link { display: inline-flex; min-height: 34px; align-items: center; }

  /* --- barra de cambio en bloque --- */
  .bulkbar { left: 8px; right: 8px; width: auto; transform: none; bottom: calc(var(--bn-h) + var(--safe-b) + 8px); flex-wrap: wrap; justify-content: flex-start; padding: 10px; gap: 8px; max-height: 50vh; overflow: auto; }
  .bulkbar .sep { display: none; }
  .bulkbar .n { width: calc(100% - 50px); padding: 6px 4px; }
  .bulkbar #bX { position: absolute; top: 6px; right: 6px; }
  .bulkbar input, .bulkbar select { min-height: 40px; flex: 1 1 140px; }
  .bulkbar .btn { flex: 1 1 auto; justify-content: center; }

  /* --- ventanas como hoja inferior --- */
  .modal { padding: 0; align-items: flex-end; overflow: hidden; }
  .modal-box, .modal-box.wide { width: 100%; max-height: 94dvh; overflow-y: auto; border-radius: 16px 16px 0 0; padding: 18px 16px 0; animation: sheet .22s cubic-bezier(.2,.9,.3,1); }
  .modal-box h2 { font-size: 19px; }
  .modal-actions { margin: 16px -16px 0; padding: 12px 16px calc(12px + var(--safe-b)); flex-wrap: wrap; }
  .modal-actions .btn { flex: 1 1 auto; justify-content: center; }
  .modal-actions .grow { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .drawer, .drawer.big { width: 100vw; top: var(--header-h); bottom: 0; z-index: 70; }
  .drawer-body { padding: 16px; padding-bottom: calc(16px + var(--safe-b)); }

  /* --- editor de fichas --- */
  body.wide .bottomnav { display: none; }
  body.wide .layout { height: calc(100dvh - var(--header-h)); }
  .ed-top { padding: 8px 10px; gap: 8px; flex-wrap: nowrap; }
  .ed-top .ed-back { padding: 8px 10px; }
  .ed-top .ed-back span, #edCopiar span { display: none; }
  #edCopiar { min-width: 38px; justify-content: center; padding-inline: 10px; }
  .ed-top .title { flex: 1; }
  .ed-top .title .crumbs { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
  .ed-top .title h1 { font-size: 17px; gap: 5px; }
  .ed-top .title h1 .tag { font-size: 11px; padding: 1px 6px; }
  .ed-top .title { min-width: 0; }
  .ed-top .title h1 { flex-wrap: wrap; }
  .ed-top .title h1 .tag.tipo { display: none; }  /* el tipo ya se ve en la ficha; así cabe la situación */
  #bZonaMas { flex: 0 0 auto; width: 40px; padding-inline: 0; justify-content: center; }
  .ed-top .grow { display: none; }
  .ed-top .dirty { display: none !important; }
  .ed-top:has(#edDirty:not(.hidden)) #edSave { border-color: var(--warn); box-shadow: inset 0 -3px 0 var(--warn); }
  .ed-top:has(#edDirty:not(.hidden)) #edSave::before { content: "●"; color: var(--warn); margin-right: 4px; }
  .ed-top .navpos span { padding: 0 4px; font-size: 12px; }
  .ed-actions { position: fixed; left: 0; right: 0; bottom: 0; z-index: 42; display: flex; gap: 8px; padding: 8px 10px calc(8px + var(--safe-b)); background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(0,0,0,.06); }
  .ed-actions .btn { flex: 1; justify-content: center; min-height: 46px; }
  .ed-actions #edPrevBtn { flex: 0 0 auto; }
  .ed-actions #edPrevBtn { font-size: 0; gap: 0; }
  .ed-actions #edPrevBtn .ic { width: 20px; height: 20px; }
  .ed-actions #edSaveNext { flex: 1.6; }
  .ed-body { padding: 10px 8px calc(84px + var(--safe-b)); gap: 12px; }
  .grid-tools { padding: 10px; }
  .grid-tools .btn.small { flex: 1 1 auto; justify-content: center; }
  .grid-tools .btn.small.icon { flex: 0 0 auto; }
  .checks-scroll { overflow: visible !important; }
  .checks-scroll table.checks { min-width: 0 !important; display: block; }
  table.checks thead { display: none; }
  table.checks tbody { display: block; }
  table.checks tr.section { display: block; }
  table.checks tr.section td { display: block; position: sticky !important; top: 0; z-index: 3; padding: 10px 12px; }
  table.checks tbody tr.row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0 2px; padding: 8px 6px 10px; border-bottom: 1px solid var(--line-2); }
  table.checks tbody tr.row.hide { display: none; }
  table.checks tbody tr.row td { border: 0 !important; background: none !important; }
  table.checks td.n { grid-row: 1; grid-column: 1; width: auto; text-align: left; padding: 2px 0 6px 4px; font-size: 13px; }
  table.checks td.label { grid-row: 1; grid-column: 2 / -1; padding: 2px 4px 8px 0 !important; font-size: 14.5px; line-height: 1.3; }
  table.checks td.label:first-letter { text-transform: uppercase; }
  table.checks tr.row td.n { grid-column: 1; }
  table.checks td.cell { grid-row: 2; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 0 !important; }
  table.checks td.cell span { width: 40px !important; height: 40px !important; border-radius: 10px; font-size: 16px; }
  table.checks td.cell span .ic { width: 20px; height: 20px; }
  table.checks td.cell::after { content: attr(data-l); font-size: 10.5px; color: var(--muted); font-weight: 600; white-space: nowrap; line-height: 1; }
  table.checks td.cell.on::after { color: var(--ink); }
  table.checks td.cell.ok { order: 1; } table.checks td.cell.no_ok { order: 2; } table.checks td.cell.tiene { order: 3; } table.checks td.cell.no_tiene { order: 4; }
  table.checks td.cell.seg { order: 5; } table.checks td.cell.frec { order: 6; } table.checks td.cell.rev { order: 7; }
  table.checks tr.row.bad { background: #fff6f5; }
  .ed-side { max-height: none; overflow: visible; }
  .hdr-grid { grid-template-columns: 1fr; }
  .seg button { min-height: 44px; }
  .obs-row textarea { min-height: 44px; }
}
@keyframes sheet { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
@media (max-width: 380px) {
  table.checks td.cell span { width: 36px !important; height: 36px !important; }
  table.checks td.cell::after { font-size: 9.5px; }
  .brand > span:not(.logo) { font-size: 16px; }
}
.inf-rev { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow: auto; }
.inf-rev-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.inf-rev-row .grow { display: flex; flex-direction: column; min-width: 0; }
.inf-rev-row .sub { color: var(--muted); font-size: 12.5px; }

/* ===== el menú lateral pertenece al gestor ===== */
body:not(.con-lateral) #sidebar, body:not(.con-lateral) #btnMenu, body:not(.con-lateral) #scrim { display: none !important; }
.side-title { display: flex; align-items: baseline; gap: 8px; padding: 12px 12px 2px; }
.side-title a { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 13px; letter-spacing: .6px; text-transform: uppercase; color: var(--ink); }
.side-title a .ic { width: 15px; height: 15px; color: var(--accent); }
.side-title span { color: var(--muted); font-size: 12px; }
.g-cli h3 { flex-wrap: wrap; }
.g-cli-name { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.g-cli-name .ic { flex: none; }
.g-cli-title { min-width: 0; overflow-wrap: anywhere; }
.g-cli-count { white-space: nowrap; font-weight: 400; }
.g-cli .table-wrap { box-shadow: none; }
.g-mobile { display: none; }
#gQ { min-width: 280px; }
table.g-tabla td.acts { white-space: nowrap; text-align: right; }
@media (max-width: 700px) {
  #gQ { width: 100%; min-width: 0; min-height: 44px; }
  .g-cli { padding: 14px 15px 4px; }
  .g-cli h3 { align-items: flex-start; gap: 8px; margin-bottom: 4px; }
  .g-cli h3 .grow { display: none; }
  .g-cli-name { flex: 1; display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 3px 7px; }
  .g-cli-name .ic { grid-row: 1 / 3; width: 18px; height: 18px; }
  .g-cli-title, .g-cli-count { grid-column: 2; }
  .g-cli-title { line-height: 1.3; }
  .g-cli h3 > .btn { flex: none; min-height: 36px; }
  .g-cli .table-wrap { display: none; }
  .g-mobile { display: block; }
  .g-mzona { padding: 12px 0; border-top: 1px solid var(--line-2); }
  .g-mzona-main { display: block; color: var(--ink); text-decoration: none; }
  .g-mzona-title { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
  .g-mzona-title .dot { flex: none; }
  .g-mzona-title b { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 15px; line-height: 1.3; }
  .g-mzona-title .ic { flex: none; width: 17px; height: 17px; color: var(--muted); align-self: center; }
  .g-mzona-meta { display: flex; flex-wrap: wrap; gap: 2px 12px; margin: 5px 0 0 16px; color: var(--muted); font-size: 12.5px; }
  .g-mzona-pending { display: inline-flex; align-items: center; gap: 4px; margin: 8px 0 0 16px; font-size: 12.5px; font-weight: 700; }
  .g-mzona-pending .ic { width: 13px; height: 13px; }
  .g-mzona-actions { display: flex; gap: 8px; margin: 10px 0 0 16px; }
  .g-mzona-actions .btn { flex: 1; min-width: 0; min-height: 40px; justify-content: center; margin: 0; }
  .g-mzona-actions .btn.ghost { border: 1px solid var(--line); background: #fff; }
  .g-mzona-vacia { padding: 12px 0; color: var(--muted); font-size: 13px; }
}
.gsearch { min-width: 200px; }
@media (max-width: 1500px) { .brand small { display: none; } .mainnav a[data-nav=tipos] span, .mainnav a[data-nav=ayuda] span, .mainnav a[data-nav=usuarios] span { display: none; } }
@media (max-width: 1150px) { .mainnav a[data-nav=tecnicos] span, .mainnav a[data-nav=inicio] span { display: none; } }
@media (max-width: 700px) { .gsearch { min-width: 0; } }

/* ===== barra superior (sobria: texto, subrayado fino en la sección activa) ===== */
:root { --header-h: 52px; }
header.top { gap: 4px; padding: 0 16px 0 18px; background: #1a1a18; border-bottom: 1px solid #2b2926; }
.brand { gap: 9px; font-size: 17px; font-weight: 700; letter-spacing: 0; margin-right: 18px; }
.brand .logo { height: 16px; }
.brand .logo i { width: 4.5px; height: 16px; }
.brand .logo i:nth-child(2) { height: 8px; }
.mainnav { margin-left: 0; gap: 2px; align-self: stretch; }
.mainnav a { display: flex; align-items: center; position: relative; height: 100%; padding: 0 11px; border-radius: 0; color: #a9a49b; font-size: 14px; font-weight: 500; background: none !important; transition: color .12s; }
.mainnav a:hover { color: #fff; text-decoration: none; }
.mainnav a.active { color: #fff; }
.mainnav a.active::after { content: ""; position: absolute; left: 11px; right: 11px; bottom: 0; height: 2px; border-radius: 2px 2px 0 0; background: var(--accent); }
.mainnav a .ic, .mainnav a span { display: none; }
.gsearch { margin-left: auto; flex: 0 1 280px; min-width: 160px; max-width: 280px; transition: flex-basis .18s ease, max-width .18s ease; }
.gsearch:focus-within { flex-basis: 380px; max-width: 380px; }
.gsearch input { height: 34px; padding: 0 12px 0 32px; border-radius: 7px; border: 1px solid #34322e; background: #242320; font-size: 14px; }
.gsearch input:focus { box-shadow: none; }
.gsearch .gs-ic { left: 10px; width: 15px; height: 15px; }
.gsearch .gs-k { display: none !important; }
.gresults { top: 40px; }
#btnHelp { margin-left: 6px; }
.userbtn { padding: 0; border: 0; background: none !important; margin-left: 2px; }
.userbtn .avatar { width: 30px; height: 30px; font-size: 13px; box-shadow: 0 0 0 2px transparent; transition: box-shadow .12s; }
.userbtn:hover .avatar, .userbtn[aria-expanded=true] .avatar { box-shadow: 0 0 0 2px #4a4742; }
.acct-lbl { padding: 6px 16px 2px; font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); }
@media (max-width: 900px) { .mainnav a { padding: 0 8px; } .mainnav a.active::after { left: 8px; right: 8px; } .gsearch { flex-basis: 200px; } }

/* enlace al PDF archivado */
.btn.pdf-btn { color: var(--bad); border-color: #f0c9c5; background: #fff; font-weight: 600; }
.btn.pdf-btn:hover { background: var(--bad-soft); }
.btn.pdf-btn .ic { color: var(--bad); }
td.acts .pdf-btn { margin-right: 6px; }
#edPdfBtn .ic { color: var(--bad); }
@media (max-width: 700px) { #edPdfBtn span { display: none; } #edPdfBtn { min-width: 42px; justify-content: center; } }
.nueva-version { position: fixed; left: 50%; top: calc(var(--header-h) + 10px); transform: translateX(-50%); z-index: 95; display: flex; align-items: center; gap: 10px; background: #1a1a18; color: #fff; padding: 8px 8px 8px 14px; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.25); font-size: 14px; animation: pop .2s ease; }
.nueva-version .ic { width: 16px; height: 16px; color: var(--accent); }
/* elegir: mantenimiento nuevo o corrección de fecha */
.opciones { display: flex; flex-direction: column; gap: 10px; }
.opciones .opcion { display: flex; gap: 12px; align-items: flex-start; text-align: left; width: 100%; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 14px 16px; cursor: pointer; font: inherit; color: var(--ink); transition: border-color .12s, background .12s; }
.opciones .opcion:hover, .opciones .opcion:focus-visible { border-color: var(--accent); background: #fffafd; outline: none; }
.opciones .opcion > .ic { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--accent); }
.opciones .opcion .sub { display: block; color: var(--muted); font-size: 13.5px; margin-top: 3px; line-height: 1.4; }
.opciones .opcion .tag { margin-left: 6px; vertical-align: 1px; }
.callout.warn { background: var(--warn-soft); border-left-color: var(--warn); }
.ed-hist { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 12px 20px 0; }
.ed-hist > span { flex: 1; min-width: 240px; }
.ed-hist.subtle { background: transparent; border-left-color: var(--line); padding: 4px 12px; }
@media (max-width: 700px) { .ed-hist { margin: 8px 8px 0; } }
/* acceso de técnicos */
.tec-acceso { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; border: 1px dashed var(--line); border-radius: 9px; padding: 8px 10px; font-size: 13.5px; }
.tec-acceso.on { border-style: solid; border-color: #bfe3cb; background: var(--ok-soft); }
.tec-acceso.on > div:first-child { display: flex; flex-direction: column; gap: 2px; }
.tec-acceso .ic { width: 15px; height: 15px; vertical-align: -2px; }
.tec-acceso.on .ic { color: var(--ok); }
.tec-acceso .sub { color: var(--muted); font-size: 12px; }
.tec-acceso-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.credenciales { display: grid; gap: 8px; background: var(--beige-soft); border-radius: 10px; padding: 14px 16px; }
.credenciales div { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.credenciales span { color: var(--muted); font-size: 13px; min-width: 150px; }
.credenciales b { font-size: 15px; word-break: break-all; }
.credenciales b.clave { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 18px; letter-spacing: .5px; background: #fff; padding: 2px 8px; border-radius: 6px; }
.field .radio-op, .radio-op { display: flex; align-items: flex-start; gap: 9px; font-weight: 400; font-size: 14.5px; color: var(--ink); margin: 6px 0; cursor: pointer; text-transform: none; letter-spacing: 0; }
.radio-op input { width: 18px !important; height: 18px; margin: 1px 0 0; flex: none; accent-color: var(--accent); }
.callout .btn { white-space: normal; text-align: left; }

/* ===== validación ===== */
.btn.validar { background: var(--ok); border-color: var(--ok); color: #fff; font-weight: 600; }
.btn.validar:hover { background: #1c7440; border-color: #1c7440; }
.btn.validar .ic { color: #fff; }
.btn.validar:disabled { background: #9ec9ad; border-color: #9ec9ad; }
.nav-badge { margin-left: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.bottomnav > * { position: relative; }
.bn-badge { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 10.5px; display: inline-flex; align-items: center; justify-content: center; }
.seg-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-f { border: 1px solid var(--line); background: #fff; border-radius: 20px; padding: 6px 12px; font: inherit; font-size: 13.5px; cursor: pointer; color: var(--ink-2); }
.chip-f b { color: var(--muted); margin-left: 3px; }
.chip-f.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip-f.on b { color: #d9d4cc; }
.val-lista { display: flex; flex-direction: column; gap: 8px; padding-bottom: 80px; }
.val-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: start; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow); }
.val-item.sel { border-color: var(--accent); background: #fffafd; }
.val-sel input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); cursor: pointer; }
.val-t { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 15px; }
.val-s { color: var(--ink-2); font-size: 13.5px; margin-top: 2px; }
.val-s .ic { width: 14px; height: 14px; vertical-align: -2px; color: var(--muted); }
.val-obs { margin-top: 6px; font-size: 13.5px; color: var(--ink-2); font-style: italic; }
.val-avisos { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.val-acts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 700px) {
  .val-item { grid-template-columns: auto minmax(0, 1fr); }
  .val-acts { grid-column: 1 / -1; justify-content: stretch; }
  .val-acts > * { flex: 1; justify-content: center; }
  .seg-chips { overflow-x: auto; flex-wrap: nowrap; width: 100%; }
  .chip-f { white-space: nowrap; }
}
/* inicio del técnico */
.tz h3 { flex-wrap: wrap; }
.tz-lista { display: flex; flex-direction: column; }
.tz-grp { padding: 12px 2px 2px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); border-bottom: 1px solid var(--line-2); }
.tz-eq { display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--line-2); }
.tz-eq:last-child { border-bottom: 0; }
.tz-eq .grow { display: flex; flex-direction: column; min-width: 0; }
.tz-eq .sub { color: var(--muted); font-size: 12.5px; }
.tz-eq.hecho { opacity: .85; }
.tz-eq .btn.primary { min-width: 110px; justify-content: center; }
@media (max-width: 700px) {
  .ed-actions:has(#edValidar) #edSaveNext { display: none; }
  .ed-actions #edValidar { flex: 1.6; }
}
/* mejoras de validación */
.toast .toast-acc { margin-left: 10px; background: transparent; border: 1px solid rgba(255,255,255,.4); color: #fff; border-radius: 6px; padding: 3px 10px; font: inherit; font-weight: 600; cursor: pointer; }
.toast .toast-acc:hover { background: rgba(255,255,255,.12); }
.val-grupo { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.val-gh { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 6px 2px 0; font-size: 14px; }
.val-gh .ic { width: 15px; height: 15px; color: var(--accent); vertical-align: -2px; }
.val-cambios { margin-top: 6px; font-size: 13.5px; }
.val-cambios .ic, .igual .ic { width: 14px; height: 14px; vertical-align: -2px; }
.igual { color: var(--ok); font-weight: 600; }
.cambia { color: var(--ink-2); }
.cambia .ic { color: var(--warn); }
details.cambios summary { cursor: pointer; color: var(--blue); font-size: 13px; margin-top: 3px; }
.cambios-det { margin: 6px 0 0; padding-left: 18px; font-size: 13px; color: var(--ink-2); }
.cambios-det li.peor { color: var(--bad); }
.val-nota { margin-top: 6px; font-size: 13.5px; background: var(--blue-soft); color: #1f4f86; border-radius: 8px; padding: 6px 10px; }
.val-nota.dev { background: var(--warn-soft); color: #7a5500; }
.val-nota .ic { width: 14px; height: 14px; vertical-align: -2px; }
.val-item.devuelta { opacity: .85; border-style: dashed; }
.falta { color: var(--bad); font-weight: 600; }
.val-fecha { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.val-fecha input { padding: 5px 8px; border: 1px solid #d3cdc3; border-radius: 7px; }
/* editor: filas que cambian respecto a la visita anterior */
table.checks tr.row.cambio td.n { box-shadow: inset 3px 0 0 var(--warn); color: var(--warn); font-weight: 700; }
table.checks tr.row.cambio.peor td.n { box-shadow: inset 3px 0 0 var(--bad); color: var(--bad); }
#edGrid.solo-cambios tr.row:not(.cambio) { display: none !important; }
.cambios-chip { font-size: 12.5px; padding: 3px 10px; }
.cambios-chip .ic { width: 13px; height: 13px; vertical-align: -2px; }
.cambios-chip.on { background: var(--warn); border-color: var(--warn); color: #fff; }
/* inicio del técnico */
.tz-dev { border-color: #f0d49a; background: #fffaf0; }
.tz-dev h3 .ic { color: var(--warn); }
.tz-prog { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.tz-prog.ok { color: var(--ok); }
.tz .barra { height: 5px; border-radius: 3px; background: var(--line-2); margin: -4px 0 8px; overflow: hidden; }
.tz .barra span { display: block; height: 100%; background: var(--ok); border-radius: 3px; transition: width .3s; }
@media (max-width: 700px) { table.checks tr.row.cambio { box-shadow: inset 4px 0 0 var(--warn); } table.checks tr.row.cambio.peor { box-shadow: inset 4px 0 0 var(--bad); } .val-fecha { width: 100%; } .val-fecha > * { flex: 1; } }
/* panel de opciones (menú con interruptores) */
.popmenu.panel { width: 330px; max-width: calc(100vw - 16px); padding: 6px; }
.pm-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px 6px; font-size: 12px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); }
.pm-head .ic { width: 14px; height: 14px; }
.pm-switch { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 8px; cursor: pointer; }
.pm-switch:hover { background: var(--line-2); }
.pm-tx { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pm-tx b, .pm-accion b { font-size: 14px; font-weight: 600; color: var(--ink); }
.pm-tx small, .pm-accion small { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.pm-switch input { position: absolute; opacity: 0; pointer-events: none; }
.pm-switch i { flex: none; width: 36px; height: 20px; border-radius: 10px; background: #cfc9bf; position: relative; transition: background .15s; }
.pm-switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.pm-switch input:checked + i { background: var(--accent); }
.pm-switch input:checked + i::after { transform: translateX(16px); }
.pm-switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
.pm-sep { border-top: 1px solid var(--line); margin: 6px 4px; }
.popmenu .pm-accion { display: flex; align-items: flex-start; gap: 10px; width: 100%; text-align: left; background: none; border: 0; padding: 9px 10px; border-radius: 8px; cursor: pointer; font: inherit; }
.popmenu .pm-accion:hover { background: var(--bad-soft); }
.popmenu .pm-accion .ic { width: 16px; height: 16px; margin-top: 2px; color: var(--bad); }
.popmenu .pm-accion b { color: var(--bad); }
.pm-accion span { display: flex; flex-direction: column; gap: 2px; }
/* filtros plegados con los activos a la vista */
.toolbar .fsel { display: none; }
.toolbar.open .fsel { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; order: 5; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.toolbar.open #fToggle { background: var(--accent-soft); border-color: var(--accent); }
.f-chips { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.f-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--ink); color: #fff; border-radius: 16px; padding: 3px 4px 3px 11px; font-size: 13px; }
.f-chip b { font-weight: 600; }
.f-chip button { border: 0; background: rgba(255,255,255,.15); color: #fff; border-radius: 50%; width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.f-chip button .ic { width: 12px; height: 12px; }
/* resumen de la zona en una línea */
.zona-resumen { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; margin: -4px 0 14px; font-size: 14px; color: var(--ink-2); }
.zona-resumen > span, .zona-resumen > a { display: inline-flex; align-items: center; gap: 6px; }
.zona-resumen .ic { width: 16px; height: 16px; color: var(--muted); }
.zr-estado { gap: 10px !important; }
.stackbar.mini { width: 110px; height: 8px; }
.zr-e { display: inline-flex; align-items: center; font-size: 13px; }
.zr-borr { background: var(--accent-soft); color: var(--accent-dark); padding: 3px 10px; border-radius: 14px; font-weight: 600; }
.zr-borr .ic { color: var(--accent) !important; }
.zr-borr:hover { text-decoration: none; background: #fbd3e8; }
/* inicio: lo que requiere atención */
.hoy-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.hoy-card { display: flex; flex-direction: column; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; color: var(--ink); box-shadow: var(--shadow); transition: transform .12s, border-color .12s; min-height: 132px; }
.hoy-card:hover { text-decoration: none; transform: translateY(-1px); border-color: var(--beige); }
.hc-n { font-size: 38px; font-weight: 800; line-height: 1; letter-spacing: -1px; }
.hc-n .ic { width: 34px; height: 34px; }
.hc-t { font-size: 15px; color: var(--ink-2); }
.hc-go { margin-top: auto; font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 4px; }
.hc-go .ic { width: 15px; height: 15px; }
.hoy-card.accent { border-color: var(--accent); background: linear-gradient(180deg, var(--accent-soft), #fff 75%); }
.hoy-card.accent .hc-n, .hoy-card.accent .hc-go { color: var(--accent); }
.hoy-card.warn .hc-n, .hoy-card.warn .hc-go { color: var(--warn); }
.hoy-card.bad .hc-n, .hoy-card.bad .hc-go { color: var(--bad); }
.hoy-card.ok .hc-n { color: var(--ok); }
.hoy-card.ok { box-shadow: none; }
@media (max-width: 800px) { .hoy-grid { grid-template-columns: 1fr; gap: 10px; } .hoy-card { min-height: 0; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 14px 16px; } .hc-n { font-size: 28px; } .hc-go { margin: 0 0 0 auto; } }
/* editor: una fila de acciones, un solo botón principal */
.ed-actions:has(#edValidar) #edSaveNext { display: none; }
.ed-top .btn.icon { min-width: 38px; justify-content: center; }
#edPdfBtn .ic { color: var(--bad); }
.ed-top { flex-wrap: nowrap; }
.ed-top .title { min-width: 0; flex: 0 1 auto; }
.ed-top .title h1 { flex-wrap: nowrap; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-actions { display: flex; gap: 8px; align-items: center; }
@media (min-width: 701px) and (max-width: 1100px) { .ed-top { flex-wrap: wrap; } .ed-actions { margin-left: auto; } }
.tec-acceso.on { display: flex; align-items: center; gap: 6px; padding: 6px 8px; font-size: 13px; }
.tec-acceso.on > span { flex: 1; min-width: 0; }
.tec-acceso .btn.small { padding: 4px 6px; min-height: 0; }
.tec-foot { display: flex; gap: 4px; flex-wrap: wrap; }
.tec-stats { padding: 6px 12px; }
/* agrupar técnicos */
.sug-card summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; list-style: none; }
.sug-card summary::-webkit-details-marker { display: none; }
.sug-card summary .ic { width: 16px; height: 16px; color: var(--accent); vertical-align: -3px; }
.sug-card[open] summary .btn { display: none; }
.sug-grupos { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.sug-g { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fff; }
.sug-g.amb { background: var(--warn-soft); border-color: #f0d49a; }
.sug-miembros { display: flex; flex-wrap: wrap; gap: 10px 26px; }
.sug-m { display: flex; gap: 9px; align-items: center; min-width: 0; }
.sug-m > div { display: flex; flex-direction: column; min-width: 0; }
.sug-m .sub, .agr-t .sub { color: var(--muted); font-size: 12.5px; }
.sug-pie { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-2); }
.sug-q { margin-bottom: 8px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sug-q .ic { width: 16px; height: 16px; color: var(--warn); }
.sug-ops { display: flex; gap: 6px; flex-wrap: wrap; }
.agr-lista { display: flex; flex-direction: column; gap: 8px; }
.agr-t { display: flex; gap: 10px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; }
.agr-t:has(input:checked) { border-color: var(--accent); background: #fffafd; }
.agr-t input { margin-top: 5px; accent-color: var(--accent); width: 17px; height: 17px; flex: none; }
.agr-t .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.agr-t .sub .ic { width: 13px; height: 13px; vertical-align: -2px; }
.tec-grid.agrupando .tec-card { cursor: pointer; }
.tec-card.sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.tec-sel { position: absolute; top: 10px; left: 10px; }
.tec-sel input { width: 20px; height: 20px; accent-color: var(--accent); }
.tec-card { position: relative; }
.tec-grid.agrupando .tec-top { padding-left: 30px; }
.tec-grid.agrupando .tec-top .grow { min-width: 90px; flex: 1 1 auto; }
/* ordenar por columna */
table.list th.ord { cursor: pointer; user-select: none; white-space: nowrap; }
table.list th.ord::after { content: "↕"; margin-left: 5px; font-size: 11px; opacity: .3; }
table.list th.ord:hover::after { opacity: .7; }
table.list th.ord.ord-on { color: var(--ink); }
table.list th.ord.ord-on[data-dir="1"]::after { content: "▲"; opacity: 1; color: var(--accent); font-size: 9px; }
table.list th.ord.ord-on[data-dir="-1"]::after { content: "▼"; opacity: 1; color: var(--accent); font-size: 9px; }
table.list th.ord:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.ord-m { margin: 0 0 8px; }
.ord-m label, .sel-orden { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.ord-m .ic, .sel-orden .ic { width: 15px; height: 15px; }
.ord-m select, .sel-orden select { padding: 6px 8px; border: 1px solid #d3cdc3; border-radius: 7px; background: #fff; font: inherit; color: var(--ink); }
@media (max-width: 700px) { .ord-m { display: flex; } .ord-m label { width: 100%; } .ord-m select { flex: 1; min-height: 40px; } }

/* ================= planificador y partes de trabajo =================
   Azul = el técnico va solo · naranja = va acompañado (se distinguen también con daltonismo) · gris = sin asignar */
:root { --solo: #1f6fd1; --solo-soft: #e6f0fd; --solo-line: #b8d2f4; --equipo: #e0700b; --equipo-ink: #b35500; --equipo-soft: #fff0e1; --equipo-line: #f5cd9c; }
.tag .ic { width: 12px; height: 12px; vertical-align: -2px; }
.tag.st-revisar { background: var(--accent-soft); color: var(--accent-dark); }
.callout .ic { width: 16px; height: 16px; vertical-align: -3px; }
.callout.warn { background: var(--warn-soft); border-color: #f1d27a; }
.callout.ok { background: var(--ok-soft); border-color: #9fd6b3; }
.leyenda-tk { display: inline-flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 12.5px; color: var(--ink-2); }
.leyenda-tk > span { display: inline-flex; align-items: center; gap: 6px; }
.leyenda-tk i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.leyenda-tk .solo i { background: var(--solo); }
.leyenda-tk .equipo i { background: var(--equipo); }

/* tarjeta de tarea */
.tk { position: relative; background: #fff; border: 1px solid var(--line); border-left: 6px solid #a9a397; border-radius: 10px; padding: 8px 10px; cursor: pointer; display: flex; flex-direction: column; gap: 3px; box-shadow: 0 1px 2px rgba(0,0,0,.04); text-align: left; min-width: 0; }
.tk.solo { background: var(--solo-soft); border-color: var(--solo-line); border-left-color: var(--solo); }
.tk.equipo { background: var(--equipo-soft); border-color: var(--equipo-line); border-left-color: var(--equipo); }
.tk:hover { box-shadow: 0 4px 14px rgba(0,0,0,.09); }
.tk:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tk[draggable="true"] { cursor: grab; }
.tk.drag { opacity: .4; }
.tk.est-cerrada, .tk.est-hecha { opacity: .8; }
.tk-top { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; font-size: 12px; color: var(--muted); min-height: 18px; }
.tk-hora { color: var(--ink); font-size: 13px; }
.tk-fecha { color: var(--ink-2); font-weight: 600; }
.tk-tipo { text-transform: uppercase; letter-spacing: .4px; font-size: 10.5px; font-weight: 700; }
.tk-cli { font-weight: 700; font-size: 14px; line-height: 1.25; overflow-wrap: anywhere; }
.tk-que { font-size: 13px; color: var(--ink-2); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tk-ops { display: flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; line-height: 1.25; }
.tk-ops .ic { width: 15px; height: 15px; flex: none; }
.tk.solo .tk-ops { color: var(--solo); }
.tk.equipo .tk-ops { color: var(--equipo-ink); }
.tk.sin .tk-ops { color: var(--muted); font-weight: 600; font-style: italic; }
.tk-meta { display: flex; flex-wrap: wrap; gap: 3px 10px; font-size: 11.5px; color: var(--muted); }
.tk-meta:empty { display: none; }
.tk-meta span { display: inline-flex; align-items: center; gap: 3px; }
.tk-meta .ic { width: 13px; height: 13px; }
.tk .tag { font-size: 11px; padding: 1px 7px; }

/* planificador */
.pl-top { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.pl-semana { display: inline-flex; gap: 4px; align-items: center; }
.pl-extra { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; margin-bottom: 14px; }
.pl-extra:empty { display: none; }
.pl-extra .card { margin: 0; }
.pl-extra h3 { flex-wrap: wrap; }
.pl-rev { border-color: #f3b7d6; background: #fffafd; }
.pl-atr { border-color: #f0d49a; background: #fffcf4; }
.pl-mini { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.pl-board { display: grid; grid-template-columns: repeat(var(--cols, 7), minmax(148px, 1fr)); gap: 10px; align-items: stretch; overflow-x: auto; padding-bottom: 8px; }
.pl-col { background: var(--beige-soft); border: 1px solid var(--line); border-radius: 12px; min-height: 220px; display: flex; flex-direction: column; min-width: 0; }
.pl-col header { display: flex; align-items: center; gap: 6px; padding: 8px 6px 6px 11px; font-size: 13.5px; }
.pl-col header b { white-space: nowrap; }
.pl-col header .n { color: var(--muted); font-size: 12px; }
.pl-col header .n:not(:empty) { background: var(--line-2); border-radius: 999px; padding: 0 7px; font-weight: 600; }
.pl-hoy { font-size: 10.5px; font-weight: 700; background: var(--accent); color: #fff; padding: 1px 7px; border-radius: 8px; }
.pl-add { margin-left: auto; }
.pl-col.hoy { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); background: #fff8fc; }
.pl-col.pasado { background: #f3f1ec; }
.pl-col.pasado header b { color: var(--muted); }
.pl-col.sinfecha { background: #fff; border-style: dashed; border-color: #cfc8bc; }
.pl-drop { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 0 8px 10px; min-height: 70px; border-radius: 0 0 12px 12px; transition: background .12s; }
.pl-drop.over { background: rgba(229, 0, 126, .07); }
.pl-vacio { color: #a39d92; font-size: 12.5px; text-align: center; padding: 16px 4px; }
.pl-drop .tk ~ .pl-vacio { display: none; }
@media (max-width: 900px) {
  .pl-board { grid-template-columns: 1fr; overflow: visible; }
  .pl-col { min-height: 0; }
  .pl-col.vacia .pl-drop { min-height: 0; }
  .pl-col.vacia .pl-vacio { padding: 2px 4px 6px; text-align: left; }
  .pl-top .leyenda-tk { width: 100%; }
}

/* detalle de una tarea (panel de la oficina y pantalla del técnico) */
.tt { display: flex; flex-direction: column; gap: 10px; }
.tt-banda { display: flex; align-items: center; gap: 9px; padding: 11px 14px; border-radius: 11px; color: #fff; font-size: 15.5px; }
.tt-banda.solo { background: var(--solo); }
.tt-banda.equipo { background: var(--equipo); }
.tt-banda.sin { background: #8b867d; }
.tt-banda > .ic { width: 21px; height: 21px; flex: none; }
.tt-av { margin-left: auto; display: flex; gap: 4px; }
.tt-banda .av { background: rgba(255,255,255,.28); width: 26px; height: 26px; font-size: 10.5px; }
.tt-cuando { color: var(--ink-2); font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tt-cuando .ic { width: 16px; height: 16px; color: var(--muted); }
.tt-cuando .sep { color: var(--muted); }
.tt-cli { margin: 0; font-size: 21px; line-height: 1.25; overflow-wrap: anywhere; }
.tt-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tt-datos { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.tt-datos:empty { display: none; }
.tt-datos > div { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line-2); min-width: 0; }
.tt-datos > div:last-child { border-bottom: 0; }
.tt-datos > div > .ic { color: var(--muted); flex: none; }
.tt-datos .grow { min-width: 0; overflow-wrap: anywhere; }
.tt h4 { margin: 6px 0 0; font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.tt-titulo { margin: 0; font-weight: 600; }
.tt-lista { margin: 0; padding-left: 22px; }
.tt-lista li { margin: 4px 0; }
.tt-notas { background: var(--beige-soft); padding: 10px 12px; border-radius: 8px; font-size: 14px; overflow-wrap: anywhere; }
.tt-zona { justify-content: center; white-space: normal; overflow-wrap: anywhere; text-align: center; max-width: 100%; }
.tt-zona .ic { flex: none; }
.tt-acc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tt-acc:empty { display: none; }
.tt-acc.grande .btn { flex: 1 1 220px; justify-content: center; min-height: 50px; font-size: 16px; }
.tt-mover { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.tt-mover label { font-size: 12px; font-weight: 600; color: var(--ink-2); display: block; margin-bottom: 6px; }
.tt-mover > div { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tt-mover input { padding: 6px 8px; border: 1px solid #d3cdc3; border-radius: 7px; background: #fff; }
.tt-pie { margin-top: 12px; }
.tt-pie:empty { display: none; }
.tt-page { max-width: 720px; margin: 0 auto; }
.tt-page > .crumbs { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 10px; }

/* alta de tarea */
.tf { display: flex; flex-direction: column; gap: 14px; }
.tf-sec { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 14px; }
.tf-budget-toggle { margin: 0 0 10px; }
.tf-budget { margin: 0 0 14px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.tf-budget .field { margin: 0; }
.tf-budget-results { display: grid; gap: 4px; max-height: 215px; overflow: auto; margin: 6px 0; }
.tf-budget-option { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; width: 100%; padding: 9px; text-align: left; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: inherit; cursor: pointer; }
.tf-budget-option:hover, .tf-budget-option:focus-visible { border-color: var(--blue); }
.tf-budget-option span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tf-budget-option small { color: var(--muted); }
@media (max-width: 650px) { .tf-budget-option { grid-template-columns: 1fr; gap: 2px; } }
.tf-t { font-weight: 700; font-size: 13.5px; display: flex; align-items: center; gap: 7px; margin-bottom: 10px; }
.tf-cuando { display: grid; grid-template-columns: 180px 140px 1fr; gap: 12px 14px; align-items: end; margin-bottom: 12px; }
.tf-sinfecha { align-self: center; padding-top: 18px; }
.tf-comp { margin-top: 8px; }
.tf .field { margin-bottom: 10px; }
.tf .form-grid .field { margin-bottom: 0; }
.tf textarea { resize: vertical; }
.tf label.check { display: flex; align-items: center; gap: 8px; margin: 6px 0; font-size: 14px; }
.tf label.check input { width: 17px; height: 17px; accent-color: var(--accent); }
.tf-mas > summary { cursor: pointer; font-size: 13px; color: var(--blue); margin: 12px 0 8px; }
.comp-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; padding: 4px 11px; border-radius: 20px; }
.comp-badge .ic { width: 15px; height: 15px; }
.comp-badge.solo { background: var(--solo-soft); color: var(--solo); }
.comp-badge.equipo { background: var(--equipo-soft); color: var(--equipo-ink); }
.comp-badge.sin { background: var(--grey-soft); color: #555; }
.seg-tipos, .chips-tipo { display: flex; flex-wrap: wrap; gap: 6px; }
.seg-tipos .chip-f, .chips-tipo .chip-f { position: relative; user-select: none; display: inline-flex; align-items: center; gap: 4px; }
.seg-tipos input, .chips-tipo input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.seg-tipos .chip-f:focus-within, .chips-tipo .chip-f:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.chips-tipo .chip-f.on::before { content: "✓"; font-weight: 700; }
.chips-tipo .chip-f:has(input:disabled) { cursor: default; }
@media (max-width: 700px) {
  .tf-cuando { grid-template-columns: 1fr 1fr; }
  .tf-sinfecha { grid-column: 1 / -1; padding-top: 0; }
  .seg-tipos .chip-f, .chips-tipo .chip-f { padding: 9px 13px; }
}

/* Mi trabajo (técnico) */
.mt-dia { margin-bottom: 18px; }
.mt-dia > h3 { font-size: 15.5px; margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.mt-dia > h3 .ic { color: var(--muted); }
.mt-dia.hoy > h3, .mt-dia.hoy > h3 .ic { color: var(--accent); }
.mt-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.mt-lista .tk { padding: 12px 14px; gap: 4px; }
.mt-lista .tk-cli { font-size: 16px; }
.mt-lista .tk-ops { font-size: 14px; }
.mt-lista .tk-ops .ic { width: 18px; height: 18px; }
.mt-vacio { color: var(--muted); font-size: 14px; padding: 4px 2px; }
.mt-pasadas > summary { cursor: pointer; margin-bottom: 4px; }
.mt-pasadas[open] > summary { margin-bottom: 12px; }
.mt-hoy h3 a { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.mt-hoy-ley { margin: -4px 0 10px; }
.mt-jefe-grupo + .mt-jefe-grupo { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.mt-jefe-grupo h4 { margin: 0 0 8px; font-size: 14px; }
.tk-domicilio { display: flex; align-items: flex-start; gap: 5px; color: var(--ink-2); font-size: 13px; }
.tk-domicilio .ic { width: 15px; height: 15px; flex: none; margin-top: 2px; }

/* parte de trabajo */
.parte { max-width: 820px; margin: 0 auto; padding-bottom: 10px; }
.parte > .crumbs { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 6px; }
.pnum { font-size: 17px; font-weight: 600; color: var(--muted); margin-left: 4px; white-space: nowrap; }
.parte .card.ps h3 { margin-bottom: 12px; }
.parte details.ps > summary { list-style: none; cursor: pointer; }
.parte details.ps > summary::-webkit-details-marker { display: none; }
.parte details.ps > summary h3 { margin: 0; }
.parte details.ps[open] > summary h3 { margin-bottom: 12px; }
.parte details.ps .ps-car { color: var(--muted); transition: transform .15s; }
.parte details.ps[open] .ps-car { transform: rotate(180deg); }
.parte details.ps .ps-res { font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.parte details.ps[open] .ps-res { display: none; }
.parte .ps > .field { margin-bottom: 10px; }
.parte textarea { resize: vertical; line-height: 1.4; }
.parte.ro input:disabled, .parte.ro textarea:disabled { background: #fbfaf7; color: var(--ink); -webkit-text-fill-color: var(--ink); opacity: 1; }
.p-tiempos { margin-bottom: 12px; }
.p-hora { display: flex; gap: 6px; }
.p-hora input { flex: 1; min-width: 0; }
.p-htec { display: grid; gap: 6px; max-width: 420px; }
.field .p-htec-f { display: grid; grid-template-columns: minmax(0, 1fr) 80px auto; align-items: center; gap: 8px; margin: 0; font-size: 14px; font-weight: 500; color: var(--ink); }
.p-htec-f input { width: 100%; text-align: right; }
.p-htot { margin: 8px 0 2px; font-size: 14px; }
.p-oblig { font-size: 11px; font-weight: 600; color: var(--bad); background: var(--bad-soft); border-radius: 999px; padding: 1px 7px; margin-left: 4px; }
.mat-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.mat-row { display: grid; grid-template-columns: 76px minmax(0, 150px) minmax(0, 1fr) 34px; gap: 6px; align-items: center; }
.mat-row input { padding: 7px 9px; border: 1px solid #d3cdc3; border-radius: 7px; min-width: 0; width: 100%; background: #fff; }
.mat-head { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.p-fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-bottom: 10px; }
.p-fotos:empty { display: none; }
.p-foto { position: relative; aspect-ratio: 1; border-radius: 9px; overflow: hidden; background: var(--line-2); }
.p-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.p-foto button { position: absolute; top: 5px; right: 5px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.p-firmas { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.p-flbl { font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
.p-firmas .field { margin-top: 6px; }
.firma-area { position: relative; height: 180px; border: 1.5px dashed #c6bfb2; border-radius: 11px; background: #fff; overflow: hidden; }
.firma-area::after { content: ""; position: absolute; left: 18px; right: 18px; bottom: 38px; border-bottom: 1px solid #e6e0d6; pointer-events: none; }
.firma-area canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.firma-area img { position: absolute; inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px); object-fit: contain; }
.firma-area.ro { border-style: solid; border-color: var(--line); background: #fbfaf7; }
.firma-ph { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; color: #aca395; font-size: 13px; pointer-events: none; }
.firma-acc { display: flex; justify-content: flex-end; margin-top: 4px; }
.p-oficina { border-color: #d9c7ee; background: #fcfaff; }
.p-recup { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.parte-bar { position: sticky; bottom: 0; z-index: 6; display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 10px 12px; background: rgba(255,255,255,.97); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 -6px 20px rgba(0,0,0,.08); }
.p-sucio { font-size: 12.5px; color: var(--warn); font-weight: 700; white-space: nowrap; }
@media (max-width: 700px) {
  .mat-row { grid-template-columns: 70px minmax(0, 1fr) 40px; grid-template-areas: "u r x" "m m m"; padding-bottom: 8px; border-bottom: 1px dashed var(--line); }
  .mat-row .m-u { grid-area: u; } .mat-row .m-r { grid-area: r; } .mat-row .m-m { grid-area: m; } .mat-row > :last-child { grid-area: x; }
  .p-firmas { grid-template-columns: 1fr; }
  .firma-area { height: 200px; }
  .parte-bar { margin: 12px -12px -28px; border-radius: 0; border-width: 1px 0 0; padding: 8px 12px calc(8px + 0px); }
  .parte-bar .btn { padding: 11px 13px; }
  .p-sucio { display: none; }
}
.parte .tp-pdf { display: none; }
@media (max-width: 700px) {
  #plRoot .page-head .actions { width: 100%; margin-left: 0; flex-wrap: wrap; }
  #plRoot .pl-semana { flex: 1 1 100%; }
  #plRoot #plHoy { flex: 1; justify-content: center; }
}

/* ================= calendario del planificador: vistas, ausencias, conflictos, estado en directo ================= */
.tag.st-curso { background: #dcf5e4; color: #17803d; }
.tag.st-curso .ic { animation: latido 1.6s ease-in-out infinite; }
@keyframes latido { 50% { opacity: .35; } }
.tag.st-fin { background: var(--ok-soft); color: var(--ok); }
.tag.st-urg { background: var(--bad); color: #fff; letter-spacing: .3px; text-transform: uppercase; font-size: 10px; padding: 2px 7px; }
.tag.st-nuevo { background: var(--accent); color: #fff; }
.tk.urgente { box-shadow: inset 0 3px 0 var(--bad), 0 1px 2px rgba(0,0,0,.04); }
.tk.conflicto { outline: 2px solid #eeb0aa; outline-offset: -1px; }
.tk-aviso { display: flex; align-items: flex-start; gap: 5px; font-size: 12px; color: var(--bad); font-weight: 600; line-height: 1.25; }
.tk-aviso .ic { width: 14px; height: 14px; flex: none; margin-top: 1px; }
.tk.mini { padding: 5px 7px; gap: 1px; border-left-width: 4px; border-radius: 8px; }
.tk.mini .tk-cli { font-size: 12.5px; font-weight: 600; }
.tk.mini .tk-top { min-height: 0; font-size: 11.5px; }
.tk.mini .tk-hora { font-size: 11.5px; }
.tk.mini .tk-ops { font-size: 11.5px; }
.tk.mini .tk-ops .ic { width: 13px; height: 13px; }
.tk.mini .tag { font-size: 10px; padding: 0 6px; }
.tk.mini .tag .ic { width: 11px; height: 11px; }

/* barra de herramientas */
.seg-vistas { display: inline-flex; border: 1px solid #cdc7bc; border-radius: 9px; overflow: hidden; background: #fff; }
.seg-vistas button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 7px 12px; font: inherit; font-size: 14px; cursor: pointer; color: var(--ink-2); }
.seg-vistas button + button { border-left: 1px solid var(--line); }
.seg-vistas button.on { background: var(--ink); color: #fff; }
.seg-vistas .ic { width: 16px; height: 16px; }
.pl-herr { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pl-buscar { position: relative; display: flex; align-items: center; }
.pl-buscar > .ic { position: absolute; left: 10px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.pl-buscar input { padding: 7px 10px 7px 32px; border: 1px solid #d3cdc3; border-radius: 8px; width: 270px; background: #fff; }
.pl-buscar input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pl-buscar .tp-list { width: min(460px, 92vw); left: 0; right: auto; }
.pl-res { align-items: flex-start; }
.pl-res .grow { display: flex; flex-direction: column; min-width: 0; }
.pl-res .sub { color: var(--muted); font-size: 12.5px; }
.pl-res-c { width: 10px; height: 10px; border-radius: 3px; margin-top: 5px; flex: none; background: #a9a397; }
.pl-res-c.solo { background: var(--solo); } .pl-res-c.equipo { background: var(--equipo); }
.pl-num { display: inline-flex; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--bad); color: #fff; font-size: 11.5px; align-items: center; justify-content: center; }
.pl-fest { margin: -2px 8px 6px; font-size: 12px; font-weight: 700; color: #7a3fb0; display: flex; align-items: center; gap: 4px; }
.pl-fest .ic { width: 14px; height: 14px; }
.pl-fuera { margin: -2px 10px 6px; font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-col.fest { background: repeating-linear-gradient(135deg, #f3edf9, #f3edf9 8px, #efe7f7 8px, #efe7f7 16px); }

/* vista por técnico */
.pt-grid { display: grid; grid-template-columns: 180px repeat(var(--dias, 6), minmax(150px, 1fr)); border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: auto; max-width: 100%; }
.pt-h { position: sticky; top: 0; z-index: 2; background: var(--beige-soft); padding: 8px 10px; font-size: 13px; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.pt-h span { font-size: 11px; font-weight: 700; color: #7a3fb0; }
.pt-h.hoy { background: var(--accent-soft); color: var(--accent-dark); }
.pt-h.fest { background: #f1e8fa; }
.pt-esq { left: 0; z-index: 3; border-left: 0; color: var(--muted); font-weight: 600; }
.pt-tec { position: sticky; left: 0; z-index: 1; background: #fff; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line-2); border-right: 1px solid var(--line); min-width: 0; }
.pt-tec > div { display: flex; flex-direction: column; min-width: 0; }
.pt-tec b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-tec .sub { color: var(--muted); font-size: 11.5px; }
.pt-cel { border-left: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); padding: 5px; display: flex; flex-direction: column; gap: 5px; min-height: 76px; min-width: 0; transition: background .12s; }
.pt-cel.hoy { background: #fff8fc; }
.pt-cel.aus { background: repeating-linear-gradient(135deg, #f4f2ee, #f4f2ee 7px, #ebe8e2 7px, #ebe8e2 14px); }
.pt-cel.fest { background: repeating-linear-gradient(135deg, #f3edf9, #f3edf9 7px, #efe7f7 7px, #efe7f7 14px); }
.pt-cel.over { background: rgba(229, 0, 126, .08); outline: 2px dashed var(--accent); outline-offset: -3px; }
.pt-aus { font-size: 11.5px; font-weight: 700; color: #6d6860; text-transform: uppercase; letter-spacing: .3px; }
.pt-pie { display: flex; align-items: center; gap: 6px; margin-top: auto; font-size: 11.5px; color: var(--muted); min-height: 20px; }
.pt-pie .exceso { color: var(--bad); font-weight: 700; }
.pt-pie a { display: inline-flex; color: var(--blue); }
.pt-pie a .ic { width: 15px; height: 15px; }
.pt-add { border: 0; background: none; color: #b3ac9f; cursor: pointer; width: 22px; height: 22px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; opacity: 0; }
.pt-cel:hover .pt-add, .pt-add:focus-visible { opacity: 1; }
.pt-add:hover { background: var(--line-2); color: var(--ink); }
.pt-add .ic { width: 15px; height: 15px; }

/* vista mes */
.mes-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--line); gap: 1px; }
.mes-h { background: var(--beige-soft); padding: 7px 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.mes-dia { background: #fff; min-height: 112px; padding: 4px 5px 6px; display: flex; flex-direction: column; gap: 3px; min-width: 0; transition: background .12s; }
.mes-dia.otro { background: #faf9f6; }
.mes-dia.otro .mes-n { color: #b6b0a5; }
.mes-dia.finde { background: #fbfaf8; }
.mes-dia.fest { background: repeating-linear-gradient(135deg, #faf6fd, #faf6fd 8px, #f4ecfa 8px, #f4ecfa 16px); }
.mes-dia.hoy { box-shadow: inset 0 0 0 2px var(--accent); }
.mes-dia.over { background: var(--accent-soft); }
.mes-cab { display: flex; align-items: center; gap: 4px; min-height: 24px; }
.mes-n { border: 0; background: none; font: inherit; font-weight: 700; font-size: 13.5px; cursor: pointer; padding: 2px 6px; border-radius: 6px; color: var(--ink); }
.mes-n:hover { background: var(--line-2); }
.mes-dia.hoy .mes-n { background: var(--accent); color: #fff; }
.mes-fest { font-size: 10.5px; font-weight: 700; color: #7a3fb0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mes-fuera { display: inline-flex; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); }
.mes-fuera .ic { width: 12px; height: 12px; }
.mes-add { border: 0; background: none; color: #b3ac9f; cursor: pointer; width: 22px; height: 22px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; opacity: 0; }
.mes-dia:hover .mes-add, .mes-add:focus-visible { opacity: 1; }
.mes-add .ic { width: 14px; height: 14px; }
.mes-lista { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mc { font-size: 12px; line-height: 1.25; padding: 3px 6px; border-radius: 5px; border-left: 4px solid #a9a397; background: #f1efea; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc.solo { background: var(--solo-soft); border-left-color: var(--solo); }
.mc.equipo { background: var(--equipo-soft); border-left-color: var(--equipo); }
.mc.urgente { box-shadow: inset 0 2px 0 var(--bad); }
.mc.conflicto { outline: 1.5px solid #eeb0aa; outline-offset: -1px; }
.mc.est-cerrada { opacity: .6; text-decoration: line-through; text-decoration-color: rgba(0,0,0,.25); }
.mc.est-hecha { box-shadow: inset 3px 0 0 var(--accent); }  /* parte por revisar */
.mc[draggable="true"] { cursor: grab; }
.mc.drag { opacity: .4; }
.mes-mas { border: 0; background: none; font: inherit; font-size: 11.5px; color: var(--blue); text-align: left; cursor: pointer; padding: 1px 4px; }
@media (max-width: 700px) {
  .mes-dia { min-height: 64px; padding: 2px; }
  .mc { font-size: 10.5px; padding: 2px 3px; border-left-width: 3px; }
  .mc b { display: none; }
  .mes-fest, .mes-fuera { display: none; }
  .seg-vistas { width: 100%; }
  .seg-vistas button { flex: 1; justify-content: center; padding: 9px 6px; }
  .pl-buscar, .pl-buscar input { width: 100%; }
  .pl-herr { width: 100%; }
  .pt-grid { grid-template-columns: 116px repeat(var(--dias, 6), 150px); }
}

/* mantenimientos y ausencias */
.mn-top { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.mn-top select { margin-left: 6px; padding: 5px 8px; border: 1px solid #d3cdc3; border-radius: 7px; }
.mn-g { margin-bottom: 14px; }
.mn-g h4 { margin: 0 0 6px; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.mn-g > summary { cursor: pointer; font-weight: 700; font-size: 13px; margin-bottom: 6px; color: var(--ok); }
.mn-z { display: flex; align-items: center; gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--line-2); }
.mn-z .grow { display: flex; flex-direction: column; min-width: 0; }
.mn-z .sub { color: var(--muted); font-size: 12.5px; }
.mn-plan { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; margin-top: 2px; }
.mn-plan .ic { width: 14px; height: 14px; }
.aus-t { margin: 18px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.aus-lista { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; }
.aus-f { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--line-2); }
.aus-f:last-child { border-bottom: 0; }
.aus-f .grow { display: flex; flex-direction: column; }
.aus-f .sub { color: var(--muted); font-size: 12.5px; }
.aus-f.pasada { opacity: .55; }
.av.fest { background: #7a3fb0; }
.av.fest .ic { width: 12px; height: 12px; }
.guardia-dia, .guardia-celda, .guardia-mes { display: inline-flex; align-items: center; gap: 4px; min-width: 0; padding: 4px 6px; border: 1px solid #b6d8d1; border-radius: 7px; background: #e9f6f2; color: #176450; font: inherit; font-size: 11px; font-weight: 700; line-height: 1.25; text-align: left; cursor: pointer; }
.guardia-dia { margin: 2px 5px 5px; overflow-wrap: anywhere; }
.guardia-celda, .guardia-mes { align-self: flex-start; }
.guardia-dia .ic, .guardia-celda .ic, .guardia-mes .ic, .guardia-av .ic { width: 14px; height: 14px; flex: none; }
.guardia-av { background: #176450; color: #fff; }
@media (max-width: 700px) { .guardia-dia { margin: 2px 0 5px; } .guardia-mes { font-size: 10px; padding: 3px; } .guardia-mes-label { display: none; } }

/* detalle de la tarea y alta */
.tt-fich { display: flex; align-items: center; gap: 7px; font-weight: 600; color: #17803d; background: #e8f7ee; border-radius: 9px; padding: 8px 12px; }
.tt-fich .ic { width: 17px; height: 17px; }
.tt-fich:not(.fin) .ic { animation: latido 1.6s ease-in-out infinite; }
.tt-mover > label.tt-rep { margin-top: 12px; font-weight: 500; }
.tt-hist { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.tt-hist h4 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.tt-hist h4 .ic { width: 14px; height: 14px; }
.tt-hist ul { margin: 0; padding-left: 18px; font-size: 13.5px; }
.tt-hist li { margin: 4px 0; }
.tt-deshacer { display: flex; justify-content: center; margin-top: 6px; }
.tf-cuando { grid-template-columns: 170px 130px 130px 1fr; }
.tf-checks { display: flex; flex-direction: column; justify-content: center; gap: 2px; padding-top: 16px; }
.tf-checks .tf-sinfecha { padding-top: 0; align-self: flex-start; }
.tf-urg { color: var(--bad); font-weight: 600; }
.tf-conf { margin: 8px 0 0; }
.tf-otras { margin-top: 6px; line-height: 1.45; }
.tf-otras .ic { width: 14px; height: 14px; vertical-align: -2px; }
@media (max-width: 700px) {
  .tf-cuando { grid-template-columns: 1fr 1fr; }
  .tf-checks { grid-column: 1 / -1; flex-direction: row; gap: 16px; padding-top: 0; }
}

/* imprimir el planificador: solo el calendario, en apaisado */
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  .wa-chip, .pl-wa, header.top, .bottomnav, #sidebar, #drawer, #modal, #toasts, #progress, .pl-top, .pl-extra, .page-head .actions, .pl-add, .pt-add, .mes-add, .nueva-version { display: none !important; }
  html, body, .layout, #main { height: auto !important; overflow: visible !important; background: #fff; }
  #view { padding: 0 !important; max-width: none; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pl-board { overflow: visible; grid-template-columns: repeat(var(--cols, 7), minmax(0, 1fr)); gap: 4px; }
  .pl-col { min-height: 0; break-inside: avoid; }
  .tk { box-shadow: none; break-inside: avoid; font-size: 11px; }
  .pt-grid { overflow: visible; grid-template-columns: 110px repeat(var(--dias, 6), minmax(0, 1fr)); }
  .pt-h, .pt-tec { position: static; }
}
@media (hover: none) { .pt-add { opacity: .55; } }
@media (max-width: 700px) { .mes-add { display: none; } }

/* solicitudes de vacaciones */
.vac-lista { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.vac-f { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; padding: 10px 12px; border-bottom: 1px solid var(--line-2); }
.vac-f:last-child { border-bottom: 0; }
.vac-f .grow { display: flex; flex-direction: column; min-width: 200px; flex: 1; }
.vac-f .sub { color: var(--muted); font-size: 12.5px; }
.vac-f.nov { background: #fff8fc; box-shadow: inset 4px 0 0 var(--accent); }
.vac-resp { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.vac-tareas { font-size: 12.5px; color: var(--bad); font-weight: 600; margin-top: 3px; }
.vac-tareas .ic { width: 13px; height: 13px; vertical-align: -2px; }
.vac-cuenta { margin: 10px 0 6px; }
.vac-cuenta .ic { width: 14px; height: 14px; vertical-align: -2px; }
.pl-vac { border-color: #d9c7ee; background: #fcfaff; }
.pt-pide { font-size: 11px; font-weight: 700; color: #7a3fb0; border: 1px dashed #b893dc; border-radius: 6px; padding: 2px 6px; background: #faf6fd; display: flex; align-items: center; gap: 4px; }
.pt-pide .ic { width: 12px; height: 12px; }
.mt-vac h3 { flex-wrap: wrap; }

/* «ver como» (administrador mirando la app como otro usuario, solo lectura) */
.simbar { position: fixed; left: 18px; bottom: 18px; z-index: 95; display: flex; align-items: center; gap: 10px; background: #1d1d1b; color: #fff; padding: 7px 8px 7px 14px; border-radius: 30px; box-shadow: 0 10px 30px rgba(0,0,0,.3); border: 2px solid var(--accent); font-size: 14px; max-width: calc(100vw - 24px); }
.simbar > .ic { width: 18px; height: 18px; color: var(--accent); flex: none; }
.simbar .sim-p { color: #c9c4bb; }
.simbar .btn { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.simbar .btn:hover { background: var(--accent-dark); }
body.simulando header.top { box-shadow: inset 0 -3px 0 var(--accent); }
@media (max-width: 700px) { .simbar { left: 50%; transform: translateX(-50%); bottom: calc(var(--bn-h) + var(--safe-b) + 10px); font-size: 12.5px; gap: 6px; padding-left: 10px; } .simbar .sim-p { display: none; } }
@media print { .simbar { display: none !important; } }

/* ================= archivo: filtros inteligentes ================= */
.ar-pide { position: relative; display: flex; align-items: center; gap: 8px; background: #fff; border: 1.5px solid #d3cdc3; border-radius: 12px; padding: 4px 6px 4px 12px; margin-bottom: 10px; box-shadow: var(--shadow); }
.ar-pide:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ar-pide > .ic { width: 20px; height: 20px; color: var(--accent); flex: none; }
.ar-pide input { flex: 1; min-width: 0; border: 0; outline: none; padding: 9px 2px; font-size: 15.5px; background: transparent; }
.ar-entendido, .ar-rapidos { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; }
.ar-rl { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); margin-right: 2px; }
.ar-ficha { display: inline-flex; align-items: center; gap: 4px; background: var(--ink); color: #fff; border-radius: 20px; padding: 4px 4px 4px 12px; font-size: 13.5px; }
.ar-ficha button { border: 0; background: rgba(255,255,255,.18); color: #fff; width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.ar-ficha button .ic { width: 12px; height: 12px; }
.ar-mia { display: inline-flex; align-items: center; gap: 2px; padding: 0 4px 0 0; background: #fbf7ff; border-color: #d9c7ee; }
.ar-mia button { border: 0; background: none; font: inherit; color: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; padding: 6px 4px 6px 12px; }
.ar-mia .ar-mia-x { padding: 4px; color: var(--muted); }
.ar-mia .ic { width: 13px; height: 13px; }
.ar-mas { margin-bottom: 12px; }
.ar-mas > summary { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); padding: 4px 0; }
.ar-mas > summary .ic { width: 15px; height: 15px; }
.ar-fac { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-top: 6px; display: flex; flex-direction: column; gap: 12px; }
.ar-fg > label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
.ar-fila { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px 12px; }
.ar-fila .field select, .ar-rango input { width: 100%; padding: 7px 8px; border: 1px solid #d3cdc3; border-radius: 7px; background: #fff; }
.ar-rango { display: flex; gap: 6px; }
.ar-checks { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.ar-checks label.check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.ar-checks input { accent-color: var(--accent); width: 16px; height: 16px; }
.ar-barra { position: sticky; top: 0; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: var(--bg); padding: 8px 0; }
.ar-barra label.check { display: inline-flex; align-items: center; gap: 6px; }
.ar-barra input { accent-color: var(--accent); width: 17px; height: 17px; }
.ar-lista { background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.ar-f { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line-2); }
.ar-f:last-child { border-bottom: 0; }
.ar-f.sel { background: var(--accent-soft); }
.ar-f > input { accent-color: var(--accent); width: 17px; height: 17px; flex: none; }
.ar-f .grow { display: flex; flex-direction: column; min-width: 0; }
.ar-f .grow a, .ar-f .grow b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.ar-f .sub { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ar-tags { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.tag.st-ult { background: #e6f5ec; color: #17803d; }
.ar-mas-res { text-align: center; padding: 12px; }
@media (max-width: 700px) {
  .ar-f { flex-wrap: wrap; }
  .ar-f .grow { flex: 1 1 calc(100% - 70px); }
  .ar-tags { width: 100%; justify-content: flex-start; padding-left: 58px; }
  .ar-pide input { font-size: 16px; }
}
/* archivo: carpetas principales (preventivo / correctivo) y fila de fechas */
.folder.raiz > summary { background: var(--beige-soft); font-size: 15px; }
.folder.raiz > summary .fname { font-weight: 800; }
.folder.raiz > summary .fold { color: var(--accent); }
.ar-fechas { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 10px; }
.ar-fd { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--ink-2); }
.ar-fd input { padding: 6px 8px; border: 1px solid #d3cdc3; border-radius: 7px; background: #fff; }
.ar-fd input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
/* archivo: elegir varios (casillas en el árbol y en la lista) y fila de clientes */
.file .ar-ck, .folder > summary .ar-ck { accent-color: var(--accent); width: 16px; height: 16px; margin: 0 4px 0 0; flex: none; cursor: pointer; }
#arSelBar { z-index: 35; }
#arSelBar .ar-fuera { opacity: .75; }
.ar-clientes { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; }
.ar-clientes select { padding: 6px 8px; border: 1px solid #d3cdc3; border-radius: 7px; background: #fff; }
#arRoot { padding-bottom: 70px; }
/* archivo: fechas (botones rápidos, desde/hasta, ‹ ›) y casilla de fotos */
.ar-per { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.ar-fd-g { display: inline-flex; flex-wrap: wrap; gap: 6px 12px; }
.ar-paso { display: inline-flex; align-items: center; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 2px 4px; }
.ar-paso b { font-size: 13.5px; padding: 0 6px; white-space: nowrap; }
.ar-paso .btn.icon { padding: 4px 6px; border: 0; }
.ar-fotos { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--ink-2); }
.ar-fotos input { accent-color: var(--accent); width: 16px; height: 16px; }
@media (max-width: 700px) { .ar-per { overflow-x: auto; flex-wrap: nowrap; width: 100%; } .ar-per .chip-f { white-space: nowrap; } }

/* ===== Panel de indicadores (Inicio de quien planifica; static/kpis.js) =====
   Tarjetas al estilo del panel de KPIs de SageMind. Colores de datos (paleta validada para daltonismo):
   azul = revisiones y visitas · naranja = partes. El texto va siempre en tinta, nunca en el color de la serie. */
:root { --viz-1: #2a78d6; --viz-2: #eb6834; --viz-soft: #e8f0fb; --cal-0: #ebe7e0; --cal-1: hsl(214 80% 86%); --cal-2: hsl(214 75% 70%); --cal-3: hsl(214 70% 54%); --cal-4: hsl(214 75% 38%); }
.kp { margin: 6px 0 26px; }
.kp-cargando { padding: 18px 2px; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.kp-cargando .ic { animation: spin 1s linear infinite; }
.kp-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px 20px; flex-wrap: wrap; margin-bottom: 10px; }
.kp-head h2 { margin: 0 0 2px; font-size: 20px; display: flex; align-items: center; gap: 8px; }
.kp-head h2 .ic { color: var(--muted); }
.kp-acc { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.kp-tabs { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 14px; padding-bottom: 8px; }
.kp-tab { border: 0; background: transparent; padding: 7px 12px; border-radius: 8px; font: inherit; font-size: 14px; color: var(--ink-2); cursor: pointer; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.kp-tab:hover { background: var(--line-2); }
.kp-tab.on { background: var(--viz-soft); color: #1b4f8f; font-weight: 600; }
.kp-tab .n { font-size: 11px; background: rgba(29,29,27,.07); border-radius: 10px; padding: 1px 7px; font-weight: 600; color: var(--muted); }
.kp-tab.on .n { background: #fff; color: #1b4f8f; }
.kp-tab.mas { color: var(--muted); }
.kp-aviso { display: flex; gap: 10px; align-items: center; background: var(--warn-soft); border: 1px solid #ecd28c; border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; font-size: 13.5px; flex-wrap: wrap; }
.kp-aviso > span { flex: 1; min-width: 220px; }
.kp-aviso.suave { background: var(--beige-soft); border-color: var(--line); color: var(--ink-2); }
.kp-aviso > .ic { color: var(--warn); flex: none; }
.kp-aviso.suave > .ic { color: var(--muted); }
.kp-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
.kw { grid-column: span 6; min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04); padding: 12px 14px 14px; display: flex; flex-direction: column; transition: border-color .12s, box-shadow .12s; }
.kw:hover { border-color: #d8d2c7; }
.kw.w3 { grid-column: span 3; } .kw.w4 { grid-column: span 4; } .kw.w6 { grid-column: span 6; } .kw.w8 { grid-column: span 8; } .kw.w12 { grid-column: span 12; }
.kw-h { display: flex; align-items: center; gap: 8px; min-height: 26px; margin-bottom: 8px; }
.kw-ic { width: 26px; height: 26px; border-radius: 8px; background: var(--viz-soft); color: #1f5fae; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.kw-ic .ic { width: 15px; height: 15px; }
.kw-t { margin: 0; font-size: 13.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.kw-sub { font-size: 12px; color: var(--muted); white-space: nowrap; }
.kw-sel { font: inherit; font-size: 12.5px; padding: 3px 24px 3px 8px; border: 1px solid var(--line); border-radius: 7px; background: #faf9f6; color: var(--ink-2); max-width: 140px; }
.kw .iconbtn { width: 26px; height: 26px; }
.kw-grip { color: var(--muted); cursor: grab; display: inline-flex; }
.kw-b { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.kp.editando .kw { border-style: dashed; border-color: #c9c2b5; }
.kp.editando .kw.arrastrando { opacity: .45; }
.kp.editando .kw.destino { outline: 2px solid var(--viz-1); outline-offset: 2px; }
/* al personalizar, los indicadores pequeños: el título en su línea y los controles debajo (también en escritorio) */
.kp.editando .kw.kpi .kw-h { flex-wrap: wrap; row-gap: 6px; }
.kp.editando .kw.kpi .kw-h .grow { flex-basis: 100%; height: 0; }
/* cifra rápida */
.kw.kpi .kw-h { margin-bottom: 4px; }
.kp-kv { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.kp-v { font-size: 28px; font-weight: 750; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kp-v small { font-size: 16px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.kp-meta { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.kp-pill { display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; border-radius: 999px; font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; background: var(--line-2); color: var(--ink-2); }
.kp-pill .ic { width: 12px; height: 12px; }
.kp-pill.bien { background: var(--ok-soft); color: #17693a; }
.kp-pill.mal { background: var(--bad-soft); color: #a8231c; }
.kp-ref { font-size: 11.5px; color: var(--muted); }
.kp-s { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.kp-spark { margin-top: auto; padding-top: 8px; height: 44px; }
.kp-spk { width: 100%; height: 36px; display: block; overflow: visible; }
.kp-spk .l { fill: none; stroke: var(--viz-1); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.kp-spk .a { fill: rgba(42,120,214,.10); }
.kp-spk circle { fill: var(--viz-1); stroke: #fff; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.kp-spk.vacio line { stroke: var(--line); stroke-width: 1.5; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
/* gráficas */
.kp-cv { position: relative; height: 240px; min-width: 0; }
.kw.w12 .kp-cv { height: 260px; }
.kp-vacio { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: 13.5px; padding: 26px 10px; text-align: center; flex: 1; }
.kp-vacio.grande { grid-column: 1 / -1; border: 1px dashed var(--line); border-radius: 12px; padding: 40px 16px; }
.kp-nota { font-size: 12px; color: var(--muted); margin-top: 8px; display: flex; align-items: center; gap: 5px; }
.kp-nota.warn { color: var(--ink-2); } .kp-nota.warn .ic { color: var(--warn); }
/* medidores */
.kp-meds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; align-items: start; }
.kp-meds.dos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kp-med { display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; min-width: 0; }
.kp-med svg { width: 100%; max-width: 130px; height: auto; }
.kp-med path { fill: none; stroke-width: 9; stroke-linecap: round; }
.kp-med .t { stroke: var(--line-2); }
.kp-med .v { stroke: var(--viz-1); transition: stroke-dasharray .5s; }
.kp-med b { font-size: 20px; font-weight: 750; margin-top: -30px; font-variant-numeric: tabular-nums; }
.kp-med b small { font-size: 12px; color: var(--muted); }
.kp-med-l { font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-top: 6px; }
.kp-med-s { font-size: 11.5px; color: var(--muted); }
/* barras y rankings */
.kp-hb { display: block; flex: 1; height: 8px; background: var(--line-2); border-radius: 4px; overflow: hidden; min-width: 30px; }
.kp-hb i { display: block; height: 100%; background: var(--viz-1); border-radius: 0 4px 4px 0; }
.kp-rank { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.kp-rank li { display: grid; grid-template-columns: minmax(80px, 36%) minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 4px; border-radius: 6px; outline: none; }
.kp-rank li:hover, .kp-rank li:focus-visible { background: var(--line-2); }
.kp-rank li[data-tec] { cursor: pointer; }
.kp-rn { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kp-rv { font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; min-width: 56px; }
.kp-rv small { color: var(--muted); }
.kp-lista { max-height: 330px; overflow: auto; }
.kp-datos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.kp-datos li { background: var(--bg); border-radius: 8px; padding: 9px 11px; display: flex; flex-direction: column; gap: 1px; }
.kp-datos li span { font-size: 12.5px; color: var(--ink-2); }
.kp-datos li b { font-size: 20px; font-variant-numeric: tabular-nums; }
.kp-datos li small { font-size: 11.5px; color: var(--muted); }
.kp-mini { width: 100%; border-collapse: collapse; font-size: 13px; }
.kp-mini th, .kp-mini td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line-2); }
.kp-mini th { color: var(--muted); font-weight: 600; font-size: 12px; }
.kp-mini td + td, .kp-mini th + th { text-align: right; font-variant-numeric: tabular-nums; }
/* cobertura: barra de zonas */
.kp-zonas { margin-top: 14px; }
.kp-zbar { display: flex; gap: 2px; height: 12px; border-radius: 6px; overflow: hidden; }
.kp-zbar i { display: block; min-width: 4px; }
.kp-zbar .z-ok { background: var(--ok); } .kp-zbar .z-pronto { background: #d9a400; } .kp-zbar .z-mal { background: var(--bad); } .kp-zbar .z-sin { background: #c9c3b8; }
.kp-zley { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--ink-2); margin-top: 8px; }
.kp-zley b { font-variant-numeric: tabular-nums; }
/* mapa de calor */
.kp-cal { display: grid; grid-template-columns: 14px repeat(var(--sem), minmax(0, 1fr)); gap: 3px; font-size: 10.5px; color: var(--muted); }
.kp-cal-m { white-space: nowrap; overflow: visible; width: 0; }
.kp-cal-d { line-height: 1; align-self: center; }
.kp-cal-c { display: block; aspect-ratio: 1; min-height: 8px; border-radius: 3px; background: var(--cal-0); outline: none; }
.kp-cal-c.l1 { background: var(--cal-1); } .kp-cal-c.l2 { background: var(--cal-2); } .kp-cal-c.l3 { background: var(--cal-3); } .kp-cal-c.l4 { background: var(--cal-4); }
.kp-cal-c.fut { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); }
.kp-cal-c[data-tip]:hover, .kp-cal-c[data-tip]:focus-visible { box-shadow: 0 0 0 2px var(--ink); }
.kp-cal-ley { display: flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--ink-2); margin-top: 10px; flex-wrap: wrap; }
.kp-cal-ley .kp-cal-c { width: 11px; height: 11px; min-height: 0; }
/* ahora mismo */
.kp-ahora { display: flex; flex-wrap: wrap; gap: 8px; }
.kp-ch { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 20px; background: #fff; border: 1px solid var(--line); color: var(--ink-2); font-size: 13.5px; }
a.kp-ch:hover { text-decoration: none; border-color: var(--beige); background: var(--beige-soft); }
.kp-ch .ic { color: var(--muted); }
.kp-ch.acc { border-color: #f3b9d7; } .kp-ch.acc .ic { color: var(--accent); }
.kp-ch.warn { border-color: #ecd28c; } .kp-ch.warn .ic { color: var(--warn); }
.kp-quienes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.kp-quien { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: #fff; border-radius: 22px; padding: 4px 12px 4px 4px; font: inherit; font-size: 13px; cursor: pointer; color: var(--ink); }
.kp-quien:hover { border-color: var(--beige); background: var(--beige-soft); }
.kp-quien .av { width: 26px; height: 26px; font-size: 10px; }
.kp-quien i { width: 8px; height: 8px; border-radius: 50%; background: #c9c3b8; }
.kp-quien.curso i { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.kp-quien.tareas i { background: var(--viz-1); } .kp-quien.hecho i { background: var(--ok); } .kp-quien.ausente { opacity: .6; } .kp-quien.ausente i { background: transparent; border: 1.5px solid var(--muted); }
.kp-quien-ley { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 11.5px; color: var(--muted); margin-top: 8px; }
.kp-quien-ley span { display: inline-flex; align-items: center; gap: 5px; }
.kp-quien-ley i { width: 8px; height: 8px; border-radius: 50%; background: #c9c3b8; }
.kp-quien-ley i.curso { background: var(--accent); } .kp-quien-ley i.tareas { background: var(--viz-1); } .kp-quien-ley i.hecho { background: var(--ok); } .kp-quien-ley i.ausente { background: transparent; border: 1.5px solid var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* tarjetas de técnico */
.kp-tecs { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.kp-tc { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; cursor: pointer; background: #fff; outline: none; transition: border-color .12s, box-shadow .12s, transform .12s; }
.kp-tc:hover, .kp-tc:focus-visible { border-color: var(--viz-1); box-shadow: 0 6px 18px rgba(29,29,27,.08); transform: translateY(-1px); }
.kp-tc.off { opacity: .7; }
.kp-tc header { display: flex; gap: 10px; align-items: center; }
.kp-tc header .av { width: 36px; height: 36px; font-size: 12px; }
.kp-tc header .go { color: var(--muted); margin-left: auto; }
.kp-tc-n { display: flex; flex-direction: column; min-width: 0; }
.kp-tc-n b { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kp-hoy { font-size: 12.5px; color: var(--muted); display: flex; gap: 5px; align-items: center; margin-top: 1px; }
.kp-hoy .ic { width: 13px; height: 13px; flex: none; }
.kp-hoy.curso { color: var(--ink-2); } .kp-hoy.curso .ic { color: var(--accent); }
.kp-hoy.tareas .ic { color: var(--viz-1); } .kp-hoy.hecho .ic { color: var(--ok); }
.kp-tc-cifras { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; background: var(--bg); border-radius: 9px; padding: 8px 4px; text-align: center; }
.kp-tc-cifras b { display: block; font-size: 19px; font-weight: 750; font-variant-numeric: tabular-nums; line-height: 1.15; }
.kp-tc-cifras b small { font-size: 12px; color: var(--muted); font-weight: 600; }
.kp-tc-cifras span { font-size: 11.5px; color: var(--muted); }
.kp-tc-ef { display: flex; flex-direction: column; gap: 6px; }
.kp-ml { display: grid; grid-template-columns: 92px minmax(0, 1fr) 50px; gap: 8px; align-items: center; font-size: 12.5px; }
.kp-ml-l { color: var(--ink-2); }
.kp-ml-b { height: 7px; background: var(--line-2); border-radius: 4px; overflow: hidden; }
.kp-ml-b i { display: block; height: 100%; background: var(--viz-1); border-radius: 0 4px 4px 0; }
.kp-ml-v { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.kp-ml-s { grid-column: 2 / -1; font-size: 11px; color: var(--muted); margin-top: -4px; }
.kp-tc-eco { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); border-top: 1px solid var(--line-2); padding-top: 8px; }
.kp-tc-spark { display: flex; align-items: flex-end; gap: 8px; }
.kp-tc-spark .kp-spk { height: 30px; }
.kp-tc-spark span { font-size: 11px; color: var(--muted); white-space: nowrap; }
.kp-tc footer { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--ink-2); border-top: 1px solid var(--line-2); padding-top: 8px; }
.kp-tc footer span { display: inline-flex; align-items: center; gap: 4px; }
.kp-tc footer .ic { width: 12px; height: 12px; color: var(--muted); }
.kp-tc footer .warn .ic { color: var(--warn); }
/* tabla de técnicos */
.kp-tw { box-shadow: none; }
.kp-t td { font-size: 13.5px; font-variant-numeric: tabular-nums; }
.kp-t tr[data-tec] { cursor: pointer; }
.kp-t td .sub { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap; }
.kp-t tr.off td { color: var(--muted); }
.kp-tec { display: flex; gap: 10px; align-items: center; min-width: 220px; }
.kp-tn { display: flex; flex-direction: column; min-width: 0; }
.kp-t .kp-hoy { white-space: nowrap; }
.kp-tec .av { width: 30px; height: 30px; font-size: 11px; }
.kp-bar { display: flex; align-items: center; gap: 8px; min-width: 110px; }
.kp-bar b { min-width: 20px; text-align: right; }
/* etiqueta flotante */
.kp-tip { position: fixed; z-index: 300; background: #1d1d1b; color: #fff; font-size: 12.5px; line-height: 1.35; padding: 6px 10px; border-radius: 7px; pointer-events: none; max-width: 280px; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
/* catálogo, costes y detalle del técnico */
.kp-cat h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); margin: 16px 0 8px; }
.kp-cat-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.kp-cat-i { display: flex; gap: 10px; align-items: flex-start; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 10px 12px; font: inherit; cursor: pointer; color: var(--ink); }
.kp-cat-i:hover:not(:disabled) { border-color: var(--viz-1); background: #fbfcff; }
.kp-cat-i:disabled { opacity: .55; cursor: default; }
.kp-cat-i b { display: block; font-size: 14px; }
.kp-cat-i .sub { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.kp-eco h3 { font-size: 14px; margin: 18px 0 8px; }
.kp-eco-tipos { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.kp-eco-t input { width: 120px; text-align: right; padding: 8px 10px; border: 1px solid #d3cdc3; border-radius: 7px; background: #fff; font: inherit; color: var(--ink); }
.kp-eco-t input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.kp-eco-una { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.kp-eco-t tr.off td { color: var(--muted); }
.kp-det-h { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 12px; }
.kp-det-h .av { width: 48px; height: 48px; font-size: 16px; }
.kp-det-h h2 { margin: 0; }
.kp-det-h .kp-hoy { font-size: 13.5px; margin: 3px 0; }
.kp-det-h .kp-hoy a { display: inline-flex; gap: 4px; align-items: center; }
.kp-det .kp-per { margin-bottom: 12px; }
.kp-det-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-bottom: 14px; }
.kp-dt-k { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.kp-dt-k .kp-l { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.kp-dt-k .kp-v { font-size: 24px; }
.kp-det-g { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; }
.kp-det-g .kw { box-shadow: none; }
.kp-comp { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line-2); }
.kp-comp .kp-l { font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-right: 4px; }
.kp-comp .kp-nota { width: 100%; margin-top: 2px; }
.kp-aus { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
@media (max-width: 1100px) {
  .kw.w3, .kw.w4 { grid-column: span 6; } .kw.w8 { grid-column: span 12; }
  .kp-meds { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 14px; }
}
@media (max-width: 800px) {
  .kw.w6, .kw.w8, .kw.w12 { grid-column: span 12; }
  .kp-det-g .kw { grid-column: span 12; }
}
@media (max-width: 700px) {
  .kp-grid { gap: 10px; }
  .kp-head h2 { font-size: 18px; }
  .kp-acc { width: 100%; }
  .kp-tabs { flex-wrap: nowrap; overflow-x: auto; }
  .kw { padding: 10px 12px 12px; }
  .kw-sel { max-width: 110px; }
  .kp-v { font-size: 24px; }
  .kp-ref { display: none; }
  .kp-datos { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .kp-cv { height: 220px; }
  /* la tabla de técnicos pasa a fichas */
  .kp-tw { border: 0; overflow: visible; }
  .kp-t thead { display: none; }
  .kp-t, .kp-t tbody { display: block; }
  .kp-t tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px; padding: 12px 2px; border-bottom: 1px solid var(--line); }
  .kp-t tr:last-child { border-bottom: 0; }
  .kp-t td { display: block; border: 0 !important; padding: 0; min-width: 0; }
  .kp-t td:first-child { grid-column: 1 / -1; }
  .kp-t td[data-l]::before { content: attr(data-l); display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .3px; color: var(--muted); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .kp-bar { min-width: 0; }
  .kp-tec { min-width: 0; }
}
@media (max-width: 420px) { .kw.w3, .kw.w4 { grid-column: span 12; } }

/* ===== Móvil: revisión de Técnico y Jefe técnico (30/09/2026) =====
   Nada se sale por los lados, lo que se toca mide al menos 28-32 px y las tiras que se desplazan de lado lo avisan con un difuminado. */
.tabs a span.t-largo, .file a.zip .t-largo { font: inherit; color: inherit; margin: 0; }
@media (hover: none) { #aAtajos, .acct-item kbd { display: none; } }
@media (max-width: 700px) {
  /* cabeceras con varios botones (Técnicos: Agrupar / Nuevo técnico): bajan de línea en vez de salirse */
  .page-head .actions { flex-wrap: wrap; }
  .page-head .actions > .btn { flex: 1 1 auto; justify-content: center; }
  /* alta de tarea: día y hora en dos columnas sin pasarse */
  .tf-cuando > * { min-width: 0; }
  .tf-cuando input { width: 100%; min-width: 0; }
  /* pestañas de la zona: «PDF» a secas; la carpeta: el enlace a la ficha solo con el lápiz */
  .tabs a { padding-left: 11px; padding-right: 11px; }
  .t-largo { display: none; }
  .file a.zip { flex: none; min-width: 36px; justify-content: center; }
  /* tiras de chips y pestañas que se desplazan de lado: difuminado a la derecha para que se vea que hay más */
  .seg-chips, .kp-tabs, #plTecs { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); padding-right: 24px; }
  /* panel de indicadores */
  .kp.editando .kw-h { flex-wrap: wrap; row-gap: 6px; }
  .kp.editando .kw-h .grow { flex-basis: 100%; height: 0; }
  .kp.editando .kw-h .kw-sel, .kp.editando .kw-h .iconbtn { height: 32px; }
  .kp.editando .kw-h .iconbtn { width: 32px; }
  .kw.w3, .kw.w4 { grid-column: span 6; }
  .kw.kpi { padding: 10px 11px 10px; }
  .kw.kpi .kw-t { font-size: 12.5px; white-space: normal; line-height: 1.2; }
  .kw.kpi .kp-v { font-size: 22px; }
  .kw.kpi .kp-s { font-size: 11.5px; }
  .kp-kv { gap: 4px 6px; }
  .kp-quien { padding: 5px 12px 5px 5px; }
  /* planificador «Por técnico»: el nombre en dos líneas en vez de cortarlo */
  .pt-grid { grid-template-columns: 96px repeat(var(--dias, 6), 140px); }
  .pt-tec { padding: 8px 6px; gap: 6px; }
  .pt-tec .av { display: none; }
  .pt-tec b { white-space: normal; overflow-wrap: anywhere; line-height: 1.2; font-size: 13px; }
  /* lo que se toca con el dedo */
  .brand { padding: 8px 0; }
  .crumbs a, a.crumbs { display: inline-flex; align-items: center; min-height: 32px; }
  .mt-hoy h3 a { display: inline-flex; align-items: center; min-height: 32px; }
  .tp-chip button { width: 28px; height: 28px; align-items: center; justify-content: center; margin: -4px -6px -4px 0; }
  details.ps > summary { min-height: 40px; display: flex; align-items: center; }
  .tec-contact a, .tec-contact button { min-height: 32px; display: inline-flex; align-items: center; }
  td a.badge { min-width: 30px; min-height: 28px; display: inline-flex; align-items: center; justify-content: center; }
  .pt-add { width: 32px; height: 32px; }
  .mes-n { min-width: 30px; min-height: 30px; padding: 4px 6px; }
  .ar-ck, .file input[type=checkbox], .folder summary input[type=checkbox] { width: 20px; height: 20px; }
  .side-title a { display: inline-flex; align-items: center; min-height: 32px; }
  .mes-lista .mc { min-height: 22px; display: flex; align-items: center; }
}
.kp-quien { position: relative; }

/* ---------- WhatsApp a subcontratados (planificador) ---------- */
:root { --wa: #1a8f4c; --wa-soft: #e3f5ea; }
.tag.st-sub { background: var(--wa-soft); color: var(--wa); font-weight: 600; }
.tag.wa-sin { background: var(--warn-soft); color: var(--warn); }
.tag.wa-cola { background: var(--blue-soft); color: var(--blue); }
.tag.wa-ok { background: var(--wa-soft); color: var(--wa); }
.tag.wa-conf { background: var(--wa); color: #fff; }
.tag.wa-err { background: var(--bad-soft); color: var(--bad); }
.wa-chip { font-weight: 600; border-radius: 10px; padding: 0 6px 0 4px; }
.wa-chip.wa-sin { background: var(--warn-soft); color: var(--warn); }
.wa-chip.wa-cola { background: var(--blue-soft); color: var(--blue); }
.wa-chip.wa-ok { color: var(--wa); }
.wa-chip.wa-conf { background: var(--wa-soft); color: var(--wa); }
.wa-chip.wa-err { background: var(--bad-soft); color: var(--bad); }
.tt-wa { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.tt-wa h4 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.tt-wa h4 .ic { width: 14px; height: 14px; color: var(--wa); }
.tt-wa .tt-acc { margin-top: 10px; }
.wa-subs { list-style: none; margin: 0; padding: 0; }
.wa-subs li { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.wa-subs li:last-child { border-bottom: 0; }
.wa-resp { margin-top: 4px; font-size: 13.5px; background: var(--wa-soft); border-radius: 8px; padding: 4px 9px; display: inline-block; }
.wa-mal { color: var(--bad); }
.wa-hist { margin-top: 10px; font-size: 13.5px; }
.wa-hist summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.wa-hist ul { list-style: none; margin: 6px 0 0; padding: 0; }
.wa-hist li { display: flex; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line-2); }
.wa-st-enviado { color: var(--wa); font-weight: 600; }
.wa-st-error { color: var(--bad); font-weight: 600; }
.wa-st-pendiente, .wa-st-enviando { color: var(--blue); font-weight: 600; }
.wa-st-cancelado { color: var(--muted); }
.wa-para { display: flex; flex-direction: column; gap: 6px; }
.wa-para label.check { display: flex; gap: 8px; align-items: flex-start; }
.wa-para input { margin-top: 3px; accent-color: var(--accent); }
.wa-tipos { display: flex; gap: 16px; flex-wrap: wrap; }
.wa-tipos label { display: inline-flex; gap: 6px; align-items: center; }
.wa-msg { width: 100%; font: 14px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; padding: 10px 12px; border: 1px solid #d3cdc3; border-radius: 8px; resize: vertical; background: #fbfdfb; }
.pl-wa { display: flex; gap: 8px; align-items: flex-start; }
.pl-wa .ic { flex: none; margin-top: 2px; }

/* ---------- Integraciones (solo administradores) ---------- */
.tabs a .ic { width: 15px; height: 15px; vertical-align: -2px; margin-right: 3px; }
.int-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.int-grid > .card { margin: 0; }
.int-full { grid-column: 1 / -1; }
.int-detalle { margin: 6px 0 10px; }
.int-detalle summary { cursor: pointer; }
.int-detalle p { margin: 6px 0 0; word-break: break-word; }
.int-cab { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.int-dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; flex: none; }
.int-dot.ok { background: var(--wa); box-shadow: 0 0 0 4px var(--wa-soft); }
.int-dot.warn { background: var(--warn); box-shadow: 0 0 0 4px var(--warn-soft); }
.int-dot.bad { background: var(--bad); box-shadow: 0 0 0 4px var(--bad-soft); }
.int-dot.off { background: #b9b3a9; }
.int-num { font-size: 15px; display: flex; align-items: center; gap: 6px; margin: 4px 0; }
.int-qr { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.int-qr img { width: 240px; height: 240px; border: 1px solid var(--line); border-radius: 10px; background: #fff; image-rendering: pixelated; }
.int-qr ol { margin: 0; padding-left: 20px; flex: 1 1 200px; font-size: 14px; }
.int-qr li { margin: 6px 0; }
.int-cola { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13.5px; color: var(--ink-2); padding-top: 10px; margin-top: 10px; border-top: 1px solid var(--line-2); }
.int-mal { color: var(--bad); }
.int-acc { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 14px; }
.int-estado .int-acc { justify-content: flex-start; }
.int-switch { display: flex; gap: 8px; align-items: center; padding: 10px 12px; background: var(--beige-soft); border-radius: 8px; margin-bottom: 12px; }
.int-switch input { width: 18px; height: 18px; accent-color: var(--accent); }
.int-avanzado { margin-top: 12px; }
.int-avanzado summary { cursor: pointer; color: var(--muted); font-size: 13.5px; margin-bottom: 10px; }
.int-fila { display: flex; gap: 8px; flex-wrap: wrap; }
.int-fila input { flex: 1 1 160px; padding: 8px 10px; border: 1px solid #d3cdc3; border-radius: 7px; font-size: 15px; }
.int-como ul { margin: 0; padding-left: 20px; font-size: 14px; color: var(--ink-2); }
.int-como li { margin: 6px 0; }
.int-como p { font-size: 14px; color: var(--ink-2); }
.int-tabla td { font-size: 13.5px; vertical-align: top; }
.int-sub { margin: 16px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.int-resp { margin: 0; padding-left: 18px; font-size: 13.5px; }
.int-resp li { margin: 4px 0; }
.int-pag { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
@media (max-width: 800px) {
  .int-grid { grid-template-columns: minmax(0, 1fr); }
  .int-qr img { width: 200px; height: 200px; }
  .wa-hist li { flex-wrap: wrap; }
}
.tec-top .grow { min-width: 0; }
.tec-subc { margin-top: 4px; }
.tag.st-sub { white-space: normal; display: inline-flex; align-items: center; gap: 4px; line-height: 1.3; }
.wa-campo { margin: 12px 0 10px; }
.wa-lbl { font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.wa-para input, .wa-tipos input { width: auto; flex: none; }
.wa-para label.check { font-size: 14.5px; font-weight: 400; }
.field .hint label.check { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 400; margin: 0; }
.field .hint input[type=checkbox] { width: auto; padding: 0; }
.wa-hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.int-qr-img { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px; line-height: 0; }
.int-qr-img img { width: 264px; height: 264px; border: 0; border-radius: 0; image-rendering: pixelated; }
.int-cargando { display: flex; align-items: center; gap: 8px; }
.int-cargando .ic { animation: spin 1s linear infinite; }
@media (max-width: 800px) { .int-qr-img img { width: 220px; height: 220px; } }

/* RRHH: resumen, directorio y expediente */
.rrhh-shell { max-width: 1260px; margin: 0 auto; }
.rrhh-hero { position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 146px; padding: 25px 30px; margin-bottom: 18px; border-radius: 18px; color: #fff; background: radial-gradient(circle at 82% -30%, rgba(244,108,151,.3), transparent 35%), linear-gradient(120deg,#24232a,#36313d 55%,#5b3345); }
.rrhh-hero::after { content: ""; position: absolute; right: -46px; bottom: -90px; width: 240px; height: 240px; border-radius: 50%; border: 35px solid rgba(255,255,255,.035); pointer-events: none; }
.rrhh-hero h1 { margin: 7px 0 5px; font-size: clamp(25px, 3vw, 35px); letter-spacing: -.035em; }
.rrhh-hero p { margin: 0; color: #e0d9dc; line-height: 1.5; }
.rrhh-eyebrow, .rrhh-overline { display: block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .14em; }
.rrhh-eyebrow { color: #ffc5d6; }
.rrhh-overline { color: #875b6c; }
.rrhh-hero-mark { display: grid; place-items: center; width: 78px; height: 78px; border: 1px solid rgba(255,255,255,.2); border-radius: 20px; background: rgba(255,255,255,.08); flex: none; }
.rrhh-hero-mark .ic { width: 39px; height: 39px; color: #ffd4e0; }
.rrhh-nav { display: flex; gap: 7px; overflow-x: auto; padding: 4px; margin-bottom: 22px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow); }
.rrhh-nav a { display: inline-flex; align-items: center; gap: 8px; padding: 11px 16px; color: var(--ink-2); border-radius: 9px; font-weight: 700; white-space: nowrap; }
.rrhh-nav a:hover { background: var(--beige-soft); text-decoration: none; }
.rrhh-nav a.active { background: #332b31; color: #fff; }
.rrhh-nav .ic { width: 17px; height: 17px; }
.rrhh-content-head { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin: 3px 0 16px; }
.rrhh-content-head h2 { margin: 4px 0; font-size: 25px; letter-spacing: -.025em; }
.rrhh-content-head p { margin: 0; color: var(--muted); }
.rrhh-content-head .btn { flex: none; }
.rrhh-hero-lock { margin-bottom: 20px; }
.rrhh-hero-lock > div { min-width: 0; }
.rrhh-unlock { max-width: 500px; padding: 24px 26px; }
.rrhh-lock-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-dark); }
.rrhh-lock-icon .ic { width: 21px; height: 21px; }
.rrhh-unlock h2 { font-size: 22px; margin: 16px 0 5px; }
.rrhh-unlock p { line-height: 1.5; }
.rrhh-unlock .field { margin: 20px 0 16px; }
.rrhh-unlock .field label { margin-bottom: 8px; font-size: 13px; }
.rrhh-unlock .field input { min-height: 44px; }
.rrhh-unlock .btn { min-height: 42px; padding-inline: 20px; }
.rrhh-unlock .hint { display: block; margin-top: 14px; }
.rrhh-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.rrhh-metric { display: flex; flex-direction: column; align-items: flex-start; min-height: 156px; padding: 17px; text-align: left; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink); box-shadow: var(--shadow); cursor: pointer; transition: transform .14s, border-color .14s, box-shadow .14s; }
.rrhh-metric:hover { transform: translateY(-2px); border-color: #c69aa9; box-shadow: 0 8px 24px rgba(45,30,35,.09); }
.rrhh-metric-icon { display: grid; place-items: center; width: 32px; height: 32px; margin-bottom: 10px; border-radius: 9px; background: #f4edf0; color: #85566a; }
.rrhh-metric-icon .ic { width: 17px; height: 17px; }
.rrhh-metric-value { font-size: 32px; font-weight: 800; line-height: 1; letter-spacing: -.04em; }
.rrhh-metric-label { margin-top: 6px; font-size: 13px; font-weight: 700; }
.rrhh-metric-link { margin-top: auto; padding-top: 9px; color: #8a5368; font-size: 11.5px; font-weight: 700; }
.rrhh-metric.urgent .rrhh-metric-icon { color: #975319; background: #fff1df; }
.rrhh-metric.attention .rrhh-metric-icon { color: #a34139; background: #fff0ee; }
.rrhh-resumen-grid .card { border-radius: 14px; min-height: 220px; }
.rrhh-footer-action { margin: 17px 0 24px; }
.rrhh-kpis .tile { min-height: 108px; text-align: left; cursor: pointer; }
.rrhh-kpis .tile:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.rrhh-kpis .tile .v, .rrhh-kpis .tile .l { display: block; }
.rrhh-kpis .tile .l { margin-top: 5px; }
.rrhh-resumen-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.rrhh-resumen-grid .card { min-width: 0; margin: 0; }
.rrhh-section-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rrhh-section-head h3 { margin: 0; }
.rrhh-section-head > :last-child:not(:first-child) { margin-left: auto; }
.rrhh-summary-list { border-top: 1px solid var(--line-2); }
.rrhh-summary-row { display: flex; width: 100%; gap: 12px; align-items: center; justify-content: space-between; text-align: left; border: 0; border-bottom: 1px solid var(--line-2); padding: 11px 3px; background: transparent; cursor: pointer; }
.rrhh-summary-row:hover { background: var(--beige-soft); }
.rrhh-summary-row { border-radius: 7px; padding-inline: 9px; }
.rrhh-summary-row > span:first-child { min-width: 0; }
.rrhh-summary-row b, .rrhh-summary-row small { display: block; }
.rrhh-summary-row small { margin-top: 3px; color: var(--muted); }
.rrhh-summary-row .tag { flex: none; }
.rrhh-layout { display: grid; grid-template-columns: minmax(260px, 320px) minmax(0, 1fr); gap: 16px; align-items: start; }
.rrhh-layout > * { min-width: 0; }
.rrhh-back-list { display: none; }
.rrhh-directory { padding: 16px; }
.rrhh-directory .field { margin-bottom: 12px; }
.rrhh-directory .field input, .rrhh-directory .field select { min-height: 40px; }
.rrhh-count { margin: 4px 0 9px; }
.rrhh-people { max-height: min(65vh, 720px); overflow-y: auto; margin: 0 -8px -4px; padding: 0 8px 4px; }
.rrhh-persona { display: flex; width: 100%; flex-direction: column; gap: 5px; padding: 11px 12px; margin-bottom: 4px; text-align: left; background: #fff; border: 1px solid var(--line-2); border-radius: 8px; cursor: pointer; }
.rrhh-persona { border-radius: 11px; margin-bottom: 7px; }
.rrhh-persona-top { display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; }
.rrhh-avatar { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 10px; background: #f3e8ed; color: #815268; font-size: 12px; font-weight: 800; }
.rrhh-persona.active .rrhh-avatar { background: #eacbd7; color: #6b3e54; }
.rrhh-persona:hover { background: #faf8f4; border-color: var(--beige); }
.rrhh-persona.active { background: var(--accent-soft); border-color: var(--accent); }
.rrhh-persona-main { min-width: 0; }
.rrhh-persona-main b, .rrhh-persona-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rrhh-persona-main small { margin-top: 3px; color: var(--muted); }
.rrhh-persona-tags { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.rrhh-persona-tags .tag { font-size: 11px; padding: 1px 6px; }
.rrhh-persona-tags small { color: var(--muted); }
.rrhh-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.rrhh-detail-head { padding: 21px; border-radius: 14px; background: linear-gradient(110deg,#fff,#faf5f6); }
.rrhh-detail-head h2, .rrhh-own-head h2 { margin: 2px 0 5px; font-size: 23px; }
.rrhh-detail-head p, .rrhh-own-head p { margin: 0; }
.rrhh-head-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.rrhh-fold { padding: 0; }
.rrhh-fold summary { padding: 16px 18px; font-weight: 700; cursor: pointer; }
.rrhh-fold summary:hover { background: #faf8f4; }
.rrhh-fold[open] summary { border-bottom: 1px solid var(--line-2); }
.rrhh-fold form { padding: 18px; }
.rrhh-fold .form-grid { margin-bottom: 18px; gap: 16px; }
.rrhh-fold .field label { margin-bottom: 6px; }
.rrhh-fold .field input, .rrhh-fold .field select { min-height: 42px; }
.rrhh-fold form > .hint { margin: 0 0 15px; line-height: 1.45; }
.rrhh-doc-filtros { display: grid; grid-template-columns: repeat(3, minmax(130px, 1fr)); gap: 10px; margin-bottom: 10px; }
.rrhh-doc-filtros select { min-height: 40px; }
.rrhh-year h4 { margin: 20px 0 8px; color: var(--ink-2); }
.rrhh-doc { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 13px 0; border-top: 1px solid var(--line-2); }
.rrhh-doc-icon { display: grid; place-items: center; flex: none; width: 37px; height: 42px; border-radius: 9px; background: #f4eef1; color: #89566c; }
.rrhh-doc-icon .ic { width: 19px; height: 19px; }
.rrhh-doc-main { flex: 1; }
.rrhh-doc-main { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 0; }
.rrhh-doc-main b { margin-right: 4px; }
.rrhh-doc-main small { flex-basis: 100%; color: var(--muted); }
.rrhh-doc-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; flex: none; }
.rrhh-own-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 18px; }
.rrhh-own-head { padding: 21px 24px; border: 1px solid var(--line); border-radius: 15px; background: linear-gradient(105deg,#fff,#fbf2f5); box-shadow: var(--shadow); }
.rrhh-own-head p { margin: 0; }
.rrhh-own-count { display: flex; align-items: baseline; gap: 5px; color: #815268; font-size: 25px; font-weight: 800; white-space: nowrap; }
.rrhh-own-count small { font-size: 12px; font-weight: 600; }
.rrhh-own-filters { display: grid; grid-template-columns: minmax(220px, 1.7fr) repeat(2, minmax(120px, 1fr)); gap: 11px; align-items: end; margin: 14px 0 18px; }
.rrhh-own-filters .field { margin: 0; }
.rrhh-own-filters select { min-height: 42px; }
@media (max-width: 650px) { .rrhh-own-filters { grid-template-columns: minmax(0, 1fr); } }
.rrhh-clock-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin-bottom: 16px; }
.rrhh-start-notice { margin-bottom: 16px; line-height: 1.55; }
.rrhh-start-config { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 16px; padding: 20px 24px; border-radius: 15px; }
.rrhh-start-config h3 { margin: 4px 0 5px; }
.rrhh-start-config p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.rrhh-start-config form { display: flex; align-items: end; gap: 10px; flex: none; }
.rrhh-start-config .field { margin: 0; }
.rrhh-start-config input { min-width: 160px; }
.rrhh-clock-grid > * { min-width: 0; margin: 0; }
.rrhh-clock-card { display: flex; flex-direction: column; align-items: flex-start; padding: 24px; border-radius: 16px; background: linear-gradient(140deg,#292830,#44323b); color: #fff; box-shadow: 0 12px 25px rgba(45,28,36,.13); }
.rrhh-clock-kicker { color: #efc3d0; font-size: 12px; font-weight: 700; letter-spacing: .05em; }
.rrhh-clock-status { display: flex; align-items: center; gap: 11px; margin: 18px 0 3px; }
.rrhh-clock-status h3 { margin: 0; font-size: 25px; }
.rrhh-live-dot { width: 13px; height: 13px; border-radius: 50%; background: #a9a4a4; box-shadow: 0 0 0 5px rgba(255,255,255,.08); }
.rrhh-live-dot.trabajando { background: #71d69c; box-shadow: 0 0 0 5px rgba(113,214,156,.16); }
.rrhh-live-dot.pausa { background: #ffcd75; box-shadow: 0 0 0 5px rgba(255,205,117,.14); }
.rrhh-clock-card p { margin: 5px 0 20px; color: #dfd8d9; }
.rrhh-clock-card small { display: block; color: #d3c6ca; line-height: 1.5; margin-top: auto; }
.rrhh-clock-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.rrhh-clock-actions .btn { min-height: 45px; padding-inline: 18px; }
.rrhh-clock-actions .btn:disabled { cursor: not-allowed; opacity: .55; }
.rrhh-clock-actions .btn.dark { background: #fff; color: #312c30; border-color: #fff; }
.rrhh-today { padding: 24px; border-radius: 16px; }
.rrhh-today h3 { margin: 6px 0 18px; font-size: 25px; }
.rrhh-today-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; }
.rrhh-today-stats div { padding: 14px 10px; border-radius: 10px; background: #f8f5f5; }
.rrhh-today-stats span, .rrhh-today-stats b { display: block; }
.rrhh-today-stats span { margin-bottom: 7px; color: var(--muted); font-size: 11px; }
.rrhh-today-stats b { font-size: 17px; }
.rrhh-record-grid .card, .rrhh-manager-grid .card { border-radius: 14px; }
.rrhh-record-list { margin-top: 12px; border-top: 1px solid var(--line-2); }
.rrhh-month-export { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 11px 0; }
.rrhh-month-export label { color: var(--muted); font-size: 12px; font-weight: 700; }
.rrhh-month-export input { min-height: 32px; padding: 4px 7px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.rrhh-record-row { display: grid; grid-template-columns: minmax(90px,1fr) minmax(125px,1.4fr) auto; align-items: center; gap: 8px; padding: 11px 3px; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.rrhh-record-row span { color: var(--muted); }
.rrhh-record-row strong { color: #7a4058; white-space: nowrap; }
.rrhh-event-list { margin-bottom: 14px; }
.rrhh-event-list > div { position: relative; display: grid; grid-template-columns: 14px 1fr auto; column-gap: 9px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.rrhh-event-list time { color: var(--muted); }
.rrhh-event-list small { grid-column: 2 / -1; color: #8a5368; }
.rrhh-event-dot { display: block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.rrhh-request { margin-top: 14px; border: 1px solid var(--line); border-radius: 10px; }
.rrhh-request summary { padding: 11px 13px; cursor: pointer; font-weight: 700; }
.rrhh-request form { padding: 14px; border-top: 1px solid var(--line-2); }
.rrhh-request .field { margin-bottom: 12px; }
.rrhh-request .field label { margin-bottom: 5px; }
.rrhh-request-two { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.rrhh-request form .btn { margin-bottom: 7px; }
.rrhh-requests { margin-top: 18px; }
.rrhh-requests h4 { margin: 0 0 7px; }
.rrhh-requests > div { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line-2); font-size: 12px; }
.rrhh-requests > div span:nth-child(2) { color: var(--muted); margin-right: auto; }
.rrhh-manager-head { margin-top: 30px; }
.rrhh-pending { padding: 14px 0; border-top: 1px solid var(--line-2); }
.rrhh-pending > div:first-child b, .rrhh-pending > div:first-child span { display: block; }
.rrhh-pending > div:first-child span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.rrhh-pending p { margin: 9px 0; font-size: 13px; }
.rrhh-pending .field { margin: 9px 0; }
.rrhh-pending-actions { display: flex; gap: 7px; }
.rrhh-manager-lock { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rrhh-manager-lock p { margin: 0; }
.rrhh-incidencias { border-color: #e6cfa6; background: #fffaf1; }
.rrhh-incidencias p { margin: 8px 0; font-size: 13px; }
.rrhh-rep-card { max-width: 900px; padding: 23px; }
.rrhh-rep-card > .field { max-width: 480px; }
.rrhh-rep-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rrhh-search { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 11px; border: 1px solid var(--line); border-radius: 10px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.rrhh-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.rrhh-search .ic { width: 17px; height: 17px; color: var(--muted); flex: none; }
.rrhh-search input { width: 100%; min-width: 0; padding: 8px 0; border: 0; outline: 0; background: transparent; box-shadow: none; }
.rrhh-search input:focus { box-shadow: none; }
.rrhh-directory-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.rrhh-directory-filters select { width: 100%; min-width: 0; }
.rrhh-group { margin: 0 0 8px; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: #fff; }
.rrhh-group > summary { display: flex; align-items: center; gap: 8px; padding: 11px 12px; cursor: pointer; font-size: 13px; font-weight: 800; list-style: none; background: #fbf8f8; }
.rrhh-group > summary::-webkit-details-marker { display: none; }
.rrhh-group > summary::before { content: '›'; font-size: 20px; line-height: 12px; color: #875b6c; transform: rotate(0); transition: transform .15s; }
.rrhh-group[open] > summary::before { transform: rotate(90deg); }
.rrhh-group > summary:hover { background: #f6eeee; }
.rrhh-group-count { margin-left: auto; min-width: 23px; padding: 2px 6px; border-radius: 99px; background: #eee5e9; color: #694457; text-align: center; font-size: 11px; }
.rrhh-subgroup { padding: 5px 8px 7px; border-top: 1px solid var(--line-2); }
.rrhh-subgroup h4 { display: flex; align-items: center; justify-content: space-between; margin: 7px 5px 9px; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.rrhh-subgroup h4 span { font-size: 11px; }
.rrhh-subgroup .rrhh-persona { margin-bottom: 5px; }
.rrhh-directory-overview { padding: 30px; border-radius: 15px; background: linear-gradient(135deg, #fff 68%, #fbf4f6); }
.rrhh-directory-overview h2 { margin: 7px 0 8px; font-size: 25px; letter-spacing: -.025em; }
.rrhh-directory-overview > p { max-width: 580px; color: var(--muted); line-height: 1.55; }
.rrhh-overview-stats { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; margin: 24px 0; }
.rrhh-overview-stats div { padding: 17px; border: 1px solid var(--line-2); border-radius: 11px; background: #fff; }
.rrhh-overview-stats b, .rrhh-overview-stats span { display: block; }
.rrhh-overview-stats b { font-size: 27px; line-height: 1; }
.rrhh-overview-stats span { margin-top: 7px; color: var(--muted); font-size: 12px; }
.rrhh-overview-actions { display: flex; gap: 9px; flex-wrap: wrap; }
@media (max-width: 600px) { .rrhh-overview-stats { grid-template-columns: minmax(0, 1fr); } .rrhh-directory-overview { padding: 20px; } }
.rrhh-picker-selection { display: none; align-items: center; gap: 10px; padding: 10px 12px; margin: 10px 0; border: 1px solid #d8bdc8; border-radius: 11px; background: #fbf4f6; }
.rrhh-picker-selection.visible { display: flex; }
.rrhh-picker-selection > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.rrhh-picker-selection small { color: var(--muted); }
.rrhh-person-picker { position: relative; }
.rrhh-picker-list { position: absolute; z-index: 9; top: calc(100% + 4px); left: 0; right: 0; max-height: 330px; overflow-y: auto; padding: 5px; border: 1px solid var(--line); border-radius: 11px; background: #fff; box-shadow: 0 14px 30px rgba(30,20,25,.15); }
.rrhh-picker-list.hidden { display: none; }
.rrhh-picker-option { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px; border: 0; border-radius: 8px; background: #fff; color: var(--ink); text-align: left; cursor: pointer; }
.rrhh-picker-option:hover, .rrhh-picker-option.on { background: var(--accent-soft); }
.rrhh-picker-option > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.rrhh-picker-option small { color: var(--muted); }
.rrhh-picker-empty { margin: 10px; }
.rrhh-config-link { margin: -3px 0 18px; }
.rrhh-config-tabs { display: flex; gap: 5px; overflow-x: auto; padding: 4px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.rrhh-config-tabs button { padding: 9px 13px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); font: inherit; font-size: 13px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.rrhh-config-tabs button:hover { background: var(--beige-soft); }
.rrhh-config-tabs button.active { background: var(--ink); color: #fff; }
.rrhh-file { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 40px; }
.rrhh-file .muted { overflow-wrap: anywhere; }
.field .rrhh-file label.btn { display: inline-flex; margin: 0; font-size: 13px; font-weight: 400; color: var(--ink); min-height: 36px; }
.rrhh-config-card { max-width: 900px; padding: 24px; border-radius: 15px; }
.rrhh-config-card h3 { margin: 6px 0 5px; font-size: 21px; }
.rrhh-config-card > p { margin: 0 0 22px; }
.rrhh-config-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.rrhh-config-grid select, .rrhh-config-grid input { width: 100%; min-height: 42px; }
.rrhh-config-grid .hint { display: block; margin-top: 5px; }
.rrhh-config-note { padding: 12px 14px; margin-top: 16px; border-radius: 9px; background: #f8f4f5; color: var(--ink-2); font-size: 13px; line-height: 1.5; }
.rrhh-config-actions { display: flex; align-items: center; gap: 12px; margin-top: 22px; padding-top: 17px; border-top: 1px solid var(--line-2); }
.rrhh-number { display: flex; align-items: center; gap: 9px; }
.rrhh-number span { color: var(--muted); font-weight: 700; }
@media (max-width: 600px) { .rrhh-config-grid, .rrhh-directory-filters { grid-template-columns: minmax(0, 1fr); } .rrhh-config-card { padding: 18px; } }
/* En tablet se usa la navegación inferior: las siete secciones no caben en la cabecera. */
@media (min-width: 701px) and (max-width: 900px) {
  :root { --bn-h: 58px; --safe-b: env(safe-area-inset-bottom, 0px); }
  .mainnav { display: none; }
  .gsearch { max-width: none; min-width: 0; }
  .layout { height: calc(100dvh - var(--header-h) - var(--bn-h) - var(--safe-b)); }
  .bottomnav { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 42; height: calc(var(--bn-h) + var(--safe-b)); padding-bottom: var(--safe-b); background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(0,0,0,.05); }
  .bottomnav > * { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; background: none; border: 0; color: var(--muted); font: inherit; font-size: 11px; font-weight: 600; cursor: pointer; }
  .bottomnav > *:hover { text-decoration: none; }
  .bottomnav .ic { width: 22px; height: 22px; }
  .bottomnav .active { color: var(--accent); }
  #sidebar { bottom: calc(var(--bn-h) + var(--safe-b)); }
  body.side-open #scrim { bottom: calc(var(--bn-h) + var(--safe-b)); }
  #toasts { bottom: calc(var(--bn-h) + var(--safe-b) + 12px); }
}
@media (max-width: 700px) {
  .parte details.ps > summary h3 { min-width: 0; flex: 1; }
  .parte details.ps > summary h3 .ps-res { flex: 0 1 auto; }
}
@media (max-width: 1100px) {
  .rrhh-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rrhh-resumen-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 850px) {
  .rrhh-back-list { display: inline-flex; position: sticky; top: 8px; z-index: 4; margin-bottom: 10px; box-shadow: var(--shadow); }
  .rrhh-start-config { align-items: stretch; flex-direction: column; }
  .rrhh-clock-grid { grid-template-columns: minmax(0,1fr); }
  .rrhh-layout { grid-template-columns: minmax(0, 1fr); }
  .rrhh-people { max-height: 230px; }
  .rrhh-doc { align-items: flex-start; flex-direction: column; }
  .rrhh-doc-actions { justify-content: flex-start; }
}
@media (max-width: 700px) {
  .grid-cards, .help-layout { grid-template-columns: minmax(0, 1fr); }
  .help-layout > *, .grid-cards > * { min-width: 0; }
  .help-nav a, .md { overflow-wrap: anywhere; }
  .rrhh-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; }
  .rrhh-nav a { justify-content: center; min-width: 0; gap: 5px; padding: 10px 5px; text-align: center; white-space: normal; font-size: 12.5px; }
}
@media (max-width: 359px) {
  .tf-cuando { grid-template-columns: minmax(0, 1fr); }
  .tf-checks { grid-column: 1; flex-wrap: wrap; }
}
@media (max-width: 520px) {
  .rrhh-own-head { align-items: flex-start; flex-direction: column; }
  .rrhh-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; }
  .rrhh-start-config form { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; }
  .rrhh-start-config input { width: 100%; min-width: 0; }
  .rrhh-start-config form .btn { justify-content: center; }
  .rrhh-nav a { gap: 5px; padding: 10px 11px; font-size: 12.5px; }
  .rrhh-nav .ic { width: 15px; height: 15px; }
  .rrhh-hero { padding: 21px; min-height: 126px; }
  .rrhh-hero-mark { display: none; }
  .rrhh-content-head { align-items: flex-start; flex-direction: column; }
  .rrhh-metric { min-height: 140px; padding: 13px; }
  .rrhh-metric-value { font-size: 27px; }
  .rrhh-metric-link { display: none; }
  .rrhh-today-stats { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .rrhh-today-stats b { font-size: 14px; }
  .rrhh-request-two { grid-template-columns: minmax(0,1fr); }
  .rrhh-manager-lock { align-items: flex-start; flex-direction: column; }
  .rrhh-unlock { padding: 20px; }
  .rrhh-kpis { gap: 8px; }
  .rrhh-kpis .tile { min-height: 94px; padding: 12px; }
  .rrhh-kpis .tile .v { font-size: 24px; }
  .rrhh-doc-filtros { grid-template-columns: minmax(0, 1fr); }
  .rrhh-detail-head { flex-direction: column; }
  .rrhh-head-tags { justify-content: flex-start; }
}

/* revisión 2026-10-04 */
body.no-planifica .pl-add, body.no-planifica .pt-add, body.no-planifica .mes-add { display: none !important; }
.mt-guardias h3 { margin-bottom: 8px; }
.p-fotos-acc { display: flex; flex-wrap: wrap; gap: 8px; }
.pl-sin { background: var(--beige-soft); border: 1px dashed var(--beige); border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; }
.pl-sin header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.pl-sin-lista { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.pl-sin-lista .tk { flex: 0 0 200px; }
.mt-guardias.hoy { border-left: 4px solid var(--bad); }
input[readonly], textarea[readonly] { background: var(--line-2); color: var(--muted); }
@media (max-width: 700px) { #btnUser { margin-left: auto; } }
.seg button:disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 700px) {
  /* los avisos no tapan el formulario abierto ni la barra de guardar del parte o de la ficha */
  body:has(#modal:not(.hidden)) #toasts, body:has(.modal-confirm) #toasts { top: calc(var(--header-h) + 8px); bottom: auto; }
  body:has(.parte-bar) #toasts, body.wide #toasts { bottom: calc(var(--bn-h) + var(--safe-b) + 72px); }
  body:not(.side-open) #sidebar { box-shadow: none; }
  #btnUser { min-width: 40px; min-height: 40px; }
  .mat-row .iconbtn, .p-foto button { width: 40px; height: 40px; }
}
@media (max-width: 700px) { .modal.modal-confirm { align-items: center; padding: 16px; } .modal-box.confirm { border-radius: 16px; animation: pop .18s cubic-bezier(.2,.9,.3,1.1); } }
