/* Exact visual grammar of LXC151, with new native calendar components. */
.dcell.pending{background:var(--warn-soft)!important;color:var(--warn-ink)!important}

/* Long holiday labels wrap inside the agenda without widening mobile pages. */
.agenda-day .ad-h .badge.wrap{max-width:100%;overflow-wrap:anywhere}

/* LXC151-native annual month-by-employee quadrants (no original iframe). */
.hy-quadrants-intro { margin: 0 0 12px; }
.hy-quadrants-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,650px),1fr));gap:14px;align-items:start; }
.hy-q-month { min-width:0; }
.hy-q-month .mm-h { gap:12px; }
.hy-q-month .mm-h>div:first-child { display:flex; align-items:baseline; gap:10px; flex-wrap:wrap; }
.hy-q-scroll { overflow-x:auto; overflow-y:visible; scrollbar-width:thin; border:1px solid var(--line); border-radius:8px; }
.hy-q-row { display:grid;grid-template-columns:124px repeat(var(--hy-days),minmax(14px,1fr));min-width:625px;align-items:center;border-bottom:1px solid var(--line);min-height:23px;gap:0; }
.hy-q-row:last-child {border-bottom:0}
.hy-q-dates {background:var(--surface-2);min-height:26px;position:sticky;top:0;z-index:1}
.hy-q-name {display:flex;align-items:center;gap:6px;min-width:0;overflow:hidden;white-space:nowrap;position:sticky;left:0;background:var(--surface);padding:2px 7px;font-size:11px;font-weight:600;height:100%;border-right:1px solid var(--line);z-index:2}
.hy-q-name span:not(.subtle){overflow:hidden;text-overflow:ellipsis}
.hy-q-dates .hy-q-name {background:var(--surface-2);font-weight:500}
.hy-q-head {text-align:center;font-size:10px;color:var(--ink-2);font-variant-numeric:tabular-nums}
.hy-q-weekend {background:var(--surface-2)}
.hy-q-today {background:var(--info-soft);outline:1px solid var(--info-ink)}
.hy-q-cell {display:flex;align-items:center;justify-content:center;font-size:9px;font-weight:700;min-width:0;min-height:18px;border-radius:3px;margin:1px;white-space:nowrap}
.hy-q-cell.hy-q-shift {background:var(--emp-color);outline:1px solid color-mix(in srgb,var(--emp-color) 40%,transparent)}
.hy-q-cell.hy-q-closed {background:var(--closed)}
.hy-q-month .btn {flex-shrink:0}
.hy-q-month .subtle {font-size:11px}
.hy-week-desktop {max-height:none}
.hy-week-table th.rowh {min-width:135px;font-size:12px}
.hy-week-table thead th {min-width:110px}
.hy-week-table tbody td {min-width:110px;min-height:50px;padding:3px 5px}
.hy-week-date {display:flex;align-items:center;justify-content:center;gap:6px;background:none;border:0;color:inherit;width:100%;cursor:pointer}
.hy-week-shift {display:flex;flex-direction:column;gap:3px;border-left:3px solid var(--employee-accent);padding:3px 5px;text-align:left;background:var(--surface-2);border-radius:4px;min-height:42px}
.hy-week-shift b {font-size:11px}
.hy-week-shift .num {font-size:11px;font-variant-numeric:tabular-nums}
.hy-week-shift small {color:var(--ink-2)}
.hy-week-empty {background:var(--surface)}
.hy-week-table td[data-hy-day] {cursor:pointer}
.hy-week-table td[data-hy-day]:hover {background:var(--surface-3)}
.hy-week-mobile {display:none}
@media(max-width:760px){
 .hy-quadrants-grid {grid-template-columns:minmax(0,1fr)}
 .hy-q-scroll {max-width:100%}
 .hy-week-desktop {display:none}
 .hy-week-mobile {display:grid;gap:10px}
 .hy-week-mobile .card+.card {margin:0}
 .hy-week-mobile .card-h {flex-wrap:wrap}
 .hy-week-mobile .agenda-item {flex-wrap:wrap}
}
@media print {
 @page { size:A4 landscape; margin:5mm }
 .hy-print-month,.hy-print-week {width:100%;max-width:100%;overflow:visible;break-inside:avoid;page-break-inside:avoid}
 .hy-print-month .section-title,.hy-print-week .section-title {padding:0 0 4mm}
 .hy-print-month .legend,.hy-print-week .legend {font-size:6pt;margin:0 0 3mm}
 .hy-print-month .matrix-wrap,.hy-print-week .matrix-wrap {overflow:visible;max-height:none;border:1px solid #ccc}
 .hy-print-month table.matrix {font-size:5pt!important;width:100%;table-layout:fixed}
 .hy-print-month table.matrix thead th,.hy-print-month table.matrix td.cell {min-width:0!important;height:auto!important;padding:1px!important}
 .hy-print-month table.matrix th.rowh {min-width:23mm!important;width:23mm!important;padding:1px!important;font-size:5pt}
 .hy-print-month table.matrix .mcell {min-width:0!important;padding:1px 0!important}
 .hy-print-month table.matrix .hr {font-size:4pt!important;letter-spacing:-.3px}
 .hy-print-month table.matrix .subtle {font-size:4pt!important}
 .hy-print-week table.matrix {font-size:8pt!important}
 .hy-print-week table.matrix tbody td,.hy-print-week table.matrix thead th {min-width:0!important}
 .hy-print-week .hy-week-shift {font-size:7pt}
 .hy-quadrants-grid {display:block}
 .hy-q-month {break-inside:avoid;margin-bottom:5mm;box-shadow:none}
 .hy-q-scroll {overflow:visible}
}

/* Annual rows from the original staffing grid. Each number is the minimum
   simultaneous staff in the demanded period, not unique people per day. */
.hy-q-summary { min-height:26px; background:var(--surface-2); }
.hy-q-summary .hy-q-name { font-weight:700; font-size:11px; overflow:visible; background:var(--surface-2); border-left:4px solid var(--hy-q-accent); padding-left:6px; }
.hy-q-summary-reception { --hy-q-accent:#0d9a9c; }
.hy-q-summary-morning { --hy-q-accent:#d39210; }
.hy-q-summary-midday { --hy-q-accent:#8f51c2; }
.hy-q-summary-afternoon { --hy-q-accent:#4189d8; }
.hy-q-summary-night { --hy-q-accent:#6559bc; }
.hy-q-summary-alerts { --hy-q-accent:#e55b65; border-top:2px solid var(--line); }
.hy-q-stat { display:flex; align-items:center; justify-content:center; min-height:21px; border:1px solid transparent; border-right-color:var(--line); font-size:10px; font-weight:700; font-variant-numeric:tabular-nums; }
.hy-q-stat.is-void { background:var(--surface-2); color:var(--ink-2); }
.hy-q-stat.is-neutral {background:transparent;color:var(--ink);border-color:transparent;border-right-color:var(--line)}
.hy-q-stat.is-zero {background:transparent;color:var(--good-ink);border-color:transparent;border-right-color:var(--line)}
.hy-q-check {font-size:16px;font-weight:800;line-height:1;color:var(--good-ink)}
.hy-q-stat.is-ok { background:color-mix(in srgb, var(--good) 19%,var(--surface)); color:var(--good-ink); }
.hy-q-stat.is-deficit { background:color-mix(in srgb, var(--crit) 21%,var(--surface)); color:var(--crit-ink); border-color:color-mix(in srgb,var(--crit) 35%,transparent); }
.hy-q-stat.is-deficit::after { content:'!'; font-size:7px; align-self:flex-start; line-height:1; }
.hy-q-stat.is-today { outline:2px solid var(--good-ink); outline-offset:-2px; }
.hy-q-tailcell { background:color-mix(in srgb,var(--info) 15%,var(--surface)); color:var(--info-ink); font-size:14px; }
.hy-q-tailflag { font-size:8px; position:absolute; right:0; bottom:-2px; }
.hy-q-shift { position:relative; }
/* Month matrix: shift type color is stable and never pulled from person.color. */
.hy-shift-kind { display:inline-flex; justify-content:center; align-items:center; width:21px; min-width:21px; height:22px; border-radius:4px; border:1px solid var(--hy-kind-border); background:var(--hy-kind-bg); color:var(--hy-kind-ink); font-size:12px; font-weight:800; line-height:1; }
.hy-kind-M {--hy-kind-bg:#d8e9ff;--hy-kind-border:#83b3f5;--hy-kind-ink:#1a4f9a}
.hy-kind-T {--hy-kind-bg:#ffead0;--hy-kind-border:#f3ad57;--hy-kind-ink:#995208}
.hy-kind-I {--hy-kind-bg:#d3f3e9;--hy-kind-border:#5bbba3;--hy-kind-ink:#086e60}
.hy-kind-P {--hy-kind-bg:#f0d9fa;--hy-kind-border:#c778dd;--hy-kind-ink:#85328f}
.hy-kind-N {--hy-kind-bg:#e4e1ff;--hy-kind-border:#9083ee;--hy-kind-ink:#4432a1}
.hy-kind-C {--hy-kind-bg:#dff1d8;--hy-kind-border:#80b775;--hy-kind-ink:#356b31}
.hy-kind-X {--hy-kind-bg:#ffe0e3;--hy-kind-border:#e88592;--hy-kind-ink:#a23245}
[data-theme="dark"] .hy-shift-kind { color:var(--hy-kind-bg); background:color-mix(in srgb,var(--hy-kind-ink) 70%,#09141a); border-color:var(--hy-kind-border); }
.hy-print-month .legend .hy-shift-kind { width:18px; min-width:18px; height:18px; font-size:10px; }

/* Seven equal-time vertical day charts: faithful to original LXC127 weekly
   planner while keeping the hybrid LXC151 page shell and navigation. */
.hy-week-reference {min-width:0}
.hy-wb-intro {display:flex;justify-content:space-between;gap:8px;align-items:center;flex-wrap:wrap;margin:0 0 12px}
.hy-wb-intro>b {font-size:15px;color:var(--ink)}
.hy-wb-intro p {color:var(--ink-2);font-size:11px;flex:1 1 100%;margin:0}
.hy-wb-legend {display:flex;gap:12px;align-items:center;flex-wrap:wrap;font-size:10px;color:var(--ink-2)}
.hy-wb-legend span {display:inline-flex;gap:5px;align-items:center}
.hy-wb-legend i {display:inline-block;width:12px;height:10px;border-radius:2px;border:1px solid var(--line)}
.hy-wb-legend-open {background:color-mix(in srgb,var(--good) 22%,var(--surface))}
.hy-wb-legend-rec {background:color-mix(in srgb,#0d9a9c 28%,var(--surface))}
.hy-wb-legend-shift {background:#239c88}
.hy-wb-legend-real {background:#0b5361}
.hy-wb-days {display:grid;grid-template-columns:repeat(7,minmax(130px,1fr));gap:5px;overflow-x:auto;overflow-y:hidden;align-items:start;padding:0 0 6px;scrollbar-width:thin}
.hy-wb-day {min-width:0;border:1px solid var(--line);background:var(--surface);border-radius:10px;overflow:hidden;display:flex;flex-direction:column;box-shadow:var(--shadow-1)}
.hy-wb-day.is-today {border-color:var(--good-ink);box-shadow:0 0 0 1px var(--good-ink)}
.hy-wb-day-head {height:94px;box-sizing:border-box;display:flex;flex-direction:column;align-items:start;gap:4px;padding:10px 6px;border-bottom:1px solid var(--line);background:var(--surface)}
.hy-wb-day-head b {font-size:11px;line-height:1.22}
.hy-wb-day-head small {font-size:9px;color:var(--ink-2);line-height:1.25}
.hy-wb-opening-label {font-size:9px;font-weight:600;color:var(--good-ink);line-height:1.25;overflow-wrap:anywhere}
.hy-wb-day-graph {min-width:0;width:100%}
.hy-wb-names {display:grid;grid-template-columns:29px repeat(var(--wb-people),minmax(0,1fr));height:81px;background:var(--surface-2);border-bottom:1px solid var(--line);padding-top:4px}
.hy-wb-axis-title {align-self:end;font-size:8px;color:var(--ink-2);margin-bottom:7px;text-align:center}
.hy-wb-name {position:relative;min-width:0;overflow:hidden;border-left:1px solid var(--line);display:flex;flex-direction:column;align-items:center;gap:3px;justify-content:flex-start;padding:2px 1px}
.hy-wb-name i {width:8px;min-height:5px;border-radius:3px;display:block}
.hy-wb-name span {writing-mode:vertical-rl;transform:rotate(180deg);white-space:nowrap;max-height:67px;text-overflow:ellipsis;overflow:hidden;font-size:9px;font-weight:700;color:var(--ink)}
.hy-wb-chart {position:relative;min-width:0;display:grid;grid-template-columns:29px minmax(0,1fr);background:var(--surface)}
.hy-wb-axis {position:relative;border-right:1px solid var(--line);z-index:2}
.hy-wb-hour {position:absolute;top:0;right:2px;white-space:nowrap;font-size:8px;color:var(--ink-2);line-height:1;transform:translateY(-50%);font-variant-numeric:tabular-nums}
.hy-wb-chart-body {position:relative;min-width:0;overflow:hidden}
.hy-wb-opening {position:absolute;left:0;right:0;pointer-events:none}
.hy-wb-opening.is-commercial {background:color-mix(in srgb,var(--good) 12%,transparent)}
.hy-wb-opening.is-reception {background:color-mix(in srgb,#0d9a9c 18%,transparent)}
.hy-wb-gridline {position:absolute;left:0;right:0;border-top:1px dotted var(--line);height:0;pointer-events:none}
.hy-wb-lanes {position:absolute;inset:0;display:grid;grid-template-columns:repeat(var(--wb-people),minmax(0,1fr))}
.hy-wb-lane {position:relative;border-right:1px dotted var(--line);min-width:0}
.hy-wb-bars {position:absolute;inset:0}
.hy-wb-bar {position:absolute;left:3px;right:3px;border:0;border-radius:4px;cursor:pointer;min-height:4px;box-shadow:inset 0 0 0 1px #0001}
.hy-wb-bar:focus-visible {outline:3px solid var(--info-ink);outline-offset:2px;z-index:10}
.hy-wb-bar:hover {filter:brightness(.88);z-index:5}
.hy-wb-bar.is-tail {background-image:repeating-linear-gradient(-45deg,#ffffff85 0,#ffffff85 2px,transparent 2px,transparent 5px)!important;opacity:.78}
.hy-wb-actual {position:absolute;width:4px;left:calc(50% - 2px);background:#083f4d;outline:1px solid var(--surface);border-radius:3px;z-index:3;pointer-events:none}
.hy-wb-actual.is-incomplete {min-height:5px;background:repeating-linear-gradient(90deg,#0b5361 0 2px,#f5a64a 2px 4px);outline:1px dashed var(--warn)}
.hy-wb-blank {position:absolute;left:0;right:0;top:32%;display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center;padding:8px 5px;pointer-events:none}
.hy-wb-blank strong {font-size:10px;color:var(--ink-2)}
.hy-wb-blank small {font-size:9px;color:var(--ink-2)}
.hy-wb-day-foot {padding:8px 5px;min-height:33px;font-size:9px;line-height:1.3;color:var(--ink-2);border-top:1px solid var(--line);margin-top:auto}
.hy-wb-risks {margin-top:14px}
.hy-wb-tabs {display:none}
@media(max-width:900px) {
 .hy-wb-days {grid-template-columns:repeat(7,minmax(148px,1fr))}
}
@media(max-width:760px) {
 .hy-wb-days {display:block;overflow:visible;padding:0}
 .hy-wb-day {display:none}
 .hy-wb-day.is-active {display:flex;max-width:100%}
 .hy-wb-tabs {display:flex;gap:3px;overflow-x:auto;margin-bottom:10px;max-width:100%}
 .hy-wb-tabs button {flex:1;min-width:36px;padding:7px 4px;border:1px solid var(--line);background:var(--surface);border-radius:5px;color:var(--ink-2);font-size:11px}
 .hy-wb-tabs button.on {background:var(--good);color:#fff;border-color:var(--good)}
 .hy-wb-person {max-width:100%}
 .hy-wb-day-head {height:auto;min-height:78px}
 .hy-wb-names {height:84px}
 .hy-wb-name span {max-height:72px}
}
@media print {
 @page {size:A4 landscape; margin:5mm}
 .hy-week-reference {zoom:.79;break-inside:avoid;page-break-inside:avoid}
 .hy-wb-day {box-shadow:none}
 .hy-wb-days {grid-template-columns:repeat(7,minmax(0,1fr));overflow:visible;gap:2px}
 .hy-wb-day-head {height:62px;padding:4px 3px}
 .hy-wb-names {height:65px}
 .hy-wb-name span {max-height:52px;font-size:6pt}
 .hy-wb-day-head b {font-size:7pt}
 .hy-wb-day-head small,.hy-wb-opening-label,.hy-wb-day-foot {font-size:5pt}
 .hy-wb-hour {font-size:4.5pt}
 .hy-wb-intro p,.hy-wb-risks {display:none!important}
 .hy-wb-tabs {display:none!important}
 .hy-wb-day {display:flex!important}
}

/* Native, 151-style natural-language instruction editor. */
.hy-txt-layout {align-items:start;}
.hy-txt-input {width:100%;min-height:145px;resize:vertical;font-family:inherit;line-height:1.6;}
.hy-txt-examples {display:grid;gap:8px;}
.hy-txt-examples .btn {height:auto;white-space:normal;text-align:left;line-height:1.45;justify-content:flex-start;padding:10px 11px;}
.hy-txt-kpis {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;}
.hy-txt-kpis>div {background:var(--surface-2);border:1px solid var(--line);border-radius:8px;padding:10px;display:flex;flex-direction:column;gap:6px}
.hy-txt-kpis b {font-size:1.25rem;font-variant-numeric:tabular-nums}
.hy-txt-kpis span {font-size:11px;color:var(--ink-2)}
#txtPreview .table-wrap {max-height:420px;overflow:auto}
#txtInput:focus-visible {outline:2px solid var(--good-ink);outline-offset:2px}
.hy-profile-overview {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px;align-items:start}
.hy-profile-weekdays {display:flex;flex-wrap:wrap;gap:6px;margin:6px 0 4px}
.hy-profile-weekdays .chip {gap:5px;align-items:center}
.hy-availability-table {display:grid;gap:6px;margin-top:6px}
.hy-availability-row {display:grid;grid-template-columns:minmax(105px,.8fr) minmax(90px,1fr) minmax(90px,1fr);gap:10px;align-items:center;padding:4px 0;border-bottom:1px solid var(--line)}
.hy-availability-row b {font-size:12px}
.hy-profile-overview .card-h {flex-wrap:wrap}
@media(max-width:760px){.hy-txt-layout,.hy-profile-overview {grid-template-columns:1fr}.hy-txt-kpis {grid-template-columns:repeat(2,minmax(0,1fr))}.hy-availability-row{gap:4px}}

/* Dedicated weekly PDF sheet: the seven day cards + the legend only. */
#hy-week-print-sheet {display:none}
@media print {
 html.hy-week-printing,html.hy-week-printing body {margin:0!important;padding:0!important;overflow:visible!important}
 html.hy-week-printing body > *:not(#hy-week-print-sheet) {display:none!important}
 html.hy-week-printing #hy-week-print-sheet {display:block!important;width:420mm!important;max-width:none!important;margin:0!important;padding:0!important;
   background:var(--bg);color:var(--ink);zoom:.64!important;break-inside:avoid;page-break-inside:avoid}
 html.hy-week-printing #hy-week-print-sheet,
 html.hy-week-printing #hy-week-print-sheet * {
   -webkit-print-color-adjust:exact!important;print-color-adjust:exact!important}
 html.hy-week-printing #hy-week-print-sheet .hy-wb-legend {display:flex!important;flex-wrap:wrap;gap:14px;padding:0 0 10px;font-size:11px}
 html.hy-week-printing #hy-week-print-sheet .hy-wb-days {
   display:grid!important;grid-template-columns:repeat(7,minmax(0,1fr))!important;
   overflow:visible!important;gap:6px!important;width:100%;padding:0!important}
 html.hy-week-printing #hy-week-print-sheet .hy-wb-day {display:flex!important;min-width:0!important;border-radius:10px;box-shadow:none!important;
   break-inside:avoid!important;page-break-inside:avoid!important}
 html.hy-week-printing #hy-week-print-sheet .hy-wb-day-head {height:94px!important;padding:10px 6px!important}
 html.hy-week-printing #hy-week-print-sheet .hy-wb-day-head b {font-size:11px!important}
 html.hy-week-printing #hy-week-print-sheet .hy-wb-day-head small {font-size:9px!important}
 html.hy-week-printing #hy-week-print-sheet .hy-wb-opening-label {font-size:9px!important}
 html.hy-week-printing #hy-week-print-sheet .hy-wb-names {height:81px!important}
 html.hy-week-printing #hy-week-print-sheet .hy-wb-name span {max-height:67px!important;font-size:9px!important}
 html.hy-week-printing #hy-week-print-sheet .hy-wb-hour {font-size:8px!important}
 html.hy-week-printing #hy-week-print-sheet .hy-wb-day-foot {font-size:9px!important}
 html.hy-week-printing #hy-week-print-sheet .hy-wb-bar {border-radius:4px}
}

/* Fichajes: the actual-only timeline occupies the complete track height.
   When a plan exists, keep the two distinct lanes for plan/actual comparison. */
.attendance-day-track.only-actual .bar.actual {top:4px!important;bottom:4px!important}
.attendance-day-track.has-plan .bar.plan {top:3px!important;bottom:16px!important}
.attendance-day-track.has-plan .bar.actual {top:16px!important;bottom:3px!important}
