/* ===============================
   SISTEMA HBG - CSS BASE
   Sidebar + Content + Cards
   =============================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Inter", Arial, sans-serif;
    background: #f4f6f9;
    color: #1f2937;
    height: 100vh;
}

/* ===== LAYOUT PRINCIPAL ===== */

.layout {
    display: flex;
    height: 100vh;
    width: 100%;
}

/* ===== SIDEBAR ===== */

.sidebar {
    width: 240px;
    background: #0f172a;
    color: #ffffff;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.sidebar .logo {
    text-align: center;
    margin-bottom: 30px;
}

.sidebar .logo img {
    width: 120px;
    max-width: 100%;
}

.sidebar nav a {
    display: block;
    padding: 12px 15px;
    margin-bottom: 6px;
    color: #cbd5f5;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
}

.sidebar nav a:hover,
.sidebar nav a.active {
    background: #1e293b;
    color: #ffffff;
}

/* ===== CONTENIDO CENTRAL ===== */

.content {
    flex: 1;
    padding: 25px;
    overflow-y: auto;
}

/* ===== TITULOS ===== */

.page-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 20px;
}

/* ===== GRID DE CARDS ===== */

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

/* ===== CARD BASE ===== */

.card {
    background: #ffffff;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(0,0,0,0.12);
}

.card h3 {
    margin: 10px 0;
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
}

.card p {
    font-size: 13px;
    color: #4b5563;
    margin: 4px 0;
}

/* ===== EMPRESAS: AJUSTES ESPECÍFICOS ===== */

.empresa-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.empresa-logo {
    width: 140px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.empresa-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* ===== ESTADO ===== */

.estado {
    margin-top: 12px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.estado.activo {
    background: #dcfce7;
    color: #166534;
}

.estado.inactivo {
    background: #fee2e2;
    color: #7f1d1d;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }
}
