/* =====================================================
   EMIRATES FLIGHT CATERING - SHARED STYLES
   Shared across: dashboard-new.html, order-details-new.html, raise-complaint-new.html
   Note: Uses CSS variables from design-system.css
   ===================================================== */

/* --- LEGACY VARIABLE ALIASES (for backwards compatibility) --- */
:root {
    --primary-gold: var(--color-gold);
    --primary-dark-gold: var(--color-gold-dark);
    --bg-body: #F5F5F0;
    --white: var(--color-white);
    --text-dark: var(--color-gray-800);
    --text-black: var(--color-black);
    --text-muted: var(--color-gray-600);
    --text-silver: var(--color-gray-500);
    --border-color: #E5E5E5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Fonts weight utilities (legacy - extended set) */
.fw-1{ font-weight: 100; }
.fw-2{ font-weight: 200; }
.fw-3{ font-weight: 300; }
.fw-4{ font-weight: 400; }
/* .fw-5, .fw-6, .fw-7 now defined in design-system.css */
.fw-8{ font-weight: 800; }
.fw-9{ font-weight: 900; }

.font-helvetica {
    font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif !important;
}

/* Background & Core SPA styles - Scoped to avoid corrupting landing pages */
.spa-body-bg {
    font-family: var(--font-primary);
    background: url('../new-icons/background.svg') no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
    background-color: var(--bg-body);
    color: var(--color-gray-800);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

.spa-body-bg * {
    box-sizing: border-box;
}

/* (Duplicates removed) */

.text-dark{
    color: var(--text-dark);
}

.text-black{
    color: var(--text-black);
}

/* --- HEADER --- */
.header {
    background: var(--color-white);
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-4);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: var(--z-dropdown);
}

.header-left,
.header-right {
    flex: 1;
    display: flex;
    align-items: center;
}

.header-right { justify-content: flex-end; }

.menu-btn {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--color-gold);
    cursor: pointer;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-base);
}

.menu-btn:hover { background: var(--color-gray-100); }

.header-center {
    margin: 0 auto;
    /* left: 50%;
    transform: translateX(-50%); */
    display: flex;
    justify-content: center;
    align-items: center;
}

.header-logo img { height: 35px; }

/* User Avatar Initials */
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-dark) 100%);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: var(--text-base);
    cursor: pointer;
    transition: all var(--transition-slow);
    border: 2px solid var(--color-white);
    box-shadow: var(--shadow-md);
}

.user-avatar:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

/* Premium Circle Avatar Shape Utility */
.avatar-circle-premium {
    border-radius: var(--radius-full) !important;
    overflow: hidden;
    border: 3px solid var(--color-white);
    box-shadow:
        0 8px 20px rgba(0,0,0,0.12),
        0 0 0 1px rgba(184, 147, 94, 0.1);
    background: var(--color-white);
    transition: all var(--transition-slow);
}

.avatar-circle-premium:hover {
    transform: scale(1.03);
    box-shadow:
        0 12px 30px rgba(0,0,0,0.18),
        0 0 0 1px rgba(184, 147, 94, 0.2);
}

/* Notification Icon */
.notification-icon {
    position: relative;
    width: 50px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: var(--radius-full);
    transition: background var(--transition-base);
}

.notification-icon:hover { background: var(--color-gray-100); }

.notification-icon i {
    font-size: 22px;
    color: var(--color-gold);
}

.notification-badge {
    position: absolute;
    top: 2px;
    right: 4px;
    background: var(--color-danger);
    color: var(--color-white);
    font-size: 10px;
    min-width: 18px;
    height: 18px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 2px solid var(--color-white);
    padding: 0 var(--space-1);
}

/* --- SIDEBAR --- */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: var(--z-sticky);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-slow);
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: var(--sidebar-width);
    height: 100%;
    background: var(--color-white);
    z-index: 201;
    transition: left var(--transition-slow);
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    overflow-y: auto;
}

.sidebar.active { left: 0; }

.sidebar-header {
    padding: var(--space-6) var(--space-5);
    background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-dark) 100%);
    color: var(--color-white);
}

