:root {
  color-scheme: dark;
  --bg-dark: #101216;
  --bg-card: #1C1F26;
  --bg-glass: rgba(28, 31, 38, 0.78);
  --accent: #C8C71B;
  --accent-hover: #B7976A;
  --text-primary: #EDEEF0;
  --text-secondary: #8B8F99;
  --text-muted: #6B7078;
  --border: #262A33;
  --border-soft: #1E222A;
  --success: #7A9B85;
  --warning: #B97D63;
  --radius: 12px;
  --accent-2: #93920F;
  --glass: rgba(28, 31, 38, 0.62);
  --glass-brd: rgba(255, 255, 255, 0.07);
  --card-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
  --glow: rgba(200,199,27, 0.30);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
}

button { font-family: inherit; }

/* ===== Transiciones suaves globales ===== */
.fade-in { animation: fadeIn 0.28s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ===== Loading ===== */
.loading-screen {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: 100vh; gap: 28px;
}
.brand-logo-full { width: min(280px, 70vw); height: auto; }
.spinner {
  width: 28px; height: 28px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Auth ===== */
.auth-wrap {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 16px;
  background: radial-gradient(ellipse 70% 50% at 50% 0%, #181C24 0%, var(--bg-dark) 65%);
}
.auth-box {
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: 20px;
  padding: 40px 36px;
  width: 100%; max-width: 400px;
}
.auth-logo { text-align: center; margin-bottom: 30px; }
.auth-logo h2 { font-size: 21px; font-weight: 500; letter-spacing: -0.2px; }
.auth-logo p { color: var(--text-secondary); font-size: 13px; margin-top: 4px; }

/* ===== Forms ===== */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block; font-size: 11px; color: var(--text-muted);
  margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.8px;
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  background: var(--bg-dark);
  border: 0.5px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  padding: 11px 14px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.25s ease;
  font-family: inherit;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--accent);
}
.form-group textarea { resize: vertical; min-height: 76px; }

/* ===== Botones ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px;
  border-radius: 10px;
  border: none;
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}
.btn-primary { background: linear-gradient(160deg, var(--accent), var(--accent-2)); color: #14161A; box-shadow: 0 4px 14px var(--glow); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: transparent; color: var(--text-secondary); border: 0.5px solid var(--border); }
.btn-secondary:hover { color: var(--text-primary); border-color: var(--text-muted); }
.btn-success { background: var(--success); color: #14161A; }
.btn-full { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 8px; }

/* ===== Estructura principal La Ruta ===== */
.route-app { min-height: 100vh; display: flex; flex-direction: column; padding-bottom: 90px; background: radial-gradient(130% 45% at 50% -2%, rgba(200,199,27,0.05), transparent 42%), var(--bg-dark); }

/* Header superior */
.route-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 0.5px solid var(--border-soft);
}
.route-header-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-logo-van { width: 66px; height: auto; flex-shrink: 0; }
.route-header-title { font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.route-header-sub { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.route-header-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--bg-card); border: 0.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); cursor: pointer; font-size: 15px;
  transition: all 0.2s ease;
}
.icon-btn:hover { color: var(--text-primary); border-color: var(--text-muted); }
.avatar-btn {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); color: #14161A;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; cursor: pointer; border: none;
}

/* Selector de gira */
.tour-selector-row { padding: 14px 22px 0; display: flex; gap: 10px; align-items: center; }
.tour-selector-row select {
  background: var(--bg-card); border: 0.5px solid var(--border);
  border-radius: 10px; color: var(--text-primary);
  padding: 9px 13px; font-size: 13px; flex: 1; max-width: 320px;
  font-family: inherit; outline: none;
}

/* ===== La Ruta: timeline horizontal ===== */
.route-strip-label {
  padding: 18px 22px 10px;
  color: var(--text-muted); font-size: 11px;
  text-transform: uppercase; letter-spacing: 1.4px;
  display: flex; justify-content: space-between; align-items: center;
}
.route-strip {
  display: flex; gap: 10px;
  overflow-x: auto; overflow-y: hidden;
  /* Espacio interno para que las sombras/halos no se recorten al hacer scroll */
  padding: 20px 22px 26px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.route-strip::-webkit-scrollbar { height: 4px; }
.route-strip::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.route-card {
  min-width: 158px; max-width: 185px; flex-shrink: 0;
  background: var(--glass);
  -webkit-backdrop-filter: blur(9px); backdrop-filter: blur(9px);
  border: 0.5px solid var(--glass-brd);
  border-radius: 14px;
  padding: 12px 14px;
  cursor: pointer;
  scroll-snap-align: start;
  transition: all 0.22s ease;
  position: relative;
  box-shadow: var(--card-shadow);
}
.route-card:hover { border-color: var(--text-muted); transform: translateY(-2px); }
.route-card.past { opacity: 0.5; }
.route-card.selected { border: 1px solid var(--accent); box-shadow: 0 0 0 1px rgba(200,199,27,0.30), 0 6px 16px rgba(0,0,0,0.32), 0 2px 10px rgba(200,199,27,0.16); }
.route-card .rc-date { color: var(--text-muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; }
.route-card.selected .rc-date { color: var(--accent); }
.route-card .rc-city { color: var(--text-primary); font-size: 13px; font-weight: 500; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.route-card .rc-venue { color: var(--text-secondary); font-size: 11px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.route-card .rc-meta { margin-top: 8px; font-size: 10px; color: var(--text-secondary); }
.route-card .rc-badge {
  position: absolute; top: -7px; left: 12px;
  background: var(--accent); color: #14161A;
  font-size: 9px; font-weight: 600; padding: 2px 8px;
  border-radius: 20px; text-transform: uppercase; letter-spacing: 0.5px;
}
.route-card-add {
  min-width: 52px; flex-shrink: 0;
  border: 1px dashed var(--border);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 22px; cursor: pointer;
  transition: all 0.2s ease;
}
.route-card-add:hover { color: var(--accent); border-color: var(--accent); }

/* ===== Contenido del día ===== */
.day-content { padding: 6px 22px 20px; flex: 1; }
.day-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 14px; align-items: start; }
@media (max-width: 720px) { .day-grid { grid-template-columns: 1fr; } }

.glass-card {
  background: var(--glass);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
  border: 0.5px solid var(--glass-brd);
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 14px;
  box-shadow: var(--card-shadow);
}
.glass-card.no-pad { padding: 0; overflow: hidden; }
.glass-card.no-pad .gc-head { padding: 14px 18px 10px; }
.gc-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.gc-title { font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 7px; }
.gc-title .gi { color: var(--accent); font-size: 15px; display: inline-flex; align-items: center; }
.gc-title .gi svg { width: 16px; height: 16px; }

/* Stats row */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 14px; }
.stat-chip {
  background: var(--glass); border: 0.5px solid var(--glass-brd);
  -webkit-backdrop-filter: blur(9px); backdrop-filter: blur(9px);
  border-radius: 16px; padding: 14px 16px;
  display: flex; justify-content: space-between; align-items: center;
  box-shadow: var(--card-shadow);
}
.stat-chip .sc-label { color: var(--text-muted); font-size: 11px; }
.stat-chip .sc-value { color: var(--text-primary); font-size: 20px; font-weight: 500; margin-top: 2px; }
.stat-chip .sc-value small { font-size: 11px; color: var(--text-secondary); font-weight: 400; }
.stat-chip .sc-icon { font-size: 22px; color: var(--accent); }

/* Schedule line items */
.sched-item {
  display: flex; gap: 12px; padding: 8px 0;
  border-bottom: 0.5px solid var(--border-soft);
  font-size: 13px; align-items: baseline;
}
.sched-item:last-child { border-bottom: none; }
.sched-item .si-time { color: var(--accent); font-weight: 500; min-width: 46px; font-size: 12px; }
.sched-item .si-title { color: var(--text-primary); }
.sched-item .si-type { margin-left: auto; color: var(--text-muted); font-size: 11px; }
.sched-item.done .si-title { color: var(--text-secondary); text-decoration: line-through; }
.sched-item.done .si-time { color: var(--success); }

/* ===== Nav flotante (píldora) ===== */
.float-nav {
  position: fixed; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%);
  display: flex; gap: 4px;
  background: linear-gradient(145deg, rgba(48, 52, 62, 0.55), rgba(18, 20, 26, 0.6));
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  backdrop-filter: blur(28px) saturate(190%);
  border: 0.5px solid rgba(255,255,255,0.14);
  border-radius: 40px;
  padding: 7px 9px;
  z-index: 500;
  box-shadow: 0 14px 44px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.18), inset 0 -1px 1px rgba(0,0,0,0.3), 0 0 26px rgba(200,199,27,0.05);
  max-width: calc(100vw - 24px);
  overflow-x: auto;
  scrollbar-width: none;
}
.float-nav::-webkit-scrollbar { display: none; }
.fn-item {
  display: flex; align-items: center; gap: 7px;
  background: transparent; border: none;
  color: var(--text-secondary);
  border-radius: 30px;
  padding: 9px 15px;
  font-size: 12px; font-weight: 500;
  cursor: pointer;
  transition: all 0.22s ease;
  white-space: nowrap;
}
.fn-item:hover { color: var(--text-primary); }
.fn-item.active { background: linear-gradient(160deg, var(--accent), var(--accent-2)); color: #141400; box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), inset 0 0 0 0.5px rgba(200,199,27,0.5), 0 6px 18px var(--glow); }
.fn-item .fn-icon { display: inline-flex; align-items: center; line-height: 0; }
.fn-item .fn-icon svg { width: 20px; height: 20px; }
@media (max-width: 680px) {
  .float-nav { border-radius: 26px; }
  .fn-item { flex-direction: column; gap: 3px; padding: 8px 11px; border-radius: 16px; }
  .fn-item span.fn-label { display: inline; font-size: 10px; letter-spacing: 0.2px; }
  .fn-item .fn-icon svg { width: 21px; height: 21px; }
}

/* ===== Listas y tablas ===== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  text-align: left; padding: 9px 12px;
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--text-muted); border-bottom: 0.5px solid var(--border);
  font-weight: 500;
}
td { padding: 11px 12px; border-bottom: 0.5px solid var(--border-soft); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.015); }

/* Badges */
.badge {
  display: inline-block; padding: 3px 9px;
  border-radius: 20px; font-size: 10px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.4px;
}
.badge-success { background: rgba(122,155,133,0.16); color: #9DBBA6; }
.badge-warning { background: rgba(185,125,99,0.16); color: #D4A088; }
.badge-danger  { background: rgba(200,199,27,0.16); color: var(--accent); }
.badge-gray    { background: rgba(139,143,153,0.12); color: var(--text-secondary); }

/* ===== Modal ===== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(10, 11, 14, 0.75);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 16px;
  animation: fadeIn 0.2s ease;
}
.modal {
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: 18px;
  padding: 26px;
  width: 100%; max-width: 480px;
  max-height: 88vh; overflow-y: auto;
  animation: modalIn 0.25s ease-out;
}
@keyframes modalIn { from { opacity: 0; transform: scale(0.97) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.modal-header h3 { font-size: 16px; font-weight: 500; }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 18px; cursor: pointer; }
.modal-close:hover { color: var(--text-primary); }
.modal-footer { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }

/* ===== Toast ===== */
.toast-container { position: fixed; bottom: 90px; right: 20px; z-index: 2000; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 13px; min-width: 240px;
  animation: slideIn 0.22s ease;
}
.toast.success { border-left: 2px solid var(--success); }
.toast.error   { border-left: 2px solid var(--warning); }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ===== Empty state ===== */
.empty-state { text-align: center; padding: 44px 24px; color: var(--text-secondary); }
.empty-state .empty-icon { font-size: 36px; margin-bottom: 10px; opacity: 0.8; }
.empty-state p { font-size: 13px; line-height: 1.6; }

/* Alert */
.alert { padding: 12px 16px; border-radius: 10px; font-size: 13px; margin-bottom: 16px; }
.alert-error { background: rgba(185,125,99,0.1); border: 0.5px solid rgba(185,125,99,0.3); color: var(--text-primary); }

/* Tabs internas */
.tabs { display: flex; gap: 2px; border-bottom: 0.5px solid var(--border); margin-bottom: 16px; }
.tab-btn {
  padding: 8px 14px; background: none; border: none;
  color: var(--text-secondary); font-size: 13px; cursor: pointer;
  border-bottom: 1.5px solid transparent; margin-bottom: -1px;
  transition: all 0.2s ease; font-family: inherit;
}
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

/* Section view header */
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px 10px;
  padding: 4px 0 14px;
}
.section-head h2 { font-size: 17px; font-weight: 500; }
.section-head .sh-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* Google Places dropdown - tema oscuro */
.pac-container {
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  font-family: system-ui, sans-serif;
  margin-top: 4px;
}
.pac-item {
  background: transparent;
  border-top: 0.5px solid var(--border-soft);
  color: var(--text-secondary);
  padding: 8px 12px; font-size: 13px; cursor: pointer;
}
.pac-item:first-child { border-top: none; }
.pac-item:hover, .pac-item-selected { background: rgba(200,199,27,0.08); }
.pac-item-query { color: var(--text-primary); font-size: 13px; }
.pac-matched { color: var(--accent); }
.pac-icon { filter: invert(0.7); }

/* Inputs de fecha/hora: ícono visible en tema oscuro */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  filter: invert(0.75) sepia(0.2) saturate(2) hue-rotate(10deg);
  cursor: pointer;
  opacity: 0.9;
  width: 18px; height: 18px;
}
input[type="date"], input[type="time"], input[type="datetime-local"] { cursor: pointer; }
/* Todo el campo abre el selector (lo maneja showPicker en app.js), así que
   el cursor de mano tiene que aparecer en toda su superficie, no solo sobre
   el íconito. */
.form-group input[type="date"],
.form-group input[type="time"],
.form-group input[type="datetime-local"] { cursor: pointer; }

/* ===== Calendario mensual ===== */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-head-row { margin-bottom: 6px; }
.cal-dow {
  text-align: center; font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.8px; color: var(--text-muted); padding: 6px 0;
}
.cal-cell {
  min-height: 72px;
  background: var(--bg-dark);
  border: 0.5px solid var(--border-soft);
  border-radius: 8px;
  padding: 6px;
  transition: border-color 0.2s ease;
  overflow: hidden;
}
.cal-cell:not(.cal-empty) { cursor: pointer; }
.cal-cell:not(.cal-empty):hover { border-color: var(--text-muted); }
.cal-empty { background: transparent; border-color: transparent; }
.cal-today { border-color: var(--accent); }
.cal-today .cal-num { color: var(--accent); font-weight: 600; }
.cal-num { font-size: 12px; color: var(--text-secondary); margin-bottom: 4px; }
.cal-has-event .cal-num { color: var(--text-primary); }
.cal-chip {
  font-size: 10px; padding: 3px 6px; border-radius: 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 3px;
}
.cal-chip-event { background: rgba(200,199,27,0.18); color: var(--accent); border-left: 2px solid var(--accent); }
.cal-chip-other { background: rgba(139,143,153,0.1); color: var(--text-secondary); }
@media (max-width: 680px) {
  .cal-cell { min-height: 54px; padding: 4px; }
  .cal-chip { font-size: 8px; padding: 2px 4px; }
}

/* ===== Dropdown selector de giras ===== */
.tour-menu-btn {
  background: none; border: none; color: var(--text-primary);
  font-size: 15px; font-weight: 500; cursor: pointer;
  padding: 0; display: flex; align-items: center; gap: 6px;
  font-family: inherit;
}
.tour-menu-btn:hover { color: var(--accent); }
.tour-menu {
  position: absolute; top: calc(100% + 10px); left: 0;
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  min-width: 230px;
  padding: 6px;
  z-index: 600;
  box-shadow: 0 12px 32px rgba(0,0,0,0.5);
  animation: fadeIn 0.18s ease;
}
.tour-menu-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-muted); padding: 8px 10px 6px;
}
.tour-menu-item {
  display: flex; align-items: center; width: 100%;
  background: none; border: none;
  color: var(--text-primary); font-size: 13px;
  padding: 9px 10px; border-radius: 8px;
  cursor: pointer; text-align: left;
  font-family: inherit;
  transition: background 0.15s ease;
}
.tour-menu-item:hover { background: rgba(255,255,255,0.04); }
.tour-menu-item.active { color: var(--accent); }
.tour-menu-divider { height: 0.5px; background: var(--border); margin: 6px 4px; }

