/* ============================================================
   COCO ELITE - MY ORDERS / ORDER DETAILS / TRACKING
============================================================ */

:root {
    --ce-green-900: #0b3d24;
    --ce-green-700: #146c43;
    --ce-green-600: #198754;
    --ce-green-500: #23a06a;
    --ce-green-400: #43c08a;
    --ce-green-100: #e4f5ec;
    --ce-accent: #ffb703;
    --ce-dark: #0f1f18;
    --ce-bg: #f4f8f6;
    --ce-surface: #ffffff;
    --ce-border: #e4ebe7;
    --ce-text: #17271f;
    --ce-muted: #64766d;
    --ce-radius-sm: 10px;
    --ce-radius: 16px;
    --ce-shadow-sm: 0 2px 10px rgba(15, 44, 31, .06);
    --ce-shadow: 0 14px 34px -12px rgba(15, 44, 31, .18);
    --ce-gradient: linear-gradient(135deg, #0e6b3d 0%, #1e9e68 55%, #3cc584 100%);
    --ce-font: 'Plus Jakarta Sans', 'Poppins', 'Segoe UI', Arial, sans-serif;
}

body {
    background: var(--ce-bg);
    font-family: var(--ce-font);
    color: var(--ce-text);
}

/* ============================================================
   PAGE TITLE
============================================================ */

.page-title {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--ce-green-700);
    margin-bottom: 25px;
}

/* ============================================================
   CARD
============================================================ */

.order-card {
    border: 1px solid var(--ce-border);
    border-radius: var(--ce-radius);
    box-shadow: var(--ce-shadow-sm);
    overflow: hidden;
    transition: all .3s ease;
}

.order-card:hover {
    box-shadow: var(--ce-shadow);
}

.order-card .card-header {
    background: var(--ce-gradient);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    border: none;
    padding: 16px 22px;
}

.order-card .card-body {
    background: var(--ce-surface);
    padding: 24px;
}

/* ============================================================
   TABLE
============================================================ */

.table {
    margin-bottom: 0;
}

.table thead {
    background: var(--ce-gradient);
    color: #fff;
}

.table thead th {
    border: none;
    text-align: center;
    vertical-align: middle;
    padding: 14px 10px;
    font-weight: 600;
    letter-spacing: .02em;
}

.table tbody td {
    text-align: center;
    vertical-align: middle;
    border-color: var(--ce-border);
}

.table tbody tr {
    transition: background .2s ease;
}

.table tbody tr:hover {
    background: var(--ce-green-100);
}

/* ============================================================
   BADGES
============================================================ */

.badge {
    padding: 8px 14px;
    font-size: 13px;
    border-radius: 999px;
    font-weight: 600;
}

/* ============================================================
   BUTTONS
============================================================ */

.btn-view {
    background: var(--ce-gradient);
    color: #fff;
    border: none;
    border-radius: 10px;
    box-shadow: 0 8px 18px -8px rgba(25, 135, 84, .55);
    transition: all .28s ease;
}

