/* ==========================================================================
   Dashboard de Negocios – Estilo "Admin moderno"
   --------------------------------------------------------------------------
   - Mobile first
   - Inspirado en TailAdmin / Paper Dashboard
   - NO toca ninguna clase de Bootstrap, sólo las prefijadas con bd-*
   ========================================================================== */

/* Paleta base */
:root {
    --bd-bg:        #f4f7fb;
    --bd-card:      #ffffff;
    --bd-border:    #e5e7eb;
    --bd-text:      #0f172a;
    --bd-muted:     #6b7280;
    --bd-primary:   #3056d3;
    --bd-primary-soft: rgba(48, 86, 211, 0.06);
    --bd-success:   #16a34a;
    --bd-warning:   #f59e0b;
    --bd-danger:    #ef4444;
    --bd-radius-lg: 1.1rem;
    --bd-radius-md: .85rem;
    --bd-shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.06);
}

/* Layout general del dashboard */
body {
    background: var(--bd-bg);
}

/* Contenedor principal del dashboard */
.bd-wrapper {
    padding-top: 1.25rem;
    padding-bottom: 88px; /* espacio para bottom nav en móvil */
}

/* ------------------------------------
   Header
   ------------------------------------ */
.bd-header-title {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--bd-text);
    letter-spacing: .01em;
}

.bd-header-subtitle {
    font-size: .95rem;
    color: var(--bd-muted);
}

/* Chips de contexto (ciudad, fecha) */
.bd-chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .18rem .7rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, .4);
    background: rgba(255, 255, 255, .9);
    font-size: .78rem;
    font-weight: 500;
    color: #475569;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.03);
}

.bd-chip i {
    font-size: .8rem;
    color: var(--bd-primary);
}

/* Botón "pendientes" + resumen de ventas (lado derecho del header) */
#business-dashboard .btn-outline-primary {
    border-radius: 999px;
    font-size: .8rem;
    padding-inline: .9rem;
}

/* ------------------------------------
   Tarjetas de métricas
   ------------------------------------ */

.bd-stat-card {
    border: 1px solid var(--bd-border);
    border-radius: var(--bd-radius-lg);
    box-shadow: var(--bd-shadow-soft);
    background: linear-gradient(135deg, #ffffff 0%, #f9fbff 100%);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
    position: relative;
    overflow: hidden;
}

.bd-stat-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top left, rgba(48, 86, 211, 0.06), transparent 55%);
    opacity: .8;
    pointer-events: none;
}

.bd-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
    border-color: rgba(148, 163, 184, .8);
}

.bd-stat-label {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 600;
    color: var(--bd-muted);
    margin-bottom: .1rem;
}

.bd-stat-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--bd-text);
}

.bd-stat-sub {
    font-size: .78rem;
    color: var(--bd-muted);
}

/* Ícono circular dentro de las tarjetas */
.bd-stat-icon {
    width: 2.8rem;
    height: 2.8rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    background: var(--bd-primary-soft);
    color: var(--bd-primary);
}

/* Variaciones de color */
.bd-stat-icon.bg-success {
    background: rgba(22, 163, 74, 0.08) !important;
    color: var(--bd-success) !important;
}

.bd-stat-icon.bg-warning {
    background: rgba(245, 158, 11, 0.08) !important;
    color: var(--bd-warning) !important;
}

.bd-stat-icon.bg-danger {
    background: rgba(239, 68, 68, 0.08) !important;
    color: var(--bd-danger) !important;
}

/* ------------------------------------
   Sección de filtros / chips de pedidos
   ------------------------------------ */

.bd-orders-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .35rem .9rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    background: #ffffff;
    font-size: .8rem;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.bd-orders-filter-chip i {
    font-size: .85rem;
}

.bd-orders-filter-chip.is-active,
.bd-orders-filter-chip:hover {
    background: var(--bd-primary);
    border-color: var(--bd-primary);
    color: #ffffff;
    box-shadow: 0 14px 40px rgba(37, 99, 235, 0.35);
}

/* ------------------------------------
   Tarjetas / tabla de pedidos recientes
   ------------------------------------ */

#business-dashboard .card {
    border-radius: var(--bd-radius-lg);
    border: 1px solid var(--bd-border);
    box-shadow: var(--bd-shadow-soft);
}

#business-dashboard .card-header {
    border-bottom: 1px solid var(--bd-border);
    background: #ffffff;
    padding-block: .75rem;
}

#business-dashboard .card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--bd-text);
}