/* Navegación de día ‹ Hoy › */
.day-nav { display: flex; gap: 6px; align-items: center; }
.day-nav .icon-btn { width: 30px; height: 30px; font-size: 13px; }

/* ===== Tema claro ===== */

/* Mapa: filtro oscuro solo en tema oscuro */
.map-frame { filter: invert(0.88) hue-rotate(180deg) saturate(0.7); }

@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.6; transform: scale(0.94); } }

/* Tipografía unificada con la landing (v40.3) */
h1, h2, h3, .section-head h2, .gc-title, .btn, .brand-logo-full, .auth-logo h2 { font-family: 'Outfit', system-ui, sans-serif; }

/* ===== v44: pulido flotante, tipografía fluida y móvil ===== */

/* Tipografía fluida en títulos clave */
.section-head h2 { font-size: clamp(16px, 1.2rem + 0.6vw, 19px); }
.route-header-title { font-size: clamp(14px, 0.9rem + 0.4vw, 15px); }
.gc-title { font-size: clamp(12px, 0.8rem + 0.3vw, 13px); }

/* Breakpoint intermedio (tablet / laptop chico) */
@media (max-width: 900px) {
  .day-content { padding-left: clamp(14px, 4vw, 22px); padding-right: clamp(14px, 4vw, 22px); }
  .route-strip, .route-strip-label, .tour-selector-row, .route-header { padding-left: clamp(14px, 4vw, 22px); padding-right: clamp(14px, 4vw, 22px); }
}

/* Modales como hoja inferior en teléfono */
@media (max-width: 680px) {
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal {
    max-width: 100%;
    border-radius: 22px 22px 0 0;
    padding: 22px 18px calc(22px + env(safe-area-inset-bottom, 0px));
    max-height: 92vh;
    animation: sheetIn 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .toast-container { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); right: 14px; left: 14px; }
  .toast { min-width: 0; }
}
@keyframes sheetIn { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Aura y vidrio en tema claro (más suaves, para que no se rompa) */

/* Invitado: sin barra de navegación, sin espacio reservado abajo */
.route-app.no-nav { padding-bottom: 24px; }

/* ===== v63: íconos de línea + orden en teléfono y tablet ===== */

/* Íconos SVG: heredan el color del texto y se alinean con él */
svg { flex-shrink: 0; }
.gi svg, .icon-btn svg, .btn svg { vertical-align: -2px; }
.gi { display: inline-flex; align-items: center; color: var(--accent); margin-right: 7px; }
.btn svg { margin-right: 5px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; }
.empty-icon { display: flex; justify-content: center; color: var(--text-muted); opacity: .55; margin-bottom: 10px; }
.empty-icon svg { width: 34px; height: 34px; }

/* --- TABLET (681–1024px): dos columnas para aprovechar el ancho --- */
@media (min-width: 681px) and (max-width: 1024px) {
  .day-content { max-width: 100%; padding-left: 24px; padding-right: 24px; }
  .stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
  .route-card { min-width: 168px; }
}

/* --- TELÉFONO (≤680px): orden, aire y toques cómodos --- */
@media (max-width: 680px) {
  .day-content { padding-left: 16px; padding-right: 16px; }
  .route-strip { padding: 16px 16px 22px; gap: 9px; }
  .route-strip-label, .route-header, .tour-selector-row { padding-left: 16px; padding-right: 16px; }
  .route-card { min-width: 148px; max-width: 168px; }

  /* Los indicadores de resumen en dos columnas, no apretados en fila */
  .stats-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .stats-row .stat-chip:only-child { grid-column: 1 / -1; }
  .stat-chip { padding: 12px 14px; }
  .stat-chip .sc-value { font-size: 17px; }

  /* Encabezado de sección: título arriba, acción abajo (no se aprietan) */
  .section-head { flex-wrap: wrap; gap: 10px; }
  .section-head h2 { font-size: 17px; }

  /* Botones cómodos para el dedo */
  .btn { min-height: 38px; }
  .btn-sm { min-height: 32px; }

  /* Tablas que aún queden: que no rompan el ancho de la pantalla */
  .table-wrap { margin: 0 -2px; }
  .table-wrap table { font-size: 12px; }

  /* Tarjetas con menos margen lateral perdido */
  .glass-card { padding: 14px 15px; border-radius: 15px; }
}

/* --- Teléfonos angostos (≤380px) --- */
@media (max-width: 380px) {
  .fn-item { padding: 7px 9px; }
  .fn-item span.fn-label { font-size: 9px; }
  .route-card { min-width: 138px; }
  .stats-row { grid-template-columns: 1fr; }
}

/* ===== v64: vidrio líquido en todas las superficies ===== */

/* Tarjetas de contenido */
.glass-card {
  background: linear-gradient(145deg, rgba(46,50,60,0.42), rgba(22,25,31,0.52));
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  backdrop-filter: blur(22px) saturate(170%);
  border: 0.5px solid rgba(255,255,255,0.10);
  box-shadow: 0 6px 20px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.10);
}

/* Indicadores de resumen */
.stat-chip {
  background: linear-gradient(145deg, rgba(46,50,60,0.40), rgba(22,25,31,0.50));
  -webkit-backdrop-filter: blur(20px) saturate(170%);
  backdrop-filter: blur(20px) saturate(170%);
  border: 0.5px solid rgba(255,255,255,0.10);
  box-shadow: 0 5px 16px rgba(0,0,0,0.26), inset 0 1px 0 rgba(255,255,255,0.10);
}

/* Tarjetas de fecha en La Ruta */
.route-card {
  background: linear-gradient(145deg, rgba(44,48,58,0.38), rgba(20,23,29,0.50));
  -webkit-backdrop-filter: blur(18px) saturate(165%);
  backdrop-filter: blur(18px) saturate(165%);
  border: 0.5px solid rgba(255,255,255,0.09);
  box-shadow: 0 5px 16px rgba(0,0,0,0.26), inset 0 1px 0 rgba(255,255,255,0.09);
}
.route-card.selected {
  background: linear-gradient(145deg, rgba(200,199,27,0.16), rgba(30,26,18,0.55));
}

/* Modales / hojas */
.modal {
  background: linear-gradient(150deg, rgba(44,48,58,0.72), rgba(20,22,28,0.86));
  -webkit-backdrop-filter: blur(34px) saturate(180%);
  backdrop-filter: blur(34px) saturate(180%);
  border: 0.5px solid rgba(255,255,255,0.13);
  box-shadow: 0 24px 60px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.16);
}
.modal-overlay {
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

/* Encabezado de la app y selector de gira */
.route-header, .tour-selector-row {
  background: linear-gradient(180deg, rgba(30,33,40,0.55), rgba(18,20,26,0.30));
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
}

/* Botones secundarios y campos con textura sutil */
.btn-secondary {
  background: linear-gradient(145deg, rgba(58,62,72,0.55), rgba(30,33,40,0.60));
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  backdrop-filter: blur(12px) saturate(150%);
  border: 0.5px solid rgba(255,255,255,0.10);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.10);
}
.icon-btn {
  background: linear-gradient(145deg, rgba(58,62,72,0.45), rgba(28,31,38,0.55));
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  border: 0.5px solid rgba(255,255,255,0.10);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
}
.toast {
  background: linear-gradient(145deg, rgba(48,52,62,0.80), rgba(20,22,28,0.88));
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
  border: 0.5px solid rgba(255,255,255,0.14);
  box-shadow: 0 12px 34px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.16);
}

/* --- Tema claro: mismo vidrio, tonos luminosos --- */

/* Si el navegador no soporta desenfoque, usar fondos sólidos legibles */
@supports not (backdrop-filter: blur(1px)) {
  @supports not (-webkit-backdrop-filter: blur(1px)) {
    .glass-card, .stat-chip, .route-card { background: var(--bg-card); }
    .float-nav, .modal, .toast { background: rgba(24,27,33,0.97); }

  }
}

/* ===== v65: orden del encabezado y acciones del día ===== */

/* Fila de acciones del día: navegación arriba, herramientas abajo, sin amontonarse */
.day-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.day-tools { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.day-nav { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.danger-btn { color: var(--warning); }
.danger-btn:hover { border-color: var(--warning); }

/* --- TELÉFONO --- */
@media (max-width: 680px) {
  /* Encabezado en dos filas: marca arriba, acciones abajo (ya no se pisan) */
  .route-header { flex-wrap: wrap; gap: 10px; padding-top: 12px; padding-bottom: 12px; }
  .route-header-brand { flex: 1 1 100%; min-width: 0; gap: 10px; }
  .brand-logo-van { width: 46px; }
  .route-header-title { font-size: 14px; }
  .route-header-actions { flex: 1 1 100%; justify-content: flex-end; gap: 7px; }
  .icon-btn { width: 32px; height: 32px; }
  .avatar-btn { width: 32px; height: 32px; font-size: 11px; }

  /* Acciones del día: cada grupo en su fila completa, botones parejos */
  .section-head { flex-direction: column; align-items: stretch; }
  .day-actions { justify-content: flex-start; gap: 8px; }
  .day-nav { flex: 1 1 100%; justify-content: space-between; }
  .day-nav .btn { flex: 1; }
  .day-tools { flex: 1 1 100%; justify-content: flex-start; gap: 6px; }
  .day-tools .btn { flex: 1 1 auto; justify-content: center; min-width: 0; }
  .day-tools .btn svg { margin-right: 4px; }
}

/* --- Teléfonos angostos --- */
@media (max-width: 380px) {
  .brand-logo-van { width: 40px; }
  .route-header-actions { gap: 5px; }
  .icon-btn { width: 30px; height: 30px; }
  .avatar-btn { width: 30px; height: 30px; }
  .day-tools .btn { font-size: 11px; padding: 6px 9px; }
}

/* Botones con ícono: alineación pareja del SVG con el texto */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.btn svg { margin-right: 0; }

/* ===== v66: menú "Más" en pantalla chica + indicador de hoy ===== */

/* Indicador de que estás viendo el día de hoy (no es un botón) */
.today-badge {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 6px 14px; border-radius: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: .3px;
  color: #141400; background: linear-gradient(160deg, var(--accent), var(--accent-2));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 4px 12px var(--glow);
}

/* En pantalla grande: todo visible, sin botón "Más" */
.fn-overflow { display: contents; }
.fn-more-btn { display: none; }

/* Hoja del menú "Más" */
.more-menu { display: none; }
.more-menu.open {
  display: block;
  position: fixed; z-index: 600;
  bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  left: 50%; transform: translateX(-50%);
  width: min(340px, calc(100vw - 28px));
}
.more-menu-inner {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px;
  padding: 10px;
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(48,52,62,.62), rgba(18,20,26,.72));
  -webkit-backdrop-filter: blur(30px) saturate(190%);
  backdrop-filter: blur(30px) saturate(190%);
  border: .5px solid rgba(255,255,255,.14);
  box-shadow: 0 18px 48px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.18);
  animation: sheetIn .2s cubic-bezier(.22,1,.36,1);
}
.more-menu-inner .fn-item {
  flex-direction: row; justify-content: flex-start; gap: 9px;
  padding: 12px 13px; border-radius: 14px; width: 100%;
  background: rgba(255,255,255,.04);
}
.more-menu-inner .fn-item .fn-label { display: inline; font-size: 12px; }

