/**
 * Generador de carta de presentación y motivación laboral
 * Estilos canónicos de la aplicación
 */

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

  /* Tema oscuro por defecto */
  --bg-body: #0b0f17;
  --bg-card: #131b2a;
  --bg-card-header: #1a2436;
  --bg-input: #0f172a;
  --border-color: #243248;
  --border-focus: #3b82f6;

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

  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: rgba(37, 99, 235, 0.15);

  --accent-color: #0ea5e9;
  --accent-success: #10b981;
  --accent-warning: #f59e0b;
  --accent-danger: #ef4444;

  --sheet-bg: #ffffff;
  --sheet-text: #1e293b;
  --sheet-meta: #475569;
  --sheet-border: #cbd5e1;
  --sheet-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

[data-theme="light"] {
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-header: #f1f5f9;
  --bg-input: #ffffff;
  --border-color: #e2e8f0;
  --border-focus: #2563eb;

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

  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: rgba(37, 99, 235, 0.1);

  --sheet-bg: #ffffff;
  --sheet-text: #1e293b;
  --sheet-meta: #475569;
  --sheet-border: #cbd5e1;
  --sheet-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

/* Reset y estructura general */
* {
  box-sizing: border-box;
}

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

/* Layout canónico */
.tool-layout {
  max-width: 1200px;
  margin: 1.5rem auto 3rem;
  padding: 0 1rem;
  box-sizing: border-box;
  flex: 1 0 auto;
}

.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%;
}

/* Migas de pan */
.tool-breadcrumbs {
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.tool-breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 0.5rem;
  align-items: center;
}

.tool-breadcrumbs li+li::before {
  content: "/";
  margin-right: 0.5rem;
  color: var(--text-dim);
}

.tool-breadcrumbs a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.tool-breadcrumbs a:hover {
  color: var(--primary-color);
}

/* Hero introductorio */
.tool-hero {
  margin-bottom: 1.75rem;
}

.tool-hero-title {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.tool-hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin: 0 0 1rem 0;
  max-width: 800px;
}

/* Barra de pestañas para móvil */
.mobile-view-tabs {
  display: none;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  background: var(--bg-card);
  padding: 0.35rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.btn-mobile-tab {
  flex: 1;
  padding: 0.65rem 1rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 42px;
  transition: background 0.15s ease, color 0.15s ease;
}

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

/* Rejilla principal del generador: Formulario + Vista previa de carta */
.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.2fr);
  gap: 1.75rem;
  align-items: flex-start;
  margin-bottom: 2.5rem;
}

/* Tarjetas y paneles */
.card-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

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

.panel-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-panel-body {
  padding: 1.25rem;
}

/* Secciones de formulario y acordeones */
.form-step-group {
  margin-bottom: 1.5rem;
  border-bottom: 1px dashed var(--border-color);
  padding-bottom: 1.5rem;
}

.form-step-group:last-child {
  margin-bottom: 0;
  border-bottom: none;
  padding-bottom: 0;
}

.step-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary-color);
  font-weight: 700;
  font-size: 0.8rem;
  font-family: var(--font-mono);
}

.step-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  text-transform: none;
}

/* Modality Radios Selector */
.modality-selector-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.modality-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.modality-card:hover {
  border-color: var(--border-focus);
}

.modality-card input[type="radio"] {
  margin-top: 0.2rem;
  cursor: pointer;
}

.modality-card input[type="radio"]:checked + .modality-info {
  color: var(--primary-color);
}

.modality-info strong {
  display: block;
  font-size: 0.88rem;
  color: var(--text-main);
  line-height: 1.25;
  margin-bottom: 0.2rem;
}

