html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

html {
  position: relative;
  min-height: 100%;
}

/* ===== Account (login / register) ===== */
.account-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  position: relative;
  overflow: hidden;
  /* Foto de logística SpaceTracker como fondo, siempre cubriendo y centrada. */
  background: #0a1626 url('../img/login-bg.jpg') center / cover no-repeat;
}

/* Capa oscura semitransparente (degradado azul-noche ~55-78%) sobre la foto:
   garantiza que el título y los textos blancos sigan legibles encima. */
.account-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
      rgba(4, 12, 26, 0.78) 0%,
      rgba(8, 24, 48, 0.58) 50%,
      rgba(4, 12, 26, 0.8) 100%);
}

/* Brillos azules de acento sobre el fondo (estética "glass" de referencia,
   con los azules SpaceTracker). */
.account-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(55% 40% at 50% 40%, rgba(28, 140, 240, .30), transparent 65%),
    radial-gradient(40% 28% at 12% 88%, rgba(53, 192, 224, .16), transparent 70%),
    radial-gradient(35% 25% at 88% 12%, rgba(28, 140, 240, .14), transparent 70%);
}

/* Tarjeta de VIDRIO oscuro (glassmorphism): translúcida, bordes luminosos,
   esquinas muy redondeadas, texto claro. */
.account-card {
  width: 100%;
  max-width: 400px;
  background: rgba(10, 24, 44, .48);
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .18);
  padding: 2.25rem 2rem;
  position: relative;
  z-index: 1;
  color: #eaf2fb;
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
}

/* Zorro Spacefox (blanco, PNG transparente) como marca de la tarjeta. */
/* Logo completo AkiTrack (zorro + wordmark) en el login: nítido, sin glow. */
.account-logo {
  display: block;
  margin: 0 auto 1.6rem;
  width: 100%;
  max-width: 280px;
  height: auto;
}

/* Números de los puntos de control en el editor de rutas. */
.rt-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #fff;
  color: #fff;
  font-weight: 700;
  font-size: .8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .4);
}

.account-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: .25rem;
}

.account-logo-img { width: 100%; max-width: 240px; height: auto; }

.account-product {
  text-align: center;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: #eaf2fb;
  text-shadow: 0 0 18px rgba(28, 140, 240, .6);
  margin-bottom: 1.5rem;
}

/* Firma "BY Spacefox" al pie de la tarjeta de login: somos una marca de Spacefox. */
.account-by {
  text-align: center;
  margin-top: 1.5rem;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(234, 242, 251, .55);
}

.account-heading {
  font-size: 1.45rem;
  font-weight: 500;
  margin: 0 0 1.25rem;
  color: #ffffff;
  text-align: center;
}

.account-field { margin-bottom: 1rem; display: flex; flex-direction: column; }
.account-field label { font-size: .85rem; color: rgba(234, 242, 251, .85); margin-bottom: .3rem; }

/* Campos de VIDRIO: fondo translúcido, borde luminoso, texto blanco. */
.account-input {
  padding: .7rem .9rem;
  border: 1px solid rgba(255, 255, 255, .38);
  border-radius: 12px;
  font-size: 1rem;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  background: rgba(255, 255, 255, .1);
  color: #ffffff;
}
.account-input::placeholder { color: rgba(255, 255, 255, .45); }
.account-input:focus { border-color: #35c0e0; box-shadow: 0 0 0 3px rgba(53, 192, 224, .22); }
/* El autocompletado de Chrome pinta fondo amarillo/blanco: forzar el vidrio oscuro. */
.account-input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px rgba(16, 34, 58, .92) inset;
  -webkit-text-fill-color: #fff;
  caret-color: #fff;
}

.account-check {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .9rem;
  color: rgba(234, 242, 251, .8);
  margin-bottom: 1rem;
}

/* Enlace "¿Olvidaste tu contraseña?" */
.account-link {
  display: block;
  margin: -4px 0 14px;
  font-size: .85rem;
  color: #6fc1ff;
  text-decoration: none;
}
.account-link:hover { text-decoration: underline; }

