/**
 * Estilos Principales - Calculadora de herencia con testamento digital y cuentas online
 * Fijate Tools - fijate.com
 */

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

  /* Colores Corporativos Tema Claro */
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-header: #f1f5f9;
  --bg-input: #ffffff;
  --bg-surface-elevated: #f8fafc;
  --border-color: #e2e8f0;
  --border-subtle: #cbd5e1;

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;

  --primary-color: #2563eb;
  --primary-light: #eff6ff;
  --primary-hover: #1d4ed8;

  --success-color: #059669;
  --success-light: #ecfdf5;
  --warning-color: #d97706;
  --warning-light: #fffbeb;
  --danger-color: #dc2626;
  --danger-light: #fef2f2;

  --container-max: 1440px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

[data-theme="dark"] {
  --bg-page: #0b0f17;
  --bg-card: #151d2a;
  --bg-card-header: #1a2436;
  --bg-input: #0f172a;
  --bg-surface-elevated: #1e293b;
  --border-color: #1e293b;
  --border-subtle: #334155;

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

  --primary-color: #3b82f6;
  --primary-light: #1e3a8a33;
  --primary-hover: #60a5fa;

  --success-color: #10b981;
  --success-light: #064e3b33;
  --warning-color: #f59e0b;
  --warning-light: #78350f33;
  --danger-color: #ef4444;
  --danger-light: #7f1d1d33;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

/* Base y tipografía */
body {
  font-family: var(--font-main);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  margin-top: 0;
  color: var(--text-main);
}

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

.text-primary { color: var(--primary-color) !important; }
.text-success { color: var(--success-color) !important; }
.text-danger { color: var(--danger-color) !important; }
.text-muted { color: var(--text-muted) !important; }
.font-bold { font-weight: 700; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-xs { font-size: 0.75rem; }

/* Barra de Presets y Acciones Superiores */
.presets-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: var(--bg-card);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.presets-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
}

.presets-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.btn-preset {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 0.825rem;
  font-weight: 500;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 38px;
}

.btn-preset:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: var(--primary-light);
}

.btn-reset {
  background: transparent;
  border: 1px dashed var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.825rem;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  min-height: 38px;
}

.btn-reset:hover {
  color: var(--danger-color);
  border-color: var(--danger-color);
}

/* Tablero Superior de KPIs */
.kpi-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--border-subtle);
}

.kpi-card.kpi-highlight::before { background: var(--primary-color); }
.kpi-card.kpi-success::before { background: var(--success-color); }
.kpi-card.kpi-danger::before { background: var(--danger-color); }

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

.kpi-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.kpi-value {
  font-family: var(--font-mono);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.kpi-subtext {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.kpi-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 600;
}

.kpi-status-badge.status-ok {
  background: var(--success-light);
  color: var(--success-color);
  border: 1px solid var(--success-color);
}

.kpi-status-badge.status-danger {
  background: var(--danger-light);
  color: var(--danger-color);
  border: 1px solid var(--danger-color);
}

/* Barra de Pestañas / Tabs */
.tool-tabs-bar {
  display: flex;
  overflow-x: auto;
  gap: 0.5rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.25rem;
  margin-bottom: 1.5rem;
  scrollbar-width: thin;
}

.tool-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: none;
  padding: 0.75rem 1.15rem;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  font-family: var(--font-main);
  font-size: 0.925rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  position: relative;
  min-height: 44px;
}

.tool-tab-btn:hover {
  color: var(--text-main);
  background: var(--primary-light);
}

.tool-tab-btn.active {
  color: var(--primary-color);
}

.tool-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary-color);
  border-radius: 3px 3px 0 0;
}

/* Paneles de Contenido */
.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeIn 0.25s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Secciones y Tarjetas Principales */
.content-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.box-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.box-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
}

.box-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Cronograma y Timeline */
.timeline-stepper {
  position: relative;
  padding-left: 2.5rem;
  margin-top: 1rem;
}

