/* Purple/Pink/Orange Theme Custom Styles */

:root {
    --secondary: #FAA144;
    --primary-one: rgba(215, 79, 152, 0.13);
    --grey: #828C8A;
    --darkgreen: #A614B2;
    --bg-grad: linear-gradient(90deg, #A614B2 0%, #5004F5 100%);
    --bg-btns: #4CA994;
    --pink-btn: #D74F98;
    --side-clr: #4CA994;
    --primary: #FAA144;
    --textcolor: #2C2339;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-weight: 400;
    color: var(--textcolor);
    font-family: 'Lexend Deca', sans-serif;
    background: #fff;
    font-size: 16px;
    padding: 0;
    margin: 0;
    /* Prevent horizontal scroll on body */
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
}

/* Light Theme Cards */
.light-card {
    background: #ffffff;
    border: 1px solid rgba(166, 20, 178, 0.15);
    box-shadow: 0 4px 12px rgba(166, 20, 178, 0.08);
    transition: all 0.3s ease;
}

.light-card:hover {
    box-shadow: 0 8px 24px rgba(166, 20, 178, 0.15);
    transform: translateY(-5px);
    border-color: rgba(166, 20, 178, 0.3);
}

/* Purple/Pink Gradient Backgrounds */
.gradient-purple {
    background: linear-gradient(90deg, #A614B2 0%, #5004F5 100%);
}

.gradient-pink {
    background: linear-gradient(135deg, #D74F98 0%, #A614B2 100%);
}

.gradient-orange {
    background: linear-gradient(135deg, #FAA144 0%, #D74F98 100%);
}

/* Floating Shapes */
.floating-shapes-light {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.floating-shapes-light::before,
.floating-shapes-light::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    animation: float 20s infinite;
    opacity: 0.12;
}

.floating-shapes-light::before {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, #A614B2, #5004F5);
    top: -250px;
    left: -250px;
    animation-delay: 0s;
}

.floating-shapes-light::after {
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, #D74F98, #FAA144);
    bottom: -300px;
    right: -300px;
    animation-delay: -10s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(50px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-50px, 50px) scale(0.9);
    }
}

/* Fade In Animations */
.fade-in {
    opacity: 0;
    animation: fadeIn 1s ease forwards;
}

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Animations */
.scroll-animate {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease;
}

.scroll-animate.active {
    opacity: 1;
    transform: translateY(0);
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Gradient Text Animation */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.gradient-animate {
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
}

/* Pulse Animation */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.pulse-slow {
    animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Pricing Card Styles */
.pricing-card {
    position: relative;
    overflow: hidden;
}

.pricing-card.popular {
    border: 2px solid #A614B2;
    transform: scale(1.05);
}

.pricing-card.popular::before {
    content: 'POPULAR';
    position: absolute;
    top: 20px;
    right: -35px;
    background: linear-gradient(90deg, #A614B2 0%, #5004F5 100%);
    color: white;
    padding: 5px 40px;
    transform: rotate(45deg);
    font-size: 12px;
    font-weight: bold;
}

/* Platform Icon Styles */
.platform-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 28px;
    transition: all 0.3s ease;
}

.platform-icon:hover {
    transform: scale(1.2) rotate(5deg);
}

/* Stats Dashboard Styles */
.stat-item {
    position: relative;
    padding: 20px;
    border-left: 4px solid #A614B2;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    background: linear-gradient(90deg, #A614B2 0%, #5004F5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Timeline Styles */
.timeline-item {
    position: relative;
    padding-left: 40px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: -30px;
    width: 2px;
    background: linear-gradient(180deg, #A614B2, #5004F5);
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-dot {
    position: absolute;
    left: 0;
    top: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    border: 3px solid #A614B2;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

/* Service Grid Hover Effects */
.service-card {
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.service-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(166, 20, 178, 0.1), transparent);
    transition: left 0.5s ease;
}

.service-card:hover::after {
    left: 100%;
}

/* Button Styles */
.btn-primary {
    background: linear-gradient(90deg, #A614B2 0%, #5004F5 100%);
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 999px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(166, 20, 178, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(166, 20, 178, 0.4);
}

.btn-outline {
    background: transparent;
    color: #A614B2;
    border: 2px solid #A614B2;
    padding: 12px 32px;
    border-radius: 999px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: linear-gradient(90deg, #A614B2 0%, #5004F5 100%);
    color: white;
    border-color: transparent;
}

/* Pink Button */
.btn-pink {
    background: #D74F98;
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 999px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(215, 79, 152, 0.3);
}

.btn-pink:hover {
    background: linear-gradient(135deg, #D74F98 0%, #A614B2 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(215, 79, 152, 0.4);
}

/* Orange Accent */
.text-orange {
    color: #FAA144;
}

.bg-orange {
    background: #FAA144;
}

/* Icon Styles */
.icon-box {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    font-size: 28px;
    transition: all 0.3s ease;
}

.icon-box:hover {
    transform: scale(1.1) rotate(-5deg);
}

/* Sidebar Styles */
.sidebar {
    width: 280px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: white;
    border-right: 1px solid #e5e7eb;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .sidebar-overlay.active {
        display: block;
    }
}

@media (min-width: 769px) {
    .sidebar {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 280px;
    }
}

.sidebar-menu-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-menu-item:hover {
    background-color: rgba(166, 20, 178, 0.05);
    color: #A614B2;
    border-left-color: #A614B2;
}

.sidebar-menu-item.active {
    background-color: rgba(166, 20, 178, 0.1);
    color: #A614B2;
    border-left-color: #A614B2;
    font-weight: 600;
}

.sidebar-menu-item i {
    width: 24px;
    margin-right: 12px;
}

/* Mobile Header */
.mobile-header {
    display: none;
}

@media (max-width: 768px) {
    .mobile-header {
        display: flex;
    }
}

/* Message Bubble Styles */
.message-user {
    background: linear-gradient(135deg, #A614B2 0%, #5004F5 100%);
    color: white;
    border-radius: 18px 18px 4px 18px;
}

.message-support {
    background: #F3F4F6;
    color: #1F2937;
    border-radius: 18px 18px 18px 4px;
}

/* Table Styles */
.updates-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.updates-table thead th {
    background: linear-gradient(135deg, #A614B2 0%, #5004F5 100%);
    color: white;
    padding: 16px;
    text-align: left;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

.updates-table thead th:first-child {
    border-radius: 12px 0 0 0;
}

.updates-table thead th:last-child {
    border-radius: 0 12px 0 0;
}

.updates-table tbody tr {
    background: white;
    transition: all 0.2s;
}

.updates-table tbody tr:hover {
    background: #F9FAFB;
    transform: scale(1.01);
}

.updates-table tbody td {
    padding: 16px;
    border-bottom: 1px solid #E5E7EB;
}

.updates-table tbody tr:last-child td:first-child {
    border-radius: 0 0 0 12px;
}

.updates-table tbody tr:last-child td:last-child {
    border-radius: 0 0 12px 0;
}

/* Update Badges */
.update-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-decrease {
    background: #FEE2E2;
    color: #DC2626;
}

.badge-increase {
    background: #D1FAE5;
    color: #059669;
}


/* --- DASHBOARD STYLES (From neworder.html) --- */

/* Platform Filter Buttons */
.platform-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    transition: all 0.3s;
    cursor: pointer;
    color: #6b7280;
}

.platform-btn:hover {
    border-color: #A614B2;
    background: rgba(166, 20, 178, 0.05);
    color: #A614B2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(166, 20, 178, 0.15);
}

.platform-btn.active {
    border-color: #A614B2;
    background: linear-gradient(135deg, rgba(166, 20, 178, 0.1) 0%, rgba(250, 161, 68, 0.1) 100%);
    color: #A614B2;
    font-weight: 600;
}

/* --- Fixed Dropdown Styles --- */
/* Standard Select and Input Styles */
.form-control,
select.form-control,
input.form-control,
textarea.form-control {
    background-color: #fff !important;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    color: #1f2937;
    width: 100%;
    transition: all 0.2s;
    min-height: 48px;
    /* Ensure sufficient touch target size */
}

.form-control:focus {
    border-color: #A614B2;
    box-shadow: 0 0 0 3px rgba(166, 20, 178, 0.1);
    outline: none;
}

/* Select2 Specific Overrides */
.select2-container .select2-selection--single {
    height: 50px !important;
    background-color: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 0.5rem !important;
    display: flex !important;
    align-items: center !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #1f2937 !important;
    line-height: normal !important;
    padding-left: 1rem !important;
    padding-right: 2rem !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 48px !important;
    right: 8px !important;
}

/* Dropdown Results */
.select2-dropdown {
    border: 1px solid #e5e7eb !important;
    border-radius: 0.5rem !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1) !important;
    background-color: #ffffff !important;
    overflow: hidden;
}

.select2-search--dropdown .select2-search__field {
    border: 1px solid #e5e7eb !important;
    border-radius: 0.375rem !important;
    padding: 8px !important;
}

.select2-results__option {
    padding: 10px 16px !important;
    font-size: 0.95rem;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #f3f4f6 !important;
    /* light gray hover */
    color: #A614B2 !important;
    /* primary text color */
}

.select2-container--default .select2-results__option[aria-selected="true"] {
    background-color: rgba(166, 20, 178, 0.1) !important;
    color: #A614B2 !important;
}

/* Ensure placeholder text is visible */
.select2-container .select2-selection__placeholder {
    color: #6b7280 !important;
}

/* Orders Filter Buttons */
.order__filters {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 8px 0;
    scrollbar-width: thin;
}

.btn__orders__filter {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    background: white;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    transition: all 0.3s ease;
    min-width: 100px;
    text-decoration: none;
    color: #6B7280;
}

.btn__orders__filter:hover {
    border-color: #A614B2;
    background: rgba(166, 20, 178, 0.05);
    transform: translateY(-2px);
}

.btn__orders__filter.active {
    border-color: #A614B2;
    background: linear-gradient(135deg, rgba(166, 20, 178, 0.1) 0%, rgba(80, 4, 245, 0.1) 100%);
    color: #A614B2;
    font-weight: 600;
}

.btn__orders__filter .icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn__orders__filter .icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.btn__orders__filter .text {
    font-size: 14px;
    white-space: nowrap;
}

/* Orders Table */
.order__table {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(166, 20, 178, 0.05);
    border: 1px solid rgba(229, 231, 235, 0.5);
    overflow-x: auto;
    /* Enable horizontal scrolling */
    -webkit-overflow-scrolling: touch;
    /* Smooth scrolling on iOS */
}

/* Custom Scrollbar for Table */
.order__table::-webkit-scrollbar {
    height: 8px;
}

.order__table::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.order__table::-webkit-scrollbar-thumb {
    background: #d4d4d4;
    border-radius: 4px;
}

.order__table::-webkit-scrollbar-thumb:hover {
    background: #A614B2;
}

/* Previous header styles cleared. See below. */
/* NEW Table Grid Layout - Stacked Design */
.order_table_head,
.order_table_row {
    display: grid;
    /* Grid: Checkbox | ID&Date | Service&Link | Status | Charge | Quantity | Counts */
    grid-template-columns: 50px 200px 1fr 140px 100px 100px 160px;
    gap: 16px;
    padding: 16px 20px;
    align-items: center;
    border-bottom: 1px solid #F3F4F6;
    min-width: 1200px;
    /* Ensure horizontal scroll on small screens */
}

/* Header Specifics */
.order_table_head {
    background: #A614B2;
    /* Solid Purple Header as per image */
    background: linear-gradient(90deg, #A614B2 0%, #7e24d6 100%);
    color: white;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: none;
}

/* Row Specifics */
.order_table_row {
    background: white;
    transition: all 0.2s ease;
}

.order_table_row:hover {
    background: #F9FAFB;
    transform: translateY(-1px);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    z-index: 10;
    position: relative;
}

.order_table_row:hover .row-actions {
    opacity: 1;
}

.order_table_row:last-child {
    border-bottom: none;
}

/* Component: ID Badge */
.id-badge {
    display: inline-block;
    background: #A614B2;
    color: white;
    font-weight: 700;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
    letter-spacing: 0.5px;
}

/* Component: Service Icon */
.service-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #F3E8FF;
    /* Light Purple */
    color: #A614B2;
    border-radius: 6px;
    margin-right: 8px;
    font-size: 12px;
}

/* Component: Status Capsule */
.status_capsule {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
}

.status_capsule.completed {
    background: #D1FAE5;
    color: #059669;
}

.status_capsule.pending,
.status_capsule.processing,
.status_capsule.inprogress {
    background: #DBEAFE;
    color: #1E40AF;
}

.status_capsule.canceled,
.status_capsule.refunded,
.status_capsule.partial {
    background: transparent;
    color: #374151;
    font-weight: 700;
    padding: 0;
}

/* Link Wrapper */
.link-wrapper {
    margin-left: 32px;
    /* Indent under service name (24px icon + 8px gap) */
}

.body__id span {
    font-family: monospace;
    font-weight: 600;
    color: #A614B2;
}

.body__date {
    font-size: 13px;
    color: #6B7280;
}

.link__order {
    display: flex;
    align-items: center;
    gap: 6px;
}

.link__order span {
    color: #A614B2;
}

.link__order a {
    color: #3B82F6;
    text-decoration: none;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.link__order a:hover {
    text-decoration: underline;
}

.body__price {
    font-weight: 600;
    color: #10B981;
}

.body__services {
    font-size: 13px;
    color: #374151;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-action {
    padding: 6px 16px;
    background: linear-gradient(90deg, #A614B2 0%, #5004F5 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(166, 20, 178, 0.3);
}

/* Component: Stats Box Wrapper */
.stats-box {
    display: contents;
}

/* Mobile Responsive Schema */
@media (max-width: 768px) {
    .order_table_head {
        display: none;
    }

    .order__table {
        background: transparent;
        border: none;
        overflow: visible;
        box-shadow: none;
    }

    /* GENERIC CARD (REFILL/GENERIC) */
    .order_table_row {
        display: flex;
        flex-direction: column;
        background: #fff;
        border-radius: 12px;
        margin-bottom: 20px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
        border: 1px solid #E5E7EB;
        padding: 0;
        position: relative;
        min-width: 0;
        width: 100%;
    }

    .order_table_row>div {
        padding: 12px 16px;
        border-bottom: 1px solid #F3F4F6;
    }

    .order_table_row>div:last-child {
        border-bottom: none;
    }

    /* Fallback for Data Labels (Refill etc) */
    .body__id,
    .body__date,
    .body__link,
    .body__price,
    .body__services,
    .body__status {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        text-align: right;
    }

    .body__id::before,
    .body__date::before,
    .body__link::before,
    .body__price::before,
    .body__services::before,
    .body__status::before {
        content: attr(data-label);
        font-weight: 600;
        color: #9CA3AF;
        font-size: 12px;
        text-transform: uppercase;
        margin-right: 12px;
        text-align: left;
    }


    /* --- ORDERS LIST SPECIFIC LAYOUT --- */
    .orders-list-table .order_table_row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "header header"
            "service charge"
            "link status"
            "stats stats";
        gap: 0;
        padding: 0;
        width: 100%;
        box-sizing: border-box;
    }

    /* 1. Header (ID + Date + Checkbox) */
    .orders-list-table .body__id_date {
        grid-area: header;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 16px 16px 16px 48px;
        /* Left padding for checkbox */
        background: white;
        border-radius: 12px 12px 0 0;
        border-bottom: 1px solid #F3F4F6;
        width: 100%;
    }

    .orders-list-table .body__id_date .text-xs {
        /* Date styling */
        font-weight: 600;
        color: #6B7280;
    }

    .orders-list-table .body__checkbox {
        display: block !important;
        position: absolute;
        top: 18px;
        left: 16px;
        z-index: 10;
        padding: 0;
        border: none;
        width: auto;
    }

    .orders-list-table .body__checkbox input {
        transform: scale(1.3);
    }

    /* 2. Service & Link */
    .orders-list-table .body__service_link {
        display: contents;
        /* Unwrap to allow grid placement */
    }

    .orders-list-table .service-name {
        grid-area: service;
        padding: 12px 0 4px 16px;
        font-size: 15px;
        font-weight: 700;
        color: #111827;
        border: none;
        display: block;
        width: 100%;
        min-width: 0;
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }

    .orders-list-table .service-icon {
        display: none;
    }

    .orders-list-table .link-wrapper {
        grid-area: link;
        padding: 0 0 12px 16px;
        margin: 0;
        border: none;
        width: 100%;
        min-width: 0;
    }

    .orders-list-table .link-wrapper a {
        word-break: break-all;
    }

    /* 3. Charge & Status (Right Side) */
    .orders-list-table .body__charge {
        grid-area: charge;
        padding: 12px 16px 4px 0;
        text-align: right;
        font-size: 14px;
        color: #059669;
        font-weight: 700;
        border: none;
        justify-content: flex-end;
    }

    .orders-list-table .body__status {
        grid-area: status;
        padding: 0 16px 12px 0;
        display: flex;
        justify-content: flex-end;
        align-items: center;
        border: none;
    }

    /* 4. Stats Box (Bottom Container) */
    .orders-list-table .stats-box {
        grid-area: stats;
        display: grid;
        grid-template-columns: 1fr 1fr;
        background: #F8FAFC;
        border-top: 1px solid #E5E7EB;
        border-radius: 0 0 12px 12px;
        padding: 12px 16px;
        gap: 8px;
        box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
    }

    /* Unwrap Counts inside Stats Box */
    .orders-list-table .body__counts {
        display: contents;
    }

    /* Grid Items inside Stats Box */
    /* Generic Stat Item */
    .orders-list-table .mobile-stat-item {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .orders-list-table .mobile-stat-item.text-right {
        align-items: flex-end;
        text-align: right;
    }

    .orders-list-table .mobile-stat-item .label {
        font-size: 10px;
        color: #9CA3AF;
        font-weight: 700;
        margin-bottom: 2px;
        text-transform: uppercase;
    }

    .orders-list-table .mobile-stat-item .value {
        font-size: 14px;
        /* Slightly smaller than main qty */
        font-weight: 600;
        color: #374151;
        /* Gray-700 */
    }

    .orders-list-table .mobile-stat-item .value.highlight {
        font-size: 15px;
        font-weight: 700;
        color: #1F2937;
        /* Gray-900 */
    }

    /* Backwards compatibility / Specific Order overrides */
    /* Quantity */
    .orders-list-table .body__quantity {
        grid-column: 1;
        grid-row: 1;
        text-align: left;
        padding: 0;
        border: none;
        background: transparent;
        display: flex;
        flex-direction: column;
    }

    /* Start Count */
    .orders-list-table .body__counts>.mb-1 {
        grid-column: 1;
        grid-row: 2;
        text-align: left;
        margin: 0;
        padding-top: 8px;
    }

    /* Remains (Right) */
    .orders-list-table .body__counts>.text-gray-900 {
        grid-column: 2;
        grid-row: 1;
        text-align: right;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
    }

    /* Buttons */
    .orders-list-table .row-actions {
        grid-column: 2;
        /* Allow auto-placement for row */
        opacity: 1;
        display: flex;
        justify-content: flex-end;
        align-items: flex-end;
        margin-top: 4px;
        gap: 6px;
    }

    /* --- SERVICES LIST SPECIFIC LAYOUT --- */
    /* Desktop Grid Layout Override for Services */
    @media (min-width: 768px) {
        .services-list-table .order_table_row {
            display: grid;
            grid-template-columns: 80px 1fr 120px 100px 100px 150px;
            /* Match Header */
            align-items: center;
            /* Center vertically */
            gap: 0;
            padding: 0;
        }

        .services-list-table .order_table_head {
            display: grid;
            /* Ensure header matches row columns */
            /* Note: grid-template-columns is inline in twig for header usually, but we can enforce here if needed */
        }

        .services-list-table .body__id_date {
            grid-area: auto;
            /* Reset areas */
            padding: 12px 16px;
            border-right: none;
        }

        .services-list-table .body__service_link {
            grid-area: auto;
            padding: 12px 16px;
        }

        .services-list-table .body__charge {
            grid-area: auto;
            padding: 12px 16px;
            text-align: left;
            justify-content: flex-start;
            background: transparent;
            border: none;
            margin: 0;
            border-radius: 0;
        }

        .services-list-table .category-header {
            grid-column: 1 / -1;
        }
    }

    /* Mobile Card Layout Override */
    @media (max-width: 767px) {
        .services-list-table .order_table_row {
            display: flex;
            flex-direction: column;
            padding: 0;
            gap: 0;
            /* Inherits generic card styles */
        }

        /* Custom Mobile Header for Service Card (Rate displayed at top) */
        .services-list-table .body__charge {
            order: -1;
            display: flex;
            justify-content: space-between;
            background: #F9FAFB;
            margin: 0;
            padding: 12px 16px;
            border-bottom: 1px solid #E5E7EB;
            border-radius: 12px 12px 0 0;
            font-size: 14px;
        }

        .services-list-table .body__id_date {
            padding: 12px 16px 4px 16px;
            border-bottom: none;
        }

        .services-list-table .body__service_link {
            padding: 4px 16px 16px 16px;
        }
    }

    .orders-list-table .row-actions a {
        padding: 6px 12px;
        font-size: 12px;
        border-radius: 6px;
        font-weight: 600;
    }
}