:root {
    /*
    |--------------------------------------------------------------------------
    | Paleta corporativa Stride
    |--------------------------------------------------------------------------
    */

    --stride-primary: #ea3c33;
    --stride-primary-dark: #c92e27;
    --stride-primary-darker: #a9221d;
    --stride-primary-light: #fff0ef;
    --stride-primary-soft: #ffdeda;

    --stride-white: #ffffff;
    --stride-logo-white: #f1f1f1;

    --stride-background: #f6f7f8;
    --stride-background-secondary: #eef0f2;

    --stride-sidebar: #25272b;
    --stride-sidebar-dark: #1d1f22;
    --stride-sidebar-hover: #35383d;

    --stride-text: #292d32;
    --stride-muted: #737a82;
    --stride-border: #e2e5e8;

    --stride-success: #2f8f5b;
    --stride-warning: #c9891a;
    --stride-danger: #c92e27;

    --stride-shadow:
        0 12px 30px rgba(30, 32, 35, 0.08);

    --stride-shadow-strong:
        0 24px 55px rgba(30, 32, 35, 0.16);
}

/*
|--------------------------------------------------------------------------
| Base
|--------------------------------------------------------------------------
*/

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100%;
    margin: 0;
    color: var(--stride-text);
    background: var(--stride-background);
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

a {
    color: var(--stride-primary);
}

a:hover {
    color: var(--stride-primary-dark);
}

/*
|--------------------------------------------------------------------------
| Login
|--------------------------------------------------------------------------
*/

.login-body {
    position: relative;
    overflow-x: hidden;
    background:
        linear-gradient(
            145deg,
            #f5f6f7 0%,
            #eceeef 50%,
            #f8f8f8 100%
        );
}

.login-body::before {
    position: fixed;
    top: 0;
    right: 0;
    width: 38%;
    height: 100%;
    content: "";
    pointer-events: none;
    background:
        linear-gradient(
            150deg,
            rgba(234, 60, 51, 0.13),
            rgba(234, 60, 51, 0.025)
        );
    clip-path: polygon(38% 0, 100% 0, 100% 100%, 0 100%);
}

.login-decoration {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(1px);
}

.login-decoration-one {
    top: -160px;
    left: -140px;
    width: 360px;
    height: 360px;
    background: rgba(234, 60, 51, 0.09);
}

.login-decoration-two {
    right: -90px;
    bottom: -120px;
    width: 300px;
    height: 300px;
    background: rgba(234, 60, 51, 0.1);
}

.login-card {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: var(--stride-white);
    box-shadow: var(--stride-shadow-strong) !important;
}

.login-card::after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    content: "";
    background: var(--stride-primary);
}

.login-card-header {
    display: flex;
    justify-content: center;
    padding: 24px 24px 0;
}

.login-logo {
    width: 110px;
    height: 110px;
    display: block;
    object-fit: cover;
    border-radius: 16px;
    box-shadow:
        0 10px 22px rgba(234, 60, 51, 0.18);
}

.login-title {
    margin-bottom: 7px;
    color: var(--stride-text);
    font-size: 1.45rem;
    font-weight: 750;
}

.login-subtitle {
    color: var(--stride-muted);
    font-size: 0.91rem;
    line-height: 1.5;
}

.login-submit {
    min-height: 52px;
    border-radius: 11px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.login-security-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 18px;
    color: #61676d;
    font-size: 0.8rem;
    font-weight: 600;
}

.login-security-icon {
    font-size: 0.85rem;
}

.login-footer-text {
    margin-top: 10px;
    color: var(--stride-muted);
    font-size: 0.78rem;
}

/*
|--------------------------------------------------------------------------
| Formularios
|--------------------------------------------------------------------------
*/

.form-label {
    margin-bottom: 7px;
    color: #42484e;
    font-size: 0.88rem;
    font-weight: 650;
}

.form-control,
.form-select {
    min-height: 46px;
    border: 1px solid #d9dde1;
    border-radius: 10px;
    color: var(--stride-text);
    background-color: var(--stride-white);
}