/* En pantalla chica: los extras pasan al menú "Más" */
@media (max-width: 680px) {
  .fn-overflow { display: none; }
  .fn-more-btn { display: flex; }
  .float-nav { overflow-x: visible; }
}

/* ===== v67: menú "Más" solo si hay más de 5 secciones + fecha en la navegación ===== */

/* Indicador de la fecha en que estás situado */
.day-date-btn {
  min-width: 78px; text-transform: capitalize; font-weight: 600;
  letter-spacing: .2px; color: var(--text-primary);
}

/* Por defecto (y en pantalla grande) todo visible, sin "Más" */
.fn-overflow { display: contents; }
.fn-more-btn { display: none; }

/* En pantalla chica, SOLO los menús marcados con .has-more usan el botón "Más" */
@media (max-width: 680px) {
  .float-nav.has-more .fn-overflow { display: none; }
  .float-nav.has-more .fn-more-btn { display: flex; }
  .float-nav:not(.has-more) .fn-overflow { display: contents; }
  .float-nav:not(.has-more) .fn-more-btn { display: none; }
}

/* ===== v69: evitar el zoom automático de Safari en iPhone ===== */
/* Safari hace zoom al enfocar un campo con letra menor a 16px y descuadra la pantalla.
   Con 16px el zoom no ocurre y el formulario se mantiene en su lugar. */
@media (max-width: 900px) {
  .form-group input,
  .form-group select,
  .form-group textarea,
  input[type="text"], input[type="email"], input[type="password"],
  input[type="number"], input[type="date"], input[type="time"],
  input[type="tel"], input[type="url"], input[type="search"],
  select, textarea {
    font-size: 16px;
  }
}
/* Los modales no se desplazan al abrir el teclado */
.modal { -webkit-overflow-scrolling: touch; }

/* ===== v70: que nada se amontone en pantalla chica ===== */

/* --- Cabeceras de tarjeta: el título nunca se comprime contra los botones --- */
.gc-head { flex-wrap: wrap; gap: 8px 10px; align-items: flex-start; }
.gc-title { min-width: 0; flex: 1 1 auto; }
.gc-title .gi { flex-shrink: 0; }
.gc-head > div:last-child { display: flex; gap: 6px; flex-wrap: wrap; flex-shrink: 0; }

/* --- Repertorio: PDF en pantalla + cabecera ordenada --- */
.sl-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.sl-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.sl-doc {
  margin: 0 0 14px; border-radius: 12px; overflow: hidden;
  border: 0.5px solid var(--border); background: var(--bg-dark);
}
.sl-doc-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 12px; font-size: 11px; color: var(--text-muted);
  border-bottom: 0.5px solid var(--border);
}
.sl-doc-bar span { display: inline-flex; align-items: center; gap: 6px; }
.sl-doc-bar a { color: var(--accent); text-decoration: none; font-size: 11px; white-space: nowrap; }
.sl-pdf { width: 100%; height: 520px; border: 0; display: block; background: #fff; }
.sl-img { width: 100%; height: auto; display: block; }
.sl-songs { font-size: 13px; color: var(--text-secondary); }
.sl-add { display: flex; gap: 8px; margin-top: 12px; }
.sl-add input {
  flex: 1; min-width: 0;
  background: var(--bg-dark); border: 0.5px solid var(--border); border-radius: 8px;
  color: var(--text-primary); padding: 9px 12px; font-size: 14px;
  font-family: inherit; outline: none;
}
.sl-add input:focus { border-color: var(--accent); }
.sl-add .btn { flex-shrink: 0; }

/* --- TELÉFONO: reordenar todo lo que se apretaba --- */
@media (max-width: 680px) {
  /* Cabeceras de tarjeta: título arriba, acciones abajo, a lo ancho */
  .gc-head { flex-direction: column; align-items: stretch; }
  .gc-head > div:last-child { justify-content: flex-start; }
  .gc-head .btn-sm { flex: 0 1 auto; }

  /* Encabezado de sección: el botón de acción ocupa su propia línea */
  .section-head { flex-direction: column; align-items: stretch; gap: 10px; }
  .section-head > .btn { align-self: flex-start; }

  /* Repertorio en teléfono */
  .sl-pdf { height: 400px; }
  .sl-actions .btn { flex: 1 1 auto; justify-content: center; }
  .sl-add { flex-direction: column; }
  .sl-add .btn { width: 100%; }

  /* Filas de detalle (etiqueta + valor) que se apretaban */
  .detail-row { flex-direction: column; align-items: flex-start; gap: 3px; }
  .detail-row .dr-label { min-width: 0; }

  /* Tablas: scroll propio, sin romper el ancho de la pantalla */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
  .table-wrap table { min-width: 420px; }

  /* Modales: sin desbordes laterales */
  .modal { width: 100%; box-sizing: border-box; }
  .modal .btn-full { width: 100%; }

  /* Grupos de botones dentro de tarjetas */
  .glass-card .btn-sm { max-width: 100%; }
}

/* --- Teléfonos angostos --- */
@media (max-width: 380px) {
  .sl-pdf { height: 330px; }
  .sl-actions .btn { font-size: 11px; padding: 6px 8px; }
  .gc-title { font-size: 12px; }
}

/* --- Regla general anti-desborde: nada se sale de la pantalla --- */
img, iframe, video, canvas { max-width: 100%; }
.glass-card, .stat-chip, .modal { box-sizing: border-box; }
.gc-title, .sh-sub, .section-head h2 { overflow-wrap: anywhere; }

/* ===== v72: encabezado centrado tipo menú principal ===== */

/* Fila superior: identidad (logo + gira) y tu cuenta, separadas del menú */
.route-header { align-items: center; padding-bottom: 12px; }
.route-header-top-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* Menú principal centrado, con etiquetas */
.header-menu {
  display: flex; justify-content: center; align-items: stretch; gap: 6px;
  padding: 0 16px 14px;
  border-bottom: 0.5px solid var(--border-soft);
  flex-wrap: wrap;
}
.hm-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  min-width: 74px; padding: 10px 12px;
  background: linear-gradient(145deg, rgba(58,62,72,0.34), rgba(28,31,38,0.44));
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  border: 0.5px solid rgba(255,255,255,0.09);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.10);
  border-radius: 14px;
  color: var(--text-secondary);
  font-family: inherit; cursor: pointer;
  transition: all 0.2s ease;
}
.hm-item:hover { color: var(--text-primary); border-color: rgba(255,255,255,0.16); }
.hm-icon { display: inline-flex; align-items: center; line-height: 0; }
.hm-label { font-size: 10.5px; font-weight: 500; letter-spacing: 0.2px; white-space: nowrap; }

/* Avisos activados: dorado. Desactivados: apagado. */
.hm-item.hm-on { color: var(--accent); border-color: rgba(200,199,27,0.38); box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 4px 14px rgba(200,199,27,0.14); }
.hm-item.hm-off { color: var(--text-muted); }

/* --- Menú de giras: centrado y siempre por encima --- */
.tour-menu {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  min-width: min(330px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  max-height: 70vh; overflow-y: auto;
  padding: 10px;
  border-radius: 18px;
  z-index: 2100;
  background: linear-gradient(150deg, rgba(46,50,60,0.80), rgba(20,22,28,0.90));
  -webkit-backdrop-filter: blur(32px) saturate(185%);
  backdrop-filter: blur(32px) saturate(185%);
  border: 0.5px solid rgba(255,255,255,0.14);
  box-shadow: 0 26px 64px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.16);
}
.tour-menu-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 1.4px;
  color: var(--accent); padding: 12px 12px 6px; font-weight: 600;
}
.tour-menu-item { padding: 11px 12px; font-size: 14px; border-radius: 10px; }

/* --- TELÉFONO --- */
@media (max-width: 680px) {
  .route-header { flex-wrap: nowrap; gap: 10px; }
  .route-header-brand { flex: 1 1 auto; }
  .route-header-top-right { flex: 0 0 auto; }
  .header-menu { gap: 5px; padding: 0 12px 12px; }
  .hm-item { min-width: 0; flex: 1 1 0; padding: 9px 6px; }
  .hm-label { font-size: 9.5px; }
}
@media (max-width: 380px) {
  .hm-item { padding: 8px 4px; gap: 4px; }
  .hm-label { font-size: 9px; }
}
.tour-menu-backdrop {
  position: fixed; inset: 0; z-index: 2050;
  background: rgba(0,0,0,0.45);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  animation: fadeIn 0.18s ease;
}

/* ===== v73: correcciones de formularios y menú "Más" ===== */

/* Campos de fecha y hora: en iPhone tienen ancho propio y se salen del formulario */
input[type="date"], input[type="time"], input[type="datetime-local"], input[type="month"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; max-width: 100%; box-sizing: border-box;
  min-width: 0; text-align: left;
}
.form-group { min-width: 0; }
.form-group input, .form-group select, .form-group textarea {
  box-sizing: border-box; max-width: 100%;
}
/* Filas de dos campos que no deben desbordar */
.form-row { display: flex; gap: 10px; flex-wrap: wrap; }
.form-row > * { flex: 1 1 140px; min-width: 0; }

/* Menú "Más": que no se monte sobre el contenido ni quede a medias */
.more-menu.open {
  bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  width: min(340px, calc(100vw - 24px));
}
.more-menu-inner .fn-item.active {
  background: linear-gradient(160deg, var(--accent), var(--accent-2));
  color: #141400;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 4px 14px var(--glow);
}
.more-menu-inner .fn-item.active .fn-label { color: #141400; }
/* Fondo oscuro tras el menú "Más" para que se lea claro */
.more-menu.open::before {
  content: ''; position: fixed; inset: 0; z-index: -1;
  background: rgba(0,0,0,0.35);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}

/* ===== v75: modo offline e instalación ===== */

/* Envío programado: cuenta regresiva en marcha */
.modo-nota-envio { color: var(--accent) !important; }
.modo-nota-envio strong { color: var(--accent); }

/* Recordatorio de publicar: cambios que llevan rato sin avisarse */
.modo-nota-olvido { color: var(--warning) !important; }
.modo-nota-olvido strong { color: var(--warning); }

/* Barra de "hay una versión nueva" */
.update-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 3100;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 10px 14px;
  font-size: 12.5px; font-weight: 500;
  color: var(--text-primary);
  background: rgba(24,26,31,.92);
  backdrop-filter: blur(14px);
  border-top: .5px solid var(--border);
  box-shadow: 0 -4px 18px rgba(0,0,0,.4);
}
.update-btn {
  background: var(--accent); color: #14161A; border: 0;
  padding: 6px 14px; border-radius: 999px;
  font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit;
}
.update-btn:hover { filter: brightness(1.08); }
.update-x {
  background: none; border: 0; color: var(--text-muted);
  font-size: 14px; cursor: pointer; padding: 4px 6px; line-height: 1;
}
.update-x:hover { color: var(--text-primary); }

/* Barra de cambios sin sincronizar (fase 2) */
.cola-bar {
  position: fixed; left: 0; right: 0; z-index: 3001;
  top: 0;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 7px 14px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .2px;
  color: #10210f; background: linear-gradient(160deg, #C8D96F, #a9bd4e);
  box-shadow: 0 3px 14px rgba(0,0,0,.35);
}
/* Si además no hay señal, la barra de "sin conexión" va arriba y esta debajo */
body:has(.offline-bar) .cola-bar { top: 30px; }
.cola-btn {
  background: rgba(0,0,0,.22); color: #10210f; border: 0;
  padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; cursor: pointer;
  font-family: inherit;
}
.cola-btn:hover { background: rgba(0,0,0,.34); }
body:has(.cola-bar) .route-app { padding-top: 30px; }
body:has(.cola-bar):has(.offline-bar) .route-app { padding-top: 60px; }

/* Elemento guardado en el teléfono que todavía no sube */
.pendiente-sync { opacity: .72; border-left: 2px solid #C8D96F; padding-left: 6px; }

/* Barra de "sin conexión" */
.offline-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 3000;
  padding: 7px 14px; text-align: center;
  font-size: 11.5px; font-weight: 500; letter-spacing: .2px;
  color: #2a1c10; background: linear-gradient(160deg, #B97D63, #a06949);
  box-shadow: 0 3px 14px rgba(0,0,0,.35);
}
body:has(.offline-bar) .route-app { padding-top: 30px; }