.timeline-stepper::before {
  content: '';
  position: absolute;
  top: 10px;
  bottom: 20px;
  left: 17px;
  width: 2px;
  background: var(--border-color);
}

.timeline-step-item {
  position: relative;
  margin-bottom: 1.75rem;
}

.timeline-step-item:last-child {
  margin-bottom: 0;
}

.timeline-step-icon {
  position: absolute;
  left: -2.5rem;
  top: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  box-shadow: var(--shadow-sm);
  z-index: 2;
}

.timeline-step-content {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
}

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

.timeline-step-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
}

.timeline-step-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  color: var(--primary-color);
}

.timeline-step-badge.badge-urgent {
  background: var(--danger-light);
  color: var(--danger-color);
}

.timeline-actions-list {
  margin: 0.5rem 0 0.75rem 0;
  padding-left: 1.25rem;
  font-size: 0.875rem;
  color: var(--text-main);
}

.timeline-actions-list li {
  margin-bottom: 0.35rem;
}

.timeline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.timeline-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.775rem;
  font-weight: 600;
  color: var(--primary-color);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.2s ease;
}

.timeline-link-btn:hover {
  border-color: var(--primary-color);
  background: var(--primary-light);
}

/* Checklist Interactivo */
.checklist-container {
  margin-top: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.checklist-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.checklist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.75rem;
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: var(--bg-surface-elevated);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.checklist-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--primary-color);
  cursor: pointer;
}

.checklist-label {
  font-size: 0.85rem;
  cursor: pointer;
}

/* Tarjetas de Inventario */
.inventory-section {
  margin-bottom: 2rem;
}

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

.inv-section-title-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.inv-section-total {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--primary-color);
  font-size: 1.1rem;
}

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

.inventory-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.inventory-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

.inventory-card.card-warning {
  border-color: var(--warning-color);
}

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

.inv-title-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.inv-name {
  font-size: 0.95rem;
  color: var(--text-main);
}

