/* =========================================================
   PANEL ADMINISTRATIVO
   Bootstrap 5.3.8 + CSS personalizado
   ========================================================= */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-soft: #eff6ff;

    --sidebar: #111827;
    --sidebar-light: #1f2937;

    --background: #f5f7fb;
    --card: #ffffff;

    --text: #172033;
    --text-muted: #7b8497;
    --border: #e8ebf1;

    --success: #16a34a;
    --shadow: 0 8px 30px rgba(23, 32, 51, 0.06);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, Helvetica, Arial, sans-serif;
}

a:visited {
    color: inherit;
}

/* =========================================================
   SIDEBAR
   ========================================================= */

.sidebar {
    position: fixed;
    z-index: 1050;
    top: 0;
    left: 0;
    width: 265px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--sidebar);
    color: #fff;
    padding: 26px 18px 20px;
    overflow-y: auto;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 10px 30px;
}

.brand-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--primary);
    border-radius: 11px;
    font-size: 21px;
    box-shadow: 0 7px 18px rgba(37, 99, 235, 0.28);
}

.sidebar-brand h1 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.sidebar-brand span {
    display: block;
    margin-top: 2px;
    color: #9ca3af;
    font-size: 11px;
}

.sidebar-nav {
    flex: 1;
}

.nav-section-title {
    padding: 0 12px 10px;
    color: #6b7280;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
}

.sidebar .nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 5px;
    padding: 12px 13px;
    color: #aeb6c4;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.sidebar .nav-link i {
    width: 20px;
    text-align: center;
    font-size: 17px;
}

.sidebar .nav-link:hover {
    color: #fff;
    background: var(--sidebar-light);
}

.sidebar .nav-link.active {
    color: #fff;
    background: rgba(37, 99, 235, 0.16);
}

.sidebar .nav-link.active::before {
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    content: "";
    background: var(--primary);
    border-radius: 0 4px 4px 0;
}

.sidebar-menu,
.sidebar-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-menu li {
    list-style: none;
}

/* =========================================================
   PERFIL Y SALIR
   ========================================================= */

.sidebar-footer {
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.admin-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 8px 17px;
}

.profile-avatar {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #374151;
    color: #dbeafe;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
}

.profile-info {
    min-width: 0;
}

.profile-info strong,
.profile-info span {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.profile-info strong {
    color: #e5e7eb;
    font-size: 12px;
}

.profile-info span {
    margin-top: 2px;
    color: #6b7280;
    font-size: 10px;
}

.logout-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    color: #9ca3af;
    border-radius: 9px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.logout-link:hover {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.08);
}

/* =========================================================
   CONTENIDO
   ========================================================= */

.main-content {
    min-height: 100vh;
    margin-left: 265px;
    padding: 34px 42px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.topbar-label,
.section-label {
    display: block;
    margin-bottom: 4px;
    color: var(--primary);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.4px;
}

.topbar h2 {
    margin: 0;
    font-size: 27px;
    font-weight: 700;
    letter-spacing: -0.6px;
}

.topbar-date {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 13px;
    color: var(--text-muted);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 12px;
    text-transform: capitalize;
}

/* =========================================================
   WELCOME
   ========================================================= */

.welcome-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 205px;
    margin-bottom: 34px;
    padding: 34px 40px;
    overflow: hidden;
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
    border-radius: 16px;
    color: #fff;
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.16);
}

.welcome-card::after {
    position: absolute;
    right: -70px;
    top: -100px;
    width: 310px;
    height: 310px;
    content: "";
    border: 55px solid rgba(255, 255, 255, 0.06);
    border-radius: 50%;
}

.welcome-content {
    position: relative;
    z-index: 2;
    max-width: 650px;
}

.welcome-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 13px;
    padding: 6px 10px;
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
}

.welcome-content h3 {
    margin: 0 0 9px;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.welcome-content p {
    max-width: 600px;
    margin: 0;
    color: #dbeafe;
    font-size: 13px;
    line-height: 1.7;
}

.welcome-icon {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 95px;
    height: 95px;
    margin-right: 20px;
    color: rgba(255, 255, 255, 0.88);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    font-size: 43px;
}

/* =========================================================
   SECCIONES
   ========================================================= */

.dashboard-section {
    margin-bottom: 34px;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-heading h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.view-all {
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.view-all:hover {
    color: var(--primary-dark);
}

/* =========================================================
   TARJETAS DE ESTADÍSTICAS
   ========================================================= */

.stat-card {
    display: flex;
    align-items: center;
    gap: 17px;
    min-height: 130px;
    padding: 22px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 13px;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(23, 32, 51, 0.09);
}

.stat-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 12px;
    font-size: 21px;
}

.routes-icon {
    color: #2563eb;
    background: #eff6ff;
}

.clients-icon {
    color: #7c3aed;
    background: #f5f3ff;
}

.employees-icon {
    color: #059669;
    background: #ecfdf5;
}

.stat-content span {
    display: block;
    margin-bottom: 3px;
    color: var(--text-muted);
    font-size: 11px;
}

.stat-content strong {
    display: block;
    font-size: 25px;
    line-height: 1.2;
}

.stat-content small {
    display: block;
    margin-top: 5px;
    color: var(--success);
    font-size: 10px;
}

/* =========================================================
   ACCESOS RÁPIDOS
   ========================================================= */

.quick-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    height: 100%;
    padding: 19px;
    color: var(--text);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 13px;
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: all 0.2s ease;
}

.quick-card:hover {
    color: var(--text);
    transform: translateY(-2px);
    border-color: #dbe5f5;
    box-shadow: 0 12px 35px rgba(23, 32, 51, 0.09);
}

.quick-icon {
    width: 43px;
    height: 43px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary);
    background: var(--primary-soft);
    border-radius: 10px;
    font-size: 18px;
}