/* Tarjeta que invita a instalar */
.install-card {
  position: fixed; z-index: 700;
  left: 50%; transform: translateX(-50%);
  bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  width: min(430px, calc(100vw - 24px));
  display: flex; flex-direction: column; gap: 11px;
  padding: 14px 16px; border-radius: 18px;
  background: linear-gradient(145deg, rgba(48,52,62,.74), rgba(18,20,26,.84));
  -webkit-backdrop-filter: blur(30px) saturate(190%);
  backdrop-filter: blur(30px) saturate(190%);
  border: .5px solid rgba(255,255,255,.14);
  box-shadow: 0 16px 44px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.18);
  animation: sheetIn .32s cubic-bezier(.22,1,.36,1);
}
.install-card .ic-body { display: flex; align-items: flex-start; gap: 12px; }
.install-card .ic-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px;
  background: linear-gradient(160deg, var(--accent), var(--accent-2));
  color: #141400; box-shadow: 0 4px 14px var(--glow);
}
.install-card .ic-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.install-card .ic-text strong { font-size: 13.5px; color: var(--text-primary); }
.install-card .ic-text span { font-size: 11.5px; color: var(--text-secondary); line-height: 1.5; }
.install-card .ic-actions { display: flex; gap: 7px; justify-content: flex-end; }

/* Si el usuario no tiene menú (invitado), la tarjeta baja */
.route-app.no-nav ~ .install-card { bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }

/* ===== v76: espacio de la barra de estado + encabezado centrado ===== */

/* CRÍTICO: reservar el espacio de la barra de estado del teléfono.
   Sin esto, la hora y la batería se superponen con el logo (pantalla completa). */
.route-header { padding-top: calc(16px + env(safe-area-inset-top, 0px)); }
.auth-wrap { padding-top: calc(20px + env(safe-area-inset-top, 0px)); }
.offline-bar { padding-top: calc(7px + env(safe-area-inset-top, 0px)); }
body:has(.offline-bar) .route-header { padding-top: calc(16px + env(safe-area-inset-top, 0px) + 26px); }

/* Encabezado centrado, estilo Master Tour:
   marca al centro, cuenta a la derecha, equilibrado con un hueco a la izquierda */
.route-header { position: relative; justify-content: center; }
.route-header-brand {
  flex-direction: column; align-items: center; text-align: center;
  gap: 6px; max-width: min(100%, 420px);
}
.route-header-title-wrap { text-align: center; }
.route-header-title { justify-content: center; }
.route-header-sub { text-align: center; }
.brand-logo-van { width: 54px; }
.route-header-top-right {
  position: absolute; right: 16px; top: calc(50% + env(safe-area-inset-top, 0px) / 2);
  transform: translateY(-50%);
}

/* Menú principal ya venía centrado; solo afinamos el aire */
.header-menu { padding-top: 2px; }

@media (max-width: 680px) {
  .route-header { padding-left: 14px; padding-right: 14px; }
  .brand-logo-van { width: 46px; }
  .route-header-brand { gap: 4px; }
  .route-header-top-right { right: 12px; }
  /* Espacio para que la marca centrada no choque con el avatar */
  .route-header-brand { padding-right: 44px; padding-left: 44px; }
}
@media (max-width: 380px) {
  .brand-logo-van { width: 40px; }
  .route-header-brand { padding-right: 38px; padding-left: 38px; }
}

/* ===== v77: aire en el encabezado + menú de giras sobre la página ===== */

/* Más respiro entre logo, nombre de la gira y las fechas */
.route-header-brand { gap: 12px; }
.route-header-title {
  font-size: 17px; font-weight: 500; letter-spacing: .2px;
  padding: 2px 4px; line-height: 1.35;
}
.route-header-sub { margin-top: 5px; font-size: 11.5px; letter-spacing: .3px; }
.brand-logo-van { width: 58px; margin-bottom: 2px; }
.route-header { padding-bottom: 16px; }
.header-menu { padding-top: 4px; }

/* Menú de giras (ahora colgado de la página, siempre centrado y por encima) */
.tour-menu {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(340px, calc(100vw - 32px));
  max-height: 72vh; overflow-y: auto;
  padding: 10px; border-radius: 20px; z-index: 2100;
  background: linear-gradient(150deg, rgba(46,50,60,.86), rgba(20,22,28,.94));
  -webkit-backdrop-filter: blur(34px) saturate(190%);
  backdrop-filter: blur(34px) saturate(190%);
  border: .5px solid rgba(255,255,255,.15);
  box-shadow: 0 28px 68px rgba(0,0,0,.62), inset 0 1px 0 rgba(255,255,255,.17);
  animation: sheetIn .24s cubic-bezier(.22,1,.36,1);
}
.tour-menu-item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 12px 13px; border-radius: 12px;
  background: none; border: none; text-align: left;
  color: var(--text-primary); font-size: 14px; font-family: inherit; cursor: pointer;
}
.tour-menu-item:hover { background: rgba(255,255,255,.06); }
.tour-menu-item.active { background: rgba(200,199,27,.14); color: var(--accent); }
.tour-menu-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--accent); padding: 13px 13px 6px; font-weight: 600;
}
.tour-menu-empty { padding: 6px 13px 10px; font-size: 12px; color: var(--text-muted); }
.tour-menu-divider { height: .5px; background: var(--border); margin: 8px 6px; }

@media (max-width: 680px) {
  .route-header-title { font-size: 16px; }
  .brand-logo-van { width: 50px; }
  .route-header-brand { gap: 10px; }
}

/* ===== v78: encabezado profesional + menú de giras fluido ===== */

/* La gira es la protagonista; organización y fechas la acompañan */
.route-header-brand { flex-direction: column; align-items: center; gap: 0; width: 100%; }
.route-header-title {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: none; border: none; cursor: pointer;
  padding: 4px 8px; border-radius: 10px;
  color: var(--text-primary); font-family: inherit;
  max-width: 100%; transition: background .18s ease;
}
.route-header-title:hover { background: rgba(255,255,255,.05); }
.rht-name {
  font-size: 21px; font-weight: 600; letter-spacing: -.2px; line-height: 1.2;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
.rht-caret { display: inline-flex; color: var(--text-muted); flex-shrink: 0; }
.route-header-sub {
  font-size: 12px; color: var(--text-muted); margin-top: 3px;
  letter-spacing: .4px; text-transform: capitalize;
}

/* Menú de giras: menos desenfoque = mucho más fluido en el teléfono */
.tour-menu {
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  background: linear-gradient(150deg, rgba(40,44,53,.97), rgba(20,22,28,.98));
  animation: menuIn .16s ease-out;
  will-change: transform, opacity;
}
.tour-menu-backdrop {
  -webkit-backdrop-filter: none; backdrop-filter: none;
  background: rgba(0,0,0,.55);
  animation: fadeIn .14s ease;
}
@keyframes menuIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(.97); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.tour-menu-item { transition: background .12s ease; }

@media (max-width: 680px) {
  .rht-name { font-size: 19px; }
  .route-header-sub { font-size: 11.5px; }
  .route-header { padding-top: calc(14px + env(safe-area-inset-top, 0px)); padding-bottom: 14px; }
}
@media (max-width: 380px) {
  .rht-name { font-size: 17px; }
}

/* ===== v81: aviso pendiente al equipo ===== */

/* Nota dentro de los formularios: el manager sabe qué va a pasar */
.aviso-nota {
  display: flex; align-items: center; gap: 7px;
  font-size: 11.5px; color: var(--text-muted);
  background: rgba(200,199,27,.07);
  border: .5px solid rgba(200,199,27,.20);
  border-radius: 10px; padding: 9px 11px; margin-bottom: 14px;
  line-height: 1.4;
}
.aviso-nota svg { color: var(--accent); flex-shrink: 0; }

/* Barra flotante: "se avisará al equipo" con control */
.aviso-pend {
  position: fixed; z-index: 690;
  left: 50%; transform: translateX(-50%);
  bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  width: min(430px, calc(100vw - 24px));
  display: flex; flex-direction: column; gap: 10px;
  padding: 13px 15px; border-radius: 16px;
  background: linear-gradient(145deg, rgba(48,52,62,.80), rgba(20,22,28,.88));
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  backdrop-filter: blur(18px) saturate(170%);
  border: .5px solid rgba(200,199,27,.28);
  box-shadow: 0 14px 38px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.14);
  animation: sheetIn .28s cubic-bezier(.22,1,.36,1);
}
.aviso-pend .ap-info { display: flex; align-items: flex-start; gap: 10px; }
.aviso-pend .ap-icon {
  display: inline-flex; color: var(--accent); flex-shrink: 0; margin-top: 1px;
}
.aviso-pend .ap-info strong { display: block; font-size: 12.5px; color: var(--text-primary); }
.aviso-pend .ap-info span { font-size: 11px; color: var(--text-secondary); line-height: 1.5; }
.aviso-pend .ap-actions { display: flex; gap: 7px; justify-content: flex-end; }

@media (max-width: 380px) {
  .aviso-pend .ap-actions { flex-direction: column-reverse; }
  .aviso-pend .ap-actions .btn { width: 100%; }
}

/* ===== v82: notas del día ===== */
.nota-general {
  font-size: 13px; color: var(--text-secondary); line-height: 1.6;
  padding: 10px 12px; margin-bottom: 12px;
  background: rgba(200,199,27,.06);
  border-left: 2px solid var(--accent); border-radius: 0 10px 10px 0;
}
.nota-item {
  padding: 11px 13px; margin-bottom: 8px; border-radius: 12px;
  background: var(--bg-dark); border: .5px solid var(--border);
}
.nota-texto { font-size: 13px; color: var(--text-primary); line-height: 1.55; white-space: pre-wrap; }
.nota-pie {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 7px; font-size: 10.5px; color: var(--text-muted);
}

