/* ==========================================================================
   ESTUDIO REAL — CORRECCIONES UI / PWA & IMPRESIÓN
   ========================================================================== */
/* Quitar flechas de inputs numéricos */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type="number"] {
    -moz-appearance: textfield;
}

/* Evitar fondo blanco en el autocompletado del navegador */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px var(--bg-primary) inset !important;
    -webkit-text-fill-color: var(--text-main) !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* ==========================================================================
   ESTUDIO REAL — PALETA DE COLORES Y VARIABLES UI (CSS3 PURO)
   ========================================================================== */
:root {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #334155;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  
  --accent-blue: #38bdf8;
  --accent-green: #10b981;
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;

  --border-color: #475569;
  --radius: 8px;
  --transition: all 0.25s ease-in-out;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
}

.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Layout */
.sidebar {
  width: 260px;
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1rem;
  transition: var(--transition);
  z-index: 100;
}

.brand h2 {
  font-size: 1.25rem;
  color: var(--accent-blue);
  letter-spacing: 0.5px;
}

.sub-brand {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nav-menu {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-grow: 1;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  border-radius: var(--radius);
  font-size: 0.95rem;
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
}

.nav-btn:hover, .nav-btn.active {
  background-color: var(--bg-card);
  color: var(--text-main);
}

.nav-btn.active {
  border-left: 4px solid var(--accent-blue);
}

.sidebar-footer {
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

/* Main Wrapper & Topbar */
.main-wrapper {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 65px;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  gap: 1rem;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--bg-primary);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  width: 100%;
  max-width: 420px;
}

.search-box input {
  background: transparent;
  border: none;
  color: var(--text-main);
  outline: none;
  width: 100%;
}

.btn-primary-sm {
  background-color: var(--accent-blue);
  color: #000;
  border: none;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
}

.btn-primary {
  background-color: var(--accent-blue);
  color: #000;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-success {
  background-color: var(--accent-green);
  color: #000;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 700;
  cursor: pointer;
  font-size: 1rem;
}

.btn-warning-sm {
  background-color: var(--accent-amber);
  color: #000;
  border: none;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
}

/* Content Area */
.content-area {
  padding: 1.5rem;
  flex-grow: 1;
}

.view-section {
  display: none;
}

.view-section.active {
  display: block;
}

.section-header {
  margin-bottom: 1.5rem;
}

.section-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

/* Dashboard Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.metric-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 1.25rem;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
}

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

.metric-value {
  font-size: 1.75rem;
  font-weight: 700;
  margin-top: 0.5rem;
  color: var(--accent-blue);
}

.metric-card.highlight .metric-value {
  color: var(--accent-green);
}

/* Panels, Tables and Local Toolbars */
.panel-block {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.panel-header {
  margin-bottom: 1rem;
}

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

.search-box-local {
  flex: 1;
  min-width: 220px;
}

.search-box-local input {
  width: 100%;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  color: var(--text-main);
  outline: none;
}

.search-box-local input:focus {
  border-color: var(--accent-blue);
}

.sort-box-local {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sort-box-local label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.sort-box-local select {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 0.45rem 0.65rem;
  color: var(--text-main);
  outline: none;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th, .data-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.data-table th {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
}

/* Form Styles */
.grid-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.full-width {
  grid-column: 1 / -1;
}

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

.form-group label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.form-group input, .form-group select, .form-group textarea {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 0.65rem;
  color: var(--text-main);
  outline: none;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--accent-blue);
}

/* Advanced Feature Blocks */
.form-section-advanced {
  background-color: var(--bg-primary);
  border: 1px dashed var(--border-color);
  padding: 1.25rem;
  border-radius: var(--radius);
  margin-top: 0.5rem;
  display: none;
}

.form-section-advanced h3 {
  font-size: 1rem;
  color: var(--accent-amber);
  margin-bottom: 1rem;
}

.toggles-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.toggle-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 1.25rem;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.toggle-info h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.toggle-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--bg-card);
  transition: .3s;
  border-radius: 34px;
  border: 1px solid var(--border-color);
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-main);
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--accent-green);
}

input:checked + .slider:before {
  transform: translateX(24px);
  background-color: #000;
}

/* Modales */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

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

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

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

