/* ==========================================================================
   Calculadora de horas extraordinarias y nocturnidad - Estilos oficiales
   Directrices fijate.com: Inter, Outfit, JetBrains Mono, Dark/Light theme,
   enfoque táctil responsivo y vista de impresión oficial A4 (.print-sheet).
   ========================================================================== */

:root {
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Paleta base Midnight Slate (Modo oscuro por defecto) */
  --bg-app: #0b0f17;
  --bg-card: #111827;
  --bg-card-subtle: #162032;
  --bg-input: #1a2436;
  --bg-input-hover: #223049;
  --border-color: #243247;
  --border-focus: #3b82f6;

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  /* Acentos de estado y marcas */
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-subtle: rgba(59, 130, 246, 0.15);
  --success: #10b981;
  --success-subtle: rgba(16, 185, 129, 0.15);
  --warning: #f59e0b;
  --warning-subtle: rgba(245, 158, 11, 0.15);
  --danger: #ef4444;
  --danger-subtle: rgba(239, 68, 68, 0.15);
  --purple: #8b5cf6;
  --purple-subtle: rgba(139, 92, 246, 0.15);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.45);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

[data-theme="light"],
body.light-theme {
  --bg-app: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-subtle: #f1f5f9;
  --bg-input: #ffffff;
  --bg-input-hover: #f8fafc;
  --border-color: #cbd5e1;
  --border-focus: #2563eb;

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;

  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-subtle: rgba(37, 99, 235, 0.1);
  --success: #059669;
  --success-subtle: rgba(5, 150, 105, 0.1);
  --warning: #d97706;
  --warning-subtle: rgba(217, 119, 6, 0.1);
  --danger: #dc2626;
  --danger-subtle: rgba(220, 38, 38, 0.1);
  --purple: #7c3aed;
  --purple-subtle: rgba(124, 58, 237, 0.1);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Reset y estructura básica */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.25s ease, color 0.25s ease;
}

h1, h2, h3, h4, h5, h6,
.brand-title,
.section-title,
.hero-title,
.faq-section-title {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.mono,
.price-val,
.stat-price-val,
.stat-saving-val,
code {
  font-family: var(--font-mono);
}

/* Layout de la herramienta */
.tool-layout {
  max-width: 1200px;
  margin: 1.5rem auto 3rem;
  padding: 0 1rem;
  flex: 1 0 auto;
  width: 100%;
}

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

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

.tool-ad-sidebar {
  display: none;
  width: 300px;
  flex-shrink: 0;
}

@media (min-width: 1536px) {
  .tool-ad-sidebar {
    display: block;
  }
}

.card-main {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
  margin-top: 1rem;
}

/* Encabezado introductorio */
.tool-intro-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.25rem;
  margin-bottom: 1.75rem;
}

.intro-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.badge-tag.tag-legal {
  background: var(--primary-subtle);
  border-color: rgba(59, 130, 246, 0.3);
  color: var(--primary);
}

.intro-description {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Workspace ergonómico en dos columnas */
.calculator-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: flex-start;
}

@media (min-width: 992px) {
  .calculator-grid {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

/* Secciones de formulario y paneles */
.calc-section {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.05rem;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.section-title svg {
  color: var(--primary);
  flex-shrink: 0;
}

/* Formularios y controles */
.form-group {
  margin-bottom: 1rem;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.form-hint {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
}

/* Wrappers para inputs con sufijos o unidades */
.input-affix-wrapper {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  min-height: 40px;
}

.input-affix-wrapper:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-subtle);
}

.input-affix-wrapper input {
  flex: 1 1 0%;
  width: 0;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  padding: 0.5rem 0.75rem;
  font-size: 0.95rem;
  font-family: var(--font-mono);
}

.input-suffix {
  padding: 0 0.75rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.05);
  border-left: 1px solid var(--border-color);
  min-height: 40px;
  display: flex;
  align-items: center;
}

/* Desplegables accesibles según normativa */
select.form-control {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  height: 40px;
  min-height: 40px;
  background-color: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0 40px 0 0.75rem;
  font-size: 0.9rem;
  font-family: var(--font-main);
  appearance: none;
  background-image: 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");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

select.form-control option {
  background-color: var(--bg-card);
  color: var(--text-main);
}

/* Grupos compactos y cuadrículas de botones */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

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

.btn-group-toggle {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 3px;
}

.btn-toggle-item {
  flex: 1 1 0%;
  width: 0;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.45rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 36px;
  text-align: center;
}

.btn-toggle-item:hover {
  color: var(--text-main);
}

.btn-toggle-item.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Chips de selección rápida */
.chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

.chip-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-mono);
}

