
/* CONFIGURACIÓN GENERAL */
:root {
    --background: #f5f7fb;
    --surface: #ffffff;
    --sidebar: #151b2b;
    --text: #20283a;
    --muted: #7b8497;
    --border: #e8ebf2;
    --primary: #536dfe;
    --green: #159b70;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--background);
    color: var(--text);
    min-height: 100vh;
}

button,
a {
    font: inherit;
}

button {
    cursor: pointer;
}

/* ESTRUCTURA */
.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: var(--sidebar);
    color: white;
    padding: 28px 18px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 7px 34px;
}

.logo-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--primary);
    font-weight: 800;
    letter-spacing: -1px;
}

.logo h2 {
    font-size: 15px;
}

.logo p {
    font-size: 11px;
    color: #a4aec3;
    margin-top: 5px;
}

.menu-title {
    color: #8993aa;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 1.3px;
    padding: 0 10px;
    margin-bottom: 14px;
}

.navigation {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.nav-link {
    color: #b9c2d5;
    text-decoration: none;
    padding: 13px 12px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    transition: 0.2s;
}

.nav-link span {
    width: 20px;
    text-align: center;
}

.nav-link:hover,
.nav-link.active {
    background: #29324a;
    color: white;
}

.nav-link.active {
    box-shadow: inset 3px 0 var(--primary);
}

.sidebar-footer {
    margin-top: auto;
    padding: 22px 8px 0;
    display: flex;
    align-items: center;
    gap: 9px;
    color: #a4aec3;
    font-size: 11px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #20bd83;
    display: inline-block;
    flex-shrink: 0;
}

/* CONTENIDO */
.main-content {
    flex: 1;
    min-width: 0;
    padding: 30px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 28px;
}

.breadcrumb {
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 9px;
}

.topbar h1 {
    font-size: 25px;
    letter-spacing: -0.6px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 11px;
}

.avatar {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #e4e9ff;
    color: var(--primary);
    font-weight: bold;
}

.user-profile strong {
    font-size: 12px;
}

.user-profile p {
    font-size: 11px;
    color: var(--muted);
    margin-top: 4px;
}

/* BIENVENIDA */
.welcome {
    padding: 27px;
    border-radius: 15px;
    background: linear-gradient(115deg, #536dfe, #7184ff);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
}

.eyebrow {
    font-size: 10px;
    letter-spacing: 1.5px;
    opacity: 0.8;
    margin-bottom: 12px;
}

.welcome h2 {
    font-size: 22px;
    margin-bottom: 9px;
}

.welcome p:last-child {
    font-size: 13px;
    line-height: 1.6;
    opacity: 0.9;
}

.welcome-icon {
    font-size: 45px;
}

/* TÍTULOS Y TARJETAS */
.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.section-heading h2,
.panel-heading h2 {
    font-size: 16px;
    margin-bottom: 6px;
}

.section-heading p,
.panel-heading p {
    font-size: 12px;
    color: var(--muted);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 17px;
    margin-bottom: 25px;
}

.stat-card,
.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 13px;
}

.stat-card {
    padding: 20px;
    min-width: 0;
}

.stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
}

.stat-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 17px;
}

.blue {
    color: #536dfe;
    background: #edf0ff;
}

.green {
    color: #159b70;
    background: #e4f8ef;
}

.purple {
    color: #8b5cf6;
    background: #f0eaff;
}

.orange {
    color: #e58a32;
    background: #fff1df;
}

.stat-card h3 {
    font-size: 25px;
    margin: 19px 0 8px;
    overflow-wrap: anywhere;
}

.stat-card > p {
    color: var(--muted);
    font-size: 11px;
}

/* PANELES */
.content-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 20px;
}

.panel {
    padding: 23px;
    min-width: 0;
}

.panel-heading {
    margin-bottom: 22px;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.action-button {
    border: 1px solid var(--border);
    background: white;
    padding: 17px 12px;
    border-radius: 11px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 9px;
    transition: 0.2s;
    min-width: 0;
}

.action-button:hover {
    border-color: var(--primary);
    background: #f8f9ff;
    transform: translateY(-2px);
}

.action-button > span {
    font-size: 23px;
}

.action-button strong {
    font-size: 12px;
}

.action-button small {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.5;
}

.system-status {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-bottom: 23px;
}

.system-status .status-dot {
    margin-top: 4px;
}

.system-status strong,
.system-status p {
    font-size: 12px;
}

.system-status p {
    color: var(--muted);
    line-height: 1.6;
    margin-top: 6px;
}

.notice {
    padding: 15px;
    background: #f4f6ff;
    border-radius: 10px;
    border-left: 3px solid var(--primary);
}

.notice strong {
    font-size: 12px;
}

.notice p {
    font-size: 11px;
    line-height: 1.6;
    color: var(--muted);
    margin-top: 6px;
}

.footer {
    text-align: center;
    padding: 28px 0 5px;
    font-size: 11px;
    color: var(--muted);
}

.hidden {
    display: none !important;
}

/* ADAPTACIÓN A TABLETS Y CELULARES */
@media (max-width: 1100px) {
    .sidebar {
        width: 220px;
    }

    .main-content {
        padding: 22px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 650px) {
    .app-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        padding: 17px;
    }

    .logo {
        padding: 0 0 18px;
    }

    .navigation {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .menu-title {
        grid-column: 1 / -1;
        margin: 0;
        padding: 4px 0;
    }

    .nav-link {
        font-size: 12px;
        padding: 11px 8px;
        gap: 7px;
    }

    .sidebar-footer {
        padding-top: 16px;
    }

    .main-content {
        padding: 18px 13px;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
        margin-bottom: 20px;
    }

    .topbar h1 {
        font-size: 22px;
    }

    .welcome {
        padding: 21px 17px;
    }

    .welcome h2 {
        font-size: 19px;
    }

    .welcome-icon {
        font-size: 30px;
    }

    .stats-grid {
        gap: 10px;
    }

    .stat-card {
        padding: 14px;
    }

    .stat-card h3 {
        font-size: 21px;
    }

    .stat-top {
        font-size: 11px;
    }

    .quick-actions {
        grid-template-columns: 1fr;
    }

    .action-button {
        display: grid;
        grid-template-columns: 35px 1fr;
        align-items: center;
    }

    .action-button > span {
        grid-row: span 2;
    }

    .action-button small {
        grid-column: 2;
    }

    .panel {
        padding: 17px;
    }
}
.btn-salir { border: 1px solid var(--border); background: white; border-radius: 8px; padding: 7px 12px; font-size: 12px; color: var(--text); }
.btn-salir:hover { border-color: var(--primary); }
