/* ==========================================================================
   Calculadora de Horas y Cuadrante de Turnos - Estilos Oficiales Fijate Tools
   ========================================================================== */

:root {
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Tema Oscuro */
  --bg-main: #0a0f1d;
  --bg-card: #121a2f;
  --bg-card-subtle: #18223d;
  --bg-input: #0e1628;
  --border-color: #243254;
  --border-hover: #3b5082;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-glow: rgba(59, 130, 246, 0.25);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --purple: #a855f7;
  --purple-glow: rgba(168, 85, 247, 0.25);
  --card-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5), 0 0 1px 1px rgba(255, 255, 255, 0.05);
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

[data-theme="light"] {
  --bg-main: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-subtle: #f8fafc;
  --bg-input: #ffffff;
  --border-color: #cbd5e1;
  --border-hover: #94a3b8;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-glow: rgba(37, 99, 235, 0.15);
  --success: #059669;
  --warning: #d97706;
  --danger: #dc2626;
  --purple: #9333ea;
  --purple-glow: rgba(147, 51, 234, 0.15);
  --card-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.05);
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

/* Reset y base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
}

.font-mono {
  font-family: var(--font-mono);
}

/* Layout y Contención */
.tool-layout {
  max-width: 1200px;
  margin: 1.5rem auto 3.5rem;
  padding: 0 1rem;
  width: 100%;
  flex: 1;
}

.tool-with-sidebar {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  width: 100%;
}

.tool-main-content {
  flex: 1 1 0%;
  min-width: 0;
  width: 100%;
}

/* Pestañas Superiores de Modo */
.tool-tabs {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: var(--bg-card-subtle);
}

.tab-btn.active {
  background: var(--bg-card);
  color: var(--primary);
  border-color: var(--border-color);
  box-shadow: 0 4px 12px var(--primary-glow);
}

/* Tarjeta Principal */
.card-main {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 2.25rem 2rem;
  box-shadow: var(--card-shadow);
  margin-bottom: 2.5rem;
}

.card-header-hero {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  background: rgba(59, 130, 246, 0.15);
  color: var(--primary);
  border: 1px solid rgba(59, 130, 246, 0.3);
  margin-bottom: 0.85rem;
}

.card-title {
  font-size: 1.85rem;
  margin-bottom: 0.65rem;
}

.card-intro {
  font-size: 1.025rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* Toolbar de Configuración y Presets */
.toolbar-config {
  display: flex;
  gap: 1.5rem;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.75rem;
  align-items: center;
}

.toolbar-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
}

.toolbar-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Form Controls */
.form-control {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0.55rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-input);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: var(--select-arrow);
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 38px;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
}

.form-select option,
.form-select optgroup {
  background-color: var(--bg-card);
  color: var(--text-primary);
}

.input-with-suffix {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background-color: var(--bg-input);
  overflow: hidden;
  height: 42px;
}

.input-with-suffix .form-control {
  border: none;
  background: transparent;
  flex: 1 1 0%;
  width: 0;
  min-width: 0;
  height: 100%;
  box-shadow: none;
  font-family: var(--font-mono);
  font-weight: 600;
}

.input-suffix {
  padding: 0 0.85rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  background-color: var(--bg-card-subtle);
  height: 100%;
  display: flex;
  align-items: center;
  border-left: 1px solid var(--border-color);
  white-space: nowrap;
}

/* Tabla de Cuadrante Semanal */
.schedule-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  margin-bottom: 2rem;
  background: var(--bg-input);
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
}