.form-control-lg,
.form-select-lg {
    min-height: 52px;
    border-radius: 11px;
    font-size: 0.96rem;
}

.form-control::placeholder {
    color: #a1a7ad;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(234, 60, 51, 0.65);
    box-shadow:
        0 0 0 0.25rem rgba(234, 60, 51, 0.12);
}

/*
|--------------------------------------------------------------------------
| Botones
|--------------------------------------------------------------------------
*/

.btn {
    border-radius: 9px;
    font-weight: 650;
}

.btn-primary {
    color: var(--stride-white);
    background-color: var(--stride-primary);
    border-color: var(--stride-primary);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    color: var(--stride-white) !important;
    background-color: var(--stride-primary-dark) !important;
    border-color: var(--stride-primary-dark) !important;
}

.btn-outline-primary {
    color: var(--stride-primary);
    border-color: var(--stride-primary);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    color: var(--stride-white);
    background-color: var(--stride-primary);
    border-color: var(--stride-primary);
}

/*
|--------------------------------------------------------------------------
| Alertas
|--------------------------------------------------------------------------
*/

.alert {
    border: 0;
    border-radius: 11px;
    font-size: 0.9rem;
}

.alert-danger {
    color: #81211c;
    background: #ffe3e1;
}

.alert-success {
    color: #23683f;
    background: #e4f5eb;
}

.alert-warning {
    color: #76500f;
    background: #fff2d9;
}

/*
|--------------------------------------------------------------------------
| Estructura general del sistema
|--------------------------------------------------------------------------
*/

.app-layout {
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    color: var(--stride-white);
    background:
        linear-gradient(
            180deg,
            var(--stride-sidebar) 0%,
            var(--stride-sidebar-dark) 100%
        );
    transition: transform 0.25s ease;
}

/*
|--------------------------------------------------------------------------
| Logo y cabecera lateral
|--------------------------------------------------------------------------
*/

.sidebar-brand {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 128px;
    padding: 16px;
    border-bottom:
        1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-logo-link {
    display: block;
    text-decoration: none;
}

.sidebar-logo {
    width: 88px;
    height: 88px;
    display: block;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    box-shadow:
        0 10px 22px rgba(0, 0, 0, 0.2);
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease;
}

.sidebar-logo-link:hover .sidebar-logo {
    transform: translateY(-1px);
    box-shadow:
        0 12px 25px rgba(0, 0, 0, 0.25);
}

/*
|--------------------------------------------------------------------------
| Navegación lateral
|--------------------------------------------------------------------------
*/

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
}

.sidebar-section {
    padding: 20px 12px 8px;
    color: rgba(255, 255, 255, 0.42);
    font-size: 0.67rem;
    font-weight: 750;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.sidebar-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 45px;
    margin-bottom: 5px;
    padding: 11px 14px;
    overflow: hidden;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition:
        color 0.16s ease,
        background 0.16s ease,
        transform 0.16s ease;
}

.sidebar-link::before {
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: 0;
    width: 3px;
    content: "";
    border-radius: 0 4px 4px 0;
    background: transparent;
}

.sidebar-link:hover {
    color: var(--stride-white);
    background: var(--stride-sidebar-hover);
    transform: translateX(2px);
}

.sidebar-link.active {
    color: var(--stride-white);
    background:
        linear-gradient(
            90deg,
            rgba(234, 60, 51, 0.27),
            rgba(234, 60, 51, 0.1)
        );
}

.sidebar-link.active::before {
    background: var(--stride-primary);
}

.sidebar-link i {
    width: 21px;
    color: rgba(255, 255, 255, 0.64);
    text-align: center;
}

.sidebar-link.active i,
.sidebar-link:hover i {
    color: var(--stride-primary);
}

.sidebar-divider {
    height: 1px;
    margin: 18px 10px 14px;
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-logout {
    color: #ffaaa5;
}

.sidebar-logout:hover {
    color: var(--stride-white);
    background: rgba(234, 60, 51, 0.16);
}

.sidebar-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 14px 16px;
    padding: 12px;
    border:
        1px solid rgba(255, 255, 255, 0.07);
    border-radius: 11px;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.035);
}