#business-dashboard .table {
    font-size: .86rem;
}

#business-dashboard .table thead {
    background: linear-gradient(to right, #eff4ff, #eef2ff);
    border-bottom: 1px solid var(--bd-border);
}

#business-dashboard .table thead th {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #6b7280;
    border-bottom: none;
}

#business-dashboard .table tbody tr:hover {
    background: rgba(249, 250, 251, 0.9);
}

#business-dashboard .badge {
    border-radius: 999px;
    font-weight: 500;
}

/* Estado de pedidos (usa las clases que ya le pones en Blade) */
.badge.bg-warning {
    background-color: #fef3c7 !important;
    color: #92400e !important;
}
.badge.bg-info {
    background-color: #e0f2fe !important;
    color: #0369a1 !important;
}
.badge.bg-primary {
    background-color: #e0ecff !important;
    color: #1d4ed8 !important;
}
.badge.bg-success {
    background-color: #dcfce7 !important;
    color: #166534 !important;
}
.badge.bg-danger {
    background-color: #fee2e2 !important;
    color: #b91c1c !important;
}

/* ------------------------------------
   Acciones rápidas
   ------------------------------------ */

.bd-quick-actions .btn {
    border-radius: var(--bd-radius-md);
    border-width: 1px;
    border-color: var(--bd-border);
    font-size: .86rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    padding-block: .55rem;
    background: #ffffff;
    color: #1f2933;
    transition: transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
}

.bd-quick-actions .btn i {
    font-size: .9rem;
    color: var(--bd-primary);
}

.bd-quick-actions .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.10);
    border-color: rgba(148, 163, 184, .9);
}

/* ------------------------------------
   Modal de detalle de pedido
   ------------------------------------ */

#orderDetailModal .modal-content {
    border-radius: var(--bd-radius-lg);
    border: 1px solid var(--bd-border);
    box-shadow: var(--bd-shadow-soft);
}

.od-label {
    font-size: .75rem;
    text-transform: uppercase;
    color: #6b7280;
    letter-spacing: .05em;
    margin-bottom: .1rem;
}

.od-value {
    font-size: .9rem;
    color: #0f172a;
}

.od-section-title {
    font-size: .9rem;
    font-weight: 600;
    margin-top: .75rem;
    margin-bottom: .4rem;
}

/* ------------------------------------
   Bottom nav sólo móvil
   ------------------------------------ */

.business-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1030;
    display: block;
    background: transparent;
}

.business-bottom-nav-inner {
    margin: 0 auto .75rem;
    max-width: 460px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .55rem .9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow:
        0 22px 45px rgba(15, 23, 42, 0.18),
        0 0 0 1px rgba(148, 163, 184, 0.28);
    backdrop-filter: blur(16px);
}

.business-bottom-nav a {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .1rem;
    font-size: .7rem;
    font-weight: 500;
    color: #64748b;
    text-decoration: none;
}

.business-bottom-nav .icon-wrap {
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
    color: #64748b;
    background: #eef2ff;
    transition: background .15s ease, color .15s ease, transform .12s ease;
}

.business-bottom-nav a.is-active .icon-wrap,
.business-bottom-nav a:hover .icon-wrap {
    background: var(--bd-primary);
    color: #ffffff;
    transform: translateY(-1px);
}

.business-bottom-nav a.is-active span {
    color: var(--bd-primary);
}

/* Ocultar bottom nav en pantallas medianas hacia arriba */
@media (min-width: 768px) {
    .business-bottom-nav {
        display: none;
    }

    .bd-wrapper {
        padding-bottom: 1.5rem;
    }

    .bd-header-title {
        font-size: 1.6rem;
    }
}

/* ------------------------------------
   Responsivo tarjetas
   ------------------------------------ */

@media (min-width: 992px) {
    .bd-stat-card .bd-stat-value {
        font-size: 1.4rem;
    }
}


/* ============================================
   Sidebar de negocio tipo TailAdmin
   ============================================ */

.bd-layout {
    min-height: calc(100vh - 90px);
}

/* Sidebar */
.bd-sidebar {
    background: #ffffff;
    border-radius: 1.25rem;
    border: 1px solid #e5e7eb;
    padding: 1.25rem 1.1rem;
    box-shadow: 0 22px 45px rgba(15, 23, 42, 0.07);
}