.account-btn {
  width: 100%;
  background: linear-gradient(180deg, #35b1e8 0%, #1c8cf0 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: 12px;
  padding: .8rem;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  display: inline-block;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(28, 140, 240, .38);
  transition: filter .15s, transform .05s;
}
.account-btn:hover { filter: brightness(1.08); }
.account-btn:active { transform: translateY(1px); }

.account-foot {
  margin-top: 1.35rem;
  text-align: center;
  font-size: .88rem;
  color: rgba(234, 242, 251, .65);
}
.account-foot a { color: #6fc1ff; text-decoration: none; }

.account-note {
  font-size: .9rem;
  color: rgba(234, 242, 251, .8);
  margin: 0 0 1rem;
  text-align: center;
}

.account-error {
  background: rgba(183, 28, 28, .3);
  color: #ffb4ab;
  border: 1px solid rgba(255, 120, 110, .45);
  border-radius: 12px;
  padding: .6rem .75rem;
  margin-bottom: 1rem;
  font-size: .9rem;
}

/* Confirmación (recuperar contraseña). */
.account-ok {
  background: rgba(46, 125, 50, .3);
  color: #b8e5bb;
  border: 1px solid rgba(129, 199, 132, .45);
  border-radius: 12px;
  padding: .7rem .85rem;
  margin-bottom: 1rem;
  font-size: .92rem;
}

.validation-message { color: #ffb4ab; font-size: .8rem; margin-top: .2rem; }

/* ===== Dashboard (home) ===== */
.dash-hero {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(120deg, #0b3d6b 0%, #1c8cf0 60%, #35c0e0 100%);
  padding: 1.5rem 1.75rem;
}
.dash-hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 26px 26px;
  pointer-events: none;
}
.dash-hero h1 { font-size: 1.9rem; font-weight: 800; margin: 0; letter-spacing: .3px; }
.dash-hero .sub { opacity: .85; font-size: .95rem; }
.dash-clock { font-variant-numeric: tabular-nums; font-weight: 700; letter-spacing: 1px; }

/* Radar pulse for the "en línea ahora" badge */
.dash-radar {
  position: relative;
  width: 116px; height: 116px;
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}
.dash-radar .core {
  width: 88px; height: 88px; border-radius: 50%;
  background: rgba(255,255,255,.14);
  border: 2px solid rgba(255,255,255,.55);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  backdrop-filter: blur(2px);
}
.dash-radar .ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.5);
  animation: dashPulse 2.4s ease-out infinite;
}
.dash-radar .ring:nth-child(2) { animation-delay: .8s; }
.dash-radar .ring:nth-child(3) { animation-delay: 1.6s; }
@keyframes dashPulse {
  0% { transform: scale(.55); opacity: .9; }
  100% { transform: scale(1.15); opacity: 0; }
}

/* Clickable KPI cards */
.kpi-card {
  border-radius: 14px;
  transition: transform .15s ease, box-shadow .15s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.kpi-card:hover { transform: translateY(-4px); box-shadow: 0 10px 26px rgba(0,0,0,.16); }
.kpi-card .kpi-num { font-size: 2.4rem; font-weight: 800; line-height: 1.05; font-variant-numeric: tabular-nums; }
.kpi-card .kpi-ico { position: absolute; right: -6px; bottom: -10px; opacity: .12; font-size: 5.2rem; }

/* Fleet-health radial gauge (pure CSS conic-gradient) */
.dash-gauge {
  --val: 0;
  --col: #1c8cf0;
  width: 168px; height: 168px; border-radius: 50%;
  background: conic-gradient(var(--col) calc(var(--val) * 1%), var(--mud-palette-lines-default, #e0e0e0) 0);
  display: flex; align-items: center; justify-content: center;
  transition: background .8s ease;
  margin: 0 auto;
}
.dash-gauge .hole {
  width: 128px; height: 128px; border-radius: 50%;
  background: var(--mud-palette-surface, #fff);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.dash-gauge .g-val { font-size: 2rem; font-weight: 800; line-height: 1; }
.dash-gauge .g-lbl { font-size: .72rem; opacity: .7; }

/* Animated horizontal bars (top km / speeds) */
.dash-bar-track {
  height: 10px; border-radius: 6px;
  background: var(--mud-palette-action-default-hover, #eef2f6);
  overflow: hidden;
}
.dash-bar-fill {
  height: 100%; border-radius: 6px; width: 0;
  background: linear-gradient(90deg, #1c8cf0, #35c0e0);
  animation: dashGrow 1s ease forwards;
}
@keyframes dashGrow { from { width: 0; } }

.pointer { cursor: pointer; }

/* ---- Responsive (cualquier dispositivo) ---- */
/* Nunca scroll horizontal de página: lo ancho (tablas) scrollea por sí solo. */
html, body { overflow-x: hidden; }

/* Tablas anchas: scroll horizontal propio en pantallas chicas en vez de
   desbordar la página. */
.mud-table-container { overflow-x: auto; }

/* Los encabezados de página (título + botones) envuelven en teléfono. */
@media (max-width: 600px) {
    .mud-typography-h4 { font-size: 1.35rem; }
    .page-head { flex-wrap: wrap; gap: 8px; }
}

/* ---- Banner sutil de ciudad en la barra superior ---- */
/* Silueta blanca translúcida repetida al pie de la barra: se funde con el
   color de la EMPRESA (marca blanca) sin taparlo — a más oscuro el color,
   más se insinúa la ciudad. */
.mud-appbar {
    /* PNG derivado de bannerciudad.png (silueta blanca translúcida horneada
       en el alfa); el anterior skyline.svg queda como respaldo sin uso. */
    background-image: url('../img/skyline.png');
    background-repeat: repeat-x;
    background-position: bottom center;
    background-size: auto 100%;
}
