/* ================================
   1. Reset y fuentes
================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", "Segoe UI", Tahoma, sans-serif;
}

body {
  background: #f9f9f9;
  color: #333;
}

/* ================================
   2. Header
================================ */
header {
  background: #ff6200;
  color: #fff;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

header .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: bold;
}

.menu-toggle {
  display: none;
  font-size: 22px;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
}

/* ================================
   3. Sidebar
================================ */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  height: 100%;
  width: 230px;
  background: #fff;
  border-right: 1px solid #eee;
  padding-top: 60px;
  transition: transform 0.3s ease;
  z-index: 999;
}

.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  color: #555;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}

.sidebar nav a:hover {
  background: #ffe6d5;
  color: #ff6200;
}

.user-box {
  padding: 20px;
  border-bottom: 1px solid #eee;
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

/* ================================
   4. Contenido principal
================================ */
.content {
  margin-left: 230px;
  padding: 80px 20px 20px; /* espacio para el header */
  min-height: 100vh;
}

/* ================================
   5. KPIs (tarjetas dashboard)
================================ */
.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(250px,1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.kpi {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: transform 0.2s;
}

.kpi:hover {
  transform: translateY(-3px);
}

.kpi h3 {
  font-size: 16px;
  margin-bottom: 10px;
}

.kpi .value {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 5px;
}

.kpi .muted {
  font-size: 13px;
  color: #777;
}

.kpi.orange {
  border-left: 5px solid #ff6a00;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ================================
   6. Tiles (bloques)
================================ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(250px,1fr));
  gap: 20px;
}
.tile {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.tile h4 {
  margin-bottom: 10px;
}
.tile .muted {
  font-size: 13px;
  color: #777;
}

/* ================================
   7. Botones generales
================================ */
.btn-orange {
  display: inline-block;
  background: #ff6200;
  color: #fff;
  padding: 10px 16px;
  margin-top: 10px;
  border-radius: 6px;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.2s;
}
.btn-orange:hover {
  background: #e55a00;
}

/* ================================
   8. Login / Registro
================================ */
.login-container {
  max-width: 400px;
  margin: 100px auto;
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.login-container h2 {
  text-align: center;
  margin-bottom: 25px;
  font-size: 22px;
  color: #222;
}

.login-container input {
  width: 100%;
  padding: 14px;
  margin-bottom: 18px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 15px;
}

.login-container input:focus {
  border-color: #ff6200;
  outline: none;
  box-shadow: 0 0 4px rgba(255,98,0,0.4);
}

.login-container button {
  width: 100%;
}

/* ================================
   9. Responsive (móvil)
================================ */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .content {
    margin-left: 0;
    padding-top: 80px;
  }

  .menu-toggle {
    display: block;
  }
}

/* Contenedor del formulario */
.form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

/* Inputs y selects */
.form input,
.form select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  transition: border 0.2s;
}

.form input:focus,
.form select:focus {
  border-color: #ff5722;
}

/* Botón */
.btn-orange {
  background: #ff5722;
  color: #fff;
  padding: 12px;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-orange:hover {
  background: #e64a19;
}

/* Alertas */
.alert {
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 15px;
  font-size: 14px;
}

.alert.error {
  background: #ffe5e5;
  color: #c62828;
  border: 1px solid #f5c2c2;
}

.alert.success {
  background: #e6f4ea;
  color: #2e7d32;
  border: 1px solid #b7dfb9;
}

/* Títulos de tarjetas */
.tile h3 {
  margin-bottom: 15px;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Responsivo: móvil → stack */
@media(max-width: 768px){
  .grid {
    grid-template-columns: 1fr !important;
  }
}


.machines-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.machine-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 15px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.05);
  transition: .2s;
}

.machine-card:hover {
  transform: translateY(-3px);
}

.machine-img {
  width: 100%;
  height: 150px;
  object-fit: contain;
  margin-bottom: 10px;
}

/* Tarjeta de Bienvenida */
.kpi.orange {
  background: linear-gradient(135deg, #ff7a18, #ff4800);
  color: #fff;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(255, 72, 0, 0.35);
  text-align: center;
  margin-bottom: 25px;
  animation: fadeSlide 0.8s ease-in-out;
  position: relative;
  overflow: hidden;
}

/* Icono 👋 animado */
.kpi.orange h3 {
  font-size: 1.8rem;
  margin-bottom: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.kpi.orange h3::before {
  content: "👋";
  display: inline-block;
  animation: wave 2s infinite ease-in-out;
  font-size: 2rem;
}

/* Animación entrada */
@keyframes fadeSlide {
  0% { 
    opacity: 0; 
    transform: translateY(-20px); 
  }
  100% { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

/* Animación wave del emoji */
@keyframes wave {
  0%, 100% { transform: rotate(0deg); }
  20% { transform: rotate(20deg); }
  40% { transform: rotate(-10deg); }
  60% { transform: rotate(15deg); }
  80% { transform: rotate(-5deg); }
}

/* Modo oscuro automático */
@media (prefers-color-scheme: dark) {
  .kpi.orange {
    background: linear-gradient(135deg, #ff9f43, #ff6b00);
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
  }
}

.kpi.orange {
  text-align: center;
}

.kpi.orange h3 {
  font-size: 22px;
  margin-bottom: 10px;
}

.kpi.orange .value {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 5px;
}

.kpi.orange .muted {
  font-size: 14px;
  color: #fff;
  opacity: 0.9;
}

.kpi.orange {
  background: linear-gradient(135deg, #ff6a00, #ff8c42);
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  text-align: center;
  color: #fff;
}

.kpi.orange h3 {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 8px;
}

.kpi.orange .value {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 5px;
}

.kpi.orange .muted {
  font-size: 14px;
  opacity: 0.9;
}

#carrusel img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 12px;
}


/* 📱 Ajustes responsive para móviles */
@media (max-width: 768px) {

    /* Contenido principal ocupa todo */
    .content {
        margin-left: 0; /* que no quede espacio por sidebar */
        padding: 15px;
    }

    /* Sidebar oculto por defecto en móvil */
    .sidebar {
        position: fixed;
        top: 0;
        left: -240px; /* escondido */
        width: 220px;
        height: 100%;
        background: #fff;
        box-shadow: 2px 0 8px rgba(0,0,0,0.3);
        transition: left 0.3s ease;
        z-index: 1000;
    }
    .sidebar.active {
        left: 0; /* aparece */
    }

    /* Botón hamburguesa */
    .hamburger {
        display: block;
        position: fixed;
        top: 10px;
        left: 10px;
        font-size: 26px;
        background: #FF5722;
        color: white;
        padding: 8px 12px;
        border-radius: 6px;
        cursor: pointer;
        z-index: 1100;
        box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    }

    /* Calendario más chico */
    .calendar-grid {
        gap: 6px;
    }
    .day {
        width: 38px;
        height: 38px;
        font-size: 13px;
    }

    /* Balance box más compacto */
    .balance-box {
        padding: 10px 15px;
        font-size: 14px;
    }
    .balance-box strong {
        font-size: 20px;
    }

    /* Botón check-in ocupa ancho completo */
    #checkinBtn {
        width: 100%;
        padding: 12px;
        font-size: 15px;
    }
}

/* En desktop el botón hamburguesa no se muestra */
.hamburger {
    display: none;
}



}

/* Contenedor centrado */
.content {
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

body {
  background-color: #fff;
  background-image:
    repeating-linear-gradient(
      -30deg,                    /* inclinación diagonal */
      transparent 0 180px,       /* espacio transparente */
      rgba(255,140,0,0.06) 180px 360px /* banda anaranjada clara */
    );
}
 
/* Ticker animado bonito */
.ticker-container {
    width: 100%;
    max-width: 350px;
    height: auto;
    overflow: hidden;
    border-radius: 12px;
    background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
    margin: 20px auto;
    padding: 10px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.ticker-container ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ticker-container li {
    padding: 12px 15px;
    background: #fff;
    margin: 8px 0;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.5s ease;
    opacity: 0.7;
}

.ticker-container li.activo {
    background: #fffae6;
    color: #ff6b6b;
    font-weight: 600;
    opacity: 1;
    transform: scale(1.03);
    box-shadow: 0 6px 15px rgba(255,107,107,0.3);
}
}