.modality-info small {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* Campos de formulario */
.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.form-group {
  margin-bottom: 0.85rem;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.form-control {
  width: 100%;
  height: 40px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 0.88rem;
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea.form-control {
  height: auto;
  min-height: 72px;
  resize: vertical;
  line-height: 1.4;
}

.form-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

select.form-control {
  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;
  padding-right: 40px;
  cursor: pointer;
}

/* Chips interactivos de fortalezas */
.chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}

.chip-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-family: var(--font-main);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.chip-item:hover {
  border-color: var(--border-focus);
  color: var(--text-main);
}

.chip-item.active {
  background: var(--primary-light);
  border-color: var(--primary-color);
  color: var(--text-main);
  font-weight: 500;
}

.chip-icon {
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--primary-color);
}

.custom-chip-adder {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* Columna de vista previa y folio A4 */
.preview-column {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.sheet-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  background: var(--bg-card);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.template-selector-group {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.template-selector-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-right: 0.25rem;
}

.btn-template-style {
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  color: var(--text-muted);
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-template-style:hover {
  color: var(--text-main);
  border-color: var(--border-focus);
}

.btn-template-style.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #ffffff;
  font-weight: 600;
}

.sheet-actions-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Botones principales */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.5rem 0.95rem;
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
  min-height: 38px;
}

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

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

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

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

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  min-height: 32px;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
}

.btn-ghost:hover {
  color: var(--text-main);
  background: var(--bg-input);
}

/* El Folio de la Carta (Diseño fiel a papel A4) */
.sheet-viewport-wrapper {
  background: rgba(15, 23, 42, 0.4);
  padding: 1.5rem 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: auto;
}

.letter-sheet {
  width: 100%;
  max-width: 680px;
  min-height: 840px;
  background-color: var(--sheet-bg);
  color: var(--sheet-text);
  padding: 2.75rem 2.5rem;
  box-shadow: var(--sheet-shadow);
  border-radius: 2px;
  font-family: 'Calibri', 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 0.94rem;
  line-height: 1.55;
  border: 1px solid var(--sheet-border);
  position: relative;
  outline: none;
  cursor: text;
  box-sizing: border-box;
}

.letter-sheet-inner {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

/* Estilos internos de la carta */
.sheet-sender-header {
  margin-bottom: 1.75rem;
  padding-bottom: 0.85rem;
  border-bottom: 1.5px solid var(--sheet-border);
}

.sender-name {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.2rem 0;
  letter-spacing: -0.01em;
}

.sender-title {
  font-size: 0.92rem;
  color: #475569;
  font-weight: 500;
  margin-bottom: 0.4rem;
}

.sender-meta {
  font-size: 0.8rem;
  color: #64748b;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.sheet-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  gap: 1rem;
}

.sheet-recipient {
  font-size: 0.9rem;
  color: #1e293b;
  line-height: 1.35;
}

.recipient-person strong {
  color: #0f172a;
  display: block;
}

.recipient-company {
  font-weight: 500;
}

.sheet-date {
  font-size: 0.86rem;
  color: #475569;
  font-style: italic;
  text-align: right;
  white-space: nowrap;
}

.sheet-subject {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 1.25rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid #e2e8f0;
}

.sheet-greeting {
  font-weight: 600;
  margin-bottom: 1rem;
  color: #0f172a;
}

.letter-p {
  margin: 0 0 1rem 0;
  text-align: justify;
  text-justify: inter-word;
  color: #1e293b;
}

.sheet-closing {
  margin: 1.25rem 0 1rem 0;
  text-align: justify;
}

.sheet-valediction {
  margin-top: 1.5rem;
}

.sheet-valediction p {
  margin: 0 0 2.5rem 0;
  color: #1e293b;
}

.sheet-signature-box {
  border-top: 1px dashed #cbd5e1;
  display: inline-block;
  padding-top: 0.4rem;
  min-width: 180px;
}

.sheet-signature-name {
  display: block;
  font-size: 0.95rem;
  color: #0f172a;
}

/* Variantes visuales de plantilla */
/* 1. Clásico: cabecera sobria y tipografía serif elegante en nombres */
.template-clasico .sheet-sender-header {
  text-align: right;
  border-bottom: 2px solid #0f172a;
}

.template-clasico .sender-meta {
  justify-content: flex-end;
}

.template-clasico .sheet-subject {
  border-bottom: 2px solid #0f172a;
}

/* 2. Moderno: toque de color corporativo pizarra/azul y detalles estructurados */
.template-moderno .sheet-sender-header {
  border-left: 4px solid var(--primary-color);
  padding-left: 0.85rem;
  border-bottom: 1px solid #e2e8f0;
}

.template-moderno .sender-name {
  color: #1e3a8a;
}

.template-moderno .sheet-subject {
  color: #1e3a8a;
  border-bottom: 1px solid #93c5fd;
}

/* 3. Minimalista: espacio en blanco generoso, sin líneas pesadas */
.template-minimalista .sheet-sender-header {
  border-bottom: none;
  padding-bottom: 0.2rem;
}

.template-minimalista .sheet-subject {
  border-bottom: none;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: #475569;
}

/* Insignia de edición manual */
.manual-edit-indicator {
  display: none;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Panel de auditoría de calidad de redacción */
.quality-audit-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.quality-audit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.quality-header-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.quality-score-badge {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary-color);
}

.quality-progress-track {
  width: 100%;
  height: 6px;
  background: var(--bg-input);
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 0.65rem;
  border: 1px solid var(--border-color);
}

.quality-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 9999px;
  transition: width 0.3s ease, background 0.3s ease;
}

.progress-good {
  background: var(--accent-success);
}

.progress-warning {
  background: var(--accent-warning);
}

.progress-danger {
  background: var(--accent-danger);
}

.quality-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border-color);
}

