html {
  font-size: 14px;
}

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

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

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

body {
  margin-bottom: 60px;
  background: #f4f6f8;
}

/* IceGourmet brand palette, taken from the company's own logo/vale styling */
:root {
  --ig-cyan: #00B7E8;
  --ig-navy: #0D2F4C;
  --ig-red: #930000;
}

.navbar.bg-dark {
  background-color: var(--ig-navy) !important;
}

.navbar-logo {
  width: 36px;
  height: 36px;
}

.btn-primary {
  background-color: var(--ig-navy);
  border-color: var(--ig-navy);
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
  background-color: #0a2438 !important;
  border-color: #0a2438 !important;
}

.btn-outline-primary {
  color: var(--ig-navy);
  border-color: var(--ig-navy);
}
.btn-outline-primary:hover {
  background-color: var(--ig-navy);
  border-color: var(--ig-navy);
}

/* Narrow, centered content column for form-heavy pages (vale capture, edit forms). */
.content-narrow {
  max-width: 900px;
  margin: 0 auto;
}

/* Section cards used to group related fields instead of one long flat form. */
.section-card {
  background: #fff;
  border: 1px solid #e3e7eb;
  border-radius: .5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
}

.section-card__title {
  font-size: .95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--ig-navy);
  border-bottom: 2px solid var(--ig-cyan);
  padding-bottom: .5rem;
  margin-bottom: 1rem;
}

.folio-badge {
  display: inline-flex;
  flex-direction: column;
  background: #eaf9fd;
  border: 1px solid #bfeaf5;
  border-radius: .4rem;
  padding: .4rem .9rem;
  line-height: 1.15;
}
.folio-badge .label {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #4a6274;
}
.folio-badge .value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ig-navy);
}

.color-swatch {
  display: inline-block;
  width: .8rem;
  height: .8rem;
  border-radius: .2rem;
  border: 1px solid rgba(0, 0, 0, .2);
  margin-left: .5rem;
  vertical-align: middle;
}

/* Dashboard */
.kpi-card {
  background: #fff;
  border: 1px solid #e3e7eb;
  border-left: 4px solid var(--ig-cyan);
  border-radius: .5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
  padding: 1rem 1.25rem;
  height: 100%;
}
.kpi-card .kpi-label {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #6b7c8a;
  margin-bottom: .25rem;
}
.kpi-card .kpi-sub {
  font-size: .78rem;
  color: #6b7c8a;
  margin-top: .2rem;
}
.kpi-card--alerta {
  border-left-color: #d9534f;
}
.kpi-card .kpi-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--ig-navy);
  line-height: 1.1;
}

.quick-action {
  display: flex;
  align-items: center;
  gap: .75rem;
  background: var(--ig-navy);
  color: #fff;
  border-radius: .5rem;
  padding: 1rem 1.25rem;
  text-decoration: none;
  transition: background-color .15s ease;
  height: 100%;
}
.quick-action:hover {
  background: #0a2438;
  color: #fff;
}
.quick-action .quick-action-icon {
  font-size: 1.5rem;
  line-height: 1;
}
.quick-action .quick-action-title {
  font-weight: 600;
}
.quick-action .quick-action-sub {
  font-size: .8rem;
  color: #b9d3e0;
}

/* Indicador de conexion planta <-> nube (barra superior) */
.estado-conexion {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .2rem .7rem;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 999px;
  font-size: .8rem;
  color: #e9ecef;
  white-space: nowrap;
  cursor: default;
}
.estado-conexion[hidden] { display: none; }
/* La barra no hace salto de linea: en pantallas medianas se acorta el texto y en las chicas
   queda solo el punto de color (el texto completo sigue en el tooltip). */
@media (max-width: 1499.98px) { .estado-conexion .largo { display: none; } }
@media (max-width: 1299.98px) {
  .estado-conexion .texto { display: none; }
  .estado-conexion { padding: .35rem; }
}
.estado-conexion .punto {
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  background: #6c757d;
  flex: none;
}
.estado-conexion.ok .punto { background: #3ddc84; animation: estado-conexion-latido 2s ease-out infinite; }
.estado-conexion.mal { border-color: #ff6b78; color: #ffc9ce; }
.estado-conexion.mal .punto { background: #ff4d5e; }
@keyframes estado-conexion-latido {
  0% { box-shadow: 0 0 0 0 rgba(61, 220, 132, .6); }
  70%, 100% { box-shadow: 0 0 0 .45rem rgba(61, 220, 132, 0); }
}

/* Panel de administración (/Admin) */
.admin-dato {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  padding: .25rem 0;
}
.admin-dato span {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #6b7c8a;
}
.admin-dato b {
  font-size: 1.1rem;
  color: var(--ig-navy);
}
.admin-dato small {
  font-size: .78rem;
  color: #6b7c8a;
}
.admin-barra {
  height: 4px;
  border-radius: 2px;
  background: #eef2f5;
  margin-top: .3rem;
}
.admin-barra i {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: var(--ig-cyan);
}
