/* =========================
   RESET GLOBAL
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* =========================
   VARIABLES
========================= */
:root {
  --color-negro: #1A1A1A;
  --color-blanco: #FFFFFF;
  --color-amarillo: #FFC107;
  --color-fondo: #F5F5F5;

  --color-texto: #333333;
  --color-texto-secundario: #9E9E9E;

  --max-width: 1300px;
}

/* =========================
   BASE
========================= */
body {
  font-family: Arial, sans-serif;
  background-color: var(--color-fondo);
  color: var(--color-texto);
}

/* =========================
   SECCIÓN
========================= */
.section {
  text-align: center;
  max-width: 100%;
  margin: 40px auto;
}

/* TÍTULOS */
.title {
  margin-bottom: 15px;
}

/* =========================
   CONTENEDOR
========================= */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: auto;
  padding: 0 16px;
}

/* =========================
   NAVBAR
========================= */
.navbar {
  background: var(--color-blanco);
  border-bottom: 2px solid #ddd;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
}

/* LOGO */
.logo img {
  height: 50px;
  width: auto;
}

/* =========================
   MENÚ
========================= */
.menu-toggle {
  font-size: 24px;
  cursor: pointer;
}

.navbar-menu {
  display: none;
  flex-direction: column;
  align-items: center;
  border-top: 1px solid #ddd;
  margin-top: 0;
}

.navbar-menu.active {
  display: flex;
}

.navbar-menu a {
  width: 100%;
  padding: 12px;
  text-align: center;
  text-decoration: none;
  color: var(--color-texto-secundario);
  font-weight: 500;
}

.navbar-menu a:hover {
  color: var(--color-negro);
}

.navbar-menu a.active {
  color: var(--color-negro);
  border-bottom: 2px solid var(--color-amarillo);
}

/* =========================
   BOTONES
========================= */
.btn {
  padding: 10px 16px;
  border-radius: 6px;
  border: 1px solid #ccc;
  background: transparent;
  cursor: pointer;
}

.btn:hover {
  filter: brightness(0.9);
}

.btn-primary {
  background: var(--color-amarillo);
  border: none;
  font-weight: bold;
}

/* Logout */
.logout-mobile {
  display: block;
  margin: 20px auto;
}

.logout-desktop {
  display: none;
}

/* =========================
   MAIN
========================= */
.main {
  padding: 10px 0;
}

/* =========================
   PANEL (DASHBOARD)
========================= */
.panel {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.panel-left,
.panel-right {
  width: 100%;
}

/* =========================
   CARDS
========================= */
.card {
  background: var(--color-blanco);
  padding: 20px;
  border-radius: 10px;
  border: 1px solid #eee;
  margin-bottom: 20px;
  text-align: left;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* =========================
   TABLAS (UNIFICADO)
========================= */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  background: var(--color-blanco);
  border-radius: 10px;
  overflow: hidden;
}

thead {
  background: #f4f6f8;
}

th, td {
  padding: 14px;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}

th {
  color: var(--color-texto-secundario);
  font-weight: 600;
}

tbody tr:hover {
  background: #fafafa;
}

/* CONTENEDOR RESPONSIVO */
.tabla-contenedor {
  width: 100%;
  overflow-x: auto;
}

/* =========================
   GRÁFICAS
========================= */
.chart {
  height: 150px;
  background: #eee;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
}

/* =========================
   FORMULARIOS (BUSCAR)
========================= */
.formbuscar {
  width: 100%;
  max-width: 600px;
  margin: auto;
}

.divform {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}

.divform label {
  margin-bottom: 5px;
  text-align: left;
}

.divform input {
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.divform .btn {
  margin-top: 10px;
  width: 100%;
}

/* =========================
   FORMULARIOS GENERALES
========================= */
.form-group {
  margin-bottom: 15px;
  text-align: left;
}

.input {
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.input:focus {
  outline: none;
  border-color: var(--color-amarillo);
}

/* =========================
   ESTADOS (PEDIDOS)
========================= */
.estado {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  color: #fff;
  display: inline-block;
}

.estado.proceso {
  background: #f4a261;
}

.estado.completado {
  background: #2a9d8f;
}

.estado.pendiente {
  background: #9e9e9e;
}

/* =========================
   CHECKBOX
========================= */
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin: 10px 0 20px;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

/* =========================
   LEYENDA
========================= */
.leyenda {
  font-size: 13px;
  color: var(--color-texto-secundario);
  margin: 20px 0;
  line-height: 1.5;
  text-align: justify;
}

/* =========================
   META SEMANAL
========================= */
.meta-card {
  max-width: 500px;
  margin: 40px auto;
}

.meta-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 14px;
}

.meta-porcentaje {
  font-weight: bold;
  color: #2E7D32;
}

.progress-bar {
  width: 100%;
  height: 28px;
  background: #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
}

.progress {
  height: 100%;
  background: linear-gradient(90deg, #66BB6A, #2E7D32);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 13px;
  font-weight: 500;
  transition: width 0.5s ease;
}

.meta-total {
  margin-top: 8px;
  font-size: 13px;
  color: var(--color-texto-secundario);
  text-align: right;
}

/* =========================
   LISTAS
========================= */
.section ul {
  list-style: none;
  padding: 0;
}

/* =========================
   LOGIN PAGE (AISLADO)
========================= */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-page .login {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  width: 100%;
  max-width: 500px;
}

.login-page .login-left img {
  width: 140px;
}

.login-page .login-right {
  width: 100%;
}

.login-page h3 {
  font-size: 15px;
  margin-bottom: 15px;
  color: var(--color-texto-secundario);
}

/* =========================
   DESKTOP (UNIFICADO)
========================= */
@media (min-width: 768px) {

  .menu-toggle {
    display: none;
  }

  .navbar-menu {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 40px;
    border: none;
    padding: 8px 0;
  }

  .navbar-menu a {
    width: auto;
    padding: 10px 0;
  }

  .logout-desktop {
    display: block;
  }

  .logout-mobile {
    display: none;
  }

  .panel {
    flex-direction: row;
  }

  .panel-left {
    width: 60%;
  }

  .panel-right {
    width: 40%;
  }

  .divform {
    flex-direction: row;
    align-items: center;
    gap: 15px;
  }

  .divform label {
    width: 200px;
    text-align: right;
  }

  .divform input {
    flex: 1;
  }

  .divform .btn {
    width: auto;
    margin-top: 0;
  }

  .login-page .login {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 120px;
    max-width: 900px;
  }

  .login-page .login-left,
  .login-page .login-right {
    flex: 1;
    display: flex;
    align-items: center;
  }

  .login-page .login-left {
    justify-content: flex-end;
  }

  .login-page .login-right {
    justify-content: flex-start;
    max-width: 420px;
  }

  .login-page .login-left img {
    width: 260px;
  }

  .login-page .card {
    padding: 30px;
  }

  .login-page .title {
    font-size: 26px;
  }
}