.sidebar-header h3 {
    font-size: 19px;
    margin: 0;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.sidebar-header p {
    margin: 0;
}

.sidebar-menu { padding: 10px 0; }

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4) var(--space-5);
    color: var(--color-gray-800);
    text-decoration: none;
    transition: background var(--transition-base);
    font-size: var(--text-base);
}

.sidebar-menu a:hover { background: var(--bg-body); }

.sidebar-menu a.active {
    background: var(--bg-body);
    color: var(--color-gold-dark);
    border-left: 3px solid var(--color-gold-dark);
}

.sidebar-menu i {
    font-size: var(--text-xl);
    width: 24px;
    text-align: center;
}

.sidebar-divider {
    height: 1px;
    background: var(--border-color);
    margin: 10px 0;
}

/* --- LOGOUT MODAL --- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: var(--z-toast);
    align-items: center;
    justify-content: center;
    animation: fadeIn var(--transition-base);
}

.modal-overlay.active { display: flex; }

.modal-content {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--space-8);
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    text-align: center;
    animation: slideUp var(--transition-slow);
}

.modal-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-dark) 100%);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-5);
}

.modal-icon i {
    font-size: 28px;
    color: var(--color-white);
}

.modal-title {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--color-gray-800);
    margin-bottom: var(--space-2);
}

.modal-message {
    font-size: var(--text-base);
    color: var(--color-gray-700);
    margin-bottom: var(--space-6);
}

.modal-actions {
    display: flex;
    gap: var(--space-3);
    justify-content: center;
}

.btn-cancel,
.btn-confirm {
    flex: 1;
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-sm);
    font-size: var(--text-base);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--transition-base);
}

.btn-cancel {
    background: var(--color-gray-200);
    color: var(--color-gray-800);
}

.btn-cancel:hover { background: var(--color-gray-300); }

.btn-confirm {
    background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-dark) 100%);
    color: var(--color-white);
}

.btn-confirm:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-gold);
}

/* --- COMMON UTILITY CLASSES --- */
/* Note: Many utilities now defined in design-system.css */

.hide-mobile {
    display: table-cell;
}

@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
}

/* --- ANIMATIONS --- */
/* Note: Core animations now defined in design-system.css */
@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* --- NOTIFICATION DROPDOWN --- */
.notification-dropdown {
    position: fixed;
    top: var(--header-height);
    right: var(--space-4);
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    background: var(--color-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: var(--z-modal);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-slow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.notification-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.notification-dropdown-header {
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notification-dropdown-header h4 {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--color-gray-800);
    margin: 0;
}

.notification-close {
    background: none;
    border: none;
    font-size: var(--text-2xl);
    color: var(--color-gray-600);
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-base);
}

.notification-close:hover {
    background: var(--color-gray-100);
}

.notification-dropdown-body {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-2) 0;
}

.notification-dropdown-item {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    cursor: pointer;
    transition: background var(--transition-base);
    border-left: 3px solid transparent;
    background: var(--color-white);
}

.notification-dropdown-item:hover {
    background: var(--color-gray-100);
}

.notification-dropdown-item.unread {
    background: #FEF9F3;
    border-left-color: var(--color-gold);
}

.notification-load-more {
    text-align: center;
    padding: var(--space-4) var(--space-5);
}

.notification-load-more button {
    background: var(--color-gold);
    color: var(--color-white);
    border: none;
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-sm);
    font-size: var(--text-base);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
}

.notification-load-more button:hover {
    background: var(--color-gold-dark);
    transform: translateY(-1px);
}

.notification-load-more button:disabled {
    background: var(--color-gray-400);
    cursor: not-allowed;
    transform: none;
}

.notification-icon-circle {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-icon-circle i {
    font-size: var(--text-xl);
    color: var(--color-white);
}

.notification-dropdown-content {
    flex: 1;
    min-width: 0;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-1);
}

.notification-name {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--color-gray-800);
}

.notification-timestamp {
    font-size: var(--text-xs);
    color: var(--color-gold);
    white-space: nowrap;
}

.notification-text {
    font-size: var(--text-md);
    color: var(--color-gray-600);
    line-height: 1.4;
}