.btn-close-modal {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

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

.info-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  background-color: var(--bg-primary);
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
}

.info-item {
  display: flex;
  flex-direction: column;
}

.info-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.select-inline {
  background-color: var(--bg-secondary);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0.3rem;
  margin-top: 0.2rem;
}

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

.margin-top { margin-top: 1.5rem; }
.margin-top-sm { margin-top: 1rem; }
.margin-bottom { margin-bottom: 1rem; }

.summary-box {
  background-color: var(--bg-primary);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
}

.summary-row.highlight-row {
  font-size: 1.2rem;
  border-top: 1px dashed var(--border-color);
  padding-top: 0.5rem;
}

.text-success { color: var(--accent-green); }
.text-danger { color: var(--accent-red); }
.text-muted { color: var(--text-muted); }

.border-top {
  border-top: 1px solid var(--border-color);
  padding-top: 0.5rem;
}

.btn-success-sm {
  background-color: var(--accent-green);
  color: #000;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
}

.btn-danger-sm {
  background-color: var(--accent-red);
  color: #fff;
  border: none;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
}

#hoja-recepcion-impresion {
  display: none;
}

/* Design de Ticket en Modal */
.ticket-receipt {
  background: #fff;
  color: #000;
  font-family: 'Courier New', Courier, monospace;
  max-width: 380px;
  margin: 0 auto;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.ticket-header {
  text-align: center;
  border-bottom: 1px dashed #000;
  padding-bottom: 10px;
  margin-bottom: 10px;
}

.ticket-header h2 {
  font-size: 1.2rem;
  text-transform: uppercase;
}

.ticket-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  font-size: 0.85rem;
}

.ticket-table th, .ticket-table td {
  padding: 4px 0;
  border-bottom: 1px dotted #ccc;
}

.ticket-totals {
  border-top: 1px dashed #000;
  padding-top: 8px;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ticket-totals-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
}

/* Notificaciones Toast */
.pwa-toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 2000;
  max-width: 350px;
  width: calc(100% - 40px);
}

.pwa-toast {
  background-color: var(--bg-card);
  color: var(--text-main);
  border-left: 4px solid var(--accent-blue);
  padding: 0.9rem 1.2rem;
  border-radius: var(--radius);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  animation: slideIn 0.3s ease-out forwards;
}

.pwa-toast.success { border-left-color: var(--accent-green); }
.pwa-toast.warning { border-left-color: var(--accent-amber); }
.pwa-toast.error { border-left-color: var(--accent-red); }

@keyframes slideIn {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: -260px;
    height: 100vh;
  }
  .sidebar.open { left: 0; }
  .menu-toggle { display: block; }
}

.estudio-real-footer {
  text-align: center;
  padding: 1.5rem;
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
}

.cta-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent-green);
  text-decoration: none;
  font-weight: 600;
  margin-top: 0.5rem;
  transition: var(--transition);
}

.cta-whatsapp:hover {
  color: var(--text-main);
}

/* ==========================================================================
   SOPORTE DE IMPRESIÓN REFINADO (TICKETS Y RECEPCIÓN)
   ========================================================================== */