.schedule-table th {
  background: var(--bg-card-subtle);
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.schedule-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.schedule-table tr:last-child td {
  border-bottom: none;
}

.schedule-table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* Columnas de tabla */
.col-day {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.day-badge {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
}

.day-badge.weekend {
  background: var(--warning);
}

.select-day-status {
  height: 38px;
  font-size: 0.85rem;
}

.shift-duo {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.time-input {
  width: 88px;
  height: 38px;
  padding: 0.35rem 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  text-align: center;
}

.time-sep {
  color: var(--text-muted);
  font-weight: bold;
}

.break-input {
  width: 76px;
  height: 38px;
  font-family: var(--font-mono);
  text-align: center;
}

.day-totals-box {
  display: flex;
  flex-direction: column;
}

.day-total-h {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
}

.day-noct-h {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--purple);
}

/* Fila inactiva o descanso */
.row-off td {
  opacity: 0.55;
  background: rgba(0, 0, 0, 0.15);
}

/* Cronograma Gantt Canvas 24 Horas */
.gantt-section {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.gantt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.gantt-title {
  font-size: 1.15rem;
  color: var(--text-primary);
}

.gantt-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.gantt-legend {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.legend-chip {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.chip-color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.chip-diurno .chip-color { background: #3b82f6; }
.chip-nocturno .chip-color { background: #a855f7; }
.chip-extra .chip-color { background: #f59e0b; }

.gantt-canvas-container {
  width: 100%;
  overflow-x: auto;
  background: #080d1a;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.5rem;
}

#gantt-canvas {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
}

/* Métricas KPI Semanales */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.kpi-card {
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.25rem;
  background: var(--bg-card-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.kpi-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kpi-value {
  font-size: 1.85rem;
  font-weight: 800;
}

.kpi-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.kpi-primary .kpi-value { color: var(--primary); }
.kpi-success .kpi-value { color: var(--success); }
.kpi-warning .kpi-value { color: var(--warning); }
.kpi-purple .kpi-value { color: var(--purple); }

/* Simulador de Nómina */
.payroll-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.75rem;
  margin-bottom: 2rem;
}

.payroll-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.payroll-title {
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
}

.payroll-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.payroll-inputs-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.payroll-breakdown {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
}

.payroll-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.payroll-row strong {
  color: var(--text-primary);
}

.payroll-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  margin-top: 0.5rem;
  border-top: 1px solid var(--border-color);
}

.total-col {
  display: flex;
  flex-direction: column;
}

.lbl-tot {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.fig-tot {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--success);
}

.total-mensual .fig-tot {
  color: var(--primary);
}

/* Botonera de Acciones */
.actions-toolbar {
  display: flex;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  height: 48px;
  padding: 0 1.5rem;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--bg-card-subtle);
  border-color: var(--border-color);
  color: var(--text-primary);
}

.btn-secondary:hover {
  border-color: var(--border-hover);
  background-color: var(--border-color);
}

.btn-sm {
  height: 38px;
  padding: 0 1rem;
  font-size: 0.875rem;
}

/* ==========================================================================
   MODO 2: ÁBACO Y CALCULADORA RÁPIDA SEXAGESIMAL
   ========================================================================== */

.abaco-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.abaco-lines-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.abaco-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.65rem 1rem;
  animation: fadeIn 0.2s ease-out;
}

.abaco-op-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
}

.abaco-op-btn.is-sub {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border-color: var(--danger);
}

.abaco-inputs-pair {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.abaco-input-h,
.abaco-input-m {
  width: 80px;
  height: 38px;
  text-align: center;
  font-family: var(--font-mono);
  font-weight: 600;
}

.abaco-lbl-note {
  flex: 1;
}

.abaco-input-note {
  height: 38px;
  font-size: 0.85rem;
}

.btn-del-line {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.35rem;
  border-radius: 6px;
  transition: all 0.2s;
}

.btn-del-line:hover {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
}

.abaco-controls {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.multiplier-box {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.mult-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.mult-controls {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 1;
  flex-wrap: wrap;
}

.select-inline {
  width: 170px;
  height: 38px;
}

.input-inline {
  width: 80px;
  height: 38px;
  text-align: center;
  font-family: var(--font-mono);
  font-weight: bold;
}

/* Display de Resultado Ábaco */
.abaco-results-display {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(168, 85, 247, 0.12));
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 14px;
  padding: 1.5rem;
}

.abaco-main-figure {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1rem;
}

.lbl-res {
  font-size: 1.1rem;
  font-weight: 700;
}

.fig-res {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--primary);
}

.abaco-conversions-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.conv-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.conv-lbl {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.conv-val {
  font-size: 1.25rem;
  color: var(--text-primary);
}

/* Conversor Bidireccional Directo */
.converter-box {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.5rem;
}

.converter-title {
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
}

.converter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.input-duo {
  display: flex;
  gap: 0.75rem;
}

.conv-output-tag {
  display: inline-block;
  margin-top: 0.6rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.conv-output-tag strong {
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 1.05rem;
}

/* Modales */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 9999;
}

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  max-width: 480px;
  width: 100%;
  padding: 1.75rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  animation: modalIn 0.25s ease-out;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.modal-title {
  font-size: 1.2rem;
  color: var(--text-primary);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}

.modal-body {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
}

/* ==========================================================================
   Responsive & Mobile
   ========================================================================== */

@media (max-width: 992px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .payroll-inputs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .tool-layout {
    padding: 0 0.75rem;
    margin: 1rem auto 2rem;
  }

  .card-main {
    padding: 1.5rem 1rem;
  }

  .card-title {
    font-size: 1.45rem;
  }

  .tool-tabs {
    flex-direction: column;
    gap: 0.5rem;
  }

  .tab-btn {
    width: 100%;
    justify-content: center;
  }

  .toolbar-config {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .payroll-inputs-grid {
    grid-template-columns: 1fr;
  }

  .payroll-total-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .actions-toolbar {
    flex-direction: column;
  }

  .actions-toolbar .btn {
    width: 100%;
  }

  .abaco-row {
    flex-wrap: wrap;
  }

  .abaco-lbl-note {
    width: 100%;
  }

  .abaco-main-figure {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .abaco-conversions-grid {
    grid-template-columns: 1fr;
  }

  .converter-grid {
    grid-template-columns: 1fr;
  }
}

/* Oculto en pantalla estándar */
.print-sheet {
  display: none;
}

/* ================================================================
   HOJA OFICIAL DOCUMENTAL IMPRIMIBLE (Real Decreto-ley 8/2019)
   Exclusiva para impresión en papel / exportación a PDF limpio A4
   ================================================================ */
@media print {
  @page {
    size: A4 portrait;
    margin: 10mm 12mm 10mm 12mm;
  }

  html, body {
    background: #ffffff !important;
    color: #111111 !important;
    font-size: 9pt !important;
    line-height: 1.3 !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Ocultar todos los elementos web interactivos, publicidad, navegación y layout */
  .app-header,
  .tools-ad-banner-section,
  .tool-ad-sidebar,
  .fijate-footer,
  .tool-tabs,
  .card-main,
  .toolbar-config,
  .actions-toolbar,
  .seo-guide-card,
  .modal-overlay,
  .gantt-section,
  .summary-kpi-grid,
  .payroll-preview-card {
    display: none !important;
  }

  /* Contenedores principales limpios sin márgenes ni padding de pantalla */
  .main-wrapper,
  .tool-layout,
  .tool-with-sidebar,
  .tool-main-content {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
  }

  /* Mostrar hoja oficial como documento A4 estricto */
  .print-sheet {
    display: block !important;
    width: 100% !important;
    max-width: 190mm !important;
    margin: 0 auto !important;
    padding: 0 !important;
    background: #ffffff !important;
    color: #111111 !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    page-break-after: avoid;
    break-after: avoid;
  }

  .print-doc-header {
    border-bottom: 2px solid #111111;
    padding-bottom: 8px;
    margin-bottom: 10px;
  }

  .print-doc-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
  }

  .print-brand-badge {
    font-size: 8pt;
    font-weight: 700;
    color: #444444;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid #777777;
    padding: 2px 6px;
    border-radius: 3px;
  }

  .print-doc-titles {
    text-align: right;
  }

  .print-doc-h1 {
    font-family: 'Outfit', sans-serif !important;
    font-size: 13pt !important;
    font-weight: 800 !important;
    color: #000000 !important;
    margin: 0 0 2px 0 !important;
    letter-spacing: -0.2px;
  }

  .print-doc-law {
    font-size: 7.5pt !important;
    color: #444444 !important;
    margin: 0 !important;
    font-style: italic;
  }

  /* Ficha de datos laborales */
  .print-meta-box {
    margin-top: 6px;
  }

  .print-meta-table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 8pt !important;
    border: 1px solid #222222 !important;
  }

  .print-meta-table td {
    padding: 4px 6px !important;
    border: 1px solid #cccccc !important;
    color: #111111 !important;
  }

  .print-dotted-line {
    display: inline-block;
    min-width: 160px;
    border-bottom: 1px dotted #666666;
    height: 10px;
    vertical-align: bottom;
  }

  /* Tabla de registro de horas limpia */
  .print-schedule-table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin: 10px 0 !important;
    font-size: 8pt !important;
    table-layout: fixed !important;
  }

  .print-schedule-table th,
  .print-schedule-table td {
    border: 1px solid #333333 !important;
    padding: 5px 6px !important;
    line-height: 1.25 !important;
  }

  .print-schedule-table th {
    background-color: #e9ecef !important;
    color: #000000 !important;
    font-weight: 700 !important;
    text-align: center !important;
    font-size: 7.8pt !important;
    text-transform: uppercase;
  }

  .print-schedule-table td {
    color: #111111 !important;
    background: #ffffff !important;
  }

  .print-col-dia {
    font-weight: 600;
  }

  .print-time-cell {
    font-family: 'JetBrains Mono', monospace !important;
    font-size: 8pt !important;
    text-align: center !important;
    white-space: nowrap !important;
  }

  .print-hours-cell {
    font-family: 'JetBrains Mono', monospace !important;
    font-size: 8.5pt !important;
    font-weight: 600 !important;
    text-align: center !important;
    white-space: nowrap !important;
  }

  .print-badge-sit {
    display: inline-block;
    padding: 1px 4px;
    font-size: 7pt;
    font-weight: 600;
    border-radius: 2px;
  }

  /* Filas de totales al pie */
  .print-tfoot-row td {
    border: 1px solid #222222 !important;
    padding: 5px 6px !important;
  }

  .print-tfoot-main {
    background-color: #f1f3f5 !important;
    font-weight: 700 !important;
  }

  .print-tfoot-main td {
    font-size: 8.2pt !important;
    background-color: #f1f3f5 !important;
  }

  .print-tfoot-sub {
    background-color: #ffffff !important;
    font-weight: 700 !important;
  }

  .print-tfoot-sub td {
    font-size: 8.2pt !important;
    border-top: 2px solid #222222 !important;
  }

  .text-right {
    text-align: right !important;
  }

  .text-center {
    text-align: center !important;
  }

  .font-bold {
    font-weight: 700 !important;
  }

  .font-mono {
    font-family: 'JetBrains Mono', monospace !important;
  }

  /* Cláusula legal y firmas */
  .print-legal-section {
    margin-top: 10px;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .print-legal-text {
    font-size: 6.8pt !important;
    color: #444444 !important;
    line-height: 1.35 !important;
    margin: 0 0 12px 0 !important;
    text-align: justify;
    border-top: 1px solid #cccccc;
    padding-top: 6px;
  }

  .print-signatures-row {
    display: flex !important;
    justify-content: space-between !important;
    gap: 20px !important;
    margin-bottom: 12px !important;
  }

  .print-sig-col {
    flex: 1 1 0% !important;
    border: 1px solid #444444 !important;
    border-radius: 4px !important;
    padding: 8px 10px !important;
    background: #ffffff !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .sig-header {
    font-size: 7.5pt !important;
    font-weight: 700 !important;
    color: #000000 !important;
    text-align: center;
    border-bottom: 1px solid #eeeeee;
    padding-bottom: 4px;
    margin-bottom: 4px;
  }

  .sig-box-space {
    height: 48px !important;
  }

  .sig-fill-name,
  .sig-fill-date {
    font-size: 7pt !important;
    color: #333333 !important;
    line-height: 1.4 !important;
  }

  .print-footer-mark {
    display: flex !important;
    justify-content: space-between !important;
    font-size: 6.5pt !important;
    color: #777777 !important;
    border-top: 1px dotted #cccccc !important;
    padding-top: 4px !important;
    margin-top: 6px !important;
  }
}