.notification-dropdown-footer {
    padding: var(--space-3) var(--space-5);
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.notification-dropdown-footer a {
    color: var(--color-gold);
    text-decoration: none;
    font-size: var(--text-base);
    font-weight: 600;
}

.notification-dropdown-footer a:hover {
    color: var(--color-gold-dark);
}

/* --- USER DROPDOWN --- */
.user-dropdown-container {
    position: relative;
}

.user-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: 6px var(--space-3);
    border: 1px solid var(--color-gray-300);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    background: var(--color-white);
}

.user-dropdown-toggle:hover {
    border-color: var(--color-gold);
    background: var(--color-gray-100);
}

.user-avatar-img {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.user-name-text {
    font-size: var(--text-base);
    color: var(--color-gray-700);
    font-weight: 500;
}

.user-dropdown-icon {
    font-size: 10px;
    color: var(--color-gray-500);
    transition: transform var(--transition-base);
}

.user-dropdown-toggle.active .user-dropdown-icon {
    transform: rotate(180deg);
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + var(--space-2));
    right: 0;
    min-width: 180px;
    background: var(--color-white);
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-base);
    z-index: var(--z-modal);
    overflow: hidden;
}

.user-dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    color: var(--color-gray-800);
    text-decoration: none;
    transition: background var(--transition-base);
}

.user-dropdown-item:hover {
    background: var(--bg-body);
    color: var(--color-gray-800);
    text-decoration: none;
}

.user-dropdown-item i {
    width: 16px;
    color: var(--color-gray-500);
    font-size: var(--text-base);
}

.user-dropdown-divider {
    height: 1px;
    background: var(--color-gray-300);
    margin: var(--space-1) 0;
}

/* --- ORDER DETAILS STYLES --- */
/* Note: Base .card class now in design-system.css, these are overrides */
.card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: var(--space-5);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-5);
}

.card-body {
    padding: 0;
}

.card-subtitle {
    margin-bottom: 8px;
}

.card-text {
    margin: 0;
}

/* Order Header Grid */
#loadOrderHeaderDiv .row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px 20px;
}

@media (max-width: 992px) {
    #loadOrderHeaderDiv .row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    #loadOrderHeaderDiv .row {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

#loadOrderHeaderDiv .col {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#loadOrderHeaderDiv h6 {
    color: var(--color-gray-600);
    font-size: var(--text-xs);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin: 0;
}

#loadOrderHeaderDiv h6 img {
    width: 16px;
    height: 16px;
    opacity: 0.6;
}

#loadOrderHeaderDiv p.card-text {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--color-gray-800);
}

/* Order Items Grid */
#loadOrderItemsDiv {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (max-width: 768px) {
    #loadOrderItemsDiv {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

.order-item .card {
    box-shadow: none;
    border: 1px solid #F0F0F0;
    padding: 0;
    margin-bottom: 0px;
}

.order-item .card-body {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 15px;
}

.order-item .col-4 {
    width: 70px;
    flex-shrink: 0;
}

.order-item .col-8 {
    flex: 1;
}

.order-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.order-item .d-flex {
    display: flex;
}

.order-item .justify-content-between {
    justify-content: space-between;
}

.order-item .align-items-start {
    align-items: flex-start;
}

.order-item .align-items-center {
    align-items: center;
}

.order-item .justify-content-center {
    justify-content: center;
}

.order-item .mb-1 {
    margin-bottom: 4px;
}

.order-item .font-weight-bold {
    font-weight: 700;
}

.order-item .flex-column {
    flex-direction: column;
}

/* Note: Base .badge classes now in design-system.css, these are legacy overrides */
.badge-success {
    background: #D1FAE5;
    color: #059669;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-sm);
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
}

.badge-warning {
    background: #FEF3C7;
    color: #D97706;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-sm);
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
}

