/* =============================================================================
   JM Home — Tema 2026  (capa visual sobre jmhome.css)
   -----------------------------------------------------------------------------
   Solo CSS: no cambia HTML ni JS, así que no toca funcionalidad.
   Se carga DESPUÉS de jmhome.css. REVERTIR: quitar el <link> de index.html.

   Identidad: azul Ford (#003478) + azul eléctrico (#1769FF) como acento, grises
   "slate" fríos, superficies blancas con sombras suaves sobre un fondo gris
   azulado muy claro. Barras translúcidas con blur (estilo iOS) y un indicador
   de pastilla en la barra de abajo (estilo Material 3).
   ============================================================================= */

:root {
  /* Grises fríos (slate) — afinan TODO el texto y bordes de la app */
  --gray-50:  #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #526077;
  --gray-700: #334155;
  --gray-800: #1E293B;
  --gray-900: #0F172A;
  --blue-light: #EAF1FF;

  --t-bg: #F4F6FB;                 /* fondo del área de contenido */
  --t-surface: #FFFFFF;
  --t-ink: #0B2353;                /* títulos: azul marino profundo */
  --t-line: #E6EAF2;
  --t-accent: #1769FF;
  --t-grad: linear-gradient(135deg, #1769FF 0%, #0B47C4 55%, #003478 100%);
  --t-e1: 0 1px 2px rgba(15,23,42,.05), 0 1px 3px rgba(15,23,42,.07);
  --t-e2: 0 2px 4px rgba(15,23,42,.04), 0 8px 20px rgba(15,23,42,.08);
  --t-e3: 0 18px 48px rgba(15,23,42,.18);
  --t-ring: 0 0 0 3px rgba(23,105,255,.22);

  --shadow-sm: var(--t-e1);
  --shadow-md: var(--t-e2);
  --shadow-lg: var(--t-e3);
}

/* ---------- Tipografía ---------- */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  color: var(--gray-900);
}
h1, h2, h3, h4 { letter-spacing: -.2px; }

/* ---------- Fondo del contenido ---------- */
#app-content { background: var(--t-bg); }
#view-notificaciones .view-body, #notificaciones-body { background: transparent; }
/* Franjas que eran blancas sobre fondo blanco: ahora transparentes */
.conv-search-bar, .dir-search-bar, .notif-view-tabs { background: transparent !important; }
.notif-view-tabs .notif-tab { background: var(--t-surface); border: 1px solid var(--t-line); box-shadow: var(--t-e1); }
.notif-view-tabs .notif-tab.active { background: var(--t-grad); color: #fff; border-color: transparent; }

/* ---------- Barra de título de cada vista ---------- */
.view-toolbar-slot {
  background: rgba(255,255,255,.86) !important;
  backdrop-filter: saturate(180%) blur(18px) !important;
  -webkit-backdrop-filter: saturate(180%) blur(18px) !important;
  border-top: 0 !important;
  box-shadow: 0 1px 0 var(--t-line), 0 6px 18px rgba(15,23,42,.04) !important;
}
.view-toolbar-slot > .view-toolbar { border-bottom: 0 !important; }
.view-toolbar-slot .toolbar-title,
.view-toolbar-slot .view-toolbar-title {
  color: var(--t-ink);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.4px;
}
/* El título ya no va centrado en absoluto (se empalmaba con los botones en
   Pagos, Notificaciones…): va en flujo, a la izquierda, igual en todas las vistas. */
.view-toolbar-slot .toolbar-title {
  position: static; transform: none;
  flex: 1 1 auto; min-width: 0; max-width: none;
  text-align: left; padding-right: 8px;
}
.tb-back {
  font-size: 16px !important; font-weight: 600 !important;
  gap: 5px !important; padding: 10px 8px 10px 12px !important;
}
.tb-back i {
  width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(0,52,120,.07); font-size: 13px;
}
.view-toolbar-slot .btn,
.view-toolbar-slot .btn-primary,
.view-toolbar-slot .btn-secondary {
  border-radius: 999px !important;
  border: 1px solid rgba(0,52,120,.18) !important;
  background: rgba(255,255,255,.7) !important;
  font-weight: 700;
}

/* ---------- Barra de navegación inferior ---------- */
.top-nav {
  background: rgba(255,255,255,.9) !important;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--t-line) !important;
  box-shadow: 0 -8px 28px rgba(15,23,42,.07) !important;
}
.nav-item .nav-icon-wrap {
  display: inline-flex; align-items: center; justify-content: center;
  width: 54px; height: 30px; border-radius: 999px;
  transition: background .22s ease, transform .22s ease;
}
.nav-item.active .nav-icon-wrap { background: rgba(23,105,255,.13); }
.nav-item:active .nav-icon-wrap { transform: scale(.92); }
.nav-item i { font-size: 19px; }
.nav-label { font-size: 10.5px; font-weight: 600; margin-top: 3px; color: var(--gray-500); }
.nav-item.active .nav-label { color: var(--ford-blue); font-weight: 800; }

