body {
    background: #0f172a;
    font-family: 'Segoe UI', sans-serif;
    color: #e2e8f0;
}

.sidebar {
    width: 260px;
    height: 100vh;
    background: #111827;
    border-right: 1px solid #1f2937;
    padding: 24px 16px;
    position: fixed;
    top: 0;
    left: 0;
}

.sidebar {
    width: 250px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.sidebar-footer {
    margin-top: auto;
}

.contenido {
    margin-left: 260px;
    padding: 40px;
    color: #e5e7eb;
}

.sidebar-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.sidebar-link {
    color: #9ca3af !important;
    padding: 12px 16px !important;
    margin-bottom: 6px;
    border-radius: 10px;
    transition: all .2s ease;
    font-weight: 500;
}

    .sidebar-link:hover {
        background: #1f2937;
        color: #ffffff !important;
    }

    .sidebar-link.active {
        background: #1f2937;
        color: #ffffff !important;
    }

.card,
.table,
.form-control,
.form-select {
    background-color: #1e293b;
    color: #e5e7eb;
    border-color: #334155;
}

    .form-control:focus,
    .form-select:focus {
        background-color: #1e293b;
        color: #ffffff;
        border-color: #2563eb;
        box-shadow: none;
    }

/*Autocompletado de navegador*/
    .form-control:-webkit-autofill,
    .form-control:-webkit-autofill:hover,
    .form-control:-webkit-autofill:focus,
    .form-control:-webkit-autofill:active {
        -webkit-box-shadow: 0 0 0 1000px #1e293b inset !important;
        box-shadow: 0 0 0 1000px #1e293b inset !important;
        -webkit-text-fill-color: #e5e7eb !important;
        caret-color: #e5e7eb;
        border: 1px solid #334155 !important;
    }

.login-card .form-control:-webkit-autofill,
.login-card .form-control:-webkit-autofill:hover,
.login-card .form-control:-webkit-autofill:focus,
.login-card .form-control:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #0f172a inset !important;
    box-shadow: 0 0 0 1000px #0f172a inset !important;
    -webkit-text-fill-color: #f8fafc !important;
    caret-color: #f8fafc;
    border: 1px solid #334155 !important;
}

table {
    color: #e5e7eb !important;
}

th {
    color: #ffffff;
}

/* Cards de pedidos */
.card {
    background: #1e293b !important;
    border: 1px solid #334155 !important;
    border-radius: 16px !important;
    overflow: hidden;
}

.card-header {
    background: #111827 !important;
    border-bottom: 1px solid #334155 !important;
    color: #e5e7eb;
    padding: 1rem 1.25rem;
}

.card-body {
    color: #e5e7eb;
}

.card-footer {
    background: #111827 !important;
    border-top: 1px solid #334155 !important;
}

/* Texto */
.text-secondary {
    color: #94a3b8 !important;
}

.text-muted {
    color: #94a3b8 !important;
}

/* Cliente */
.card-body h4 {
    color: #f8fafc;
    font-weight: 600;
}

/* Precio */
.fs-2.fw-bold {
    color: #60a5fa;
}

/* Productos */
.bg-light.rounded.p-3 {
    background: #0f172a !important;
    border: 1px solid #334155;
    color: #e5e7eb;
}

/* Badges informativos */
.badge.bg-light {
    background: #1e293b !important;
    color: #cbd5e1 !important;
    border: 1px solid #475569 !important;
}

/* Botones */
.btn-primary {
    background: #2563eb;
    border: none;
}

.btn-success {
    border: none;
}

.btn-danger {
    border: none;
}

/* Separador */
hr {
    border-color: #334155;
    opacity: 1;
}

/*Login*/

.login-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #0f172a;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 20px;
    padding: 40px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

    .login-header h2 {
        color: #f8fafc;
        font-weight: 700;
        margin-bottom: 8px;
    }

    .login-header p {
        color: #94a3b8;
        margin: 0;
    }

.login-card .form-label {
    color: #cbd5e1;
}

.login-card .form-control {
    background: #0f172a;
    border: 1px solid #334155;
    color: #f8fafc;
    padding: 12px;
}

    .login-card .form-control:focus {
        background: #0f172a;
        color: #f8fafc;
        border-color: #2563eb;
        box-shadow: none;
    }

.login-card .btn-primary {
    padding: 12px;
    border-radius: 10px;
    font-weight: 600;
}


.contenido-login {
    margin-left: 0;
    padding: 0;
}

.loader-overlay {
    z-index: 9999;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
}

.spinner-grande {
    width: 5rem;
    height: 5rem;
    border-width: 0.5rem;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    width: 100%;
    background: rgba(255, 255, 255, 1);
    transform-origin: left;
    animation: shrink 3s linear forwards;
}

@keyframes shrink {
    from {
        transform: scaleX(1);
    }

    to {
        transform: scaleX(0);
    }
}

.toast-body {
    font-size: 1.08rem;
    font-weight: 500;
}

.mobile-block {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background-color: #1e293b;
}

/* En desktop lo ocultamos */
@media (min-width: 900px) {
    .mobile-block {
        display: none !important;
    }
}

.form-control::placeholder {
    color: #fff;
    opacity: 0.2;
}

/* Tabla estadísticas */
.estadistica-card {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #334155;
}

.estadistica-table {
    background: #1e293b !important;
    color: #e5e7eb;
}

    .estadistica-table thead {
        background: #111827;
    }

    .estadistica-table th {
        color: #f8fafc;
        font-weight: 600;
        padding: 14px 18px;
        border-bottom: 1px solid #334155;
        background-color: #222939;
    }

    .estadistica-table td {
        padding: 14px 18px;
        color: #cbd5e1;
        border-color: #334155;
        vertical-align: middle;
        background-color: #222939;
    }

    .estadistica-table tbody tr {
        transition: background .2s ease;
    }

        .estadistica-table tbody tr:hover {
            background: #263449;
        }

.badge-dias {
    background: #1e40af;
    color: #dbeafe;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: .85rem;
    font-weight: 600;
}

/* Scroll interno para tablas de estadísticas */
.estadistica-card .card-body {
    max-height: 420px;
    overflow-y: auto;
}

/* Mantener encabezado visible */
.estadistica-table thead th {
    position: sticky;
    top: 0;
    background: #111827 !important;
    z-index: 2;
}

/* Scroll con estilo acorde al tema */
.estadistica-card .card-body::-webkit-scrollbar {
    width: 8px;
}

.estadistica-card .card-body::-webkit-scrollbar-track {
    background: #0f172a;
}

.estadistica-card .card-body::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 10px;
}

    .estadistica-card .card-body::-webkit-scrollbar-thumb:hover {
        background: #475569;
    }