:root {
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e1e8f4;
  --paper: #ffffff;
  --bg: #f0f4fb;
  --navy: #0d1d3a;
  --navy-2: #1a3256;
  --gold: #e2a832;
  --green: #1a7a5a;
  --red: #c0392b;
  --accent: #0ea5e9;
  --shadow: 0 18px 45px rgba(13, 29, 58, 0.13);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px;
  background: linear-gradient(155deg, #091525 0%, #0d2040 65%, #112b58 100%);
  border-right: 1px solid rgba(14,165,233,.15);
  color: #fff;
  display: flex;
  flex-direction: column;
}
.brand, .user-chip {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand small, .user-chip small { display: block; color: rgba(255,255,255,.68); }
.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(14,165,233,.12);
  border: 1px solid rgba(14,165,233,.3);
}
.brand-mark.large {
  width: 62px;
  height: 62px;
}
.brand-name {
  display: block;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .06em;
  color: #fff;
  line-height: 1.1;
  background: linear-gradient(90deg, #7dd3fc, #a5b4fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.brand-sub {
  display: block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .18em;
  color: rgba(255,255,255,.45);
  text-transform: uppercase;
  margin-top: 1px;
}
.nav {
  display: grid;
  gap: 8px;
  margin-top: 34px;
}
.nav a, .logout button {
  border: 0;
  border-radius: 8px;
  padding: 12px 14px;
  background: transparent;
  color: rgba(255,255,255,.78);
  text-align: left;
  cursor: pointer;
}
.nav a:hover, .logout button:hover {
  background: rgba(255,255,255,.09);
  color: #fff;
}
.nav a.active {
  background: rgba(14,165,233,.18);
  color: #7dd3fc;
  font-weight: 700;
  border-left: 3px solid #0ea5e9;
  padding-left: 11px;
}
.logout { margin-top: auto; }
.logout button { width: 100%; }

.main {
  min-width: 0;
  padding: 28px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 24px;
}
.topbar h1 {
  margin: 0;
  font-size: 30px;
  letter-spacing: 0;
}
.eyebrow {
  margin: 0 0 4px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.user-chip {
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}
.user-chip span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 7px;
  background: #edf2f8;
  font-weight: 900;
}
.user-chip small { color: var(--muted); }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.kpi, .panel, .table-card, .form-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.kpi {
  padding: 14px 16px;
  border-top: 4px solid var(--navy-2);
}
.kpi.good { border-top-color: var(--green); }
.kpi span, .muted, small { color: var(--muted); }
.kpi strong {
  display: block;
  margin-top: 5px;
  font-size: 28px;
}
.dashboard-strip {
  display: block;
  margin: 14px 0;
}
.month-birthdays {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.month-birthdays .mini-label {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.month-birthdays strong {
  display: block;
  margin-top: 4px;
  color: var(--navy);
  font-size: 34px;
}
.month-birthdays ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.month-birthdays li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: background .15s;
}
/* Cumple HOY — llamativo */
.month-birthdays li.bday-today {
  background: linear-gradient(135deg, #fff8e1 0%, #fff3cd 100%);
  border-color: #f6c94e;
  box-shadow: 0 2px 10px rgba(214,168,79,.25);
  animation: bday-pulse 2s ease-in-out infinite;
}
@keyframes bday-pulse {
  0%, 100% { box-shadow: 0 2px 10px rgba(214,168,79,.25); }
  50% { box-shadow: 0 4px 20px rgba(214,168,79,.55); }
}
/* Ícono torta (HOY) */
.bday-icon-today {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.2));
}
/* Ícono regalo (este mes) */
.bday-icon-month {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
  opacity: .85;
}
.bday-info { min-width: 0; }
.bday-name {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bday-today .bday-name { color: #7a4f00; font-size: 14px; }
.bday-date {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px;
}
.bday-today .bday-date { color: #c07000; font-weight: 700; }
.content-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 18px;
  margin-bottom: 18px;
}
.panel, .form-panel { padding: 20px; }
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
h2 { margin: 0 0 12px; font-size: 18px; }
.bar-list { display: grid; gap: 12px; }
.bar-row {
  display: grid;
  grid-template-columns: 110px 1fr 42px;
  align-items: center;
  gap: 12px;
}
.bar-row div {
  height: 10px;
  overflow: hidden;
  border-radius: 99px;
  background: #edf2f8;
}
.bar-row i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--navy-2), var(--gold));
}
.clean-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.clean-list li, .event {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.clean-list small { display: block; }
.calendar-list, .novelty-list { display: grid; gap: 10px; }
.novelty-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}
.novelty-type-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.novelty-type-card header {
  display: grid;
  grid-template-columns: 10px 1fr 26px;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  background: #f8fbff;
  border-bottom: 1px solid var(--line);
}
.novelty-type-card header strong {
  color: var(--navy);
  font-size: 11px;
}
.novelty-type-card header em {
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 20px;
  border-radius: 6px;
  background: #edf2f8;
  color: var(--navy);
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
}
.novelty-people {
  display: grid;
  gap: 0;
  padding: 6px 10px;
}
.novelty-people div {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 1px;
  padding: 5px 0;
  border-bottom: 1px solid #edf2f8;
}
.novelty-people div:last-child {
  border-bottom: 0;
}
.novelty-people span {
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
}
.novelty-people small {
  display: block;
  font-size: 10px;
  line-height: 1.3;
  color: var(--muted);
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
}
.novelty-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.novelty-chip {
  display: grid;
  grid-template-columns: 12px auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}
.novelty-chip strong {
  color: var(--navy);
  font-size: 20px;
}
.novelty-chip small {
  min-width: 0;
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.event, .novelty-item {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--navy-2);
}
.dot.birthday { background: var(--gold); }
.dot.vacaciones { background: var(--green); }
.dot.excusa_servicio, .dot.hospitalizado, .dot.suspendido { background: var(--red); }
.event em, .novelty-item em { color: var(--muted); font-style: normal; }

.commission-map {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.commission-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fbfdff;
}
.commission-card[open] {
  grid-column: span 3;
}
.commission-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 0;
  border-radius: 0;
  padding: 13px;
  text-align: left;
  background: linear-gradient(90deg, #ffffff, #f0f5fb);
  list-style: none;
}
.commission-toggle::-webkit-details-marker { display: none; }
.commission-toggle strong,
.commission-toggle small {
  display: block;
}
.commission-toggle strong {
  font-size: 13px;
}
.commission-toggle small {
  margin-top: 4px;
  font-size: 12px;
}
.commission-toggle em {
  flex: 0 0 auto;
  color: var(--navy);
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.calendar-panel,
.novelty-panel {
  margin-top: 14px;
}
.compact-head {
  margin-bottom: 10px;
}
.commission-card[open] .commission-toggle {
  border-bottom: 1px solid var(--line);
}
.commission-part {
  max-height: 420px;
  overflow: auto;
  background: #fff;
}
.part-group {
  padding: 8px 0 10px;
}
.part-group + .part-group {
  border-top: 1px solid var(--line);
}
.part-group h3 {
  margin: 4px 12px 8px;
  color: var(--navy);
  font-size: 12px;
  text-transform: uppercase;
}
.compact-table th,
.compact-table td {
  padding: 10px 12px;
}
.compact-table {
  min-width: 360px;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.search {
  display: flex;
  gap: 8px;
  flex: 1;
}
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff;
  color: var(--ink);
}
label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
}
.button, button {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 14px;
  background: #fff;
  cursor: pointer;
  font-weight: 800;
}
.primary, button.primary {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}
.ghost { color: var(--navy); }
.actions, .form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}
.table-card { overflow: hidden; }
.grouped-table {
  margin-bottom: 14px;
}
.group-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  background: #f8fbff;
}
.group-head h2 {
  margin: 0;
  color: var(--navy);
  font-size: 15px;
}
.group-head span {
  display: grid;
  place-items: center;
  min-width: 32px;
  height: 28px;
  border-radius: 8px;
  background: #edf2f8;
  color: var(--navy);
  font-weight: 900;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}