/* ---------- Botones ---------- */
.btn { border-radius: 12px; font-weight: 700; letter-spacing: .1px; }
.btn:active { transform: scale(.98); }
.btn-primary {
  background: var(--t-grad);
  box-shadow: 0 6px 16px rgba(23,105,255,.26), inset 0 1px 0 rgba(255,255,255,.18);
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-primary:active { background: var(--t-grad); filter: brightness(.95); }
.btn-success { box-shadow: 0 6px 16px rgba(0,166,81,.22); }
.btn-danger  { box-shadow: 0 6px 16px rgba(208,2,27,.20); }
:focus-visible { outline: none; box-shadow: var(--t-ring); }

/* ---------- Pestañas de filtro (Todos / Pendientes / …) ---------- */
.filter-tabs {
  background: transparent !important;
  border-bottom: 0 !important;
  padding: 14px 16px 8px;
  scrollbar-width: none;
}
.filter-tabs::-webkit-scrollbar { display: none; }
.filter-tab {
  background: var(--t-surface);
  border: 1px solid var(--t-line);
  color: var(--gray-600);
  font-weight: 600;
  padding: 7px 16px;
  box-shadow: var(--t-e1);
}
.filter-tab.active {
  background: var(--t-grad);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 14px rgba(23,105,255,.26);
}

/* ---------- Estados vacíos ---------- */
.empty-state { color: var(--gray-500); }
.empty-state > i:first-child {
  width: 88px; height: 88px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 34px; color: var(--t-accent);
  background: radial-gradient(circle at 30% 25%, #F3F7FF 0%, #E1EBFF 100%);
  box-shadow: inset 0 0 0 1px rgba(23,105,255,.10), 0 10px 24px rgba(23,105,255,.10);
}
.empty-state p { color: var(--gray-600); font-weight: 500; line-height: 1.5; }

/* ---------- Tarjetas y listas ---------- */
.list-item {
  border-radius: 16px;
  border: 1px solid var(--t-line);
  box-shadow: var(--t-e1);
}
.list-item:hover { box-shadow: var(--t-e2); }
.view-body .list-container { border-radius: 16px; box-shadow: var(--t-e1); }

/* ---------- Campos de formulario ---------- */
.form-group input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
.form-group select,
.form-group textarea,
input[type="text"], input[type="search"], input[type="email"], input[type="password"],
input[type="number"], input[type="tel"], input[type="url"], input[type="date"],
input[type="time"], input[type="datetime-local"], input[type="month"],
select, textarea {
  border-radius: 12px;
  border: 1px solid var(--gray-300);
  background-color: #fff;
}
.form-group input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):focus,
.form-group select:focus, .form-group textarea:focus,
input[type="text"]:focus, input[type="search"]:focus, input[type="email"]:focus,
input[type="password"]:focus, input[type="number"]:focus, input[type="tel"]:focus,
input[type="url"]:focus, input[type="date"]:focus, input[type="time"]:focus,
input[type="datetime-local"]:focus, input[type="month"]:focus,
select:focus, textarea:focus {
  border-color: var(--t-accent);
  box-shadow: var(--t-ring);
}
.search-input { border: 1px solid var(--gray-300) !important; background-color: #fff; }
.search-input:focus { border-color: var(--t-accent) !important; box-shadow: var(--t-ring); }

/* ---------- Ventanas (modales tipo hoja) ---------- */
.modal-sheet {
  border-radius: 26px 26px 0 0;
  box-shadow: var(--t-e3);
}
.modal-sheet::before {                      /* asa para arrastrar, estilo iOS */
  content: ""; display: block; flex-shrink: 0;
  width: 40px; height: 5px; border-radius: 3px;
  background: var(--gray-300); margin: 8px auto 0;
}
.modal-overlay.modal-space .modal-sheet::before,
.modal-overlay.modal-fullscreen .modal-sheet::before { display: none; }
@media (min-width: 700px) { .modal-sheet::before { display: none; } }
.modal-header { border-bottom: 1px solid var(--t-line); padding-top: 14px; }
.modal-header h3 { font-size: 18px; font-weight: 800; color: var(--t-ink); letter-spacing: -.3px; }
.modal-header .btn-icon {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--gray-100); color: var(--gray-600);
}
.modal-overlay { backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }

/* ---------- Aviso flotante (toast) ---------- */
.toast {
  background: rgba(15,23,42,.92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(15,23,42,.30);
  font-weight: 600;
}

/* ---------- Menú hamburguesa ---------- */
#menu-drawer .menu-cat {
  border-radius: 18px;
  box-shadow: var(--t-e1);
  border: 1px solid var(--t-line);
}
#menu-drawer .menu-cat > .menu-cat-header { color: var(--t-ink); font-weight: 800; letter-spacing: -.2px; }

/* ---------- Detalles ---------- */
::selection { background: rgba(23,105,255,.18); }
* { scrollbar-width: thin; scrollbar-color: var(--gray-300) transparent; }