.sidebar-footer-dot {
    width: 9px;
    height: 9px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #5bd18b;
    box-shadow:
        0 0 0 4px rgba(91, 209, 139, 0.12);
}

.sidebar-footer strong {
    display: block;
    font-size: 0.72rem;
}

.sidebar-footer small {
    display: block;
    margin-top: 1px;
    color: rgba(255, 255, 255, 0.43);
    font-size: 0.65rem;
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 1035;
    display: none;
    background: rgba(21, 23, 26, 0.55);
    backdrop-filter: blur(2px);
}

.app-main {
    min-height: 100vh;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
}

/*
|--------------------------------------------------------------------------
| Barra superior
|--------------------------------------------------------------------------
*/

.topbar {
    position: sticky;
    top: 0;
    min-height: 74px;
    z-index: 1030;
    display: flex;
    align-items: center;
    padding: 0 26px;
    background: rgba(255, 255, 255, 0.97);
    border-bottom: 1px solid var(--stride-border);
    box-shadow:
        0 3px 14px rgba(35, 38, 41, 0.035);
    backdrop-filter: blur(8px);
}

.sidebar-toggle {
    display: none;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    margin-right: 13px;
    color: var(--stride-text);
    background: var(--stride-background);
    border: 1px solid var(--stride-border);
}

.topbar-heading {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-heading-accent {
    width: 4px;
    height: 36px;
    display: block;
    border-radius: 5px;
    background: var(--stride-primary);
}

.topbar-title {
    color: var(--stride-text);
    font-size: 1.05rem;
    font-weight: 750;
    line-height: 1.15;
}

.topbar-subtitle {
    margin-top: 3px;
    color: var(--stride-muted);
    font-size: 0.72rem;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.topbar-user-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--stride-primary);
    background: var(--stride-primary-light);
    border: 1px solid var(--stride-primary-soft);
}

.topbar-user-name {
    color: var(--stride-text);
    font-size: 0.84rem;
    font-weight: 700;
}

.topbar-user-profile {
    margin-top: 1px;
    color: var(--stride-muted);
    font-size: 0.7rem;
}

/*
|--------------------------------------------------------------------------
| Contenido principal
|--------------------------------------------------------------------------
*/

.app-content {
    flex: 1;
    padding: 25px;
}

.app-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 25px;
    color: var(--stride-muted);
    background: var(--stride-white);
    border-top: 1px solid var(--stride-border);
    font-size: 0.78rem;
}

.welcome-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    overflow: hidden;
    padding: 24px;
    border: 1px solid var(--stride-border);
    border-radius: 15px;
    background:
        linear-gradient(
            115deg,
            var(--stride-white) 0%,
            var(--stride-white) 68%,
            var(--stride-primary-light) 100%
        );
    box-shadow: var(--stride-shadow);
}

.welcome-card::before {
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    content: "";
    background: var(--stride-primary);
}

.welcome-card h1 {
    color: var(--stride-text);
    font-weight: 750;
}

.welcome-date {
    padding: 8px 13px;
    border: 1px solid var(--stride-primary-soft);
    border-radius: 9px;
    color: var(--stride-primary-dark);
    background: var(--stride-primary-light);
    font-size: 0.83rem;
    font-weight: 700;
}

/*
|--------------------------------------------------------------------------
| Indicadores
|--------------------------------------------------------------------------
*/

.stat-card {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 15px;
    overflow: hidden;
    padding: 20px;
    border: 1px solid var(--stride-border);
    border-radius: 14px;
    background: var(--stride-white);
    box-shadow:
        0 8px 22px rgba(35, 38, 41, 0.045);
    transition:
        transform 0.17s ease,
        box-shadow 0.17s ease,
        border-color 0.17s ease;
}

.stat-card::after {
    position: absolute;
    right: -28px;
    bottom: -35px;
    width: 90px;
    height: 90px;
    content: "";
    border-radius: 50%;
    background: rgba(234, 60, 51, 0.045);
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--stride-primary-soft);
    box-shadow:
        0 13px 27px rgba(35, 38, 41, 0.08);
}

