/* ========== RESET BÁSICO ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
  }
  
  /* ========== BODY ========== */
  body {
    background: #f4f7fa;
    color: #333;
    font-size: 16px;
    line-height: 1.5;
    padding: 20px;
  }
  
  /* ========== CONTENEDOR ========== */
  .container {
    max-width: 1100px;
    margin: auto;
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  }
  
  /* ========== TÍTULOS ========== */
  h1, h2, h3 {
    margin-bottom: 15px;
    color: #004080;
  }
  
  /* ========== BOTONES ========== */
  .btn {
    display: inline-block;
    padding: 10px 18px;
    background: #007bff;
    color: #fff;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
  }
  .btn:hover {
    background: #0056b3;
  }
  
  /* ========== INPUTS ========== */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="search"],
  select, textarea {
    /*width: 100%;*/
    padding: 10px;
    margin: 8px 0 15px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
  }
  input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #007bff;
  }
  
  /* ========== TABLAS ========== */
  table.tabla {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
  }
  table.tabla th,
  table.tabla td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
  }
  table.tabla th {
    background: #004080;
    color: #fff;
    text-transform: uppercase;
    font-size: 14px;
  }
  table.tabla tr:nth-child(even) {
    background: #f9f9f9;
  }
  table.tabla tr:hover {
    background: #e6f0ff;
  }
  
  /* ========== TOPBAR ========== */
  .topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
  }
/* ===== SIDEBAR + LAYOUT ===== */
.layout {
  /*display: flex;*/
  min-height: 100vh;
  background: #f4f7fa;
}

/* Sidebar fijo */
.sidebar {
  width: 240px;
  background: linear-gradient(180deg,#0b3d91 0%,#092a66 100%);
  color: #fff;
  padding: 22px;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  transition: left .25s ease, transform .25s ease;
  z-index: 1000;
}
.sidebar h2 {
  font-size: 20px;
  margin-bottom: 8px;
  letter-spacing: .3px;
}
.sidebar .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.sidebar .logo img {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 6px;
}

/* Menú */
.sidebar nav ul {
  list-style: none;
  padding: 0;
  margin: 14px 0 0 0;
}
.sidebar nav ul li {
  margin: 6px 0;
}
.sidebar nav ul li a {
  display: block;
  padding: 10px 12px;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
}
.sidebar nav ul li a:hover,
.sidebar nav ul li a.active {
  background: rgba(255,255,255,0.08);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

/* Footer del sidebar (logout) */
.sidebar .side-footer {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 14px;
}

/* Area de contenido (a la derecha del sidebar) */
.contenido {
  margin-left: 240px;
  padding: 28px;
  flex: 1;
}

/* Si usas .container, que se adecue */
.contenido .container {
  background: transparent;
  box-shadow: none;
  padding: 0;
}

/* Toggle button (solo visible en pantallas pequeñas) */
.toggle-sidebar-btn {
  display: none;
}

/* Responsivo: colapsar sidebar en pantallas pequeñas */
@media (max-width: 900px) {
  .sidebar {
    left: -260px; /* oculto por defecto */
    box-shadow: 2px 0 12px rgba(0,0,0,0.12);
  }
  .sidebar.open {
    left: 0;
  }
  .contenido {
    margin-left: 0;
    padding: 18px;
  }
  .toggle-sidebar-btn {
    display: inline-block;
    position: fixed;
    left: 12px;
    top: 12px;
    z-index: 1100;
    background: #fff;
    color: #092a66;
    border: none;
    padding: 8px 10px;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    font-size: 18px;
    cursor: pointer;
  }
}

/* ajustes estéticos extra para coherencia con .btn */
.btn {
  display: inline-block;
  padding: 8px 14px;
  background: #007bff;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
}
/* Contenedor con scroll si la tabla es muy grande */
.table-container {
  width: 80%;
  overflow-x: auto;
  margin-top: 20px;
  margin-left: 200px;
}

/* Estilo de tabla moderno */
.styled-table {
  width: 80%;
  border-collapse: collapse;
  font-size: 15px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  border-radius: 8px;
  overflow: hidden;
  margin-left: 200px;
}

/* Cabecera */
.styled-table thead tr {
  background-color: #2c3e50;
  color: #ffffff;
  text-align: left;
  font-weight: bold;
}

/* Celdas */
.styled-table th,
.styled-table td {
  padding: 12px 15px;
  border-bottom: 1px solid #ddd;
}

/* Filas alternadas */
.styled-table tbody tr:nth-child(even) {
  background-color: #f3f3f3;
}

/* Hover */
.styled-table tbody tr:hover {
  background-color: #f1f1f1;
}

/* Badges */
.badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: bold;
  color: #fff;
  display: inline-block;
}

.badge.success {
  background-color: #27ae60;
}

.badge.danger {
  background-color: #e74c3c;
}

.badge.warning {
  background-color: #f39c12;
  color: #000;
}