/* Custom Badge Styles (from sb-admin-2) */
.custom-badge {
    display: inline-block;
    padding: 0.60em 1.2em;
    font-size: 75%;
    font-weight: 500;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 1rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.badge-outline-success {
    color: var(--color-success);
    border: 1px solid var(--color-success);
    background: transparent;
}

.badge-outline-primary {
    color: var(--color-info);
    border: 1px solid var(--color-info);
    background: transparent;
}

.badge-outline-danger {
    color: var(--color-danger);
    border: 1px solid var(--color-danger);
    background: transparent;
}

.badge-outline-warning {
    color: var(--color-warning-dark);
    border: 1px solid var(--color-warning);
    background: transparent;
}

.shadow-sm {
    box-shadow: var(--shadow-sm);
}

.h-100 {
    height: 100%;
}

.text-nowrap {
    white-space: nowrap;
}

.pl-4 {
    padding-left: 16px;
}

.mr-1 {
    margin-right: 4px;
}

.mr-2 {
    margin-right: 8px;
}

.small, small {
    font-size: 12px;
}


/* Borders */
.border-top-primary {
    border-top: 0.25rem solid var(--color-gold) !important;
}

/* Custom container */
.custom-container {
    max-width: 1400px;
}

/* =====================================================
   UNIFIED PAGE HEADER & BACK BUTTON STYLES
   Shared across: complaints, order-details, orders-list, past-complaints
   ===================================================== */

/* Page Header Container */
.page-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0;
    padding: 20px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

/* Page Title & Subtitle */
.page-title {
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--color-white);
    flex: 1;
    text-align: center;
    line-height: 1.3;
}

.page-subtitle {
    font-size: var(--text-lg);
    font-weight: 500;
    color: var(--color-white);
    margin-top: 2px;
}

/* Back Button - Unified styling */
.btn-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--color-gray-100);
    color: var(--color-gray-800);
    text-decoration: none !important;
    transition: all var(--transition-base);
    flex-shrink: 0;
    border: none;
    cursor: pointer;
}

.btn-back:hover {
    background: var(--color-gold);
    color: var(--color-white) !important;
    transform: scale(1.05);
    text-decoration: none !important;
}

.btn-back i {
    font-size: var(--text-xl);
}

/* Page Header Spacer (for centering title when icon is not used) */
.page-header-spacer {
    width: 40px;
    flex-shrink: 0;
}

/* Page Section Header - Mimics Dashboard 'summary-header' */
.page-section-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.page-section-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.page-section-icon img {
    width: 45px;
    height: 45px;
    object-fit: contain;
}

.page-section-title h3 {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--color-black);
    margin: 0;
}

.page-section-title p {
    font-size: var(--text-sm);
    color: var(--color-gray-700);
    margin: 2px 0 0 0;
}

/* Page Container for full-height layouts - Renamed to avoid conflicts */
.spa-page-viewport {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Page Content Wrapper */
.page-content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
}

/* Content Card Wrapper - White card with rounded top corners */
.content-card-wrapper {
    background: var(--color-white);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 80px 25px 40px 25px;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.08);
    margin-top: 0;
    position: relative;
    z-index: 10;
    flex: 1;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

/* Page Background - Apply to body when using these page styles */
.page-with-background {
    background: url('../../new-icons/background.svg') no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
}

/* Responsive adjustments for page header */
@media (max-width: 480px) {
    .page-header {
        padding: 20px 15px;
    }
    
    .page-title {
        font-size: 20px;
    }
    
    .page-subtitle {
        font-size: 15px;
    }
    
    .content-card-wrapper {
        padding: 60px 15px 30px 15px;
    }
}

/* =====================================================
   LIST PAGE TEMPLATE STYLES
   Unified template for list-based pages: orders, complaints, etc.
   ===================================================== */

/* List Page Container - Full-height flex layout */
.list-page-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Table Section - White content area with rounded top corners */
.table-section {
    background: var(--color-white);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: var(--space-8) var(--space-6) var(--space-10) var(--space-6);
    margin-top: 0;
    position: relative;
    z-index: 10;
    flex: 1;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.08);
}

/* Inner wrapper for max-width centering */
.table-section-inner {
    max-width: 1400px;
    margin: 0 auto;
}

/* Section Title - Consistent heading style */
.section-title {
    font-size: var(--text-4xl);
    font-weight: 700;
    color: var(--color-black);
    margin-bottom: var(--space-4);
    text-align: left;
}

/* Premium Card - Used in Profile, Complaints, Order Details */
.card-premium {
    background:
        radial-gradient(circle at 95% 15%, rgba(200, 161, 92, 0.25) 0%, transparent 30%),
        radial-gradient(circle at 90% 45%, rgba(184, 147, 94, 0.2) 0%, transparent 20%),
        #F3EEE4;
    border-radius: 25px;
    padding: 35px var(--space-6) var(--space-8) var(--space-6);
    box-shadow: var(--shadow-lg);
    margin-bottom: var(--space-6);
    position: relative;
}