.chip-btn:hover {
  border-color: var(--primary);
  color: var(--text-main);
}

.chip-btn.active {
  background: var(--primary-subtle);
  border-color: var(--primary);
  color: var(--primary);
}

/* Fila de controles numéricos con botones +/- */
.stepper-wrapper {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  min-height: 40px;
}

.stepper-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 38px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: bold;
  transition: color 0.15s, background-color 0.15s;
}

.stepper-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.stepper-input {
  flex: 1 1 0%;
  width: 0;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--text-main);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  outline: none;
}

/* Columna derecha: Tarjetas de resultados */
.results-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Tarjeta principal destacada de nómina */
.card-hero-payout {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(139, 92, 246, 0.1) 100%);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

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

.payout-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--primary);
}

.payout-amount-main {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
  margin-bottom: 0.35rem;
}

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

/* Desglose en 3 métricas */
.payout-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.breakdown-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.5rem;
  text-align: center;
}

.breakdown-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.breakdown-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.breakdown-val.val-gross {
  color: var(--primary);
}

.breakdown-val.val-tax {
  color: var(--warning);
}

.breakdown-val.val-ss {
  color: var(--purple);
}

/* Gráfico de barras de distribución */
.distribution-bar-section {
  margin-top: 1rem;
}

.bar-track {
  height: 12px;
  border-radius: 9999px;
  display: flex;
  overflow: hidden;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
}

.bar-segment {
  height: 100%;
  transition: width 0.3s ease;
}

.bar-segment.seg-net {
  background: var(--success);
}

.bar-segment.seg-tax {
  background: var(--warning);
}

.bar-segment.seg-ss {
  background: var(--purple);
}