/* Header del sidebar */
.bd-sidebar-logo {
    width: 36px;
    height: 36px;
    border-radius: 1rem;
    background: linear-gradient(135deg, #3056d3, #6366f1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.1rem;
    box-shadow: 0 12px 25px rgba(37, 99, 235, 0.35);
}

.bd-sidebar-title {
    font-size: .95rem;
    font-weight: 700;
    color: #0f172a;
}

.bd-sidebar-subtitle {
    font-size: .78rem;
}

/* Secciones */
.bd-sidebar-section-label {
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: #9ca3af;
    margin-bottom: .5rem;
}

/* Contenedor de links */
.bd-sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: .3rem;
}

/* Link base (también para botón ghost) */
.bd-sidebar-link {
    width: 100%;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .55rem .7rem;
    border-radius: .9rem;
    font-size: .82rem;
    color: #4b5563;
    text-decoration: none;
    text-align: left;
    transition:
        background .15s ease,
        color .15s ease,
        box-shadow .15s ease,
        transform .12s ease;
}

.bd-sidebar-link:hover {
    background: #f3f4ff;
    color: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 15px 35px rgba(37, 99, 235, 0.28);
}

.bd-sidebar-link.is-active {
    background: linear-gradient(135deg, #3056d3, #6366f1);
    color: #ffffff;
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.45);
}

.bd-sidebar-link.is-active .bd-sidebar-icon {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

/* Icono circular */
.bd-sidebar-icon {
    width: 26px;
    height: 26px;
    border-radius: .75rem;
    background: #eef2ff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    color: #4f46e5;
}

.bd-sidebar-text {
    flex: 1;
}

/* Botón ghost (Compartir menú) */
.bd-sidebar-link-ghost {
    margin-top: .35rem;
    background: #f9fafb;
    border-radius: 1rem;
}

.bd-sidebar-link-ghost .bd-sidebar-icon {
    background: rgba(79, 70, 229, 0.08);
}

/* Contenido principal */
.bd-main {
    padding-left: 0;
    padding-top: .15rem;
}

/* En mobile: sidebar arriba en bloque normal */
@media (max-width: 991.98px) {
    .bd-layout {
        min-height: auto;
    }
    .bd-sidebar {
        margin-bottom: 1rem;
    }
}


/* ========= Filtro de fechas tipo chips ========= */

.bd-date-filter-chips {
    gap: 0.4rem;
}

.bd-date-filter-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: #9ca3af;
}

.bd-date-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .25rem .7rem;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    font-size: .8rem;
    color: #4b5563;
    cursor: pointer;
    transition: background .15s ease, box-shadow .15s ease, transform .1s ease;
}

.bd-date-chip i {
    font-size: .9rem;
    color: #4f46e5;
}

.bd-date-chip:hover {
    background: #f3f4ff;
    box-shadow: 0 12px 28px rgba(79, 70, 229, 0.18);
    transform: translateY(-1px);
}

.bd-date-chip input[type="date"] {
    border: none;
    background: transparent;
    outline: none;
    padding: 0;
    margin: 0;
    font-size: .8rem;
    color: #111827;
    min-width: 7.5rem;
}

/* Quitar la flecha del input para dejar solo el icono del navegador */
.bd-date-chip input[type="date"]::-webkit-inner-spin-button,
.bd-date-chip input[type="date"]::-webkit-calendar-picker-indicator {
    margin-left: -.4rem;
}

/* Separador entre chips */
.bd-date-chip-separator {
    font-size: .9rem;
    color: #9ca3af;
}

/* Mobile: que no quede apretado */
@media (max-width: 575.98px) {
    .bd-date-filter-chips {
        justify-content: flex-start;
    }

    .bd-date-chip input[type="date"] {
        min-width: 6.2rem;
    }
}





/* ===========================
   Bottom bar móvil negocio
   =========================== */
.bd-mobile-nav{
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -4px 12px rgba(15, 23, 42, .08);
    display: flex;
    justify-content: space-around;
    padding: .3rem .25rem;
}

.bd-mobile-nav-link{
    flex: 1;
    text-align: center;
    font-size: .7rem;
    color: #6b7280;
    text-decoration: none;
    padding: .2rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .15rem;
}

.bd-mobile-nav-link i{
    font-size: 1.1rem;
}

.bd-mobile-nav-link.is-active{
    color: #fff;
}

.bd-mobile-nav-link.is-active i{
    /* circulito de fondo al icono */
    background: #4f46e5;
    border-radius: 999px;
    padding: .35rem;
    box-shadow: 0 4px 10px rgba(79,70,229,.35);
}

.bd-mobile-nav-link.is-active span{
    font-weight: 600;
}

