.attendance-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.attendance-head .muted { margin: 0; }
.worked-time {
  color: var(--blue);
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}
.attendance-status {
  display: inline-block;
  padding: .38rem .65rem;
  border-radius: 999px;
  background: #e6f1fa;
  color: var(--blue);
  font-size: .75rem;
  font-weight: 800;
}
td small { display: block; color: #8092a0; margin-top: .25rem; }
.photo-dialog-content { padding: 1.6rem; }
.crash-report-stack { max-height: 60vh; overflow: auto; padding: 1rem; border-radius: 10px; background: #101820; color: #d7e5ef; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .78rem; }
.marks-list { display: grid; gap: .7rem; margin-top: 1rem; }
.mark-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .9rem;
}
.zone-result { display: inline-block; margin-top: .45rem; padding: .3rem .55rem; border-radius: 999px; font-size: .76rem; font-weight: 800; }
.zone-result.inside { color: #246000; background: #e8f6ce; }
.zone-result.edge { color: #7a5100; background: #fff0bd; }
.zone-result.outside { color: #a11d20; background: #fde1e1; }
.zone-result.unknown { color: #596b78; background: #e9eef2; }
.photo-viewer { margin-top: 1rem; text-align: center; }
.photo-viewer img { display: block; width: min(100%, 520px); max-height: 58vh; object-fit: contain; margin: auto; border-radius: 14px; background: #10202c; }
.photo-viewer p { color: #657d90; }
.zone-form-card { padding: 1.5rem; margin-bottom: 1rem; }
.schedule-card { padding: 1.5rem; margin-bottom: 1rem; }
.planning-intro, .planning-title { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.planning-intro h2, .planning-title h2 { margin-bottom: .35rem; }
.planning-form { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 0 1rem; margin-top: 1rem; }
.planning-form .planning-users-field { grid-column: span 2; }
.planning-form .error, .planning-form .schedule-actions { grid-column: 1/-1; }
.schedule-assignment-dialog .planning-form { max-height: 92vh; overflow-y: auto; padding: 0 1.6rem; margin-top: 0; }
.planning-people-editor { grid-column: 1/-1; margin: 1rem 0; padding: 1.25rem; border: 1px solid var(--border); border-radius: 16px; background: #f7fafc; }
.planning-people-editor h3 { margin: .25rem 0; color: var(--blue); }
.group-person-row.locked { cursor: default; }
.group-person-row.locked:hover { background: inherit; }
.group-person-row.locked.selected:hover { background: #e6f2fb; }
.weekly-calendar-controls { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(180px, .45fr) auto; align-items: end; gap: 1rem; margin-top: 1rem; }
.weekly-navigation { display: flex; flex-wrap: wrap; gap: .5rem; padding-bottom: .7rem; }
.calendar-view-tabs { display: inline-flex; gap: .35rem; padding: .3rem; margin-top: 1rem; border: 1px solid var(--border); border-radius: 12px; background: #edf4f8; }
.calendar-view-tabs button { border: 0; border-radius: 9px; padding: .7rem 1rem; color: #34556d; background: transparent; font-weight: 800; cursor: pointer; }
.calendar-view-tabs button.active { color: #fff; background: var(--blue); box-shadow: 0 4px 10px rgba(0, 77, 133, .18); }
.schedule-calendar { overflow: auto; margin-top: 1rem; border: 1px solid var(--border); border-radius: 14px; max-height: 68vh; }
.weekly-calendar-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.1rem; background: #edf4f8; border-bottom: 1px solid var(--border); }
.weekly-calendar-heading strong, .weekly-calendar-heading span { display: block; }
.weekly-calendar-heading span { margin-top: .2rem; color: #657d90; }
.weekly-calendar-heading b { color: var(--blue); }
.weekly-days { display: grid; grid-template-columns: repeat(7, minmax(120px, 1fr)); min-width: 840px; }
.weekly-day { min-height: 150px; padding: .9rem; border-right: 1px solid var(--border); background: #fff; }
.weekly-day:last-child { border-right: 0; }
.weekly-day header { display: flex; justify-content: space-between; align-items: center; padding-bottom: .65rem; margin-bottom: .7rem; border-bottom: 1px solid var(--border); color: #657d90; }
.weekly-day header strong { color: var(--blue); font-size: 1.05rem; }
.weekly-day .weekly-hours { display: block; color: #074c80; font-size: 1rem; font-weight: 800; line-height: 1.35; }
.weekly-day small { display: block; margin-top: .55rem; color: #657d90; line-height: 1.3; }
.weekly-day.work { background: #e8f3fb; }
.weekly-day.rest { background: #f6f7f8; }
.weekly-day.rest .weekly-hours { color: #82909a; }
.weekly-day.today { box-shadow: inset 0 4px 0 #70c900; }
.weekly-team-table { width: 100%; min-width: 940px; border-collapse: separate; border-spacing: 0; }
.weekly-team-table th, .weekly-team-table td { padding: .75rem .65rem; text-align: center; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.weekly-team-table thead th { position: sticky; top: 0; z-index: 2; color: var(--blue); background: #edf4f8; }
.weekly-team-table .calendar-worker { position: sticky; left: 0; z-index: 1; min-width: 215px; text-align: left; background: #fff; }
.weekly-team-table thead .calendar-worker { z-index: 3; background: #edf4f8; }
.weekly-team-table .calendar-worker strong, .weekly-team-table .calendar-worker small, .weekly-team-table td span, .weekly-team-table td small { display: block; }
.weekly-team-table td span { color: #074c80; font-weight: 800; }
.weekly-team-table td small { margin-top: .35rem; color: #657d90; }
.weekly-team-table td.work { background: #e8f3fb; }
.weekly-team-table td.rest { color: #82909a; background: #f6f7f8; }
.weekly-team-table td.today { box-shadow: inset 0 4px 0 #70c900; }
.monthly-calendar-heading { padding: 1rem 1.1rem; color: var(--blue); background: #edf4f8; border-bottom: 1px solid var(--border); }
.monthly-calendar-heading strong, .monthly-calendar-heading span { display: block; }
.monthly-calendar-heading span { margin-top: .2rem; color: #657d90; }
.monthly-weekdays, .monthly-week { display: grid; grid-template-columns: repeat(7, minmax(120px, 1fr)); min-width: 840px; }
.monthly-weekdays div { padding: .65rem; text-align: center; color: #49687e; background: #f6f9fb; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); font-weight: 800; }
.monthly-day { min-height: 118px; padding: .7rem; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.monthly-day header { display: flex; justify-content: space-between; color: #657d90; }
.monthly-day .monthly-hours { display: block; margin-top: .8rem; color: #074c80; font-weight: 800; }
.monthly-day small { display: block; margin-top: .35rem; color: #657d90; }
.monthly-day.work { background: #e8f3fb; }
.monthly-day.rest, .monthly-day.outside { background: #f6f7f8; }
.monthly-day.outside { opacity: .45; }
.monthly-day.today { box-shadow: inset 0 4px 0 #70c900; }
.wide-dialog { width: min(1180px, calc(100vw - 2rem)); max-width: 1180px; }
.shift-days-table { overflow-x: auto; margin-top: .8rem; }
.shift-days-table table { min-width: 1010px; }
.shift-days-table input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--blue); }
.shift-days-table input[type="time"] { min-width: 112px; }
.shift-days-table input[type="number"] { min-width: 86px; }
.shift-days-table select { min-width: 145px; }
.schedule-options { display: grid; grid-template-columns: repeat(2, minmax(220px, 1fr)); gap: 0 1rem; margin-top: 1rem; }
.schedule-card input[type="time"], .schedule-card input[type="number"] { width: 100%; }
.schedule-card input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--blue); }
.schedule-check { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 1.65rem; }
.schedule-actions { display: flex; justify-content: flex-end; margin-top: 1rem; }
.history-filters-card { padding: 1.5rem; margin-bottom: 1rem; }
.history-filters { display: grid; grid-template-columns: repeat(3, minmax(170px, 1fr)); gap: 0 1rem; align-items: end; }
.history-actions { display: flex; gap: .7rem; margin-bottom: 1rem; }
.history-actions button { flex: 1; }
.excel-button { border: 0; border-radius: 10px; padding: .78rem 1.1rem; font-weight: 800; cursor: pointer; color: #fff; background: #1f7a3f; }
.excel-button:hover { filter: brightness(1.08); }
.excel-button:disabled { opacity: .65; cursor: wait; }
.history-summary { display: flex; justify-content: space-between; align-items: center; margin: 0 0 .8rem; padding: .8rem 1rem; border-radius: 12px; background: #e9f1f7; color: #31516b; }
.history-summary strong { color: var(--blue); font-variant-numeric: tabular-nums; }
.zone-form { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 1rem; }
.zone-actions { grid-column: 1/-1; display: flex; justify-content: flex-end; gap: .7rem; }
.zone-form .error { grid-column: 1/-1; }
.zone-map-wrap { grid-column: 1/-1; margin: .25rem 0 1rem; }
#zoneMap { width: 100%; height: 430px; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: #e8eef2; }
/* Respaldo local de las reglas estructurales de Leaflet. Evita mosaicos separados si el CDN no entrega su CSS. */
#zoneMap.leaflet-container { position: relative; overflow: hidden; outline: 0; }
#zoneMap .leaflet-map-pane,
#zoneMap .leaflet-pane,
#zoneMap .leaflet-tile,
#zoneMap .leaflet-marker-icon,
#zoneMap .leaflet-marker-shadow,
#zoneMap .leaflet-tile-container,
#zoneMap .leaflet-pane > svg,
#zoneMap .leaflet-pane > canvas { position: absolute; left: 0; top: 0; }
#zoneMap .leaflet-map-pane { z-index: 400; }
#zoneMap .leaflet-tile-pane { z-index: 200; }
#zoneMap .leaflet-overlay-pane { z-index: 400; }
#zoneMap .leaflet-shadow-pane { z-index: 500; }
#zoneMap .leaflet-marker-pane { z-index: 600; }
#zoneMap .leaflet-tooltip-pane { z-index: 650; }
#zoneMap .leaflet-popup-pane { z-index: 700; }
#zoneMap .leaflet-tile { width: 256px !important; height: 256px !important; max-width: none !important; max-height: none !important; padding: 0 !important; border: 0 !important; }
#zoneMap .leaflet-tile-loaded { visibility: inherit; }
#zoneMap .leaflet-zoom-animated { transform-origin: 0 0; }
#zoneMap .leaflet-control-container { position: relative; z-index: 800; }
#zoneMap .leaflet-top, #zoneMap .leaflet-bottom { position: absolute; z-index: 1000; pointer-events: none; }
#zoneMap .leaflet-top { top: 0; } #zoneMap .leaflet-right { right: 0; } #zoneMap .leaflet-bottom { bottom: 0; } #zoneMap .leaflet-left { left: 0; }
#zoneMap .leaflet-control { position: relative; z-index: 800; pointer-events: auto; margin: 10px; }
#zoneMap .leaflet-control-zoom a { display: block; width: 30px; height: 30px; line-height: 30px; text-align: center; background: white; color: #17324d; text-decoration: none; border-bottom: 1px solid #ccd8e0; font-size: 20px; }
#zoneMap .leaflet-control-zoom { border-radius: 6px; overflow: hidden; box-shadow: 0 1px 5px #0005; }
#zoneMap .leaflet-control-attribution { margin: 0; padding: 2px 6px; background: #fffc; color: #31516b; font-size: 10px; }
#zoneMap .leaflet-control-attribution a { color: #064f93; }
#zoneMap .geolyman-map-pin { position: absolute; }
#zoneMap .geolyman-map-pin span { display: block; width: 28px; height: 28px; border: 4px solid white; border-radius: 50% 50% 50% 4px; background: #064f93; box-shadow: 0 3px 10px #001c3370; transform: rotate(-45deg); }
#zoneMap .geolyman-map-pin span::after { content: ""; display: block; width: 8px; height: 8px; margin: 6px; border-radius: 50%; background: #80bc00; }
#trackingMap { width: 100%; height: 430px; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: #e8eef2; }
#trackingMap.leaflet-container { position: relative; overflow: hidden; outline: 0; }
#trackingMap .leaflet-map-pane, #trackingMap .leaflet-pane, #trackingMap .leaflet-tile, #trackingMap .leaflet-marker-icon, #trackingMap .leaflet-marker-shadow, #trackingMap .leaflet-tile-container, #trackingMap .leaflet-pane > svg, #trackingMap .leaflet-pane > canvas { position: absolute; left: 0; top: 0; }
#trackingMap .leaflet-map-pane { z-index: 400; }
#trackingMap .leaflet-tile-pane { z-index: 200; }
#trackingMap .leaflet-overlay-pane { z-index: 400; }
#trackingMap .leaflet-shadow-pane { z-index: 500; }
#trackingMap .leaflet-marker-pane { z-index: 600; }
#trackingMap .leaflet-tooltip-pane { z-index: 650; }
#trackingMap .leaflet-popup-pane { z-index: 700; }
#trackingMap .leaflet-tile { width: 256px !important; height: 256px !important; max-width: none !important; max-height: none !important; padding: 0 !important; border: 0 !important; }
#trackingMap .leaflet-tile-loaded { visibility: inherit; }
#trackingMap .leaflet-zoom-animated { transform-origin: 0 0; }
#trackingMap .leaflet-control-container { position: relative; z-index: 800; }
#trackingMap .leaflet-top, #trackingMap .leaflet-bottom { position: absolute; z-index: 1000; pointer-events: none; }
#trackingMap .leaflet-top { top: 0; } #trackingMap .leaflet-right { right: 0; } #trackingMap .leaflet-bottom { bottom: 0; } #trackingMap .leaflet-left { left: 0; }
#trackingMap .leaflet-control { position: relative; z-index: 800; pointer-events: auto; margin: 10px; }
#trackingMap .leaflet-control-zoom a { display: block; width: 30px; height: 30px; line-height: 30px; text-align: center; background: white; color: #17324d; text-decoration: none; border-bottom: 1px solid #ccd8e0; font-size: 20px; }
#trackingMap .leaflet-control-zoom { border-radius: 6px; overflow: hidden; box-shadow: 0 1px 5px #0005; }
#trackingMap .leaflet-control-attribution { margin: 0; padding: 2px 6px; background: #fffc; color: #31516b; font-size: 10px; }
#trackingMap .leaflet-control-attribution a { color: #064f93; }
.tracking-tools { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: .6rem; }
.tracking-tools label { color: var(--muted); font-size: .82rem; }
.tracking-tools select { min-width: 190px; }
.tracking-tools input[type="date"] { min-width: 145px; }
.tracking-live-status { margin: .65rem 0 0; color: var(--muted); font-size: .82rem; }
.tracking-live-status::first-letter { color: var(--green); }
.tracking-worker-icon { background: transparent; border: 0; }
.tracking-worker-icon, .tracking-worker-icon span { cursor: pointer; }
.tracking-worker-icon span { display: grid; place-items: center; width: 42px; height: 42px; border: 3px solid white; border-radius: 50%; color: white; font-weight: 800; font-size: .82rem; box-shadow: 0 2px 8px #001c3370; }
.tracking-popup .leaflet-popup-content-wrapper, .tracking-popup .leaflet-popup-tip { background: #111827; color: #f8fafc; box-shadow: 0 8px 24px #0008; }
.tracking-popup .leaflet-popup-content { margin: 14px 34px 14px 16px; min-width: 180px; }
.tracking-popup .leaflet-popup-close-button { color: #f8fafc !important; font-size: 20px; font-weight: 700; }
.tracking-popup-content { display: grid; gap: 5px; }
.tracking-popup-content strong { font-size: .92rem; }
.tracking-popup-content span, .tracking-popup-content small { color: #cbd5e1; }
#selectedLocation { margin: .55rem 0 0; }
.zone-map-hint { font-weight: 700; color: var(--blue); }
.correction-toolbar { justify-content: flex-start; margin-bottom: 12px; }
.corrections-list { margin-top: 18px; border-top: 1px solid #d8e3eb; padding-top: 14px; }
.corrections-list h3 { margin: 0 0 10px; color: #0b4f86; }
.correction-entry { background: #f3f7fa; border: 1px solid #d8e3eb; border-radius: 12px; padding: 12px; margin-bottom: 8px; }
.correction-entry small { display: block; color: #60758a; margin-top: 3px; }
.correction-entry p { margin: 7px 0 0; }
#correctionReason { min-height: 100px; resize: vertical; }
.score-settings-card, .score-manual-card { padding: 1.5rem; margin: 1rem 0; }
.score-month-card { margin: 1rem 0; padding: 1rem 1.4rem; }
.score-month-card .history-filters { grid-template-columns: minmax(220px, 360px) auto; align-items: end; }
.score-month-card label { margin: 0; }
.score-month-card .history-actions { justify-content: flex-start; }
.score-workspace-tabs { display: flex; gap: .45rem; padding: .4rem; margin: 1rem 0; overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; background: #eaf2f7; }
.score-workspace-tabs button { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-width: max-content; border: 0; border-radius: 10px; padding: .75rem 1rem; color: #36566e; background: transparent; font-weight: 800; cursor: pointer; }
.score-workspace-tabs button:hover { background: #fff9; }
.score-workspace-tabs button.active { color: #fff; background: linear-gradient(135deg, var(--blue), var(--blue2)); box-shadow: 0 5px 12px rgba(0, 79, 147, .2); }
.score-tab-badge { min-width: 22px; padding: .15rem .38rem; border-radius: 999px; color: #7a5100; background: #fff0bd; font-size: .7rem; }
.score-workspace-tabs button.active .score-tab-badge { color: #7a3500; background: #ffe4a3; }
.score-panel { display: grid; gap: 1rem; }
.score-panel > .table-card { margin-top: 0; }
.score-guide-card { padding: 1.35rem 1.5rem; }
.score-guide-card h2 { margin: .35rem 0; }
.score-guide-card .muted { margin-bottom: 0; }
.score-overview-stats { grid-template-columns: repeat(5, minmax(170px, 1fr)); margin: 0; }
.score-overview-stats .stat { position: relative; overflow: hidden; }
.score-overview-stats .stat::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--blue2); }
.score-overview-stats .score-stat-warning::before { background: #e3a126; }
.score-overview-stats .score-stat-danger::before { background: var(--danger); }
.score-overview-stats .score-stat-merit::before { background: #7357b8; }
.score-overview-stats .score-stat-success::before { background: var(--green); }
.score-overview-stats small { display: block; margin-top: .35rem; color: #71889a; }
.score-settings-grid { display: grid; grid-template-columns: repeat(4, minmax(170px, 1fr)); gap: 0 1rem; align-items: end; }
.score-settings-grid .history-actions { grid-column: 1/-1; }
.score-apply-action { border-color: #9ec7e3; color: var(--blue); background: #edf7fd; font-weight: 800; }
.score-empty-state { display: grid; justify-items: center; gap: .3rem; padding: 1.5rem; color: #537084; }
.score-empty-state strong { color: #568500; font-size: 1rem; }
.score-workers-card { padding: 0 .7rem .7rem; border: 0; background: transparent; overflow: auto; }
.score-workers-table { border-collapse: separate; border-spacing: 0 .7rem; }
.score-workers-table thead th { border-bottom: 0; background: transparent; }
.score-workers-table tbody td { border-top: 1px solid #dbe6ed; border-bottom: 1px solid #dbe6ed; background: #fff; box-shadow: 0 8px 18px -16px rgba(6, 55, 91, .75); }
.score-workers-table tbody td:first-child { border-left: 1px solid #dbe6ed; border-radius: 14px 0 0 14px; }
.score-workers-table tbody td:last-child { border-right: 1px solid #dbe6ed; border-radius: 0 14px 14px 0; }
.score-workers-table tbody tr:hover td { border-color: #a8cce3; background: #fafdff; }
.score-manual-card textarea { min-height: 86px; resize: vertical; border: 1px solid #cbd8e1; border-radius: 10px; padding: .78rem .9rem; font: inherit; color: #17324d; }
.score-manual-card .wide-field { grid-column: 1/-1; }
.score-manual-card .checkbox { flex-direction: row; align-items: center; gap: .6rem; }
.score-manual-card .checkbox input { width: 20px; height: 20px; accent-color: var(--blue); }
.score-decision-context { display: grid; gap: .35rem; margin: 1rem 0; padding: 1rem; border: 1px solid #d6e2ea; border-left: 5px solid var(--blue); border-radius: 12px; background: #f5f9fc; }
.score-decision-context span { color: #536d81; }
.score-decision-context b { color: var(--blue); }
#scoreDecisionDescription { min-height: 95px; resize: vertical; border: 1px solid #cbd8e1; border-radius: 10px; padding: .78rem .9rem; font: inherit; color: #17324d; }
.score-history-status { display: inline-block; max-width: 220px; padding: .38rem .62rem; border-radius: 999px; font-size: .74rem; font-weight: 800; line-height: 1.25; }
.score-status-applied { color: #246000; background: #e8f6ce; }
.score-status-pending { color: #7a5100; background: #fff0bd; }
.score-status-no-impact { color: #0b5e75; background: #dff3f8; }
.score-status-automatic { color: #4d5f6d; background: #e9eef2; }
.score-status-cancelled { color: #a11d20; background: #fde1e1; }
.score-status-neutral { color: #596b78; background: #eef2f5; }
.score-points-not-applied { color: #7b8994; text-decoration: line-through; }
.late-note { display: block; margin-top: 5px; color: #a25f00; font-weight: 700; }
.bonus-card { padding: 1.5rem; margin: 1rem 0; }
.bonus-summary { display: grid; grid-template-columns: repeat(2, minmax(240px, 1fr)); gap: 1rem; margin: 1rem 0; }
.bonus-summary article { padding: 1.15rem 1.3rem; border: 1px solid var(--border); border-radius: 16px; background: #fff; }
.bonus-summary span, .bonus-summary strong, .bonus-summary small { display: block; }
.bonus-summary span { color: #536d81; font-weight: 700; }
.bonus-summary strong { margin: .35rem 0; color: var(--blue); font-size: 1.65rem; }
.bonus-summary small { color: #71889a; }
.bonus-amounts { display: grid; gap: .3rem; min-width: 205px; }
.bonus-amounts > span { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; color: #647b8e; font-size: .77rem; font-weight: 700; }
.bonus-amounts > span strong { color: var(--blue); font-size: .96rem; }
.bonus-amounts .bonus-payable { padding: .35rem .5rem; border-radius: 8px; background: #edf5fa; }
.bonus-settings-grid, .group-form { display: grid; grid-template-columns: repeat(3, minmax(180px, 1fr)); gap: 0 1rem; align-items: end; }
.bonus-settings-grid .history-actions, .bonus-settings-grid .error, .group-form .schedule-actions, .group-form .error { grid-column: 1/-1; }
.group-dialog { width: min(1240px, calc(100vw - 2rem)); max-width: 1240px; max-height: 92vh; overflow: hidden; }
.group-dialog .group-form { max-height: 92vh; overflow-y: auto; padding: 0 1.6rem; }
.group-dialog-head { grid-column: 1/-1; position: sticky; top: 0; z-index: 5; margin: 0 -1.6rem .5rem; padding: 1.4rem 1.6rem 1rem; border-bottom: 1px solid var(--border); background: #fff; }
.group-dialog-head .muted { margin: .35rem 0 0; }
.group-dialog-actions { grid-column: 1/-1; position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: flex-end; gap: .7rem; margin: .25rem -1.6rem 0; padding: 1rem 1.6rem 1.35rem; border-top: 1px solid var(--border); background: #fff; }
.group-team-editor { grid-column: 1/-1; margin: 1rem 0; padding: 1.25rem; border: 1px solid var(--border); border-radius: 16px; background: #f7fafc; }
.group-team-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.group-team-heading h3, .group-supervisor-editor h3 { margin: .25rem 0; color: var(--blue); }
.group-member-count { flex: 0 0 auto; padding: .55rem .8rem; border-radius: 999px; color: #245d00; background: #e8f6ce; }
.group-people-toolbar { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1rem; margin-top: .8rem; }
.group-filter-row { display: flex; flex-wrap: wrap; gap: .5rem; margin: .5rem 0 .85rem; }
.group-filter-row button { padding: .55rem .8rem; }
.group-filter-row button.active { color: #fff; background: var(--blue); }
.group-members-checklist { display: grid; gap: .45rem; max-height: 360px; overflow: auto; padding: .35rem; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.group-person-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .8rem; margin: 0; padding: .75rem .85rem; border: 1px solid transparent; border-radius: 10px; cursor: pointer; }
.group-person-row:hover { background: #f0f6fa; }
.group-person-row.selected { border-color: #9bc6e5; background: #e6f2fb; }
.group-person-row input { width: 21px; height: 21px; margin: 0; accent-color: var(--blue); }
.group-person-row span strong, .group-person-row span small { display: block; }
.group-person-row span small { margin-top: .2rem; color: #657d90; }
.group-person-row > b { color: #597080; font-size: .75rem; }
.group-person-row.selected > b { color: var(--blue); }
.group-supervisor-editor { display: grid; grid-template-columns: minmax(250px, 1fr) minmax(310px, 1fr); gap: .8rem 1rem; align-items: end; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.group-supervisor-editor h3 small { font-weight: 500; color: #657d90; }
.group-supervisor-picker { display: grid; grid-template-columns: 1fr auto; gap: .55rem; }
.group-supervisor-chips { grid-column: 1/-1; display: flex; flex-wrap: wrap; gap: .5rem; min-height: 32px; align-items: center; }
.group-supervisor-chip { display: inline-flex; align-items: center; gap: .5rem; padding: .45rem .55rem .45rem .75rem; border-radius: 999px; color: #074c80; background: #dceefa; font-weight: 800; }
.group-supervisor-chip button { width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; color: #fff; background: var(--blue); cursor: pointer; font-size: 1rem; line-height: 1; }

/* Arquitectura UML */
.architecture-hero { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; overflow: hidden; margin-bottom: 1.2rem; padding: clamp(1.3rem, 3vw, 2.2rem); border: 1px solid #cfe1ef; border-radius: 22px; background: radial-gradient(circle at 88% 10%, #c7eafa 0, transparent 34%), linear-gradient(120deg, #f5fbff, #e9f4fb); }
.architecture-hero-copy { position: relative; z-index: 1; max-width: 780px; }
.architecture-hero-copy h2 { margin: .25rem 0 .55rem; color: #123d61; font-size: clamp(1.45rem, 2.6vw, 2.15rem); letter-spacing: -.035em; }
.architecture-hero-copy p { max-width: 720px; margin: 0; color: #526d83; line-height: 1.65; }
.architecture-hero-mark { display: grid; flex: 0 0 94px; width: 94px; height: 94px; place-items: center; border: 1px solid #fff; border-radius: 28px; color: #fff; background: linear-gradient(145deg, #1189d2, #064b89); box-shadow: 0 18px 36px #0a5f9b33; font-size: 2.1rem; font-weight: 900; transform: rotate(3deg); }
.architecture-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin: 0 0 1.25rem; }
.architecture-stats > article { display: flex; align-items: center; gap: .8rem; min-height: 82px; padding: .9rem 1rem; border: 1px solid var(--border); border-radius: 15px; background: #fff; }
.architecture-stat-icon { display: grid; flex: 0 0 42px; width: 42px; height: 42px; place-items: center; border-radius: 13px; color: #075b99; background: #e6f4fc; font-size: 1.05rem; font-weight: 900; }
.architecture-stats strong, .architecture-stats small { display: block; }
.architecture-stats strong { color: #173e5e; font-size: .94rem; }
.architecture-stats small { margin-top: .22rem; color: #71879a; font-size: .78rem; }
.architecture-card { overflow: hidden; padding: clamp(1rem, 2.4vw, 1.6rem); border: 1px solid var(--border); border-radius: 20px; background: #fff; box-shadow: 0 12px 34px #123b5d0b; }
.architecture-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.architecture-heading h2 { margin: .25rem 0 .3rem; color: #173e5e; font-size: 1.28rem; }
.architecture-heading p { margin: 0; color: #72879a; line-height: 1.5; }
.architecture-tabs { display: flex; flex: 0 0 auto; gap: .35rem; padding: .28rem; border: 1px solid #dbe6ee; border-radius: 12px; background: #f4f8fb; }
.architecture-tabs button { padding: .58rem .78rem; border: 0; border-radius: 9px; color: #536e82; background: transparent; cursor: pointer; font: inherit; font-size: .82rem; font-weight: 800; transition: color .16s ease, background .16s ease, box-shadow .16s ease; }
.architecture-tabs button:hover { color: #075b99; background: #e6f3fb; }
.architecture-tabs button.active { color: #fff; background: #096db2; box-shadow: 0 3px 10px #096db233; }
.architecture-tabs button:focus-visible, .uml-canvas:focus-visible { outline: 3px solid #41a8e6; outline-offset: 3px; }
.uml-legend { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem 1.1rem; margin: 0 0 .8rem; color: #61798c; font-size: .79rem; }
.uml-legend span { display: inline-flex; align-items: center; gap: .42rem; }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #0878c7; box-shadow: 0 0 0 3px #0878c71a; }
.legend-dot.service { background: #078568; box-shadow: 0 0 0 3px #0785681a; }
.legend-dot.data { background: #6549b9; box-shadow: 0 0 0 3px #6549b91a; }
.legend-line { display: inline-block; width: 25px; border-top: 2px solid #71899c; }
.legend-line.dashed { border-top-style: dashed; border-color: #1682ca; }
.uml-canvas { overflow: auto; border: 1px solid #d5e2eb; border-radius: 15px; background-color: #f3f7fa; background-image: radial-gradient(#d2dfe8 1px, transparent 1px); background-size: 20px 20px; scrollbar-color: #9cb3c4 #e8eff4; }
.uml-svg { display: block; width: 100%; min-width: 1000px; height: auto; }
.component-diagram { min-width: 1200px; }
.sequence-diagram { min-width: 1250px; }
.lifecycle-diagram { min-width: 1500px; }
.uml-stage { fill: #edf4f8; stroke: #d8e5ed; stroke-width: 1.5; }
.uml-stage-index { fill: #1682c4; font: 900 12px system-ui, sans-serif; letter-spacing: 1.5px; }
.uml-stage-title { fill: #426176; font: 800 13px system-ui, sans-serif; letter-spacing: 1.7px; }
.uml-node > rect:first-child, .seq-participant > rect:first-child { fill: #fff; stroke: #d2e0e9; stroke-width: 1.5; filter: drop-shadow(0 5px 9px #103b5812); }
.uml-node-top { fill: url(#umlClientGrad); }
.edge-top { fill: #1684cf; }
.service-top { fill: url(#umlServiceGrad); }
.data-top { fill: url(#umlDataGrad); }
.external-top { fill: #dc8d24; }
.uml-stereotype { fill: #6c8496; font: 700 11px system-ui, sans-serif; letter-spacing: .3px; }
.uml-node-title { fill: #173f5e; font: 800 16px system-ui, sans-serif; }
.uml-node-copy { fill: #597286; font: 12px system-ui, sans-serif; }
.uml-divider { stroke: #e3ebf0; stroke-width: 1.2; }
.uml-connectors path { fill: none; stroke: #7b93a4; stroke-width: 2.2; }
.uml-dashed { stroke-dasharray: 8 7; }
.uml-edge-label { fill: #526d80; font: 700 11px system-ui, sans-serif; paint-order: stroke; stroke: #f3f7fa; stroke-width: 5px; stroke-linejoin: round; }
.uml-note rect { fill: #fff8e8; stroke: #f0d9a8; stroke-width: 1.4; }
.uml-note-title { fill: #8d5a0a; font: 800 13px system-ui, sans-serif; }
.architecture-footnote { margin: 1rem 0 0; padding: .8rem 1rem; border-left: 3px solid #1682c4; border-radius: 0 9px 9px 0; color: #5b7386; background: #f2f8fc; font-size: .83rem; line-height: 1.55; }
.uml-panel.hidden { display: none; }
.sequence-canvas { background-color: #f5f8fb; }
.seq-lane { fill: #eef4f8; stroke: #dbe6ed; stroke-width: 1; }
.seq-participant > rect:first-child { stroke: #cbdce7; }
.seq-participant.client-node > rect:first-child { fill: #eef7fd; }
.seq-participant.service-node > rect:first-child { fill: #edf8f4; }
.seq-participant.data-node > rect:first-child { fill: #f3f0fc; }
.gps-node > rect:first-child { fill: #fff8e8; stroke: #f0d9a8; stroke-width: 1.5; }
.seq-lifelines path { fill: none; stroke: #9cb0be; stroke-width: 1.6; stroke-dasharray: 5 7; }
.seq-messages path { fill: none; stroke: #1682c4; stroke-width: 2; }
.seq-messages .seq-message { marker-end: url(#seqArrowBlue); }
.seq-messages .return { stroke: #71899c; stroke-dasharray: 6 5; }
.seq-messages .return { marker-end: url(#seqArrow); }
.seq-messages .network { stroke: #d58a22; stroke-dasharray: 7 5; }
.seq-messages .network { marker-end: url(#seqArrowBlue); }
.seq-step { fill: #284b64; font: 700 12px system-ui, sans-serif; paint-order: stroke; stroke: #f5f8fb; stroke-width: 4px; }
.life-stage { fill: #f8fbfd; stroke: #d8e5ed; stroke-width: 1.5; }
.life-lane { fill: #f0f5f8; stroke: #e0e9ef; stroke-width: 1; }
.life-participant > rect:first-child { fill: #fff; stroke: #d2e0e9; stroke-width: 1.5; filter: drop-shadow(0 5px 9px #103b5812); }
.life-lifelines path { fill: none; stroke: #b2c2cd; stroke-width: 1.5; stroke-dasharray: 5 7; }
.life-section rect { fill: #e7f2f9; stroke: #c8deeb; stroke-width: 1; }
.life-section text { fill: #155d8c; font: 850 14px system-ui, sans-serif; letter-spacing: .45px; }
.life-messages path { fill: none; stroke: #1682c4; stroke-width: 2; marker-end: url(#lifeArrow); }
.life-messages .life-return { stroke: #71899c; stroke-dasharray: 6 5; marker-end: url(#lifeArrowMuted); }
.life-messages .life-config { stroke: #d58a22; stroke-dasharray: 7 5; marker-end: url(#lifeArrowAmber); }
.life-messages text { fill: #36566e; font: 700 11.5px system-ui, sans-serif; paint-order: stroke; stroke: #f8fbfd; stroke-width: 5px; stroke-linejoin: round; }
.life-fragment rect { fill: #fff; stroke: #b8cada; stroke-width: 1.5; stroke-dasharray: 7 5; }
.life-fragment text { fill: #536f83; font: 12px system-ui, sans-serif; }
.life-fragment text:first-of-type { fill: #155d8c; font-weight: 850; }
.life-permission-card rect { fill: #f1f8fd; stroke: #a8cce2; stroke-width: 1.5; }
.life-permission-card text { fill: #36566e; font: 12px system-ui, sans-serif; }
.life-permission-card text:first-of-type { fill: #075b91; font-weight: 850; letter-spacing: .35px; }
.life-work-section rect { fill: #eaf7f2; stroke: #c5e4d7; }
.life-work-section text { fill: #176b55; }
.dark-mode .life-stage { fill: #121a21; stroke: #304653; }
.dark-mode .life-lane { fill: #18232c; stroke: #2a3c49; }
.dark-mode .life-participant > rect:first-child { fill: #202d37; stroke: #3a4c59; }
.dark-mode .life-lifelines path { stroke: #627989; }
.dark-mode .life-section rect { fill: #1b3546; stroke: #31536a; }
.dark-mode .life-section text { fill: #a9d8f1; }
.dark-mode .life-messages text { fill: #c0d2dd; stroke: #121a21; }
.dark-mode .life-fragment rect { fill: #1a2731; stroke: #425867; }
.dark-mode .life-fragment text { fill: #b3c4ce; }
.dark-mode .life-fragment text:first-of-type { fill: #91c8e8; }
.dark-mode .life-permission-card rect { fill: #1a2d39; stroke: #36576b; }
.dark-mode .life-permission-card text { fill: #c0d2dd; }
.dark-mode .life-permission-card text:first-of-type { fill: #a5daf6; }
.dark-mode .life-work-section rect { fill: #19352e; stroke: #315b4e; }
.dark-mode .life-work-section text { fill: #a9e1cf; }
.dark-mode .architecture-hero { border-color: #28445a; background: radial-gradient(circle at 88% 10%, #17496a 0, transparent 36%), linear-gradient(120deg, #142431, #101a23); }
.dark-mode .architecture-hero-copy h2, .dark-mode .architecture-heading h2, .dark-mode .architecture-stats strong { color: #e0edf5; }
.dark-mode .architecture-hero-copy p, .dark-mode .architecture-heading p, .dark-mode .architecture-stats small, .dark-mode .uml-legend, .dark-mode .architecture-footnote { color: #a3b7c6; }
.dark-mode .architecture-stats > article, .dark-mode .architecture-card { border-color: #2b3e4d; background: #151e27; }
.dark-mode .architecture-stat-icon { color: #8bcaf0; background: #18374c; }
.dark-mode .architecture-tabs { border-color: #344958; background: #101820; }
.dark-mode .architecture-tabs button { color: #a6bac8; }
.dark-mode .architecture-tabs button:hover { color: #b8e3fb; background: #1d3545; }
.dark-mode .architecture-tabs button.active { color: #fff; background: #0875bb; }
.dark-mode .uml-canvas { border-color: #304653; background-color: #121a21; background-image: radial-gradient(#31434f 1px, transparent 1px); }
.dark-mode .uml-stage { fill: #18232c; stroke: #2a3c49; }
.dark-mode .uml-stage-title { fill: #b3c5d1; }
.dark-mode .uml-node > rect:first-child, .dark-mode .seq-participant > rect:first-child { fill: #202d37; stroke: #3a4c59; }
.dark-mode .uml-node-title { fill: #e0edf5; }
.dark-mode .uml-node-copy { fill: #b0c0cb; }
.dark-mode .uml-stereotype { fill: #9aafbd; }
.dark-mode .uml-divider { stroke: #3a4d5a; }
.dark-mode .uml-edge-label { fill: #c0d0da; stroke: #121a21; }
.dark-mode .uml-note rect { fill: #342d1e; stroke: #65502d; }
.dark-mode .uml-note-title { fill: #f4c879; }
.dark-mode .seq-lane { fill: #18232c; stroke: #2a3c49; }
.dark-mode .seq-participant.client-node > rect:first-child { fill: #1b3040; }
.dark-mode .seq-participant.service-node > rect:first-child { fill: #1b342f; }
.dark-mode .seq-participant.data-node > rect:first-child { fill: #2b263b; }
.dark-mode .gps-node > rect:first-child { fill: #342d1e; stroke: #65502d; }
.dark-mode .seq-lifelines path { stroke: #627989; }
.dark-mode .seq-step { fill: #d2e2ec; stroke: #121a21; }
.dark-mode .architecture-footnote { border-left-color: #33a3e6; background: #182631; }
@media(max-width:700px) {
  .tracking-heading { align-items: stretch; flex-direction: column; }
  .tracking-tools { display: grid; grid-template-columns: auto 1fr; justify-content: stretch; }
  .tracking-tools select, .tracking-tools input[type="date"] { width: 100%; min-width: 0; }
  .tracking-tools button { width: 100%; }
  .architecture-hero { align-items: flex-start; }
  .architecture-hero-mark { flex-basis: 58px; width: 58px; height: 58px; border-radius: 18px; font-size: 1.45rem; }
  .architecture-stats { grid-template-columns: 1fr; }
  .architecture-heading { flex-direction: column; }
  .architecture-tabs { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .architecture-tabs button { flex: 0 0 auto; white-space: nowrap; }
  .component-diagram { min-width: 1100px; }
  .sequence-diagram { min-width: 1180px; }
  .lifecycle-diagram { min-width: 1500px; }
}
@media(max-width:700px) {
  .schedule-options { grid-template-columns: 1fr; }
  .planning-intro, .planning-title { align-items: stretch; flex-direction: column; }
  .planning-form { grid-template-columns: 1fr; }
  .planning-form .planning-users-field, .planning-form .error, .planning-form .schedule-actions { grid-column: auto; }
  .schedule-assignment-dialog .planning-form { padding: 0 1rem; }
  .planning-people-editor { grid-column: auto; padding: 1rem; }
  .weekly-calendar-controls { grid-template-columns: 1fr; }
  .weekly-navigation { padding-bottom: 0; }
  .history-filters { grid-template-columns: 1fr; }
  .history-actions { margin: 0 0 1rem; }
  .zone-form { grid-template-columns: 1fr; }
  .zone-actions, .zone-form .error { grid-column: auto; }
  .zone-map-wrap { grid-column: auto; }
  #zoneMap, #trackingMap { height: 340px; }
  .score-manual-card .wide-field { grid-column: auto; }
  .bonus-settings-grid, .group-form, .score-settings-grid { grid-template-columns: 1fr; }
  .bonus-summary { grid-template-columns: 1fr; }
  .bonus-settings-grid .history-actions, .bonus-settings-grid .error, .group-form .schedule-actions, .group-form .error, .score-settings-grid .history-actions { grid-column: auto; }
  .score-month-card .history-filters { grid-template-columns: 1fr; }
  .score-overview-stats { grid-template-columns: 1fr; }
  .group-team-editor { grid-column: auto; padding: 1rem; }
  .group-dialog { width: calc(100vw - 1rem); max-height: 96vh; }
  .group-dialog .group-form { max-height: 96vh; padding: 0 1rem; }
  .group-dialog-head, .group-dialog-actions { margin-left: -1rem; margin-right: -1rem; padding-left: 1rem; padding-right: 1rem; }
  .group-team-heading { flex-direction: column; }
  .group-people-toolbar, .group-supervisor-editor { grid-template-columns: 1fr; }
  .group-supervisor-picker { grid-template-columns: 1fr; }
  .group-supervisor-chips { grid-column: auto; }
  .group-person-row { grid-template-columns: auto 1fr; }
  .group-person-row > b { display: none; }
}