@media print {
  @page {
    margin: 0;
  }
  body * { visibility: hidden !important; }
  .no-print, .app-container, .modal-backdrop:not(#modal-ticket-preview) { display: none !important; }

  html, body {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  body { background-color: #fff !important; color: #000 !important; }

  /* ==========================================================
     MODO 1: Impresión Exclusiva de Recepción (Carta / Letter, 1 hoja)
     Todo lo de este bloque está aislado bajo "body.print-mode-recepcion"
     para que jamás afecte al ticket térmico.
     ========================================================== */
  body.print-mode-recepcion #hoja-recepcion-impresion,
  body.print-mode-recepcion #hoja-recepcion-impresion * {
    visibility: visible !important;
  }
  body.print-mode-recepcion #hoja-recepcion-impresion {
    display: block !important;
    position: absolute;
    left: 0; top: 0;
    width: 100%;
    max-width: 210mm;
    padding: 8mm 10mm;
    font-family: system-ui, -apple-system, sans-serif;
    color: #000;
    background: #fff;
    page-break-after: avoid;
  }
  body.print-mode-recepcion #ticket-content { display: none !important; }
  /* El modal del ticket nunca debe ocupar espacio al imprimir la Recepción */
  body.print-mode-recepcion #modal-ticket-preview { display: none !important; }

  /* Compactado defensivo para garantizar que TODO quepa en una sola hoja,
     aunque el motivo/daños tengan texto largo o el checklist crezca.
     Solo aplica en este modo. */
  body.print-mode-recepcion #hoja-recepcion-impresion { font-size: 0.93em; }
  body.print-mode-recepcion .print-header { padding-bottom: 6px; margin-bottom: 6px; }
  body.print-mode-recepcion .print-grid { gap: 10px; margin-bottom: 6px; page-break-inside: avoid; }
  body.print-mode-recepcion .print-motivo-combustible { gap: 8px; margin-bottom: 6px; page-break-inside: avoid; }
  body.print-mode-recepcion .print-motivo { padding: 6px; }
  body.print-mode-recepcion .print-combustible-box { padding: 6px; }

  /* Silueta del vehículo: se le da prioridad de espacio para que el
     mecánico pueda marcar rayones/golpes con comodidad. */
  body.print-mode-recepcion .print-silhouettes { margin-bottom: 6px; page-break-inside: avoid; }
  body.print-mode-recepcion .print-silhouettes img {
    width: 96% !important;
    max-width: 96% !important;
    height: auto !important;
    max-height: 85mm !important;
  }

  /* Checklist depurado (13 ítems): 3 columnas compactas */
  body.print-mode-recepcion .print-checklist { margin-bottom: 6px; page-break-inside: avoid; }
  body.print-mode-recepcion .checklist-grid {
    grid-template-columns: repeat(3, 1fr);
    padding: 6px;
    gap: 6px;
    font-size: 0.78rem;
  }

  body.print-mode-recepcion .print-notas { page-break-inside: avoid; }
  body.print-mode-recepcion .print-notas .notas-box { height: 40px; margin-top: 4px; }
  body.print-mode-recepcion .print-firmas { margin-top: 16px; page-break-inside: avoid; }

  /* ==========================================================
     MODO 2: Impresión Exclusiva de Ticket Térmico (80mm)
     Todo lo de este bloque está aislado bajo "body.print-mode-ticket"
     para que jamás afecte a la hoja de Recepción.
     ========================================================== */

  /* El ticket vive dentro de un modal (.modal-backdrop), que normalmente
     se oculta por completo al imprimir. Se neutraliza SOLO ese modal
     (posición fija, fondo oscuro, límites de alto) y SOLO cuando estamos
     en modo ticket, para poder renderizar su contenido en la hoja. */
  body.print-mode-ticket #modal-ticket-preview {
    display: block !important;
    position: static !important;
    inset: auto !important;
    background: none !important;
    backdrop-filter: none !important;
    padding: 0 !important;
  }
  body.print-mode-ticket #modal-ticket-preview .modal-container {
    display: block !important;
    position: static !important;
    max-width: none !important;
    max-height: none !important;
    overflow: visible !important;
    box-shadow: none !important;
    background: none !important;
    border: none !important;
  }
  body.print-mode-ticket #modal-ticket-preview .modal-body {
    display: block !important;
    position: static !important;
    padding: 0 !important;
    overflow: visible !important;
    background: none !important;
  }

  body.print-mode-ticket #ticket-content,
  body.print-mode-ticket #ticket-content * {
    visibility: visible !important;
  }
  body.print-mode-ticket #ticket-content {
    display: block !important;
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    max-width: 80mm;
    margin: 0 auto;
    padding: 2mm 4mm;
    font-family: 'Courier New', Courier, monospace;
    font-size: 11px;
    line-height: 1.35;
    color: #000;
    background: #fff;
    box-shadow: none;
    border: none;
    page-break-inside: avoid;
  }
  /* Aunque se imprima en hoja Carta o se guarde como PDF, el ticket
     conserva su ancho de ticketera y queda centrado, no desparramado. */
  body.print-mode-ticket #hoja-recepcion-impresion { display: none !important; }

  /* Formato base de documentos */
  .print-header { text-align: center; border-bottom: 2px solid #000; padding-bottom: 10px; margin-bottom: 15px; }
  .print-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 15px; }
  .print-motivo { border: 1px solid #ccc; }

  /* Fila combinada: Motivo de Ingreso (70%) + Medidor de Combustible (30%) */
  .print-motivo-combustible { display: grid; grid-template-columns: 7fr 3fr; gap: 15px; margin-bottom: 15px; align-items: stretch; }
  .print-motivo-combustible .print-motivo,
  .print-motivo-combustible .print-combustible-box { padding: 10px; margin-bottom: 0; }
  .print-combustible-box { border: 1px solid #ccc; text-align: center; display: flex; flex-direction: column; justify-content: center; }
  .print-combustible-box h3 { margin-bottom: 6px; }
  .fuel-gauge-bar { display: flex; height: 16px; border: 1.5px solid #000; }
  .fuel-segment { flex: 1; background: #fff; border-right: 1px solid #000; }
  .fuel-segment:last-child { border-right: none; }
  .fuel-segment.filled { background: #000; }
  .fuel-gauge-labels { display: flex; justify-content: space-between; font-size: 0.65rem; margin-top: 3px; font-weight: bold; }
  
  .print-silhouettes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 15px; }
  .silueta { border: 1px solid #ccc; padding: 6px; text-align: center; }
  .silueta h4 { margin-bottom: 4px; font-size: 0.8rem; text-transform: uppercase; }
  .silueta svg { width: 100%; max-height: 75px; }
  
  .print-checklist { margin-bottom: 15px; }
  .checklist-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; border: 1px solid #ccc; padding: 10px; font-size: 0.85rem;}
  
  .print-notas .notas-box { height: 70px; border: 1px solid #ccc; margin-top: 5px;}
  
  .print-firmas { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 40px; text-align: center; font-size: 0.85rem; }
  .firma-line { border-top: 1px solid #000; padding-top: 5px; }
}

/* ==========================================================================
   PIE: enlaces, versión y bloque "Más apps gratuitas"
   ========================================================================== */
.footer-meta { margin-top: 1rem; font-size: 0.8rem; color: var(--text-muted); }
.footer-meta a { color: var(--accent-blue); }
.mas-apps { max-width: 640px; margin: 1.25rem auto 0 auto; padding: 1rem; border: 1px solid var(--border-color); border-radius: var(--radius); background-color: var(--bg-primary); }
.mas-apps h3 { margin-bottom: 0.4rem; }
.mas-apps p { font-size: 0.9rem; color: var(--text-muted); }
.mas-apps-botones { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; margin-top: 0.75rem; }
.btn-enlace { display: inline-block; text-decoration: none; background-color: var(--accent-blue); color: #000; padding: 0.45rem 0.9rem; border-radius: var(--radius); font-weight: 600; border: 1px solid var(--accent-blue); }
.btn-enlace.secundario { background-color: transparent; color: var(--accent-blue); }


/* ==========================================================================
   ALMACENAMIENTO: indicador de uso y avisos
   ========================================================================== */
.almacenamiento-barra { height: 10px; background-color: var(--border-color); border-radius: 999px; overflow: hidden; margin: 0.5rem 0; }
.almacenamiento-relleno { height: 100%; width: 0; background-color: var(--accent-green); transition: width 0.3s ease; }
.almacenamiento-relleno.aviso { background-color: var(--accent-amber); }
.almacenamiento-relleno.critico { background-color: var(--accent-red); }
.almacenamiento-aviso { font-size: 0.9rem; font-weight: 600; margin-top: 0.25rem; }
.almacenamiento-aviso.ok { display: none; }
.almacenamiento-aviso.aviso { color: var(--accent-amber); }
.almacenamiento-aviso.critico { color: var(--accent-red); }


/* ==========================================================================
   AYUDA
   ========================================================================== */
.ayuda details { margin-bottom: 0.75rem; padding: 0.4rem 1rem; border: 1px solid var(--border-color); border-radius: var(--radius); background-color: var(--bg-primary); }
.ayuda summary { cursor: pointer; font-weight: 700; padding: 0.5rem 0; }
.ayuda ul { padding-left: 1.2rem; margin: 0.25rem 0 0.75rem 0; list-style: disc; }
.ayuda li { margin-bottom: 0.4rem; line-height: 1.45; color: var(--text-muted); }
.ayuda li strong { color: var(--accent-blue); }
