/* ── TILES ────────────────────────────────────────── */
.hub-tiles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.hub-tile {
  position: relative; overflow: hidden;
  border-radius: 16px;
  padding: 20px 22px;
  cursor: pointer;
  transition: transform .2s cubic-bezier(.22,1,.36,1), box-shadow .2s;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.07);
  min-height: 130px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.hub-tile:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: rgba(255,255,255,.14);
}
.hub-tile-glow {
  position: absolute; bottom: -40px; right: -40px;
  width: 130px; height: 130px; border-radius: 50%;
  filter: blur(40px); opacity: .45;
  transition: opacity .2s;
  pointer-events: none;
}
.hub-tile:hover .hub-tile-glow { opacity: .65; }

/* Colores por tile */
.hub-tile-fuel    { border-color: rgba(59,130,246,.15); }
.hub-tile-fuel    .hub-tile-glow { background: #3b93c9; }
.hub-tile-fuel:hover { box-shadow: 0 16px 48px rgba(59,130,246,.15); }

.hub-tile-fleet   { border-color: rgba(16,185,129,.15); }
.hub-tile-fleet   .hub-tile-glow { background: #10b981; }
.hub-tile-fleet:hover { box-shadow: 0 16px 48px rgba(16,185,129,.15); }

.hub-tile-maint   { border-color: rgba(245,158,11,.15); }
.hub-tile-maint   .hub-tile-glow { background: #f59e0b; }
.hub-tile-maint:hover { box-shadow: 0 16px 48px rgba(245,158,11,.15); }

.hub-tile-odo     { border-color: rgba(6,182,212,.15); }
.hub-tile-odo     .hub-tile-glow { background: #06b6d4; }
.hub-tile-odo:hover { box-shadow: 0 16px 48px rgba(6,182,212,.15); }

.hub-tile-analysis { border-color: rgba(168,85,247,.15); }
.hub-tile-analysis .hub-tile-glow { background: #a855f7; }
.hub-tile-analysis:hover { box-shadow: 0 16px 48px rgba(168,85,247,.15); }

.hub-tile-alerts  { border-color: rgba(239,68,68,.12); }
.hub-tile-alerts  .hub-tile-glow { background: #ef4444; }
.hub-tile-alerts:hover { box-shadow: 0 16px 48px rgba(239,68,68,.12); }

.hub-tile-top {
  display: flex; align-items: flex-start;
  justify-content: space-between;
}
.hub-tile-icon { font-size: 22px; line-height: 1; }
.hub-tile-num {
  font-size: 32px; font-weight: 800; color: #fff;
  font-variant-numeric: tabular-nums; letter-spacing: -.04em;
  line-height: 1;
}
.hub-tile-num-warn   { color: #fcd34d; }
.hub-tile-num-danger { color: #fca5a5; }

.hub-tile-name {
  font-size: 15px; font-weight: 700; color: #fff;
  letter-spacing: -.02em; margin-top: 14px;
}
.hub-tile-sub {
  font-size: 11px; color: rgba(255,255,255,.4);
  font-weight: 500; margin-top: 3px; line-height: 1.4;
}
.hub-tile-footer {
  font-size: 10px; color: rgba(255,255,255,.25);
  font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
  margin-top: 14px; padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,.06);
}

/* ── FILA INFERIOR ─────────────────────────────────── */
.hub-bottom-grid {
  display: grid; grid-template-columns: 1fr 300px; gap: 10px;
}
.hub-feed-card, .hub-quick-card {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px; padding: 18px 20px;
}
.hub-feed-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.hub-feed-title { font-size: 13px; font-weight: 700; color: rgba(255,255,255,.8); }
.hub-feed-link {
  font-size: 11px; color: rgba(59,130,246,.8); font-weight: 600;
  background: none; border: none; cursor: pointer; font-family: inherit;
  transition: color .15s;
}
.hub-feed-link:hover { color: #93c5fd; }
.hub-feed-list { display: flex; flex-direction: column; gap: 2px; }
.hub-feed-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px; border-radius: 7px;
  transition: background .12s; cursor: pointer;
}
.hub-feed-item:hover { background: rgba(255,255,255,.04); }
.hub-feed-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
}
.hub-feed-text { font-size: 12px; color: rgba(255,255,255,.65); flex: 1; }
.hub-feed-text strong { color: rgba(255,255,255,.9); font-weight: 700; }
.hub-feed-time { font-size: 10px; color: rgba(255,255,255,.3); flex-shrink: 0; }
.hub-feed-badge { font-size: 9px; padding: 2px 7px; border-radius: 4px; font-weight: 700; flex-shrink: 0; }
.hub-feed-empty { font-size: 12px; color: rgba(255,255,255,.3); text-align: center; padding: 20px 0; }

/* Quick actions */
.hub-quick-actions { display: flex; flex-direction: column; gap: 6px; }
.hub-quick-btn {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: 10px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07);
  color: rgba(255,255,255,.7); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all .15s; font-family: inherit;
  text-align: left; width: 100%;
}
.hub-quick-btn:hover {
  background: rgba(255,255,255,.08);
  color: #fff; border-color: rgba(255,255,255,.12);
  transform: translateX(3px);
}
.hub-quick-icon { font-size: 16px; width: 22px; flex-shrink: 0; }


/* Cuando estamos en módulo, el body y main cambian */
body.in-module { background: #f4f7fb; }
body.in-module #main { background: #f4f7fb; display:flex; flex-direction:column; height:100vh; overflow:hidden; }
body.in-module #tabArea {
  background: #f4f7fb;
  display: block !important;
}
body.in-module .tab-c.active { display: block; }
body.in-module #mod-navbar { display: flex !important; }

/* Override colores módulos para dark */
body.in-module .card { background: #ffffff !important; border-color: rgba(7,55,99,0.10) !important; }
body.in-module .card-title { color: #073763 !important; border-bottom-color: rgba(7,55,99,0.10) !important; }
body.in-module table thead tr { background: #f4f7fb !important; }
body.in-module table thead th { color: rgba(7,55,99,.75) !important; border-bottom-color: rgba(7,55,99,0.10) !important; }
body.in-module table tbody tr:hover { background: rgba(7,55,99,0.03) !important; }
body.in-module table tbody tr { border-bottom-color: rgba(7,55,99,0.07) !important; }
body.in-module table tbody td { color: #1a2740 !important; }
body.in-module table tbody td strong { color: #073763 !important; }
body.in-module .page-header h1 { color: #073763 !important; }
body.in-module .page-header p { color: rgba(7,55,99,.75) !important; }
body.in-module .btn { background: #ffffff !important; border-color: rgba(7,55,99,0.15) !important; color: #073763 !important; }
body.in-module .btn.primary { background: linear-gradient(135deg,#073763,#0e81c5) !important; color: #fff !important; border: none !important; }
body.in-module .search-input { background: #ffffff !important; border-color: rgba(7,55,99,0.15) !important; color: #1a2740 !important; }
body.in-module .sel-sm { background: #ffffff !important; border-color: rgba(7,55,99,0.15) !important; color: #1a2740 !important; }
body.in-module .pill { background: #f4f7fb !important; border-color: rgba(7,55,99,0.15) !important; color: #4a5e78 !important; }
body.in-module .pill.active { background: linear-gradient(135deg,#073763,#0e81c5) !important; border-color: transparent !important; color: #fff !important; }
body.in-module .kpi-card { background: #ffffff !important; border-color: rgba(7,55,99,0.10) !important; }
body.in-module .kpi-value { color: #073763 !important; }
body.in-module .kpi-label { color: rgba(7,55,99,.75) !important; }
body.in-module .kpi-sub { color: rgba(7,55,99,.75) !important; }
body.in-module .field label { color: rgba(7,55,99,.75) !important; }
body.in-module .field input, body.in-module .field select, body.in-module .field textarea { background: #ffffff !important; border-color: rgba(7,55,99,0.15) !important; color: #1a2740 !important; }
body.in-module .count-label { background: #f4f7fb !important; border-color: rgba(7,55,99,0.12) !important; color: rgba(7,55,99,.75) !important; }
body.in-module .table-wrap { border-color: rgba(7,55,99,0.10) !important; }
body.in-module #tabArea { padding: 20px 24px; }

/* Hub search overlay */
.hub-search-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.6);
  z-index: 200; backdrop-filter: blur(4px);
  align-items: flex-start; justify-content: center;
  padding-top: 80px;
}
.hub-search-results {
  background: #161b27; border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px; width: 600px; max-height: 420px;
  overflow-y: auto; box-shadow: 0 24px 60px rgba(0,0,0,.5);
  padding: 8px;
}
.hub-sr-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: 9px; cursor: pointer;
  transition: background .12s;
}
.hub-sr-item:hover { background: rgba(255,255,255,.06); }
.hub-sr-icon { font-size: 16px; width: 22px; text-align: center; }
.hub-sr-text { font-size: 13px; color: rgba(255,255,255,.8); }
.hub-sr-sub { font-size: 11px; color: rgba(255,255,255,.35); margin-top: 2px; }
.hub-sr-tag { font-size: 9px; padding: 2px 8px; border-radius: 4px; font-weight: 700; margin-left: auto; background: rgba(255,255,255,.08); color: rgba(255,255,255,.5); }

@media (max-width: 900px) {
  .hub-tiles-grid { grid-template-columns: repeat(2, 1fr); }
  .hub-bottom-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .hub-tiles-grid { grid-template-columns: 1fr 1fr; }
  .hub-body { padding: 20px 16px; }
}

/* ── Modal carga mantenimiento: anular dark theme de in-module ── */
#modal-carga-mes .field label,
#modal-carga-mes label {
  color: rgba(255,255,255,.65) !important;
}
#modal-carga-mes .field input,
#modal-carga-mes .field select,
#modal-carga-mes select,
#modal-carga-mes input[type="number"],
#modal-carga-mes input[type="text"] {
  background: rgba(255,255,255,.08) !important;
  border-color: rgba(255,255,255,.15) !important;
  color: rgba(255,255,255,.9) !important;
}
#modal-carga-mes .modal-title,
#modal-carga-mes .card-title {
  color: #fff !important;
}
/* Vista previa tabla */
#carga-preview-wrap table thead th {
  background: rgba(255,255,255,.08) !important;
  color: rgba(255,255,255,.7) !important;
  border-color: rgba(255,255,255,.1) !important;
}
#carga-preview-wrap table tbody td {
  color: rgba(255,255,255,.7) !important;
  border-color: rgba(255,255,255,.06) !important;
}
#carga-preview-wrap table tbody tr:hover {
  background: rgba(255,255,255,.04) !important;
}
#carga-preview-wrap {
  background: rgba(255,255,255,.03) !important;
  border-color: rgba(255,255,255,.08) !important;
}
/* Drop zone */
#carga-drop-zone {
  border-color: rgba(124,58,237,.5) !important;
}
#carga-drop-zone p, #carga-drop-zone span, #carga-drop-zone div {
  color: rgba(255,255,255,.7) !important;
}
