/* =========================================================
   MI-PANEL
   ESTILOS GENERALES
========================================================= */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;

    font-family: Arial, Helvetica, sans-serif;

    background: #f5f6f8;

    color: #1f2937;
}

body {
    min-height: 100vh;
}


/* =========================================================
   MENÚ PRINCIPAL
========================================================= */

.main-menu {
    width: 100%;

    background: #1f2937;

    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.12);

    position: relative;

    z-index: 1000;
}


.main-menu-inner {
    width: 100%;

    min-height: 58px;

    display: flex;

    align-items: center;

    padding: 0 22px;

    gap: 20px;
}


/* =========================================================
   LOGO
========================================================= */

.main-menu-logo {
    color: white;

    text-decoration: none;

    font-size: 16px;

    font-weight: bold;

    white-space: nowrap;

    display: flex;

    align-items: center;

    min-height: 58px;
}


.main-menu-logo:hover {
    color: #e5e7eb;
}


/* =========================================================
   ENLACES DEL MENÚ - PC
========================================================= */

.main-menu-links {
    display: flex;

    align-items: center;

    gap: 4px;

    flex: 1;
}


.main-menu-link {
    color: #e5e7eb;

    text-decoration: none;

    font-size: 12px;

    font-weight: bold;

    padding: 10px 12px;

    border-radius: 7px;

    white-space: nowrap;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}


.main-menu-link:hover {
    background: #374151;

    color: white;
}


/* =========================================================
   BOTÓN SALIR
========================================================= */

.main-menu-logout {
    margin-left: auto;
}


/* =========================================================
   BOTÓN MENÚ CELULAR
========================================================= */

.main-menu-toggle {
    display: none;

    margin-left: auto;

    width: 42px;

    height: 42px;

    border: none;

    border-radius: 8px;

    background: transparent;

    color: white;

    font-size: 25px;

    cursor: pointer;

    align-items: center;

    justify-content: center;
}


.main-menu-toggle:hover {
    background: #374151;
}


/* =========================================================
   CONTENEDOR PRINCIPAL
========================================================= */

.main {
    width: 100%;

    min-height:
        calc(100vh - 58px);
}


/* =========================================================
   HEADER
========================================================= */

.header {
    width: 100%;

    min-height: 75px;

    background: white;

    border-bottom:
        1px solid #e5e7eb;

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 15px 25px;
}


.header h1 {
    margin: 0;

    font-size: 22px;

    color: #1f2937;
}


.header p {
    margin: 4px 0 0;

    color: #6b7280;

    font-size: 13px;
}


.user {
    display: flex;

    align-items: center;

    gap: 7px;

    color: #4b5563;

    font-size: 13px;
}


/* =========================================================
   CONTENIDO
========================================================= */

.content {
    width: 100%;

    padding: 25px;
}


/* =========================================================
   TARJETAS
========================================================= */

.card {
    background: white;

    border-radius: 12px;

    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.07);

    padding: 20px;

    margin-bottom: 20px;
}


.card h2 {
    margin-top: 0;
}


/* =========================================================
   TABLAS
========================================================= */

table {
    width: 100%;

    border-collapse: collapse;

    background: white;
}


th {
    background: #f3f4f6;

    color: #374151;

    font-size: 12px;

    font-weight: bold;

    text-align: left;

    padding: 10px;

    border-bottom:
        1px solid #e5e7eb;
}


td {
    padding: 9px 10px;

    font-size: 12px;

    border-bottom:
        1px solid #f0f0f0;

    color: #374151;
}


tr:last-child td {
    border-bottom: none;
}


/* =========================================================
   BOTONES
========================================================= */

button,
.btn {
    font-family: inherit;
}


.btn {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    padding: 8px 13px;

    border: none;

    border-radius: 7px;

    cursor: pointer;

    text-decoration: none;

    font-size: 12px;

    font-weight: bold;
}


.btn-primary {
    background: #2563eb;

    color: white;
}