/* Unified Form Controls */
.form-group-custom {
    margin-bottom: var(--space-5);
    text-align: left;
}

.form-group-custom label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--color-gray-800);
    margin-bottom: var(--space-2);
}

.form-control-premium {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--color-gray-300);
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    color: var(--color-gray-800);
    background: var(--color-gray-100);
    transition: all var(--transition-slow);
}

.form-control-premium:focus {
    outline: none;
    border-color: var(--color-gold);
    background: var(--color-white);
    box-shadow: 0 0 0 4px rgba(184, 147, 94, 0.1);
}

/* Responsive adjustments for list pages */
@media (max-width: 480px) {
    .table-section {
        padding: 20px 15px 30px 15px;
    }
    
    .section-title {
        font-size: 20px;
    }

    .card-premium {
        padding: 25px 20px;
        border-radius: 20px;
    }
}

/* --- RESPONSIVE --- */
@media (max-width: 480px) {
    .header-logo img { height: 28px; }
    .header-center {
        display: block;
    }

    .notification-dropdown {
        right: 8px;
        left: 8px;
        width: auto;
        max-width: none;
    }
}

@media (max-width: 576px) {

    .user-name-text {
        font-size: 70%;
    }

    .user-avatar-img {
        width: 20px;
        height: 20px;
    }

    .user-dropdown-toggle {
        gap: 3%;
        padding: 4px 8px;
    }

    h1 {
        font-size: 1.7rem;
    }

    h4 {
        font-size: 1rem;
    }
}

/* --- LOADING OVERLAY --- */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9998;
}

.loading-overlay.active {
    display: flex;
}

/* --- PREMIUM WASHING MACHINE LOADER --- */
.spinner {
    width: 70px;
    height: 85px;
    background: var(--color-white);
    border-radius: var(--radius-md);
    position: relative;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    /* Main Shake Animation */
    animation: machine-shake 0.1s ease-in-out infinite;
}

/* Machine Detail: Top Panel */
.spinner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 18px;
    background: #f4f4f4;
    border-bottom: 2px solid #e0e0e0;
    border-radius: 10px 10px 0 0;
    z-index: 2;
}

/* Machine Detail: Knobs & Drawer */
.spinner::after {
    content: '';
    position: absolute;
    top: 5px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--color-gold);
    border-radius: var(--radius-full);
    box-shadow: -15px 0 0 -2px #ccc, -45px 0 0 0px #eee; /* Buttons and drawer handle */
    z-index: 3;
}

/* Glass Porthole (Outer Rim) */
.spinner .porthole {
    width: 46px;
    height: 46px;
    background: #ddd;
    border-radius: 50%;
    border: 3px solid #666; /* Rubber seal color */
    position: relative;
    overflow: hidden;
    z-index: 1;
    margin-top: 10px;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
}

/* Water / Clothes Tumbling */
.spinner .porthole::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%; /* Center anchor */
    width: 70px; /* Larger than container to cover corners during spin */
    height: 70px;
    background: conic-gradient(from 0deg, 
        rgba(66, 165, 245, 0.4) 0%, 
        rgba(66, 165, 245, 0.8) 40%, 
        rgba(255, 255, 255, 0.9) 50%, /* "Foam" */
        rgba(66, 165, 245, 0.8) 60%, 
        rgba(66, 165, 245, 0.4) 100%
    );
    border-radius: 35%; /* Soft "squircle" shape for organic movement */
    transform-origin: center;
    animation: water-tumble 1.5s linear infinite;
    margin-left: -35px; /* Re-center after absolute positioning */
    margin-top: -30px; /* Shift up slightly for water level */
}

/* Reflection on Glass */
.spinner .porthole::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 8px;
    width: 12px;
    height: 6px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    transform: rotate(-45deg);
}

/* Animations */
@keyframes machine-shake {
    0% { transform: translateY(0) rotate(0); }
    25% { transform: translateY(0.5px) rotate(0.5deg); }
    50% { transform: translateY(-0.5px) rotate(-0.5deg); }
    75% { transform: translateY(0.5px) rotate(0.5deg); }
    100% { transform: translateY(0) rotate(0); }
}

