/* --- General & Dashboard Styles --- */
body {
    background-color: #f0f2f5;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* --- NAYI TABDEELI: Main App ki Width Control Karna --- */
.container-fluid {
    max-width: 100%;
    margin: 0 auto;
}

.navbar { box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.stat-card-link { text-decoration: none; }
.stat-card { border-radius: 8px; padding: 20px; margin-bottom: 25px; display: flex; align-items: center; gap: 15px; color: white; box-shadow: 0 4px 12px rgba(0,0,0,0.1); transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out; }
.stat-card:hover { transform: translateY(-5px); box-shadow: 0 8px 16px rgba(0,0,0,0.15); }
.stat-card i { font-size: 24px; opacity: 0.8; }
.stat-card .stat-info { line-height: 1.2; }
.stat-card h3 { margin: 0; font-size: 2rem; font-weight: bold; }
.stat-card p { margin: 0; font-size: 0.9rem; white-space: nowrap; }
.stat-card.bg-primary { background-color: #0d6efd !important; }
.stat-card.bg-warning { background-color: #ffc107 !important; color: #000 !important; }
.stat-card.bg-success { background-color: #198754 !important; }
.stat-card.bg-info { background-color: #0dcaf0 !important; color: #000 !important; }
.stat-card.bg-danger { background-color: #dc3545 !important; }
.stat-card.bg-dark { background-color: #212529 !important; }
.card { border: none; border-radius: 10px; box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.card-header { background-color: #fff; border-bottom: 1px solid #dee2e6; padding: 1rem 1.5rem; }
.card-title { margin: 0; font-weight: 600; font-size: 1.25rem; }
.filter-container { background-color: #fff; padding: 1rem 1.5rem; border-bottom: 1px solid #dee2e6; }
.status-filters .btn { margin-right: 5px; margin-bottom: 5px; border-radius: 20px; padding: 5px 15px; }
.badge { padding: 0.5em 0.75em; font-size: 0.8rem; font-weight: 600; border-radius: 5px; }
.status-cancelled { background-color: #dc3545 !important; color: white !important; }
.status-pending-confirmation { background-color: #ffc107 !important; color: #000 !important; }
.status-confirmed { background-color: #198754 !important; color: white !important; }
.status-fulfilled, .status-dispatched { background-color: #0dcaf0 !important; color: #000 !important; }
.financial-paid { background-color: #198754 !important; color: white !important; }
.financial-pending { background-color: #ffc107 !important; color: #000 !important; }
.financial-unpaid, .financial-refunded { background-color: #6c757d !important; color: white !important; }
.action-buttons { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-width: 120px; }
.action-buttons form, .action-buttons .btn { width: 100%; }

/* --- Login Page Specific Styles --- */
.login-page-body {
    background: linear-gradient(to right, #6a11cb, #2575fc);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}
.login-card {
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    padding: 40px;
    backdrop-filter: blur(10px);
}
.login-header {
    text-align: center;
    margin-bottom: 30px;
}
.login-header i {
    font-size: 48px;
    color: #0d6efd;
}
.login-header h2 {
    font-weight: 700;
    margin-top: 15px;
}
.login-card .form-control:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}
.login-card .btn-primary {
    font-weight: 600;
    padding: 12px;
}

/* --- Styling for Tracking Details Modal (New Design) --- */
.tracking-details-container {
    padding: 1.5rem;
    background-color: #f1f1f1;
    border-radius: 8px;
}

/* Main grid for the header */
.tracking-header-grid {
    display: grid;
    grid-template-columns: 1fr 2.5fr 1.5fr; /* Icon, ID, Status */
    text-align: center;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Top row (dark grey titles) */
.tracking-header-title {
    background-color: #4a4a4a;
    color: white;
    padding: 0.75rem;
    font-weight: bold;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Bottom row (light grey data) */
.tracking-header-data {
    background-color: #e9ecef;
    color: #333;
    padding: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
}

/* History section */
.tracking-history {
    padding: 1rem 0;
}
.tracking-event {
    margin-bottom: 0.75rem !important;
    font-size: 0.9rem;
    color: #555;
}

/* ===================== */
/* === ADDED: tokens ====*/
/* ===================== */
:root{
    --soft-bg:#f7f8fa;
    --card-bg:#ffffff;
    --muted:#6c757d;
    --chip:#eef1f6;
    --radius:.75rem;
    --radius-sm:.5rem;
}

/* ========================================= */
/* === ADDED: product image (no popup) ===== */
/* ========================================= */
.product-image{
    width:52px;
    height:52px;
    object-fit:cover;
    border-radius:.5rem;
}
/* remove hand cursor so it doesn’t look tappable */
.product-image.clickable{ cursor: default; }

/* placeholder stays neat */
.product-image.placeholder{
    width:52px; height:52px; border-radius:.5rem; background:#f1f3f5;
    display:flex; align-items:center; justify-content:center;
}

/* ========================================= */
/* === ADDED: status chips for mobile ====== */
/* ========================================= */
.status-chip{
    display:inline-flex; align-items:center; gap:.5rem;
    font-weight:600; padding:.25rem .6rem; border-radius:999px; font-size:.78rem;
    background:var(--chip);
}
.status-Cancelled { background:#fdecea; color:#b42318; }
.status-Fulfilled, .status-Delivered { background:#eafaf1; color:#067647; }
.status-Returned { background:#fff3e0; color:#8a6d3b; }
.status-Pending\ Confirmation { background:#e7f0ff; color:#1849a9; }
.status-Customer\ Query { background:#6f42c1; color:#fff; }
.status-default { background:var(--chip); color:#1f2937; }

/* ========================================= */
/* === ADDED: Mobile card list layout ====== */
/* ========================================= */
.orders-list{ display:grid; gap:.75rem; }
.order-card{
    background:var(--card-bg); border:1px solid #eceff3; border-radius:var(--radius);
    padding:.85rem; box-shadow:0 1px 0 rgba(16,24,40,.04);
}
.order-card .top-row{
    display:flex; align-items:center; justify-content:space-between; gap:.75rem;
}
.order-card .meta{ display:flex; align-items:center; gap:.65rem; min-width:0; }
.order-card .meta .id{ font-weight:700; white-space:nowrap; }
.order-card .meta .name{ font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.order-card .badges{ display:flex; gap:.4rem; flex-wrap:wrap; justify-content:flex-end; }
.order-card .grid{
    display:grid; grid-template-columns: 1fr 1fr; gap:.5rem .75rem; margin-top:.6rem;
}
.order-card .grid .item{ font-size:.86rem; }
.order-card .label{ color:var(--muted); display:block; font-size:.75rem; }
.order-card .value{ font-weight:600; }

/* Mobile sticky bulk bar */
.bulk-bar{
    position:sticky; top:0; z-index:9; background:var(--soft-bg);
    border-bottom:1px solid #e9edf2; padding:.5rem .25rem; margin-bottom:.5rem;
    display:flex; align-items:center; gap:.75rem; justify-content:space-between;
}

/* ========================================= */
/* === ADDED: Desktop table polish ========= */
/* ========================================= */
.table-sm-font { font-size: .92rem; }              /* slightly larger for readability */
.table-sm-font td, .table-sm-font th { padding: .7rem .75rem; }
.table thead th{ position:sticky; top:0; background:#fff; z-index:5; box-shadow:inset 0 -1px 0 #edf2f7; }
.align-middle td, .align-middle th{ vertical-align: middle; }
.action-buttons .dropdown-menu{ min-width: max(220px, 16rem); }

/* ========================================= */
/* === ADDED: Responsive view switch ======= */
/* ========================================= */
@media (min-width: 768px){
    .orders-list{ display:none; }        /* hide cards on md+ */
    .table-wrap{ display:block; }        /* show table on md+ */
}
@media (max-width: 767.98px){
    .table-wrap{ display:none; }         /* hide table on mobile */
}

/* ========================================= */
/* === OPTIONAL: Slightly bigger image ===== */
/* === (uncomment if you want)            ==*/
/* ========================================= */
/*
.product-image,
.product-image.placeholder { width:64px; height:64px; }
*/