.inv-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.45rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.badge-banco { background: #dbeafe; color: #1e40af; }
.badge-exchange { background: #fef3c7; color: #92400e; }
.badge-wallet { background: #e0e7ff; color: #3730a3; }
.badge-deuda { background: #fee2e2; color: #991b1b; }

[data-theme="dark"] .badge-banco { background: #1e3a8a66; color: #93c5fd; }
[data-theme="dark"] .badge-exchange { background: #78350f66; color: #fde68a; }
[data-theme="dark"] .badge-wallet { background: #3730a366; color: #c7d2fe; }
[data-theme="dark"] .badge-deuda { background: #7f1d1d66; color: #fca5a5; }

.btn-inv-delete {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.35rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.btn-inv-delete:hover {
  color: var(--danger-color);
  background: var(--danger-light);
}

.inv-body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.825rem;
}

.inv-data-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.inv-data-item.highlight {
  margin-top: 0.4rem;
  padding-top: 0.4rem;
  border-top: 1px dashed var(--border-color);
  font-weight: 600;
}

.inv-label { color: var(--text-muted); }
.inv-val { color: var(--text-main); }
.status-ok { color: var(--success-color); font-weight: 600; }
.status-danger { color: var(--danger-color); font-weight: 600; }

.empty-list-msg {
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-color);
}

/* Botones principales y de formulario */
.btn-primary, .btn-secondary, .btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 40px;
  border: none;
}

.btn-primary {
  background: var(--primary-color);
  color: #ffffff;
}

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

.btn-secondary {
  background: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-card-header);
}

.btn-danger {
  background: var(--danger-color);
  color: #ffffff;
}

.btn-danger:hover {
  background: #b91c1c;
}

/* Formularios responsivos e inputs */
.form-grid-modal {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group label {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-main);
}

.input-text, .select-input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 0.875rem;
  box-sizing: border-box;
  min-height: 40px;
}

.select-input {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
}

.input-text:focus, .select-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* Selector de CCAA y Tarjeta Informativa */
.ccaa-selector-box {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.ccaa-desc-box {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border-left: 3px solid var(--primary-color);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.ccaa-desc-text {
  font-size: 0.825rem;
  color: var(--text-muted);
  margin: 0;
}

/* Tablas Fiscales de Herederos */
.table-responsive-box {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
}

.table-herederos {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  min-width: 650px;
}

.table-herederos th {
  background: var(--bg-card-header);
  color: var(--text-muted);
  font-weight: 600;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
  font-size: 0.775rem;
  text-transform: uppercase;
}

.table-herederos td {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
}

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

.badge-bonif {
  background: var(--success-light);
  color: var(--success-color);
  border: 1px solid var(--success-color);
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.75rem;
}

/* Tarjeta de Provisión art. 80.2 RISD */
.provision-card {
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid var(--border-color);
}

.provision-card.card-success {
  background: linear-gradient(180deg, var(--success-light) 0%, var(--bg-card) 100%);
  border-color: var(--success-color);
}

.provision-card.card-warning {
  background: linear-gradient(180deg, var(--warning-light) 0%, var(--bg-card) 100%);
  border-color: var(--warning-color);
}

.prov-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.prov-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.card-success .prov-icon { color: var(--success-color); }
.card-warning .prov-icon { color: var(--warning-color); }

.prov-titles h4 {
  font-size: 1.15rem;
  margin-bottom: 0.25rem;
}

.prov-titles p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

.prov-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
  background: var(--bg-card);
  padding: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

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

.pm-label {
  font-size: 0.775rem;
  color: var(--text-muted);
}

.pm-val {
  font-size: 1.2rem;
  font-weight: 700;
}

.prov-footer-advice {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Visor de Documentos Formales */
.doc-viewer-container {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.5rem;
}

@media (max-width: 992px) {
  .doc-viewer-container {
    grid-template-columns: 1fr;
  }
}

.doc-sidebar-config {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.doc-paper-view {
  background: #ffffff;
  color: #1e293b;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  font-family: var(--font-mono);
  font-size: 0.825rem;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-x: auto;
  min-height: 500px;
}

[data-theme="dark"] .doc-paper-view {
  background: #0f172a;
  color: #f1f5f9;
  border-color: #334155;
}

.doc-actions-bar {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

/* Guía de Bloqueo Cautelar y Seguridad */
.legal-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}

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

.legal-card-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.legal-card-header h4 {
  margin: 0;
  font-size: 1.05rem;
}

.legal-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.legal-rule-box {
  background: var(--bg-card);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--warning-color);
  font-size: 0.8rem;
  color: var(--text-main);
}

/* Modales */
.tool-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

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

.tool-modal-dialog {
  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);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: 90vh;
}

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

.tool-modal-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tool-modal-body {
  padding: 1.25rem;
  overflow-y: auto;
}

.tool-modal-footer {
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  background: var(--bg-card-header);
}

.modal-notice-text {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-main);
  margin: 0;
}

/* Estilos de Impresión */
@media print {
  .app-header,
  .fijate-footer,
  .tool-ad-sidebar,
  .tools-ad-banner-section,
  .presets-bar,
  .tool-tabs-bar,
  .doc-sidebar-config,
  .doc-actions-bar,
  .related-tools-section,
  .seo-guide-section {
    display: none !important;
  }

  .main-wrapper, .tool-layout, .tool-with-sidebar, .tool-main-content {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .doc-paper-view {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    color: #000000 !important;
    background: transparent !important;
    font-size: 11pt !important;
    line-height: 1.4 !important;
  }
}

/* Responsividad Móvil */
@media (max-width: 768px) {
  .presets-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .presets-buttons {
    flex-direction: column;
  }
  .btn-preset, .btn-reset {
    width: 100%;
  }
  .timeline-stepper {
    padding-left: 2rem;
  }
  .timeline-stepper::before {
    left: 13px;
  }
  .timeline-step-icon {
    left: -2rem;
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
  }
  .doc-actions-bar {
    flex-direction: column;
  }
  .btn-primary, .btn-secondary {
    width: 100%;
  }
}
