/* =========================================
   CONFIGURACIÓN BASE Y VARIABLES
   ========================================= */
:root {
    --verde-principal: #7eb344;
    --verde-claro: #d4e157;
    --verde-oscuro: #1e291b;
    --blanco: #ffffff;
    --gris-fondo: #f0f2f5;
    --negro-nav: #1e1e1e;
    --azul-card: #007bff;
    --verde-card: #28a745;
    --amarillo-card: #ffc107;
}

/* FUERZA EL CENTRADO DE TODO EL CUERPO */
body {
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    background: linear-gradient(135deg, #45750e 0%, #836f2d 100%);
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center; /* Centrado horizontal global */
    text-align: center;
}

/* =========================================
   CONTENEDORES Y ESTRUCTURA
   ========================================= */
.main-container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    align-items: center;    /* Centra los hijos horizontalmente */
    justify-content: center;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

/* =========================================
   ENCABEZADO (LOGO Y TÍTULOS) - CENTRADO FORZADO
   ========================================= */
.main-header {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;    /* Centra el logo y textos horizontalmente */
    text-align: center;
    margin-bottom: 40px;
    padding-top: 20px;
}

.logo-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.logo-inicio, .logo-img {
    max-width: 250px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.main-header h1 {
    color: var(--blanco);
    font-size: 2.5rem;
    margin: 10px 0;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.tagline {
    color: var(--verde-claro);
    margin: 5px 0;
    font-weight: 600;
    font-size: 1.2rem;
}

/* =========================================
   BADGES (ETIQUETAS BAJO EL TÍTULO)
   ========================================= */
.badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.badge {
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
}

.bg-green { background-color: var(--verde-principal); color: white; }
.bg-white { background-color: white; color: var(--verde-oscuro); }
.bg-blue { background-color: #2e5984; color: white; }

/* =========================================
   GUÍA DE ENVÍO - CAJA OSCURA
   ========================================= */
.guia-box {
    background: rgba(30, 41, 27, 0.9); 
    width: 100%;
    max-width: 900px;
    margin: 40px auto; 
    padding: 40px;
    border-radius: 25px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
    color: var(--blanco);
    border: 1px solid rgba(212, 225, 87, 0.2);
}

.guia-box h2 {
    color: var(--verde-claro);
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.8rem;
}

.guia-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    text-align: left; 
}

.guia-box ul {
    list-style: none;
    padding: 0;
}

.guia-box li {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.guia-box i {
    color: var(--verde-claro);
}

/* =========================================
   DASHBOARD NAV (BARRA SUPERIOR)
   ========================================= */
.dashboard-nav {
    background: var(--negro-nav);
    color: white;
    padding: 12px 0;
    width: 100%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s;
}

.btn-salir {
    border: 1px solid #ff4d4d;
    padding: 5px 12px;
    border-radius: 5px;
    color: #ff4d4d !important;
}

/* =========================================
   DASHBOARD CARDS (AZUL, VERDE, AMARILLO)
   ========================================= */
.resumen-titulo {
    color: var(--blanco);
    width: 100%;
    text-align: left; /* Alineado a la izquierda como en tu imagen */
    font-size: 2rem;
    margin-top: 30px;
    margin-bottom: 20px;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    width: 100%;
}

.card {
    border-radius: 12px;
    padding: 35px 20px;
    color: white;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.card h3 { font-size: 1.1rem; margin-bottom: 10px; opacity: 0.9; }
.main-value { font-size: 3.5rem; font-weight: bold; display: block; margin: 10px 0; }

.card-blue { background-color: var(--azul-card); }
.card-green { background-color: var(--verde-card); }
.card-yellow { background-color: var(--amarillo-card); color: #333; }

.card-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.2);
    display: flex;
    justify-content: space-around;
    font-size: 0.9rem;
}

.btn-refresh {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    margin-top: 40px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* =========================================
   EXTRAS (ADMIN Y WHATSAPP)
   ========================================= */
.admin-link {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--verde-claro);
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    border: 1px solid rgba(44, 139, 7, 0.4);
    transition: all 0.3s ease;
    z-index: 100;
    backdrop-filter: blur(5px);
    animation: destello-borde 2s infinite;
}

@keyframes destello-borde {
    0% { box-shadow: 0 0 0 0 rgba(212, 225, 87, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(212, 225, 87, 0); }
    100% { box-shadow: 0 0 0 0 rgba(212, 225, 87, 0); }
}

.admin-link:hover {
    background: var(--verde-claro);
    color: var(--verde-oscuro);
    transform: scale(1.05);
}

.whatsapp-btn-official {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    z-index: 1000;
    text-decoration: none;
}

/* =========================================
   DISEÑO RESPONSIVO
   ========================================= */
@media (max-width: 900px) {
    .main-header h1 { font-size: 1.8rem; }
    .guia-box { width: 95%; padding: 25px; }
    .dashboard-cards { grid-template-columns: 1fr; }
}
/* Contenedor para alinear todo a la derecha en la barra */
.user-container {
    display: flex;
    align-items: center;
    gap: 12px; /* Espacio entre el icono, el nombre y el botón */
}

/* El icono de usuario (estilo morado como en tu foto) */
.user-icon {
    width: 24px;
    height: 24px;
    filter: invert(31%) sepia(94%) saturate(1194%) hue-rotate(235deg) brightness(88%) contrast(93%);
}

/* El nombre del usuario en blanco y negrita */
.user-name {
    color: white;
    font-weight: 600;
    font-size: 16px;
    font-family: Arial, sans-serif;
}

/* Estilo del botón rojo de tu imagen */
.btn-cerrar {
    border: 1px solid #ff4d4d;
    color: #ff4d4d;
    padding: 5px 15px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    transition: 0.3s;
}

.btn-cerrar:hover {
    background-color: #ff4d4d;
    color: white;
}