/* Layout general */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f4f6f9;
}

.layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: #003366;
    color: white;
    padding: 20px;
    flex-shrink: 0;
}

.sidebar h2 {
    text-align: center;
    margin-bottom: 20px;
}

.sidebar nav a {
    display: block;
    padding: 12px;
    margin: 8px 0;
    background: #004080;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.3s;
}

.sidebar nav a:hover {
    background: #0059b3;
}

/* Main content */
.main {
    flex-grow: 1;
    padding: 20px;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    margin: 0;
}

.user-info {
    background: #ddd;
    padding: 10px 15px;
    border-radius: 6px;
}

/* Metrics */
.metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 8px #ccc;
    text-align: center;
}

.card h3 {
    margin: 0;
    color: #333;
}

.card p {
    font-size: 28px;
    margin-top: 10px;
    color: #0066cc;
}

/* Tabla */
.tabla-section {
    margin-top: 40px;
}

.tabla-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
}

thead {
    background: #0066cc;
    color: white;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

tr:hover {
    background: #f1f1f1;
}

button.action {
    padding: 6px 10px;
    background: #0066cc;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button.action:hover {
    background: #004999;
}

/* Responsivo */
@media (max-width: 768px) {
    .sidebar {
        width: 180px;
    }

    .header h1 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .sidebar {
        display: none;
    }

    .header {
        flex-direction: column;
        text-align: center;
    }

    .user-info {
        margin-top: 10px;
    }
}