th {
  background: #edf2f8;
  color: var(--navy);
  font-size: 12px;
  text-transform: uppercase;
}
td small { display: block; margin-top: 3px; }
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 8px;
  padding: 5px 9px;
  background: #edf2f8;
  color: var(--navy);
  font-weight: 800;
  font-size: 12px;
}
.badge.on { background: #e7f6ef; color: var(--green); }
.badge.off { background: #f7e8e8; color: var(--red); }
.row-link { color: var(--navy); font-weight: 900; }
.inline-form select { min-width: 170px; }
.inline-toolbar-form {
  margin: 0;
}
.table-card input[type="date"] {
  min-width: 132px;
}
.novelty-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.novelty-fields[hidden] {
  display: none;
}
.novelty-summary-card {
  display: grid;
  gap: 5px;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
}
.novelty-summary-card[hidden] {
  display: none;
}
.novelty-summary-card.is-active {
  border-color: #b8d3ee;
  background: #f4f9ff;
}
.novelty-summary-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.novelty-summary-top strong {
  color: var(--navy);
  font-size: 13px;
}
.novelty-edit-toggle {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.novelty-date-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(90px, 1fr));
  gap: 6px;
}
.novelty-date-strip span {
  display: grid;
  gap: 2px;
  padding: 6px 7px;
  border-radius: 7px;
  background: #fff;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.novelty-date-strip b {
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
}
.novelty-summary-card small {
  color: var(--muted);
  line-height: 1.35;
}
.date-col-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.date-col-label input {
  font-size: 12px;
  padding: 3px 5px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--card);
  color: var(--ink);
  width: 118px;
}
.btn-release {
  padding: 7px 11px;
  border: 1.5px solid #e8a0a0;
  border-radius: 8px;
  background: #fff5f5;
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.btn-release:hover {
  background: #fce8e8;
  border-color: var(--red);
}
.badge-transfer {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  background: #fff8e6;
  color: #92610a;
  border: 1px solid #f0d080;
  white-space: nowrap;
}
.table-card td input,
.table-card td select {
  padding: 8px 9px;
}
.table-card td button {
  padding: 8px 10px;
  white-space: nowrap;
}
.order-table input[type="number"] {
  width: 76px;
  padding: 8px;
  text-align: center;
  font-weight: 900;
}
.order-table .type-cell select {
  width: 72px;
  padding: 8px;
  font-weight: 900;
}
.order-table .order-cell,
.order-table .type-cell {
  width: 92px;
}
.form-panel { max-width: 980px; }
.form-panel.compact { max-width: none; margin-bottom: 18px; }
.button.danger, button.danger { border-color: var(--red); background: var(--red); color: #fff; }
.button.danger:hover, button.danger:hover { background: #a53125; }
.danger-zone { max-width: 980px; margin-top: 18px; border: 1px solid #f3c6c0; border-radius: 10px; padding: 4px 16px; background: #fdf4f3; }
.danger-zone summary { cursor: pointer; font-weight: 800; color: var(--red); padding: 10px 0; }
.danger-zone-body { padding: 4px 0 16px; }
.danger-zone-body p { color: var(--muted); margin: 0 0 12px; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.wide { grid-column: 1 / -1; }
.check {
  align-self: end;
  display: flex;
  flex-direction: row;
  align-items: center;
}
.check input { width: auto; }
.alert {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #cfe2d8;
  background: #eaf7f0;
  color: var(--green);
  font-weight: 800;
}
.alert.error {
  border-color: #e6c5c5;
  background: #fbebeb;
  color: var(--red);
}
.empty, .empty-state {
  padding: 28px;
  text-align: center;
}
.stack-actions {
  display: grid;
  gap: 8px;
  min-width: 260px;
}
.stack-actions form {
  display: flex;
  gap: 8px;
}

/* ── Users page redesign ─────────────────────────────────────────────────── */

/* CSS-only toggle: hide modules-list when restrict-check is unchecked */
.restrict-check:not(:checked) ~ .modules-list { display: none; }

/* Page header */
.uc-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}
.uc-page-title {
  font-size: 20px; font-weight: 800;
  color: var(--navy); margin: 0; letter-spacing: -.01em;
}
.uc-page-sub { font-size: 12px; color: var(--muted); margin: 2px 0 0; }

/* Create form toggle */
.uc-create-details { max-width: 780px; }
.uc-create-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 20px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff; border-radius: 10px;
  font-size: 13px; font-weight: 700;
  cursor: pointer; list-style: none;
  box-shadow: 0 2px 8px rgba(30,58,138,.18);
  transition: box-shadow .15s;
}
.uc-create-toggle::-webkit-details-marker { display: none; }
.uc-create-toggle::marker { display: none; }
.uc-create-toggle:hover { box-shadow: 0 4px 14px rgba(30,58,138,.28); }
.uc-create-details[open] .uc-create-toggle { border-radius: 10px 10px 0 0; box-shadow: none; }

.uc-create-panel {
  background: var(--paper);
  border: 1.5px solid var(--navy-2);
  border-top: none;
  border-radius: 0 12px 12px 12px;
  padding: 22px 24px 20px;
}

.uc-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: 14px 16px;
  margin-bottom: 16px;
}
.uc-field { display: flex; flex-direction: column; gap: 5px; }
.uc-field > span {
  font-size: 11px; font-weight: 700;
  color: var(--muted); text-transform: uppercase; letter-spacing: .06em;
}
.uc-field input,
.uc-field select {
  padding: 9px 11px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  font-size: 13px; background: var(--surface);
  color: var(--ink);
  transition: border-color .12s;
}
.uc-field input:focus,
.uc-field select:focus { outline: none; border-color: var(--navy-2); }

/* Restrict block inside form */
.uc-restrict-block {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  margin-bottom: 16px;
}
.restrict-check { width: 15px; height: 15px; cursor: pointer; vertical-align: middle; margin-right: 7px; accent-color: var(--navy-2); }
.uc-restrict-label { font-size: 13px; font-weight: 600; cursor: pointer; color: var(--ink); }
.modules-hint { font-size: 11px; color: var(--muted); margin: 8px 0 6px; }
.modules-list {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 6px;
}
.uc-mod-item {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 500; cursor: pointer;
  padding: 6px 9px;
  border: 1px solid var(--line); border-radius: 7px;
  background: var(--paper); color: var(--ink);
  transition: border-color .1s, background .1s;
}
.uc-mod-item:hover { border-color: var(--navy-2); background: #eff6ff; }
.uc-mod-item input[type="checkbox"] { width: 13px; height: 13px; flex-shrink: 0; accent-color: var(--navy-2); }

.uc-form-actions { display: flex; align-items: center; gap: 10px; }
.uc-submit-btn {
  padding: 9px 24px;
  background: var(--navy); color: #fff;
  border: none; border-radius: 8px;
  font-size: 13px; font-weight: 700; cursor: pointer;
}
.uc-submit-btn:hover { background: var(--navy-2); }
.form-error-msg { font-size: 12px; font-weight: 600; color: #dc2626; }

/* ── User cards grid ─────────────────────────────────────────────────────── */
.uc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 14px;
}

.uc-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  border-left: 4px solid var(--navy);
  display: flex; flex-direction: column;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
  transition: box-shadow .15s;
}
.uc-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.uc-role-admin      { border-left-color: var(--navy); }
.uc-role-commission { border-left-color: #16a34a; }
.uc-role-secretary  { border-left-color: #7e22ce; }
.uc-role-ing_semana { border-left-color: #ea580c; }

/* Card header */
.uc-card-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px 10px;
}
.uc-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800; flex-shrink: 0;
  background: #dbeafe; color: var(--navy);
}
.uc-role-commission .uc-avatar { background: #dcfce7; color: #15803d; }
.uc-role-secretary  .uc-avatar { background: #f3e8ff; color: #7e22ce; }
.uc-role-ing_semana .uc-avatar { background: #ffedd5; color: #ea580c; }

.uc-name-block { flex: 1; min-width: 0; }
.uc-name { display: block; font-size: 14px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uc-uname { font-size: 11px; color: var(--muted); }

.uc-role-pill {
  flex-shrink: 0; font-size: 10px; font-weight: 700;
  padding: 3px 9px; border-radius: 20px;
  background: var(--navy); color: #fff; letter-spacing: .04em;
}
.uc-role-commission .uc-role-pill { background: #16a34a; }
.uc-role-secretary  .uc-role-pill { background: #7e22ce; }
.uc-role-ing_semana .uc-role-pill { background: #ea580c; }

/* Card meta row */
.uc-card-meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 5px;
  padding: 4px 16px 12px;
  font-size: 11px; color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.uc-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.uc-dot.on  { background: #16a34a; }
.uc-dot.off { background: #d1d5db; }
.uc-status  { font-weight: 600; }
.uc-sep     { color: var(--line); }
.uc-comm    { font-size: 10px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uc-mod-badge { font-size: 10px; font-weight: 600; color: #1d4ed8; background: #eff6ff; padding: 1px 6px; border-radius: 10px; }

/* Card footer with expandable action panels */
.uc-card-foot {
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px;
  padding: 10px 14px 14px;
  background: var(--surface);
  border-radius: 0 0 12px 12px;
  flex: 1;
}

/* Action pill (summary / button) */
.uc-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 12px;
  border: 1.5px solid var(--line); border-radius: 20px;
  font-size: 11px; font-weight: 600; cursor: pointer;
  background: var(--paper); color: var(--ink);
  white-space: nowrap; list-style: none;
  transition: background .1s, border-color .1s;
  line-height: 1;
}
.uc-pill::-webkit-details-marker { display: none; }
.uc-pill::marker { display: none; }
.uc-pill:hover { background: #eff6ff; border-color: var(--navy-2); color: var(--navy); }
.uc-pill.warn  { color: #92400e; border-color: #fcd34d; background: #fefce8; }
.uc-pill.warn:hover { background: #fef3c7; }
.uc-pill.ok    { color: #166534; border-color: #86efac; background: #f0fdf4; }
.uc-pill.ok:hover { background: #dcfce7; }
.uc-pill.del   { color: #b91c1c; border-color: #fca5a5; background: #fff5f5; }
.uc-pill.del:hover { background: #fee2e2; }

/* Expandable detail panel */
.uc-panel { flex: 0 0 auto; }
.uc-panel[open] { flex: 0 0 100%; }

.uc-panel-body {
  margin-top: 8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  font-size: 12px;
}
.uc-panel.del-panel .uc-panel-body { border-color: #fca5a5; background: #fff8f8; }

.uc-panel-body p { margin: 0 0 10px; font-size: 12px; color: var(--ink); }

/* Inline form inside panel (password) */
.uc-row-form { display: flex; gap: 8px; align-items: center; }
.uc-row-form input[type="password"] {
  flex: 1; padding: 7px 10px;
  border: 1.5px solid var(--line); border-radius: 7px;
  font-size: 12px; background: var(--surface);
}
.uc-row-form input:focus { outline: none; border-color: var(--navy-2); }

/* Save / danger buttons inside panels */
.uc-btn {
  padding: 7px 16px; border: none; border-radius: 7px;
  font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.uc-btn.primary { background: var(--navy); color: #fff; }
.uc-btn.primary:hover { background: var(--navy-2); }
.uc-btn.danger  { background: #dc2626; color: #fff; }
.uc-btn.danger:hover  { background: #b91c1c; }

/* Eliminar definitivamente (borrado forzado con reasignación) */
.uc-force-delete {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #fca5a5;
}
.uc-force-delete summary {
  font-size: 11.5px;
  font-weight: 600;
  color: #b91c1c;
  cursor: pointer;
}
.uc-force-warning {
  margin: 8px 0 10px;
  font-size: 11.5px;
  color: #7f1d1d;
}

/* Toggle active form inline */
.uc-toggle-wrap { line-height: 0; }

/* Module list inside panels */
.uc-mod-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin-top: 8px;
}
.uc-save-row { margin-top: 10px; }

@media (max-width: 640px) {
  .uc-grid { grid-template-columns: 1fr; }
  .uc-form-grid { grid-template-columns: 1fr; }
  .uc-mod-grid { grid-template-columns: 1fr; }
  .uc-create-details { max-width: 100%; width: 100%; }
}

.verification-grid {
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  gap: 18px;
  margin-bottom: 18px;
}
.verification-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
}
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}
.section-title h2 {
  margin: 0;
  font-size: 20px;
}
.verification-form {
  display: grid;
  gap: 14px;
}
.verification-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 800;
}
.verification-list {
  display: grid;
  gap: 8px;
  max-height: 430px;
  overflow: auto;
  padding-right: 4px;
}
.verification-row {
  display: grid;
  grid-template-columns: 92px minmax(130px, 1fr);
  gap: 6px 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}
.verification-row small {
  grid-column: 1 / -1;
  line-height: 1.35;
}
.wide-list {
  max-height: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.commission-report-list {
  display: grid;
  gap: 10px;
  max-height: 430px;
  overflow: auto;
  padding-right: 4px;
}
.commission-report-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}
.commission-report-row strong,
.commission-report-row small,
.commission-report-row p {
  display: block;
}
.commission-report-row strong {
  line-height: 1.25;
}
.commission-report-row em {
  grid-column: 1 / -1;
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
}
.commission-report-row p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--ink);
  line-height: 1.35;
}
.daily-book-toolbar .search {
  align-items: end;
}
.daily-book-toolbar label {
  max-width: 220px;
}
.daily-book {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.daily-book-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: #f8fbff;
}
.daily-book-head h2 {
  margin: 0;
  color: var(--navy);
}
.daily-book-head > span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 8px;
  padding: 5px 10px;
  background: #edf2f8;
  color: var(--navy);
  font-weight: 900;
}
.daily-book-list {
  display: grid;
  gap: 12px;
  padding: 14px;
}
.daily-book-entry {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.daily-book-entry.pending {
  background: #fffaf0;
}
.daily-book-entry summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}
.daily-book-entry summary::-webkit-details-marker { display: none; }
.daily-book-entry summary strong,
.daily-book-entry summary small {
  display: block;
}
.daily-book-entry summary strong {
  color: var(--navy);
  line-height: 1.25;
}
.daily-book-entry summary em {
  flex: 0 0 auto;
  border-radius: 8px;
  padding: 5px 9px;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}
.daily-book-entry summary em.ok {
  background: #eaf7f0;
  color: var(--green);
}
.daily-book-entry summary em.miss {
  background: #fff5dc;
  color: #8a6115;
}
.daily-book-entry[open] summary,
.daily-book-entry details[open] summary {
  border-bottom: 1px solid var(--line);
}
.daily-book-empty {
  margin: 0;
  padding: 14px;
  color: var(--muted);
}
.daily-book-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 14px 0;
}
.daily-book-stats span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.daily-book-stats strong {
  display: block;
  color: var(--navy);
  font-size: 18px;
}
.daily-book-section {
  padding: 12px 14px;
}
.daily-book-section h3 {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 13px;
  text-transform: uppercase;
}
.daily-part-split {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, .8fr);
  gap: 12px;
}
.daily-part-split > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #f8fafc;
}
.daily-part-split h4 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}
.daily-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.daily-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  border-radius: 8px;
  padding: 5px 8px;
  background: #edf2f8;
  color: var(--navy);
  font-weight: 900;
  font-size: 12px;
}
.daily-chip.novelty {
  background: #fff5dc;
  color: #8a6115;
}
.daily-chip small {
  color: inherit;
  font-weight: 800;
}
.daily-book-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.daily-note {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  margin-bottom: 7px;
  background: #f8fafc;
}
.daily-note strong {
  color: var(--navy);
}
.daily-note span,
.daily-note p {
  margin: 0;
  color: var(--ink);
  line-height: 1.35;
}
.daily-book-observation {
  margin: 0 14px 14px;
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fffaf0;
}
.daily-book-observation p {
  margin: 4px 0 0;
}
.badge.good {
  background: #eaf7f0;
  color: var(--green);
}
.badge.warning {
  background: #fff5dc;
  color: #8a6115;
}

/* ── Login page ──────────────────────────────────────────────────────────── */
.login-body {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: hidden;
  background: linear-gradient(155deg, #060e1c 0%, #091525 45%, #0d2040 100%);
}
.login-glow {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
.login-glow-1 {
  width: 600px; height: 600px;
  top: -200px; right: -160px;
  background: radial-gradient(circle, rgba(14,165,233,.14) 0%, transparent 70%);
}
.login-glow-2 {
  width: 400px; height: 400px;
  bottom: -120px; left: -100px;
  background: radial-gradient(circle, rgba(99,102,241,.12) 0%, transparent 70%);
}
.login-panel {
  position: relative;
  z-index: 1;
  width: min(1000px, 100%);
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 0;
  align-items: stretch;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,.55);
}

/* ── Copy / left column ── */
.login-copy {
  color: #fff;
  padding: 52px 48px;
  background: linear-gradient(165deg, rgba(14,165,233,.06) 0%, transparent 60%);
  border: 1px solid rgba(14,165,233,.12);
  border-right: none;
  border-radius: 18px 0 0 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
}
.login-logo-wrap {
  margin-bottom: 28px;
  display: flex;
}
.login-eyebrow {
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #38bdf8;
  font-weight: 700;
  margin-bottom: 10px;
}
.login-brand {
  font-size: 42px;
  font-weight: 900;
  letter-spacing: .04em;
  margin: 0 0 4px;
  background: linear-gradient(90deg, #e0f2fe, #a5b4fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.05;
}
.login-brand-sub {
  display: block;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(255,255,255,.45);
  -webkit-text-fill-color: rgba(255,255,255,.45);
  margin-top: 4px;
}
.login-desc {
  color: rgba(255,255,255,.62);
  font-size: 14px;
  line-height: 1.65;
  margin: 18px 0 24px;
  max-width: 340px;
}
.login-features {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.login-feat {
  font-size: 12px;
  color: rgba(56,189,248,.75);
  font-weight: 600;
  letter-spacing: .03em;
}
.login-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 32px;
  opacity: .25;
}
.login-dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: #38bdf8;
}

/* ── Card / right column ── */
.login-card {
  background: #fff;
  border-radius: 0 18px 18px 0;
  padding: 52px 44px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.login-card-top { display: flex; flex-direction: column; gap: 4px; }
.login-card-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: #eff6ff;
  color: #0ea5e9;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.login-card-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--ink);
  margin: 0;
}
.login-card-sub {
  font-size: 13px;
  color: var(--muted);
}
.login-field-group { display: flex; flex-direction: column; gap: 14px; }
.login-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}
.login-field-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  color: #334155;
  text-transform: uppercase;
}
.login-input {
  border: 1.5px solid #e1e8f4;
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 14px;
  color: var(--ink);
  background: #f8fafc;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.login-input:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14,165,233,.15);
  background: #fff;
}
.login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .02em;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
}
.login-btn:hover { opacity: .92; transform: translateY(-1px); }
.login-btn:active { transform: translateY(0); opacity: 1; }
.login-footer {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  margin: 0;
}

@media (max-width: 720px) {
  .login-body { padding: 0; align-items: flex-start; }
  .login-glow-1, .login-glow-2 { display: none; }
  .login-panel {
    grid-template-columns: 1fr;
    border-radius: 0;
    box-shadow: none;
    min-height: 100vh;
  }
  /* Compact branded header strip */
  .login-copy {
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
    border-radius: 0;
    border-right: none;
    border-bottom: 1px solid rgba(14,165,233,.12);
    background: linear-gradient(135deg, #091525 0%, #0d2040 100%);
  }
  .login-logo-wrap { margin-bottom: 0; flex-shrink: 0; }
  .login-logo-wrap svg { width: 42px; height: 42px; }
  .login-brand { font-size: 18px; margin: 0; line-height: 1; }
  .login-brand-sub { font-size: 9px; margin-top: 3px; }
  .login-eyebrow,
  .login-desc,
  .login-features,
  .login-dots { display: none; }
  /* Form fills remaining space */
  .login-card {
    flex: 1;
    border-radius: 0;
    padding: 32px 22px 40px;
    gap: 18px;
    box-shadow: none;
  }
  .login-card-icon { width: 40px; height: 40px; margin-bottom: 6px; }
  .login-card-title { font-size: 20px; }
}

@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .content-grid { grid-template-columns: 1fr; }
  .commission-map { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ── Daily report bar (commission view) ─────────────────────────────────── */
.daily-report-bar {
  margin-bottom: 14px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.dr-sent, .dr-pending {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  flex-wrap: wrap;
}
.dr-sent {
  background: #eaf7f0;
  border-left: 4px solid var(--green);
}
.dr-pending {
  background: #fff8e6;
  border-left: 4px solid #d97706;
}
.dr-check {
  font-size: 18px;
  color: var(--green);
  font-weight: 900;
}
.dr-icon {
  font-size: 18px;
  color: #d97706;
}
.dr-sent span:not(.dr-check),
.dr-pending span:not(.dr-icon) {
  flex: 1;
  font-size: 14px;
  color: var(--ink);
}
.dr-resend {
  padding: 6px 12px;
  border: 1px solid var(--green);
  border-radius: 7px;
  background: #fff;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.dr-resend:hover { background: #eaf7f0; }
.dr-btn { white-space: nowrap; }

/* ── Daily report panel (dashboard admin) ──────────────────────────────── */
/* Reporte diario — tira compacta */
/* ── Notificación: esta semana en el calendario ── */
.week-notify-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 18px;
  border-radius: 12px;
  background: linear-gradient(110deg, #131c30 0%, #1a3153 55%, #25476f 100%);
  box-shadow: 0 4px 18px rgba(15,28,50,.16);
  color: #fff;
  text-decoration: none;
  margin-bottom: 14px;
  transition: transform .15s, box-shadow .15s;
}
.week-notify-strip:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(15,28,50,.24); }
.week-notify-icon { font-size: 22px; flex-shrink: 0; }
.week-notify-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.week-notify-title { font-size: 13px; font-weight: 600; }
.week-notify-title b { color: var(--gold); font-weight: 800; }
.week-notify-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.week-notify-chip {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.week-notify-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.week-notify-dot.cal-dot-evento { background: var(--green); }
.week-notify-dot.cal-dot-recordatorio { background: #5fa8ff; }
.week-notify-dot.cal-dot-reunion { background: #ff8a8a; }
.week-notify-dot.cal-dot-otro { background: #ccc; }
.week-notify-dot.cal-dot-rian { background: #2dd4bf; }
.week-notify-dot.cal-dot-cnic { background: #a78bfa; }
.week-notify-dot.cal-dot-unidad { background: #d97706; }
.week-notify-dot.cal-dot-independencia { background: #f59e0b; }
.week-notify-chip-rian { background: rgba(13,148,136,.25); border-color: rgba(45,212,191,.4); }
.week-notify-arrow {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  white-space: nowrap;
}
@media (max-width: 700px) {
  .week-notify-strip { flex-wrap: wrap; }
  .week-notify-arrow { width: 100%; text-align: right; }
}

.dr-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.dr-strip-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  flex-shrink: 0;
}
.dr-strip-count {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink);
  flex-shrink: 0;
}
.dr-strip-dots {
  display: flex;
  gap: 5px;
  align-items: center;
  flex: 1;
  flex-wrap: wrap;
}
.dr-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  cursor: default;
}
.dr-dot-ok   { background: var(--green); }
.dr-dot-miss { background: #d1d5db; }
.dr-strip-link {
  font-size: 11px;
  color: var(--muted);
  text-decoration: underline;
  white-space: nowrap;
  flex-shrink: 0;
}
.dr-strip-link:hover { color: var(--navy); }
.dr-date-row td:first-child { font-weight: 900; }
.dr-date-row td:first-child { font-weight: 900; }

/* ── Novelty tabs ───────────────────────────────────────────────────────── */
.nov-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}
.nov-tab {
  padding: 10px 20px;
  border: 1.5px solid var(--line);
  border-radius: 8px 8px 0 0;
  background: #f0f5fb;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
  border-bottom: none;
  position: relative;
  bottom: -1px;
}
.nov-tab.active {
  background: var(--paper);
  color: var(--navy);
  border-color: var(--line);
  border-bottom-color: var(--paper);
  z-index: 1;
}
.nov-panel {
  border: 1px solid var(--line);
  border-radius: 0 8px 8px 8px;
  padding: 18px;
  background: var(--bg);
  margin-bottom: 18px;
}
.nov-panel[hidden] { display: none; }

/* ── Novelty wizard ─────────────────────────────────────────────────────── */
.nov-step {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 14px;
  box-shadow: 0 2px 8px rgba(24,49,83,.06);
}
.nov-step-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.nov-step-num {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  flex-shrink: 0;
}
.nov-step-head strong { font-size: 15px; flex: 1; }
.nov-step-error { color: var(--red); font-size: 13px; font-weight: 700; }
.nov-change-btn {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 5px 12px;
  background: #fff;
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.nov-change-btn:hover { background: #f0f5fb; }

/* Official cards */
.official-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
}
/* ── Officials picker flotante ─────────────────────────────────────────── */
.off-picker-wrap {
  position: relative;
  display: inline-block;
}
.off-picker-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}
.off-picker-trigger:hover { background: #1e3a8a; }
.off-picker-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  background: rgba(255,255,255,.25);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
}
.off-picker-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 300;
  min-width: 300px;
  max-width: 420px;
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 10px 36px rgba(0,0,0,.16);
  padding: 12px;
}
.off-picker-panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.off-picker-search {
  flex: 1;
  padding: 7px 10px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  background: var(--bg);
  color: var(--ink);
  min-width: 0;
}
.off-picker-search:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 2px rgba(24,49,83,.09); }
.off-picker-clear-btn {
  font-size: 11px; font-weight: 700; color: var(--muted);
  background: none; border: 1px solid var(--line); border-radius: 7px;
  padding: 5px 9px; cursor: pointer; white-space: nowrap; flex-shrink: 0;
}
.off-picker-clear-btn:hover { border-color: #ef4444; color: #ef4444; }

/* ── Chip grid de funcionarios ─────────────────────────────────────────── */
.off-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
  padding: 2px 0 4px;
}
.off-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border: 1.5px solid var(--line);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  background: var(--bg);
  cursor: pointer;
  user-select: none;
  transition: border-color .12s, background .12s, color .12s;
  white-space: nowrap;
}
.off-chip input[type="checkbox"] { display: none; }
.off-chip:hover { border-color: var(--navy); background: #eff6ff; }
.off-chip-checked {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.off-chip-checked:hover { background: #1e3a8a; }
.off-chip-out {
  opacity: .45;
}
.off-chip-out.off-chip-checked { opacity: .7; }
.off-chip-filtered { display: none !important; }
.act-select-all-btn {
  margin-left: auto;
  padding: 2px 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: transparent;
  color: var(--navy);
  font-size: 11px;
  font-weight: 700;
  text-transform: none;
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
  flex-shrink: 0;
}
.act-select-all-btn:hover {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.act-commission-group .official-card-grid {
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  padding: 10px;
}
.official-card {
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 4px;
  padding: 12px 14px;
  border: 2px solid var(--line);
  border-radius: 9px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.official-card:hover {
  border-color: var(--card-color, var(--navy-2));
  background: #f8fbff;
}
.official-card.selected {
  border-color: var(--card-color, var(--navy));
  background: color-mix(in srgb, var(--card-color, var(--navy)) 8%, #fff);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--card-color, var(--navy)) 20%, transparent);
}
.official-card-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  justify-self: start;
}
.official-card-name {
  font-weight: 900;
  font-size: 13px;
  color: var(--ink);
  line-height: 1.3;
  word-break: break-word;
}
.official-card-nov {
  font-size: 11px;
  font-weight: 700;
  color: var(--red);
  line-height: 1.3;
}
.official-card-status {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
}

/* Novelty form */
.nov-form { margin-bottom: 18px; }
.nov-form[hidden] { display: none; }

/* Type buttons */
.type-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.type-group-label {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 8px;
}
.type-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.type-btn {
  padding: 6px 12px;
  border: 1.5px solid var(--tb-color, var(--line));
  border-radius: 99px;
  background: var(--tb-bg, transparent);
  color: var(--tb-color, var(--ink));
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background .12s, box-shadow .12s;
  white-space: nowrap;
}
.type-btn:hover { background: color-mix(in srgb, var(--tb-color) 12%, transparent); }
.type-btn.active {
  background: var(--tb-bg, #edf2f8);
  box-shadow: 0 0 0 2px var(--tb-color, var(--navy));
}

/* Date row */
.date-grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}
.date-shortcuts {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding-bottom: 2px;
}
.date-shortcut-label {
  font-size: 11px;
  font-weight: 900;
  color: var(--muted);
  text-transform: uppercase;
  white-space: nowrap;
}
.date-chip {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: #f0f5fb;
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.date-chip:hover { background: #dce8f5; }
.obs-label { display: grid; gap: 7px; color: var(--muted); font-weight: 700; font-size: 13px; }
.obs-label .optional { font-weight: 400; color: var(--muted); }
.obs-label textarea { resize: vertical; }
.nov-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}
.nov-form-actions button[disabled] {
  opacity: .45;
  cursor: not-allowed;
}

/* Novelty table badge */
.badge-nov {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  background: color-mix(in srgb, var(--nov-color, var(--navy)) 12%, #fff);
  color: var(--nov-color, var(--navy));
  border: 1px solid color-mix(in srgb, var(--nov-color, var(--navy)) 25%, transparent);
}
.nov-error { color: var(--red); font-size: 12px; font-weight: 700; margin: 0 0 8px; }
.nov-error.inline { display: block; }
.nov-table-section { margin-top: 6px; }

/* ── Displacement extras ─────────────────────────────────────────────────── */
.nov-step-hint {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
}
.check-card {
  cursor: pointer;
  user-select: none;
}
.check-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.disp-selected-count {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
}
.disp-vehicle-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.disp-date-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.disp-date-row input { flex: 1; }
.plate-badge {
  display: inline-block;
  padding: 3px 10px;
  border: 1.5px solid var(--navy-2);
  border-radius: 6px;
  background: #edf2f8;
  color: var(--navy);
  font-weight: 900;
  font-size: 13px;
  letter-spacing: .04em;
  font-family: ui-monospace, monospace;
}
.disp-official-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: #edf2f8;
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
  margin: 2px 2px 2px 0;
}

@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    height: auto;
    padding: 10px 12px 12px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand logout"
      "nav nav";
    gap: 10px;
    box-shadow: 0 10px 28px rgba(16, 35, 63, .22);
  }
  .brand {
    grid-area: brand;
    min-width: 0;
  }
  .brand-mark {
    width: 36px;
    height: 36px;
  }
  .brand strong {
    display: block;
    line-height: 1.1;
  }
  .brand small {
    font-size: 11px;
  }
  .nav {
    grid-area: nav;
    display: flex;
    gap: 8px;
    margin-top: 0;
    overflow-x: auto;
    padding: 2px 2px 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 10px 12px;
    white-space: nowrap;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.08);
    font-size: 13px;
  }
  .nav a.active {
    background: #fff;
    color: var(--navy);
  }
  .logout {
    grid-area: logout;
    align-self: center;
    margin-top: 0;
  }
  .logout button {
    width: auto;
    min-height: 36px;
    padding: 9px 10px;
    background: rgba(255,255,255,.08);
    white-space: nowrap;
    font-size: 12px;
  }
  .main { padding: 18px; }
  .topbar, .toolbar { grid-template-columns: 1fr; display: grid; }
  .user-chip { width: 100%; }
  .kpi-grid, .form-grid { grid-template-columns: 1fr; }
  .verification-grid { grid-template-columns: 1fr; }
  .wide-list { grid-template-columns: 1fr; }
  .daily-book-stats,
  .daily-book-columns,
  .daily-part-split { grid-template-columns: 1fr; }
  .commission-map { grid-template-columns: 1fr; }
  .month-birthdays { grid-template-columns: 1fr; width: 100%; }
  .month-birthdays ul { grid-template-columns: 1fr; }
  .actions, .form-actions, .search { width: 100%; }
  .actions .button, .form-actions .button, .form-actions button, .search button { flex: 1; text-align: center; }
  .table-card { overflow-x: auto; }
  .novelty-summary-card {
    min-width: 280px;
  }
  .novelty-date-strip {
    grid-template-columns: 1fr;
  }
  table { min-width: 760px; }
  .date-grid { grid-template-columns: 1fr 1fr; }
  .date-shortcuts { grid-column: 1 / -1; }
  .official-card-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .type-group-grid { grid-template-columns: 1fr; }
  .disp-vehicle-grid { grid-template-columns: 1fr; }
  .nov-tabs { gap: 4px; }
  .act-details-row { grid-template-columns: 1fr 1fr; }
  .act-type-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ─── Activities ────────────────────────────────────────────────────────────── */

.activity-day-strip {
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  gap: 14px;
  align-items: stretch;
  margin-bottom: 18px;
}
.activity-day-form,
.activity-day-summary {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(24, 49, 83, 0.08);
}
.activity-day-form {
  display: flex;
  gap: 10px;
  align-items: end;
  padding: 12px;
}
.activity-day-form label {
  flex: 1;
  display: grid;
  gap: 5px;
}
.activity-day-form label span {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.activity-day-form input {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--bg);
}
.activity-day-summary {
  display: grid;
  grid-template-columns: 1.4fr repeat(2, minmax(120px, .6fr));
  gap: 1px;
  overflow: hidden;
}
.activity-day-summary span {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-height: 62px;
  padding: 12px 16px;
  background: linear-gradient(180deg, #fff, #f8fbff);
  color: var(--muted);
  font-size: 12px;
}
.activity-day-summary strong {
  color: var(--navy);
  font-size: 15px;
}

/* Open activities panel */
.act-open-panel { margin-bottom: 20px; }
.act-badge-open {
  background: #fff8e1;
  color: #c07000;
  border: 1px solid #ffe082;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 700;
}
.act-open-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.act-open-row:last-of-type { border-bottom: none; }
.act-open-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.act-open-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
}
.act-open-notes { font-size: 12px; margin: 0; }
.act-close-toggle {
  font-size: 12px;
  white-space: nowrap;
  flex-shrink: 0;
}
.act-close-form {
  background: #fffbf0;
  border-top: 1px solid #ffe082;
  padding: 16px 20px;
}
.act-close-fields {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 12px;
  margin-bottom: 12px;
  align-items: start;
}
.act-novedad-field textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
  background: #fff;
  width: 100%;
  resize: vertical;
  min-height: 56px;
}
.act-close-actions {
  display: flex;
  gap: 8px;
}

/* Form panel */
.act-form-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 28px 24px;
  box-shadow: var(--shadow);
}

.act-form-head {
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.act-form-head h2 {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin: 0;
}

.act-section {
  margin-bottom: 24px;
}
.act-section:last-child { margin-bottom: 0; }

.act-section-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}
.act-section-head h3 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--navy);
  margin: 0;
}

.act-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}
.act-type-btn {
  padding: 10px 14px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: border-color .15s, background .15s, color .15s;
  color: var(--ink);
}
.act-type-btn:hover { border-color: var(--navy); background: var(--paper); }
.act-type-btn.selected {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

.act-details-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.act-detail-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.act-detail-field span {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}
.act-detail-field input,
.act-detail-field select,
.act-detail-field textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
  background: var(--bg);
  width: 100%;
}
.act-notes-field { width: 100%; }
.act-notes-field textarea { resize: vertical; min-height: 60px; }

.act-submit-row {
  display: flex;
  justify-content: flex-end;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  margin-top: 20px;
}
.act-submit-btn { min-width: 180px; }

/* Activity type badges in history table */
.act-type-badge {
  background: var(--bg);
  color: var(--navy);
  border: 1px solid var(--line);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 20px;
  font-weight: 600;
  white-space: nowrap;
}
.act-desplazamiento { background: #e8f0fe; border-color: #7baaf7; color: #1a56cc; }
.act-patrullaje { background: #e6f4ea; border-color: #81c995; color: #1a7340; }
.act-operativo { background: #fff3e0; border-color: #ffb74d; color: #c45c00; }
.act-custodia { background: #fce4ec; border-color: #f48fb1; color: #ad1457; }
.act-diligencia { background: #ede7f6; border-color: #b39ddb; color: #512da8; }
.act-capacitacion { background: #e3f2fd; border-color: #90caf9; color: #0d47a1; }
.act-reunion { background: #f3e5f5; border-color: #ce93d8; color: #6a1b9a; }
.act-apoyo { background: #e8f5e9; border-color: #a5d6a7; color: #1b5e20; }
.act-otro { background: var(--bg); border-color: var(--line); color: var(--muted); }

.act-officials-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.act-chip {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
}

.act-week-history {
  padding: 0;
}
.act-week-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  cursor: pointer;
  list-style: none;
}
.act-week-summary::-webkit-details-marker,
.act-day-history summary::-webkit-details-marker {
  display: none;
}
.act-week-summary h2 {
  margin: 0 0 3px;
  color: var(--navy);
  font-size: 15px;
}
.act-week-summary small {
  color: var(--muted);
  font-size: 12px;
}
.act-week-summary::after {
  content: 'Desplegar';
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  margin-left: auto;
}
.act-week-history[open] > .act-week-summary::after {
  content: 'Ocultar';
}
.act-week-days {
  display: grid;
  gap: 10px;
  padding: 0 16px 16px;
}
.act-day-history {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdff;
  overflow: hidden;
}
.act-day-history summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
}
.act-day-history summary strong {
  color: var(--navy);
  font-size: 13px;
}
.act-day-history summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.act-history-list {
  display: grid;
  gap: 8px;
  padding: 0 12px 12px;
}
.act-history-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}
.act-history-main {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) minmax(160px, 1.2fr);
  gap: 10px;
  align-items: center;
}
.act-history-note {
  display: grid;
  gap: 3px;
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.45;
}
.act-history-note b {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.commission-active-panel {
  margin-bottom: 20px;
}
.commission-active-list {
  display: grid;
  gap: 10px;
}
.commission-active-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 260px);
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff, #f9fbff);
}
.commission-active-main {
  min-width: 0;
  display: grid;
  gap: 7px;
}
.commission-close-box {
  border: 1px solid #d9e2ef;
  border-radius: 9px;
  background: var(--paper);
  overflow: hidden;
}
.commission-close-box summary {
  cursor: pointer;
  padding: 9px 11px;
  color: var(--navy);
  font-size: 12px;
  font-weight: 800;
  list-style: none;
}
.commission-close-box summary::-webkit-details-marker {
  display: none;
}
.commission-close-box summary::after {
  content: '▾';
  float: right;
  color: var(--muted);
}
.commission-close-box[open] summary {
  border-bottom: 1px solid var(--line);
  background: #f6f9fc;
}
.commission-close-box form {
  display: grid;
  gap: 9px;
  padding: 10px;
}
.commission-close-box textarea {
  resize: vertical;
  min-height: 58px;
}
.commission-close-box .button {
  width: 100%;
}

/* ── Fechas conmemorativas ───────────────────────────────────────────────── */
.comm-panel {
  background: #fffbea;
  border: 1.5px solid #d6a84f;
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.comm-panel-alert {
  background: #fff1f2;
  border-color: #b91c1c;
  animation: comm-blink 2s ease-in-out 3;
}
@keyframes comm-blink {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: 0 0 0 3px rgba(185,28,28,0.18); }
}
.comm-panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
}
.comm-panel-alert .comm-panel-head { color: #b91c1c; }
.comm-icon {
  font-style: normal;
  font-size: 16px;
}
.comm-count {
  margin-left: auto;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
}
.comm-group { display: flex; flex-direction: column; gap: 5px; }
.comm-group-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2px;
}
.comm-today .comm-group-label { color: #b91c1c; }
.comm-week  .comm-group-label { color: #c2410c; }
.comm-entry {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  flex-wrap: wrap;
}
.comm-day {
  min-width: 22px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}
.comm-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  flex-shrink: 0;
}
.comm-desc { color: var(--ink); line-height: 1.4; }
.comm-rest {
  margin-top: 2px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}
.comm-rest summary {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
  padding: 2px 0;
}
.comm-rest summary::-webkit-details-marker { display: none; }
.comm-rest summary::before { content: '▶ '; font-size: 9px; }
.comm-rest[open] summary::before { content: '▼ '; }
.comm-rest .comm-entry { margin-top: 5px; }

/* ── Commission parte strip ──────────────────────────────────────────────── */
.commission-parte-strip {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  flex-wrap: nowrap;
}
.commission-parte-strip b {
  font-weight: 700;
  color: var(--navy);
  font-size: 12px;
}
.cps-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 1px;
}
.cps-sep  { color: var(--line); font-weight: 400; margin: 0 1px; }
.cps-dash { color: var(--muted); font-weight: 400; }
.cps-total {
  margin-left: 4px;
  font-size: 10px;
  color: var(--muted);
  border-left: 1px solid var(--line);
  padding-left: 5px;
}

.act-note-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 3px;
}
.act-open-notes {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--ink);
  line-height: 1.4;
}

.brand-mark-img {
  background: transparent;
  padding: 0;
  overflow: hidden;
  border-radius: 50%;
}
.brand-mark-img img {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
@media (max-width: 820px) {
  .activity-day-strip {
    grid-template-columns: 1fr;
  }
  .activity-day-form {
    align-items: stretch;
  }
  .activity-day-summary {
    grid-template-columns: repeat(3, 1fr);
  }
  .activity-day-summary span {
    min-height: 58px;
    padding: 10px;
    font-size: 11px;
  }
  .activity-day-summary strong {
    font-size: 13px;
  }
  .act-week-summary {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .act-week-summary::after {
    order: 3;
    margin-left: 0;
  }
  .act-history-main {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .commission-active-card {
    grid-template-columns: 1fr;
  }
  .act-day-history summary {
    align-items: flex-start;
    flex-direction: column;
  }
  .brand-mark-img {
    border-radius: 50%;
  }
  .brand-mark-img img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
  }
  .sidebar {
    padding: 8px 12px 10px;
  }
  .brand small {
    display: none;
  }
  .brand strong {
    font-size: 15px;
  }
}

/* ── Libro diario — vista admin resumen ──────────────────────────────────── */
.db-report-count {
  font-size: 22px;
  font-weight: 900;
  color: var(--navy);
  display: flex;
  align-items: baseline;
  gap: 5px;
}
.db-report-count small { font-size: 12px; font-weight: 400; color: var(--muted); }

.db-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.db-summary-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-left: 4px solid var(--line);
}
.db-card-ok  { border-left-color: var(--green); }
.db-card-miss { border-left-color: #e5b84b; }

.db-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.db-card-head strong {
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
}
.db-status-badge {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 20px;
  flex-shrink: 0;
}
.db-status-badge.ok   { background: #dcfce7; color: #166534; }
.db-status-badge.miss { background: #fef9c3; color: #854d0e; }

.db-card-stats {
  display: flex;
  gap: 10px;
}
.db-card-stats div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  flex: 1;
  padding: 5px 0;
  background: var(--bg);
  border-radius: 6px;
}
.db-card-stats span {
  font-size: 9px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.db-card-stats b {
  font-size: 18px;
  font-weight: 900;
  color: var(--navy);
  line-height: 1;
}
.db-card-stats b.green { color: var(--green); }
.db-card-stats b.amber { color: #b45309; }

.db-card-obs {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
  padding: 4px 0;
  border-top: 1px solid var(--line);
  font-style: italic;
}
.db-card-pending {
  font-size: 11px;
  color: #b45309;
  margin: 0;
  font-weight: 600;
}

.db-card-detail {
  border-top: 1px solid var(--line);
  padding-top: 6px;
  margin-top: 2px;
}
.db-card-detail summary {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
}
.db-card-detail summary::-webkit-details-marker { display: none; }
.db-card-detail summary::before { content: '▶ '; font-size: 8px; }
.db-card-detail[open] summary::before { content: '▼ '; }

.db-detail-body { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.db-chip-label {
  display: block;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin-bottom: 4px;
}
.db-detail-chips { display: flex; flex-wrap: wrap; gap: 4px; align-items: flex-start; }
.db-detail-section { display: flex; flex-direction: column; gap: 3px; }
.db-mini-note {
  font-size: 11px;
  color: var(--ink);
  padding: 3px 0;
  border-bottom: 1px solid var(--bg);
  line-height: 1.4;
}

.daily-book-toolbar .button.ghost { padding: 8px 12px; font-size: 13px; }

/* ── Actividades proyectadas ─────────────────────────────────────────────── */
.pa-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.pa-week-form { display: flex; align-items: center; gap: 6px; }
.pa-week-form label { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.pa-week-label { font-size: 13px; font-weight: 700; color: var(--navy); margin: 0 auto; }
.pa-empty { padding: 24px 0; text-align: center; }

/* Resumen admin */
.pa-summary-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.pa-summary-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  padding: 4px 10px;
  background: var(--bg);
  border-radius: 20px;
}
.pa-sum-name { font-weight: 700; color: var(--navy); margin-right: 4px; }
.pa-sum-stat { font-weight: 800; font-size: 13px; }
.pa-sum-sep  { color: var(--line); }
.pa-ok-txt   { color: #166534; }
.pa-fail-txt { color: #b91c1c; }
.pa-pend-txt { color: #92400e; }

/* Bloque por comisión (admin) */
.pa-commission-block {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 16px;
  overflow: hidden;
}
.pa-commission-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: #f8fbff;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.pa-commission-head strong { color: var(--navy); font-size: 13px; }
.pa-commission-head span   { color: var(--muted); font-size: 11px; }

.pa-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.pa-table th {
  text-align: left;
  padding: 8px 12px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.pa-table td {
  padding: 8px 12px;
  vertical-align: top;
  border-bottom: 1px solid var(--bg);
  color: var(--ink);
}
.pa-table tr:last-child td { border-bottom: 0; }
.pa-table small { color: var(--muted); line-height: 1.4; display: block; }

/* Observación inline */
.pa-obs-text { display: block; font-size: 11px; color: var(--muted); font-style: italic; margin-bottom: 4px; }
.pa-obs-form { margin-top: 4px; }
.pa-obs-form summary {
  font-size: 10px; font-weight: 700; color: var(--muted); cursor: pointer; list-style: none;
}
.pa-obs-form summary::-webkit-details-marker { display: none; }
.pa-obs-form summary::before { content: '▶ '; font-size: 8px; }
.pa-obs-form[open] summary::before { content: '▼ '; }
.pa-obs-form textarea {
  width: 100%; margin-top: 6px; font-size: 11px;
  border: 1px solid var(--line); border-radius: 6px; padding: 6px; resize: vertical;
}

/* Status badge */
.pa-status-badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 20px;
  font-size: 9px; font-weight: 800;
  letter-spacing: .05em; text-transform: uppercase;
  white-space: nowrap;
}
.pa-pend { background: #fef9c3; color: #854d0e; }
.pa-ok   { background: #dcfce7; color: #166534; }
.pa-fail { background: #fee2e2; color: #991b1b; }

/* Formulario comisión */
.pa-form-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 18px;
}
.pa-form-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
}
.pa-form-head h2 { margin: 0; font-size: 16px; }
.pa-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}
.pa-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
.pa-field span { font-weight: 700; color: var(--navy); }
.pa-field input, .pa-field select, .pa-field textarea {
  border: 1px solid var(--line); border-radius: 6px;
  padding: 7px 10px; font-size: 13px;
}
.pa-field-full { grid-column: 1 / -1; }
.pa-submit-row { margin-top: 12px; display: flex; justify-content: flex-end; }
.req { color: var(--red); font-style: normal; }

/* Cards comisión */
.pa-list-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
}
.pa-list-head {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px;
}
.pa-list-head h2 { margin: 0; font-size: 16px; }
.pa-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.pa-card {
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 6px;
  border-left: 4px solid var(--line);
}
.pa-card-cumplida  { border-left-color: #16a34a; }
.pa-card-no_cumplida { border-left-color: #dc2626; }
.pa-card-pendiente { border-left-color: #d97706; }
.pa-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.pa-case { font-size: 13px; color: var(--navy); }
.pa-type-label { font-size: 11px; color: var(--muted); margin: 0; }
.pa-resp  { font-size: 11px; color: var(--muted); margin: 0; }
.pa-desc  { font-size: 12px; color: var(--ink); margin: 0; line-height: 1.4; }
.pa-chief-obs {
  font-size: 11px; color: #1e40af; background: #eff6ff;
  border-radius: 6px; padding: 5px 8px;
}
.pa-chief-obs span { font-weight: 700; }
.pa-actions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.pa-btn-ok   { background: #dcfce7 !important; color: #166534 !important; border-color: #86efac !important; }
.pa-btn-fail { background: #fee2e2 !important; color: #991b1b !important; border-color: #fca5a5 !important; }

/* Dashboard widget */
.pa-dashboard-widget {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 16px;
  margin-top: 16px;
}
.pa-dw-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.pa-dw-head strong { font-size: 13px; color: var(--navy); }
.pa-dw-link { font-size: 12px; color: var(--navy); font-weight: 600; }
.pa-dw-summary { display: flex; flex-direction: column; gap: 6px; }
.pa-dw-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; padding: 5px 0;
  border-bottom: 1px solid var(--bg);
}
.pa-dw-comm  { font-weight: 700; color: var(--navy); font-size: 11px; }
.pa-dw-stats { font-size: 11px; color: var(--muted); }
.pa-dw-cards { display: flex; flex-direction: column; gap: 6px; }
.pa-dw-item  { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.pa-dw-item div { display: flex; flex-direction: column; gap: 1px; }
.pa-dw-item b  { color: var(--navy); font-size: 12px; }
.pa-dw-item small { color: var(--muted); font-size: 10px; }
.pa-dw-more  { font-size: 11px; color: var(--muted); text-align: center; padding-top: 4px; display: block; }

@media (max-width: 820px) {
  .pa-form-grid { grid-template-columns: 1fr; }
  .pa-toolbar { gap: 6px; }
  .pa-week-label { display: none; }
}

.pa-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 4px 12px;
  padding: 8px 0;
}
.pa-check-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  cursor: pointer;
  padding: 3px 0;
  color: var(--ink);
}
.pa-check-item input[type="checkbox"] { width: 14px; height: 14px; cursor: pointer; }

/* Tarea asignada por jefe */
.pa-task-text { display: block; font-size: 11px; color: #1e40af; margin-bottom: 4px; }
.pa-task-form { margin-top: 2px; }
.pa-task-form summary {
  font-size: 10px; color: var(--muted); cursor: pointer; list-style: none;
  opacity: 0.6;
}
.pa-task-form summary::-webkit-details-marker { display: none; }
.pa-task-form summary::before { content: '▸ '; font-size: 8px; }
.pa-task-form[open] summary::before { content: '▾ '; }
.pa-task-form[open] summary { opacity: 1; }
.pa-task-form textarea {
  width: 100%; margin-top: 4px; font-size: 11px;
  border: 1px solid var(--line); border-radius: 6px; padding: 5px; resize: vertical;
}
.pa-chief-task {
  font-size: 11px; color: #1e40af; background: #eff6ff;
  border-radius: 6px; padding: 5px 8px; border-left: 2px solid #93c5fd;
}
.pa-chief-task span { font-weight: 700; }

/* ── Top días en servicio (dashboard) ───────────────────────────────────── */
.ts-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  margin-top: 16px;
}
.ts-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.ts-title { font-size: 12px; font-weight: 700; color: var(--navy); text-transform: uppercase; letter-spacing: .04em; }
.ts-link  { font-size: 11px; color: var(--navy); }
.ts-list  { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ts-item  { display: flex; align-items: center; gap: 8px; font-size: 12px; padding: 3px 0; border-bottom: 1px solid var(--bg); }
.ts-item:last-child { border-bottom: 0; }
.ts-days  { min-width: 36px; text-align: center; font-weight: 800; font-size: 11px; padding: 2px 6px; border-radius: 20px; }
.ts-red    { background: #fee2e2; color: #991b1b; }
.ts-orange { background: #ffedd5; color: #9a3412; }
.ts-yellow { background: #fef9c3; color: #854d0e; }
.ts-ok     { background: #f0fdf4; color: #166534; }
.ts-name  { flex: 1; color: var(--ink); }
.ts-comm  { font-size: 10px; color: var(--muted); }

/* ── Inicio servicio (officials list) ───────────────────────────────────── */
.ss-form {
  display: flex;
  align-items: center;
  gap: 4px;
}
.ss-date-input {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 3px 5px;
  font-size: 11px;
  color: var(--ink);
  background: var(--bg);
  width: 120px;
}
.ss-days {
  font-size: 10px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 20px;
  white-space: nowrap;
}
.ss-save {
  background: none;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 2px 6px;
  font-size: 11px;
  cursor: pointer;
  color: var(--muted);
}
.ss-save:hover { background: var(--bg); color: var(--ink); }

/* ── KPI integrado con novedades ────────────────────────────────────────── */
.kpi-integrated {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.kpi-main {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-left: 4px solid var(--line);
}
.kpi-main.kpi-servicio { border-left-color: #16a34a; }
.kpi-main.kpi-novedad  { border-left-color: #d97706; }
.kpi-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.kpi-number {
  font-size: 32px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.1;
}
.kpi-people {
  list-style: none;
  margin: 6px 0 0;
  padding: 6px 0 0;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.kpi-people li { display: flex; flex-direction: column; gap: 1px; }
.kpi-name  { font-size: 11px; font-weight: 700; color: var(--ink); }
.kpi-dates { font-size: 10px; color: var(--muted); }

@media (max-width: 820px) {
  .kpi-integrated { grid-template-columns: 1fr 1fr; }
  .kpi-number { font-size: 26px; }
}

/* ── Novedades desplegables ─────────────────────────────────────────────── */
.nov-details {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 16px;
  overflow: hidden;
}
.nov-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.nov-summary::-webkit-details-marker { display: none; }
.nov-title { font-size: 13px; font-weight: 700; color: var(--navy); }
.nov-count  { font-size: 12px; color: var(--muted); margin-left: auto; }
.nov-arrow  { font-size: 10px; color: var(--muted); }
.nov-arrow::before { content: '▶'; }
.nov-details[open] .nov-arrow::before { content: '▼'; }
.nov-body { padding: 0 14px 14px; }

/* ── KPI con novedades desplegables ─────────────────────────────────────── */
.kpi-has-nov { border-top-color: #d97706; }
.kpi-nov-toggle {
  margin-top: 6px;
  border-top: 1px dashed var(--line);
  padding-top: 5px;
}
.kpi-nov-toggle > summary {
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
}
.kpi-nov-toggle > summary::-webkit-details-marker { display: none; }
.kpi-nov-toggle > summary::after { content: ' ▾'; font-size: 9px; }
.kpi-nov-toggle[open] > summary::after { content: ' ▴'; }
.kpi-nov-toggle > summary b { color: var(--navy); }
.kpi-nov-list {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.kpi-nov-list li { display: flex; flex-direction: column; gap: 1px; }
.kpi-nov-name  { font-size: 11px; font-weight: 700; color: var(--ink); }
.kpi-nov-dates { font-size: 10px; color: var(--muted); }

/* ── Dashboard top: KPIs + comisiones integrados ────────────────────────── */
.dash-top { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }

/* fila de KPIs */
.kpi-row { display: flex; gap: 10px; align-items: stretch; }

.kpi-total {
  background: var(--navy);
  color: #fff;
  border-radius: 10px;
  padding: 16px 20px;
  min-width: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  flex-shrink: 0;
}
.kpi-total .kpi-lbl { font-size: 11px; font-weight: 600; opacity: .7; text-transform: uppercase; letter-spacing: .05em; }
.kpi-num-big { font-size: 48px; font-weight: 900; line-height: 1; color: #fff; }

.kpi-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
}
.kpi-stat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 110px;
  flex: 1;
  border-top: 3px solid var(--line);
}
.kpi-stat.kpi-stat-ok  { border-top-color: #16a34a; }
.kpi-stat.kpi-stat-nov { border-top-color: #d97706; }
.kpi-stat .kpi-lbl { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.kpi-num { font-size: 28px; font-weight: 800; color: var(--navy); line-height: 1.1; }

/* mapa de comisiones integrado */
.comm-map-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}
.cm-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.cm-summary {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.cm-summary::-webkit-details-marker { display: none; }
.cm-card[open] .cm-summary { border-bottom: 1px solid var(--line); background: #f8fbff; }
.cm-name { font-size: 12px; font-weight: 700; color: var(--navy); line-height: 1.2; }
.cm-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
}
.cm-strip span b { color: var(--navy); font-weight: 800; }
.cm-total { font-size: 12px; font-weight: 800; color: var(--navy); margin-left: auto; }
.cm-detail { padding: 10px 12px; display: flex; flex-direction: column; gap: 10px; }
.cm-group-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 5px; }
.cm-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.cm-chip {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--bg);
  border-radius: 6px;
  padding: 4px 7px;
  border-left: 3px solid var(--line);
}
.cm-chip-servicio { border-left-color: #16a34a; }
.cm-chip-vacaciones, .cm-chip-excusa_servicio, .cm-chip-comision_estudio, .cm-chip-incapacidad { border-left-color: #d97706; }
.cm-chip-name  { font-size: 11px; font-weight: 700; color: var(--ink); }
.cm-chip-badge { font-size: 9px; color: var(--muted); }

@media (max-width: 820px) {
  .kpi-row { flex-direction: column; }
  .kpi-total { flex-direction: row; align-items: center; justify-content: space-between; min-width: unset; }
  .kpi-num-big { font-size: 36px; }
  .comm-map-row { grid-template-columns: 1fr 1fr; }
}

/* ── service-area select ─────────────────────────────────────────────────── */
.sa-select {
  font-size: 11px;
  padding: 2px 4px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.sa-select:hover { border-color: var(--primary); }

/* ── reassign commission ─────────────────────────────────────────────────── */
.reassign-details { display: inline-block; }
.reassign-summary {
  font-size: 12px;
  cursor: pointer;
  color: var(--text);
  list-style: none;
}
.reassign-summary::after { content: ' ▾'; opacity: .5; font-size: 10px; }
.reassign-details[open] .reassign-summary::after { content: ' ▴'; }
.reassign-form {
  display: flex;
  gap: 4px;
  align-items: center;
  margin-top: 4px;
  padding: 6px;
  background: var(--surface-alt, #f8fafc);
  border: 1px solid var(--border);
  border-radius: 6px;
  position: absolute;
  z-index: 10;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
}
.reassign-select {
  font-size: 12px;
  padding: 3px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  max-width: 200px;
}
.reassign-btn {
  font-size: 12px;
  padding: 3px 10px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.reassign-btn:hover { opacity: .85; }

/* ══════════════════════════════════════════════════════════════════
   Officials list — admin redesign
   ══════════════════════════════════════════════════════════════════ */
.ofl-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
}
.ofl-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  gap: 12px;
}
.ofl-header-left { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ofl-title { font-size: 15px; font-weight: 700; margin: 0; color: var(--text); }
.ofl-count {
  font-size: 12px;
  color: var(--text-muted, #6b7280);
  background: var(--surface-alt, #f1f5f9);
  border-radius: 20px;
  padding: 2px 10px;
}
.ofl-hint { font-size: 12px; color: var(--text-muted, #6b7280); font-style: italic; }
.ofl-save-btn {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 16px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}
.ofl-save-btn:hover { opacity: .85; }
.ofl-save-btn:disabled { opacity: .5; cursor: not-allowed; }
.ofl-reorder-btn { font-size: 12px; font-weight: 600; padding: 6px 16px; white-space: nowrap; }
.ofl-dup-warning {
  font-size: 12px;
  font-weight: 700;
  color: #b91c1c;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  border-radius: 6px;
  padding: 4px 10px;
  white-space: nowrap;
}

/* Scrollable table wrapper */
.ofl-table-wrap { overflow-x: auto; }

.ofl-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

/* Sticky header */
.ofl-th {
  position: sticky;
  top: 0;
  background: var(--surface-alt, #f8fafc);
  border-bottom: 2px solid var(--border);
  padding: 9px 12px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-muted, #64748b);
  white-space: nowrap;
  z-index: 1;
}
.ofl-th-order { width: 90px; }
.ofl-th-actions { width: 60px; }

/* Rows */
.ofl-row {
  border-bottom: 1px solid var(--border);
  transition: background .12s;
}
.ofl-row:hover { background: color-mix(in srgb, var(--primary) 4%, transparent); }
.ofl-row:last-child { border-bottom: none; }

/* Status color on left border */
.ofl-row-nov { border-left: 3px solid #f59e0b; }
.ofl-row:not(.ofl-row-nov) { border-left: 3px solid transparent; }
.ofl-row-moved { background: color-mix(in srgb, var(--primary) 14%, transparent); transition: background .8s ease; }
.ofl-row-dup { background: #fee2e2 !important; border-left: 3px solid #dc2626 !important; }
.ofl-row-dup:hover { background: #fecaca !important; }

.ofl-td { padding: 10px 12px; vertical-align: middle; }

/* # + Tipo column */
.ofl-td-order { padding: 10px 8px; }
.ofl-order-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.ofl-num {
  width: 44px;
  font-size: 12px;
  padding: 3px 5px;
  border: 1px solid var(--border);
  border-radius: 4px;
  text-align: center;
  background: var(--surface);
  color: var(--text);
}
.ofl-num-dup { border-color: #dc2626; background: #fee2e2; color: #b91c1c; font-weight: 700; }
.ofl-cat {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 4px;
  border: 1px solid #334155;
  border-radius: 4px;
  background: #1e293b;
  color: #e2e8f0;
  cursor: pointer;
  width: 52px;
}

/* Persona column */
.ofl-td-person { min-width: 180px; }
.ofl-chapa {
  display: inline-block;
  font-family: monospace;
  font-size: 11px;
  font-weight: 700;
  background: #1e293b;
  color: #e2e8f0;
  padding: 1px 7px;
  border-radius: 4px;
  margin-bottom: 3px;
  letter-spacing: .03em;
}
.ofl-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.ofl-birth {
  display: block;
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
  margin-top: 1px;
}
.ofl-inactive-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  background: #dc2626;
  color: #fff;
  border-radius: 3px;
  padding: 1px 5px;
  margin-left: 4px;
  vertical-align: middle;
}
.ofl-pending-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  background: #f59e0b;
  color: #fff;
  border-radius: 3px;
  padding: 1px 5px;
  margin-left: 4px;
  vertical-align: middle;
}

/* Comisión + Área column */
.ofl-td-comm { min-width: 160px; }
.ofl-comm-name { font-size: 12px; font-weight: 600; }
.ofl-area-select { margin-top: 4px; }

/* Status select with color coding */
.ofl-td-status { min-width: 130px; }
.ofl-status-select {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 5px;
  border: 1px solid var(--border);
  cursor: pointer;
  width: 100%;
}
.ofl-status-servicio  { background: #dcfce7; color: #166534; border-color: #86efac; }
.ofl-status-vacaciones { background: #dbeafe; color: #1e40af; border-color: #93c5fd; }
.ofl-status-comision_estudio,
.ofl-status-comision_de_estudio { background: #fef9c3; color: #854d0e; border-color: #fde047; }
.ofl-status-excusa_servicio,
.ofl-status-excusa_del_servicio { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.ofl-status-incapacidad { background: #fce7f3; color: #9d174d; border-color: #f9a8d4; }
.ofl-status-permiso { background: #f3e8ff; color: #6b21a8; border-color: #d8b4fe; }
.ofl-status-mision { background: #ffedd5; color: #9a3412; border-color: #fdba74; }
.ofl-status-detenido { background: #fef2f2; color: #7f1d1d; border-color: #fecaca; }

/* Servicio column */
.ofl-td-svc { min-width: 150px; }

/* Actions column */
.ofl-td-actions { text-align: center; }
.ofl-edit-btn {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  padding: 4px 10px;
  border: 1px solid var(--primary);
  border-radius: 5px;
  white-space: nowrap;
  transition: background .12s, color .12s;
}
.ofl-edit-btn:hover { background: var(--primary); color: #fff; }

@media (max-width: 768px) {
  .ofl-td-person .ofl-birth { display: none; }
  .ofl-th, .ofl-td { padding: 8px 8px; }
}

/* ── Birthday chips strip ────────────────────────────────────────────────── */
.bday-strip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
}
.bday-strip-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.bday-strip-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted, #64748b);
}
.bday-strip-count {
  font-size: 11px;
  font-weight: 700;
  background: #fef3c7;
  color: #92400e;
  border-radius: 20px;
  padding: 1px 8px;
}
.bday-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.bday-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--surface-alt, #f8fafc);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 10px 4px 7px;
  font-size: 12px;
  line-height: 1;
}
.bday-chip-today {
  background: #fef9c3;
  border-color: #fde047;
}
.bday-chip-icon { font-size: 14px; line-height: 1; }
.bday-chip-name { font-weight: 700; color: var(--text); }
.bday-chip-date { color: var(--text-muted, #94a3b8); font-size: 11px; }

/* ── Activities v2 redesign ──────────────────────────────────────────────── */

/* Week navigation bar */
/* ═══════════════════════════════════════════════════════════════════════════
   MÓDULO ANOTACIONES — diseño ejecutivo v2
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Week nav ────────────────────────────────────────────────────────────── */
.act-week-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 14px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(24,49,83,.06);
}
.act-week-arrow {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
  white-space: nowrap;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  transition: all .15s;
}
.act-week-arrow:hover { background: var(--bg); border-color: var(--navy); }
.act-week-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.act-week-form { display: flex; gap: 6px; align-items: center; }
.act-week-date-input {
  border: 1.5px solid var(--line);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 13px;
  background: var(--bg);
  color: var(--ink);
  transition: border-color .15s;
}
.act-week-date-input:focus { outline: none; border-color: var(--navy); }
.act-week-go {
  padding: 5px 12px;
  border: 1.5px solid var(--navy);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: var(--navy);
  color: #fff;
  transition: opacity .15s;
}
.act-week-go:hover { opacity: .85; }
.act-week-range {
  font-size: 12px;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: .01em;
}

/* ── Stats strip ─────────────────────────────────────────────────────────── */
.act-stats-strip {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}
.act-stat-chip {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 10px;
  box-shadow: 0 1px 4px rgba(24,49,83,.05);
  transition: box-shadow .15s;
}
.act-stat-chip:hover { box-shadow: 0 3px 10px rgba(24,49,83,.10); }
.act-stat-open { border-top: 3px solid #16a34a; }
.act-stat-closed { border-top: 3px solid var(--muted); }
.act-stat-num { font-size: 26px; font-weight: 800; color: var(--navy); line-height: 1; }
.act-stat-lbl { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }

/* ── Section labels ──────────────────────────────────────────────────────── */
.act-section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  margin-bottom: 10px;
}
.act-section-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.act-dot-open { background: #16a34a; }
.act-count-badge {
  background: var(--line);
  border-radius: 20px;
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}

/* ── Open activity cards ─────────────────────────────────────────────────── */
.act-open-section { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.act-open-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(24,49,83,.07);
  transition: box-shadow .15s, transform .15s;
}
.act-open-card:hover { box-shadow: 0 4px 16px rgba(24,49,83,.12); transform: translateY(-1px); }
.act-open-card-stripe { height: 5px; flex-shrink: 0; }
.act-open-card-body { padding: 16px 18px; }
.act-open-top {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.act-open-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: var(--ink);
  margin-left: auto;
}
.act-meta-date { font-weight: 700; color: var(--navy); }
.act-meta-time { color: var(--muted); font-size: 12px; }
.act-meta-commission {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}
.act-open-footer { margin-top: 14px; }
.act-close-toggle-btn {
  background: none;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--navy);
  transition: all .15s;
}
.act-close-toggle-btn:hover { border-color: var(--navy); background: var(--bg); }
.act-no-officials { font-size: 12px; color: var(--muted); font-style: italic; }

/* Close form inside card */
.act-close-form {
  border-top: 1px solid var(--line);
  background: var(--bg);
  padding: 16px 18px;
}
.act-close-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.act-close-fields .act-novedad-field { grid-column: 1 / -1; }
.act-close-actions { display: flex; gap: 8px; }

/* ── Route display in activity cards ─────────────────────────────────────── */
.act-route-display {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-bottom: 10px;
}
.route-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.route-tag small { font-size: 10px; font-weight: 400; opacity: .7; margin-left: 2px; }
.route-tag-start { background: #dcfce7; color: #15803d; }
.route-tag-stop  { background: #fef3c7; color: #92400e; }
.route-tag-end   { background: #fee2e2; color: #b91c1c; }
.route-tag-arrow { color: var(--muted); font-size: 14px; }
.act-desplaz-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.act-transport-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
  border: 1px solid;
}
.act-transport-tag-vehiculo_particular { background: #fff8f0; border-color: #fdba74; color: #c45c00; }
.act-transport-tag-servicio_publico    { background: #e0f2fe; border-color: #7dd3fc; color: #0369a1; }
.act-transport-tag-vuelo               { background: #f3e5f5; border-color: #ce93d8; color: #6a1b9a; }
.act-return-tag {
  font-size: 12px;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 3px 9px;
}

/* ── Activity type pills ─────────────────────────────────────────────────── */
.act-type-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 20px;
  padding: 4px 11px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  border: 1.5px solid transparent;
  letter-spacing: .01em;
}
.act-pill-recibo_servicio   { background: #e0f2fe; border-color: #7dd3fc; color: #0369a1; }
.act-pill-entrega_servicio  { background: #fce7f3; border-color: #f9a8d4; color: #be185d; }
.act-pill-desplazamiento    { background: #fff7ed; border-color: #fdba74; color: #c45c00; }
.act-pill-novedad           { background: #fff1f2; border-color: #fca5a5; color: #b71c1c; }
.act-pill-cita_medica       { background: #f0fdfa; border-color: #99f6e4; color: #0d9488; }
.act-pill-revista           { background: #f5f3ff; border-color: #c4b5fd; color: #6d28d9; }
.act-pill-entrevista_fuente { background: #eff6ff; border-color: #93c5fd; color: #1d4ed8; }
.act-pill-reunion           { background: #f0f4ff; border-color: #a5b4fc; color: #3730a3; }
.act-pill-control           { background: #eff6ff; border-color: #7baaf7; color: #1a56cc; }
.act-pill-otro              { background: var(--bg); border-color: var(--line); color: var(--muted); }
.act-pill-admin             { background: #f5f3ff; border-color: #c4b5fd; color: #6d28d9; }
.act-pill-radiolocalizacion { background: #f0fdfa; border-color: #80cbc4; color: #00695c; }
.act-pill-entrevista        { background: #eff6ff; border-color: #93c5fd; color: #1d4ed8; }

/* ── Color stripes on cards ──────────────────────────────────────────────── */
.act-stripe-recibo_servicio   { background: linear-gradient(90deg, #0369a1, #0ea5e9); }
.act-stripe-entrega_servicio  { background: linear-gradient(90deg, #be185d, #ec4899); }
.act-stripe-desplazamiento    { background: linear-gradient(90deg, #c45c00, #f97316); }
.act-stripe-novedad           { background: linear-gradient(90deg, #b71c1c, #ef4444); }
.act-stripe-cita_medica       { background: linear-gradient(90deg, #0d9488, #14b8a6); }
.act-stripe-revista           { background: linear-gradient(90deg, #6d28d9, #8b5cf6); }
.act-stripe-entrevista_fuente { background: linear-gradient(90deg, #1d4ed8, #3b82f6); }
.act-stripe-reunion           { background: linear-gradient(90deg, #3730a3, #6366f1); }
.act-stripe-control           { background: linear-gradient(90deg, #1a56cc, #3b82f6); }
.act-stripe-otro              { background: var(--muted); }
.act-stripe-admin             { background: linear-gradient(90deg, #6d28d9, #8b5cf6); }
.act-stripe-radiolocalizacion { background: linear-gradient(90deg, #00695c, #14b8a6); }
.act-stripe-entrevista        { background: linear-gradient(90deg, #1d4ed8, #3b82f6); }

/* ── Officials chips ─────────────────────────────────────────────────────── */
.act-officials-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.act-chip-named {
  display: inline-flex;
  flex-direction: column;
  gap: 0;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 9px;
}
.act-chip-scale { font-size: 11px; font-weight: 800; color: var(--navy); }
.act-chip-name  { font-size: 10px; color: var(--muted); }
.act-open-notes {
  font-size: 13px;
  color: var(--ink);
  margin: 8px 0 0;
  line-height: 1.5;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}
.act-note-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-right: 4px; }

/* ── Create panel ────────────────────────────────────────────────────────── */
.act-create-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(24,49,83,.06);
  margin-bottom: 16px;
}
.act-create-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px 10px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, #f8faff 0%, var(--bg) 100%);
}
.act-create-header h2 { font-size: 14px; font-weight: 700; color: var(--navy); margin: 0; }
.act-create-sub { font-size: 11px; color: var(--muted); margin: 2px 0 0; }

/* ── Form steps ──────────────────────────────────────────────────────────── */
.act-form-step {
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}
.act-form-step:last-of-type { border-bottom: none; }
.act-step-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin-bottom: 10px;
}
.act-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px; height: 18px;
  background: var(--navy);
  color: #fff;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 800;
  flex-shrink: 0;
}
.act-step-num-route { background: #c45c00; }
.act-step-num-nov   { background: #b71c1c; }
.act-step-num-sub   { background: var(--muted); }
.act-step-label-warn .act-step-num { background: #e53e3e; }

/* ── Type selector ───────────────────────────────────────────────────────── */
.act-type-select {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--line);
  border-radius: 9px;
  font-size: 14px;
  font-weight: 500;
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.act-type-select:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(24,49,83,.08); }

/* ── Entrega / Recibo panels ─────────────────────────────────────────────── */
.act-entrega-panel { background: #f8faff; }
.act-entrega-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 10px;
}
.act-entrega-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.act-entrega-select {
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.act-entrega-select:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(24,49,83,.08); }
.act-entrega-hint {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
}

/* ── Official picker ─────────────────────────────────────────────────────── */
.official-card-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.official-card-scale { font-size: 12px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.official-card-name { font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act-commission-error,
.act-same-person-error {
  font-size: 13px;
  color: #b91c1c;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  padding: 8px 12px;
  margin: 8px 0 0;
}

/* ── Details fields ──────────────────────────────────────────────────────── */
.act-details-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 2px;
}
.act-detail-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  min-width: 0;
}
.act-detail-field input,
.act-detail-field select,
.act-detail-field textarea {
  padding: 8px 10px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  background: var(--bg);
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
  min-width: 0; width: 100%;
}
.act-detail-field input:focus,
.act-detail-field select:focus,
.act-detail-field textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(24,49,83,.08); }
.act-notes-field { width: 100%; margin-top: 10px; }
.act-notes-field textarea { resize: vertical; min-height: 60px; }

/* ── Route builder ───────────────────────────────────────────────────────── */
.act-route-inline {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}
.act-route-inline-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #c45c00;
  margin-bottom: 12px;
}
.act-transport-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.act-transport-opt { display: contents; }
.act-transport-opt input[type="radio"] { display: none; }
.act-transport-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 2px solid var(--line);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  background: var(--paper);
  transition: all .15s;
  white-space: nowrap;
}
.act-transport-opt input:checked + .act-transport-vehiculo_particular { border-color: #c45c00; background: #fff8f0; color: #c45c00; }
.act-transport-opt input:checked + .act-transport-servicio_publico    { border-color: #0369a1; background: #e0f2fe; color: #0369a1; }
.act-transport-opt input:checked + .act-transport-vuelo               { border-color: #6d28d9; background: #f5f3ff; color: #6d28d9; }

.route-builder { position: relative; padding-left: 32px; }
.route-builder::before { content: ''; position: absolute; left: 9px; top: 24px; bottom: 24px; width: 2px; background: var(--line); }
.route-step { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 8px 0; }
.route-node { position: absolute; left: -27px; display: flex; flex-direction: column; align-items: center; }
.route-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid; flex-shrink: 0; }
.route-dot-start { border-color: #16a34a; background: #16a34a; }
.route-dot-end   { border-color: #dc2626; background: #dc2626; }
.route-dot-stop  { border-color: #f59e0b; background: #f59e0b; }
.route-connector { width: 2px; flex: 1; }
.route-field { width: 100%; }
.route-field label { display: flex; flex-direction: column; gap: 5px; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.route-city-input {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  background: var(--bg);
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.route-city-input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(24,49,83,.08); }
.route-stop-body { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; width: 100%; }
.route-stop-date { flex-shrink: 0; border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 12px; font-size: 13px; background: var(--bg); color: var(--ink); }
.route-stop-date:focus { outline: none; border-color: var(--navy); }
.route-rm-stop-btn { padding: 8px 11px; border: 1.5px solid var(--line); border-radius: 8px; cursor: pointer; color: var(--muted); background: transparent; font-size: 12px; flex-shrink: 0; transition: all .15s; }
.route-rm-stop-btn:hover { border-color: #dc2626; color: #dc2626; background: #fff1f2; }
.route-add-stop-btn { display: block; width: calc(100% + 32px); margin-left: -32px; margin-top: 10px; padding: 9px 12px; border: 1.5px dashed var(--line); border-radius: 10px; cursor: pointer; background: transparent; color: #c45c00; font-size: 13px; font-weight: 600; text-align: center; transition: all .15s; }
.route-add-stop-btn:hover { border-color: #c45c00; background: #fff8f0; }

/* ── Vehicle list builder ────────────────────────────────────────────────── */
.act-vehicle-list-section { margin-top: 16px; }
.vehicle-section-label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; }
.vehicle-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.vehicle-plate-input { flex: 1; min-width: 0; font-family: monospace; text-transform: uppercase; letter-spacing: .08em; font-size: 14px; font-weight: 600; padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); transition: border-color .15s; }
.vehicle-plate-input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(24,49,83,.08); }
.vehicle-rm-btn { flex-shrink: 0; background: none; border: 1.5px solid var(--line); border-radius: 8px; color: var(--muted); font-size: 13px; padding: 7px 10px; cursor: pointer; transition: all .15s; }
.vehicle-rm-btn:hover { background: #fee2e2; color: #b91c1c; border-color: #fca5a5; }
.act-add-row-btn { display: block; width: 100%; margin-top: 4px; padding: 9px 12px; border: 1.5px dashed var(--line); border-radius: 10px; cursor: pointer; background: transparent; color: #c45c00; font-size: 13px; font-weight: 600; text-align: center; transition: all .15s; }
.act-add-row-btn:hover { border-color: #c45c00; background: #fff8f0; }
.act-vehicle-label { font-size: 12px; color: var(--muted); margin-left: 4px; }
@media (max-width: 480px) { .vehicle-row { flex-wrap: wrap; } .vehicle-plate-input { flex: 1 1 100%; } }

/* ── Novedad section ─────────────────────────────────────────────────────── */
.act-novedad-step { background: #fff9f9; }
.act-novedad-grid { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.act-novedad-notice { padding: 11px 14px; background: #fff8e1; border: 1px solid #fbbf24; border-radius: 10px; font-size: 12px; color: #92400e; line-height: 1.5; }
.act-novedad-type-badge { display: inline-block; background: #fff1f2; border: 1px solid #fca5a5; color: #b71c1c; border-radius: 12px; padding: 2px 9px; font-size: 11px; font-weight: 700; }
.act-subtype-step { background: #f8faff; }
.act-subtype-select { border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 14px; font-size: 14px; min-width: 220px; background: var(--paper); color: var(--ink); }
.act-subtype-select:focus { outline: none; border-color: var(--navy); }
.act-subtype-badge { display: inline-flex; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: 20px; padding: 2px 9px; font-size: 11px; font-weight: 700; color: var(--navy); }

/* ── Submit row ──────────────────────────────────────────────────────────── */
.act-submit-row { padding: 12px 18px; display: flex; justify-content: flex-end; }
.act-submit-btn { min-width: 160px; padding: 10px 20px; font-size: 14px; font-weight: 700; }

/* ── History panel ───────────────────────────────────────────────────────── */
.act-history-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(24,49,83,.06);
  margin-top: 20px;
}
.act-history-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  gap: 12px;
  user-select: none;
  background: linear-gradient(135deg, #f8faff 0%, var(--bg) 100%);
  list-style: none;
}
.act-history-summary::-webkit-details-marker { display: none; }
.act-history-summary strong { font-size: 15px; font-weight: 700; color: var(--navy); }
.act-history-summary small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.act-history-body { padding: 0 16px 16px; }
.act-day-group { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-top: 12px; }
.act-day-group-summary { display: flex; align-items: center; justify-content: space-between; padding: 11px 16px; cursor: pointer; background: var(--bg); user-select: none; }
.act-day-group-summary::-webkit-details-marker { display: none; }
.act-day-label { font-size: 13px; font-weight: 700; color: var(--navy); text-transform: capitalize; }
.act-day-count { font-size: 12px; color: var(--muted); background: var(--line); border-radius: 20px; padding: 2px 9px; }
.act-day-items { display: flex; flex-direction: column; gap: 8px; padding: 12px; }
.act-history-item {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  transition: box-shadow .15s;
}
.act-history-item:hover { box-shadow: 0 2px 8px rgba(24,49,83,.08); }
.act-history-item-stripe { width: 4px; flex-shrink: 0; }
.act-history-item-body { padding: 11px 14px; flex: 1; }
.act-history-item-top { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.act-history-note { font-size: 12px; color: var(--ink); margin-top: 8px; line-height: 1.5; border-top: 1px solid var(--line); padding-top: 7px; }
.act-history-note b { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-right: 3px; }

/* ── Activities mobile ───────────────────────────────────────────────────── */
@media (max-width: 820px) {
  .act-week-nav { padding: 8px 12px; border-radius: 12px; }
  .act-week-arrow { font-size: 12px; padding: 5px 10px; }
  .act-week-range { font-size: 12px; }
  .act-stats-strip { gap: 8px; margin-bottom: 12px; }
  .act-stat-num { font-size: 20px; }
  .act-stat-chip { padding: 10px 8px; border-radius: 10px; }
  .act-open-card { border-radius: 12px; }
  .act-open-card-body { padding: 12px 14px; }
  .act-open-meta { margin-left: 0; }
  .act-close-toggle-btn { width: 100%; text-align: center; }
  .act-create-panel { border-radius: 12px; }
  .act-create-header { padding: 10px 14px 9px; }
  .act-form-step { padding: 10px 14px; }
  .act-step-label { margin-bottom: 8px; }
  .act-type-select { font-size: 14px; padding: 8px 11px; }
  .official-card-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  /* fecha + hora: siempre 2 columnas, inputs más compactos */
  .act-details-row { grid-template-columns: 1fr 1fr; gap: 8px; }
  .act-detail-field input,
  .act-detail-field select { padding: 7px 8px; font-size: 13px; }
  .act-entrega-row { grid-template-columns: 1fr 1fr; gap: 8px; }
  .act-transport-btn { font-size: 12px; padding: 6px 10px; }
  .route-builder { padding-left: 26px; }
  .route-node { left: -21px; }
  .act-submit-row { padding: 10px 14px; }
  .act-submit-btn { width: 100%; font-size: 13px; padding: 10px 16px; }
  .act-history-panel { border-radius: 12px; }
  .act-history-summary { padding: 12px 14px; }
  .act-history-body { padding: 0 8px 10px; }
  .act-close-fields { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .act-week-nav { gap: 6px; padding: 7px 8px; }
  .act-week-arrow { padding: 4px 7px; font-size: 11px; }
  .act-stats-strip { gap: 5px; }
  .act-stat-chip { padding: 8px 6px; }
  .act-stat-num { font-size: 18px; }
  .act-stat-lbl { font-size: 9px; }
  /* fecha + hora: par conectado tipo pill */
  .act-details-row {
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
  }
  .act-details-row .act-detail-field { padding: 9px 12px 10px; }
  .act-details-row .act-detail-field:first-child { border-right: 1px solid var(--line); }
  .act-details-row .act-detail-field input {
    border: none !important;
    box-shadow: none !important;
    padding: 3px 0;
    background: transparent;
    font-size: 13px;
  }
  /* cierre: mismo tratamiento */
  .act-close-fields {
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
  }
  .act-close-fields .act-detail-field:not(.act-novedad-field) { padding: 9px 12px 10px; }
  .act-close-fields .act-detail-field:not(.act-novedad-field):first-child { border-right: 1px solid var(--line); }
  .act-close-fields .act-detail-field:not(.act-novedad-field) input {
    border: none !important;
    box-shadow: none !important;
    padding: 3px 0;
    background: transparent;
    font-size: 13px;
  }
  .act-close-fields .act-novedad-field { grid-column: 1 / -1; border-top: 1px solid var(--line); padding: 10px 12px; }
  .act-close-fields .act-novedad-field textarea {
    border: none !important;
    box-shadow: none !important;
    padding: 4px 0;
    background: transparent;
    resize: none;
    font-size: 13px;
  }
  .act-detail-field input,
  .act-detail-field select { font-size: 12px; }
  .act-entrega-row { grid-template-columns: 1fr; }
  .act-transport-row { gap: 4px; }
  .act-transport-btn { font-size: 11px; padding: 6px 9px; }
  .act-create-header h2 { font-size: 13px; }
  .act-submit-btn { font-size: 13px; padding: 10px 14px; }
  .act-history-item-body { padding: 9px 10px; }
  .act-type-pill { font-size: 11px; padding: 3px 8px; }
}

/* ── Módulo Parte Semanal ─────────────────────────────────────────────────── */
.parte-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.parte-title { font-size: 20px; font-weight: 700; color: var(--ink); margin: 0; }
.parte-week  { font-size: 13px; color: var(--muted); margin: 2px 0 0; }
.parte-header-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.parte-download-btn { font-size: 13px; padding: 7px 14px; }

/* ── Parte summary card ──────────────────────────────────────────────────── */
.ps-card {
  background: linear-gradient(135deg, var(--navy) 0%, #1e4070 60%, #25476f 100%);
  border-radius: 14px;
  margin-bottom: 24px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(24,49,83,.20);
  color: #fff;
}

/* top strip */
.ps-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px 10px;
  border-bottom: 1px solid rgba(255,255,255,.10);
  flex-wrap: wrap;
  gap: 10px;
}
.ps-brand { display: flex; flex-direction: column; }
.ps-brand-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--gold);
  text-transform: uppercase;
}
.ps-brand-week { font-size: 13px; color: rgba(255,255,255,.65); margin-top: 1px; }
.ps-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ps-btn {
  font-size: 12px;
  font-weight: 600;
  border-radius: 7px;
  padding: 6px 13px;
  cursor: pointer;
  border: none;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.ps-btn-ghost {
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.88);
  border: 1px solid rgba(255,255,255,.18);
}
.ps-btn-ghost:hover { background: rgba(255,255,255,.20); }
.ps-btn-primary {
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
}
.ps-btn-primary:hover { opacity: .88; }

/* KPI row */
.ps-kpis {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex-wrap: wrap;
}
.ps-kpi { display: flex; flex-direction: column; }
.ps-kpi-num {
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.02em;
}
.ps-kpi-lbl {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: rgba(255,255,255,.55);
  margin-top: 4px;
}
.ps-kpi-total .ps-kpi-num { color: #fff; }
.ps-kpi-ok    .ps-kpi-num { color: #4ade80; }
.ps-kpi-nov   .ps-kpi-num { color: #fbbf24; }
.ps-kpi-divider {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,.15);
  flex-shrink: 0;
}
.ps-progress-wrap {
  flex: 1;
  min-width: 140px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ps-progress-bar {
  height: 6px;
  background: rgba(255,255,255,.15);
  border-radius: 99px;
  overflow: hidden;
}
.ps-progress-fill {
  height: 100%;
  background: #4ade80;
  border-radius: 99px;
  transition: width .4s ease;
}
.ps-progress-pct {
  font-size: 11px;
  color: rgba(255,255,255,.55);
  font-weight: 600;
}

/* shared section rows */
.ps-section {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 22px 14px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.ps-section-nov { padding-bottom: 18px; }
.ps-section-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
  padding-top: 5px;
  flex-shrink: 0;
  min-width: 72px;
}
.ps-section-label-nov { color: #fbbf24; }
.ps-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* commission chips */
.ps-comm-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 20px;
  padding: 4px 10px 4px 12px;
  transition: background .15s;
}
.ps-comm-chip:hover { background: rgba(255,255,255,.14); }
.ps-comm-name {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,.88);
  letter-spacing: .02em;
}
/* seguridad casa — house icon in table */
.seg-house-icon { margin-right: 4px; font-size: 12px; }

/* seguridad casa — inline selector in commission header */
.parte-seg-inline-select {
  font-size: 10px;
  font-weight: 600;
  background: var(--bg);
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 2px 8px;
  cursor: pointer;
  max-width: 110px;
}
.parte-seg-inline-select:focus { outline: none; border-color: var(--navy); color: var(--ink); }

.ps-comm-count {
  background: var(--gold);
  color: var(--navy);
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 10px;
  font-weight: 800;
}

/* novelty chips */
.ps-nov-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(251,191,36,.10);
  border: 1px solid rgba(251,191,36,.20);
  border-radius: 20px;
  padding: 4px 10px 4px 12px;
}
.ps-nov-type {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #fbbf24;
  white-space: nowrap;
}
.ps-nov-persons { display: flex; flex-wrap: wrap; gap: 4px; }
.ps-nov-person {
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.88);
  border-radius: 5px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

/* ── Panel Superior v2 ───────────────────────────────────────────────────── */
.ps2-card {
  background: linear-gradient(160deg, #0b1a2e 0%, #102237 45%, #0d2040 100%);
  border-radius: 22px;
  margin-bottom: 24px;
  overflow: hidden;
  box-shadow: 0 10px 50px rgba(8,18,40,.45);
  color: #fff;
  position: relative;
}
.ps2-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.055) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
  z-index: 0;
}
.ps2-card > * { position: relative; z-index: 1; }

.ps2-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 26px 14px;
  gap: 12px;
  flex-wrap: wrap;
}
.ps2-brand { display: flex; flex-direction: column; gap: 3px; }
.ps2-eyebrow {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .16em;
  color: var(--gold);
  text-transform: uppercase;
}
.ps2-week { font-size: 18px; font-weight: 700; color: rgba(255,255,255,.92); }

.ps2-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.ps2-btn {
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 9px;
  padding: 7px 14px;
  cursor: pointer;
  border: none;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background .15s, opacity .15s;
}
.ps2-btn-ghost {
  background: rgba(255,255,255,.09);
  color: rgba(255,255,255,.82);
  border: 1px solid rgba(255,255,255,.14);
}
.ps2-btn-ghost:hover { background: rgba(255,255,255,.16); }
.ps2-btn-gold { background: var(--gold); color: var(--navy); font-weight: 800; }
.ps2-btn-gold:hover { opacity: .88; }

.ps2-duty {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 26px 14px;
  font-size: 12px;
}
.ps2-duty-label { color: rgba(255,255,255,.65); font-weight: 700; }
.ps2-duty-name { color: var(--gold); font-weight: 800; }
.ps2-duty-select {
  background: rgba(255,255,255,.09);
  color: #fff;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 7px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 700;
}
.ps2-duty-select option { color: var(--ink, #1a2233); }
.ps2-duty-hint { color: rgba(255,255,255,.5); font-style: italic; }

/* KPI strip */
.ps2-kpis {
  display: flex;
  align-items: center;
  padding: 6px 26px 24px;
  gap: 0;
  border-bottom: 1px solid rgba(255,255,255,.07);
  flex-wrap: wrap;
  row-gap: 16px;
}
.ps2-kpi { display: flex; flex-direction: column; padding: 0 22px; }
.ps2-kpi:first-child { padding-left: 0; }
.ps2-kpi-n {
  font-size: 52px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.04em;
}
.ps2-n-white { color: #fff; }
.ps2-n-green { color: #4ade80; text-shadow: 0 0 28px rgba(74,222,128,.35); }
.ps2-n-amber { color: #fbbf24; text-shadow: 0 0 28px rgba(251,191,36,.30); }
.ps2-kpi-l {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: rgba(255,255,255,.38);
  margin-top: 5px;
}
.ps2-kpi-sep {
  width: 1px;
  height: 52px;
  background: rgba(255,255,255,.10);
  flex-shrink: 0;
}

/* Circular arc progress */
.ps2-arc-wrap {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.ps2-arc {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: conic-gradient(
    #4ade80 calc(var(--pct, 0) * 3.6deg),
    rgba(255,255,255,.10) 0deg
  );
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 0 30px rgba(74,222,128,.22), inset 0 0 0 1px rgba(74,222,128,.15);
}
.ps2-arc::after {
  content: '';
  position: absolute;
  inset: 11px;
  border-radius: 50%;
  background: #0b1a2e;
}
.ps2-arc-pct {
  position: relative;
  z-index: 1;
  font-size: 14px;
  font-weight: 800;
  color: #4ade80;
  letter-spacing: -.01em;
}
.ps2-arc-lbl {
  font-size: 9px;
  font-weight: 700;
  color: rgba(255,255,255,.30);
  text-transform: uppercase;
  letter-spacing: .08em;
  text-align: center;
}

/* Commission grid */
.ps2-comm-section {
  padding: 16px 26px 18px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.ps2-sec-lbl {
  display: block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: rgba(255,255,255,.30);
  margin-bottom: 11px;
}
.ps2-sec-lbl-nov { color: #fbbf24; }
.ps2-comm-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ps2-comm-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  padding: 10px 16px 8px;
  min-width: 54px;
  transition: background .15s, border-color .15s, transform .15s;
  cursor: default;
}
.ps2-comm-tile:hover {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.22);
  transform: translateY(-2px);
}
.ps2-tile-num {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  letter-spacing: -.02em;
}
.ps2-tile-name {
  font-size: 8.5px;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-top: 5px;
  text-align: center;
  max-width: 72px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Novelties */
.ps2-nov-section {
  padding: 14px 26px 18px;
  background: rgba(251,191,36,.04);
  border-top: 1px solid rgba(251,191,36,.15);
}
.ps2-nov-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ps2-nov-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(251,191,36,.10);
  border: 1px solid rgba(251,191,36,.22);
  border-radius: 22px;
  padding: 5px 12px 5px 14px;
}
.ps2-nov-type {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #fbbf24;
  white-space: nowrap;
}
.ps2-nov-persons { display: flex; flex-wrap: wrap; gap: 4px; }
.ps2-nov-person {
  background: rgba(255,255,255,.11);
  color: rgba(255,255,255,.88);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}

/* Mobile */
@media (max-width: 820px) {
  .ps2-header { padding: 16px 18px 12px; }
  .ps2-week   { font-size: 15px; }
  .ps2-actions { gap: 5px; }
  .ps2-btn    { font-size: 10.5px; padding: 6px 10px; border-radius: 8px; }
  .ps2-kpis   { padding: 4px 18px 18px; }
  .ps2-kpi    { padding: 0 14px; }
  .ps2-kpi-n  { font-size: 40px; }
  .ps2-kpi-sep { height: 44px; }
  .ps2-arc    { width: 70px; height: 70px; }
  .ps2-arc::after { inset: 9px; }
  .ps2-arc-pct { font-size: 12px; }
  .ps2-comm-section { padding: 14px 18px 16px; }
  .ps2-nov-section  { padding: 12px 18px 16px; }
  .ps2-comm-tile    { padding: 8px 13px 7px; min-width: 48px; }
  .ps2-tile-num     { font-size: 22px; }
}

@media (max-width: 480px) {
  .ps2-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .ps2-btn { justify-content: center; }
  .ps2-kpi-n { font-size: 36px; }
  .ps2-kpi   { padding: 0 12px; }
}

/* ── Bloques por comisión ────────────────────────────────────────────────── */
.parte-commission-block {
  background: #fff;
  border-radius: 18px;
  margin-bottom: 14px;
  overflow: hidden;
  box-shadow: 0 6px 28px rgba(15,28,50,.11);
}

.parte-commission-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 20px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.parte-commission-head::before {
  content: '';
  position: absolute;
  right: -18px; top: -18px;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  pointer-events: none;
}

.parte-commission-name {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #fff;
}

.parte-commission-count {
  background: var(--gold);
  color: var(--navy);
  border-radius: 20px;
  padding: 3px 11px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Tabla desktop ───────────────────────────────────────────────────────── */
.parte-table-wrap { overflow-x: auto; }

.parte-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  table-layout: fixed;
}
.parte-table th:nth-child(1),
.parte-table td:nth-child(1) { width: 110px; }
.parte-table th:nth-child(2),
.parte-table td:nth-child(2) { width: 120px; }
.parte-table th:nth-child(3),
.parte-table td:nth-child(3) { width: 205px; }
/* col 4 (Comisión): sin ancho fijo — toma el espacio restante */

.parte-table thead th {
  background: #eef3fa;
  color: var(--navy-2);
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 10px 15px;
  border-bottom: 2px solid var(--gold);
  white-space: nowrap;
  text-align: left;
}

.parte-table td { text-align: left; vertical-align: middle; }
.parte-table tbody tr { border-bottom: 1px solid #f0f4f9; transition: background .14s; }
.parte-table tbody tr:nth-child(even) { background: #fafcff; }
.parte-table tbody tr:last-child { border-bottom: none; }
.parte-table tbody tr:hover { background: #e8f0fe; }

.parte-row-novedad         { background: linear-gradient(90deg, rgba(245,158,11,.07), transparent 18%); }
.parte-row-novedad:nth-child(even) { background: linear-gradient(90deg, rgba(245,158,11,.10), #fafcff 18%); }
.parte-row-novedad:hover   { background: #fff8e8; }

.parte-rank {
  padding: 10px 14px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
  border-left: 4px solid #16a34a;
}
.parte-row-novedad .parte-rank { border-left-color: #f59e0b; }
.parte-jf-badge {
  display: inline-block;
  font-family: inherit;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .03em;
  color: #92610a;
  background: #fff8e6;
  border: 1px solid #f0d080;
  border-radius: 4px;
  padding: 1px 5px;
  margin-right: 5px;
  vertical-align: middle;
}

.parte-name {
  padding: 10px 14px;
  font-weight: 700;
  font-size: 13px;
  color: var(--ink);
  letter-spacing: .01em;
}

.parte-grade { padding: 10px 14px; color: var(--muted); font-size: 12px; white-space: nowrap; }

.parte-status-cell,
.parte-commission-cell { padding: 6px 10px; }
.parte-status-cell form,
.parte-commission-cell form { margin: 0; }

.parte-select {
  width: 100%;
  min-width: 130px;
  font-size: 12px;
  padding: 6px 8px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: #f8fafd;
  color: var(--ink);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.parte-select:focus {
  outline: none;
  border-color: var(--navy-2);
  box-shadow: 0 0 0 3px rgba(30,58,95,.10);
}

.parte-status-select {
  min-width: 110px;
  font-size: 12px;
  padding: 6px 8px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: #f8fafd;
  color: var(--ink);
  cursor: pointer;
  transition: border-color .15s;
}
.parte-status-select:focus { outline: none; border-color: var(--navy-2); }

.parte-status-text  { font-size: 12.5px; color: var(--ink); font-weight: 500; }
.parte-status-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 20px;
  background: #fde68a;
  color: #92400e;
  letter-spacing: .03em;
  text-transform: uppercase;
  white-space: nowrap;
}

.parte-pres-date {
  display: block;
  font-size: 10px;
  color: var(--muted);
  font-weight: 500;
  margin-top: 5px;
  padding: 4px 8px;
  background: rgba(100,116,139,.07);
  border-radius: 6px;
  border-left: 2px solid var(--line);
  line-height: 1.55;
  white-space: normal;
  word-break: normal;
}

/* ── Novedades ───────────────────────────────────────────────────────────── */
.parte-novedades-section {
  border-radius: 18px;
  overflow: hidden;
  margin-top: 16px;
  box-shadow: 0 6px 28px rgba(245,158,11,.15);
}
.parte-novedades-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 20px;
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
  color: #fff;
}
.parte-novedades-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* Novelty groups */
.parte-nov-group { border-top: 1px solid #f0e8d8; }
.parte-nov-group:first-child { border-top: none; }
.parte-nov-group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 20px;
  background: #fffbf0;
  border-bottom: 1px solid #f0e8d8;
}
.parte-nov-group-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #92400e;
}
.parte-nov-group-count {
  font-size: 10px;
  font-weight: 700;
  background: #f59e0b;
  color: #fff;
  border-radius: 20px;
  padding: 1px 7px;
  line-height: 1.6;
}
/* Color per novelty type */
.nov-grp-permiso .parte-nov-group-label,
.nov-grp-permiso_actividad_personal .parte-nov-group-label,
.nov-grp-excusa_servicio .parte-nov-group-label { color: #1d4ed8; }
.nov-grp-permiso .parte-nov-group-head,
.nov-grp-permiso_actividad_personal .parte-nov-group-head,
.nov-grp-excusa_servicio .parte-nov-group-head { background: #eff6ff; border-color: #bfdbfe; }
.nov-grp-permiso .parte-nov-group-count,
.nov-grp-permiso_actividad_personal .parte-nov-group-count,
.nov-grp-excusa_servicio .parte-nov-group-count { background: #3b82f6; }

.nov-grp-vacaciones .parte-nov-group-label,
.nov-grp-descanso_especial .parte-nov-group-label { color: #15803d; }
.nov-grp-vacaciones .parte-nov-group-head,
.nov-grp-descanso_especial .parte-nov-group-head { background: #f0fdf4; border-color: #bbf7d0; }
.nov-grp-vacaciones .parte-nov-group-count,
.nov-grp-descanso_especial .parte-nov-group-count { background: #22c55e; }

.nov-grp-licencia_maternidad .parte-nov-group-label,
.nov-grp-licencia_paternidad .parte-nov-group-label,
.nov-grp-licencia_luto .parte-nov-group-label,
.nov-grp-licencia_remunerada .parte-nov-group-label,
.nov-grp-licencia_no_remunerada .parte-nov-group-label { color: #7e22ce; }
.nov-grp-licencia_maternidad .parte-nov-group-head,
.nov-grp-licencia_paternidad .parte-nov-group-head,
.nov-grp-licencia_luto .parte-nov-group-head,
.nov-grp-licencia_remunerada .parte-nov-group-head,
.nov-grp-licencia_no_remunerada .parte-nov-group-head { background: #faf5ff; border-color: #e9d5ff; }
.nov-grp-licencia_maternidad .parte-nov-group-count,
.nov-grp-licencia_paternidad .parte-nov-group-count,
.nov-grp-licencia_luto .parte-nov-group-count,
.nov-grp-licencia_remunerada .parte-nov-group-count,
.nov-grp-licencia_no_remunerada .parte-nov-group-count { background: #a855f7; }

.nov-grp-comision_servicio .parte-nov-group-label,
.nov-grp-comision_exterior .parte-nov-group-label,
.nov-grp-comision_estudio .parte-nov-group-label { color: #0f4c81; }
.nov-grp-comision_servicio .parte-nov-group-head,
.nov-grp-comision_exterior .parte-nov-group-head,
.nov-grp-comision_estudio .parte-nov-group-head { background: #f0f7ff; border-color: #bfdbfe; }
.nov-grp-comision_servicio .parte-nov-group-count,
.nov-grp-comision_exterior .parte-nov-group-count,
.nov-grp-comision_estudio .parte-nov-group-count { background: #1e3a5f; }

.nov-grp-suspendido .parte-nov-group-label { color: #991b1b; }
.nov-grp-suspendido .parte-nov-group-head { background: #fff5f5; border-color: #fecaca; }
.nov-grp-suspendido .parte-nov-group-count { background: #ef4444; }

.nov-grp-hospitalizado .parte-nov-group-label { color: #c2410c; }
.nov-grp-hospitalizado .parte-nov-group-head { background: #fff7ed; border-color: #fed7aa; }
.nov-grp-hospitalizado .parte-nov-group-count { background: #f97316; }

.nov-grp-franco_franco .parte-nov-group-label { color: #0f766e; }
.nov-grp-franco_franco .parte-nov-group-head { background: #f0fdfa; border-color: #99f6e4; }
.nov-grp-franco_franco .parte-nov-group-count { background: #14b8a6; }

/* ── Parte mobile ────────────────────────────────────────────────────────── */
@media (max-width: 820px) {
  .ps-top { flex-direction: column; align-items: flex-start; padding: 14px 16px 12px; }
  .ps-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
  .ps-btn { justify-content: center; font-size: 11px; padding: 8px 6px; }
  .ps-kpis { gap: 14px; padding: 14px 16px; }
  .ps-kpi-num { font-size: 26px; }
  .ps-section { padding: 10px 16px 14px; flex-direction: column; gap: 8px; }
  .ps-section-label { min-width: unset; }
  .ps-chips { gap: 5px; }
}

@media (max-width: 640px) {
  .parte-commission-block { border-radius: 14px; }
  .parte-commission-head  { padding: 11px 15px; }
  .parte-commission-name  { font-size: 12px; }
  .parte-table-wrap       { overflow-x: unset; }
  .parte-table            { font-size: 12px; }
  .parte-table thead      { display: none; }

  /* Romper el table layout para que el grid funcione */
  .parte-table,
  .parte-table tbody { display: block; width: 100%; min-width: 0; box-sizing: border-box; }

  /* Card layout: chapa+nombre en fila 1, selects apilados abajo */
  .parte-table tbody tr {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    gap: 6px 10px;
    width: 100%;
    box-sizing: border-box;
    padding: 11px 14px;
    border-bottom: 1px solid #eef2f7;
    border-left: 4px solid #16a34a;
    transition: background .12s;
    background: #fff;
  }
  .parte-row-novedad        { border-left-color: #f59e0b; background: #fffdf5; }
  .parte-table tbody tr:nth-child(even) { background: #fafcff; }
  .parte-row-novedad:nth-child(even)    { background: #fffbee; }
  .parte-table tbody tr:last-child      { border-bottom: none; }
  .parte-table tbody tr:hover           { background: #eef5ff; }

  /* Fila 1 col 1 — Chapa */
  .parte-rank {
    grid-column: 1; grid-row: 1;
    font-size: 13px; font-weight: 800;
    color: var(--ink); padding: 0;
    background: none; border: none;
    display: flex; align-items: center; gap: 4px;
    font-family: inherit;
  }

  /* Fila 1 col 2 — Nombre abreviado */
  .parte-name {
    grid-column: 2; grid-row: 1;
    font-size: 10px; font-weight: 500;
    color: var(--muted); padding: 0;
    text-align: right; white-space: nowrap;
  }

  /* Estado: "disuelve" la celda, hijos pasan al grid */
  .parte-status-cell { display: contents; }

  /* Estado select/badge/texto — full width, fila 2 */
  .parte-status-select,
  .parte-status-badge,
  .parte-status-text {
    grid-column: 1 / -1; grid-row: 2;
    min-width: 0;
  }

  /* Comisión — full width, fila 3 */
  .parte-commission-cell {
    grid-column: 1 / -1; grid-row: 3;
    padding: 0;
    display: block; min-width: 0;
  }
  .parte-commission-cell form { margin: 0; }

  /* Fechas de novedad — full width, fila 4 */
  .parte-pres-date {
    grid-column: 1 / -1; grid-row: 4;
    margin-top: 0;
    font-size: 10.5px;
  }

  /* Selects grandes y fáciles de tocar */
  .parte-select,
  .parte-status-select {
    width: 100%; min-width: 0;
    font-size: 13px; font-weight: 500;
    padding: 9px 10px;
    border-radius: 8px;
    border: 1.5px solid #d1daea;
    background: #f0f4fb; color: var(--ink);
    box-sizing: border-box; cursor: pointer;
    min-height: 40px;
    appearance: auto; -webkit-appearance: auto;
  }
  .parte-status-select:focus,
  .parte-select:focus { outline: none; border-color: var(--navy-2); }

  /* Lectura */
  .parte-status-badge {
    display: inline-flex; align-items: center;
    font-size: 10px; padding: 3px 9px;
    border-radius: 20px; font-weight: 700;
    white-space: nowrap;
  }
  .parte-status-text { font-size: 12px; font-weight: 500; color: var(--ink); }

  .parte-novedades-section { border-radius: 14px; margin-top: 14px; }
  .parte-novedades-head    { padding: 11px 15px; }
  .parte-novedades-title   { font-size: 11px; }
  .parte-nov-group-head    { padding: 6px 14px; }
  .parte-nov-group-label   { font-size: 10px; }

  /* Compact rows: columna extra para el botón de editar */
  .parte-row-edit-btn {
    grid-column: 3; grid-row: 1;
    background: none; border: none;
    padding: 2px 6px; cursor: pointer;
    color: rgba(30,58,138,.55); font-size: 20px; line-height: 1;
    border-radius: 6px; align-self: center; flex-shrink: 0;
  }
  .parte-row-edit-btn:active { background: rgba(0,0,0,.07); }
  .parte-table tbody tr.row-compact .parte-status-cell   { display: none; }
  .parte-table tbody tr.row-compact .parte-commission-cell { display: none; }

  /* Accordion – commission blocks */
  .parte-commission-head { cursor: pointer; justify-content: flex-start; user-select: none; }
  .parte-commission-count { margin-left: auto; }
  .parte-commission-head::after {
    content: '▾';
    font-size: 14px;
    color: rgba(255,255,255,.65);
    display: inline-block;
    transition: transform .2s;
    flex-shrink: 0;
    margin-left: 6px;
  }
  .parte-commission-block.collapsed .parte-commission-head::after { transform: rotate(-90deg); }
  .parte-commission-block.collapsed .parte-table-wrap { display: none; }

  /* Accordion – novedad groups */
  .parte-nov-group-head { cursor: pointer; user-select: none; }
  .parte-nov-group-count { margin-left: auto; }
  .parte-nov-group-head::after {
    content: '▾';
    font-size: 11px;
    color: currentColor;
    opacity: .55;
    display: inline-block;
    transition: transform .2s;
    flex-shrink: 0;
    margin-left: 4px;
  }
  .parte-nov-group.collapsed .parte-nov-group-head::after { transform: rotate(-90deg); }
  .parte-nov-group.collapsed .parte-table-wrap { display: none; }
}

/* ── Parte strip (activities page) ──────────────────────────────────────── */
.act-parte-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 14px;
  font-size: 13px;
}
.act-parte-strip-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 4px;
}
.act-parte-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.act-parte-chip-ok {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}
.act-parte-chip-pending {
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--border);
}

/* ── Parte copy buttons ──────────────────────────────────────────────────── */
.parte-copy-btn {
  font-size: 13px;
  padding: 7px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: #fff;
}
.parte-copy-btn:hover { background: rgba(255,255,255,.16); }
.parte-copy-btn:disabled { opacity: 0.6; cursor: default; }

/* ── Parte — modal fechas novedad ──────────────────────────────────────── */
.parte-modal {
  border: none !important;
  border-radius: 12px;
  padding: 0;
  background: #ffffff !important;
  color: var(--ink);
  box-shadow: 0 12px 40px rgba(24,49,83,.22);
  min-width: 280px;
  max-width: 360px;
  width: 90vw;
}
.parte-modal::backdrop { background: rgba(0,0,0,.4); }
.parte-modal-inner { padding: 22px 24px 20px; }
.parte-modal-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 16px;
}
.parte-modal-fields { display: flex; flex-direction: column; gap: 10px; }
.parte-modal-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.parte-modal-input {
  font-size: 13px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--bg);
  color: var(--ink);
  width: 100%;
  box-sizing: border-box;
}
.parte-modal-input:focus { outline: none; border-color: var(--navy); }
.parte-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

.parte-status-cell { vertical-align: middle; }

/* ── Commission management ─────────────────────────────────────────────── */
.comm-mgmt-page { display: flex; flex-direction: column; gap: 20px; }

.comm-mgmt-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.comm-mgmt-title { font-size: 20px; font-weight: 800; color: var(--ink); margin: 0; }
.comm-mgmt-sub { font-size: 13px; color: var(--muted); margin: 2px 0 0; }

/* Create box */
.comm-create-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(24,49,83,.06);
}
.comm-create-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  font-weight: 700;
  font-size: 14px;
  color: var(--navy);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.comm-create-toggle::-webkit-details-marker { display: none; }
.comm-create-icon {
  width: 28px; height: 28px;
  background: var(--navy);
  color: #fff;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 400; line-height: 1;
  flex-shrink: 0;
}
.comm-create-form {
  padding: 0 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-top: 1px solid var(--line);
}
.comm-create-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding-top: 16px;
}
.comm-create-label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.comm-create-label small { font-weight: 400; }
.comm-create-actions { display: flex; justify-content: flex-end; }

/* Card list */
.comm-card-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}
.comm-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 2px 8px rgba(24,49,83,.06);
  transition: box-shadow .15s;
}
.comm-card:hover { box-shadow: 0 4px 18px rgba(24,49,83,.12); }
.comm-card-off { opacity: .6; }

.comm-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.comm-card-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.comm-card-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.3;
}
.comm-card-desc { font-size: 12px; color: var(--muted); }

.comm-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}
.comm-card-stat {
  font-size: 13px;
  color: var(--muted);
  background: var(--bg);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--line);
}
.comm-card-stat strong { color: var(--ink); }

.comm-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}
.comm-action-btn {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
}
.comm-action-primary { background: var(--navy); color: #fff; border-color: var(--navy); }
.comm-action-danger { color: var(--red); border-color: #fca5a5; }
.comm-action-danger:hover { background: var(--red); color: #fff; border-color: var(--red); }

/* Edit dropdown inside card */
.comm-edit-box-card { position: relative; }
.comm-edit-box-card summary { list-style: none; cursor: pointer; }
.comm-edit-box-card summary::-webkit-details-marker { display: none; }
.comm-edit-form {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 260px;
  box-shadow: 0 8px 28px rgba(24,49,83,.16);
  z-index: 20;
}
.comm-edit-input { width: 100%; box-sizing: border-box; }

/* Utilities */
.button.small { padding: 5px 10px; font-size: 12px; border-radius: 6px; }
.row-inactive td { opacity: 0.45; }

/* Mobile */
@media (max-width: 820px) {
  .comm-create-fields { grid-template-columns: 1fr; }
  .comm-card-list { grid-template-columns: 1fr; }
  .comm-edit-form {
    position: static;
    box-shadow: none;
    border: none;
    background: var(--bg);
    border-radius: 10px;
    padding: 12px;
    margin-top: 4px;
  }
  .comm-edit-box-card { width: 100%; }
  .comm-edit-box-card summary.comm-action-btn { display: block; text-align: center; width: 100%; }
  .comm-card-actions { flex-direction: column; }
  .comm-card-actions form,
  .comm-card-actions .comm-edit-box-card { width: 100%; }
  .comm-action-btn { width: 100%; text-align: center; display: block; }
}

/* ── Desplazamiento transport & return tags ─────────────────────────────── */
.act-desplaz-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}
.act-transport-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 20px;
  border: 1px solid;
}
.act-transport-tag-vehiculo_particular { background: #fff8f0; border-color: #ffb74d; color: #c45c00; }
.act-transport-tag-servicio_publico    { background: #e0f2fe; border-color: #7dd3fc; color: #0369a1; }
.act-transport-tag-vuelo               { background: #f3e5f5; border-color: #ce93d8; color: #6a1b9a; }
.act-return-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 20px;
  background: #e0f2fe;
  border: 1px solid #7dd3fc;
  color: #0369a1;
}

/* ── AI Parse Panel ─────────────────────────────────────────────────────── */
.ai-parse-panel {
  margin-bottom: 20px;
  border-radius: 14px;
  overflow: hidden;
  border: 1.5px solid var(--line);
  background: var(--paper);
  box-shadow: 0 2px 12px rgba(24,50,83,.06);
}
.ai-parse-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: linear-gradient(90deg, #1a1f35 0%, #25476f 100%);
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  letter-spacing: .3px;
  transition: opacity .15s;
}
.ai-parse-toggle:hover { opacity: .92; }
.ai-parse-icon {
  font-size: 18px;
  line-height: 1;
  background: linear-gradient(135deg, #d6a84f, #f5ce7a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.ai-parse-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #d6a84f, #f5ce7a);
  color: #1a1f35;
  padding: 2px 8px;
  border-radius: 20px;
}
.ai-parse-toggle-open { background: linear-gradient(90deg, #162440 0%, #1a3355 100%); }
.ai-parse-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #f9fbfd;
}
.ai-parse-body[hidden] { display: none; }
.ai-parse-hint {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}
.ai-parse-textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 100px;
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  resize: vertical;
  transition: border-color .15s;
}
.ai-parse-textarea:focus { outline: none; border-color: var(--navy-2); }
.ai-parse-actions { display: flex; gap: 10px; }
.ai-parse-submit {
  padding: 10px 22px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
  color: #fff;
  cursor: pointer;
  transition: opacity .15s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ai-parse-submit:hover { opacity: .88; }
.ai-parse-submit:disabled { opacity: .55; cursor: default; }
.ai-parse-result {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ai-parse-result[hidden] { display: none; }
.ai-parse-annotation-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ai-parse-annotation-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--muted);
}
.ai-parse-annotation-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  padding: 10px 14px;
  border-radius: 8px;
  border-left: 3px solid var(--gold);
}
.ai-parse-warning {
  font-size: 13px;
  color: #c45c00;
  background: #fff8f0;
  border: 1px solid #ffb74d;
  border-radius: 8px;
  padding: 8px 12px;
}
.ai-parse-error {
  font-size: 13px;
  color: var(--red);
  background: #fdf0f0;
  border: 1px solid #e8a0a0;
  border-radius: 8px;
  padding: 8px 12px;
}
.ai-parse-apply {
  align-self: flex-start;
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  transition: opacity .15s;
}
.ai-parse-apply:hover { opacity: .88; }
@media (max-width: 600px) {
  .ai-parse-toggle { padding: 12px 16px; font-size: 13px; }
  .ai-parse-body { padding: 14px; }
}

/* ── Calendario ──────────────────────────────────────────────────────────── */
.cal-page { display: flex; flex-direction: column; gap: 20px; }

/* Badge circular reutilizable para íconos de tipo de evento */
.cal-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 12px;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
}
.cal-badge-cumpleanos { background: linear-gradient(150deg, #f5ce7a, var(--gold)); }
.cal-badge.cal-dot-evento { background: linear-gradient(150deg, #2eae84, var(--green)); }
.cal-badge.cal-dot-recordatorio { background: linear-gradient(150deg, #5b9dff, #2563eb); }
.cal-badge.cal-dot-reunion { background: linear-gradient(150deg, #e08080, var(--red)); }
.cal-badge.cal-dot-otro { background: linear-gradient(150deg, #999, #6b6b6b); }
.cal-badge.cal-dot-rian { background: linear-gradient(150deg, #2dd4bf, #0d9488); }
.cal-badge.cal-dot-cnic { background: linear-gradient(150deg, #a78bfa, #7c3aed); }
.cal-badge.cal-dot-unidad { background: linear-gradient(150deg, #d97706, #92400e); }
.cal-badge.cal-dot-independencia { background: linear-gradient(150deg, #f59e0b, #b45309); }

.cal-today-strip {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 22px;
  border-radius: 18px;
  background: linear-gradient(120deg, #0f1626 0%, #182f4f 50%, #25476f 100%);
  box-shadow: 0 10px 32px rgba(15,28,50,.26);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.cal-today-strip::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 15%, rgba(214,168,79,.18), transparent 55%);
  pointer-events: none;
}
.cal-today-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 66px;
  height: 66px;
  flex-shrink: 0;
  border-radius: 16px;
  background: linear-gradient(150deg, var(--gold), #f5ce7a);
  color: #1a1f35;
  box-shadow: 0 6px 16px rgba(214,168,79,.35);
  position: relative;
  z-index: 1;
}
.cal-today-num { font-size: 27px; font-weight: 800; line-height: 1; }
.cal-today-label { font-size: 10px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; }
.cal-today-feed {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  position: relative;
  z-index: 1;
}
.cal-today-empty { font-size: 13px; color: rgba(255,255,255,.65); font-style: italic; }
.cal-today-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px 5px 5px;
  border-radius: 20px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.16);
  white-space: nowrap;
  color: #fff;
  font-family: inherit;
}
button.cal-today-chip.cal-event-trigger { cursor: pointer; transition: background .15s, transform .12s; }
button.cal-today-chip.cal-event-trigger:hover { background: rgba(255,255,255,.2); transform: translateY(-1px); }
.cal-chip-cumpleanos { background: rgba(214,168,79,.18); border-color: rgba(214,168,79,.4); padding-left: 5px; }
.cal-dot-evento-bg { background: rgba(29,127,95,.22); border-color: rgba(29,127,95,.45); }
.cal-dot-recordatorio-bg { background: rgba(37,99,235,.2); border-color: rgba(37,99,235,.4); }
.cal-dot-reunion-bg { background: rgba(185,67,67,.2); border-color: rgba(185,67,67,.4); }
.cal-dot-otro-bg { background: rgba(120,120,120,.22); border-color: rgba(120,120,120,.4); }
.cal-dot-rian-bg { background: rgba(13,148,136,.2); border-color: rgba(13,148,136,.45); }
.cal-dot-cnic-bg { background: rgba(109,40,217,.16); border-color: rgba(124,58,237,.4); }
.cal-dot-unidad-bg { background: rgba(146,64,14,.16); border-color: rgba(146,64,14,.4); }
.cal-dot-independencia-bg { background: rgba(180,83,9,.18); border-color: rgba(180,83,9,.4); }
.cal-add-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  background: linear-gradient(150deg, #fff, #f1f1f1);
  color: var(--navy);
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  white-space: nowrap;
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 12px rgba(0,0,0,.18);
}
.cal-add-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(0,0,0,.22); }
.cal-add-btn-plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gold);
  color: #1a1f35;
  font-size: 12px;
  font-weight: 800;
}

.cal-layout { display: grid; grid-template-columns: 1fr 280px; gap: 20px; align-items: start; }

.cal-main {
  background: var(--paper);
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: 0 2px 14px rgba(24,50,83,.06);
  padding: 18px 20px 22px;
}
.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.cal-nav-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg);
  color: var(--navy);
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid var(--line);
  transition: background .15s, color .15s, transform .12s;
}
.cal-nav-btn:hover { background: var(--navy); color: #fff; transform: scale(1.06); }
.cal-month-title { margin: 0; font-size: 20px; font-weight: 800; color: var(--ink); letter-spacing: .3px; }
.cal-month-year { font-weight: 500; color: var(--muted); }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.cal-weekday {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 6px;
}
.cal-cell {
  min-height: 96px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid transparent;
  padding: 7px 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color .15s, background .15s, transform .12s;
  overflow: hidden;
}
.cal-cell-has-events:hover { border-color: var(--line); background: #fff; transform: translateY(-1px); }
.cal-cell-blank { background: transparent; }
.cal-cell-num { font-size: 12px; font-weight: 700; color: var(--ink); }
.cal-cell-today {
  background: linear-gradient(160deg, #fff7e6 0%, #fff 100%);
  border-color: var(--gold);
  box-shadow: 0 0 0 1.5px var(--gold) inset, 0 2px 8px rgba(214,168,79,.18);
}
.cal-cell-today .cal-cell-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: linear-gradient(150deg, var(--gold), #f5ce7a);
  color: #1a1f35;
  font-size: 11px;
  box-shadow: 0 2px 6px rgba(214,168,79,.4);
}
.cal-cell-marks { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-mark {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 4px;
}
button.cal-mark.cal-event-trigger {
  width: 100%;
  border: none;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: filter .12s, transform .12s;
}
button.cal-mark.cal-event-trigger:hover { filter: brightness(0.93); transform: translateY(-0.5px); }
.cal-mark-cumpleanos { background: rgba(214,168,79,.18); color: #8a6716; }
.cal-mark-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.cal-dot-evento { background: rgba(29,127,95,.15); color: var(--green); }
.cal-dot-evento .cal-mark-dot { background: var(--green); }
.cal-dot-recordatorio { background: rgba(37,99,235,.15); color: #1d4ed8; }
.cal-dot-recordatorio .cal-mark-dot { background: #2563eb; }
.cal-dot-reunion { background: rgba(185,67,67,.15); color: var(--red); }
.cal-dot-reunion .cal-mark-dot { background: var(--red); }
.cal-dot-otro { background: rgba(120,120,120,.18); color: #555; }
.cal-dot-otro .cal-mark-dot { background: #777; }
.cal-dot-rian { background: rgba(13,148,136,.16); color: #0d7a70; font-weight: 700; }
.cal-dot-cnic { background: rgba(109,40,217,.14); color: #6d28d9; font-weight: 700; }
.cal-dot-unidad { background: rgba(146,64,14,.14); color: #92400e; font-weight: 700; }
.cal-dot-independencia { background: rgba(180,83,9,.16); color: #b45309; font-weight: 700; }
.cal-mark-more { font-size: 9px; color: var(--muted); font-weight: 700; padding: 2px 4px; }

/* Puntos táctiles para móvil: reemplazan el texto truncado por marcas claras y grandes para el dedo */
.cal-cell-dots { display: none; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: auto; }
.cal-tap-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  padding: 0;
  flex-shrink: 0;
}
.cal-tap-dot.cal-dot-evento { background: var(--green); }
.cal-tap-dot.cal-dot-recordatorio { background: #2563eb; }
.cal-tap-dot.cal-dot-reunion { background: var(--red); }
.cal-tap-dot.cal-dot-otro { background: #888; }
.cal-tap-dot.cal-dot-rian { background: #0d9488; }
.cal-tap-dot.cal-dot-cnic { background: #7c3aed; }
.cal-tap-dot.cal-dot-unidad { background: #92400e; }
.cal-tap-dot.cal-dot-independencia { background: #b45309; }
.cal-tap-dot.cal-dot-cumpleanos { background: var(--gold); }
.cal-tap-dot-more { font-size: 8px; font-weight: 800; color: var(--muted); }

.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  align-items: center;
}
.cal-legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 600; }
.cal-legend-item .cal-badge { width: 18px; height: 18px; font-size: 10px; }
.cal-legend-hint { font-size: 11px; color: var(--muted); font-style: italic; font-weight: 500; margin-left: auto; }
.cal-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.cal-dot.cal-dot-cumpleanos { background: var(--gold); }
.cal-dot.cal-dot-evento { background: var(--green); }
.cal-dot.cal-dot-recordatorio { background: #2563eb; }
.cal-dot.cal-dot-reunion { background: var(--red); }
.cal-dot.cal-dot-otro { background: #777; }
.cal-dot.cal-dot-rian { background: #0d9488; }
.cal-dot.cal-dot-cnic { background: #7c3aed; }
.cal-dot.cal-dot-unidad { background: #92400e; }
.cal-dot.cal-dot-independencia { background: #b45309; }

.cal-sidebar {
  background: var(--paper);
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: 0 2px 14px rgba(24,50,83,.06);
  padding: 18px 18px 20px;
}
.cal-sidebar-title { margin: 0 0 12px; font-size: 14px; font-weight: 800; color: var(--ink); }
.cal-sidebar-empty { font-size: 13px; color: var(--muted); }
.cal-upcoming-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.cal-upcoming-item { display: flex; align-items: center; gap: 4px; }
.cal-upcoming-trigger {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  background: transparent;
  border: none;
  border-radius: 10px;
  padding: 6px;
  margin: -6px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .12s;
}
.cal-upcoming-trigger:hover { background: var(--bg); }
.cal-upcoming-trigger .cal-badge { margin-top: 1px; }
.cal-upcoming-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cal-upcoming-title { font-size: 13px; font-weight: 700; color: var(--ink); white-space: normal; word-break: break-word; line-height: 1.35; }
.cal-upcoming-date { font-size: 11px; color: var(--muted); text-transform: capitalize; }
.cal-upcoming-delete { flex-shrink: 0; }
.cal-upcoming-delete button {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}
.cal-upcoming-delete button:hover { color: var(--red); }

/* Modal (edición + vista de solo lectura) */
.cal-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,22,38,.6);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 16px;
}
.cal-modal-overlay[hidden] { display: none; }
.cal-modal {
  background: var(--paper);
  border-radius: 18px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 24px 64px rgba(0,0,0,.32);
  overflow: hidden;
  animation: calModalPop .18s ease-out;
}
@keyframes calModalPop {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.cal-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: linear-gradient(100deg, #0f1626, #25476f);
  color: #fff;
}
.cal-modal-head h3 { margin: 0; font-size: 15px; font-weight: 700; }
.cal-modal-close { background: none; border: none; color: #fff; font-size: 20px; cursor: pointer; line-height: 1; }
.cal-modal-form { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 12px; }
.cal-field { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 700; color: var(--muted); }
.cal-field input, .cal-field textarea, .cal-field select {
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  padding: 9px 11px;
  border-radius: 8px;
  border: 1.5px solid var(--line);
  background: #fff;
  resize: vertical;
}
.cal-field input:focus, .cal-field textarea:focus, .cal-field select:focus { outline: none; border-color: var(--navy-2); }
.cal-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cal-checkbox { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; color: var(--muted); }
.cal-checkbox input { margin-top: 2px; }
.cal-modal-actions {
  margin-top: 4px;
  display: flex;
  gap: 10px;
}
.cal-modal-submit {
  flex: 1;
  padding: 11px;
  font-size: 13px;
  font-weight: 700;
  border: none;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
  color: #fff;
  cursor: pointer;
}
.cal-modal-submit:hover { opacity: .9; }
.cal-modal-delete {
  padding: 11px 18px;
  font-size: 13px;
  font-weight: 700;
  border: 1.5px solid #e8a0a0;
  border-radius: 9px;
  background: #fdf0f0;
  color: var(--red);
  cursor: pointer;
}
.cal-modal-delete:hover { background: var(--red); color: #fff; border-color: var(--red); }

/* Modal de vista de solo lectura (usuarios sin permiso de edición) */
.cal-view-body { padding: 22px 22px 24px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.cal-view-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 22px;
  box-shadow: 0 3px 10px rgba(0,0,0,.15);
}
.cal-view-title { margin: 0; font-size: 17px; font-weight: 800; color: var(--ink); line-height: 1.3; }
.cal-view-desc { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.cal-view-meta { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: capitalize; }
.cal-view-close-btn {
  margin-top: 8px;
  align-self: stretch;
  padding: 11px;
  font-size: 13px;
  font-weight: 700;
  border: none;
  border-radius: 9px;
  background: var(--bg);
  color: var(--navy);
  cursor: pointer;
  border: 1.5px solid var(--line);
}
.cal-view-close-btn:hover { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ── Tabs Mes / Semana ── */
.cal-view-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  width: fit-content;
}
.cal-view-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
  border-radius: 9px;
  transition: background .15s, color .15s;
}
.cal-view-tab:hover { color: var(--ink); }
.cal-view-tab.active {
  background: var(--paper);
  color: var(--navy);
  box-shadow: 0 1px 4px rgba(24,50,83,.12);
}

/* ── Vista semanal / agenda ── */
.cal-main-week { padding: 18px 20px 18px; }
.cal-agenda {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cal-agenda-day {
  display: flex;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--bg);
  border: 1px solid transparent;
  transition: border-color .15s, transform .12s;
}
.cal-agenda-day:hover { border-color: var(--line); }
.cal-agenda-day-today {
  background: linear-gradient(160deg, #fff7e6 0%, #fff 100%);
  border-color: var(--gold);
  box-shadow: 0 0 0 1.5px var(--gold) inset, 0 2px 10px rgba(214,168,79,.2);
}
.cal-agenda-date {
  flex-shrink: 0;
  width: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 8px 4px;
}
.cal-agenda-day-today .cal-agenda-date { background: linear-gradient(150deg, var(--gold), #f5ce7a); border-color: var(--gold); box-shadow: 0 3px 10px rgba(214,168,79,.35); }
.cal-agenda-daynum { font-size: 22px; font-weight: 800; color: var(--ink); line-height: 1; }
.cal-agenda-day-today .cal-agenda-daynum { color: #1a1f35; }
.cal-agenda-dateinfo { display: flex; flex-direction: column; align-items: center; margin-top: 2px; }
.cal-agenda-weekday { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.cal-agenda-day-today .cal-agenda-weekday { color: #5c4720; }
.cal-agenda-month { font-size: 9px; color: var(--muted); text-transform: uppercase; }
.cal-agenda-items {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
}
.cal-agenda-empty { font-size: 12px; color: var(--muted); font-style: italic; }
.cal-agenda-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13px;
  color: var(--ink);
}
.cal-agenda-item .cal-badge { width: 22px; height: 22px; font-size: 11px; margin-top: 1px; }
button.cal-agenda-item.cal-event-trigger {
  width: 100%;
  background: transparent;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  padding: 5px 7px;
  transition: background .12s, transform .1s;
}
button.cal-agenda-item.cal-event-trigger:hover { background: rgba(0,0,0,.04); transform: translateX(1px); }
.cal-agenda-item-text { white-space: normal; word-break: break-word; line-height: 1.4; }
.cal-agenda-item-cumpleanos .cal-agenda-item-text { color: #8a6716; }
.cal-agenda-item.cal-dot-rian .cal-agenda-item-text { color: #0d7a70; }
.cal-agenda-item.cal-dot-cnic .cal-agenda-item-text { color: #6d28d9; }
.cal-agenda-item.cal-dot-unidad .cal-agenda-item-text { color: #92400e; }
.cal-agenda-item.cal-dot-independencia .cal-agenda-item-text { color: #b45309; font-weight: 700; }

@media (max-width: 860px) {
  .cal-layout { grid-template-columns: 1fr; }
  .cal-today-strip { flex-wrap: wrap; }
}
@media (max-width: 640px) {
  .cal-cell-marks-desktop { display: none; }
  .cal-cell-dots { display: flex; }
  .cal-cell { min-height: 48px; padding: 6px 4px; align-items: center; gap: 5px; }
  .cal-cell-num { font-size: 12px; }
  .cal-grid { gap: 4px; }
  .cal-weekday { font-size: 9px; }
  .cal-field-row { grid-template-columns: 1fr; }
  .cal-agenda-day { gap: 10px; padding: 10px; }
  .cal-agenda-date { width: 50px; padding: 6px 2px; }
  .cal-agenda-daynum { font-size: 18px; }
  .cal-today-strip { flex-direction: column; align-items: stretch; padding: 14px 16px; gap: 12px; }
  .cal-today-date { align-self: flex-start; width: 54px; height: 54px; }
  .cal-today-num { font-size: 22px; }
  .cal-today-feed { flex-direction: column; align-items: stretch; gap: 6px; }
  .cal-today-chip { white-space: normal; width: 100%; box-sizing: border-box; }
  .cal-add-btn { width: 100%; justify-content: center; padding: 10px 14px; font-size: 13px; }
  .cal-view-tabs { width: 100%; }
  .cal-view-tab { flex: 1; justify-content: center; }
  .cal-modal { max-width: 100%; }
}

/* =====================================================
   DASHBOARD v2
   ===================================================== */

.db2-wrapper {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 28px;
}

/* ── Hero KPI ── */
.db2-hero {
  background: linear-gradient(135deg, var(--navy) 0%, #1b3560 55%, var(--navy-2) 100%);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  gap: 16px;
  align-items: stretch;
  box-shadow: 0 8px 32px rgba(15,28,50,.28);
  position: relative;
  overflow: hidden;
}
.db2-hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(214,168,79,.18) 0%, transparent 70%);
  pointer-events: none;
}
.db2-hero::after {
  content: '';
  position: absolute;
  bottom: -40px; left: 80px;
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(255,255,255,.04) 0%, transparent 70%);
  pointer-events: none;
}

.db2-hero-total {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 12px;
  padding: 16px 22px;
  min-width: 110px;
  backdrop-filter: blur(6px);
}
.db2-hero-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.5);
}
.db2-hero-number {
  font-size: 54px;
  font-weight: 900;
  line-height: 1;
  color: #fff;
  letter-spacing: -2px;
}
.db2-hero-sub {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--gold);
}

.db2-kpi-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  align-content: start;
}

.db2-kpi-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  overflow: hidden;
  transition: background .2s;
}
.db2-kpi-card[open] { background: rgba(255,255,255,.11); }
.db2-kpi-card.db2-kpi-ok  { border-top: 3px solid #4ade80; }
.db2-kpi-card.db2-kpi-nov { border-top: 3px solid var(--gold); }

.db2-kpi-inner {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 10px 12px;
  cursor: pointer;
  user-select: none;
}
.db2-kpi-inner::-webkit-details-marker { display: none; }
.db2-kpi-inner::marker { display: none; }

.db2-kpi-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: rgba(255,255,255,.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.db2-kpi-value {
  font-size: 30px;
  font-weight: 900;
  color: #fff;
  line-height: 1.1;
}
.db2-kpi-arrow {
  font-size: 10px;
  color: rgba(255,255,255,.35);
}

.db2-kpi-people {
  list-style: none;
  padding: 6px 12px 10px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.db2-kpi-people li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,.82);
}
.db2-kpi-comm {
  font-size: 10px;
  color: rgba(255,255,255,.38);
  font-weight: 400;
  white-space: nowrap;
}

/* ── Mapa de comisiones ── */
.db2-comm-section {
  background: #fff;
  border-radius: 14px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  box-shadow: 0 2px 12px rgba(15,28,50,.06);
}
.db2-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--bg);
}
.db2-section-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin: 0;
}
.db2-section-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg);
  padding: 2px 10px;
  border-radius: 20px;
}

.db2-comm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.db2-comm-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow .2s, transform .18s;
}
.db2-comm-card:hover {
  box-shadow: 0 4px 18px rgba(15,28,50,.1);
  transform: translateY(-2px);
}

.db2-comm-header {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  cursor: pointer;
  background: #fff;
  transition: background .15s;
  user-select: none;
}
.db2-comm-header::-webkit-details-marker { display: none; }
.db2-comm-header::marker { display: none; }
.db2-comm-card[open] .db2-comm-header { background: var(--bg); }

.db2-comm-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.db2-comm-name {
  font-size: 12px;
  font-weight: 800;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.db2-comm-total {
  background: var(--navy);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  min-width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0 5px;
}

.db2-comm-cats {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.db2-cat {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg);
  border-radius: 6px;
  padding: 3px 7px;
  min-width: 28px;
}
.db2-cat-lbl {
  font-size: 7px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.db2-cat b {
  font-size: 15px;
  font-weight: 900;
  color: var(--navy);
  line-height: 1.2;
}

.db2-comm-detail {
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: #f8fbff;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.db2-chip-group { display: flex; flex-direction: column; gap: 5px; }
.db2-chip-group-label {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}
.db2-chips { display: flex; flex-wrap: wrap; gap: 4px; }

/* ── Cumpleaños ── */
.db2-bday {
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 16px 20px;
  box-shadow: 0 2px 8px rgba(15,28,50,.05);
}
.db2-bday-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.db2-bday-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: .07em;
}
.db2-bday-count {
  background: var(--gold);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 20px;
}
.db2-bday-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.db2-bday-card {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: var(--bg);
  border-radius: 10px;
  padding: 10px 12px;
  min-width: 88px;
  border: 1px solid var(--line);
  transition: transform .15s;
  text-align: center;
}
.db2-bday-card:hover { transform: translateY(-2px); }
.db2-bday-card.db2-bday-today {
  background: linear-gradient(135deg, #fff9e6, #fffcf2);
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(214,168,79,.2);
}
.db2-bday-icon { font-size: 22px; }
.db2-bday-name {
  font-size: 10px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
}
.db2-bday-date {
  font-size: 10px;
  color: var(--muted);
}
.db2-bday-date.db2-today-lbl {
  color: var(--gold);
  font-weight: 800;
}

/* ── Top días laborados ── */
.db2-top-service {
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(15,28,50,.1);
}
.db2-ts-head {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.db2-ts-head-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.db2-ts-icon {
  font-size: 13px;
  color: var(--gold);
  font-style: normal;
}
.db2-ts-title {
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.db2-ts-link {
  font-size: 12px;
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
  opacity: .85;
  transition: opacity .15s;
}
.db2-ts-link:hover { opacity: 1; }
.db2-ts-list {
  list-style: none;
  padding: 10px 12px 12px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.db2-ts-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  background: var(--bg);
  border-radius: 10px;
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform .15s, box-shadow .15s;
}
.db2-ts-item:hover {
  transform: translateX(3px);
  box-shadow: 0 3px 12px rgba(15,28,50,.1);
}
.db2-ts-item-1 { background: linear-gradient(135deg, #fffdf0, #fff); border-color: #fde68a; }
.db2-ts-item-2 { background: linear-gradient(135deg, #f8f9fa, #fff); border-color: #d1d5db; }
.db2-ts-item-3 { background: linear-gradient(135deg, #fff8f0, #fff); border-color: #fed7aa; }

.db2-ts-rank {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
}
.db2-ts-rank-1 { background: #fef08a; color: #713f12; border: 2px solid #eab308; }
.db2-ts-rank-2 { background: #e5e7eb; color: #374151; border: 2px solid #9ca3af; }
.db2-ts-rank-3 { background: #fed7aa; color: #7c2d12; border: 2px solid #f97316; }
.db2-ts-rank-n { background: var(--line); color: var(--muted); border: 2px solid transparent; font-size: 11px; }

.db2-ts-days {
  flex-shrink: 0;
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
  min-width: 52px;
  text-align: center;
}
.db2-ts-days small { font-size: 12px; font-weight: 700; margin-left: 1px; }
.db2-ts-days.db2-ts-red    { color: #dc2626; }
.db2-ts-days.db2-ts-orange { color: #d97706; }
.db2-ts-days.db2-ts-yellow { color: #a16207; }

.db2-ts-info { flex: 1; min-width: 0; }
.db2-ts-name { font-size: 13px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db2-ts-comm { font-size: 11px; color: var(--muted); margin-top: 1px; }

.db2-ts-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  border-radius: 0 2px 0 0;
  transition: width .5s ease;
}
.db2-ts-bar-red    { background: linear-gradient(90deg, #fca5a5, #dc2626); }
.db2-ts-bar-orange { background: linear-gradient(90deg, #fcd34d, #d97706); }
.db2-ts-bar-yellow { background: linear-gradient(90deg, #fde68a, #ca8a04); }

/* ── Responsive ── */
@media (max-width: 600px) {
  .db2-hero { flex-direction: column; padding: 14px; gap: 12px; }
  .db2-hero-total {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    min-width: unset;
  }
  .db2-hero-number { font-size: 40px; }
  .db2-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .db2-comm-section { padding: 14px; }
  .db2-comm-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 420px) {
  .db2-comm-grid { grid-template-columns: 1fr; }
}
@media (min-width: 1100px) {
  .db2-comm-grid { grid-template-columns: repeat(4, 1fr); }
  .db2-wrapper { gap: 18px; }
}

/* ── Semáforo de plazo (actividades proyectadas) ── */
.pa-dl-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 5px;
  white-space: nowrap;
}
.pa-dl-fine { background: #dcfce7; color: #166534; }
.pa-dl-soon { background: #fef9c3; color: #713f12; }
.pa-dl-late { background: #fee2e2; color: #991b1b; }
.pa-dl-done { background: #f0fdf4; color: #4ade80; }

.pa-dl-hint {
  display: block;
  font-size: 10px;
  font-weight: 700;
  margin-top: 2px;
  white-space: nowrap;
}
.pa-dl-hint.pa-dl-late { color: #dc2626; background: none; padding: 0; }
.pa-dl-hint.pa-dl-soon { color: #d97706; background: none; padding: 0; }

.pa-card-deadline {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

/* =====================================================
   ACTIVIDADES SEMANALES v2
   ===================================================== */

.paw2-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 32px;
}

/* ── Nav semana ── */
.paw2-weeknav {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 4px 20px rgba(15,28,50,.22);
}

.paw2-nav-btn {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 9px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  text-decoration: none;
  line-height: 1;
  transition: background .15s;
}
.paw2-nav-btn:hover { background: rgba(255,255,255,.2); }

.paw2-nav-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.paw2-week-label {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  letter-spacing: .01em;
}

.paw2-week-form {
  display: flex;
  align-items: center;
  gap: 6px;
}

.paw2-date-input {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 6px;
  color: rgba(255,255,255,.85);
  padding: 4px 8px;
  font-size: 12px;
  color-scheme: dark;
}

.paw2-date-go {
  background: var(--gold);
  border: none;
  border-radius: 6px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  cursor: pointer;
  transition: opacity .15s;
}
.paw2-date-go:hover { opacity: .85; }

/* ── Resumen admin ── */
.paw2-summary {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.paw2-sum-card {
  flex-shrink: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px;
  min-width: 130px;
  box-shadow: 0 2px 8px rgba(15,28,50,.06);
}

.paw2-sum-name {
  font-size: 9px;
  font-weight: 800;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.paw2-sum-stats {
  display: flex;
  gap: 10px;
  margin-bottom: 5px;
}

.paw2-sum-ok, .paw2-sum-fail, .paw2-sum-pend {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}
.paw2-sum-ok   { color: #16a34a; }
.paw2-sum-fail { color: #dc2626; }
.paw2-sum-pend { color: #d97706; }
.paw2-sum-ok small,
.paw2-sum-fail small,
.paw2-sum-pend small {
  font-size: 7px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  opacity: .65;
  margin-top: 2px;
}

.paw2-sum-total {
  font-size: 10px;
  color: var(--muted);
}

/* ── Bloques comisión (admin) ── */
.paw2-comm-block {
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(15,28,50,.07);
}

.paw2-comm-head {
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.paw2-comm-name {
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.paw2-comm-count {
  font-size: 11px;
  color: var(--gold);
  font-weight: 600;
}

.paw2-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.paw2-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12.5px;
}

.paw2-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #eef3fa;
  color: var(--navy-2);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 11px 14px;
  border-bottom: 2px solid var(--gold);
  white-space: nowrap;
  text-align: left;
}

.paw2-table tbody tr {
  border-bottom: 1px solid var(--line);
  transition: background .15s, box-shadow .15s;
}
.paw2-table tbody tr:nth-child(even) { background: #fafcff; }
.paw2-table tbody tr:last-child { border-bottom: none; }
.paw2-table tbody tr:hover {
  background: #eef6ff;
  box-shadow: inset 0 0 0 9999px rgba(37, 99, 235, .035);
}
.paw2-table td { padding: 12px 14px; vertical-align: top; }

.paw2-tr-pendiente  td:first-child { border-left: 4px solid #d97706; }
.paw2-tr-cumplida   td:first-child { border-left: 4px solid #16a34a; }
.paw2-tr-no_cumplida td:first-child { border-left: 4px solid #dc2626; }
.paw2-tr-pendiente   { background: linear-gradient(90deg, rgba(217,119,6,.05), transparent 12%); }
.paw2-tr-cumplida    { background: linear-gradient(90deg, rgba(22,163,74,.05), transparent 12%); }
.paw2-tr-no_cumplida { background: linear-gradient(90deg, rgba(220,38,38,.05), transparent 12%); }
.paw2-tr-pendiente:nth-child(even)   { background: linear-gradient(90deg, rgba(217,119,6,.08), #fafcff 12%); }
.paw2-tr-cumplida:nth-child(even)    { background: linear-gradient(90deg, rgba(22,163,74,.08), #fafcff 12%); }
.paw2-tr-no_cumplida:nth-child(even) { background: linear-gradient(90deg, rgba(220,38,38,.08), #fafcff 12%); }

.paw2-td-case strong { font-size: 13.5px; font-weight: 800; color: var(--navy); text-transform: uppercase; letter-spacing: .01em; }
.paw2-td-resp { font-size: 11.5px; min-width: 110px; }
.paw2-td-desc { max-width: 190px; color: var(--muted); font-size: 11.5px; line-height: 1.45; }
.paw2-td-action { min-width: 160px; }

.paw2-edited-badge-sm {
  display: block;
  margin-top: 3px;
  font-size: 9.5px;
}

.paw2-type-pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  background: linear-gradient(135deg, #eef3fa, #f7fafd);
  color: var(--navy-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 8px;
  line-height: 1.5;
  white-space: normal;
}

.paw2-task-text,
.paw2-obs-text {
  display: block;
  font-size: 11.5px;
  color: var(--ink);
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 7px;
  padding: 6px 9px;
  font-style: italic;
  margin-bottom: 5px;
  line-height: 1.45;
}
.paw2-obs-text { background: #eff6ff; border-color: #bfdbfe; }

.paw2-inline-form summary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--navy-2);
  cursor: pointer;
  font-weight: 700;
  list-style: none;
  user-select: none;
  padding: 3px 9px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: #f4f7fb;
  transition: background .15s, border-color .15s;
}
.paw2-inline-form summary:hover { background: #eaf1fb; border-color: var(--navy-2); }
.paw2-inline-form summary::-webkit-details-marker { display: none; }
.paw2-inline-form summary::marker { display: none; }
.paw2-inline-form[open] summary { background: var(--navy-2); border-color: var(--navy-2); color: #fff; }
.paw2-inline-form[open] { margin-top: 4px; }
.paw2-inline-form textarea {
  width: 100%;
  font-size: 12px;
  margin-top: 7px;
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 7px 9px;
  resize: vertical;
  box-sizing: border-box;
  display: block;
}
.paw2-inline-form textarea:focus {
  outline: none;
  border-color: var(--navy-2);
  box-shadow: 0 0 0 3px rgba(30,58,95,.12);
}
.paw2-inline-form .button.small {
  margin-top: 7px;
  border-radius: 7px;
  font-weight: 700;
}

/* ── Formulario comisión ── */
.paw2-form-panel {
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(15,28,50,.07);
}

.paw2-form-head {
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.paw2-form-title {
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.paw2-form-week {
  font-size: 12px;
  color: var(--gold);
  font-weight: 600;
}

.paw2-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 20px;
}

.paw2-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.paw2-field-full { grid-column: 1 / -1; }

.paw2-field-lbl {
  font-size: 10px;
  font-weight: 800;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.paw2-field-lbl em { color: #dc2626; font-style: normal; }

.paw2-field input[type=text],
.paw2-field input[type=date],
.paw2-field select,
.paw2-field textarea {
  border: 1.5px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13px;
  transition: border-color .15s, box-shadow .15s;
  background: #fff;
  color: var(--ink);
  width: 100%;
  box-sizing: border-box;
}
.paw2-field input:focus,
.paw2-field select:focus,
.paw2-field textarea:focus {
  outline: none;
  border-color: var(--navy-2);
  box-shadow: 0 0 0 3px rgba(37,71,111,.1);
}

.paw2-check-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px 0;
}

.paw2-check-item {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: 7px;
  padding: 6px 11px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  transition: border-color .12s, background .12s;
  user-select: none;
}
.paw2-check-item:has(input:checked) {
  background: #e8f0fe;
  border-color: var(--navy-2);
  color: var(--navy);
}
.paw2-check-item input { margin: 0; accent-color: var(--navy-2); }

.paw2-submit-row {
  padding: 0 20px 20px;
}
.paw2-submit-row .button {
  width: 100%;
  justify-content: center;
  padding: 11px;
  font-size: 14px;
}

/* ── Lista de tarjetas (comisión) ── */
.paw2-list-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.paw2-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.paw2-list-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin: 0;
}

.paw2-list-count {
  font-size: 11px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  padding: 2px 10px;
  border-radius: 20px;
  font-weight: 600;
}

.paw2-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.paw2-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--line);
  box-shadow: 0 2px 8px rgba(15,28,50,.05);
  overflow: hidden;
  transition: box-shadow .15s, transform .15s;
}
.paw2-card:hover { box-shadow: 0 5px 18px rgba(15,28,50,.1); transform: translateY(-2px); }
.paw2-card-pendiente   { border-left-color: #d97706; }
.paw2-card-cumplida    { border-left-color: #16a34a; }
.paw2-card-no_cumplida { border-left-color: #dc2626; }

.paw2-card-top {
  padding: 14px 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fafcff, #fff);
}

.paw2-card-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.paw2-card-case {
  font-size: 15px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.paw2-card-body {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.paw2-card-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}
.paw2-card-row:last-child { border-bottom: none; }
.paw2-card-row-col { flex-direction: column; align-items: flex-start; gap: 3px; }

.paw2-card-lbl {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  flex-shrink: 0;
  width: 80px;
  min-width: 80px;
}
.paw2-card-row-col .paw2-card-lbl { width: unset; min-width: unset; }

.paw2-card-val { color: var(--ink); font-size: 12px; flex: 1; }
.paw2-desc { color: var(--muted); font-size: 12px; line-height: 1.5; }
.paw2-dl-row { display: flex; align-items: center; gap: 6px; flex: 1; }

.paw2-chief-box {
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink);
}
.paw2-chief-task { background: #fffbeb; border: 1px solid #fde68a; }
.paw2-chief-obs  { background: #eff6ff; border: 1px solid #bfdbfe; }
.paw2-chief-lbl {
  display: block;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin-bottom: 3px;
}

.paw2-card-actions {
  padding: 10px 16px 14px;
  border-top: 1px solid var(--line);
  background: #fafcff;
}
.paw2-card-actions form { display: flex; flex-wrap: wrap; gap: 6px; }

.paw2-btn {
  border: none;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 16px;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
}
.paw2-btn:hover { opacity: .85; transform: translateY(-1px); }
.paw2-btn:active { transform: translateY(0); }
.paw2-btn-ok    { background: #16a34a; color: #fff; }
.paw2-btn-fail  { background: #dc2626; color: #fff; }
.paw2-btn-reset { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }

.paw2-empty {
  text-align: center;
  color: var(--muted);
  padding: 48px 20px;
  font-size: 14px;
  background: #fff;
  border-radius: 12px;
  border: 1px dashed var(--line);
}

/* ── Responsive ── */
@media (min-width: 700px) {
  .paw2-cards-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .paw2-weeknav { padding: 10px 12px; gap: 8px; }
  .paw2-week-label { font-size: 13px; }
  .paw2-nav-btn { width: 32px; height: 32px; font-size: 18px; }
  .paw2-form-grid { grid-template-columns: 1fr; }
  .paw2-sum-card { min-width: 120px; }
}

/* ── Badges: editada + candado ── */
.paw2-card-badges {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.paw2-card-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.paw2-lock-badge {
  font-size: 14px;
  line-height: 1;
  cursor: default;
}

.paw2-edited-badge {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  background: #f0f4ff;
  border: 1px solid #c7d2fe;
  border-radius: 5px;
  padding: 2px 7px;
  white-space: nowrap;
}

.paw2-lock-msg {
  font-size: 11px;
  color: var(--muted);
  margin-top: 8px;
  padding: 6px 10px;
  background: var(--bg);
  border-radius: 7px;
  border: 1px solid var(--line);
}

/* ── Formulario de edición inline ── */
.paw2-edit-details {
  margin-top: 10px;
  border-top: 1px dashed var(--line);
  padding-top: 10px;
}

.paw2-edit-summary {
  font-size: 12px;
  font-weight: 700;
  color: var(--navy-2);
  cursor: pointer;
  list-style: none;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.paw2-edit-summary::-webkit-details-marker { display: none; }
.paw2-edit-summary::marker { display: none; }
.paw2-edit-details[open] .paw2-edit-summary { color: var(--navy); margin-bottom: 10px; }

.paw2-edit-form { margin-top: 8px; }

.paw2-edit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.paw2-btn-edit-save {
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 18px;
  cursor: pointer;
  width: 100%;
  transition: opacity .15s;
}
.paw2-btn-edit-save:hover { opacity: .85; }

@media (max-width: 480px) {
  .paw2-edit-grid { grid-template-columns: 1fr; }
}

/* ── Panel cambio de contraseña (activities) ─────────────────────────── */
.act-pw-change-panel { border: 2px solid #e53e3e; border-radius: 12px; }
.act-step-label-warn { color: #e53e3e; }
.act-pw-change-hint  { font-size: 12px; color: var(--muted); margin: 8px 0 14px; line-height: 1.5; }
.act-pw-fields       { display: grid; gap: 10px; }

/* ── Aviso cambio contraseña (dashboard admin) ───────────────────────── */
.db2-pw-alert {
  display: flex; gap: 14px; align-items: flex-start;
  background: #fff8e1; border: 1.5px solid #f6c90e;
  border-radius: 12px; padding: 14px 16px; margin-bottom: 16px;
}
.db2-pw-alert-icon  { font-size: 22px; line-height: 1; }
.db2-pw-alert-body  { flex: 1; }
.db2-pw-alert-body strong { font-size: 13px; color: var(--ink); display: block; margin-bottom: 6px; }
.db2-pw-alert-list  { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.db2-pw-alert-list li { font-size: 12px; color: var(--muted); }
.db2-pw-user        { font-weight: 700; color: var(--ink); }
.db2-pw-date        { font-weight: 600; color: var(--navy); }

/* ── Ing. Semana shift design ────────────────────────────────────────────── */

/* Shift status bar */
/* ── Ing semana shift bar ────────────────────────────────────────────────── */
/* ══════════════════════════════════════════════════════════════════════════
   MÓDULO ING. DE SEMANA — diseño comando ejecutivo v2
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Barra de turno ──────────────────────────────────────────────────────── */
.ing-shift-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border-radius: 18px;
  margin-bottom: 20px;
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  position: relative;
}
.ing-shift-bar::before {
  content: '';
  position: absolute; inset: 0;
  opacity: .08;
  background: repeating-linear-gradient(
    45deg, transparent, transparent 8px, rgba(255,255,255,.15) 8px, rgba(255,255,255,.15) 9px
  );
  pointer-events: none;
}
.ing-shift-bar.active {
  background: linear-gradient(135deg, #052e16 0%, #14532d 60%, #166534 100%);
  color: #d1fae5;
  box-shadow: 0 4px 20px rgba(22,163,74,.25);
}
.ing-shift-bar.done {
  background: linear-gradient(135deg, #0c1445 0%, #1e3a8a 60%, #1e40af 100%);
  color: #bfdbfe;
  box-shadow: 0 4px 20px rgba(30,64,175,.2);
}
.ing-shift-pulse {
  width: 12px; height: 12px; border-radius: 50%;
  background: #4ade80; flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(74,222,128,.6);
  animation: ing-pulse 1.6s infinite;
  position: relative; z-index: 1;
}
@keyframes ing-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(74,222,128,.6); }
  70%  { box-shadow: 0 0 0 10px rgba(74,222,128,0); }
  100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); }
}
.ing-shift-done-icon {
  font-size: 20px; line-height: 1;
  background: rgba(255,255,255,.12); border-radius: 50%;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ing-shift-text  { font-weight: 800; font-size: 15px; letter-spacing: .01em; }
.ing-shift-since {
  font-weight: 500; font-size: 13px; opacity: .8;
  background: rgba(255,255,255,.1); border-radius: 20px;
  padding: 2px 10px;
}
.ing-shift-count {
  margin-left: auto;
  font-size: 12px; font-weight: 800;
  background: rgba(255,255,255,.15);
  padding: 4px 12px; border-radius: 20px;
  letter-spacing: .03em;
}

/* ── Pantalla de bienvenida / inicio de turno ────────────────────────────── */
.ing-start-wrap {
  max-width: 600px;
  margin: 0 auto;
  background: linear-gradient(170deg, #0f172a 0%, #1e3a8a 55%, #1d4ed8 100%);
  border-radius: 24px;
  padding: 0;
  box-shadow: 0 16px 48px rgba(15,23,42,.35), 0 0 0 1px rgba(255,255,255,.07);
  overflow: hidden;
}

.ing-start-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 28px 30px 24px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  position: relative;
}
.ing-start-hero::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 50%, rgba(99,102,241,.12), transparent 70%);
  pointer-events: none;
}
.ing-start-avatar {
  width: 68px; height: 68px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
  color: #fff; font-size: 28px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 3px rgba(99,102,241,.4), 0 0 0 6px rgba(99,102,241,.15), 0 8px 20px rgba(15,23,42,.4);
  position: relative; z-index: 1;
}
.ing-start-title {
  font-size: 22px; font-weight: 900; color: #fff;
  margin: 0 0 5px; letter-spacing: -.02em;
  position: relative; z-index: 1;
}
.ing-start-sub {
  font-size: 13px; color: #93c5fd; margin: 0; line-height: 1.4;
  position: relative; z-index: 1;
}

/* Formulario recibo dentro de la tarjeta oscura */
.ing-recibo-form { display: flex; flex-direction: column; gap: 0; }

.ing-recibo-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 24px 30px 18px;
}
.ing-recibo-notes { grid-column: 1 / -1; }

.ing-recibo-field { display: flex; flex-direction: column; gap: 7px; }
.ing-recibo-field > span {
  font-size: 10px;
  font-weight: 800;
  color: #7dd3fc;
  text-transform: uppercase;
  letter-spacing: .1em;
}
.ing-recibo-field input,
.ing-recibo-field select,
.ing-recibo-field textarea {
  padding: 11px 14px;
  border: 1.5px solid rgba(255,255,255,.12);
  border-radius: 12px;
  font-size: 14px;
  background: rgba(255,255,255,.07);
  color: #f1f5f9;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s, background .15s;
  -webkit-appearance: none;
}
.ing-recibo-field input::placeholder,
.ing-recibo-field textarea::placeholder { color: rgba(255,255,255,.3); }
.ing-recibo-field input:focus,
.ing-recibo-field select:focus,
.ing-recibo-field textarea:focus {
  outline: none;
  border-color: #60a5fa;
  background: rgba(255,255,255,.11);
  box-shadow: 0 0 0 3px rgba(96,165,250,.2);
}
.ing-recibo-field select option { background: #1e3a8a; color: #f1f5f9; }
.ing-recibo-field textarea { resize: vertical; min-height: 96px; line-height: 1.5; }

/* error persona misma */
.ing-recibo-fields .act-same-person-error {
  grid-column: 1 / -1;
  background: rgba(239,68,68,.15);
  border: 1px solid rgba(239,68,68,.4);
  color: #fca5a5;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 12px;
  margin: 0;
}

/* Bloque contraseña */
.ing-pw-block {
  margin: 0 30px 18px;
  background: rgba(251,191,36,.08);
  border: 1.5px solid rgba(251,191,36,.25);
  border-radius: 14px;
  padding: 16px 18px;
}
.ing-pw-title  { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; color: #fde68a; margin-bottom: 5px; }
.ing-pw-icon   { font-size: 18px; }
.ing-pw-hint   { font-size: 12px; color: #fcd34d; margin: 0 0 14px; line-height: 1.4; opacity: .8; }
.ing-pw-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ing-pw-fields .ing-recibo-field input {
  background: rgba(255,255,255,.06);
  border-color: rgba(251,191,36,.3);
}
.ing-pw-fields .ing-recibo-field input:focus {
  border-color: #fbbf24;
  box-shadow: 0 0 0 3px rgba(251,191,36,.15);
}

/* Botón iniciar turno */
.ing-start-btn {
  display: block;
  width: calc(100% - 60px);
  margin: 4px 30px 28px;
  padding: 15px 22px;
  background: linear-gradient(135deg, #2563eb 0%, #6366f1 100%);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: .03em;
  text-align: center;
  box-shadow: 0 4px 18px rgba(99,102,241,.45), 0 0 0 1px rgba(255,255,255,.08) inset;
  transition: box-shadow .18s, transform .12s, background .18s;
  position: relative; overflow: hidden;
}
.ing-start-btn::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.15), transparent);
  pointer-events: none;
}
.ing-start-btn:hover {
  box-shadow: 0 8px 28px rgba(99,102,241,.55), 0 0 0 1px rgba(255,255,255,.1) inset;
  transform: translateY(-2px);
  background: linear-gradient(135deg, #1d4ed8 0%, #4f46e5 100%);
}
.ing-start-btn:active { transform: translateY(0); box-shadow: 0 2px 10px rgba(99,102,241,.3); }
.ing-start-btn:disabled {
  opacity: .5; cursor: not-allowed; transform: none;
  box-shadow: none;
}

/* ── Responsive ing_semana ───────────────────────────────────────────────── */
@media (max-width: 820px) {
  .ing-start-wrap  { border-radius: 20px; }
  .ing-shift-bar   { padding: 12px 18px; border-radius: 14px; }
  .ing-shift-text  { font-size: 14px; }
}
@media (max-width: 640px) {
  .ing-start-wrap    { border-radius: 18px; margin: 0; max-width: 100%; }
  .ing-start-hero    { padding: 20px 18px 16px; gap: 14px; }
  .ing-start-avatar  { width: 56px; height: 56px; font-size: 22px; }
  .ing-start-title   { font-size: 18px; }
  /* fecha + hora: mantener 2 columnas; selects y textarea: columna completa */
  .ing-recibo-fields { grid-template-columns: 1fr 1fr; padding: 16px 18px 12px; gap: 10px; }
  .ing-recibo-field input[type="date"],
  .ing-recibo-field input[type="time"] { font-size: 12px; padding: 9px 8px; }
  .ing-recibo-field select,
  .ing-recibo-notes  { grid-column: 1 / -1; }
  .ing-pw-block      { margin: 0 18px 14px; }
  .ing-pw-fields     { grid-template-columns: 1fr; }
  .ing-start-btn     { width: calc(100% - 36px); margin: 4px 18px 20px; font-size: 14px; padding: 13px 16px; }
  .ing-shift-bar     { padding: 10px 14px; border-radius: 12px; gap: 8px; }
  .ing-shift-text    { font-size: 13px; }
  .ing-shift-since   { display: none; }
}
@media (max-width: 390px) {
  .ing-start-hero    { padding: 18px 16px 15px; gap: 12px; }
  .ing-start-avatar  { width: 50px; height: 50px; font-size: 20px; }
  .ing-start-title   { font-size: 17px; }
  .ing-recibo-fields { padding: 14px 16px 12px; }
  .ing-start-btn     { width: calc(100% - 32px); margin: 4px 16px 18px; }
}

/* ── Parte inline para ing_semana ───────────────────────────────────────── */
.ing-parte-section {
  margin-top: 20px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--card);
}
.ing-parte-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  background: var(--navy);
  color: #fff;
}
.ing-parte-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.75);
}
.ing-parte-kpis { display: flex; align-items: center; gap: 12px; }
.ing-parte-kpi { font-size: 15px; font-weight: 800; }
.ing-parte-kpi small { font-size: 10px; font-weight: 600; opacity: .75; margin-left: 2px; }
.ing-kpi-green { color: #4ade80; }
.ing-kpi-amber { color: #fbbf24; }
.ing-parte-link {
  font-size: 11px; font-weight: 700; color: rgba(255,255,255,.65);
  text-decoration: none; border: 1px solid rgba(255,255,255,.25);
  border-radius: 6px; padding: 3px 8px;
  transition: color .12s, border-color .12s;
}
.ing-parte-link:hover { color: #fff; border-color: rgba(255,255,255,.6); }

.ing-parte-comm {
  border-top: 1px solid var(--line);
}
.ing-parte-comm-sum {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 16px;
  cursor: pointer;
  list-style: none;
}
.ing-parte-comm-sum::-webkit-details-marker { display: none; }
.ing-parte-comm-sum::marker { display: none; }
.ing-parte-comm-name {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
}
.ing-parte-nov-label { color: #b45309; }
.ing-parte-comm-count {
  min-width: 22px; height: 22px;
  background: var(--navy); color: #fff;
  border-radius: 20px; font-size: 11px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 6px;
}
.ing-parte-count-amber { background: #f59e0b; }
.ing-parte-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 4px 16px 12px;
}
.ing-parte-chip {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  background: #eff6ff;
  color: var(--navy);
  border: 1px solid #bfdbfe;
  cursor: default;
}
.ing-parte-chip-nov {
  background: #fffbeb;
  color: #92400e;
  border-color: #fde68a;
}

/* ── Panel liberar usuario (entrega de servicio) ─────────────────────────── */
.act-liberar-panel {
  margin: 14px 0 4px;
  padding: 14px 16px;
  background: #fff8f0;
  border: 1.5px solid #fdba74;
  border-radius: 12px;
}
.act-liberar-label { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.act-liberar-label input[type="checkbox"] { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; accent-color: #ea580c; cursor: pointer; }
.act-liberar-text { display: flex; flex-direction: column; gap: 3px; }
.act-liberar-text strong { font-size: 13px; font-weight: 700; color: #92400e; }
.act-liberar-text span  { font-size: 11px; color: #78350f; line-height: 1.4; }

/* ═══════════════════════════════════════════════════════════════════════════
   LIBRO ING. DE SEMANA
   ═══════════════════════════════════════════════════════════════════════════ */

/* Header */
.lb-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.lb-title { font-size: 22px; font-weight: 800; color: var(--navy); margin: 0 0 4px; }
.lb-sub   { font-size: 13px; color: var(--muted); margin: 0; }
.lb-header-stats { display: flex; gap: 12px; flex-shrink: 0; }
.lb-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 18px;
  min-width: 72px;
  box-shadow: 0 1px 4px rgba(24,49,83,.06);
}
.lb-stat-num { font-size: 24px; font-weight: 800; color: var(--navy); line-height: 1; }
.lb-stat-lbl { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }

/* Toolbar */
.lb-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 20px;
  box-shadow: 0 1px 4px rgba(24,49,83,.05);
}
.lb-filter-form { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; flex: 1; }
.lb-filter-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.lb-filter-field input {
  padding: 9px 12px;
  border: 1.5px solid var(--line);
  border-radius: 9px;
  font-size: 14px;
  background: var(--bg);
  color: var(--ink);
  transition: border-color .15s;
}
.lb-filter-field input:focus { outline: none; border-color: var(--navy); }
.lb-filter-btn { align-self: flex-end; }
.lb-export-btn { white-space: nowrap; align-self: flex-end; font-weight: 700; }

/* Empty state */
.lb-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
}

/* Book */
.lb-book { display: flex; flex-direction: column; gap: 24px; }

/* Day block */
.lb-day-block {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(24,49,83,.06);
}
.lb-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff;
  gap: 12px;
}
.lb-day-label {
  font-size: 14px;
  font-weight: 700;
  text-transform: capitalize;
  letter-spacing: .01em;
}
.lb-day-count {
  font-size: 11px;
  font-weight: 600;
  background: rgba(255,255,255,.15);
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

/* Entry row */
.lb-entry {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--line);
  transition: background .12s;
}
.lb-entry:last-child { border-bottom: none; }
.lb-entry:hover { background: #fafbff; }
.lb-entry-cycle-start { background: #f0fdf4; }
.lb-entry-cycle-start:hover { background: #dcfce7; }
.lb-entry-cycle-end   { background: #fff1f2; }
.lb-entry-cycle-end:hover   { background: #ffe4e6; }

.lb-entry-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  background: var(--bg);
  border-right: 1px solid var(--line);
  letter-spacing: .04em;
}
.lb-entry-stripe {
  width: 4px;
  flex-shrink: 0;
}
.lb-entry-body { padding: 12px 16px; flex: 1; min-width: 0; }

/* Entry top row */
.lb-entry-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.lb-entry-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}
.lb-meta-time {
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 8px;
}
.lb-meta-user {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
}
.lb-meta-status {
  font-size: 11px;
  font-weight: 700;
  border-radius: 20px;
  padding: 2px 9px;
  border: 1px solid;
}
.lb-status-abierta { background: #fef9c3; border-color: #fde047; color: #854d0e; }
.lb-status-cerrada { background: #f0fdf4; border-color: #86efac; color: #166534; }

/* Officials in entry */
.lb-entry-officials { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 7px; }
.lb-official-chip {
  display: inline-flex; align-items: baseline; gap: 4px;
  background: #eff6ff; border: 1px solid #bfdbfe;
  border-radius: 8px; padding: 3px 9px;
  font-size: 12px; line-height: 1.4;
}
.lb-chip-grade {
  font-weight: 700; color: #1e40af; text-transform: uppercase; font-size: 11px;
}
.lb-chip-name { color: #1e3a8a; }
.lb-chip-scale { color: #64748b; font-size: 11px; }

/* Month selector */
.lb-month-form { border-bottom: 1px solid var(--border,#e2e8f0); padding-bottom: 10px; margin-bottom: 4px; }
.lb-month-select {
  padding: 7px 10px; border-radius: 8px; border: 1px solid var(--border,#e2e8f0);
  font-size: 14px; background: var(--surface,#fff); color: var(--ink,#0f172a);
  min-width: 200px;
}
@media (prefers-color-scheme: dark) {
  .lb-official-chip { background: #1e3a8a22; border-color: #3b82f655; }
  .lb-chip-grade { color: #93c5fd; }
  .lb-chip-name { color: #bfdbfe; }
  .lb-chip-scale { color: #94a3b8; }
  .lb-month-select { background: #1e293b; color: #f1f5f9; border-color: #334155; }
}

/* Notes */
.lb-entry-notes {
  font-size: 13px;
  color: var(--ink);
  margin: 0 0 5px;
  line-height: 1.5;
}
.lb-entry-novedad {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
  padding-top: 5px;
  border-top: 1px dashed var(--line);
}
.lb-novedad-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  margin-right: 4px;
}

/* Purge panel */
.lb-purge-panel {
  margin-top: 32px;
  background: var(--paper);
  border: 1.5px solid #fca5a5;
  border-radius: 14px;
  overflow: hidden;
}
.lb-purge-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  background: #fff1f2;
}
.lb-purge-summary::-webkit-details-marker { display: none; }
.lb-purge-summary span { font-size: 14px; font-weight: 700; color: #b91c1c; }
.lb-purge-summary small { font-size: 12px; color: #7f1d1d; margin-left: auto; }
.lb-purge-body { padding: 18px 20px; }
.lb-purge-warning {
  font-size: 13px;
  color: #7f1d1d;
  background: #fff1f2;
  border: 1px solid #fca5a5;
  border-radius: 9px;
  padding: 11px 14px;
  margin: 0 0 16px;
  line-height: 1.5;
}
.lb-purge-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.lb-purge-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.lb-purge-field input {
  padding: 9px 12px;
  border: 1.5px solid var(--line);
  border-radius: 9px;
  font-size: 14px;
  background: var(--bg);
  color: var(--ink);
  min-width: 180px;
}
.lb-purge-field input:focus { outline: none; border-color: #b91c1c; }
.lb-purge-btn {
  background: #b91c1c;
  color: #fff;
  border: none;
  border-radius: 9px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}
.lb-purge-btn:hover { background: #991b1b; }

@media (max-width: 640px) {
  .lb-header { gap: 12px; }
  .lb-title { font-size: 18px; }
  .lb-day-label { font-size: 13px; }
  .lb-entry-num { width: 32px; font-size: 10px; }
  .lb-entry-meta { margin-left: 0; }
  .lb-entry-top { gap: 6px; }
  .lb-toolbar { padding: 12px 14px; }
  .lb-filter-form { gap: 8px; }
  .lb-purge-form { flex-direction: column; align-items: stretch; }
  .lb-purge-field input { min-width: unset; width: 100%; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PANEL PRINCIPAL — diseño ejecutivo v3
   ═══════════════════════════════════════════════════════════════════════════ */

.exec-dash {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 1280px;
  margin: 0 auto;
  padding-bottom: 40px;
}

/* ── HERO ──────────────────────────────────────────────────────────────── */
.exec-hero {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(15,23,42,.22);
}
.exec-hero-bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 55%, #1e40af 100%);
}
.exec-hero-content {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 32px;
  padding: 32px 36px;
}

.exec-hero-left {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-right: 1px solid rgba(255,255,255,.12);
  padding-right: 36px;
}
.exec-hero-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #93c5fd;
  margin: 0;
}
.exec-hero-total {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.exec-hero-num {
  font-size: 80px;
  font-weight: 900;
  color: #ffffff;
  line-height: 1;
  letter-spacing: -.04em;
}
.exec-hero-lbl {
  font-size: 15px;
  color: #93c5fd;
  line-height: 1.3;
  font-weight: 500;
}

.exec-hero-right {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
  padding-top: 4px;
}

/* KPI cards inside hero */
.exec-kpi-card {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  min-width: 160px;
  flex: 1;
  backdrop-filter: blur(6px);
  transition: background .2s;
}
.exec-kpi-card[open], .exec-kpi-card:hover { background: rgba(255,255,255,.13); }
.exec-kpi-card summary { list-style: none; cursor: pointer; padding: 14px 16px; }
.exec-kpi-card summary::-webkit-details-marker { display: none; }

.exec-kpi-inner { display: flex; flex-direction: column; gap: 8px; }
.exec-kpi-top {
  display: flex; align-items: center; gap: 8px;
}
.exec-kpi-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.exec-kpi-ok .exec-kpi-dot  { background: #34d399; box-shadow: 0 0 6px #34d39988; }
.exec-kpi-nov .exec-kpi-dot { background: #fbbf24; box-shadow: 0 0 6px #fbbf2488; }
.exec-kpi-label {
  font-size: 12px; color: #cbd5e1; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em; flex: 1;
}
.exec-kpi-val {
  font-size: 28px; font-weight: 900; color: #fff; line-height: 1;
}
.exec-kpi-ok  .exec-kpi-val { color: #6ee7b7; }
.exec-kpi-nov .exec-kpi-val { color: #fde68a; }
.exec-kpi-bar-track {
  height: 4px; background: rgba(255,255,255,.15); border-radius: 2px; overflow: hidden;
}
.exec-kpi-bar-fill {
  height: 100%; border-radius: 2px; transition: width .5s ease;
}
.exec-kpi-ok  .exec-kpi-bar-fill { background: #34d399; }
.exec-kpi-nov .exec-kpi-bar-fill { background: #fbbf24; }
.exec-kpi-pct { font-size: 11px; color: #94a3b8; }
.exec-kpi-chevron { font-size: 10px; color: #64748b; margin-top: 2px; text-align: right; }

.exec-kpi-people {
  list-style: none; margin: 0; padding: 10px 16px 14px;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex; flex-direction: column; gap: 6px;
}
.exec-kpi-people li { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.exec-kpi-scale { font-size: 12px; font-weight: 700; color: #e2e8f0; }
.exec-kpi-comm  { font-size: 11px; color: #64748b; text-align: right; }

/* ── ALERTS ROW ────────────────────────────────────────────────────────── */
.exec-alerts-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
}

/* Week strip */
.exec-week-strip {
  display: flex; align-items: flex-start; gap: 14px;
  background: linear-gradient(135deg, #1e3a8a, #1d4ed8);
  border-radius: 16px; padding: 16px 20px;
  color: #fff; text-decoration: none;
  box-shadow: 0 4px 16px rgba(30,64,175,.3);
  transition: transform .18s, box-shadow .18s;
}
.exec-week-strip:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(30,64,175,.4); }
.exec-week-icon { font-size: 24px; flex-shrink: 0; }
.exec-week-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.exec-week-title { font-size: 13px; font-weight: 600; }
.exec-week-title b { color: #fde68a; }
.exec-week-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.exec-wchip {
  background: rgba(255,255,255,.15); border-radius: 20px;
  padding: 2px 9px; font-size: 11px; font-weight: 600;
}
.exec-wchip-bd   { background: rgba(251,191,36,.25); color: #fef3c7; }
.exec-wchip-rian { background: rgba(52,211,153,.2);  color: #d1fae5; }
.exec-week-arrow { font-size: 12px; color: #93c5fd; flex-shrink: 0; align-self: flex-end; }

/* Daily report strip */
.exec-report-strip {
  display: flex; align-items: center; gap: 16px;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-left: 4px solid #059669;
  border-radius: 16px; padding: 16px 20px;
  text-decoration: none; color: var(--ink, #0f172a);
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  transition: transform .18s, box-shadow .18s;
}
.exec-report-strip:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.1); }
.exec-report-ring { position: relative; width: 56px; height: 56px; flex-shrink: 0; }
.exec-ring-svg { width: 56px; height: 56px; transform: rotate(-90deg); }
.exec-ring-txt {
  position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; font-size: 11px; font-weight: 800; color: var(--ink);
}
.exec-report-body { flex: 1; }
.exec-report-body strong { display: block; font-size: 13px; margin-bottom: 6px; }
.exec-report-dots { display: flex; flex-wrap: wrap; gap: 5px; }
.exec-rdot { width: 10px; height: 10px; border-radius: 50%; }
.exec-rdot-ok   { background: #059669; }
.exec-rdot-miss { background: #e5e7eb; border: 1px solid #d1d5db; }
.exec-report-arrow { font-size: 12px; color: #059669; font-weight: 700; flex-shrink: 0; }

/* PW alert */
.exec-pw-strip {
  display: flex; align-items: flex-start; gap: 14px;
  background: var(--surface, #fff);
  border: 1px solid #fde68a; border-left: 4px solid #d97706;
  border-radius: 16px; padding: 16px 20px;
  box-shadow: 0 2px 8px rgba(217,119,6,.1);
}
.exec-pw-icon { font-size: 22px; flex-shrink: 0; }
.exec-pw-body { flex: 1; }
.exec-pw-body strong { display: block; font-size: 13px; color: var(--ink); margin-bottom: 6px; }
.exec-pw-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.exec-pw-list li { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.exec-pw-list b  { color: var(--ink); font-weight: 700; }
.exec-pw-list span { color: #d97706; font-size: 11px; }

/* ── PARTE COMISIONES ──────────────────────────────────────────────────── */
.exec-section {
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 20px;
  padding: 24px 28px;
  box-shadow: 0 2px 12px rgba(0,0,0,.05);
}
.exec-section-head {
  display: flex; align-items: center; gap: 12px; margin-bottom: 20px;
}
.exec-section-title {
  font-size: 18px; font-weight: 800; color: var(--ink); margin: 0;
  letter-spacing: -.02em;
}
.exec-section-badge {
  font-size: 12px; font-weight: 700; color: #1e40af;
  background: #dbeafe; border-radius: 20px; padding: 3px 10px;
}

.exec-comm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.exec-comm-card {
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
  transition: box-shadow .2s, transform .2s;
}
.exec-comm-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.1); transform: translateY(-2px); }
.exec-comm-card summary { list-style: none; cursor: pointer; }
.exec-comm-card summary::-webkit-details-marker { display: none; }
.exec-comm-header {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  background: var(--surface, #fff);
  position: relative; overflow: hidden;
}
.exec-comm-accent-bar {
  position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--accent, #1e40af);
}
.exec-comm-info {
  flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px;
  padding-left: 8px;
}
.exec-comm-name {
  font-size: 13px; font-weight: 700; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.exec-comm-total-badge {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent, #1e40af); color: #fff;
  font-size: 18px; font-weight: 900; border-radius: 8px;
  min-width: 40px; height: 40px; flex-shrink: 0;
}
.exec-comm-cats {
  display: flex; gap: 6px; flex-shrink: 0;
}
.exec-cat-item {
  display: flex; flex-direction: column; align-items: center;
  background: var(--line, #f1f5f9); border-radius: 8px;
  padding: 4px 7px; min-width: 30px;
}
.exec-cat-val { font-size: 14px; font-weight: 800; color: var(--ink); line-height: 1; }
.exec-cat-lbl { font-size: 9px; color: var(--muted); font-weight: 700; letter-spacing: .05em; }
.exec-comm-chevron { font-size: 11px; color: var(--muted); flex-shrink: 0; }

.exec-comm-detail {
  border-top: 1px solid var(--border, #e2e8f0);
  padding: 12px 16px;
  display: flex; flex-direction: column; gap: 10px;
  background: var(--line, #f8fafc);
}
.exec-area-group { display: flex; flex-direction: column; gap: 5px; }
.exec-area-label {
  font-size: 10px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .08em;
}
.exec-area-chips { display: flex; flex-wrap: wrap; gap: 4px; }

/* ── FILA INFERIOR ─────────────────────────────────────────────────────── */
.exec-bottom-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  align-items: start;
}
.exec-card {
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
}
.exec-card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border, #e2e8f0);
}
.exec-card-title { font-size: 14px; font-weight: 800; color: var(--ink); }
.exec-card-badge {
  font-size: 12px; font-weight: 700; color: #1e40af;
  background: #dbeafe; border-radius: 20px; padding: 2px 9px;
}
.exec-card-link {
  font-size: 12px; color: #1e40af; font-weight: 700; text-decoration: none;
}
.exec-card-link:hover { color: #1e3a8a; }
.exec-muted { font-size: 13px; color: var(--muted); padding: 16px 20px; display: block; }

/* Birthdays card */
.exec-bday-list { padding: 8px 0; }
.exec-bday-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 20px;
  transition: background .15s;
}
.exec-bday-row:hover { background: var(--line, #f8fafc); }
.exec-bday-today { background: #fffbeb !important; }
.exec-bday-icon  { font-size: 18px; flex-shrink: 0; }
.exec-bday-name  { flex: 1; font-size: 13px; font-weight: 700; color: var(--ink); }
.exec-bday-meta  { font-size: 12px; color: var(--muted); white-space: nowrap; }
.exec-bday-meta b { color: #d97706; }

/* Top service card */
.exec-top-list { list-style: none; margin: 0; padding: 8px 0; }
.exec-top-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 20px;
  transition: background .15s;
}
.exec-top-item:hover { background: var(--line, #f8fafc); }
.exec-top-rank { font-size: 18px; flex-shrink: 0; width: 24px; text-align: center; }
.exec-top-info { flex: 1; min-width: 0; }
.exec-top-name  { font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.exec-top-comm  { font-size: 11px; color: var(--muted); margin-top: 3px; }
.exec-top-bar-wrap {
  height: 5px; background: var(--line, #f1f5f9); border-radius: 3px; overflow: hidden;
  margin-bottom: 3px;
}
.exec-top-bar {
  height: 100%; border-radius: 3px; transition: width .6s ease;
}
.exec-top-bar-red    { background: linear-gradient(90deg, #fca5a5, #dc2626); }
.exec-top-bar-orange { background: linear-gradient(90deg, #fcd34d, #d97706); }
.exec-top-bar-green  { background: linear-gradient(90deg, #6ee7b7, #059669); }
.exec-top-days { font-size: 22px; font-weight: 900; flex-shrink: 0; line-height: 1; }
.exec-top-days small { font-size: 11px; font-weight: 700; }
.exec-ts-red    { color: #dc2626; }
.exec-ts-orange { color: #d97706; }
.exec-ts-green  { color: #059669; }

/* Projected card */
.exec-proj-summary { padding: 12px 20px; display: flex; flex-direction: column; gap: 8px; }
.exec-proj-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 6px 0; border-bottom: 1px solid var(--line, #f1f5f9);
}
.exec-proj-row:last-of-type { border-bottom: none; }
.exec-proj-comm  { font-size: 12px; font-weight: 600; color: var(--ink); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.exec-proj-counts { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.exec-proj-sep   { color: var(--muted); font-size: 11px; }
.exec-proj-ok    { color: #059669; font-weight: 800; font-size: 13px; }
.exec-proj-fail  { color: #dc2626; font-weight: 800; font-size: 13px; }
.exec-proj-pend  { color: #d97706; font-weight: 800; font-size: 13px; }
.exec-proj-legend {
  display: flex; gap: 10px; flex-wrap: wrap;
  font-size: 11px; color: var(--muted); border-top: 1px solid var(--line, #f1f5f9); padding-top: 8px; margin-top: 2px;
}
.exec-proj-items { padding: 8px 0; }
.exec-proj-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 20px; transition: background .15s;
}
.exec-proj-item:hover { background: var(--line, #f8fafc); }
.exec-proj-detail { display: flex; flex-direction: column; gap: 2px; }
.exec-proj-detail b  { font-size: 13px; color: var(--ink); }
.exec-proj-detail small { font-size: 11px; color: var(--muted); }
.exec-proj-more {
  display: block; text-align: center; font-size: 12px; color: #1e40af;
  font-weight: 700; padding: 10px; text-decoration: none;
}
.exec-status-pill {
  flex-shrink: 0; padding: 3px 9px; border-radius: 20px;
  font-size: 11px; font-weight: 700; white-space: nowrap;
}
.exec-pill-pendiente   { background: #fef3c7; color: #92400e; }
.exec-pill-cumplida    { background: #d1fae5; color: #065f46; }
.exec-pill-no_cumplida { background: #fee2e2; color: #991b1b; }

/* Active activities card (commission) */
.exec-act-list { padding: 4px 0; }
.exec-act-item {
  padding: 12px 20px; border-bottom: 1px solid var(--line, #f1f5f9);
  display: flex; flex-direction: column; gap: 6px;
}
.exec-act-item:last-child { border-bottom: none; }
.exec-act-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.exec-act-meta { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); }
.exec-act-meta strong { color: var(--ink); }
.exec-act-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.exec-act-notes { font-size: 12px; color: var(--muted); margin: 2px 0 0; line-height: 1.4; }
.exec-close-box summary {
  font-size: 12px; font-weight: 700; color: #1e40af; cursor: pointer;
  padding: 4px 0; list-style: none;
}
.exec-close-box summary::-webkit-details-marker { display: none; }
.exec-close-box form {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--line, #f8fafc); border-radius: 10px;
  padding: 12px; margin-top: 6px;
}

/* ── EFEMÉRIDES ────────────────────────────────────────────────────────── */
.exec-comm-panel {
  border-radius: 18px; overflow: hidden;
  border: 1px solid #fca5a5;
  background: var(--surface, #fff);
  box-shadow: 0 2px 10px rgba(185,28,28,.08);
}
.exec-comm-alert { border-color: #dc2626; }
.exec-comm-head {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 24px;
  background: linear-gradient(90deg, #fee2e2, #fff7f7);
  border-bottom: 1px solid #fca5a5;
}
.exec-comm-alert .exec-comm-head {
  background: linear-gradient(90deg, #dc2626, #ef4444);
  border-bottom: none;
}
.exec-comm-alert .exec-comm-head * { color: #fff !important; }
.exec-comm-icon { font-size: 22px; }
.exec-comm-head strong { font-size: 14px; font-weight: 800; color: #7f1d1d; display: block; }
.exec-comm-month { font-size: 12px; color: #991b1b; }

.exec-comm-group { padding: 12px 24px; border-bottom: 1px solid #fee2e2; }
.exec-comm-group:last-child { border-bottom: none; }
.exec-comm-today { background: #fff1f2; }
.exec-comm-group-lbl {
  font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: #be185d; margin-bottom: 8px; display: block;
}
.exec-comm-today .exec-comm-group-lbl { color: #dc2626; }
.exec-comm-entries { display: flex; flex-direction: column; gap: 6px; }
.exec-comm-entry { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.exec-comm-day {
  font-size: 13px; font-weight: 800; color: #374151;
  min-width: 24px; text-align: center;
}
.exec-comm-badge {
  font-size: 11px; font-weight: 700; color: #fff;
  border-radius: 6px; padding: 2px 8px; flex-shrink: 0;
}
.exec-comm-desc { font-size: 12px; color: var(--ink); }

.exec-comm-rest {
  border-top: 1px solid #fee2e2;
}
.exec-comm-rest summary {
  font-size: 12px; font-weight: 700; color: #be185d;
  padding: 12px 24px; cursor: pointer; list-style: none;
}
.exec-comm-rest summary::-webkit-details-marker { display: none; }
.exec-comm-rest .exec-comm-entries { padding: 4px 24px 16px; }

/* ── DARK MODE ─────────────────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  .exec-hero-bg {
    background: linear-gradient(135deg, #020617 0%, #0f172a 50%, #1e3a8a 100%);
  }
  .exec-kpi-card { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.09); }
  .exec-report-strip, .exec-pw-strip, .exec-section, .exec-card {
    background: #1e293b; border-color: #334155;
  }
  .exec-section-badge, .exec-card-badge { background: #1e3a8a; color: #93c5fd; }
  .exec-cat-item { background: #0f172a; }
  .exec-comm-panel { background: #1e293b; border-color: #7f1d1d; }
  .exec-comm-head { background: linear-gradient(90deg, #450a0a, #1e293b); border-color: #7f1d1d; }
  .exec-comm-head strong { color: #fca5a5 !important; }
  .exec-comm-month { color: #f87171 !important; }
  .exec-comm-alert .exec-comm-head { background: linear-gradient(90deg, #991b1b, #7f1d1d); }
  .exec-comm-group { border-color: #450a0a; }
  .exec-comm-today { background: #1c0909; }
  .exec-comm-rest  { border-color: #450a0a; }
  .exec-bday-today { background: #1c1200 !important; }
  .exec-comm-detail { background: #0f172a; border-color: #1e293b; }
  .exec-rdot-miss { background: #334155; border-color: #475569; }
}
:root[data-theme="dark"] .exec-report-strip,
:root[data-theme="dark"] .exec-pw-strip,
:root[data-theme="dark"] .exec-section,
:root[data-theme="dark"] .exec-card {
  background: #1e293b; border-color: #334155;
}
:root[data-theme="dark"] .exec-comm-panel { background: #1e293b; }
:root[data-theme="dark"] .exec-comm-head  { background: linear-gradient(90deg, #450a0a, #1e293b); }

/* ── RESPONSIVE ────────────────────────────────────────────────────────── */

/* Tablet landscape */
@media (max-width: 1024px) {
  .exec-hero-num        { font-size: 64px; }
  .exec-alerts-row      { grid-template-columns: 1fr 1fr; }
  .exec-comm-grid       { grid-template-columns: repeat(2, 1fr); }
  .exec-bottom-grid     { grid-template-columns: repeat(2, 1fr); }
}

/* Tablet portrait / large phone */
@media (max-width: 820px) {
  .exec-dash            { gap: 14px; }
  .exec-hero            { border-radius: 16px; }
  .exec-hero-content    { padding: 22px 18px; gap: 18px; }
  .exec-hero-num        { font-size: 56px; }
  .exec-alerts-row      { grid-template-columns: 1fr; gap: 10px; }
  .exec-comm-grid       { grid-template-columns: 1fr; }
  .exec-bottom-grid     { grid-template-columns: 1fr; gap: 12px; }
  .exec-section         { padding: 16px 14px; border-radius: 16px; }
  .exec-card            { border-radius: 14px; }
  .exec-comm-panel      { border-radius: 14px; }
  .exec-week-strip      { border-radius: 14px; }
  .exec-report-strip,
  .exec-pw-strip        { border-radius: 14px; }
}

/* Phone */
@media (max-width: 640px) {
  /* Hero: stack top-to-bottom */
  .exec-hero-content {
    flex-direction: column;
    padding: 20px 16px;
    gap: 16px;
  }
  .exec-hero-left {
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,.12);
    padding-right: 0;
    padding-bottom: 14px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .exec-hero-eyebrow { font-size: 10px; }
  .exec-hero-num     { font-size: 52px; }
  .exec-hero-lbl     { font-size: 13px; }

  /* KPI cards: 2-column grid on phone */
  .exec-hero-right {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .exec-kpi-card { min-width: 0; }
  .exec-kpi-val  { font-size: 24px; }
  .exec-kpi-inner { gap: 5px; }

  /* Week strip: compact */
  .exec-week-strip { padding: 14px 16px; gap: 10px; }
  .exec-week-icon  { font-size: 20px; }
  .exec-week-chips { display: none; } /* hide chips, keep title */
  .exec-week-title { font-size: 12px; }

  /* Report strip: compact */
  .exec-report-strip { padding: 14px 16px; }
  .exec-report-ring  { width: 48px; height: 48px; }
  .exec-ring-svg     { width: 48px; height: 48px; }
  .exec-ring-txt     { font-size: 10px; }

  /* PW strip: compact */
  .exec-pw-strip  { padding: 14px 16px; }
  .exec-pw-icon   { font-size: 18px; }

  /* Commission section */
  .exec-section-title { font-size: 16px; }
  .exec-comm-header   { padding: 12px 14px; }
  .exec-comm-total-badge { width: 34px; height: 34px; font-size: 15px; min-width: 34px; }
  .exec-comm-cats     { gap: 4px; }
  .exec-cat-item      { padding: 3px 5px; min-width: 26px; }
  .exec-cat-val       { font-size: 12px; }
  .exec-cat-lbl       { font-size: 8px; }

  /* Cards */
  .exec-card-head   { padding: 13px 16px 10px; }
  .exec-card-title  { font-size: 13px; }
  .exec-bday-row    { padding: 8px 16px; }
  .exec-top-item    { padding: 8px 16px; }
  .exec-top-days    { font-size: 18px; }
  .exec-proj-item   { padding: 9px 16px; }
  .exec-act-item    { padding: 10px 16px; }

  /* Commemorative */
  .exec-comm-head   { padding: 14px 16px; }
  .exec-comm-group  { padding: 10px 16px; }
  .exec-comm-rest summary  { padding: 10px 16px; }
  .exec-comm-rest .exec-comm-entries { padding: 4px 16px 12px; }
}

/* Small phones (≤ 390px) */
@media (max-width: 390px) {
  .exec-hero-num  { font-size: 44px; }
  .exec-hero-right { grid-template-columns: 1fr 1fr; }
  .exec-kpi-val   { font-size: 20px; }
  .exec-hero-content { padding: 16px 12px; }
  .exec-comm-cats { flex-wrap: wrap; }
  .exec-section   { padding: 12px 10px; }
  .exec-card-head { padding: 11px 14px 9px; }
}