.stat-icon {
    width: 54px;
    height: 54px;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 14px;
    color: var(--stride-primary);
    background: var(--stride-primary-light);
    border: 1px solid var(--stride-primary-soft);
    font-size: 1.25rem;
}

.stat-value {
    color: var(--stride-text);
    font-size: 1.65rem;
    font-weight: 780;
    line-height: 1.05;
}

.stat-label {
    margin-top: 5px;
    color: var(--stride-muted);
    font-size: 0.82rem;
}

/*
|--------------------------------------------------------------------------
| Tarjetas
|--------------------------------------------------------------------------
*/

.card {
    border-radius: 14px;
}

.card.border-0 {
    box-shadow:
        0 9px 24px rgba(35, 38, 41, 0.055) !important;
}

.card-header {
    border-bottom: 1px solid var(--stride-border);
}

.card-header h2,
.card-header h3,
.card-header h4,
.card-header h5 {
    color: var(--stride-text);
    font-weight: 730;
}

/*
|--------------------------------------------------------------------------
| Tablas
|--------------------------------------------------------------------------
*/

.table-responsive {
    border-radius: 0 0 14px 14px;
}

.table {
    color: var(--stride-text);
}

.table thead th {
    padding-top: 14px;
    padding-bottom: 14px;
    color: #676f77;
    background: #f7f8f9;
    border-bottom: 1px solid var(--stride-border);
    font-size: 0.69rem;
    font-weight: 750;
    letter-spacing: 0.025em;
    text-transform: uppercase;
    white-space: nowrap;
}

.table td {
    padding-top: 14px;
    padding-bottom: 14px;
    border-color: #eceef0;
    vertical-align: middle;
}

.table-hover > tbody > tr:hover > * {
    --bs-table-accent-bg:
        rgba(234, 60, 51, 0.035);
}

/*
|--------------------------------------------------------------------------
| Insignias
|--------------------------------------------------------------------------
*/

.badge {
    padding: 0.48em 0.68em;
    border-radius: 7px;
    font-weight: 650;
}

.badge.text-bg-primary,
.text-bg-primary {
    color: var(--stride-white) !important;
    background-color: var(--stride-primary) !important;
}

.badge.text-bg-success,
.text-bg-success {
    color: var(--stride-white) !important;
    background-color: var(--stride-success) !important;
}

.badge.text-bg-danger,
.text-bg-danger {
    color: var(--stride-white) !important;
    background-color: var(--stride-danger) !important;
}

/*
|--------------------------------------------------------------------------
| Adaptación tablet
|--------------------------------------------------------------------------
*/

@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
        box-shadow:
            14px 0 35px rgba(0, 0, 0, 0.25);
    }

    .sidebar-overlay.show {
        display: block;
    }

    .app-main {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: inline-flex;
    }
}

/*
|--------------------------------------------------------------------------
| Adaptación móvil
|--------------------------------------------------------------------------
*/

@media (max-width: 575.98px) {
    .login-card-header {
        padding-top: 20px;
    }

    .login-logo {
        width: 90px;
        height: 90px;
        border-radius: 14px;
    }

    .sidebar-brand {
        min-height: 112px;
    }

    .sidebar-logo {
        width: 76px;
        height: 76px;
        border-radius: 12px;
    }

    .topbar {
        min-height: 68px;
        padding: 0 14px;
    }

    .topbar-subtitle {
        display: none;
    }

    .topbar-heading-accent {
        height: 30px;
    }

    .app-content {
        padding: 15px;
    }

    .app-footer {
        flex-direction: column;
        padding: 15px;
        text-align: center;
    }

    .welcome-card {
        align-items: flex-start;
        flex-direction: column;
        padding: 20px;
    }

    .welcome-date {
        align-self: flex-start;
    }

    .stat-card {
        padding: 17px;
    }

    .stat-icon {
        width: 48px;
        height: 48px;
        font-size: 1.1rem;
    }

    .stat-value {
        font-size: 1.45rem;
    }
}