.btn-primary:hover {
    background: #1d4ed8;
}


.btn-danger {
    background: #dc2626;

    color: white;
}


.btn-danger:hover {
    background: #b91c1c;
}


.btn-secondary {
    background: #6b7280;

    color: white;
}


.btn-secondary:hover {
    background: #4b5563;
}


/* =========================================================
   FORMULARIOS
========================================================= */

input,
select,
textarea {
    width: 100%;

    padding: 9px 10px;

    border:
        1px solid #d1d5db;

    border-radius: 7px;

    background: white;

    color: #374151;

    font-family: inherit;

    font-size: 13px;

    outline: none;
}


input:focus,
select:focus,
textarea:focus {
    border-color: #6b7280;

    box-shadow:
        0 0 0 2px
        rgba(107, 114, 128, 0.12);
}


label {
    display: block;

    margin-bottom: 5px;

    font-size: 12px;

    font-weight: bold;

    color: #374151;
}


/* =========================================================
   ALERTAS
========================================================= */

.alert {
    padding: 11px 14px;

    border-radius: 8px;

    margin-bottom: 15px;

    font-size: 13px;
}


.alert-success {
    background: #dcfce7;

    color: #166534;
}


.alert-danger {
    background: #fee2e2;

    color: #991b1b;
}


.alert-warning {
    background: #fef3c7;

    color: #92400e;
}


.alert-info {
    background: #dbeafe;

    color: #1e40af;
}


/* =========================================================
   CELULAR
========================================================= */

@media (max-width: 768px) {


    /* =====================================================
       BARRA PRINCIPAL
    ===================================================== */

    .main-menu-inner {
        min-height: 56px;

        padding: 0 14px;

        gap: 0;

        flex-wrap: wrap;
    }


    /* =====================================================
       LOGO
    ===================================================== */

    .main-menu-logo {
        min-height: 56px;

        font-size: 15px;
    }


    /* =====================================================
       BOTÓN HAMBURGUESA
    ===================================================== */

    .main-menu-toggle {
        display: flex;

        flex-shrink: 0;
    }


    /* =====================================================
       MENÚ CERRADO

       IMPORTANTE:
       !important evita que otros estilos
       hagan aparecer el menú automáticamente.
    ===================================================== */

    .main-menu-links {
        display: none !important;

        width: 100%;

        flex-direction: column;

        align-items: stretch;

        gap: 2px;

        padding: 8px 0 10px;

        flex-basis: 100%;
    }


    /* =====================================================
       MENÚ ABIERTO
    ===================================================== */

    .main-menu-links.menu-abierto {
        display: flex !important;
    }


    /* =====================================================
       ENLACES EN CELULAR
    ===================================================== */

    .main-menu-link {
        width: 100%;

        padding: 13px 14px;

        border-radius: 7px;

        font-size: 13px;
    }


    .main-menu-link:hover {
        background: #374151;
    }


    /* =====================================================
       SALIR
    ===================================================== */

    .main-menu-logout {
        margin-left: 0;

        margin-top: 3px;
    }


    /* =====================================================
       HEADER
    ===================================================== */

    .header {
        min-height: auto;

        padding: 15px;

        gap: 12px;

        align-items: flex-start;
    }


    .header h1 {
        font-size: 19px;
    }


    .header p {
        font-size: 12px;
    }


    .user {
        font-size: 12px;

        white-space: nowrap;
    }


    /* =====================================================
       CONTENIDO
    ===================================================== */

    .content {
        padding: 15px;
    }


    /* =====================================================
       TABLAS
    ===================================================== */

    table {
        min-width: 600px;
    }


    /* =====================================================
       TARJETAS
    ===================================================== */

    .card {
        padding: 15px;

        border-radius: 10px;
    }

}


/* =========================================================
   CELULARES PEQUEÑOS
========================================================= */