/* ===== v84: importador de hojas de ruta ===== */
.import-lista { max-height: 46vh; overflow-y: auto; display: flex; flex-direction: column; gap: 7px; }
.import-fila {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 11px 13px; border-radius: 12px; cursor: pointer;
  background: var(--bg-dark); border: .5px solid var(--border);
  transition: border-color .15s ease;
}
.import-fila:hover { border-color: rgba(200,199,27,.35); }
.import-chk { width: auto; margin-top: 2px; flex-shrink: 0; accent-color: var(--accent); }
.import-datos { min-width: 0; flex: 1; }
.import-fecha { font-size: 13px; font-weight: 500; color: var(--text-primary); display: flex; align-items: center; gap: 7px; }
.import-tipo {
  font-size: 9.5px; text-transform: uppercase; letter-spacing: .8px;
  color: var(--accent); background: rgba(200,199,27,.12);
  padding: 2px 7px; border-radius: 6px;
}
.import-lugar { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.import-extra { font-size: 10.5px; color: var(--text-muted); margin-top: 4px; display: flex; align-items: center; gap: 5px; }
.spinner {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2.5px solid rgba(200,199,27,.22); border-top-color: var(--accent);
  animation: girar .8s linear infinite;
}
@keyframes girar { to { transform: rotate(360deg); } }

/* ===== v85: nada puede correr la pantalla hacia el lado ===== */

/* Blindaje global: la página nunca se desplaza horizontalmente */
html, body { max-width: 100%; overflow-x: hidden; }
.route-app, .day-content, .section-head { max-width: 100%; min-width: 0; }

/* Todo el contenido de las tarjetas se ajusta y parte palabras largas si hace falta */
.glass-card, .glass-card * { min-width: 0; }
.glass-card { overflow-wrap: anywhere; word-break: break-word; }

/* Las filas internas (horario, hotel, viaje) se apilan en vez de empujar */
.dv-row, .dv-item, .hotel-row, .travel-row {
  display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; max-width: 100%;
}
.dv-row > *, .dv-item > * { min-width: 0; }

/* La hora nunca se corta */
.dv-time, .sched-hora { flex-shrink: 0; white-space: nowrap; }

/* Direcciones, nombres de hotel y rutas de viaje largos: que bajen de línea */
.hotel-dir, .travel-ruta, .dv-sub, .sh-sub { overflow-wrap: anywhere; }

/* El mapa y las imágenes nunca exceden el ancho */
.mapa-dia, .map-wrap, iframe, img { max-width: 100%; box-sizing: border-box; }

/* La franja de fechas sí puede desplazarse, pero sin arrastrar la página */
.route-strip { max-width: 100vw; overscroll-behavior-x: contain; }

@media (max-width: 680px) {
  .day-content > * { max-width: 100%; }
  /* Botones de acción dentro de las filas: que no empujen el texto */
  .glass-card .btn-sm { flex-shrink: 0; }
}

/* Sugerencias del asistente: siempre disponibles */
.ai-sugerencias {
  display: flex; gap: 6px; flex-wrap: nowrap;
  overflow-x: auto; scrollbar-width: none;
  padding: 8px 0 10px; margin-bottom: 2px;
  border-top: .5px solid var(--border-soft);
}
.ai-sugerencias::-webkit-scrollbar { display: none; }
.ai-sugerencias span {
  flex-shrink: 0; cursor: pointer;
  background: var(--bg-dark); border: .5px solid var(--border);
  border-radius: 20px; padding: 7px 13px; font-size: 11.5px;
  color: var(--text-secondary); white-space: nowrap;
  transition: all .15s ease;
}
.ai-sugerencias span:hover { border-color: var(--accent); color: var(--accent); }

/* Acciones de La Ruta (Importar / Agregar fecha) */
.ruta-acciones { display: flex; gap: 12px; align-items: center; }
.ruta-accion {
  letter-spacing: 0; text-transform: none; font-size: 11px;
  cursor: pointer; color: var(--accent);
  display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
}
.ruta-accion:hover { opacity: .8; }
@media (max-width: 380px) { .ruta-acciones { gap: 9px; } .ruta-accion { font-size: 10.5px; } }

/* Respaldo cuando la imagen del setlist no se puede mostrar (HEIC en PC) */
.sl-noimg {
  padding: 26px 18px; text-align: center;
  color: var(--text-secondary); font-size: 12.5px; line-height: 1.6;
}
.sl-noimg svg { color: var(--text-muted); opacity: .5; margin-bottom: 8px; }
.sl-tip { font-size: 11px; color: var(--text-muted); margin-top: 10px; line-height: 1.6; }

/* ===== v89: visibilidad de horarios (varios roles) ===== */
.si-vis {
  display: inline-flex; align-items: center; gap: 3px;
  margin-left: 8px; font-size: 9.5px; letter-spacing: .3px;
  color: var(--accent); background: rgba(200,199,27,.12);
  border-radius: 6px; padding: 2px 7px; white-space: nowrap; vertical-align: 1px;
}
.si-vis svg { opacity: .8; }
.vis-opt {
  display: flex; align-items: center; gap: 9px; cursor: pointer;
  padding: 9px 11px; margin-bottom: 6px; border-radius: 10px;
  background: var(--bg-dark); border: .5px solid var(--border);
  font-size: 13px; color: var(--text-primary);
  transition: border-color .15s ease;
}
.vis-opt:hover { border-color: rgba(200,199,27,.35); }
.vis-opt input { width: auto; margin: 0; accent-color: var(--accent); flex-shrink: 0; }
.vis-todos { border-color: rgba(200,199,27,.25); }
.vis-roles { padding-left: 10px; border-left: 2px solid var(--border); margin-top: 4px; }

/* ===== v93: inventario en tarjetas (se ve completo en el celular) ===== */
.inv-lista { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.inv-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 13px; border-radius: 12px;
  background: var(--bg-dark); border: .5px solid var(--border);
}
.inv-datos { min-width: 0; flex: 1; cursor: pointer; }
.inv-nombre { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.inv-foto { color: var(--text-muted); }
.inv-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 3px; font-size: 10.5px; color: var(--text-muted); }
.inv-meta span { display: inline-flex; align-items: center; gap: 3px; }
.inv-acciones { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
@media (max-width: 420px) {
  .inv-item { flex-direction: column; align-items: stretch; gap: 8px; }
  .inv-acciones { justify-content: flex-end; }
}
/* Botones del inventario: que quepan todos en el celular */
@media (max-width: 680px) {
  .section-head > div:last-child { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
  .section-head .btn-sm { flex: 1 1 auto; justify-content: center; min-width: 0; font-size: 11.5px; padding: 7px 9px; }
}

/* ===== v95: que ninguna columna estire la pantalla ===== */
/* En una grilla, los elementos crecen con su contenido salvo que se limite.
   Un texto largo (una dirección, una ruta de vuelo) estiraba la columna
   y empujaba todo hacia la derecha. */
.day-grid, .day-grid > *, .stats-row, .stats-row > * { min-width: 0; }
.day-content > *, .route-app > * { min-width: 0; max-width: 100%; }
.glass-card > *, .gc-head, .gc-title { min-width: 0; }

/* Direcciones y textos largos: parten en varias líneas en vez de empujar */
.glass-card a, .glass-card strong, .glass-card span, .glass-card div { overflow-wrap: anywhere; }

/* Los botones de las tarjetas nunca se cortan */
.gc-head .btn, .glass-card .btn { flex-shrink: 0; }

/* Contención real del desplazamiento lateral */
.route-app { overflow-x: clip; }

/* ===== v97: encabezado en tres zonas + menú inferior con más presencia ===== */

.route-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; position: relative;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 18px 12px;
  border-bottom: .5px solid var(--border-soft);
}

/* Izquierda: logo de la empresa */
.rh-logo {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: linear-gradient(145deg, rgba(58,62,72,.45), rgba(28,31,38,.55));
  border: .5px solid rgba(255,255,255,.09);
}
.rh-logo img { width: 100%; height: 100%; object-fit: contain; padding: 5px; box-sizing: border-box; }
.rh-logo-txt { font-size: 15px; font-weight: 600; color: var(--accent); letter-spacing: .5px; }

/* Centro: nombre de la gira y cantidad de fechas */
.rh-centro { flex: 1 1 auto; min-width: 0; text-align: center; }
.rh-centro .route-header-title { margin: 0 auto; }
.rh-centro .route-header-sub { text-align: center; margin-top: 2px; }

/* Derecha: acciones y cuenta */
.rh-acciones { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; }
.rh-acciones .hm-item { min-width: 58px; padding: 8px 9px; }
.rh-acciones .hm-label { font-size: 9.5px; }

/* --- Menú inferior: que destaque del fondo --- */
.float-nav {
  background: linear-gradient(145deg, rgba(62,66,78,.72), rgba(14,16,21,.86));
  border: .5px solid rgba(255,255,255,.18);
  box-shadow: 0 18px 50px rgba(0,0,0,.72),
              inset 0 1px 0 rgba(255,255,255,.22),
              inset 0 -1px 1px rgba(0,0,0,.4),
              0 0 0 .5px rgba(200,199,27,.14);
}
.fn-item { color: var(--text-muted); }
.fn-item.active {
  background: linear-gradient(160deg, #DEDD3A, var(--accent));
  color: #141400;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 6px 20px rgba(200,199,27,.42);
}
.fn-item.active .fn-label { font-weight: 600; }

/* --- TELÉFONO: el encabezado se acomoda en dos filas --- */
@media (max-width: 680px) {
  .route-header { flex-wrap: wrap; gap: 10px; padding-left: 14px; padding-right: 14px; }
  .rh-logo { width: 40px; height: 40px; border-radius: 11px; }
  .rh-centro { order: 2; flex: 1 1 auto; text-align: left; }
  .rh-centro .route-header-title { margin: 0; }
  .rh-centro .route-header-sub { text-align: left; }
  .rh-acciones { order: 3; flex: 1 1 100%; justify-content: space-between; gap: 5px; }
  .rh-acciones .hm-item { flex: 1 1 0; min-width: 0; }
  .rh-acciones .avatar-btn { flex: 0 0 auto; }
  .rht-name { font-size: 17px; }
}
@media (max-width: 380px) {
  .rh-acciones .hm-label { font-size: 9px; }
  .rh-acciones .hm-item { padding: 7px 5px; }
}

/* Tema claro */

/* ===== v98: avatar igual a los botones + nombre bien centrado ===== */

/* El avatar comparte el mismo acabado translúcido que IA/Tema/Avisos */
.rh-acciones .avatar-btn {
  width: auto; min-width: 58px; height: auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  padding: 8px 9px; border-radius: 14px;
  background: linear-gradient(145deg, rgba(58,62,72,.34), rgba(28,31,38,.44));
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  border: .5px solid rgba(255,255,255,.09);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.10);
  color: var(--accent); font-size: 12px; font-weight: 600; letter-spacing: .5px;
  font-family: inherit; cursor: pointer; transition: all .2s ease;
}
.rh-acciones .avatar-btn:hover { border-color: rgba(255,255,255,.16); }

/* El nombre de la gira queda al centro real de la pantalla */
@media (min-width: 681px) {
  .rh-centro {
    position: absolute; left: 50%; transform: translateX(-50%);
    max-width: min(46%, 460px); text-align: center;
  }
  .route-header { justify-content: space-between; }
}

/* Más presencia y orden en el bloque central */
.rht-name {
  font-size: 23px; font-weight: 600; letter-spacing: -.3px;
  line-height: 1.15;
}
.route-header-title {
  padding: 5px 12px; border-radius: 12px; gap: 8px;
  border: .5px solid transparent;
}
.route-header-title:hover { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.08); }
.route-header-sub {
  font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--text-muted); margin-top: 3px; font-weight: 500;
}

@media (max-width: 680px) {
  .rht-name { font-size: 18px; }
  .rh-acciones .avatar-btn { min-width: 0; flex: 1 1 0; }
}

/* ===== v99: logo más grande y visible ===== */
.rh-logo { width: 64px; height: 64px; border-radius: 15px; }
.rh-logo img { padding: 4px; }
.rh-logo-txt { font-size: 20px; }
@media (max-width: 680px) {
  .rh-logo { width: 52px; height: 52px; border-radius: 13px; }
  .rh-logo-txt { font-size: 17px; }
}

/* ===== v100: logo con presencia en pantalla grande ===== */
@media (min-width: 681px) {
  .rh-logo { width: 92px; height: 92px; border-radius: 18px; }
  .rh-logo img { padding: 6px; }
  .rh-logo-txt { font-size: 28px; }
  .route-header { padding-top: calc(14px + env(safe-area-inset-top, 0px)); padding-bottom: 14px; }
}
@media (min-width: 1200px) {
  .rh-logo { width: 108px; height: 108px; border-radius: 20px; }
  .rh-logo-txt { font-size: 32px; }
}

