﻿/* ==========================================
   ESTILOS GENERALES Y RESET BASE
   ========================================== */
:root {
    --bg-main: #fcf3f2; /* Fondo general coral / melocotón muy suave */
    --primary: #e07a5f; /* Coral terracota cálido para botones y acentos */
    --primary-hover: #cc6b50; /* Coral más oscuro para estados hover */
    --text-body: #4a5568; /* Texto gris pizarra suave para perfecta legibilidad */
}

body {
    background-color: #f8fafc;
    color: #1e293b;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    padding: 0;
}

/* ==========================================
   LAYOUT: PANEL SUPERIOR HORIZONTAL (3 CAJAS)
   ========================================== */
.top-panel-container {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.top-panel-grid {
    display: grid;
    /* Distribución exacta: Izquierda fija, Centro fluido, Derecha fija */
    grid-template-columns: 280px 1fr 260px;
    align-items: center;
    width: 100%;
    max-width: 100%;
    padding: 0.75rem 2rem;
    gap: 1.5rem;
    box-sizing: border-box;
}

.panel-box {
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

/* Caja 1: Marca y Estado */
.box-brand {
    border-right: 1px solid #e2e8f0;
    padding-right: 1rem;
    justify-content: space-between;
}

.brand-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-logo {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-weight: 700;
    font-size: 1rem;
    color: #0f172a;
    line-height: 1.2;
}

.brand-subtitle {
    font-size: 0.75rem;
    color: #64748b;
}

.status-pill {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    background: #f1f5f9;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #059669;
    border: 1px solid #e2e8f0;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
}

/* Caja 2: Navegación horizontal centrada */
.box-nav {
    justify-content: center;
    width: 100%;
}

    .box-nav ::deep nav,
    .box-nav nav {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 1.5rem !important;
        width: 100%;
    }

    .box-nav a {
        white-space: nowrap;
    }

/* Caja 3: Perfil de Usuario y Acciones */
.box-profile {
    border-left: 1px solid #e2e8f0;
    padding-left: 1rem;
    justify-content: flex-end;
    gap: 1rem;
}

.user-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.avatar {
    width: 38px;
    height: 38px;
    background-color: #0f172a;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.2;
}

.user-role {
    font-size: 0.7rem;
    color: #64748b;
}

/* ==========================================
   CONTENIDO PRINCIPAL Y FORMATO DE TARJETAS
   ========================================== */
.main-content {
    padding: 2.5rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* Sistema de Tarjetas (Cards Grid) para catálogos y menús */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.erp-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

    .erp-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
    }

.erp-card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.erp-card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.erp-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.erp-card-text {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 1.25rem;
    flex-grow: 1;
}

/* Responsivo para pantallas pequeñas */
@media (max-width: 1024px) {
    .top-panel-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 1rem;
    }

    .box-brand, .box-profile {
        border: none;
        padding: 0;
        justify-content: space-between;
    }
}