@media (max-width: 480px) {


    .main-menu-inner {
        padding: 0 10px;
    }


    .main-menu-logo {
        font-size: 14px;
    }


    .main-menu-toggle {
        width: 40px;

        height: 40px;

        font-size: 23px;
    }


    .header {
        padding: 13px;
    }


    .header h1 {
        font-size: 17px;
    }


    .header p {
        font-size: 11px;
    }


    .user {
        font-size: 11px;
    }


    .content {
        padding: 12px;
    }

}


/* =========================================================
   LOGIN
   MI-PANEL - PANTALLA DE INGRESO
========================================================= */

.login-body {
    min-height: 100vh;

    margin: 0;

    padding: 20px;

    display: flex;

    align-items: center;

    justify-content: center;

    background: #f5f6f8;

    color: #1f2937;
}


.login-container {
    width: 100%;

    max-width: 420px;

    margin: 0 auto;
}


.login-box {
    width: 100%;

    background: white;

    border-radius: 14px;

    padding: 35px 32px;

    box-shadow:
        0 4px 18px rgba(0, 0, 0, 0.10);

    border:
        1px solid #e5e7eb;
}


.login-logo {
    text-align: center;

    color: #1f2937;

    font-size: 25px;

    font-weight: bold;

    letter-spacing: 0.5px;

    margin-bottom: 22px;
}


.login-box h1 {
    margin: 0;

    text-align: center;

    font-size: 24px;

    color: #1f2937;
}


.login-subtitle {
    margin: 8px 0 25px;

    text-align: center;

    color: #6b7280;

    font-size: 13px;
}


.login-error {
    width: 100%;

    margin-bottom: 18px;

    padding: 11px 13px;

    border-radius: 8px;

    background: #fee2e2;

    color: #991b1b;

    border:
        1px solid #fecaca;

    font-size: 13px;

    text-align: center;
}


.login-box form {
    width: 100%;

    margin: 0;
}


.login-box .form-group {
    width: 100%;

    margin-bottom: 17px;
}


.login-box .form-group label {
    display: block;

    margin-bottom: 6px;

    font-size: 12px;

    font-weight: bold;

    color: #374151;
}


.login-box .form-group input {
    width: 100%;

    height: 43px;

    padding: 10px 12px;

    border:
        1px solid #d1d5db;

    border-radius: 8px;

    background: white;

    color: #374151;

    font-family: inherit;

    font-size: 13px;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}


.login-box .form-group input::placeholder {
    color: #9ca3af;
}


.login-box .form-group input:focus {
    border-color: #2563eb;

    box-shadow:
        0 0 0 3px
        rgba(37, 99, 235, 0.12);
}


.login-button {
    width: 100%;

    height: 44px;

    margin-top: 5px;

    padding: 10px 15px;

    border: none;

    border-radius: 8px;

    background: #2563eb;

    color: white;

    font-family: inherit;

    font-size: 13px;

    font-weight: bold;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.1s ease;
}


.login-button:hover {
    background: #1d4ed8;
}


.login-button:active {
    transform: translateY(1px);
}


.login-footer {
    margin-top: 25px;

    padding-top: 15px;

    border-top:
        1px solid #e5e7eb;

    text-align: center;

    color: #9ca3af;

    font-size: 11px;

    letter-spacing: 0.3px;
}


/* =========================================================
   LOGIN - CELULAR
========================================================= */

@media (max-width: 480px) {

    .login-body {
        padding: 15px;
    }


    .login-container {
        max-width: 100%;
    }


    .login-box {
        padding: 28px 22px;

        border-radius: 12px;
    }


    .login-logo {
        font-size: 23px;

        margin-bottom: 20px;
    }


    .login-box h1 {
        font-size: 22px;
    }


    .login-subtitle {
        font-size: 12px;

        margin-bottom: 22px;
    }


    .login-box .form-group {
        margin-bottom: 15px;
    }


    .login-box .form-group input {
        height: 44px;

        font-size: 13px;
    }


    .login-button {
        height: 44px;
    }


    .login-footer {
        margin-top: 22px;
    }

}