.quick-card h4 {
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 700;
}

.quick-card p {
    max-width: 190px;
    margin: 0;
    color: var(--text-muted);
    font-size: 10px;
    line-height: 1.5;
}

.quick-arrow {
    margin-left: auto;
    color: #aab2c0;
    font-size: 14px;
}

/* =========================================================
   ACTIVIDAD
   ========================================================= */

.activity-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 13px;
    box-shadow: var(--shadow);
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 17px 20px;
    border-bottom: 1px solid var(--border);
}

.activity-item:last-child {
    border-bottom: 0;
}

.activity-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary);
    background: var(--primary-soft);
    border-radius: 9px;
    font-size: 15px;
}

.activity-info {
    min-width: 0;
    flex: 1;
}

.activity-info strong,
.activity-info span {
    display: block;
}

.activity-info strong {
    margin-bottom: 2px;
    font-size: 12px;
}

.activity-info span {
    overflow: hidden;
    color: var(--text-muted);
    font-size: 10px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.activity-item time {
    flex-shrink: 0;
    color: #9aa2b1;
    font-size: 10px;
}

/* =========================================================
   FOOTER
   ========================================================= */

.dashboard-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 0 2px;
    color: #9aa2b1;
    font-size: 10px;
}

/* =========================================================
   BOTÓN MOBILE
   ========================================================= */

.mobile-menu-btn {
    display: none;
    position: fixed;
    z-index: 1100;
    top: 14px;
    left: 14px;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--sidebar);
    border: 0;
    border-radius: 9px;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.15);
    font-size: 20px;
}

.sidebar-overlay {
    display: none;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 991.98px) {

    .mobile-menu-btn {
        display: flex;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.15);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .sidebar-overlay {
        position: fixed;
        z-index: 1040;
        inset: 0;
        display: block;
        visibility: hidden;
        background: rgba(17, 24, 39, 0.5);
        opacity: 0;
        transition: all 0.25s ease;
    }

    .sidebar-overlay.show {
        visibility: visible;
        opacity: 1;
    }

    .main-content {
        margin-left: 0;
        padding: 25px 25px 30px;
    }

    .topbar {
        padding-left: 55px;
    }
}

@media (max-width: 767.98px) {

    .main-content {
        padding: 22px 16px 25px;
    }

    .topbar {
        display: block;
        margin-bottom: 20px;
        padding-left: 54px;
    }

    .topbar h2 {
        font-size: 23px;
    }

    .topbar-date {
        display: inline-flex;
        margin-top: 10px;
    }

    .welcome-card {
        min-height: 220px;
        padding: 27px 25px;
    }

    .welcome-content h3 {
        font-size: 22px;
    }

    .welcome-icon {
        display: none;
    }

    .section-heading {
        align-items: center;
    }

    .quick-card {
        min-height: 95px;
    }

    .activity-item {
        align-items: flex-start;
    }

    .activity-item time {
        display: none;
    }

    .dashboard-footer {
        flex-wrap: wrap;
        text-align: center;
    }
}

@media (max-width: 400px) {

    .sidebar {
        width: 82%;
    }

    .welcome-card {
        min-height: auto;
    }

    .welcome-content p {
        font-size: 12px;
    }

    .stat-card {
        padding: 18px;
    }
}


/*LOGIN ESTILOS*/
/* =========================================================
   RESET
========================================================= */


/* =========================================================
   HTML Y BODY
========================================================= */


/* =========================================================
   PÁGINA LOGIN
========================================================= */

.login-page {
    width: 100%;
    min-height: 100vh;
    background-color: #111827 !important;
    display: flex;
    align-items: center;
    justify-content: center;

    padding: 30px;
}


/* =========================================================
   CONTENEDOR PRINCIPAL
========================================================= */

.login-container {
    width: 100%;
    max-width: 560px;

    padding: 55px 60px;

    background: #ffffff;

    border-radius: 24px;

    box-shadow:
        0 20px 60px rgba(31, 42, 68, 0.10);
}