.btn-view:hover {
    background: linear-gradient(135deg, #0c5c31, #2fb178);
    color: #fff;
    transform: translateY(-2px);
}

.btn-track {
    background: linear-gradient(135deg, #1f6feb, #3b82f6);
    color: #fff;
    border: none;
    border-radius: 10px;
    box-shadow: 0 8px 18px -8px rgba(37, 99, 235, .5);
    transition: all .28s ease;
}

.btn-track:hover {
    background: linear-gradient(135deg, #1a5fd1, #2f74e8);
    color: #fff;
    transform: translateY(-2px);
}

/* ============================================================
   ORDER DETAILS INFO
============================================================ */

.order-info {
    background: var(--ce-surface);
    border: 1px solid var(--ce-border);
    border-radius: var(--ce-radius);
    padding: 22px;
    margin-bottom: 20px;
    box-shadow: var(--ce-shadow-sm);
}

.order-info h5 {
    color: var(--ce-green-700);
    font-weight: 700;
    margin-bottom: 15px;
}

.order-info p {
    margin-bottom: 8px;
}

/* ============================================================
   PRODUCT LIST
============================================================ */

.product-item {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--ce-border);
    transition: background .2s ease;
}

.product-item:hover {
    background: var(--ce-green-100);
}

.product-item:last-child {
    border-bottom: none;
}

.product-item img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: var(--ce-radius-sm);
    border: 1px solid var(--ce-border);
    margin-right: 15px;
    box-shadow: var(--ce-shadow-sm);
}

.product-name {
    font-weight: 600;
    color: var(--ce-text);
}

.product-price {
    color: var(--ce-green-600);
    font-weight: 700;
}

/* ============================================================
   TRACKING PROGRESS
============================================================ */

.progress {
    height: 28px;
    border-radius: 999px;
    background: var(--ce-green-100);
    overflow: hidden;
}

.progress-bar {
    font-weight: 700;
    line-height: 28px;
    border-radius: 999px;
    background: var(--ce-gradient);
    transition: width 1s cubic-bezier(.22, .68, .35, 1.15);
}

/* ============================================================
   TOTAL
============================================================ */

.order-total {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.01em;
    color: var(--ce-green-600);
}

/* ============================================================
   EMPTY ORDERS
============================================================ */

.empty-orders {
    text-align: center;
    padding: 60px 20px;
}

.empty-orders i {
    font-size: 70px;
    color: var(--ce-green-600);
    background: var(--ce-green-100);
    width: 120px;
    height: 120px;
    line-height: 120px;
    border-radius: 50%;
    display: inline-block;
}

.empty-orders h3 {
    margin-top: 20px;
    font-weight: 700;
}

.empty-orders p {
    color: var(--ce-muted);
}

.empty-orders .btn {
    margin-top: 20px;
    border-radius: 12px;
}

/* ============================================================
   RESPONSIVE
============================================================ */

@media (max-width: 768px) {

    .table {
        font-size: 13px;
    }

    .table th,
    .table td {
        padding: 8px;
    }

    .page-title {
        font-size: 24px;
    }

    .product-item {
        flex-direction: column;
        text-align: center;
    }

    .product-item img {
        margin-right: 0;
        margin-bottom: 10px;
    }

    .order-total {
        font-size: 18px;
    }

}

/* ============================================================
   DARK MODE (Bootstrap 5.3 color modes)
============================================================ */

[data-bs-theme="dark"] {
    --ce-bg: #0c1210;
    --ce-surface: #141d19;
    --ce-border: #26322c;
    --ce-text: #d1d5db;
    --ce-muted: #8fa69b;
    --ce-green-600: #2fbd82;
    --ce-green-700: #3fcf92;
    --ce-green-100: rgba(160, 166, 162, .15);
    --ce-shadow-sm: 0 2px 10px rgba(0, 0, 0, .4);
    --ce-shadow: 0 14px 34px -12px rgba(0, 0, 0, .6);

    /* Bootstrap component surfaces -> full dark adaptation */
    --bs-body-bg: var(--ce-bg);
    --bs-body-bg-rgb: 12, 18, 16;
    --bs-body-color: var(--ce-text);
    --bs-secondary-bg: var(--ce-surface);
    --bs-tertiary-bg: var(--ce-surface);
    --bs-card-bg: var(--ce-surface);
    --bs-card-cap-bg: var(--ce-surface);
    --bs-modal-bg: var(--ce-surface);
    --bs-popover-bg: var(--ce-surface);
    --bs-offcanvas-bg: var(--ce-surface);
    --bs-dropdown-bg: var(--ce-surface);
    --bs-table-bg: var(--ce-surface);
    --bs-list-group-bg: var(--ce-surface);
    --bs-accordion-bg: var(--ce-surface);
    --bs-toast-bg: var(--ce-surface);
    --bs-border-color: var(--ce-border);
    --bs-border-color-translucent: var(--ce-border);
    --bs-heading-color: var(--ce-text);
    --bs-emphasis-color: var(--ce-text);
    --bs-secondary-color: var(--ce-muted);
    --bs-secondary-color-rgb: 143, 166, 155;
    --bs-light-rgb: 12, 18, 16;
    --bs-light: #0c1210;
}

/* Keep .text-light readable on dark surfaces (--bs-light-rgb is now dark) */
[data-bs-theme="dark"] .text-light {
    color: var(--ce-text) !important;
}

/* Semantic text colors -> readable light variants on dark surfaces */
[data-bs-theme="dark"] .text-success { color: #75b798 !important; }
[data-bs-theme="dark"] .text-primary { color: #6ea8fe !important; }
[data-bs-theme="dark"] .text-info { color: #6edff6 !important; }
[data-bs-theme="dark"] .text-warning { color: #ffda6a !important; }
[data-bs-theme="dark"] .text-danger { color: #ea868f !important; }
[data-bs-theme="dark"] .text-secondary { color: #a9b8b0 !important; }

[data-bs-theme="dark"] .table tbody tr:hover {
    background: var(--ce-green-100);
}

[data-bs-theme="dark"] .progress {
    background: var(--ce-border);
}