.bar-legend {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.5rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Tarifario unitario de horas */
.rates-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.rate-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

.rate-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.rate-row:first-child {
  padding-top: 0;
}

.rate-info-col {
  display: flex;
  flex-direction: column;
}

.rate-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.rate-pill {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

.pill-base {
  background: rgba(148, 163, 184, 0.2);
  color: var(--text-muted);
}

.pill-extra {
  background: var(--primary-subtle);
  color: var(--primary);
}

.pill-festive {
  background: var(--warning-subtle);
  color: var(--warning);
}

.pill-night {
  background: var(--purple-subtle);
  color: var(--purple);
}

.rate-calc-detail {
  font-size: 0.73rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.rate-values-col {
  text-align: right;
}

.rate-gross {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.rate-net {
  font-size: 0.75rem;
  color: var(--success);
  font-weight: 600;
}

/* Semáforo del límite anual de 80 horas */
.limit-tracker-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

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

.tracker-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.tracker-counter {
  font-size: 0.85rem;
  font-weight: 700;
  font-family: var(--font-mono);
}

.tracker-counter.state-safe {
  color: var(--success);
}

.tracker-counter.state-warn {
  color: var(--warning);
}

.tracker-counter.state-danger {
  color: var(--danger);
}

.tracker-progress-track {
  height: 8px;
  background: var(--bg-input);
  border-radius: 9999px;
  overflow: hidden;
  margin: 0.5rem 0;
  border: 1px solid var(--border-color);
}

.tracker-progress-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.3s ease, background-color 0.3s ease;
}

.tracker-notice {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Tarjeta de descanso retribuido alternativo */
.rest-compensate-card {
  background: var(--bg-card-subtle);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.rest-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-subtle);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rest-info {
  flex: 1 1 0%;
  min-width: 0;
}

.rest-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
}

.rest-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary);
}

.rest-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Botones de acción principales */
.actions-row {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.5rem;
}

.btn-action-primary {
  width: 100%;
  min-height: 42px;
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn-action-primary:hover {
  background: var(--primary-hover);
}

.btn-action-secondary {
  width: 100%;
  min-height: 40px;
  background: var(--bg-card-subtle);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-action-secondary:hover {
  border-color: var(--text-muted);
}

/* Sección informativa y FAQ inferior */
.info-guide-section {
  margin-top: 3rem;
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
}

.guide-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

@media (min-width: 768px) {
  .guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.guide-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.guide-card h3 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.guide-card p,
.guide-card ul {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.guide-card ul {
  padding-left: 1.2rem;
  margin-top: 0.5rem;
}

.guide-card li {
  margin-bottom: 0.35rem;
}

/* FAQ Acordeón */
.faq-container {
  margin-top: 2.5rem;
}

.faq-title {
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
  color: var(--text-main);
}

.faq-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  background: var(--bg-card);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 1rem;
  background: transparent;
  border: none;
  color: var(--text-main);
  text-align: left;
  font-size: 0.92rem;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  min-height: 48px;
}

.faq-question svg {
  transition: transform 0.2s ease;
  flex-shrink: 0;
  color: var(--text-muted);
}

.faq-item.open .faq-question svg {
  transform: rotate(180deg);
}

.faq-answer {
  display: none;
  padding: 0 1rem 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  border-top: 1px solid var(--border-color);
  padding-top: 0.75rem;
}

.faq-item.open .faq-answer {
  display: block;
}

/* Modales canónicos conforme a lecciones */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 540px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
  font-size: 1.1rem;
  color: var(--text-main);
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem;
  min-width: 40px;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background-color 0.15s;
}

.btn-close-modal:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.modal-body {
  padding: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-card-subtle);
}

.btn-modal-cancel {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.5rem 1rem;
  min-height: 40px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
}

.btn-modal-confirm {
  background: var(--danger);
  border: none;
  color: #ffffff;
  padding: 0.5rem 1rem;
  min-height: 40px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
}

/* Toast flotante de notificación */
.toast-notice {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.25rem;
  box-shadow: var(--shadow-lg);
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 10000;
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  pointer-events: none;
}

.toast-notice.show {
  transform: translateY(0);
  opacity: 1;
}

/* ==========================================================================
   Estructura oficial para impresión A4 (.print-sheet)
   Oculta en pantalla (display: none) y activa en @media print
   ========================================================================== */
.print-sheet {
  display: none;
}

@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 11pt;
  }

  .app-header,
  .tools-ad-banner-section,
  .tool-ad-sidebar,
  .card-main,
  .fijate-footer,
  .toast-notice,
  .modal-overlay {
    display: none !important;
  }

  .tool-layout {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .print-sheet {
    display: block !important;
    max-width: 210mm;
    margin: 0 auto;
    padding: 15mm 20mm;
    color: #111827;
    background: #ffffff;
  }

  .print-header {
    border-bottom: 2px solid #0f172a;
    padding-bottom: 12px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
  }

  .print-title {
    font-size: 18pt;
    font-weight: bold;
    color: #0f172a;
    margin-bottom: 4px;
  }

  .print-subtitle {
    font-size: 10pt;
    color: #475569;
  }

  .print-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 9.5pt;
  }

  .print-meta-box {
    border: 1px solid #cbd5e1;
    padding: 10px 12px;
    border-radius: 4px;
  }

  .print-meta-box h4 {
    font-size: 10pt;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 4px;
    margin-bottom: 6px;
    color: #1e293b;
  }

  .print-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 9.5pt;
  }

  .print-table th,
  .print-table td {
    border: 1px solid #cbd5e1;
    padding: 8px 10px;
    text-align: left;
  }

  .print-table th {
    background: #f1f5f9;
    font-weight: bold;
    color: #0f172a;
  }

  .print-table .text-right {
    text-align: right;
  }

  .print-table tfoot td {
    font-weight: bold;
    background: #f8fafc;
    border-top: 2px solid #0f172a;
  }

  .print-signatures {
    margin-top: 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

  .signature-box {
    border-top: 1px solid #94a3b8;
    padding-top: 8px;
    font-size: 9pt;
    color: #475569;
    text-align: center;
    height: 70px;
  }

  .print-legal-notice {
    margin-top: 25px;
    font-size: 8pt;
    color: #64748b;
    border-top: 1px solid #e2e8f0;
    padding-top: 8px;
    text-align: justify;
  }
}