/* Deja espacio al final del contenido para que no lo tape la barra */
@media (max-width: 767.98px){
    body{
        padding-bottom: 64px; /* ajusta si la barra queda más alta */
    }
}


/*Fin Antiguo*/

/* ===========================
   Layout general dashboard
   =========================== */

/* Ancho máximo un poco más amplio sólo para este dashboard */
@media (min-width: 1200px) {
    main > .container,
    .app-main > .container,
    body > .container {
        max-width: 1440px;
    }
}
@media (min-width: 1600px) {
    main > .container,
    .app-main > .container,
    body > .container {
        max-width: 1560px;
    }
}

/* Paleta y fondo */
:root {
    --bd-bg: #f3f4f6;
    --bd-card-bg: #ffffff;
    --bd-border: #e5e7eb;
    --bd-shadow-soft: 0 10px 22px rgba(15, 23, 42, 0.08);
    --bd-shadow-hover: 0 16px 35px rgba(15, 23, 42, 0.15);

    --bd-accent: #059669;      /* verde principal */
    --bd-accent-soft: #ecfdf3;
    --bd-muted: #9ca3af;
    --bd-text: #111827;
}

body {
    background: var(--bd-bg);
}

.bd-wrapper {
    padding: 1.5rem 1rem 2.5rem;
}
@media (min-width: 992px) {
    .bd-wrapper {
        padding-top: 2rem;
    }
}

/* Layout con sidebar */
.bd-layout {
    display: flex;
    gap: 1.75rem;
    align-items: flex-start;
}
.bd-sidebar {
    width: 260px;
    flex: 0 0 auto;
}
.bd-main {
    flex: 1 1 auto;
}

.bd-mobile-topbar {
    display: none;
}

@media (max-width: 991.98px) {
    .bd-layout {
        display: block;
    }
    .bd-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: 260px;
        max-width: 80%;
        transform: translateX(-100%);
        transition: transform .2s ease, box-shadow .2s ease;
        z-index: 1040;
    }
    .bd-sidebar.is-open {
        transform: translateX(0);
        box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.45);
    }
    .bd-main {
        width: 100%;
    }
    .bd-mobile-topbar {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        margin-bottom: .75rem;
    }
    .bd-mobile-hamburger {
        border-radius: 999px;
        border: 1px solid var(--bd-border);
        padding: .35rem .7rem;
        background: #ffffff;
        display: inline-flex;
        align-items: center;
        gap: .25rem;
    }
}

/* ===========================
   Encabezado "Pedidos del día"
   =========================== */

.bd-orders-header-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--bd-text);
}
.bd-orders-header-subtitle {
    font-size: .9rem;
    color: var(--bd-muted);
    margin-top: .15rem;
}

/* ===========================
   Toolbar: chips + búsqueda
   =========================== */

.bd-orders-toolbar {
    margin-bottom: 1rem;
    row-gap: .75rem;
}

.bd-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.bd-filter-chip {
    border: 0;
    border-radius: 999px;
    padding: .25rem .85rem;
    background: #ffffff;
    color: #4b5563;
    font-size: .8rem;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
    transition: background .15s ease, color .15s ease,
                box-shadow .15s ease, transform .1s ease;
}
.bd-filter-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}
.bd-filter-chip.is-active {
    background: var(--bd-accent);
    color: #ffffff;
}
.bd-filter-chip-count {
    min-width: 1.25rem;
    height: 1.25rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .16);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .7rem;
    font-weight: 600;
}

.bd-orders-search {
    display: flex;
    gap: .4rem;
    align-items: center;
    margin-top: .35rem;
}
.bd-orders-search input[type="search"] {
    font-size: .8rem;
    padding-top: .25rem;
    padding-bottom: .25rem;
}

@media (max-width: 575.98px) {
    .bd-orders-toolbar {
        flex-direction: column;
        align-items: stretch !important;
    }
    .bd-orders-search {
        width: 100%;
        justify-content: space-between;
    }
    .bd-orders-search input[type="search"] {
        flex: 1;
    }
}

/* ===========================
   Grid de tarjetas de pedido
   =========================== */

.bd-orders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.bd-order-card {
    background: var(--bd-card-bg);
    border-radius: 18px;
    padding: 1rem 1rem .85rem;
    border: 1px solid rgba(15, 23, 42, 0.03);
    box-shadow: var(--bd-shadow-soft);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 210px;
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
    cursor: default;
    overflow: hidden;  /* evita que la línea/progreso se salga de la card */
}
.bd-order-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--bd-shadow-hover);
    border-color: rgba(16, 185, 129, 0.4);
}

