/* Estilos Dashboard Administrador - Corteza */

/* HEADER ADMIN (estilo index.html) */
.header-admin {
  background-color: #f7f1e8;
  color: #2b2118;
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.logo-admin {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo-admin img {
  width: auto;
  height: 100px;
  object-fit: contain;
}

.logo-admin h1 {
  font-size: 24px;
  margin: 0;
  color: #2b2118;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.logo-admin .logo-subtitulo {
  font-size: 13px;
  margin: 0;
  color: #d6a85f;
  font-weight: 500;
}

.menu-admin {
  display: flex;
  align-items: center;
  gap: 28px;
}

.menu-admin a {
  color: #2b2118;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}

.menu-admin a:hover {
  color: #d6a85f;
}

.usuario-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.usuario-info span {
  font-size: 14px;
  color: #2b2118;
}

.btn-cerrar-sesion {
  background-color: #e74c3c;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.3s;
}

.btn-cerrar-sesion:hover {
  background-color: #c0392b;
}

/* CONTENEDOR PRINCIPAL */
.contenedor-admin {
  display: flex;
  min-height: calc(100vh - 70px);
}

/* MENÚ LATERAL */
.menu-lateral {
  width: 250px;
  background-color: #1b1510;
  padding: 30px 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 70px;
  height: calc(100vh - 70px);
}

.opcion-menu {
  padding: 15px 25px;
  color: #c9c9c9;
  text-decoration: none;
  transition: 0.3s;
  border-left: 4px solid transparent;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.opcion-menu:hover {
  background-color: #2b2118;
  color: white;
}

.opcion-menu.activo {
  background-color: #2b2118;
  color: #d6a85f;
  border-left-color: #d6a85f;
  font-weight: bold;
}

/* CONTENIDO PRINCIPAL */
.contenido-principal {
  flex: 1;
  padding: 40px;
  background-color: #f7f1e8;
  overflow-y: auto;
}

/* SECCIONES DASHBOARD */
.seccion-dashboard {
  display: none;
}

.seccion-dashboard.activo {
  display: block;
}

.seccion-dashboard h2 {
  color: #2b2118;
  font-size: 32px;
  margin-bottom: 10px;
}

.seccion-dashboard > p {
  color: #666;
  margin-bottom: 30px;
  font-size: 16px;
}

/* TARJETAS INFO */
.tarjetas-info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.tarjeta-info {
  background-color: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  text-align: center;
}

.tarjeta-info h3 {
  color: #666;
  font-size: 14px;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.tarjeta-info .numero {
  color: #2b2118;
  font-size: 36px;
  font-weight: bold;
  margin: 0;
}

.tarjeta-info .numero.alerta {
  color: #e74c3c;
}

.tarjeta-info .numero.proceso {
  color: #f39c12;
}

.tarjeta-info .numero.exito {
  color: #27ae60;
}

/* TABLAS */
.tabla-container {
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  overflow: hidden;
  margin-bottom: 20px;
}

.tabla-admin {
  width: 100%;
  border-collapse: collapse;
}

.tabla-admin thead {
  background-color: #2b2118;
  color: white;
}

.tabla-admin th {
  padding: 15px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
}

.tabla-admin td {
  padding: 15px;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}

.tabla-admin tbody tr:hover {
  background-color: #f9f9f9;
}

/* ESTADOS */
.estado {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
  display: inline-block;
}

.estado.bueno {
  background-color: #27ae60;
  color: white;
}

.estado.bajo {
  background-color: #e74c3c;
  color: white;
}

.estado.pendiente {
  background-color: #e74c3c;
  color: white;
}

.estado.proceso {
  background-color: #f39c12;
  color: white;
}

.estado.exito {
  background-color: #27ae60;
  color: white;
}

/* BOTONES DE ACCIÓN */
.btn-accion {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  margin-right: 5px;
  transition: 0.3s;
}

.btn-accion:hover {
  opacity: 0.8;
}

.btn-ver {
  background-color: #3498db;
  color: white;
}

.btn-editar {
  background-color: #f39c12;
  color: white;
}

.btn-eliminar {
  background-color: #e74c3c;
  color: white;
}

.btn-cancelar {
  background-color: #e74c3c;
  color: white;
}

.btn-reactivar {
  background-color: #27ae60;
  color: white;
}

.btn-agregar {
  margin-top: 20px;
}

/* LISTA DE CITAS */
.lista-citas {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.cita-card {
  background-color: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  display: flex;
  gap: 20px;
  align-items: center;
}

.cita-fecha {
  background-color: #2b2118;
  color: #d6a85f;
  padding: 15px 20px;
  border-radius: 8px;
  text-align: center;
  min-width: 80px;
}

.cita-dia {
  display: block;
  font-size: 28px;
  font-weight: bold;
}

.cita-mes {
  display: block;
  font-size: 14px;
  text-transform: uppercase;
}

.cita-info {
  flex: 1;
}

.cita-info h4 {
  color: #2b2118;
  margin-bottom: 8px;
  font-size: 16px;
}

.cita-info p {
  color: #666;
  margin: 4px 0;
  font-size: 14px;
}

.cita-acciones {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ============================================
   DASHBOARD RESUMEN
============================================ */

.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}

.dash-titulo {
  font-size: 28px;
  color: #2b2118;
  margin: 0;
}

.dash-fecha {
  color: #888;
  font-size: 14px;
  margin: 4px 0 0;
}

/* TARJETAS DE CONTEO */
.dash-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.dash-card {
  background-color: white;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
  border-left: 5px solid #ccc;
}

.dash-card-dorado  { border-left-color: #d6a85f; }
.dash-card-verde   { border-left-color: #27ae60; }
.dash-card-gris    { border-left-color: #95a5a6; }
.dash-card-cafe    { border-left-color: #2b2118; }
.dash-card-naranja { border-left-color: #e67e22; }
.dash-card-rojo    { border-left-color: #e74c3c; }

.dash-card-icono {
  font-size: 34px;
  line-height: 1;
}

.dash-card-label {
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 700;
  color: #888;
  margin: 0 0 5px;
}

.dash-card-num {
  font-size: 34px;
  font-weight: bold;
  color: #2b2118;
  margin: 0;
  line-height: 1;
}

/* SECCIONES */
.dash-seccion {
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
  overflow: hidden;
  margin-bottom: 22px;
}

.dash-seccion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #f0ebe2;
  background-color: #fdf9f2;
}

.dash-seccion-header h3 {
  margin: 0;
  font-size: 16px;
  color: #2b2118;
}

.dash-link {
  font-size: 13px;
  color: #d6a85f;
  text-decoration: none;
  font-weight: 600;
}

.dash-link:hover {
  text-decoration: underline;
}

.dash-badge-rojo {
  background-color: #e74c3c;
  color: white;
  border-radius: 50px;
  padding: 2px 10px;
  font-size: 13px;
  font-weight: bold;
  min-width: 26px;
  text-align: center;
  display: inline-block;
}

/* ALERTAS */
.dash-alertas-lista {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dash-alerta {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
}

.dash-alerta-roja    { background-color: #fce4e4; border-left: 4px solid #e74c3c; }
.dash-alerta-naranja { background-color: #fdebd0; border-left: 4px solid #e67e22; }
.dash-alerta-amarilla{ background-color: #fef9e7; border-left: 4px solid #f39c12; }

.dash-alerta-icono { font-size: 20px; margin-top: 1px; }

.dash-alerta strong { color: #2b2118; display: block; }
.dash-alerta span   { color: #555; font-size: 13px; }

/* DOS COLUMNAS */
.dash-dos-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-bottom: 22px;
}

/* TABLA COMPACTA */
.dash-tabla {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.dash-tabla th {
  background-color: #2b2118;
  color: white;
  padding: 11px 14px;
  text-align: left;
  font-weight: 600;
}

.dash-tabla td {
  padding: 11px 14px;
  border-bottom: 1px solid #f0f0f0;
  color: #2b2118;
  vertical-align: middle;
}

.dash-tabla tbody tr:hover { background-color: #fdf9f2; }

.dash-vacio {
  text-align: center;
  padding: 24px;
  color: #999;
  font-size: 14px;
}

/* BADGES ESTADO */
.db-badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: bold;
  display: inline-block;
  white-space: nowrap;
}
.db-badge-verde   { background-color: #d5f5e3; color: #1e8449; }
.db-badge-amarillo{ background-color: #fef9e7; color: #9a7d0a; }
.db-badge-gris    { background-color: #f0f0f0; color: #555; }
.db-badge-cafe    { background-color: #2b2118; color: #d6a85f; }
.db-badge-naranja { background-color: #fdebd0; color: #a04000; }
.db-badge-rojo    { background-color: #fce4e4; color: #a93226; }

/* ============================================
   TARJETAS DASHBOARD REDISEÑADO
============================================ */

.db-grid-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 26px;
}

.db-card {
  border-radius: 16px;
  padding: 22px 22px 16px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.db-card::after {
  content: '';
  position: absolute;
  bottom: -20px;
  right: -20px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background-color: rgba(255,255,255,0.08);
}

.db-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.18);
}

.db-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 8px;
}

.db-card-emoji {
  font-size: 30px;
  background-color: rgba(255,255,255,0.18);
  border-radius: 10px;
  padding: 8px 10px;
  line-height: 1;
}

.db-card-num {
  font-size: 46px;
  font-weight: 800;
  color: white;
  margin: 0;
  line-height: 1;
  text-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.db-card-label {
  font-size: 14px;
  font-weight: 700;
  color: rgba(255,255,255,0.95);
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.db-card-footer {
  font-size: 12px;
  color: rgba(255,255,255,0.65);
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 10px;
  margin-top: 2px;
}

.dbc-dorado  { background: linear-gradient(135deg, #b8780a 0%, #d6a85f 100%); }
.dbc-verde   { background: linear-gradient(135deg, #1a6e3c 0%, #27ae60 100%); }
.dbc-gris    { background: linear-gradient(135deg, #4a5a6a 0%, #7f8c8d 100%); }
.dbc-cafe    { background: linear-gradient(135deg, #1a0f0a 0%, #3d2b1f 100%); }
.dbc-naranja { background: linear-gradient(135deg, #a04000 0%, #e67e22 100%); }
.dbc-rojo    { background: linear-gradient(135deg, #8e1c10 0%, #e74c3c 100%); }

.db-badge-num {
  background-color: #e74c3c;
  color: white;
  border-radius: 50px;
  padding: 3px 12px;
  font-size: 13px;
  font-weight: bold;
  min-width: 28px;
  text-align: center;
  display: inline-block;
}

.db-ver-mas {
  font-size: 12px;
  color: #d6a85f;
  text-decoration: none;
  font-weight: 600;
}
.db-ver-mas:hover { text-decoration: underline; }

@media (max-width: 1000px) {
  .db-grid-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .db-grid-cards { grid-template-columns: 1fr 1fr; gap: 12px; }
  .db-card-num   { font-size: 36px; }
}

/* ============================================
   TARJETAS V2 CON DEGRADADO
============================================ */

.dash-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}

.dash-card-v2 {
  border-radius: 16px;
  padding: 22px 24px 18px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0,0,0,0.10);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: default;
}

.dash-card-v2:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.14);
}

.dv2-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}

.dv2-icono-wrap {
  font-size: 28px;
  line-height: 1;
  background-color: rgba(255,255,255,0.2);
  border-radius: 10px;
  padding: 8px 10px;
}

.dv2-num {
  font-size: 44px;
  font-weight: 800;
  margin: 0;
  line-height: 1;
  color: white;
  text-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.dv2-label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.88);
  margin: 0 0 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dv2-barra {
  height: 4px;
  border-radius: 4px;
  background-color: rgba(255,255,255,0.3);
}

.dv2-dorado  { background: linear-gradient(135deg, #c8902a 0%, #e5b560 100%); }
.dv2-verde   { background: linear-gradient(135deg, #1a7a42 0%, #2ecc71 100%); }
.dv2-gris    { background: linear-gradient(135deg, #5d6d7e 0%, #95a5a6 100%); }
.dv2-cafe    { background: linear-gradient(135deg, #2b2118 0%, #5a3d2b 100%); }
.dv2-naranja { background: linear-gradient(135deg, #c0580a 0%, #e67e22 100%); }
.dv2-rojo    { background: linear-gradient(135deg, #a93226 0%, #e74c3c 100%); }

/* ============================================
   NAVEGACIÓN CON FLECHA EN SIDEBARS
============================================ */

.nav-flecha {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  color: #d6a85f;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: 0.2s;
  background-color: rgba(214,168,95,0.07);
}

.nav-flecha:hover {
  background-color: rgba(214,168,95,0.18);
  color: white;
}

.nav-flecha-icono {
  font-size: 20px;
  line-height: 1;
}

/* RESPONSIVE */
@media (max-width: 1000px) {
  .dash-cards    { grid-template-columns: repeat(2, 1fr); }
  .dash-dos-cols { grid-template-columns: 1fr; }

  .contenedor-admin {
    flex-direction: column;
  }
  
  .menu-lateral {
    width: 100%;
    position: relative;
    top: 0;
    height: auto;
  }
  
  .tarjetas-info {
    grid-template-columns: 1fr;
  }
  
  .cita-card {
    flex-direction: column;
    text-align: center;
  }
  
  .cita-acciones {
    flex-direction: row;
    justify-content: center;
  }
}

/* MODAL DE CONFIRMACIÓN CIERRE DE SESIÓN */
.modal-confirmacion {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal-confirmacion.activo {
  display: flex;
}

.modal-confirmacion-contenido {
  background: white;
  border-radius: 12px;
  padding: 30px 35px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  animation: modalEntrada 0.3s ease;
}

@keyframes modalEntrada {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-confirmacion-icono {
  font-size: 48px;
  margin-bottom: 15px;
}

.modal-confirmacion-titulo {
  font-size: 20px;
  font-weight: 700;
  color: #2b2118;
  margin-bottom: 10px;
}

.modal-confirmacion-mensaje {
  font-size: 15px;
  color: #666;
  margin-bottom: 25px;
  line-height: 1.5;
}

.modal-confirmacion-botones {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.modal-btn {
  padding: 12px 28px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-btn-cancelar {
  background: #e0e0e0;
  color: #333;
}

.modal-btn-cancelar:hover {
  background: #d0d0d0;
}

.modal-btn-confirmar {
  background: #e74c3c;
  color: white;
}

.modal-btn-confirmar:hover {
  background: #c0392b;
}

@media (max-width: 650px) {
  .header-admin {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  
  .contenido-principal {
    padding: 20px;
  }
  
  .tabla-container {
    overflow-x: auto;
  }
  
  .tabla-admin {
    min-width: 600px;
  }
}