@keyframes water-tumble {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- SPINNER SIZE VARIANTS --- */
.spinner-md {
    transform: scale(0.6);
    margin: 0;
}

.spinner-sm {
    transform: scale(0.4);
    margin: 0;
}

/* Wrapper for centered spinner in sections */
.spinner-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4) 0;
}

/* --- SIMPLE CIRCULAR SPINNER (for buttons) --- */
.spinner-circular {
    width: 1rem;
    height: 1rem;
    border: 0.2em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
    display: inline-block;
    vertical-align: middle;
}

.spinner-circular-sm {
    width: 0.875rem;
    height: 0.875rem;
    border-width: 0.15em;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

/* ========================================
   SHARED COMPONENTS
   Extracted from page JS files
   ======================================== */

/* --- SUMMARY GRID --- */
.summary-header-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px 20px;
}

@media (max-width: 992px) {
    .summary-header-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .summary-header-row { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.summary-item h6 {
    color: var(--color-gray-500);
    font-size: var(--text-xs);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 0;
    text-transform: none;
}

.summary-item h6 img {
    width: 16px;
    height: 16px;
    opacity: 0.6;
}

.summary-item .value {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--color-gray-800);
}

/* --- STATUS BADGES --- */
.status-badge {
    padding: 4px 14px;
    border-radius: var(--radius-xl);
    font-size: var(--text-xs);
    font-weight: 500;
    display: inline-flex;
    width: fit-content;
    margin-top: 2px;
    border: 1px solid var(--color-orange);
    color: var(--color-orange);
    text-align: center;
    justify-content: center;
}

.status-badge-sm {
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    line-height: 1;
    box-shadow: var(--shadow-sm);
}

/* Status badge variants */
.badge-success {
    background: var(--color-success);
    color: var(--color-white);
    border: none;
}

.badge-warning {
    background: var(--color-warning);
    color: var(--color-white);
    border: none;
}

.badge-danger {
    background: var(--color-danger);
    color: var(--color-white);
    border: none;
}

/* Complaint status badges */
.badge-pending {
    background: var(--color-warning-light);
    color: var(--color-warning-dark);
    border: 1px solid var(--color-warning-border);
}

.badge-resolved {
    background: var(--color-success-light);
    color: var(--color-success-dark);
    border: 1px solid var(--color-success-border);
}

.badge-rejected {
    background: var(--color-danger-bg);
    color: var(--color-danger-dark);
    border: 1px solid var(--color-danger-border);
}

.badge-closed {
    background: var(--color-gray-150);
    color: var(--color-gray-750);
    border: 1px solid var(--color-gray-500);
}

/* --- ORDER ITEM CARDS --- */
.order-item-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-gray-200);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    transition: all var(--transition-base);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.order-item-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.order-item-body {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4);
    width: 100%;
}

.img-container {
    width: 70px;
    height: 70px;
    background: var(--color-white);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    flex-shrink: 0;
}

.img-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.status-container {
    display: flex;
    justify-content: flex-end;
    width: 100%;
    margin-bottom: 4px;
}

.item-name {
    font-size: var(--text-md);
    font-weight: 800;
    color: var(--color-gray-800);
    text-transform: uppercase;
    line-height: 1.2;
}