/* =========================================================
   SECCIÓN DEL FORMULARIO
========================================================= */

.login-form-section {
    width: 100%;
}

.login-form-container {
    width: 100%;
}


/* =========================================================
   LOGO
========================================================= */

.mobile-login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    margin-bottom: 40px;

    color: #1f2a44;

    font-size: 25px;
    font-weight: 700;
}

.mobile-login-logo span span {
    color: #6da7de;
}


.login-logo-icon {
    width: 50px;
    height: 50px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 15px;

    background: #6da7de;

    color: #ffffff;

    font-size: 22px;

    box-shadow:
        0 10px 25px rgba(109, 167, 222, 0.28);
}


/* =========================================================
   HEADER DEL FORMULARIO
========================================================= */

.login-header {
    margin-bottom: 35px;
    text-align: center;
}

.login-small-title {
    display: block;

    margin-bottom: 8px;

    color: #6da7de;

    font-size: 14px;
    font-weight: 700;
}

.login-header h2 {
    margin-bottom: 12px;

    color: #1f2a44;

    font-size: 36px;
    font-weight: 700;
}

.login-header p {
    color: #7b8494;

    font-size: 15px;
    line-height: 1.7;
}


/* =========================================================
   FORMULARIO
========================================================= */

.form-group {
    margin-bottom: 22px;
}

.form-group>label {
    display: block;

    margin-bottom: 9px;

    color: #374151;

    font-size: 14px;
    font-weight: 600;
}


/* =========================================================
   INPUTS
========================================================= */

.login-input {
    position: relative;

    display: flex;
    align-items: center;
}

.login-input>i {
    position: absolute;

    left: 17px;

    z-index: 2;

    color: #9ca3af;

    font-size: 18px;
}

.login-input input {
    width: 100%;
    height: 54px;

    padding: 0 52px;

    border: 1px solid #e2e7ee;

    border-radius: 13px;

    outline: none;

    background: #fafbfd;

    color: #1f2a44;

    font-size: 14px;

    transition:
        border 0.25s ease,
        background 0.25s ease,
        box-shadow 0.25s ease;
}

.login-input input::placeholder {
    color: #a9b0bc;
}

.login-input input:focus {
    border-color: #6da7de;

    background: #ffffff;

    box-shadow:
        0 0 0 4px rgba(109, 167, 222, 0.10);
}


/* =========================================================
   BOTÓN VER CONTRASEÑA
========================================================= */

.toggle-password {
    position: absolute;

    top: 50%;
    right: 8px;

    width: 40px;
    height: 40px;

    transform: translateY(-50%);

    border: 0;

    border-radius: 9px;

    background: transparent;

    color: #8d96a5;

    font-size: 17px;

    cursor: pointer;

    transition: 0.2s ease;
}

.toggle-password:hover {
    background: #eef4fa;
    color: #6da7de;
}


/* =========================================================
   OPCIONES
========================================================= */

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    margin: 2px 0 28px;
}

.remember-session {
    display: flex;
    align-items: center;
    gap: 8px;

    color: #667085;

    font-size: 13px;

    cursor: pointer;
}

.remember-session input {
    width: 17px;
    height: 17px;

    accent-color: #6da7de;

    cursor: pointer;
}

.forgot-password {
    color: #6da7de;

    font-size: 13px;
    font-weight: 600;

    text-decoration: none;
}

.forgot-password:hover {
    color: #31538b;
}


/* =========================================================
   BOTÓN LOGIN
========================================================= */

.login-submit {
    width: 100%;
    height: 56px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    border: 0;

    border-radius: 13px;

    background: #6da7de;

    color: #ffffff;

    font-size: 15px;
    font-weight: 700;

    cursor: pointer;

    box-shadow:
        0 12px 25px rgba(109, 167, 222, 0.25);

    transition: 0.25s ease;
}

.login-submit:hover {
    transform: translateY(-2px);

    background: #5b98d2;

    box-shadow:
        0 16px 30px rgba(109, 167, 222, 0.32);
}

.login-submit i {
    font-size: 18px;

    transition: transform 0.25s ease;
}

.login-submit:hover i {
    transform: translateX(4px);
}


/* =========================================================
   FOOTER
========================================================= */

.login-footer {
    margin-top: 30px;

    text-align: center;
}

.login-footer p {
    color: #a0a8b5;

    font-size: 12px;
}

.login-footer i {
    margin-right: 5px;

    color: #6da7de;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 576px) {

    .login-page {
        padding: 20px;
    }

    .login-container {
        padding: 40px 25px;

        border-radius: 20px;
    }

    .mobile-login-logo {
        margin-bottom: 35px;
    }

    .login-header h2 {
        font-size: 30px;
    }

    .login-options {
        flex-direction: column;
        align-items: flex-start;
    }

}