        :root {
            --primary: #ff9505;
            --primary-hover: #e88600;
            --primary-light: #fff8f0;
            --bg: #F7F6F4;
            --white: #ffffff;
            --text-primary: #1a1a1a;
            --text-secondary: #666666;
            --text-muted: #999999;
            --border: #e0e0e0;
            --border-light: #f0f0f0;
            --success: #22c55e;
            --success-light: #f0fdf4;
            --error: #ef4444;
            --error-light: #fef2f2;
            --warning: #f59e0b;
            --warning-light: #fffbeb;
            --radius-sm: 6px;
            --radius-md: 10px;
            --radius-lg: 16px;
            --radius-xl: 30px;
            --radius-full: 9999px;
            --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
            --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
            --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
        }

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

        body {
            font-family: 'Quicksand', sans-serif;
            background: var(--bg);
            color: var(--text-primary);
            min-height: 100vh;
        }

        /* ===== SITE HEADER (login page only) ===== */
        .site-header {
            padding: 15px 0;
            background-color: #1a1a1a;
            position: relative;
            z-index: 100;
        }

        .site-header .sh-container {
            max-width: 1300px;
            margin: 0 auto;
            padding: 0 20px;
        }

        .site-header .sh-nav {
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .site-header .sh-logo-img {
            height: 50px;
            width: auto;
        }

        .site-header .sh-nav-right {
            display: flex;
            align-items: center;
            gap: 30px;
        }

        .site-header .sh-nav-links {
            display: flex;
            align-items: center;
            gap: 30px;
            list-style: none;
        }

        .site-header .sh-nav-links a {
            font-size: 1.05rem;
            font-weight: 500;
            color: #ffffff;
            text-decoration: none;
        }

        .site-header .sh-nav-links a:hover {
            color: #d4a017;
        }

        .site-header .sh-order-btn {
            display: inline-block;
            padding: 12px 28px;
            background-color: #FF9505;
            color: #ffffff;
            border-radius: 30px;
            font-size: 1.05rem;
            font-weight: 600;
            text-decoration: none;
            border: none;
            position: relative;
            z-index: 1;
        }

        .site-header .sh-order-btn::before {
            content: '';
            position: absolute;
            inset: -3px;
            border-radius: inherit;
            padding: 3px;
            background: linear-gradient(
                var(--shimmer-angle, 0deg),
                transparent 0%,
                transparent 35%,
                rgba(255, 255, 255, 0.6) 50%,
                transparent 65%,
                transparent 100%
            );
            -webkit-mask:
                linear-gradient(#fff 0 0) content-box,
                linear-gradient(#fff 0 0);
            -webkit-mask-composite: xor;
            mask-composite: exclude;
            animation: shimmer-border 5s linear infinite;
            pointer-events: none;
        }

        @property --shimmer-angle {
            syntax: '<angle>';
            initial-value: 0deg;
            inherits: false;
        }

        @keyframes shimmer-border {
            from { --shimmer-angle: 0deg; }
            to { --shimmer-angle: 360deg; }
        }

        .site-header .sh-order-btn:hover {
            background-color: #e6860a;
        }

        .site-header .sh-mobile-menu-btn {
            display: none;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            gap: 5px;
            background: none;
            border: none;
            cursor: pointer;
            padding: 5px;
        }

        .site-header .sh-mobile-menu-btn span {
            display: block;
            width: 24px;
            height: 2px;
            background-color: #ffffff;
            border-radius: 2px;
            transition: 0.3s;
        }

        @media (max-width: 768px) {
            .site-header .sh-mobile-menu-btn {
                display: flex;
            }
            .site-header .sh-nav-links,
            .site-header .sh-order-btn {
                display: none;
            }
            .site-header .sh-nav-right.open {
                position: fixed;
                top: 0;
                left: 0;
                right: 0;
                bottom: 0;
                background: #1a1a1a;
                flex-direction: column;
                align-items: center;
                justify-content: center;
                gap: 0;
                z-index: 999;
                padding: 20px;
            }
            .site-header .sh-nav-right.open .sh-mobile-menu-btn {
                position: absolute;
                top: 20px;
                right: 20px;
            }
            .site-header .sh-nav-right.open .sh-nav-links {
                display: flex;
                flex-direction: column;
                align-items: center;
                gap: 0;
                width: 100%;
                max-width: 300px;
            }
            .site-header .sh-nav-right.open .sh-nav-links a {
                padding: 16px 0;
                border-bottom: 1px solid rgba(255, 255, 255, 0.1);
                text-align: center;
                font-size: 1.25rem;
                display: block;
                width: 100%;
            }
            .site-header .sh-nav-right.open .sh-order-btn {
                display: block;
                width: 100%;
                max-width: 300px;
                text-align: center;
                padding: 14px 20px;
                font-size: 1.1rem;
                margin-top: 20px;
            }
        }

        /* ===== SITE FOOTER ===== */
        .site-footer {
            padding: 40px 0 30px;
            background: #1a1a1a;
            border-top: none;
        }

        .site-footer .sf-container {
            max-width: 1300px;
            margin: 0 auto;
            padding: 0 20px;
        }

        .site-footer .sf-content {
            display: flex;
            align-items: center;
            margin-bottom: 30px;
        }

        .site-footer .sf-links {
            display: flex;
            align-items: center;
            gap: 32px;
            width: 100%;
        }

        .site-footer .sf-links a {
            font-size: 1rem;
            color: rgba(255, 255, 255, 0.7);
            text-decoration: none;
            transition: color 0.2s ease;
        }

        .site-footer .sf-links a:hover {
            color: #FF9505;
        }

        .site-footer .sf-btn-login {
            background: rgba(255, 255, 255, 0.15);
            color: rgba(255, 255, 255, 0.7);
            padding: 10px 24px;
            border-radius: var(--radius-xl);
            font-weight: 600;
            border: none;
            transition: all 0.2s ease;
            margin-left: auto;
        }

        .site-footer .sf-btn-login:hover {
            background: rgba(255, 255, 255, 0.15);
            color: #FF9505;
            transform: translateY(-2px);
        }

        .site-footer .sf-bottom {
            text-align: left;
            padding-top: 20px;
            border-top: 1px solid rgba(255, 255, 255, 0.15);
        }

        .site-footer .sf-bottom p {
            font-size: 0.95rem;
            color: rgba(255, 255, 255, 0.5);
        }

        @media (max-width: 1024px) {
            .site-footer .sf-links {
                flex-wrap: wrap;
                justify-content: center;
                gap: 20px;
            }
            .site-footer .sf-btn-login {
                margin-left: 0;
            }
            .site-footer .sf-bottom {
                text-align: center;
            }
        }

        @media (max-width: 768px) {
            .site-footer .sf-links {
                flex-direction: column;
                align-items: center;
                gap: 14px;
            }
            .site-footer .sf-btn-login {
                margin-top: 8px;
            }
        }

        /* ===== LOGIN PAGE ===== */
        .login-container {
            min-height: calc(100vh - 80px - 160px);
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 60px 20px;
            position: relative;
            overflow: hidden;
            background: #f9f9f9;
        }

        /* Floating gold orb behind the card */
        .login-container::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 400px;
            height: 400px;
            transform: translate(-50%, -50%);
            background: radial-gradient(circle, rgba(255, 149, 5, 0.08) 0%, rgba(255, 149, 5, 0) 70%);
            border-radius: 50%;
            pointer-events: none;
        }

        .login-card-glow {
            position: relative;
            z-index: 1;
            width: 100%;
            max-width: 440px;
        }

        .login-card-glow::before,
        .login-card-glow::after {
            display: none;
        }

        .login-card {
            background: #ffffff;
            border-radius: 20px;
            padding: 48px 44px 40px;
            width: 100%;
            position: relative;
            overflow: hidden;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
            border: 1px solid #e0e0e0;
            border-top: 3px solid #ff9505;
        }

        .login-card::before,
        .login-card::after {
            display: none;
        }

        .login-logo {
            text-align: center;
            margin-bottom: 32px;
        }

        .login-logo img {
            height: 46px;
            width: auto;
            filter: invert(1);
        }

        .login-logo h1 {
            font-size: 28px;
            font-weight: 700;
            color: var(--text-primary);
        }

        .login-logo span {
            color: var(--primary);
        }

        .login-subtitle {
            text-align: center;
            color: #666;
            font-size: 14px;
            margin-top: 8px;
        }

        .login-card .form-label {
            color: #333;
            font-size: 13px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .login-card .form-input {
            background: #f9f9f9;
            border: 1.5px solid #e0e0e0;
            color: #1a1a1a;
            border-radius: var(--radius-md);
        }

        .login-card .form-input::placeholder {
            color: #999;
        }

        .login-card .form-input:focus {
            border-color: #ff9505;
            box-shadow: 0 0 0 3px rgba(255, 149, 5, 0.12);
            background: #ffffff;
        }

        .login-card .btn-primary {
            background: #ff9505;
            color: #ffffff;
            font-weight: 700;
            letter-spacing: 0.3px;
            border: none;
            transition: background 0.2s, box-shadow 0.2s;
        }

        .login-card .btn-primary:hover:not(:disabled) {
            background: #e68600;
            box-shadow: 0 4px 16px rgba(255, 149, 5, 0.3);
        }

        @media (max-width: 480px) {
            .login-card {
                padding: 40px 28px 32px;
                border-radius: 16px;
            }
            .login-card-glow {
                max-width: 100%;
            }
            .login-container {
                padding: 40px 16px;
            }
            .login-container::before {
                width: 300px;
                height: 300px;
            }
        }

        .form-group {
            margin-bottom: 20px;
        }

        .form-label {
            display: block;
            font-size: 14px;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 8px;
        }

        .form-input {
            width: 100%;
            padding: 14px 16px;
            font-size: 15px;
            font-family: inherit;
            border: 1.5px solid var(--border);
            border-radius: var(--radius-md);
            background: var(--white);
            color: var(--text-primary);
            transition: all 0.2s ease;
        }

        .form-input:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(255, 149, 5, 0.1);
        }

        .form-input::placeholder {
            color: var(--text-muted);
        }

        select.form-input {
            height: 50px;
            cursor: pointer;
            appearance: none;
            -webkit-appearance: none;
            -moz-appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 16px center;
            padding-right: 40px;
        }

        .form-hint {
            font-size: 12px;
            color: var(--text-muted);
            margin-top: 6px;
        }

        .btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 14px 28px;
            font-size: 15px;
            font-weight: 600;
            font-family: inherit;
            border: none;
            border-radius: var(--radius-full);
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .btn-primary {
            background: var(--primary);
            color: var(--white);
            width: 100%;
        }

        .btn-primary:hover:not(:disabled) {
            background: var(--primary-hover);
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }

        .btn-primary:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none;
        }

        .btn-google {
            background: var(--white);
            color: var(--text-primary);
            border: 1.5px solid var(--border);
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
            font-weight: 500;
        }

        .btn-google:hover:not(:disabled) {
            background: var(--bg);
            border-color: var(--text-muted);
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }

        .btn-google:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none;
        }

        .login-divider {
            display: flex;
            align-items: center;
            margin: 20px 0;
            color: var(--text-muted);
            font-size: 13px;
        }

        .login-divider::before,
        .login-divider::after {
            content: '';
            flex: 1;
            height: 1px;
            background: var(--border);
        }

        .login-divider span {
            padding: 0 16px;
        }

        .btn-secondary {
            background: var(--white);
            color: var(--text-primary);
            border: 1.5px solid var(--border);
        }

        .btn-secondary:hover:not(:disabled) {
            background: var(--bg);
            border-color: var(--text-muted);
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }

        .btn-success {
            background: var(--success);
            color: var(--white);
            border: none;
        }

        .btn-success:hover:not(:disabled) {
            background: #15803d;
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }

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

        .btn-danger:hover:not(:disabled) {
            background: #b91c1c;
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }

        .btn-sm {
            padding: 10px 20px;
            font-size: 14px;
        }

        .login-error {
            background: var(--error-light);
            color: var(--error);
            padding: 12px 16px;
            border-radius: var(--radius-md);
            font-size: 14px;
            margin-bottom: 20px;
            display: none;
        }

        .login-error.show {
            display: block;
        }

        .login-success {
            background: rgba(16, 185, 129, 0.1);
            color: #059669;
            padding: 12px 16px;
            border-radius: var(--radius-md);
            font-size: 14px;
            margin-bottom: 20px;
            display: none;
        }

        .login-success.show {
            display: block;
        }

        /* ===== DASHBOARD LAYOUT ===== */
        .dashboard {
            display: none;
            min-height: 100vh;
        }

        .dashboard.active {
            display: block;
        }

        .header {
            background: #1a1a1a;
            border-bottom: none;
            padding: 16px 24px 0;
            position: sticky;
            top: 0;
            z-index: 100;
        }

        .header-content {
            max-width: 1400px;
            margin: 0 auto;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .header-logo {
            display: flex;
            align-items: center;
        }

        .header-logo img {
            height: 50px;
            width: auto;
        }

        .header-user {
            display: flex;
            align-items: center;
            gap: 16px;
        }

        .header-email {
            font-size: 14px;
            color: rgba(255, 255, 255, 0.7);
        }

        .btn-logout {
            background: none;
            border: 1.5px solid var(--border);
            color: var(--text-secondary);
            padding: 8px 16px;
            font-size: 13px;
            font-weight: 600;
            font-family: inherit;
            border-radius: var(--radius-full);
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .btn-logout:hover {
            border-color: var(--error);
            color: var(--error);
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }

        .user-dropdown {
            position: relative;
        }

        .user-dropdown-trigger {
            display: flex;
            align-items: center;
            gap: 8px;
            background: none;
            border: 1.5px solid rgba(255, 255, 255, 0.3);
            color: rgba(255, 255, 255, 0.7);
            padding: 8px 16px;
            font-size: 13px;
            font-weight: 500;
            font-family: inherit;
            border-radius: var(--radius-full);
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .user-dropdown-trigger:hover {
            border-color: rgba(255, 255, 255, 0.6);
            color: #ffffff;
        }

        .user-dropdown-menu {
            position: absolute;
            top: calc(100% + 8px);
            right: 0;
            background: var(--white);
            border: 1px solid var(--border);
            border-radius: var(--radius-md);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
            min-width: 180px;
            z-index: 1000;
            display: none;
        }

        .user-dropdown-menu.show {
            display: block;
        }

        .user-dropdown-item {
            display: flex;
            align-items: center;
            gap: 10px;
            width: 100%;
            padding: 12px 16px;
            background: none;
            border: none;
            font-size: 14px;
            font-family: inherit;
            color: var(--text-primary);
            cursor: pointer;
            transition: background 0.15s ease;
        }

        .user-dropdown-item:hover {
            background: var(--bg);
        }

        .user-dropdown-item:first-child {
            border-radius: var(--radius-md) var(--radius-md) 0 0;
        }

        .user-dropdown-item:last-child {
            border-radius: 0 0 var(--radius-md) var(--radius-md);
            color: var(--error);
        }

        .user-dropdown-item:last-child:hover {
            background: rgba(239, 68, 68, 0.05);
        }

        /* ===== NAVIGATION TABS ===== */
        .nav-tabs {
            background: transparent;
            border-bottom: none;
            padding: 0;
        }

        .nav-tabs-inner {
            max-width: 1400px;
            margin: 0 auto;
            display: flex;
            align-items: center;
            gap: 4px;
            overflow-x: auto;
            padding: 12px 0;
        }

        .nav-tab {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 8px 14px;
            font-size: 13px;
            font-weight: 600;
            font-family: inherit;
            color: rgba(255, 255, 255, 0.55);
            background: none;
            border: 1.5px solid transparent;
            border-radius: var(--radius-full);
            cursor: pointer;
            transition: all 0.2s ease;
            white-space: nowrap;
        }

        .nav-tab svg {
            display: none;
        }

        .nav-tab:hover:not(.active) {
            color: rgba(255, 255, 255, 0.9);
            background: rgba(255, 255, 255, 0.1);
            transform: none;
            box-shadow: none;
        }

        .nav-tab.active {
            color: var(--primary);
            background: transparent;
            border-color: var(--primary);
        }

        .nav-tab-count {
            background: rgba(255, 255, 255, 0.12);
            color: rgba(255, 255, 255, 0.6);
            padding: 2px 8px;
            border-radius: var(--radius-full);
            font-size: 12px;
            font-weight: 700;
            min-width: 24px;
            text-align: center;
        }

        .nav-tab.active .nav-tab-count {
            background: var(--primary);
            color: var(--white);
        }

        .nav-tab-divider {
            width: 1px;
            height: 20px;
            background: rgba(255, 255, 255, 0.15);
            margin: 0 6px;
        }

        .nav-tab-settings {
            margin-left: auto;
        }

        /* ===== MAIN CONTENT ===== */
        .main-content {
            max-width: 1400px;
            margin: 0 auto;
            padding: 24px;
        }

        /* ===== TOOLBAR ===== */
        .toolbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            margin-bottom: 16px;
            flex-wrap: wrap;
        }

        .orders-summary-bar {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 16px;
            background: var(--white);
            border-radius: var(--radius-md);
            border: 1px solid var(--border-light);
            margin-bottom: 16px;
            font-size: 14px;
            color: var(--text-secondary);
        }

        .orders-summary-bar strong {
            color: var(--text-primary);
            font-weight: 700;
        }

        .summary-divider {
            color: var(--border);
        }

        .summary-total strong {
            color: var(--primary);
        }

        .export-checkboxes {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .export-checkbox-label {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 14px;
            font-weight: 500;
            color: var(--text-primary);
            cursor: pointer;
        }

        .export-checkbox-label input[type="checkbox"] {
            width: 18px;
            height: 18px;
            accent-color: var(--primary);
            cursor: pointer;
        }

        .btn-export-action {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 12px 28px;
            font-size: 14px;
            font-weight: 600;
            font-family: inherit;
            color: var(--white);
            background: var(--primary);
            border: none;
            border-radius: var(--radius-full);
            cursor: pointer;
            transition: all 0.2s ease;
            margin-top: 20px;
        }

        .btn-export-action:hover {
            background: #e68600;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(247, 148, 29, 0.35);
        }

        /* Bulk Selection Styles */
        .bulk-checkbox-cell {
            width: 40px;
            text-align: center;
            padding: 8px !important;
        }
        .bulk-checkbox {
            width: 18px;
            height: 18px;
            cursor: pointer;
            accent-color: var(--primary);
        }
        .bulk-actions-bar {
            display: none;
            align-items: center;
            gap: 12px;
            padding: 12px 20px;
            background: var(--accent-light, #fff8f0);
            border-bottom: 1px solid var(--border-light);
            border-radius: 8px 8px 0 0;
            margin-bottom: -1px;
        }
        .bulk-actions-bar.active {
            display: flex;
        }
        .bulk-count {
            font-weight: 600;
            color: var(--text-primary);
        }
        .btn-bulk {
            padding: 8px 16px;
            font-size: 13px;
            border-radius: var(--radius-full);
            cursor: pointer;
            border: none;
            font-weight: 600;
            transition: all 0.2s;
        }
        .btn-bulk-archive {
            background: var(--primary);
            color: white;
        }
        .btn-bulk-archive:hover {
            background: var(--primary-dark, #e68600);
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }
        .btn-bulk-delete {
            background: var(--error);
            color: white;
        }
        .btn-bulk-delete:hover {
            background: #dc2626;
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }
        .btn-bulk-cancel {
            background: var(--bg-section);
            color: var(--text-secondary);
            border: 1px solid var(--border-light);
        }
        .btn-bulk-cancel:hover {
            background: var(--bg-card);
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }

        .toolbar-left {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .toolbar-right {
            display: flex;
            align-items: center;
            gap: 12px;
            flex-wrap: wrap;
        }

        .search-input {
            padding: 10px 16px;
            padding-left: 40px;
            font-size: 14px;
            font-family: inherit;
            border: 1.5px solid var(--border);
            border-radius: var(--radius-full);
            background: var(--white);
            color: var(--text-primary);
            width: 280px;
            transition: all 0.2s ease;
        }

        .search-input:focus {
            outline: none;
            border-color: var(--primary);
        }

        .search-wrapper {
            position: relative;
        }

        .search-icon {
            position: absolute;
            left: 14px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-muted);
            width: 18px;
            height: 18px;
        }

        .sort-select {
            padding: 10px 36px 10px 16px;
            font-size: 14px;
            font-family: inherit;
            border: 1.5px solid var(--border);
            border-radius: var(--radius-full);
            background: var(--white);
            color: var(--text-primary);
            cursor: pointer;
            appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 12px center;
        }

        .sort-select:focus {
            outline: none;
            border-color: var(--primary);
        }

        .date-filter {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .date-range-inputs {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .date-range-inputs span {
            color: var(--text-secondary);
            font-size: 13px;
        }

        .date-input {
            padding: 8px 12px;
            font-size: 13px;
            font-family: inherit;
            border: 1.5px solid var(--border);
            border-radius: var(--radius-md);
            background: var(--white);
            color: var(--text-primary);
        }

        .date-input:focus {
            outline: none;
            border-color: var(--primary);
        }

        /* ===== ORDERS TABLE ===== */
        .orders-table {
            background: var(--white);
            border-radius: var(--radius-lg);
            box-shadow: var(--shadow-sm);
            overflow: hidden;
        }

        .orders-table table {
            width: 100%;
            border-collapse: collapse;
        }

        .orders-table th {
            text-align: left;
            padding: 14px 20px;
            font-size: 12px;
            font-weight: 700;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            background: var(--bg);
            border-bottom: 1px solid var(--border-light);
        }

        .orders-table td {
            padding: 18px 20px;
            font-size: 15px;
            color: var(--text-primary);
            border-bottom: 1px solid var(--border-light);
        }

        .orders-table tr:last-child td {
            border-bottom: none;
        }

        .orders-table tbody tr {
            cursor: pointer;
            transition: background 0.15s ease;
        }

        .orders-table tbody tr:hover {
            background: var(--primary-light);
        }

        .order-id {
            font-weight: 700;
            color: var(--primary);
        }

        .order-date {
            color: var(--text-secondary);
            font-size: 13px;
        }

        /* Order list cell styles */
        .order-customer-cell {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .order-customer-company {
            font-weight: 500;
            font-size: 15px;
            color: var(--text-primary);
        }

        .order-customer-contact {
            font-size: 13px;
            color: var(--text-muted);
        }

        .order-date-cell {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .order-date-main {
            font-size: 15px;
            color: var(--text-primary);
        }

        .order-date-age {
            font-size: 13px;
            color: var(--text-muted);
        }

        .order-type-plain {
            font-size: 15px;
            color: var(--text-primary);
        }

        .order-total-cell {
            font-size: 14px;
            font-weight: 600;
            color: var(--text-primary);
        }

        /* Turnaround badges */
        .badge-turnaround-standard {
            background: #f0fdf4;
            color: #16a34a;
            border: 1px solid #16a34a;
            font-size: 13px;
            padding: 5px 12px;
        }

        .badge-turnaround-expedited {
            background: #fef2f2;
            color: #dc2626;
            border: 1px solid #dc2626;
            font-size: 13px;
            padding: 5px 12px;
        }

        /* Materials status indicators */
        .badge-awaiting-materials {
            background: #fef2f2;
            color: #dc2626;
            border: 1px solid #dc2626;
            font-size: 12px;
            padding: 4px 10px;
        }

        .badge-ready-production {
            background: #f0fdf4;
            color: #16a34a;
            border: 1px solid #16a34a;
            font-size: 12px;
            padding: 4px 10px;
        }

        .badge {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 4px 10px;
            font-size: 12px;
            font-weight: 600;
            border-radius: var(--radius-full);
        }

        .badge-expedited {
            background: var(--warning-light);
            color: var(--warning);
        }

        .badge-standard {
            background: var(--bg);
            color: var(--text-muted);
        }

        .badge-rejected {
            background: var(--error-light);
            color: var(--error);
        }

        .badge-notes {
            background: #eff6ff;
            color: #3b82f6;
        }

        .badge-envelopes {
            background: #f0fdf4;
            color: #22c55e;
        }

        .badge-sets {
            background: #faf5ff;
            color: #a855f7;
        }

        /* ===== EMPTY STATE ===== */
        .empty-state {
            text-align: center;
            padding: 60px 20px;
        }

        .empty-state-icon {
            width: 64px;
            height: 64px;
            margin: 0 auto 16px;
            color: var(--text-muted);
        }

        .empty-state-title {
            font-size: 18px;
            font-weight: 700;
            color: var(--text-primary);
            margin-bottom: 8px;
        }

        .empty-state-desc {
            font-size: 14px;
            color: var(--text-secondary);
        }

        /* ===== ORDER DETAIL VIEW ===== */
        .order-detail {
            display: none;
        }

        .order-detail.active {
            display: block;
        }

        /* ===== OUTBOUND DETAIL VIEW ===== */
        .outbound-detail {
            display: none;
        }

        .outbound-detail.active {
            display: block;
        }

        .back-btn {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 10px 20px;
            font-size: 14px;
            font-weight: 600;
            font-family: inherit;
            color: var(--text-secondary);
            background: var(--white);
            border: 1.5px solid var(--border);
            border-radius: var(--radius-full);
            cursor: pointer;
            transition: all 0.2s ease;
            margin-bottom: 20px;
        }

        .back-btn:hover {
            border-color: var(--text-muted);
            color: var(--text-primary);
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }

        .order-header {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 20px;
            margin-bottom: 24px;
            flex-wrap: wrap;
        }

        .order-title {
            font-size: 28px;
            font-weight: 700;
            color: var(--text-primary);
        }

        .order-meta {
            font-size: 14px;
            color: var(--text-secondary);
            margin-top: 4px;
        }

        .order-actions {
            display: flex;
            gap: 12px;
            flex-wrap: wrap;
        }

        .btn-production {
            background: #dbeafe;
            color: #2563eb;
            border: 1.5px solid #2563eb;
        }

        .btn-production:hover {
            background: #2563eb;
            color: var(--white);
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }

        .btn-shipped {
            background: #f3e8ff;
            color: #9333ea;
            border: 1.5px solid #9333ea;
        }

        .btn-shipped:hover {
            background: #9333ea;
            color: var(--white);
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }

        .btn-expedite {
            background: var(--warning-light);
            color: var(--warning);
            border: 1.5px solid var(--warning);
        }

        .btn-expedite:hover {
            background: var(--warning);
            color: var(--white);
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }

        .btn-complete {
            background: var(--success);
            color: var(--white);
        }

        .btn-complete:hover {
            background: #16a34a;
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }

        .btn-delete {
            background: var(--error-light);
            color: var(--error);
            border: 1.5px solid var(--error);
        }

        .btn-delete:hover {
            background: var(--error);
            color: var(--white);
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }

        /* Settings View */
        .settings-view {
            display: none;
            padding: 24px;
        }

        .settings-view.active {
            display: block;
        }

        /* Thank You Note Status */
        .thank-you-status {
            display: flex;
            align-items: center;
            gap: 16px;
            padding: 16px;
            background: var(--bg-section);
            border-radius: var(--radius-md);
        }

        .thank-you-status-indicator {
            display: flex;
            align-items: center;
            gap: 8px;
            font-weight: 500;
        }

        .thank-you-status-dot {
            width: 10px;
            height: 10px;
            border-radius: 50%;
        }

        .thank-you-status-dot.none { background: var(--text-muted); }
        .thank-you-status-dot.pending { background: var(--warning); }
        .thank-you-status-dot.sent { background: var(--success); }

        .thank-you-action {
            margin-left: auto;
        }

        .thank-you-sent-date {
            color: var(--text-secondary);
            font-size: 13px;
            margin-left: auto;
        }

        /* Outbound View */
        .outbound-view {
            display: none;
            padding: 24px;
        }

        .outbound-view.active {
            display: block;
        }

        /* Compact Toolbar */
        .outbound-toolbar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 16px;
        }

        .outbound-toolbar-left {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .outbound-toolbar-right {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .outbound-filter-select {
            padding: 10px 36px 10px 16px;
            font-size: 14px;
            font-weight: 600;
            font-family: inherit;
            border: 1.5px solid var(--border);
            border-radius: var(--radius-full);
            background: var(--white);
            color: var(--text-primary);
            cursor: pointer;
            appearance: none;
            -webkit-appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 12px center;
        }

        .outbound-filter-select:focus {
            outline: none;
            border-color: var(--primary);
        }

        .outbound-selected-count {
            font-size: 13px;
            color: var(--text-muted);
        }

        .outbound-action-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            padding: 10px 20px;
            font-size: 14px;
            font-weight: 600;
            font-family: inherit;
            background: var(--white);
            border: 1.5px solid var(--border);
            border-radius: var(--radius-full);
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.15s ease;
            box-sizing: border-box;
            height: 42px;
        }

        .outbound-action-btn:hover:not(:disabled) {
            border-color: var(--text-muted);
            color: var(--text-primary);
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }

        .outbound-action-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .outbound-action-btn.export {
            background: var(--primary);
            border-color: var(--primary);
            color: var(--white);
        }

        .outbound-action-btn.export:hover:not(:disabled) {
            background: #e68600;
            border-color: #e68600;
            color: var(--white);
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }

        .outbound-action-btn.primary {
            background: #16a34a;
            border-color: #16a34a;
            color: var(--white);
        }

        .outbound-action-btn.primary:hover:not(:disabled) {
            background: #15803d;
            border-color: #15803d;
            color: var(--white);
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }

        .outbound-action-btn.delete {
            background: #dc2626;
            border-color: #dc2626;
            color: var(--white);
        }

        .outbound-action-btn.delete:hover:not(:disabled) {
            background: #b91c1c;
            border-color: #b91c1c;
            color: var(--white);
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }

        /* Template settings - moved to Settings tab */
        .template-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
            margin-top: 16px;
            margin-bottom: 16px;
        }

        .template-group {
            display: flex;
            flex-direction: column;
        }

        .template-textarea {
            min-height: 80px;
            resize: vertical;
        }

        .outbound-table-container {
            background: var(--white);
            border-radius: var(--radius-lg);
            box-shadow: var(--shadow-sm);
            overflow: hidden;
        }

        .outbound-table {
            width: 100%;
            border-collapse: collapse;
        }

        .outbound-table th {
            text-align: left;
            padding: 14px 20px;
            font-size: 12px;
            font-weight: 700;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            background: var(--bg);
            border-bottom: 1px solid var(--border-light);
        }

        .outbound-table td {
            padding: 18px 20px;
            font-size: 15px;
            color: var(--text-primary);
            border-bottom: 1px solid var(--border-light);
            vertical-align: middle;
        }

        .outbound-table tr:last-child td {
            border-bottom: none;
        }

        .outbound-table tbody tr {
            cursor: pointer;
            transition: background 0.15s ease;
        }

        .outbound-table tbody tr:hover {
            background: var(--primary-light);
        }

        .outbound-table tbody tr.selected {
            background: rgba(255, 149, 5, 0.1);
        }

        .outbound-type-badge {
            display: inline-flex;
            padding: 4px 10px;
            font-size: 11px;
            font-weight: 600;
            border-radius: var(--radius-full);
            text-transform: uppercase;
        }

        .outbound-type-badge.sample {
            background: #e0f2fe;
            color: #0369a1;
        }

        .outbound-type-badge.thankyou {
            background: #ede9fe;
            color: #7c3aed;
        }

        /* Outbound table checkboxes */
        .outbound-checkbox,
        #selectAllOutbound {
            width: 18px;
            height: 18px;
            cursor: pointer;
            accent-color: var(--primary);
        }

        /* Outbound customer cell (company on top, name below) */
        .outbound-customer-cell {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .outbound-customer-company {
            font-weight: 500;
            font-size: 15px;
            color: var(--text-primary);
        }

        .outbound-customer-name {
            font-size: 13px;
            color: var(--text-muted);
        }

        /* Outbound status badges */
        .outbound-status-badge {
            display: inline-flex;
            padding: 4px 10px;
            font-size: 11px;
            font-weight: 600;
            border-radius: var(--radius-full);
            text-transform: uppercase;
        }

        .outbound-status-badge.pending {
            background: #fef2f2;
            color: #dc2626;
            border: 1px solid #dc2626;
        }

        .outbound-status-badge.sent {
            background: #f0fdf4;
            color: #16a34a;
            border: 1px solid #16a34a;
        }

        .empty-state-hint {
            font-size: 13px;
            color: var(--text-muted);
            margin-top: 4px;
        }

        .settings-subnav {
            display: flex;
            gap: 8px;
            margin-bottom: 24px;
            border-bottom: 2px solid var(--border-light);
            padding-bottom: 12px;
        }

        .settings-subnav-btn {
            padding: 10px 20px;
            font-size: 14px;
            font-weight: 600;
            font-family: inherit;
            color: var(--text-secondary);
            background: none;
            border: none;
            border-radius: var(--radius-md);
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .settings-subnav-btn:hover:not(.active) {
            color: var(--text-primary);
            background: var(--bg);
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }

        .settings-subnav-btn.active {
            color: var(--primary);
            background: var(--primary-light);
        }

        .settings-subnav-link {
            display: inline-flex;
            align-items: center;
            text-decoration: none;
            margin-left: auto;
        }

        .settings-subnav-link:hover {
            color: var(--primary);
        }

        .settings-section {
            display: block;
        }

        .settings-section.hidden {
            display: none;
        }

        .settings-title {
            font-size: 24px;
            font-weight: 700;
            margin-bottom: 8px;
        }

        .settings-desc {
            color: var(--text-secondary);
            margin-bottom: 32px;
        }

        .settings-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
            gap: 24px;
            margin-bottom: 32px;
        }

        .settings-card {
            background: var(--white);
            border-radius: var(--radius-lg);
            box-shadow: var(--shadow-sm);
            padding: 24px;
        }

        .settings-card-header {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 8px;
        }

        .settings-card-header svg {
            color: var(--primary);
        }

        .settings-card-header h3 {
            font-size: 18px;
            font-weight: 600;
        }

        .settings-hint {
            font-size: 13px;
            color: var(--text-muted);
            margin-bottom: 20px;
        }

        .settings-label {
            display: block;
            font-size: 13px;
            font-weight: 600;
            color: var(--text-secondary);
            margin-bottom: 6px;
            margin-top: 16px;
        }

        .settings-label:first-of-type {
            margin-top: 0;
        }

        .settings-input {
            width: 100%;
            padding: 12px 14px;
            border: 1.5px solid var(--border);
            border-radius: var(--radius-md);
            font-family: inherit;
            font-size: 14px;
            transition: border-color 0.2s, box-shadow 0.2s;
        }

        .settings-input:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(255, 149, 5, 0.1);
        }

        .settings-textarea {
            width: 100%;
            padding: 12px 14px;
            border: 1.5px solid var(--border);
            border-radius: var(--radius-md);
            font-family: inherit;
            font-size: 14px;
            resize: vertical;
            min-height: 120px;
            transition: border-color 0.2s, box-shadow 0.2s;
        }

        .settings-textarea:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(255, 149, 5, 0.1);
        }

        .settings-variables {
            font-size: 12px;
            color: var(--text-muted);
            margin-top: 12px;
            padding: 10px;
            background: var(--bg);
            border-radius: var(--radius-sm);
        }

        .settings-actions {
            display: flex;
            gap: 12px;
            margin-top: 24px;
        }

        .settings-actions .btn {
            padding: 10px 20px;
            font-size: 14px;
        }

        /* Discount Codes Styles */
        .discount-header {
            margin-bottom: 20px;
        }

        .discount-table-container {
            background: var(--white);
            border-radius: var(--radius-lg);
            box-shadow: var(--shadow-sm);
            overflow: hidden;
        }

        .discount-table {
            width: 100%;
            border-collapse: collapse;
        }

        .discount-table th,
        .discount-table td {
            padding: 12px 16px;
            text-align: left;
            border-bottom: 1px solid var(--border-light);
        }

        .discount-table th {
            background: var(--bg);
            font-size: 12px;
            font-weight: 600;
            color: var(--text-secondary);
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .discount-table td {
            font-size: 14px;
        }

        .discount-table tbody tr:hover {
            background: var(--bg);
        }

        .discount-code-text {
            font-family: monospace;
            font-weight: 600;
            background: var(--bg);
            padding: 4px 8px;
            border-radius: 4px;
        }

        .discount-type-badge {
            display: inline-block;
            padding: 4px 10px;
            border-radius: var(--radius-full);
            font-size: 12px;
            font-weight: 600;
        }

        .discount-type-badge.free {
            background: #e0f2fe;
            color: #0369a1;
        }

        .discount-type-badge.test {
            background: #fef3c7;
            color: #92400e;
        }

        .discount-type-badge.postage {
            background: #f3e8ff;
            color: #7c3aed;
        }

        .discount-type-badge.percentage {
            background: #dcfce7;
            color: #166534;
        }

        .discount-type-badge.flat {
            background: #fce7f3;
            color: #be185d;
        }

        .discount-status {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            font-size: 13px;
        }

        .discount-status-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
        }

        .discount-status-dot.active {
            background: var(--success);
        }

        .discount-status-dot.inactive {
            background: var(--text-muted);
        }

        .discount-actions {
            display: flex;
            gap: 8px;
        }

        .discount-actions {
            display: flex;
            gap: 6px;
            justify-content: flex-end;
        }

        .discount-actions button {
            padding: 6px 12px;
            font-size: 12px;
            font-weight: 500;
            border-radius: var(--radius-sm);
            cursor: pointer;
            transition: all 0.15s;
            white-space: nowrap;
        }

        .btn-edit {
            background: var(--bg);
            color: var(--text-primary);
            border: 1px solid var(--border);
        }

        .btn-edit:hover {
            background: var(--border-light);
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }

        .btn-reset-stats {
            background: var(--bg);
            color: var(--text-secondary);
            border: 1px solid var(--border);
        }

        .btn-reset-stats:hover {
            background: var(--border-light);
            color: var(--text-primary);
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }

        .btn-delete-sm {
            background: var(--bg);
            color: var(--error);
            border: 1px solid var(--border);
        }

        .btn-delete-sm:hover {
            background: var(--error);
            color: white;
            border-color: var(--error);
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }

        .form-hint {
            font-size: 12px;
            color: var(--text-muted);
            margin-top: 4px;
        }

        .form-row {
            display: flex;
            gap: 16px;
        }

        .input-with-addon {
            display: flex;
            align-items: center;
        }

        .input-addon {
            padding: 12px 14px;
            background: var(--bg);
            border: 1.5px solid var(--border);
            border-right: none;
            border-radius: var(--radius-md) 0 0 var(--radius-md);
            font-size: 14px;
            color: var(--text-secondary);
        }

        .input-with-addon .form-input {
            border-radius: 0 var(--radius-md) var(--radius-md) 0;
        }

        .checkbox-label {
            display: flex;
            align-items: center;
            gap: 10px;
            cursor: pointer;
            font-size: 14px;
        }

        .checkbox-label input[type="checkbox"] {
            width: 18px;
            height: 18px;
            cursor: pointer;
        }

        .modal-footer {
            display: flex;
            justify-content: flex-end;
            gap: 12px;
            padding: 16px 24px;
            border-top: 1px solid var(--border-light);
            background: var(--bg);
        }

        .btn-secondary {
            background: var(--white);
            color: var(--text-secondary);
            border: 1.5px solid var(--border);
        }

        .btn-secondary:hover:not(:disabled) {
            background: var(--bg);
            border-color: var(--text-muted);
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }

        .settings-section-title {
            font-size: 16px;
            font-weight: 600;
            color: var(--text-primary);
            margin-top: 32px;
            margin-bottom: 16px;
            padding-top: 24px;
            border-top: 1px solid var(--border-light);
        }

        .settings-section-title:first-of-type {
            margin-top: 0;
            padding-top: 0;
            border-top: none;
        }

        .settings-form-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 16px;
            margin-bottom: 16px;
        }

        .settings-note {
            background: #fffbeb;
            border: 1px solid #fcd34d;
            border-radius: var(--radius-md);
            padding: 16px;
            margin-bottom: 24px;
            font-size: 13px;
            color: #92400e;
        }

        .settings-note strong {
            display: block;
            margin-bottom: 4px;
        }

        .nav-tab-settings {
            margin-left: auto;
        }

        /* ===== DASHBOARD STYLES ===== */
        .dashboard-view {
            display: none;
        }

        .dashboard-view.active {
            display: block;
        }

        .dashboard-section {
            margin-bottom: 32px;
        }

        .dashboard-section-title {
            font-size: 18px;
            font-weight: 700;
            color: var(--text-primary);
            margin-bottom: 16px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .dashboard-section-title svg {
            color: var(--primary);
        }

        /* Order Stage Cards */
        .stage-cards {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 12px;
        }

        @media (max-width: 1100px) {
            .stage-cards {
                grid-template-columns: repeat(3, 1fr);
            }
        }

        @media (max-width: 700px) {
            .stage-cards {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        @media (max-width: 500px) {
            .stage-cards {
                grid-template-columns: 1fr;
            }
        }

        .stage-card {
            background: var(--white);
            border-radius: var(--radius-lg);
            padding: 24px;
            box-shadow: var(--shadow-sm);
            cursor: pointer;
            transition: all 0.2s ease;
            border: 2px solid transparent;
        }

        .stage-card:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-md);
            border-color: var(--primary);
        }

        .stage-card.active {
            border-color: var(--primary);
            background: var(--primary-light);
        }

        .stage-card-count {
            font-size: 36px;
            font-weight: 700;
            color: var(--text-primary);
            margin-bottom: 4px;
        }

        .stage-card-label {
            font-size: 14px;
            font-weight: 600;
            color: var(--text-secondary);
        }

        .stage-card.expedited .stage-card-count { color: var(--warning); }
        .stage-card.pending .stage-card-count { color: var(--warning); }
        .stage-card.production .stage-card-count { color: var(--warning); }
        .stage-card.shipped .stage-card-count { color: var(--warning); }
        .stage-card.closed .stage-card-count { color: var(--warning); }

        .archive-count-row {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-top: 16px;
            padding-top: 16px;
            border-top: 1px solid var(--border-light);
        }

        .archive-label {
            font-size: 13px;
            color: var(--text-muted);
        }

        .archive-count {
            font-size: 14px;
            font-weight: 600;
            color: var(--text-secondary);
            background: var(--bg);
            padding: 2px 10px;
            border-radius: var(--radius-full);
        }

        .archive-link {
            font-size: 13px;
            color: var(--primary);
            background: none;
            border: none;
            cursor: pointer;
            margin-left: auto;
        }

        .archive-link:hover {
            text-decoration: underline;
        }

        /* Inventory Section */
        .inventory-grid {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }

        .inventory-card {
            background: var(--white);
            border-radius: var(--radius-lg);
            box-shadow: var(--shadow-sm);
            overflow: hidden;
        }

        .inventory-card-header {
            background: var(--bg);
            padding: 16px 20px;
            font-size: 14px;
            font-weight: 700;
            color: var(--text-primary);
            border-bottom: 1px solid var(--border-light);
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .inventory-card-header .btn-sm {
            padding: 6px 12px;
            font-size: 12px;
        }

        .inventory-table {
            width: 100%;
            border-collapse: collapse;
        }

        .inventory-table th {
            text-align: left;
            padding: 12px 16px;
            font-size: 11px;
            font-weight: 700;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            background: var(--bg);
            border-bottom: 1px solid var(--border-light);
        }

        .inventory-table td {
            padding: 12px 16px;
            font-size: 14px;
            color: var(--text-primary);
            border-bottom: 1px solid var(--border-light);
        }

        .inventory-table tr:last-child td {
            border-bottom: none;
        }

        .inventory-item-name {
            font-weight: 600;
        }

        .inventory-value {
            font-weight: 700;
            font-family: 'Quicksand', sans-serif;
        }

        .inventory-value.surplus {
            color: var(--success);
        }

        .inventory-value.deficit {
            color: var(--error);
        }

        .inventory-deficit-display {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            font-weight: 600;
        }

        .inventory-deficit-icon {
            flex-shrink: 0;
            vertical-align: middle;
            margin-left: 6px;
        }

        .inventory-status {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 4px 10px;
            border-radius: var(--radius-full);
            font-size: 12px;
            font-weight: 600;
        }

        .inventory-status.ok {
            background: var(--success-light);
            color: var(--success);
        }

        .inventory-status.low {
            background: var(--warning-light);
            color: var(--warning);
        }

        .inventory-status.out {
            background: var(--error-light);
            color: var(--error);
        }

        .inventory-actions {
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .inventory-btn {
            width: 28px;
            height: 28px;
            border: 1.5px solid var(--border);
            border-radius: var(--radius-sm);
            background: var(--white);
            color: var(--text-secondary);
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.15s ease;
        }

        .inventory-btn:hover {
            border-color: var(--primary);
            color: var(--primary);
            background: var(--primary-light);
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }

        .inventory-btn.plus:hover {
            border-color: var(--success);
            color: var(--success);
            background: var(--success-light);
        }

        .inventory-btn.minus:hover {
            border-color: var(--error);
            color: var(--error);
            background: var(--error-light);
        }

        /* Restock Modal */
        .modal-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.5);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 1000;
            opacity: 0;
            visibility: hidden;
            transition: all 0.2s ease;
        }

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

        .modal {
            background: var(--white);
            border-radius: var(--radius-lg);
            box-shadow: var(--shadow-lg);
            width: 100%;
            max-width: 500px;
            max-height: 90vh;
            overflow-y: auto;
            transform: scale(0.95);
            transition: transform 0.2s ease;
        }

        .modal-overlay.active .modal {
            transform: scale(1);
        }

        .modal-header {
            padding: 20px 24px;
            border-bottom: 1px solid var(--border-light);
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .modal-title {
            font-size: 18px;
            font-weight: 700;
            color: var(--text-primary);
        }

        .modal-close {
            width: 32px;
            height: 32px;
            border: none;
            background: var(--bg);
            border-radius: var(--radius-sm);
            color: var(--text-secondary);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.15s ease;
        }

        .modal-close:hover {
            background: var(--error-light);
            color: var(--error);
        }

        .modal-body {
            padding: 24px;
        }

        .modal-footer {
            padding: 16px 24px;
            border-top: 1px solid var(--border-light);
            display: flex;
            justify-content: flex-end;
            gap: 12px;
        }

        .restock-grid {
            display: grid;
            gap: 16px;
        }

        .restock-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 12px 16px;
            background: var(--bg);
            border-radius: var(--radius-md);
        }

        .restock-item-label {
            font-size: 14px;
            font-weight: 600;
            color: var(--text-primary);
        }

        .restock-item-input {
            width: 80px;
            padding: 8px 12px;
            font-size: 14px;
            font-family: inherit;
            border: 1.5px solid var(--border);
            border-radius: var(--radius-sm);
            text-align: center;
        }

        .restock-item-input:focus {
            outline: none;
            border-color: var(--primary);
        }

        /* ===== ORDER DETAIL REDESIGN V3 ===== */

        /* Order Header - New Design */
        .order-header {
            background: var(--white);
            border-radius: var(--radius-lg);
            margin-bottom: 20px;
            box-shadow: var(--shadow-sm);
            overflow: hidden;
            display: flex !important;
            flex-direction: column !important;
        }

        .order-header-top {
            padding: 24px;
            display: flex !important;
            flex-direction: row !important;
            align-items: center;
            justify-content: space-between !important;
            width: 100%;
            box-sizing: border-box;
        }

        .order-header-left {
            display: flex !important;
            flex-direction: row !important;
            align-items: center;
            gap: 24px;
            flex-shrink: 0;
        }

        .order-campaign-id {
            font-size: 32px;
            font-weight: 700;
            color: var(--text-primary);
            letter-spacing: -0.5px;
            white-space: nowrap;
        }

        .order-date-info {
            display: flex !important;
            flex-direction: column !important;
            gap: 2px;
            align-items: flex-start;
        }

        .order-date-label {
            font-size: 16px;
            font-weight: 700;
            color: var(--text-primary);
            line-height: 1.2;
        }

        .order-date-value {
            font-size: 14px;
            color: #666;
            font-weight: 500;
            line-height: 1.2;
        }

        .order-header-right {
            display: flex !important;
            flex-direction: row !important;
            align-items: center;
            gap: 16px;
            flex-shrink: 0;
            margin-left: auto;
        }

        .order-total-amount {
            font-size: 28px;
            font-weight: 700;
            color: var(--text-primary);
            white-space: nowrap;
        }

        .order-status-badge {
            display: inline-flex;
            align-items: center;
            padding: 8px 16px;
            border-radius: 6px;
            font-size: 13px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            white-space: nowrap;
        }

        .order-status-badge.paid {
            background: #22c55e;
            color: white;
        }

        .order-status-badge.awaiting-payment {
            background: var(--danger);
            color: white;
        }

        .order-status-badge.pending {
            background: #f59e0b;
            color: white;
        }

        .order-status-badge.unpaid {
            background: #ef4444;
            color: white;
        }

        .order-status-badge.expedited {
            background: #ef4444;
            color: white;
        }

        .order-status-badge.standard {
            background: #22c55e;
            color: white;
        }

        .order-status-badge.hidden {
            display: none;
        }

        /* Thank You Badge styles */
        .thank-you-badge {
            cursor: default;
            display: none;
            align-items: center;
            background: #8b5cf6;
            color: white;
            border: none;
        }

        .order-header-divider {
            height: 2px;
            background: #ff9505;
            width: 100%;
        }

        .order-header-bottom {
            padding: 16px 24px;
            background: transparent;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0;
            width: 100%;
            box-sizing: border-box;
        }

        .order-meta-left {
            display: flex;
            align-items: center;
            gap: 0;
            flex: 0 0 auto;
        }

        .order-meta-item {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 0 24px;
            border-right: 1px solid #ddd;
        }

        .order-meta-item:first-child {
            padding-left: 0;
        }

        .order-meta-left .order-meta-item:last-child {
            border-right: none;
        }

        .order-meta-label {
            font-size: 13px;
            color: #666;
            font-weight: 500;
        }

        .order-meta-value {
            font-size: 14px;
            font-weight: 700;
            color: var(--text-primary);
        }

        .order-meta-right {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-left: auto;
            flex-shrink: 0;
        }

        .order-discount-badge {
            font-size: 13px;
            font-weight: 600;
            padding: 6px 12px;
            border-radius: 6px;
            margin-left: 12px;
            white-space: nowrap;
            background: #ff9505;
            color: white;
        }

        /* Workflow Section */
        .workflow-section {
            background: var(--white);
            border-radius: var(--radius-lg);
            margin-bottom: 20px;
            box-shadow: var(--shadow-sm);
            overflow: hidden;
        }

        .workflow-section-header {
            background: var(--bg);
            padding: 16px 20px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            border-bottom: 1px solid var(--border-light);
        }

        .workflow-section-title {
            font-size: 15px;
            font-weight: 700;
            color: var(--text-primary);
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .workflow-section-number {
            width: 26px;
            height: 26px;
            background: var(--primary);
            color: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 13px;
            font-weight: 700;
        }

        .workflow-section-body {
            padding: 20px;
        }

        /* Materials Table */
        .materials-table {
            display: grid;
            grid-template-columns: repeat(6, 1fr);
            gap: 2px;
            background: var(--border-light);
            border-radius: var(--radius-md);
            overflow: hidden;
        }

        @media (max-width: 768px) {
            .materials-table {
                grid-template-columns: repeat(3, 1fr);
            }
        }

        @media (max-width: 480px) {
            .materials-table {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        .material-cell {
            background: var(--bg);
            padding: 16px;
            text-align: center;
        }

        .material-label {
            font-size: 10px;
            font-weight: 700;
            color: #888;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 6px;
        }

        .material-value {
            font-size: 15px;
            font-weight: 700;
            color: var(--text-primary);
        }

        .material-value.muted {
            color: #999;
            font-weight: 500;
        }

        /* Add-ons List - New Design */
        .addons-list {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 12px;
        }

        @media (max-width: 768px) {
            .addons-list {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        @media (max-width: 480px) {
            .addons-list {
                grid-template-columns: 1fr;
            }
        }

        .addon-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            padding: 16px;
            background: var(--bg);
            border-radius: var(--radius-md);
            border: 1px solid var(--border-light);
        }

        .addon-info {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .addon-name {
            font-size: 15px;
            font-weight: 600;
            color: var(--text-primary);
        }

        .addon-detail {
            font-size: 13px;
            color: #666;
            font-weight: 500;
        }

        .addon-action {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .addon-status-yes {
            font-size: 14px;
            font-weight: 700;
            color: #22c55e;
        }

        .btn-preview {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 6px 14px;
            font-size: 13px;
            font-weight: 600;
            color: var(--text-primary);
            background: var(--white);
            border: 1px solid #ddd;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.15s ease;
        }

        .btn-preview:hover {
            background: var(--bg);
            border-color: #bbb;
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }

        .btn-copy-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 36px;
            height: 36px;
            background: var(--white);
            border: 1px solid #ddd;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.15s ease;
        }

        .btn-copy-icon:hover {
            background: var(--bg);
            border-color: #bbb;
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }

        .btn-copy-icon svg {
            width: 16px;
            height: 16px;
            color: #666;
        }

        /* Green confirmation state for copy buttons and website links */
        .btn-copy-icon.copied,
        .btn-copy.copied {
            background: #22c55e !important;
            border-color: #22c55e !important;
            color: white !important;
        }

        .btn-copy-icon.copied svg,
        .btn-copy.copied svg {
            stroke: white !important;
        }

        .btn-copy {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 6px 14px;
            font-size: 13px;
            font-weight: 600;
            color: var(--text-primary);
            background: var(--white);
            border: 1px solid #ddd;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.15s ease;
        }

        .btn-copy:hover {
            background: var(--bg);
            border-color: #bbb;
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }

        .btn-copy svg {
            width: 14px;
            height: 14px;
            color: #666;
        }

        /* Custom Materials Tracker */
        .tracker-item {
            background: var(--bg);
            border-radius: 10px;
            padding: 16px 20px;
            margin-bottom: 12px;
        }

        .tracker-item:last-child {
            margin-bottom: 0;
        }

        .tracker-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 16px;
        }

        .tracker-left {
            display: flex;
            align-items: center;
            gap: 16px;
            flex: 1;
        }

        .tracker-name {
            font-weight: 700;
            font-size: 15px;
            min-width: 140px;
        }

        .status-select {
            padding: 6px 28px 6px 12px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 700;
            font-family: inherit;
            border: 1px solid #ddd;
            cursor: pointer;
            appearance: none;
            -webkit-appearance: none;
            -moz-appearance: none;
            background-color: white;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 8px center;
            outline: none;
        }

        .status-select:focus {
            outline: none;
            border-color: #ddd;
            box-shadow: none;
        }

        .status-select:hover {
            border-color: #bbb;
        }

        .status-select.pending {
            color: #ef4444;
        }

        .status-select.contacted {
            color: #f59e0b;
        }

        .status-select.shipped {
            color: #f59e0b;
        }

        .status-select.received {
            color: #22c55e;
        }

        .tracker-right {
            display: flex;
            align-items: center;
            gap: 24px;
        }

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

        .date-label {
            font-size: 13px;
            color: var(--text-muted);
        }

        .date-input {
            padding: 6px 10px;
            border: 1px solid var(--border-light);
            border-radius: 6px;
            font-size: 13px;
            font-weight: 600;
            font-family: inherit;
            background: var(--white);
            width: 130px;
            cursor: pointer;
        }

        .date-input:hover {
            border-color: var(--primary);
        }

        .date-input:focus {
            outline: none;
            border-color: var(--primary);
        }

        .date-input.received {
            border: 2px solid #22c55e;
            background: #f0fdf4;
            cursor: default;
            color: #22c55e;
        }

        .date-input.received:hover {
            border-color: #22c55e;
        }

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

        .date-clear-btn {
            width: 22px;
            height: 22px;
            padding: 0;
            border: none;
            background: var(--border-light);
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text-muted);
            transition: all 0.15s;
            flex-shrink: 0;
        }

        .date-clear-btn:hover {
            background: #ef4444;
            color: white;
        }

        .date-clear-btn svg {
            width: 12px;
            height: 12px;
        }

        .notes-row {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-top: 12px;
        }

        .notes-input {
            flex: 1;
            padding: 10px 14px;
            border: 1px solid var(--border-light);
            border-radius: 6px;
            font-size: 13px;
            font-family: inherit;
            background: var(--white);
        }

        .notes-input:focus {
            outline: none;
            border-color: var(--primary);
        }

        .notes-input::placeholder {
            color: var(--text-muted);
        }

        .tracker-save-btn {
            font-size: 12px;
            padding: 4px 12px;
        }

        .tracker-saved-msg {
            display: inline-flex;
            align-items: center;
            color: var(--success);
            font-size: 12px;
            gap: 4px;
        }

        .spinner-sm {
            width: 12px;
            height: 12px;
            border: 2px solid rgba(255,255,255,0.3);
            border-top-color: white;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
            margin-right: 6px;
        }

        .audit-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 10px;
            padding-top: 10px;
            border-top: 1px solid var(--border-light);
        }

        .audit-left {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .audit-right {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .audit-info {
            font-size: 11px;
            color: var(--text-muted);
        }

        .audit-link {
            font-size: 11px;
            color: var(--primary);
            text-decoration: none;
            font-weight: 600;
            cursor: pointer;
            background: none;
            border: none;
            font-family: inherit;
        }

        .audit-link:hover {
            text-decoration: underline;
        }

        /* History Modal - uses standard modal classes, only custom overrides here */
        .history-modal-overlay.active {
            display: flex;
        }

        .history-modal .modal-body {
            max-height: 60vh;
            overflow-y: auto;
        }

        /* Card-based history display */
        .history-card {
            background: var(--bg);
            border-radius: 10px;
            padding: 16px;
            margin-bottom: 12px;
        }

        .history-card:last-child {
            margin-bottom: 0;
        }

        .history-changes {
            margin-bottom: 12px;
        }

        .history-change {
            margin-bottom: 10px;
        }

        .history-change:last-child {
            margin-bottom: 0;
        }

        .history-change-label {
            display: block;
            font-size: 11px;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 2px;
        }

        .history-change-value {
            display: block;
            font-size: 14px;
            color: var(--text-primary);
        }

        .history-card-meta {
            font-size: 11px;
            color: var(--text-muted);
            padding-top: 10px;
            border-top: 1px solid var(--border-light);
        }

        /* Production Files */
        .download-buttons-row {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 12px;
            margin-bottom: 16px;
        }

        .btn-download {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 14px 20px;
            font-size: 14px;
            font-weight: 600;
            color: var(--text-primary);
            background: var(--bg);
            border: 1px solid #ddd;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.15s ease;
        }

        .btn-download:hover {
            background: #e8e8e8;
            border-color: #bbb;
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }

        .handwriting-display {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 14px 16px;
            background: var(--bg);
            border-radius: var(--radius-md);
        }

        .handwriting-label {
            font-size: 14px;
            color: #666;
            font-weight: 500;
        }

        .handwriting-value {
            font-size: 15px;
            font-weight: 700;
            color: var(--text-primary);
        }

        /* Delivery Info */
        .delivery-info {
            padding: 0;
        }

        .delivery-method {
            font-size: 16px;
            font-weight: 700;
            color: var(--text-primary);
            margin-bottom: 4px;
        }

        .delivery-detail {
            font-size: 14px;
            color: #666;
            font-weight: 500;
        }

        /* Customer Info - Bar Style (matching order meta bar) */
        .customer-info-bar {
            display: flex;
            flex-direction: column;
            gap: 28px;
        }

        .customer-info-section {
            display: flex;
            flex-direction: column;
        }

        .customer-info-bar-row {
            display: flex;
            align-items: center;
            gap: 0;
            padding: 8px 0;
        }

        .customer-info-bar-row .order-meta-item:first-child {
            padding-left: 0;
        }

        .customer-info-bar-row .order-meta-item:last-child {
            border-right: none;
        }

        @media (max-width: 768px) {
            .customer-info-bar-row {
                flex-wrap: wrap;
                gap: 12px;
            }
            .customer-info-bar-row .order-meta-item {
                border-right: none;
                padding: 0;
            }
        }

        .customer-info-column-title {
            font-size: 11px;
            font-weight: 700;
            color: #888;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 4px;
        }

        .customer-info-value-large {
            font-size: 16px;
            font-weight: 700;
            color: var(--text-primary);
            margin-bottom: 4px;
        }

        .customer-info-value-secondary {
            font-size: 14px;
            color: #666;
            font-weight: 500;
            margin-bottom: 2px;
        }

        .customer-info-value-with-copy {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .btn-copy-small {
            width: 28px;
            height: 28px;
            padding: 0;
            flex-shrink: 0;
        }

        .btn-copy-small svg {
            width: 14px;
            height: 14px;
        }

        .return-address-section {
            margin-top: 8px;
        }

        .return-address-box {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 16px;
            padding: 16px;
            background: var(--bg);
            border-radius: var(--radius-md);
        }

        .return-address-text {
            font-size: 14px;
            color: var(--text-primary);
            line-height: 1.6;
            font-weight: 500;
        }

        .return-address-text div {
            margin-bottom: 2px;
        }

        .delivery-address-box {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 16px;
            padding: 16px;
            background: var(--bg);
            border-radius: var(--radius-md);
            margin-top: 8px;
        }

        .delivery-address-text {
            font-size: 14px;
            color: var(--text-primary);
            line-height: 1.6;
            font-weight: 500;
        }

        .delivery-address-text div {
            margin-bottom: 2px;
        }

        /* Order Detail Footer */
        .order-detail-footer {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 20px 0;
            margin-top: 10px;
        }

        .footer-left {
            display: flex;
            gap: 12px;
        }

        .footer-right {
            display: flex;
            gap: 12px;
        }

        .btn-delete-order {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 12px 20px;
            font-size: 14px;
            font-weight: 600;
            color: var(--white);
            background: var(--error);
            border: none;
            border-radius: 9999px;
            cursor: pointer;
            transition: all 0.15s ease;
        }

        .btn-delete-order:hover {
            background: #b91c1c;
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }

        .btn-secondary-action {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 12px 20px;
            font-size: 14px;
            font-weight: 600;
            color: var(--text-primary);
            background: var(--white);
            border: 1px solid #ddd;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.15s ease;
        }

        .btn-secondary-action:hover {
            background: var(--bg);
            border-color: #bbb;
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }

        /* Legacy badge styles for compatibility */
        .triage-badge {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 6px 12px;
            border-radius: var(--radius-full);
            font-size: 11px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.3px;
        }

        .triage-badge.expedited {
            background: var(--error-light);
            color: var(--error);
        }

        .triage-badge.custom {
            background: var(--warning-light);
            color: var(--warning);
        }

        .triage-badge.sourcing {
            background: #e0f2fe;
            color: #0284c7;
        }

        .triage-badge.standard {
            background: var(--success-light);
            color: var(--success);
        }

        /* Signature Preview Modal */
        .signature-preview-modal {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.6);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 1000;
            opacity: 0;
            visibility: hidden;
            transition: all 0.2s ease;
        }

        .signature-preview-modal.active {
            opacity: 1;
            visibility: visible;
        }

        .signature-preview-content {
            background: white;
            padding: 24px;
            border-radius: 12px;
            max-width: 500px;
            width: 90%;
            text-align: center;
        }

        .signature-preview-content img {
            max-width: 100%;
            max-height: 300px;
            border-radius: 8px;
        }

        .signature-preview-content h3 {
            margin-bottom: 16px;
            font-size: 18px;
        }

        .signature-preview-content .btn {
            margin-top: 16px;
        }

        /* Copy confirmation toast */
        .copy-toast {
            position: fixed;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%) translateY(100px);
            background: #333;
            color: white;
            padding: 12px 24px;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 600;
            z-index: 1001;
            opacity: 0;
            transition: all 0.3s ease;
        }

        .copy-toast.show {
            transform: translateX(-50%) translateY(0);
            opacity: 1;
        }

        .no-addons {
            color: var(--text-muted);
            font-size: 14px;
            font-style: italic;
        }

        /* ===== SOURCING SECTION ===== */
        .sourcing-summary-row {
            display: flex;
            gap: 32px;
            margin-bottom: 16px;
        }

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

        .sourcing-label {
            font-size: 12px;
            font-weight: 600;
            color: var(--text-secondary);
            text-transform: uppercase;
        }

        .sourcing-value {
            font-size: 16px;
            font-weight: 600;
            color: var(--text-primary);
        }

        .sourcing-locations-grid {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .sourcing-location-item {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            background: var(--bg);
            border: 1px solid var(--border);
            border-radius: 20px;
            padding: 6px 12px;
            font-size: 13px;
        }

        .sourcing-loc-type {
            font-weight: 600;
            color: #0284c7;
        }

        .sourcing-detail-row {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .sourcing-areas-list {
            display: flex;
            flex-direction: column;
            gap: 12px;
            margin-top: 16px;
            padding-top: 16px;
            border-top: 1px solid var(--border-light);
        }

        .sourcing-area-item {
            display: flex;
            flex-direction: column;
            gap: 4px;
            padding: 12px;
            background: var(--bg);
            border-radius: var(--radius-md);
            border: 1px solid var(--border-light);
        }

        .sourcing-area-label {
            font-size: 12px;
            font-weight: 600;
            color: #0284c7;
            text-transform: uppercase;
        }

        .sourcing-area-value {
            font-size: 14px;
            color: var(--text-primary);
            line-height: 1.5;
        }

        .return-address-multiline {
            white-space: pre-line;
            line-height: 1.5;
        }

        .download-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 12px;
        }

        .download-btn {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
            padding: 20px;
            background: var(--bg);
            border: 2px dashed var(--border);
            border-radius: var(--radius-md);
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .download-btn:hover {
            background: var(--primary-light);
            border-color: var(--primary);
            border-style: solid;
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }

        .download-btn svg {
            color: var(--primary);
        }

        .download-btn-text {
            font-size: 13px;
            font-weight: 600;
            color: var(--text-primary);
            text-align: center;
        }

        .delivery-info {
            padding: 20px;
            background: var(--bg);
            border-radius: var(--radius-md);
        }

        .delivery-type {
            font-size: 16px;
            font-weight: 700;
            color: var(--text-primary);
            margin-bottom: 12px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .delivery-address {
            font-size: 16px;
            line-height: 1.6;
            color: var(--text-secondary);
        }

        .address-with-copy {
            display: flex;
            align-items: flex-start;
            gap: 8px;
        }

        .copy-btn {
            background: none;
            border: none;
            cursor: pointer;
            padding: 4px;
            color: var(--text-muted);
            border-radius: 4px;
            transition: color 0.2s, background-color 0.2s;
            flex-shrink: 0;
        }

        .copy-btn:hover {
            color: var(--primary);
            background-color: var(--bg-hover, #f5f5f5);
        }

        .copy-btn.copied {
            color: var(--success);
            animation: copyPulse 0.3s ease;
        }

        @keyframes copyPulse {
            0% { transform: scale(1); }
            50% { transform: scale(1.2); }
            100% { transform: scale(1); }
        }

        .customer-info-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 16px;
        }

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

        .customer-info-label {
            font-size: 12px;
            font-weight: 700;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .customer-info-value {
            font-size: 16px;
            font-weight: 600;
            color: var(--text-primary);
        }

        .customer-info-columns {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 32px;
            margin-bottom: 24px;
        }

        @media (max-width: 768px) {
            .customer-info-columns {
                grid-template-columns: 1fr;
                gap: 16px;
            }
        }

        .customer-info-column {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .customer-info-column-title {
            font-size: 12px;
            font-weight: 700;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin: 0 0 4px 0;
            padding-bottom: 8px;
            border-bottom: 1px solid var(--border-light);
        }

        .download-buttons-row {
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
            margin-bottom: 16px;
        }

        .download-action-btn {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 12px 20px;
            background: var(--white);
            border: 1.5px solid var(--border);
            border-radius: var(--radius-md);
            font-size: 13px;
            font-weight: 600;
            color: var(--text-primary);
            cursor: pointer;
            transition: all 0.15s ease;
        }

        .download-action-btn:hover {
            background: var(--primary-light);
            border-color: var(--primary);
            color: var(--primary);
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }

        .download-action-btn svg {
            color: var(--primary);
        }

        .download-action-btn .file-type {
            background: var(--bg);
            padding: 2px 6px;
            border-radius: var(--radius-sm);
            font-size: 11px;
            font-weight: 700;
            color: var(--text-muted);
            text-transform: uppercase;
        }

        .detail-top-bar {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 16px;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }

        .detail-top-bar .back-btn {
            height: 44px;
            display: inline-flex;
            align-items: center;
        }

        .detail-top-bar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 12px;
            margin-bottom: 20px;
        }

        .detail-top-actions {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: nowrap;
        }

        .detail-top-actions .btn {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 10px 20px;
            font-size: 14px;
            font-weight: 600;
            font-family: inherit;
            border-radius: var(--radius-full);
            cursor: pointer;
            transition: all 0.2s ease;
            white-space: nowrap;
            height: 44px;
        }

        .detail-top-actions .btn svg {
            width: 14px;
            height: 14px;
            flex-shrink: 0;
        }

        .send-to-dropdown {
            display: inline-flex;
            align-items: center;
        }

        .send-to-dropdown.hidden {
            display: none;
        }

        .send-to-select {
            padding: 10px 36px 10px 16px;
            font-size: 14px;
            font-family: inherit;
            border-radius: var(--radius-full);
            border: 1.5px solid var(--border);
            background: var(--white);
            color: var(--text-primary);
            cursor: pointer;
            appearance: none;
            -webkit-appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 12px center;
        }

        .send-to-select:focus {
            outline: none;
            border-color: var(--primary);
        }

        .btn-delete-outline {
            background: var(--white);
            color: var(--error);
            border: 1.5px solid var(--error);
            border-radius: var(--radius-full);
        }

        .btn-delete-outline:hover {
            background: var(--error-light);
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }

        .detail-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
            gap: 20px;
            margin-bottom: 24px;
        }

        .detail-card {
            background: var(--white);
            border-radius: var(--radius-lg);
            box-shadow: var(--shadow-sm);
            padding: 24px;
        }

        .detail-card-title {
            font-size: 14px;
            font-weight: 700;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 16px;
            padding-bottom: 12px;
            border-bottom: 1px solid var(--border-light);
        }

        .detail-row {
            display: flex;
            justify-content: space-between;
            padding: 8px 0;
            font-size: 14px;
        }

        .detail-label {
            color: var(--text-secondary);
        }

        .detail-value {
            font-weight: 600;
            color: var(--text-primary);
            text-align: right;
        }

        .message-content {
            background: var(--bg);
            border-radius: var(--radius-md);
            padding: 16px;
            font-size: 14px;
            line-height: 1.6;
            white-space: pre-wrap;
            max-height: 300px;
            overflow-y: auto;
        }

        /* ===== EXPORT SECTION ===== */
        .export-section {
            background: var(--white);
            border-radius: var(--radius-lg);
            box-shadow: var(--shadow-sm);
            padding: 24px;
        }

        .export-title {
            font-size: 18px;
            font-weight: 700;
            color: var(--text-primary);
            margin-bottom: 8px;
        }

        .export-desc {
            font-size: 14px;
            color: var(--text-secondary);
            margin-bottom: 20px;
        }

        .export-buttons {
            display: flex;
            gap: 12px;
            flex-wrap: wrap;
        }

        .btn-export {
            background: var(--white);
            color: var(--text-primary);
            border: 1.5px solid var(--border);
        }

        .btn-export:hover {
            background: var(--bg);
            border-color: var(--text-muted);
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }

        /* ===== LOADING SPINNER ===== */
        .spinner {
            width: 20px;
            height: 20px;
            border: 2px solid var(--border);
            border-top-color: var(--primary);
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }

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

        .loading-overlay {
            position: fixed;
            inset: 0;
            background: rgba(255, 255, 255, 0.9);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 1000;
        }

        .loading-overlay .spinner {
            width: 40px;
            height: 40px;
            border-width: 3px;
        }

        /* Filter trigger button — hidden on desktop, shown on mobile */
        .filter-trigger-btn {
            display: none;
            align-items: center;
            gap: 6px;
            padding: 10px 16px;
            font-size: 14px;
            font-weight: 600;
            font-family: inherit;
            border: 1.5px solid var(--border);
            border-radius: var(--radius-full);
            background: var(--white);
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.15s ease;
        }

        .filter-trigger-btn:hover {
            border-color: var(--text-muted);
            color: var(--text-primary);
        }

        /* ===== RESPONSIVE ===== */
        @media (max-width: 768px) {
            .header {
                padding: 12px 16px 0;
            }

            .header-email {
                display: none;
            }

            .main-content {
                padding: 16px;
            }

            .toolbar {
                flex-direction: column;
                align-items: stretch;
            }

            .toolbar-left {
                flex-direction: column;
            }

            .search-input {
                width: 100%;
            }

            .orders-table {
                overflow-x: auto;
            }

            .orders-table table {
                min-width: 500px;
            }

            .detail-grid {
                grid-template-columns: 1fr;
            }

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

            .order-actions {
                width: 100%;
            }

            .order-actions .btn {
                flex: 1;
            }

            .modal {
                max-width: 95vw;
                margin: 10px;
            }

            .modal-header {
                padding: 16px;
            }

            .modal-body {
                padding: 16px;
            }

            .nav-tabs-inner {
                gap: 2px;
            }

            .nav-tab {
                padding: 8px 12px;
                font-size: 13px;
            }

            .orders-table {
                -webkit-overflow-scrolling: touch;
            }

            /* Mobile filter drawer trigger */
            .filter-trigger-btn {
                display: inline-flex;
            }

            /* Orders: hide inline filters, keep search */
            .toolbar-right {
                display: none;
            }

            .toolbar {
                flex-direction: row;
                align-items: center;
                gap: 8px;
            }

            .toolbar-left {
                flex: 1;
                flex-direction: row;
            }

            /* Outbound page */
            .outbound-view {
                padding: 16px;
            }

            .outbound-toolbar {
                flex-direction: column;
                align-items: stretch;
                gap: 8px;
            }

            /* Outbound: hide filter selects, keep action buttons */
            .outbound-toolbar-left {
                display: none;
            }

            .outbound-toolbar-right {
                display: grid;
                grid-template-columns: 1fr 1fr 1fr;
                gap: 8px;
                width: 100%;
            }

            .outbound-selected-count {
                grid-column: 1 / -1;
                font-size: 12px;
            }

            .outbound-action-btn {
                padding: 8px 4px;
                font-size: 12px;
                height: 36px;
                justify-content: center;
                width: 100%;
            }

            .outbound-table-container {
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
            }

            .outbound-table th {
                padding: 10px 12px;
                font-size: 11px;
            }

            .outbound-table td {
                padding: 12px;
                font-size: 14px;
            }

            /* Order detail header */
            .order-header-top {
                flex-direction: column !important;
                align-items: flex-start !important;
                gap: 12px;
                padding: 16px;
            }

            .order-header-left {
                flex-direction: column !important;
                align-items: flex-start !important;
                gap: 8px;
            }

            .order-header-right {
                flex-wrap: wrap;
                gap: 8px;
                margin-left: 0;
            }

            .order-campaign-id {
                font-size: 24px;
            }

            .order-total-amount {
                font-size: 22px;
            }

            /* Workflow sections */
            .workflow-section-header {
                padding: 12px 16px;
            }

            .workflow-section-body {
                padding: 16px;
            }

            .material-cell {
                padding: 12px;
            }

            /* Inventory */
            .inventory-card {
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
            }

            .inventory-table th,
            .inventory-table td {
                padding: 10px 12px;
                font-size: 13px;
                white-space: nowrap;
            }

            /* Order meta row (Type, Delivery, Quantity, Rep) - make scrollable */
            .order-header-bottom {
                flex-direction: column;
                align-items: flex-start;
                gap: 12px;
                padding: 12px 16px;
            }

            .order-meta-left {
                width: 100%;
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
                padding-bottom: 8px;
            }

            .order-meta-item {
                padding: 0 12px;
                flex-shrink: 0;
            }

            .order-meta-item:first-child {
                padding-left: 0;
            }

            .order-meta-right {
                margin-left: 0;
            }

            /* Custom Materials tracker - stack vertically */
            .tracker-row {
                flex-direction: column;
                align-items: flex-start;
                gap: 12px;
            }

            .tracker-left {
                width: 100%;
                flex-wrap: wrap;
                gap: 10px;
            }

            .tracker-right {
                width: 100%;
            }

            .date-field {
                width: 100%;
                justify-content: flex-start;
            }

            .tracker-name {
                min-width: auto;
            }

            /* Detail top bar - align buttons properly on mobile */
            .detail-top-bar .back-btn {
                margin-bottom: 0;
            }

            /* Audit row mobile - stack vertically */
            .audit-row {
                flex-direction: column;
                align-items: flex-start;
                gap: 10px;
            }

            .audit-right {
                width: 100%;
                justify-content: flex-end;
            }

            .tracker-save-btn {
                white-space: nowrap;
                width: auto;
            }
        }

        @media (max-width: 480px) {
            .header {
                padding: 10px 12px 0;
            }

            .nav-tab {
                padding: 6px 10px;
                font-size: 12px;
            }

            .nav-tab-count {
                font-size: 10px;
                padding: 1px 5px;
            }

            .stage-card {
                padding: 16px;
            }

            .login-card {
                padding: 50px 36px 40px;
            }

            .login-card-glow {
                max-width: 100%;
            }

            .login-card-glow::before {
                width: 500px;
                height: 440px;
            }

            .login-container {
                padding: 40px 16px;
                overflow: hidden;
            }

            /* Outbound page */
            .outbound-view {
                padding: 12px;
            }

            .outbound-action-btn {
                padding: 6px 2px;
                font-size: 11px;
                height: 32px;
            }

            .outbound-action-btn svg {
                display: none;
            }

            /* Order detail header */
            .order-campaign-id {
                font-size: 20px;
            }

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

            /* Workflow sections */
            .workflow-section-header {
                padding: 10px 12px;
            }

            .workflow-section-body {
                padding: 12px;
            }

            .material-cell {
                padding: 10px;
            }

            /* Inventory */
            .inventory-table th,
            .inventory-table td {
                padding: 8px 10px;
                font-size: 12px;
            }
        }

        /* ===== HIDDEN UTILITY ===== */
        .hidden {
            display: none !important;
        }

        /* ===== ENHANCED READABILITY - LARGER TEXT ===== */
        body {
            font-size: 16px;
        }

        .form-label {
            font-size: 15px;
        }

        .form-input, .form-input select, select.form-input {
            font-size: 16px;
        }

        .nav-tab {
            font-size: 15px;
        }

        .order-card-title {
            font-size: 17px;
        }

        .order-card-subtitle {
            font-size: 15px;
        }

        .order-card-qty {
            font-size: 16px;
        }

        .order-card-meta span {
            font-size: 14px;
        }

        .workflow-section-title {
            font-size: 17px;
        }

        .material-label, .customer-info-label, .addon-label {
            font-size: 14px;
        }

        .material-value, .customer-info-value, .addon-value {
            font-size: 16px;
        }

        .delivery-type {
            font-size: 16px;
        }

        .delivery-address {
            font-size: 15px;
        }

        .triage-meta-label {
            font-size: 13px;
        }

        .triage-meta-value {
            font-size: 16px;
        }

        .btn {
            font-size: 15px;
        }

        .settings-label {
            font-size: 15px;
        }

        .settings-input {
            font-size: 16px;
        }

        .team-member-name {
            font-size: 16px;
        }

        .team-member-email, .team-member-role {
            font-size: 14px;
        }

        /* ===== MOBILE FILTER DRAWER ===== */
        .filter-drawer-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.5);
            z-index: 1000;
            opacity: 0;
            visibility: hidden;
            transition: all 0.2s ease;
        }

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

        .filter-drawer {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background: var(--white);
            border-radius: 16px 16px 0 0;
            max-height: 70vh;
            overflow-y: auto;
            transform: translateY(100%);
            transition: transform 0.3s ease;
            box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
        }

        .filter-drawer-overlay.active .filter-drawer {
            transform: translateY(0);
        }

        .filter-drawer-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 16px 20px;
            border-bottom: 1px solid var(--border-light);
        }

        .filter-drawer-header h3 {
            font-size: 18px;
            font-weight: 700;
            margin: 0;
        }

        .filter-drawer-body {
            padding: 20px;
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

        .filter-drawer-group label {
            font-size: 13px;
            font-weight: 600;
            color: var(--text-secondary);
            margin-bottom: 6px;
            display: block;
        }

        .filter-drawer-group select,
        .filter-drawer-group input {
            width: 100%;
            padding: 12px 14px;
            font-size: 16px;
            border: 1.5px solid var(--border);
            border-radius: var(--radius-md);
            font-family: inherit;
            background: var(--white);
            color: var(--text-primary);
            box-sizing: border-box;
        }

        .filter-drawer-footer {
            padding: 16px 20px;
            border-top: 1px solid var(--border-light);
        }


        /* ===== SETTINGS MOBILE STYLES ===== */
        @media (max-width: 768px) {
            .settings-view {
                padding: 16px;
            }

            .settings-subnav {
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
                gap: 4px;
                margin-bottom: 16px;
                padding-bottom: 10px;
            }

            .settings-subnav-btn {
                padding: 8px 14px;
                font-size: 13px;
                white-space: nowrap;
                flex-shrink: 0;
            }

            .settings-title {
                font-size: 20px;
            }

            .settings-desc {
                margin-bottom: 20px;
                font-size: 14px;
            }

            .settings-grid {
                grid-template-columns: 1fr !important;
                gap: 16px;
            }

            .settings-card {
                padding: 16px;
            }

            .settings-textarea {
                font-size: 16px;
            }

            /* Template row: stack to single column */
            .template-row {
                grid-template-columns: 1fr;
                gap: 16px;
            }

            /* Discount table: horizontal scroll */
            .discount-table-container {
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
            }

            .discount-table th,
            .discount-table td {
                padding: 10px 12px;
                font-size: 13px;
            }

            /* Team/sales rep add forms: stack to single column */
            .settings-form-row {
                grid-template-columns: 1fr;
            }

            /* Settings actions: stack buttons */
            .settings-actions {
                flex-direction: column;
            }

            .settings-actions .btn {
                width: 100%;
                justify-content: center;
            }

            /* Section titles */
            .settings-section-title {
                font-size: 15px;
                margin-top: 24px;
                padding-top: 16px;
            }
        }

        @media (max-width: 480px) {
            .settings-view {
                padding: 12px;
            }

            .settings-subnav-btn {
                padding: 6px 10px;
                font-size: 12px;
            }

            .settings-card {
                padding: 12px;
            }

            .settings-title {
                font-size: 18px;
            }

            .discount-table th,
            .discount-table td {
                padding: 8px 10px;
                font-size: 12px;
            }

            .input-addon {
                padding: 10px;
                font-size: 13px;
            }
        }

        /* ===== PRINT & PDF STYLES ===== */
        @media print {
            @page {
                size: landscape;
                margin: 0.5in;
            }

            /* Hide everything except main content */
            .sidebar,
            .nav-header,
            .settings-view,
            .detail-top-bar,
            .order-detail-footer,
            .btn,
            .btn-preview,
            .btn-copy,
            .btn-copy-icon,
            .btn-download,
            .btn-secondary-action,
            .btn-delete-order,
            button,
            .back-btn,
            .settings-subnav,
            .loading-overlay,
            .login-container,
            .outbound-detail-footer {
                display: none !important;
            }

            /* Reset page margins */
            body {
                margin: 0 !important;
                padding: 0 !important;
            }

            .main-content {
                margin-left: 0 !important;
                padding: 20px !important;
                width: 100% !important;
            }

            /* Only show the active detail view when printing */
            .order-detail:not(.active),
            .outbound-detail:not(.active) {
                display: none !important;
            }

            .order-detail.active,
            .outbound-detail.active {
                display: block !important;
                width: 100% !important;
            }

            /* Show list views based on their visibility state */
            /* Orders list uses .hidden class, outbound uses .active class */
            .orders-list-view.hidden {
                display: none !important;
            }

            .orders-list-view:not(.hidden) {
                display: block !important;
            }

            /* Outbound view only shows when it has .active class */
            .outbound-view:not(.active) {
                display: none !important;
            }

            .outbound-view.active {
                display: block !important;
            }

            /* Hide toolbar, bulk actions, outbound toolbar, and empty states for cleaner print */
            .toolbar,
            .bulk-actions-bar,
            .outbound-toolbar,
            .empty-state {
                display: none !important;
            }

            /* Reduce header padding for print */
            .header {
                padding: 8px 0 !important;
                border-bottom: none !important;
            }

            .header-content {
                padding: 0 !important;
            }

            /* Table print styles */
            .orders-table {
                width: 100% !important;
            }

            .orders-table th,
            .orders-table td {
                border: 1px solid #ddd !important;
                padding: 8px !important;
            }

            /* Ensure colors print */
            * {
                -webkit-print-color-adjust: exact !important;
                print-color-adjust: exact !important;
            }

            /* Prevent page breaks inside sections */
            .order-header,
            .workflow-section,
            .customer-info-grid,
            .return-address-section,
            .materials-table,
            .addons-list,
            .addon-item,
            .outbound-detail-section {
                page-break-inside: avoid;
                break-inside: avoid;
            }

            /* Ensure sections start on new page if needed */
            .workflow-section {
                page-break-before: auto;
            }
        }