/* ===== v103: liquidación tipo planilla ===== */
.liq-tabla { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.liq-fila {
  display: grid;
  grid-template-columns: 130px 130px minmax(200px,1fr) 110px 150px 90px minmax(120px,180px) 62px;
  gap: 8px; align-items: center;
  padding: 9px 16px; border-bottom: .5px solid var(--border-soft);
  min-width: 1000px;
}
.liq-cab {
  font-size: 9.5px; text-transform: uppercase; letter-spacing: .9px;
  color: var(--text-muted); font-weight: 600;
  background: rgba(255,255,255,.03); border-bottom: .5px solid var(--border);
}
.liq-col { min-width: 0; font-size: 12px; color: var(--text-secondary); overflow-wrap: anywhere; }
.liq-detalle { color: var(--text-primary); }
.liq-costo { text-align: right; font-weight: 600; color: var(--text-primary); white-space: nowrap; }
.liq-acc { display: flex; gap: 2px; justify-content: flex-end; }
.liq-factura a { color: var(--accent); text-decoration: none; font-size: 11px; display: inline-flex; align-items: center; gap: 3px; }

.liq-sel {
  width: 100%; font-size: 10.5px; font-family: inherit; padding: 5px 7px;
  border-radius: 7px; border: .5px solid var(--border);
  background: var(--bg-dark); color: var(--text-primary); outline: none;
}
.liq-sel.est-pagado { background: rgba(122,155,133,.18); color: #8FBFA0; border-color: rgba(122,155,133,.4); }
.liq-sel.est-saldar_50 { background: rgba(200,199,27,.16); color: var(--accent); border-color: rgba(200,199,27,.38); }
.liq-sel.est-sin_pagar { background: rgba(185,125,99,.14); color: #C98A70; border-color: rgba(185,125,99,.34); }
.liq-sel.est-falta_info { background: rgba(255,255,255,.05); color: var(--text-muted); }

.liq-tag {
  display: inline-block; padding: 4px 12px; border-radius: 8px;
  font-size: 11px; font-weight: 600; letter-spacing: .3px; color: #fff;
}
.tag-tecnica { background: #8B6914; }
.tag-hospitalidad { background: #6B7F5A; }
.tag-costos_extras { background: #7A6A8C; }
.tag-ensayo { background: #8C6A4A; }
.tag-otros { background: #5A6470; }
.liq-bloque { margin-bottom: 14px; }

/* En el teléfono cada registro se ve como ficha, no como fila */
@media (max-width: 860px) {
  .liq-fila { grid-template-columns: 1fr; min-width: 0; gap: 5px; padding: 12px 14px; }
  .liq-cab { display: none; }
  .liq-col::before { content: attr(data-l); font-size: 9.5px; color: var(--text-muted); }
  .liq-cuenta2 { font-weight: 600; color: var(--text-primary); font-size: 13px; }
  .liq-costo { text-align: left; font-size: 15px; }
  .liq-estado { max-width: 190px; }
  .liq-acc { justify-content: flex-start; margin-top: 4px; }
}

/* ===== v106: personal en tarjetas, margen en pantalla grande, etiquetas ===== */

/* --- Personal de la organización: fichas en vez de tabla apretada --- */
.pers-lista { display: flex; flex-direction: column; gap: 9px; padding: 12px 16px 16px; }
.pers-item {
  padding: 13px 15px; border-radius: 13px;
  background: var(--bg-dark); border: .5px solid var(--border);
}
.pers-yo { border-color: rgba(200,199,27,.32); background: rgba(200,199,27,.05); }
.pers-cab { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.pers-id { min-width: 0; }
.pers-nombre { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.pers-tu {
  font-size: 9.5px; text-transform: uppercase; letter-spacing: .8px;
  color: #141400; background: var(--accent); border-radius: 5px; padding: 2px 6px; margin-left: 6px;
}
.pers-mail { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; overflow-wrap: anywhere; }
.pers-fila { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 11px; align-items: flex-end; }
.pers-campo { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pers-campo label { font-size: 9.5px; text-transform: uppercase; letter-spacing: .8px; color: var(--text-muted); }
.pers-campo select {
  background: var(--bg-card); border: .5px solid var(--border); border-radius: 8px;
  color: var(--text-primary); padding: 7px 10px; font-size: 12.5px; font-family: inherit; text-transform: capitalize;
}
.pers-acciones { flex-direction: row; gap: 4px; margin-left: auto; align-items: center; }

/* --- Pantalla grande: contenido con margen, sin estirarse --- */
/* Solo el CONTENIDO se limita: el encabezado y el menú quedan como estaban */
@media (min-width: 1100px) {
  .day-content {
    width: 100%;              /* sin esto se encoge al tamaño del texto */
    max-width: 1180px;
    margin-left: auto; margin-right: auto;
    padding-left: 28px; padding-right: 28px;
    align-self: center;
  }
}
@media (min-width: 1500px) {
  .day-content { max-width: 1320px; }
}

/* --- Etiquetas QR: se imprimen desde la misma app --- */
#zona-impresion { display: none; }
body.modo-impresion #zona-impresion {
  display: block; position: fixed; inset: 0; z-index: 5000;
  background: #fff; color: #111; overflow-y: auto; padding: 22px;
}
body.modo-impresion .route-app, body.modo-impresion .float-nav,
body.modo-impresion .modal-overlay, body.modo-impresion .toast-container { display: none !important; }
.imp-cab {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  border-bottom: 2.5px solid #9A990F; padding-bottom: 12px; margin-bottom: 18px; flex-wrap: wrap;
}
.imp-marca { font-size: 9px; letter-spacing: 3.5px; color: #9A990F; font-weight: 700; }
.imp-org { font-size: 19px; font-weight: 600; color: #1a1a1a; margin-top: 4px; }
.imp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(var(--qr-tam, 36mm) + 30px), 1fr)); gap: 12px; }
.imp-etiqueta {
  border: 1px solid #d5d5d5; border-radius: 8px; padding: 12px 8px;
  text-align: center; break-inside: avoid; background: #fff;
}
.imp-qr { display: flex; justify-content: center; margin-bottom: 8px; }
/* El código se genera a 600 px y se muestra al tamaño físico elegido:
   así sale nítido en la impresión en vez de estirado y borroso. */
.imp-qr img, .imp-qr canvas {
  width: var(--qr-tam, 36mm) !important; height: var(--qr-tam, 36mm) !important;
  image-rendering: -webkit-optimize-contrast;
}

/* Selector de tamaño de etiqueta */
.tam-etiqueta { display: inline-flex; background: rgba(0,0,0,0.06); border-radius: 9px; padding: 3px; gap: 2px; }
.tam-btn {
  border: none; background: none; border-radius: 7px; cursor: pointer;
  padding: 6px 12px; font-family: 'Outfit', sans-serif; font-size: 12px; font-weight: 600; color: #6E6C64;
  transition: background 0.2s ease, color 0.2s ease;
}
.tam-btn.on { background: #C8C71B; color: #14161A; }
.imp-nombre { font-size: 11.5px; font-weight: 600; color: #1a1a1a; line-height: 1.3; overflow-wrap: anywhere; }
.imp-cat { font-size: 9.5px; color: #777; text-transform: capitalize; margin-top: 2px; }
@media print {
  @page { margin: 12mm; }
  body.modo-impresion #zona-impresion { position: static; padding: 0; }
  .no-print { display: none !important; }
  .imp-grid { grid-template-columns: repeat(var(--qr-cols, 4), 1fr); }
}

/* Pestañas del inventario: en esta gira / todo */
.inv-tabs { display: flex; gap: 7px; margin-bottom: 14px; flex-wrap: wrap; }
.inv-tab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 15px; border-radius: 12px; cursor: pointer;
  background: var(--glass); border: .5px solid var(--glass-brd);
  color: var(--text-secondary); font-size: 12.5px; font-family: inherit; font-weight: 500;
  transition: all .18s ease;
}
.inv-tab span {
  font-size: 10.5px; background: rgba(255,255,255,.08);
  border-radius: 6px; padding: 2px 7px; color: var(--text-muted);
}
.inv-tab.activa {
  background: linear-gradient(160deg, var(--accent), var(--accent-2));
  color: #141400; border-color: rgba(200,199,27,.5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 5px 16px var(--glow);
}
.inv-tab.activa span { background: rgba(0,0,0,.16); color: #141400; }

/* Selector de mes en la liquidación */
.liq-meses { display: flex; gap: 7px; margin-bottom: 14px; overflow-x: auto; padding-bottom: 3px; scrollbar-width: none; }
.liq-meses::-webkit-scrollbar { display: none; }
.liq-mes {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 15px; border-radius: 12px; cursor: pointer; white-space: nowrap;
  background: var(--glass); border: .5px solid var(--glass-brd);
  color: var(--text-secondary); font-size: 12.5px; font-family: inherit;
  font-weight: 500; text-transform: capitalize; transition: all .18s ease;
}
.liq-mes span { font-size: 10.5px; color: var(--text-muted); }
.liq-mes.activo {
  background: linear-gradient(160deg, var(--accent), var(--accent-2));
  color: #141400; border-color: rgba(200,199,27,.5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 5px 16px var(--glow);
}
.liq-mes.activo span { color: rgba(26,19,5,.7); }
.liq-origen {
  display: inline-flex; align-items: center; gap: 3px; margin-left: 6px;
  font-size: 9px; color: var(--accent); background: rgba(200,199,27,.12);
  border-radius: 5px; padding: 1px 5px; vertical-align: 1px;
}

/* ===== v113: naranja de marca #FF5500 — hover en oscuro, acento en tema claro ===== */

:root {
  --hover: #FF5500;
  --hover-soft: rgba(255, 85, 0, 0.14);
  --hover-brd: rgba(255, 85, 0, 0.42);
}

/* --- TEMA OSCURO: el naranja aparece al pasar el cursor --- */
.btn-secondary:hover, .icon-btn:hover {
  color: var(--hover);
  border-color: var(--hover-brd);
  background: var(--hover-soft);
}
.btn-primary:hover {
  background: linear-gradient(160deg, #FF6A1A, var(--hover));
  color: #1a0800;
  box-shadow: 0 5px 18px rgba(255, 85, 0, 0.38);
}
.hm-item:hover, .fn-item:hover:not(.active) { color: var(--hover); border-color: var(--hover-brd); }
.hm-item:hover .hm-icon svg, .fn-item:hover:not(.active) .fn-icon svg { color: var(--hover); }
.route-header-title:hover { background: var(--hover-soft); border-color: var(--hover-brd); }
.route-card:hover:not(.selected) { border-color: var(--hover-brd); }
.tour-menu-item:hover { background: var(--hover-soft); color: var(--hover); }
.more-menu-inner .fn-item:hover:not(.active) { background: var(--hover-soft); color: var(--hover); }
.inv-item:hover, .pers-item:hover, .nota-item:hover, .import-fila:hover, .vis-opt:hover {
  border-color: var(--hover-brd);
}
.liq-mes:hover:not(.activo), .inv-tab:hover:not(.activa) { color: var(--hover); border-color: var(--hover-brd); }
.ai-sugerencias span:hover { border-color: var(--hover-brd); color: var(--hover); }
.ruta-accion:hover { color: var(--hover); opacity: 1; }
.sl-doc-bar a:hover, .liq-factura a:hover { color: var(--hover); }
a:hover { color: var(--hover); }
.danger-btn:hover { color: var(--hover); border-color: var(--hover-brd); }

/* --- TEMA CLARO: el naranja es el color principal --- */

/* ===== v114: rendimiento — el desenfoque solo donde realmente se ve ===== */
/* Cada elemento con desenfoque obliga al teléfono a recalcular el fondo en cada
   movimiento. Con decenas de tarjetas y botones eso traba la app.
   Se conserva el efecto en lo que flota sobre el contenido (menú, ventanas,
   avisos) y se quita de lo que se repite mucho, usando un fondo equivalente. */

.glass-card, .stat-chip, .route-card,
.btn-secondary, .icon-btn, .hm-item, .avatar-btn,
.inv-tab, .liq-mes, .rh-logo, .sched-item,
.route-strip, .stats-row, .header-menu, .tour-selector-row,
.gc-title, .route-header-sub {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

/* Fondos equivalentes (se ven igual sobre el fondo oscuro, sin costo) */
.glass-card { background: linear-gradient(145deg, #23262E, #191C22); }
.stat-chip  { background: linear-gradient(145deg, #22252D, #181B21); }
.route-card { background: linear-gradient(145deg, #202329, #171A20); }
.route-card.selected { background: linear-gradient(145deg, rgba(200,199,27,.15), #1E2018); }
.btn-secondary { background: linear-gradient(145deg, #2C3038, #202329); }
.icon-btn, .hm-item, .avatar-btn, .rh-logo { background: linear-gradient(145deg, #262A31, #1B1E24); }
.inv-tab, .liq-mes { background: linear-gradient(145deg, #22252D, #181B21); }
.route-header, .header-menu, .tour-selector-row { background: transparent; }

/* Menos capas que componer al desplazar */
.route-strip { will-change: scroll-position; }
.glass-card { contain: layout style; }

/* En pantallas chicas se aligera aún más el desenfoque del menú flotante */
@media (max-width: 680px) {
  .float-nav {
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    backdrop-filter: blur(14px) saturate(150%);
  }
}

/* ===== v115: hover amarillo, desplegables oscuros y avisos con los colores de la marca ===== */

/* --- El hover en tema oscuro vuelve al amarillo, en tono más brillante --- */
:root {
  --hover: #E4E340;                       /* amarillo más luminoso */
  --hover-soft: rgba(228, 227, 64, 0.12);
  --hover-brd: rgba(228, 227, 64, 0.42);
  /* Colores de estado acordes a la marca */
  --success: #6FC48A;
  --warning: #E5644B;
}
.btn-primary:hover {
  background: linear-gradient(160deg, #EFEE55, var(--accent));
  color: #141400;
  box-shadow: 0 5px 18px rgba(228, 227, 64, 0.34);
}

/* --- Desplegables: la lista desplegada sigue el tema oscuro --- */
select, option, optgroup {
  color-scheme: dark;
  background-color: #1C1F26;
  color: #EDEEF0;
}
select option { background-color: #1C1F26 !important; color: #EDEEF0 !important; padding: 8px; }
select option:checked, select option:hover { background-color: #2A2E37 !important; color: var(--accent) !important; }
select:focus { border-color: var(--accent); outline: none; }
/* Los desplegables de estado en liquidación conservan su color de fondo */
.liq-sel option { background-color: #1C1F26 !important; color: #EDEEF0 !important; }

/* --- Avisos con los colores de la marca --- */
.toast {
  background: linear-gradient(145deg, #262A33, #171A20);
  border: .5px solid rgba(255,255,255,.12);
  color: var(--text-primary);
  box-shadow: 0 12px 34px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.10);
  border-left: 3px solid var(--accent);
}
.toast.success { border-left: 3px solid var(--success); }
.toast.error   { border-left: 3px solid var(--warning); }

/* Distintivos de estado con los tonos nuevos */
.badge-success { background: rgba(111,196,138,.16); color: var(--success); }
.badge-warning { background: rgba(229,100,75,.16); color: var(--warning); }
.liq-sel.est-pagado { background: rgba(111,196,138,.18); color: var(--success); border-color: rgba(111,196,138,.4); }
.liq-sel.est-sin_pagar { background: rgba(229,100,75,.14); color: var(--warning); border-color: rgba(229,100,75,.34); }

/* Esqueleto de carga: se ve al instante mientras llegan los datos */
.sk {
  display: block; border-radius: 7px;
  background: linear-gradient(90deg, rgba(255,255,255,.045) 25%, rgba(255,255,255,.10) 37%, rgba(255,255,255,.045) 63%);
  background-size: 400% 100%;
  animation: sk-brillo 1.4s ease-in-out infinite;
}
.sk-txt { height: 12px; }
.sk-btn { width: 108px; height: 32px; border-radius: 9px; }
@keyframes sk-brillo { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* Menú flotante reutilizable (agregar fecha) */
.menu-flotante {
  position: fixed; z-index: 2200;
  width: min(290px, calc(100vw - 24px));
  padding: 7px; border-radius: 15px;
  background: linear-gradient(150deg, rgba(40,44,53,.98), rgba(20,22,28,.99));
  border: .5px solid rgba(255,255,255,.14);
  box-shadow: 0 20px 50px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.14);
  animation: menuIn .16s ease-out;
}
.menu-flotante-item {
  display: flex; align-items: flex-start; gap: 11px; width: 100%;
  padding: 11px 12px; border-radius: 11px; cursor: pointer;
  background: none; border: none; text-align: left; font-family: inherit;
  color: var(--text-primary); transition: background .14s ease;
}
.menu-flotante-item:hover { background: var(--hover-soft); color: var(--hover); }
.menu-flotante-item svg { flex-shrink: 0; margin-top: 2px; color: var(--accent); }
.menu-flotante-item:hover svg { color: var(--hover); }
.menu-flotante-item strong { display: block; font-size: 13px; font-weight: 600; }
.menu-flotante-item span { display: block; font-size: 11px; color: var(--text-muted); margin-top: 2px; line-height: 1.4; }

/* Inicio de sesión: el logo es el protagonista, sin texto repetido */
.auth-logo-solo { text-align: center; margin-bottom: 26px; }
.auth-logo-solo img {
  width: min(300px, 78%);
  height: auto; display: block; margin: 4px auto 0;
}
@media (max-width: 480px) { .auth-logo-solo img { width: min(260px, 82%); } }

/* ===== v130: el aviso pendiente ya no interrumpe ===== */
.aviso-chip {
  position: fixed; z-index: 690;
  right: 16px; bottom: calc(104px + env(safe-area-inset-bottom, 0px));
}
.aviso-chip .ap-mini {
  display: flex; align-items: center; gap: 5px;
  padding: 9px 13px; border-radius: 22px; cursor: pointer;
  background: linear-gradient(145deg, #2A2E37, #1A1D23);
  border: .5px solid rgba(200,199,27,.35);
  color: var(--accent); font-family: inherit;
  box-shadow: 0 8px 22px rgba(0,0,0,.45);
  animation: sheetIn .3s cubic-bezier(.22,1,.36,1);
}
.aviso-chip .ap-mini:hover { border-color: var(--hover-brd); color: var(--hover); }
.aviso-chip .ap-num {
  font-size: 11px; font-weight: 700; min-width: 15px; height: 15px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; background: var(--accent); color: #141400; padding: 0 4px;
}
.aviso-chip .ap-panel {
  position: relative;
  width: min(330px, calc(100vw - 32px));
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px 15px; border-radius: 16px;
  background: linear-gradient(145deg, #2A2E37, #171A20);
  border: .5px solid rgba(200,199,27,.3);
  box-shadow: 0 14px 38px rgba(0,0,0,.5);
  animation: sheetIn .22s cubic-bezier(.22,1,.36,1);
}
.aviso-chip .ap-txt strong { display: block; font-size: 12.5px; color: var(--text-primary); }
.aviso-chip .ap-txt span { font-size: 11px; color: var(--text-secondary); line-height: 1.5; }
.aviso-chip .ap-btns { display: flex; gap: 7px; }
.aviso-chip .ap-btns .btn { flex: 1; }
.aviso-chip .ap-cerrar {
  position: absolute; top: 8px; right: 8px;
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); padding: 3px; display: inline-flex;
}
.aviso-chip .ap-cerrar:hover { color: var(--hover); }

.route-app.no-nav ~ .aviso-chip { bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }

/* ===== v132: el nombre de la gira, escrito en gaffer ===== */
.rht-name {
  position: relative;
  display: inline-block;
  font-family: 'Permanent Marker', 'Outfit', system-ui, sans-serif;
  font-size: 25px; font-weight: 400; letter-spacing: .4px;
  line-height: 1.15;
  color: #1a1a12;
  padding: 8px 20px 7px;
  transform: rotate(-1.2deg);
  background-color: var(--accent);
  /* Textura de tejido del gaffer */
  background-image:
    repeating-linear-gradient(90deg, rgba(0,0,0,.07) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(0deg,  rgba(0,0,0,.05) 0 1px, transparent 1px 4px);
  box-shadow: 0 3px 10px rgba(0,0,0,.4);
  /* Bordes irregulares, como cortada a mano */
  clip-path: polygon(1% 4%, 99% 0%, 100% 92%, 98% 100%, 2% 97%, 0% 8%);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 100%;
}
.route-header-title { padding: 6px 10px; gap: 10px; }
.route-header-title:hover { background: none; border-color: transparent; }
.route-header-title:hover .rht-name { filter: brightness(1.08); }
.rht-caret { color: var(--text-muted); }

/* Tema claro: la cinta se mantiene amarilla (es la marca), no naranja */

/* En pantallas chicas la cinta se achica para que no ocupe de más */
@media (max-width: 680px) {
  .rht-name { font-size: 19px; padding: 6px 15px 5px; }
}
@media (max-width: 380px) {
  .rht-name { font-size: 16.5px; padding: 5px 12px 4px; }
}

/* Nombres largos: se reduce un poco en vez de cortarse tan pronto */
@media (min-width: 681px) {
  .rht-name { font-size: clamp(19px, 1.1rem + .7vw, 25px); }
}

/* ===== v133: menú de bandas y giras, con cintas de gaffer ===== */
.tour-menu {
  width: min(420px, calc(100vw - 28px));
  max-height: 78vh;
  padding: 0; overflow: hidden;
  display: flex; flex-direction: column;
  border-radius: 20px;
}

/* Cabecera */
.tm-cab {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 17px 13px;
  border-bottom: .5px solid rgba(255,255,255,.09);
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 1.6px;
  color: var(--text-muted); font-weight: 600;
}
.tm-cab span { display: inline-flex; align-items: center; gap: 8px; }
.tm-cab svg { color: var(--accent); }
.tm-cerrar {
  background: none; border: none; cursor: pointer; color: var(--text-muted);
  padding: 4px; display: inline-flex; border-radius: 7px;
}
.tm-cerrar:hover { color: var(--hover); background: var(--hover-soft); }

.tm-cuerpo { overflow-y: auto; padding: 6px 14px 10px; flex: 1; }

/* Cada banda con su cinta de gaffer */
.tm-banda { margin-bottom: 18px; }
.tm-banda:last-child { margin-bottom: 6px; }
.tm-cinta {
  display: inline-block;
  font-family: 'Permanent Marker', 'Outfit', system-ui, sans-serif;
  font-size: 15px; letter-spacing: .3px; line-height: 1.15;
  color: #1a1a12; padding: 6px 15px 5px;
  margin: 10px 0 11px 2px;
  background-color: var(--accent);
  background-image:
    repeating-linear-gradient(90deg, rgba(0,0,0,.07) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(0deg,  rgba(0,0,0,.05) 0 1px, transparent 1px 4px);
  box-shadow: 0 3px 9px rgba(0,0,0,.35);
  clip-path: polygon(1% 5%, 99% 0%, 100% 91%, 97% 100%, 2% 96%, 0% 8%);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Giras de esa banda */
.tm-gira {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 12px 13px; margin-bottom: 4px; border-radius: 12px;
  background: rgba(255,255,255,.03); border: .5px solid transparent;
  color: var(--text-primary); font-size: 14px; font-family: inherit;
  text-align: left; cursor: pointer; transition: all .15s ease;
}
.tm-gira:hover { background: var(--hover-soft); border-color: var(--hover-brd); color: var(--hover); }
.tm-gira.activa { background: rgba(200,199,27,.12); border-color: rgba(200,199,27,.35); color: var(--accent); }
.tm-punto {
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
  background: var(--text-muted);
}
.tm-gira.activa .tm-punto { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.tm-gira:hover .tm-punto { background: var(--hover); }
.tm-nombre { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-check { display: inline-flex; flex-shrink: 0; }
.tm-vacio { font-size: 12px; color: var(--text-muted); padding: 4px 13px 8px; }

/* Acciones abajo */
.tm-pie {
  border-top: .5px solid rgba(255,255,255,.09);
  padding: 9px 12px 12px; display: flex; flex-direction: column; gap: 3px;
}
.tm-accion {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 11px 12px; border-radius: 11px;
  background: none; border: none; cursor: pointer;
  color: var(--accent); font-size: 13px; font-family: inherit; text-align: left;
  transition: background .14s ease;
}
.tm-accion:hover { background: var(--hover-soft); color: var(--hover); }
.tm-accion svg { flex-shrink: 0; }
.tm-borrar { color: var(--warning); }
.tm-borrar:hover { background: rgba(229,100,75,.1); color: var(--warning); }

/* Tema claro */

@media (max-width: 480px) {
  .tour-menu { width: calc(100vw - 24px); max-height: 82vh; }
  .tm-cinta { font-size: 14px; }
  .tm-gira { padding: 11px 12px; font-size: 13.5px; }
}

/* ===== v134: el nombre de la banda también en gaffer ===== */
.rh-banda { flex: 0 0 auto; max-width: 30%; min-width: 0; }
.rh-banda-cinta {
  display: inline-block;
  font-family: 'Permanent Marker', 'Outfit', system-ui, sans-serif;
  font-size: 15px; letter-spacing: .2px; line-height: 1.15;
  color: #1a1a12; padding: 6px 14px 5px;
  transform: rotate(-2deg);
  background-color: var(--accent);
  background-image:
    repeating-linear-gradient(90deg, rgba(0,0,0,.07) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(0deg,  rgba(0,0,0,.05) 0 1px, transparent 1px 4px);
  box-shadow: 0 3px 9px rgba(0,0,0,.35);
  clip-path: polygon(2% 6%, 98% 0%, 100% 90%, 96% 100%, 1% 95%, 0% 9%);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Ya no hay logo: se quitan sus reglas */
.rh-logo { display: none; }

@media (max-width: 680px) {
  .rh-banda { max-width: 46%; }
  .rh-banda-cinta { font-size: 12.5px; padding: 5px 11px 4px; }
}
@media (max-width: 380px) {
  .rh-banda-cinta { font-size: 11.5px; padding: 4px 9px 3px; }
}

/* ===== v136: en teléfono, banda a la izquierda y gira a la derecha ===== */
@media (max-width: 680px) {
  .route-header {
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
    padding-bottom: 12px;
  }
  /* Primera fila: las dos cintas, una a cada lado */
  .rh-banda {
    order: 1; flex: 0 1 auto; max-width: 44%;
  }
  .rh-centro {
    order: 2; position: static; transform: none;
    flex: 1 1 auto; min-width: 0;
    text-align: right; margin-left: auto;
  }
  .rh-centro .route-header-title { margin-left: auto; margin-right: 0; padding-right: 0; }
  .rh-centro .route-header-sub { text-align: right; }
  /* Segunda fila: las acciones a lo ancho */
  .rh-acciones { order: 3; flex: 1 1 100%; justify-content: space-between; gap: 5px; }

  /* Las cintas se inclinan hacia dentro, como pegadas en los extremos */
  .rh-banda-cinta { transform: rotate(-2.2deg); font-size: 12px; padding: 5px 10px 4px; }
  .rht-name { transform: rotate(1.4deg); font-size: 16px; padding: 5px 12px 4px; }
  .route-header-title { gap: 6px; padding: 4px 0 4px 6px; }
}
@media (max-width: 380px) {
  .rh-banda { max-width: 40%; }
  .rh-banda-cinta { font-size: 10.5px; padding: 4px 8px 3px; }
  .rht-name { font-size: 14px; padding: 4px 10px 3px; }
}

/* Plan dentro del menú de cuenta */
.cuenta-plan {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 15px; margin-bottom: 14px; border-radius: 13px;
  background: var(--bg-dark); border: .5px solid var(--border);
  transition: border-color .15s ease;
}
.cuenta-plan[onclick]:hover { border-color: var(--hover-brd); }
.cp-label { font-size: 10px; text-transform: uppercase; letter-spacing: 1.1px; color: var(--text-muted); }
.cp-nombre { font-size: 15px; font-weight: 600; color: var(--text-primary); margin-top: 3px; }
.cp-estado { font-size: 12.5px; font-weight: 600; }
.cp-ver {
  font-size: 10.5px; color: var(--accent); margin-top: 3px;
  display: inline-flex; align-items: center; gap: 3px;
}
.cuenta-plan[onclick]:hover .cp-ver { color: var(--hover); }

/* ===== v138: solo tema oscuro · encabezado móvil centrado ===== */

/* Los cuatro botones se reparten el ancho disponible */
.rh-acciones .hm-item,
.rh-acciones .avatar-btn { flex: 1 1 0; min-width: 0; }
@media (min-width: 681px) {
  .rh-acciones { gap: 7px; }
  .rh-acciones .hm-item, .rh-acciones .avatar-btn { flex: 0 0 auto; min-width: 66px; }
}

/* --- TELÉFONO: banda al centro y grande, gira debajo --- */
@media (max-width: 680px) {
  .route-header { flex-direction: column; align-items: stretch; gap: 0; }

  .rh-banda {
    order: 1; max-width: 100%; text-align: center; margin-bottom: 10px;
  }
  .rh-banda-cinta {
    font-size: 21px; padding: 8px 20px 7px; transform: rotate(-1.6deg);
    letter-spacing: .3px;
  }

  .rh-centro {
    order: 2; text-align: center; margin: 0 auto 12px; max-width: 100%;
  }
  .rh-centro .route-header-title { margin: 0 auto; justify-content: center; padding: 3px 6px; }
  .rh-centro .route-header-sub { text-align: center; }
  .rht-name { font-size: 14.5px; padding: 5px 13px 4px; transform: rotate(1.2deg); }

  .rh-acciones { order: 3; width: 100%; justify-content: space-between; gap: 5px; }
  .rh-acciones .hm-item, .rh-acciones .avatar-btn { padding: 8px 4px; }
  .rh-acciones .hm-label { font-size: 9.5px; }
}
@media (max-width: 380px) {
  .rh-banda-cinta { font-size: 18px; padding: 7px 16px 6px; }
  .rht-name { font-size: 13px; padding: 4px 11px 3px; }
  .rh-acciones .hm-label { font-size: 9px; }
}

/* ===== v142: agenda de contactos en la vista del día ===== */
.cto-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 0; border-bottom: .5px solid var(--border-soft);
}
.cto-item:last-child { border-bottom: none; }
.cto-datos { min-width: 0; flex: 1; }
.cto-nombre {
  font-size: 13px; font-weight: 500; color: var(--text-primary);
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
}
.cto-tipo {
  font-size: 9px; text-transform: uppercase; letter-spacing: .8px;
  color: var(--accent); background: rgba(200,199,27,.12);
  border-radius: 5px; padding: 2px 6px;
}
.cto-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.cto-acc { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.cto-acc a, .cto-acc button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--bg-dark); border: .5px solid var(--border);
  color: var(--text-secondary); cursor: pointer; text-decoration: none;
  transition: all .15s ease;
}
.cto-acc a:hover, .cto-acc button:hover { color: var(--hover); border-color: var(--hover-brd); }

/* ===== v145: el menú anclado ya no salta al abrirse ===== */
/* Antes usaba la animación del menú de giras, que lo desplaza a la mitad
   porque ese va centrado. Este va anclado al botón: necesita la suya. */
.menu-flotante { animation: menuAnclado .16s ease-out; transform-origin: top right; }
@keyframes menuAnclado {
  from { opacity: 0; transform: scale(.96) translateY(-4px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* En pantalla chica el menú se ajusta al ancho disponible */
@media (max-width: 480px) {
  .menu-flotante { width: calc(100vw - 24px); right: 12px !important; left: auto !important; }
}

/* ===== v146: cinta de la banda más grande en pantalla grande ===== */
@media (min-width: 681px) {
  .rh-banda { max-width: 34%; }
  .rh-banda-cinta { font-size: 21px; padding: 8px 19px 7px; }
}
@media (min-width: 1100px) {
  .rh-banda-cinta { font-size: 25px; padding: 9px 22px 8px; }
}
@media (min-width: 1500px) {
  .rh-banda-cinta { font-size: 28px; padding: 10px 25px 9px; }
}

/* ============================================================
   BOTÓN "CONTINUAR CON GOOGLE" (v153)
   Google no permite cambiarle el estilo a su botón oficial, y el blanco
   desentonaba con el tema oscuro. Solución: se dibuja un botón propio con
   el estilo de la app y el oficial queda invisible justo encima, ocupando
   el mismo espacio. El clic lo recibe el de Google (como ellos exigen),
   pero la persona ve el nuestro.
   ============================================================ */
.gbtn { position: relative; width: 100%; }

.gbtn-falso {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 46px; padding: 12px 16px;
  border-radius: 999px;
  background: var(--glass);
  border: 0.5px solid var(--glass-brd);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  color: var(--text-primary);
  font-family: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}
.gbtn-falso:hover { background: rgba(255,255,255,.06); border-color: var(--accent); }
.gbtn-falso svg { flex: 0 0 18px; }

/* El oficial: encima, transparente, y recibe los clics */
.gbtn-real {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; overflow: hidden;
}

/* ============================================================
   PANEL DE PLATAFORMA EN PANTALLA CHICA (v172)
   Las tablas del panel tienen 7 columnas. En un celular eso obliga a
   arrastrar de lado y el texto queda cortado. Bajo 760 px cada fila se
   convierte en una ficha: el nombre arriba y cada dato con su etiqueta.
   ============================================================ */
.panel-plataforma { max-width: 1020px; margin: 0 auto; padding: 22px 16px 60px; }
.metricas-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }

@media (max-width: 760px) {
  .panel-plataforma { padding: 16px 12px 70px; }

  /* Se apaga el desplazamiento lateral: ya no hay nada que arrastrar */
  .table-wrap:has(.tabla-panel) { overflow-x: visible; }
  .tabla-panel { min-width: 0 !important; display: block; font-size: 13px; }
  .tabla-panel thead { display: none; }
  .tabla-panel tbody, .tabla-panel tr, .tabla-panel td { display: block; width: 100%; }

  .tabla-panel tr {
    background: rgba(255,255,255,0.02);
    border: 0.5px solid var(--border);
    border-radius: 13px;
    padding: 6px 14px 10px;
    margin: 0 0 10px;
  }
  .tabla-panel tr:hover td { background: none; }

  .tabla-panel td {
    display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
    padding: 8px 0; border-bottom: 0.5px solid var(--border-soft);
    text-align: left !important; white-space: normal !important;
  }
  .tabla-panel td:last-child { border-bottom: none; }

  /* La etiqueta de la columna, a la izquierda de cada dato */
  .tabla-panel td::before {
    content: attr(data-t);
    flex: 0 0 40%;
    font-size: 10px; letter-spacing: 0.8px; text-transform: uppercase;
    color: var(--text-muted); font-weight: 500;
  }
  .tabla-panel td:not([data-t])::before { content: none; }

  /* El nombre va arriba, grande y sin etiqueta: es el título de la ficha */
  .tabla-panel td.td-titulo {
    display: block; padding: 6px 0 10px; font-size: 15px;
    border-bottom: 0.5px solid var(--border);
  }
  .tabla-panel td.td-titulo::before { content: none; }

  /* Los botones de acción, en su propia fila y con espacio para el dedo */
  .tabla-panel td.td-acciones { display: block; padding-top: 12px; }
  .tabla-panel td.td-acciones::before {
    display: block; margin-bottom: 8px;
  }
  .tabla-panel td.td-acciones .btn-sm {
    min-height: 36px; padding: 7px 12px; margin: 0 6px 6px 0;
  }

  /* Métricas: una columna */
  .metricas-cols { grid-template-columns: 1fr; gap: 22px; }

  /* Cabecera del panel más compacta */
  .panel-plataforma .stat-chip { flex: 1 1 44%; }
}

/* Navegadores sin :has() — se deja el desplazamiento, pero sin ancho mínimo */
@media (max-width: 760px) {
  .tabla-panel { width: 100%; }
}



/* ============================================================
   MODO DE LA GIRA (v183)
   Dos botones chicos bajo el contador de fechas, en la cabecera.
   El amarillo es el modo actual; el oscuro es al que puedes cambiar.
   ============================================================ */
.modo-caja { margin-top: 5px; }

.modo-botones {
  display: inline-flex; gap: 3px;
  background: var(--bg-dark); border: 0.5px solid var(--border);
  border-radius: 9px; padding: 3px;
}
.modo-btn {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  min-height: 24px; padding: 3px 10px; border: none; border-radius: 7px;
  background: transparent; color: var(--text-muted);
  font-family: 'Outfit', sans-serif; font-size: 11px; font-weight: 600;
  letter-spacing: 0.2px; cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.modo-btn svg { width: 11px; height: 11px; }
.modo-btn:not(.on):hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }
.modo-btn.on { background: var(--accent); color: #14161A; cursor: default; }
/* Publicar sin conexión: apagado, porque avisar al equipo necesita internet */
.modo-btn-off { opacity: .4; cursor: not-allowed; }
.modo-btn-off:hover { background: none; }

.modo-nota { margin-top: 4px; font-size: 10.5px; color: var(--text-muted); line-height: 1.4; }
.modo-nota strong {
  color: var(--accent); font-family: 'Outfit', sans-serif;
  font-size: 9.5px; letter-spacing: 1px; text-transform: uppercase;
}

/* ============================================================
   AJUSTES DE CABECERA Y BOTONES DE MODO (v184)
   La cabecera quedaba pegada al borde de arriba, y los botones de
   modo se pasaron de chicos al achicarlos.
   ============================================================ */
.route-header { padding-top: 22px; }
@media (max-width: 480px) { .route-header { padding-top: 16px; } }

.modo-caja { margin-top: 7px; }
.modo-botones { gap: 4px; padding: 3px; border-radius: 11px; }
.modo-btn {
  min-height: 31px; padding: 5px 14px; border-radius: 8px;
  font-size: 12.5px; gap: 6px;
}
.modo-btn svg { width: 13px; height: 13px; }
.modo-nota { margin-top: 6px; font-size: 11px; }

/* Margen superior definitivo de la cabecera (v185) */
.route-header { padding-top: 44px !important; }
@media (max-width: 480px) { .route-header { padding-top: 30px !important; } }

/* ============================================================
   VISOR DE ARCHIVOS (v193)
   Mismo formato que la pantalla de etiquetas: fondo claro, encabezado
   con el rótulo de la marca y los botones grandes arriba.
   ============================================================ */
#visor-archivo {
  position: fixed; inset: 0; z-index: 5000; display: none;
  flex-direction: column; background: #fff; color: #111;
  padding: calc(22px + env(safe-area-inset-top, 0px)) 22px 22px;
  overflow-y: auto;
}
#visor-archivo.abierto { display: flex; }
#visor-archivo .imp-cab { border-bottom: 2.5px solid #9A990F; margin-bottom: 16px; }

.imp-acciones { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.imp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 12px 22px; border-radius: 12px; border: 1px solid transparent;
  font-family: 'Outfit', sans-serif; font-size: 15px; font-weight: 600;
  cursor: pointer; text-decoration: none; transition: filter 0.18s ease, transform 0.15s ease;
}
.imp-btn svg { width: 16px; height: 16px; }
.imp-btn:active { transform: scale(0.98); }
.imp-btn.primario { background: #C8C71B; color: #14161A; box-shadow: 0 4px 18px rgba(200,199,27,0.4); }
.imp-btn.claro { background: #FAF9E6; color: #8A8908; border-color: #EFEDC0; }
.imp-btn.oscuro { background: #2B2F38; color: #E8E9EB; }
.imp-btn:hover { filter: brightness(1.05); }

.va-cuerpo {
  flex: 1; min-height: 0; display: flex; align-items: flex-start; justify-content: center;
}
.va-cuerpo img { max-width: 100%; border-radius: 8px; border: 1px solid #e2e2e2; }
.va-cuerpo iframe {
  width: 100%; height: 100%; min-height: 70vh; border: 1px solid #e2e2e2;
  border-radius: 8px; background: #fff;
}
.va-error {
  color: #666; font-size: 14.5px; text-align: center; line-height: 1.7;
  padding: 40px 24px; max-width: 340px; margin: 0 auto;
}

@media (max-width: 560px) {
  #visor-archivo { padding-left: 16px; padding-right: 16px; }
  .imp-btn { flex: 1 1 auto; min-width: 0; padding: 12px 16px; font-size: 14px; }
  .imp-btn.oscuro { flex: 0 0 auto; }
}

/* Al imprimir queda solo el archivo */
@media print {
  body > *:not(#visor-archivo) { display: none !important; }
  #visor-archivo.abierto { position: static; padding: 0; }
  #visor-archivo .no-print { display: none !important; }
  .va-cuerpo img { max-width: 100%; border: none; }
}

/* Documento dentro de la pantalla de impresión (v197) */
.imp-doc { color: #26251F; }
.imp-doc h1 { font-size: 26px; margin: 0 0 6px; font-weight: 600; }
@media print {
  .imp-acciones { display: none !important; }
  body.modo-impresion #zona-impresion { padding: 0; }
}

/* ============================================================
   CAMPANA DE AVISOS APAGADA (v201)
   Un punto amarillo cuando los avisos no están activados en este
   dispositivo. Sin esto no hay forma de darse cuenta: la tarjeta que
   invita a activarlos sale una sola vez y después desaparece para siempre.
   ============================================================ */
.hm-item.hm-off { position: relative; }
.hm-item.hm-off::after {
  content: ''; position: absolute; top: 5px; right: 5px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--bg-dark);
  animation: latidoAviso 2.4s ease-in-out infinite;
}
@keyframes latidoAviso {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.75; }
}
@media (prefers-reduced-motion: reduce) { .hm-item.hm-off::after { animation: none; } }

/* ============================================================
   CAMPOS DE FECHA Y HORA (v209)
   Salían más bajos que el resto porque el navegador les pone su propio
   alto interno, y el ícono nativo del calendario es oscuro: sobre fondo
   negro no se veía. Se igualan al resto y se les pone su ícono a la
   izquierda, para que se entienda de un vistazo qué se espera.
   ============================================================ */
.form-group input[type="date"],
.form-group input[type="time"],
.form-group input[type="datetime-local"] {
  -webkit-appearance: none; appearance: none;
  min-height: 46px;                 /* mismo alto que los campos de texto */
  padding: 11px 14px 11px 42px;     /* espacio para el ícono */
  background-repeat: no-repeat;
  background-position: 14px center;
  background-size: 17px 17px;
}

/* Calendario */
.form-group input[type="date"],
.form-group input[type="datetime-local"] {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C8C71B' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='5' width='18' height='16' rx='2'/><path d='M16 3v4M8 3v4M3 11h18'/></svg>");
}

/* Reloj */
.form-group input[type="time"] {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C8C71B' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='9'/><path d='M12 7v5l3 2'/></svg>");
}

/* El botón nativo que abre el selector: se aclara para que se vea en oscuro */
.form-group input[type="date"]::-webkit-calendar-picker-indicator,
.form-group input[type="time"]::-webkit-calendar-picker-indicator,
.form-group input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  filter: invert(1) opacity(0.45);
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.form-group input[type="date"]:hover::-webkit-calendar-picker-indicator,
.form-group input[type="time"]:hover::-webkit-calendar-picker-indicator {
  filter: invert(1) opacity(0.9);
}

/* En iPhone el campo se alinea a la izquierda y no se estira solo */
.form-group input[type="date"]::-webkit-date-and-time-value,
.form-group input[type="time"]::-webkit-date-and-time-value {
  text-align: left;
}

/* ============================================================
   CAMPOS DE FECHA Y HORA (v209)
   Los inputs nativos de fecha y hora se dibujan más bajos que los de texto
   porque el navegador les pone su propio alto interno. Se igualan a mano y
   se les agrega el ícono a la izquierda para que se reconozcan de un vistazo.
   ============================================================ */
.form-group input[type="date"],
.form-group input[type="time"],
.form-group input[type="datetime-local"],
input[type="date"], input[type="time"], input[type="datetime-local"] {
  min-height: 44px;                      /* mismo alto que los de texto */
  padding: 11px 14px 11px 42px;          /* espacio para el ícono */
  background-repeat: no-repeat;
  background-position: 14px center;
  background-size: 17px 17px;
  -webkit-appearance: none;
  appearance: none;
}

/* Calendario, dibujado en el amarillo de la marca */
.form-group input[type="date"],
.form-group input[type="datetime-local"],
input[type="date"], input[type="datetime-local"] {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C8C71B' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='5' width='18' height='16' rx='2'/><path d='M16 3v4M8 3v4M3 11h18'/></svg>");
}

/* Reloj para las horas */
.form-group input[type="time"], input[type="time"] {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C8C71B' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='9'/><path d='M12 7v5l3 2'/></svg>");
}

/* El botón nativo del navegador se mantiene a la derecha, discreto */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  opacity: 0.45;
  filter: invert(1);
  margin-left: 6px;
}
input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="time"]::-webkit-calendar-picker-indicator:hover,
input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover { opacity: 0.9; }

/* En iPhone el texto queda arriba si no se centra a mano */
input[type="date"]::-webkit-date-and-time-value,
input[type="time"]::-webkit-date-and-time-value,
input[type="datetime-local"]::-webkit-date-and-time-value { text-align: left; }