.quality-status-text {
  font-size: 0.85rem;
  margin-bottom: 0.85rem;
  font-weight: 500;
}

.text-good {
  color: var(--accent-success);
}

.text-warning {
  color: var(--accent-warning);
}

.text-danger {
  color: var(--accent-danger);
}

/* Checklist de calidad */
.quality-checklist-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.82rem;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
}

.checklist-item.passed {
  border-color: rgba(16, 185, 129, 0.3);
}

.checklist-item.passed .checklist-icon {
  color: var(--accent-success);
  font-weight: bold;
}

.checklist-item.pending {
  border-color: rgba(245, 158, 11, 0.3);
}

.checklist-item.pending .checklist-icon {
  color: var(--accent-warning);
}

.checklist-title {
  display: block;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.25;
}

.checklist-tip {
  display: block;
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-top: 0.15rem;
}

/* Modales accesibles */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
}

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

.modal-dialog {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 580px;
  width: 100%;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  overflow: hidden;
}

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

.modal-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-main);
}

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

.modal-close:hover {
  color: var(--text-main);
}

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

.modal-body h4 {
  color: var(--text-main);
  margin: 1.25rem 0 0.5rem 0;
  font-size: 1rem;
}

.modal-body h4:first-child {
  margin-top: 0;
}

.modal-body ul {
  padding-left: 1.25rem;
  margin: 0.5rem 0 1rem 0;
}

.modal-body li {
  margin-bottom: 0.35rem;
}

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

/* Toast flotante */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast-alert {
  background: #1e293b;
  color: #f8fafc;
  border: 1px solid #334155;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}

.toast-alert.visible {
  transform: translateY(0);
  opacity: 1;
}

.toast-alert svg {
  color: var(--accent-success);
}

/* Reglas de impresión (@media print) */
@media print {
  @page {
    size: A4 portrait;
    margin: 18mm 20mm;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Ocultar elementos parásitos */
  .app-header,
  .tools-ad-banner-section,
  .tool-ad-sidebar,
  .tool-breadcrumbs,
  .tool-hero,
  .mobile-view-tabs,
  #form-column,
  .sheet-toolbar,
  .quality-audit-box,
  .fijate-footer,
  .toast-container,
  .modal-backdrop,
  .seo-guide-section,
  .related-tools-section,
  .quick-bar-wrapper {
    display: none !important;
  }

  .tool-layout,
  .tool-with-sidebar,
  .tool-main-content,
  .workspace-grid,
  .preview-column,
  .sheet-viewport-wrapper {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  .letter-sheet {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    max-width: 100% !important;
    min-height: auto !important;
    font-size: 11pt !important;
    line-height: 1.4 !important;
    color: #000000 !important;
  }

  .letter-sheet-inner {
    page-break-inside: avoid;
  }

  .sender-name {
    color: #000000 !important;
  }

  .recipient-person strong,
  .sheet-subject,
  .sheet-greeting,
  .sheet-signature-name {
    color: #000000 !important;
  }

  .letter-p {
    color: #111111 !important;
    margin-bottom: 8pt !important;
  }
}

/* Responsividad (Móvil y Tablet) */
@media (max-width: 992px) {
  .tool-with-sidebar {
    display: block;
  }

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

  .mobile-view-tabs {
    display: flex;
  }

  .hidden-mobile {
    display: none !important;
  }

  .form-grid-2 {
    grid-template-columns: 1fr;
  }

  .modality-selector-grid {
    grid-template-columns: 1fr;
  }

  .letter-sheet {
    padding: 1.5rem 1.25rem;
    font-size: 0.88rem;
  }

  .sender-meta {
    flex-direction: column;
    gap: 0.2rem;
  }

  .sheet-meta-row {
    flex-direction: column;
    gap: 0.5rem;
  }

  .sheet-date {
    text-align: left;
  }

  .toast-container {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
  }

  .toast-alert {
    width: 100%;
    justify-content: center;
  }
}