.item-meta {
    font-size: var(--text-xs);
    color: var(--color-gray-600);
    font-weight: 500;
    margin-top: var(--space-2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.item-meta span {
    display: flex;
    align-items: center;
}

.item-meta i {
    font-size: var(--text-sm);
    margin-right: 4px;
}

/* --- ITEM SELECTION (Checkable Items) --- */
.item-selection-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 15px;
}

@media (max-width: 768px) {
    .item-selection-grid { grid-template-columns: 1fr; }
}

.item-selection-grid .order-item {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    border: 1px solid var(--color-gray-200);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
}

.item-selection-grid .order-item:hover {
    border-color: var(--color-gold);
    background: var(--color-cream);
}

.item-selection-grid .order-item.selected {
    border-color: var(--color-gold);
    background: var(--color-cream);
    box-shadow: var(--shadow-gold-light);
}

.item-checkbox {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 2px solid var(--color-gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    flex-shrink: 0;
}

.item-selection-grid .order-item.selected .item-checkbox {
    background: var(--color-gold);
    border-color: var(--color-gold);
}

.item-checkbox i {
    color: var(--color-white);
    font-size: var(--text-sm);
    display: none;
}

.item-selection-grid .order-item.selected .item-checkbox i {
    display: block;
}

.item-img {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    background: var(--color-gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    flex-shrink: 0;
}

.item-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.item-info {
    flex: 1;
}

/* Item selection grid specific styles */
.item-selection-grid .item-name {
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--color-gray-800);
    margin-bottom: 2px;
    text-transform: none;
}

.item-selection-grid .item-meta {
    font-size: var(--text-xs);
    color: var(--color-gray-500);
    font-weight: 500;
    margin-top: 0;
    display: block;
    width: auto;
}

/* --- SECTION HEADERS --- */
.section-header-small {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--color-black);
    margin-bottom: var(--space-3);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.section-header-small i {
    color: var(--color-gold);
}

.item-list-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-5);
}

.item-list-header i {
    color: var(--color-gold);
    font-size: var(--text-2xl);
}

.item-list-header h5 {
    margin: 0;
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--color-black);
}

/* --- UPLOAD SECTION --- */
.upload-section-wrapper {
    text-align: center;
    margin-top: 10px;
}

.upload-label-main {
    display: block;
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--color-gray-800);
    margin-bottom: 5px;
}

.upload-subtitle {
    display: block;
    font-size: var(--text-sm);
    color: var(--color-gray-500);
    margin-bottom: var(--space-4);
}

.upload-btn-creative {
    width: 100%;
    height: 120px;
    border: 2px dashed var(--color-gold);
    border-radius: var(--radius-lg);
    background: var(--color-cream);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-slow);
}

.upload-btn-creative:hover {
    background: var(--color-cream-hover);
    transform: translateY(-2px);
}

.upload-icons {
    display: flex;
    gap: var(--space-3);
    font-size: 24px;
    color: var(--color-gray-500);
    margin-bottom: var(--space-2);
}

.upload-text {
    font-size: 12px;
    font-weight: 700;
    color: var(--color-gray-550);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- PREVIEW CONTAINER --- */
.preview-container-unified {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    justify-content: center;
    margin-top: var(--space-4);
}

.preview-item {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-md);
    position: relative;
    border: 1px solid var(--color-gray-200);
    overflow: hidden;
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-preview {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    background: rgba(231, 74, 59, 0.9);
    color: var(--color-white);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-sm);
    cursor: pointer;
}

/* --- FLOATING ACTION BUTTONS --- */
.floating-action-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: var(--z-modal);
    padding: var(--space-3) var(--space-5);
    background: linear-gradient(to top, rgba(255,255,255,0.98), rgba(255,255,255,0.95));
    backdrop-filter: blur(10px);
    box-shadow: 0 -2px 15px rgba(0,0,0,0.06);
}

.btn-report-issue-creative {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-5);
    background: var(--color-white);
    border: 1.5px solid var(--color-danger);
    border-radius: var(--radius-md);
    text-decoration: none !important;
    transition: all var(--transition-slow);
    box-shadow: var(--shadow-sm);
    max-width: 320px;
    margin: 0 auto;
    width: 100%;
}

.btn-report-issue-creative:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(231, 74, 59, 0.15);
    background: var(--color-danger-light);
    text-decoration: none !important;
}

.report-issue-icon {
    width: 32px;
    height: 32px;
    background: var(--color-danger-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.report-issue-icon i {
    font-size: var(--text-lg);
    color: var(--color-danger);
}

.report-issue-content {
    flex: 1;
    text-align: left;
}

.report-issue-title {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--color-danger);
    line-height: 1.2;
}

.report-issue-arrow {
    font-size: var(--text-base);
    color: var(--color-danger);
    flex-shrink: 0;
}

/* --- SUBMIT BUTTONS --- */
.btn-submit-creative {
    width: 100%;
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    border: none;
    background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-dark) 100%);
    color: var(--color-white);
    font-size: var(--text-lg);
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow-gold);
    transition: all var(--transition-slow);
    margin-top: var(--space-5);
}

.btn-submit-creative:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(184, 147, 94, 0.4);
}
