/* delivered_orders.css - business orders style */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    background: #f5f7fa; 
}

.dashboard-container { 
    padding: 24px; 
    max-width: 1400px; 
    margin-left: 260px;
    position: relative;
    z-index: 1;
    overflow-x: hidden;
    width: calc(100% - 260px);
}

@media (max-width: 992px) {
    .dashboard-container { 
        margin-left: 0; 
        padding-bottom: 100px;
        width: 100%;
        padding: 56px 18px 100px 18px;
    }
}

.dashboard-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 24px; 
    flex-wrap: wrap;
    gap: 16px;
}

.dashboard-header h1 { 
    font-size: 28px; 
    color: #1a202c; 
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-filter {
    display: flex;
    gap: 8px;
    background: white;
    padding: 6px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    flex-wrap: nowrap;
    overflow-x: auto;
}

@media (max-width: 800px) {
    .dashboard-header {
        flex-direction: column;
        align-items: stretch;
        margin-top: 0;
        margin-bottom: 18px;
    }
    
    .date-filter {
        width: 100%;
        justify-content: flex-start;
    }
}

.date-filter .btn {
    padding: 10px 18px;
    border: none;
    background: transparent;
    color: #64748b;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    font-size: 14px;
}

.date-filter .btn:hover {
    background: #eff6ff;
    color: #3b82f6;
}

.date-filter .btn.active {
    background: #3b82f6;
    color: white;
}

.summary-scroller {
    margin-bottom: 28px;
    width: 100%;
    overflow: hidden;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    width: 100%;
}

@media (max-width: 1024px) {
    .summary-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
    
    .card {
        padding: 16px;
        gap: 12px;
    }
}

.card {
    background: white;
    border-radius: 14px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.card-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    flex-shrink: 0;
}

.bg-blue { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.bg-green { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.bg-purple { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.bg-orange { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }

.card-info {
    flex: 1;
}

.card-info h3 {
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-info span {
    font-size: 24px;
    font-weight: 700;
    color: #1a202c;
}

.orders-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

@media (max-width: 992px) {
    .orders-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .orders-grid {
        grid-template-columns: 1fr;
    }
}

.order-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 14px;
    align-items: center;
    min-height: 94px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 14px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.order-card:hover,
.order-card:focus-visible {
    border-color: #3b82f6;
    box-shadow: 0 8px 18px rgba(59, 130, 246, 0.16);
    transform: translateY(-1px);
    outline: none;
}

.order-card__media {
    display: flex;
    align-items: center;
    justify-content: center;
}

.order-card__content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 5px;
}

.order-card__total {
    align-self: end;
    font-size: 0.9rem;
    font-weight: 600;
    color: #334155;
    text-align: right;
    white-space: nowrap;
}

.company-logo {
    width: 62px;
    height: 62px;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 1px solid #dbe3f0;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.company-logo .company-initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 22px;
    color: white;
    letter-spacing: 0.7px;
}

.company-logo img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.company-logo i {
    font-size: 40px;
    color: white;
}

.company-name {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 700;
    color: #1e293b;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.order-number {
    margin: 0;
    color: #94a3b8;
    font-size: 0.84rem;
}

.order-inline-total {
    margin: 0;
    color: #1d4ed8;
    font-size: 0.92rem;
    font-weight: 600;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 0.73rem;
    font-weight: 700;
    text-transform: capitalize;
    padding: 4px 10px;
}

.status-accepted { background: #e0e7ff; color: #4f46e5; }
.status-waiting_driver_pickup { background: #e0f2fe; color: #075985; }
.status-sent { background: #dbeafe; color: #2563eb; }
.status-delivered { background: #dcfce7; color: #16a34a; }

.grid-sentinel {
    height: 1px;
}

.empty {
    padding: 60px 24px;
    background: white;
    border: 2px dashed #e2e8f0;
    border-radius: 14px;
    text-align: center;
    color: #64748b;
}

.empty i {
    font-size: 64px;
    margin-bottom: 12px;
    color: #cbd5e0;
}

.empty h3 {
    font-size: 20px;
    color: #475569;
    margin-bottom: 8px;
}

html[data-theme='dark'] body {
    background: #020617;
    color: #e2e8f0;
}

html[data-theme='dark'] .dashboard-header h1 {
    color: #f8fafc;
}

html[data-theme='dark'] .date-filter {
    background: #111827;
    box-shadow: 0 8px 20px rgba(2, 6, 23, 0.35);
    border: 1px solid #334155;
}

html[data-theme='dark'] .date-filter .btn {
    color: #cbd5e1;
}

html[data-theme='dark'] .date-filter .btn:hover {
    background: rgba(59, 130, 246, 0.18);
    color: #bfdbfe;
}

html[data-theme='dark'] .date-filter .btn.active {
    background: #2563eb;
    color: #ffffff;
}

html[data-theme='dark'] .card {
    background: #0f172a;
    box-shadow: 0 8px 24px rgba(2, 6, 23, 0.3);
    border: 1px solid #334155;
}

html[data-theme='dark'] .card:hover {
    box-shadow: 0 14px 30px rgba(2, 6, 23, 0.4);
}

html[data-theme='dark'] .card-info h3 {
    color: #94a3b8;
}

html[data-theme='dark'] .card-info span {
    color: #f1f5f9;
}

html[data-theme='dark'] .order-card {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

html[data-theme='dark'] .order-card:hover,
html[data-theme='dark'] .order-card:focus-visible {
    border-color: #60a5fa;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.25);
}

html[data-theme='dark'] .company-logo {
    border-color: #475569;
}

html[data-theme='dark'] .company-name {
    color: #f1f5f9;
}

html[data-theme='dark'] .order-number {
    color: #94a3b8;
}

html[data-theme='dark'] .order-inline-total {
    color: #93c5fd;
}

html[data-theme='dark'] .order-card__total {
    color: #cbd5e1;
}

html[data-theme='dark'] .status-accepted {
    background: rgba(99, 102, 241, 0.2);
    color: #c7d2fe;
}

html[data-theme='dark'] .status-waiting_driver_pickup {
    background: rgba(14, 165, 233, 0.2);
    color: #bae6fd;
}

html[data-theme='dark'] .status-sent {
    background: rgba(59, 130, 246, 0.2);
    color: #bfdbfe;
}

html[data-theme='dark'] .status-delivered {
    background: rgba(34, 197, 94, 0.2);
    color: #86efac;
}

html[data-theme='dark'] .empty {
    background: #0f172a;
    border-color: #334155;
    color: #94a3b8;
}

html[data-theme='dark'] .empty i {
    color: #64748b;
}

html[data-theme='dark'] .empty h3 {
    color: #e2e8f0;
}