.bd-order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .5rem;
    margin-bottom: .4rem;
}
.bd-order-number {
    font-weight: 700;
    color: #111827;
    font-size: 0.95rem;
}

.bd-order-status-pill {
    border-radius: 999px;
    padding: .18rem .65rem;
    font-size: .7rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    background: #e5e7eb;
    color: #374151;
    white-space: nowrap;
}

.bd-status-new        { background: #fef9c3; color: #854d0e; }
.bd-status-confirmed  { background: #e0f2fe; color: #075985; }
.bd-status-preparing  { background: #ffedd5; color: #9a3412; }
.bd-status-ready      { background: #dcfce7; color: #166534; }
.bd-status-completed  { background: #bbf7d0; color: #166534; }
.bd-status-cancelled  { background: #fee2e2; color: #b91c1c; }

.bd-order-customer {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-size: .85rem;
    color: #374151;
    margin-bottom: .35rem;
}
.bd-order-customer i {
    color: var(--bd-accent);
}

.bd-order-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem 1rem;
    font-size: .72rem;
    color: var(--bd-muted);
    margin-bottom: .4rem;
}
.bd-order-meta-row {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
}
.bd-order-meta-row i {
    font-size: .8rem;
}

/* ===========================
   Barra de progreso de estado
   =========================== */

.bd-order-progress {
    margin-top: .5rem;
    padding-top: .2rem;
    overflow: hidden;           /* evita que algo se salga visualmente */
}

.bd-progress-track {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: .4rem;                 /* menos separación entre pasos */
    padding: .25rem .15rem .9rem;  /* menos padding lateral para usar más ancho */
}

.bd-progress-step {
    position: relative;
    background: transparent;
    border: 0;
    padding: 0 .15rem;          /* más compacto */
    cursor: pointer;
    flex: 1 1 0;
}

.bd-progress-step-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .12rem;
}

.bd-progress-circle {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    border: 2px solid #d1d5db;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .7rem;
    color: #9ca3af;
    z-index: 2;
}

.bd-progress-label {
    font-size: .65rem;
    line-height: 1.1;
    margin-top: .1rem;
    color: var(--bd-muted);
    text-align: center;
    white-space: normal;        /* permite dos líneas (ej: "Listo para\nentrega") */
    max-width: 3.7rem;          /* limita el ancho de cada etiqueta */
}

/* Conector entre pasos (línea) */
.bd-progress-step:not(.bd-progress-step-cancel)::after {
    content: "";
    position: absolute;
    top: 12px;                 /* centro del círculo */
    left: 55%;
    right: -40%;               /* un poco menos para que quepa todo */
    height: 2px;
    background: #e5e7eb;
    border-radius: 999px;
    z-index: 1;
}

/* Último paso y cancelado sin conector a la derecha */
.bd-progress-step:last-child::after,
.bd-progress-step.bd-progress-step-cancel::after {
    display: none;
}

/* Pasos COMPLETOS / ACTIVO → verde */
.bd-progress-step.is-complete .bd-progress-circle,
.bd-progress-step.is-active .bd-progress-circle {
    border-color: #16a34a;
    background: #ecfdf3;
    color: #16a34a;
}
.bd-progress-step.is-complete::after,
.bd-progress-step.is-active::after {
    background: #16a34a;
}
.bd-progress-step.is-complete .bd-progress-label {
    color: #16a34a;
    opacity: .85;
}
.bd-progress-step.is-active .bd-progress-label {
    color: #16a34a;
    font-weight: 700;
}

/* Paso cancelado: rojo, sin línea a la derecha */
.bd-progress-step.bd-progress-step-cancel .bd-progress-circle {
    border-color: #ef4444;
    background: #fef2f2;
    color: #ef4444;
}
.bd-progress-step.bd-progress-step-cancel .bd-progress-label {
    color: #ef4444;
}


/* ===========================
   Footer de tarjeta
   =========================== */

.bd-order-card-footer {
    margin-top: .8rem;
    padding-top: .55rem;
    border-top: 1px dashed rgba(148, 163, 184, 0.5);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .6rem;
}
.bd-order-footer-left {
    font-size: .75rem;
    color: var(--bd-muted);
}
.bd-order-total {
    font-size: 1rem;
    font-weight: 700;
    color: var(--bd-accent);
}
.bd-order-card-footer .btn-sm {
    font-size: .75rem;
    padding-inline: .7rem;
    border-radius: 999px;
}


/* ===========================
   Estado de carga
   =========================== */

.bd-order-card.is-loading {
    position: relative;
    opacity: .7;
    pointer-events: none;      /* desactiva clicks mientras carga */
}

.bd-order-card.is-loading::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.6); /* velo blanco */
    z-index: 2;
}

.bd-order-card.is-loading::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 26px;
    height: 26px;
    margin-top: -13px;
    margin-left: -13px;
    border-radius: 999px;
    border: 2px solid #e5e7eb;
    border-top-color: #16a34a; /* verde principal */
    animation: bd-spin .7s linear infinite;
    z-index: 3;
}

@keyframes bd-spin {
    to { transform: rotate(360deg); }
}


/* ===========================
   Grid métricas: 3 por fila en desktop
   =========================== */

.bd-summary-cards{
    display: grid;
    grid-template-columns: 1fr; /* mobile */
    gap: .75rem;
}

/* Tablet */
@media (min-width: 768px){
    .bd-summary-cards{
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Desktop: 3 por fila */
@media (min-width: 992px){
    .bd-summary-cards{
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Asegura que las cards no se estiren raro */
.bd-summary-card{
    min-width: 0;
}

/* ==========================================================================
   ✅ PATCHES (centrado empty state + estilo de fechas)
   ========================================================================== */

/* ✅ 1) Empty state (canasta) centrado dentro del grid y ocupando todo el ancho */
.bd-orders-grid > .text-center.py-5{
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 360px;
    margin: 0 !important;
}
.bd-orders-grid > .text-center.py-5 i{
    display: inline-block;
    margin: 0 auto 0.85rem auto !important;
}
.bd-orders-grid > .text-center.py-5 h4,
.bd-orders-grid > .text-center.py-5 h5,
.bd-orders-grid > .text-center.py-5 p{
    max-width: 520px;
}

/* ✅ 2) Filtro Desde/Hasta con estética “chip” (sin tocar Bootstrap global) */
.bd-date-filter-form{
    background: rgba(255,255,255,.96);
    border: 1px solid var(--bd-border);
    border-radius: 1.1rem;
    box-shadow: var(--bd-shadow-soft);
    padding: .85rem;
    display: flex;
    flex-wrap: wrap;
    gap: .6rem .75rem;
    align-items: flex-end;
}

.bd-date-filter-form > div{
    flex: 1 1 150px;
    min-width: 150px;
}

/* Acciones (Aplicar/Hoy) no deben estirarse */
.bd-date-filter-form > .d-flex{
    flex: 0 0 auto;
    min-width: auto;
}

/* Hint ocupa fila completa */
.bd-date-filter-form .bd-operational-hint{
    flex: 1 1 100%;
    min-width: 100%;
    margin-top: .15rem;
    font-size: .78rem;
    color: #6b7280;
    line-height: 1.25;
}

.bd-date-filter-form label{
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #9ca3af;
    font-weight: 700;
    margin-bottom: .15rem !important;
}

.bd-date-filter-form input[type="date"]{
    width: 100%;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,.45);
    background: #ffffff;
    padding: .40rem .85rem;
    font-size: .82rem;
    color: #111827;
    box-shadow: 0 8px 18px rgba(15,23,42,.04);
    transition: box-shadow .15s ease, border-color .15s ease, transform .1s ease;
}

.bd-date-filter-form input[type="date"]:hover{
    transform: translateY(-1px);
}

.bd-date-filter-form input[type="date"]:focus{
    outline: none;
    border-color: rgba(48, 86, 211, .6);
    box-shadow:
        0 0 0 4px rgba(48, 86, 211, .12),
        0 8px 18px rgba(15,23,42,.04);
}

/* Indicador del calendario un poco más “fino” */
.bd-date-filter-form input[type="date"]::-webkit-calendar-picker-indicator{
    opacity: .75;
    cursor: pointer;
}

/* Botones tipo pill (solo dentro del form) */
.bd-date-filter-form .btn{
    border-radius: 999px;
    padding-inline: .9rem;
}

.bd-date-filter-form .btn.btn-light{
    background: #ffffff;
    border: 1px solid rgba(148,163,184,.45);
}

.bd-date-filter-form .btn.btn-light:hover{
    background: #f3f4ff;
    border-color: rgba(79,70,229,.35);
}

/* Mobile: más compacto */
@media (max-width: 575.98px){
    .bd-date-filter-form{
        padding: .75rem;
        gap: .5rem .6rem;
    }
    .bd-date-filter-form > div{
        min-width: 135px;
    }
}
