@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Manrope:wght@500;600;700;800&family=Sora:wght@600;700;800&display=swap');

        :root {
            --primary: #0a1c4e;
            --primary-soft: #17357a;
            --secondary: #2587d4;
            --success: #27ae60;
            --white: #ffffff;
            --surface: #ffffff;
            --surface-muted: #f4f7fc;
            --border: #dee5f1;
            --text: #27344a;
            --text-light: #6f7d96;
            --shadow-card: 0 8px 20px rgba(10, 28, 78, 0.06);
            --shadow-hover: 0 14px 28px rgba(10, 28, 78, 0.12);
            --font-body: 'Inter', 'Roboto', 'Segoe UI', sans-serif;
            --font-ui: 'Manrope', 'Inter', 'Roboto', 'Segoe UI', sans-serif;
            --font-brand: 'Sora', 'Manrope', 'Inter', 'Roboto', sans-serif;
        }

        * {
            box-sizing: border-box;
        }

        body {
            font-family: var(--font-body);
            margin: 0;
            color: var(--text);
            min-height: 100vh;
            background:
                radial-gradient(circle at top right, rgba(37, 135, 212, 0.08), transparent 40%),
                linear-gradient(180deg, #f4f7fc 0%, #eef3fb 100%);
        }

        .container {
            width: min(1200px, calc(100% - 32px));
            margin: 0 auto;
        }

        .top-header {
            background: linear-gradient(110deg, var(--primary) 0%, #102b6a 100%);
            color: var(--white);
            font-size: 14px;
            padding: 12px 0;
            box-shadow: 0 8px 20px rgba(7, 17, 47, 0.2);
            position: relative;
            z-index: 10;
        }

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

        .logo-section {
            display: flex;
            align-items: center;
            gap: 28px;
            min-width: 0;
        }

        .logo h2 {
            margin: 0;
            font-family: var(--font-brand);
            font-size: clamp(1rem, 1.55vw, 1.28rem);
            font-weight: 700;
            letter-spacing: 0.35px;
            line-height: 1.1;
            display: flex;
            align-items: baseline;
            flex-wrap: wrap;
            gap: 2px 8px;
        }

        .logo h2 span {
            font-family: var(--font-ui);
            font-size: 0.9em;
            letter-spacing: 0.05em;
        }

        .main-nav {
            display: flex;
            gap: 16px;
        }

        .main-nav a {
            color: rgba(255, 255, 255, 0.88);
            text-decoration: none;
            font-family: var(--font-ui);
            font-size: 14px;
            font-weight: 700;
            letter-spacing: 0.2px;
            border-bottom: 2px solid transparent;
            padding-bottom: 3px;
            transition: color 0.2s ease, border-color 0.2s ease;
        }

        .main-nav a:hover {
            color: var(--white);
            border-bottom-color: rgba(255, 255, 255, 0.65);
        }

        .search-bar {
            flex: 1 1 340px;
            max-width: 430px;
            margin: 0 12px;
            position: relative;
        }

        .search-bar input {
            width: 100%;
            padding: 10px 16px 10px 14px;
            border: 1px solid rgba(255, 255, 255, 0.3);
            border-radius: 6px;
            background: rgba(255, 255, 255, 0.13);
            color: var(--white);
            font-size: 14px;
            outline: none;
            transition: background-color 0.2s ease;
        }

        .search-bar input::placeholder {
            color: rgba(255, 255, 255, 0.65);
        }

        .search-bar input:focus {
            background: rgba(255, 255, 255, 0.2);
            border-color: rgba(255, 255, 255, 0.5);
        }

        .search-bar button {
            position: absolute;
            right: 8px;
            top: 50%;
            transform: translateY(-50%);
            background: none;
            border: none;
            color: rgba(255, 255, 255, 0.65);
            cursor: pointer;
            font-size: 14px;
            padding: 8px;
            transition: color 0.2s ease;
        }

        .search-bar button:hover {
            color: var(--white);
        }

        .header-actions {
            display: flex;
            align-items: center;
            gap: 18px;
        }

        .cart-icon {
            position: relative;
            font-size: 18px;
            cursor: pointer;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            color: rgba(255, 255, 255, 0.88);
            transition: color 0.2s ease;
        }

        .cart-icon:hover {
            color: var(--white);
        }

        .cart-badge {
            position: absolute;
            top: -6px;
            right: -8px;
            background: #e74c3c;
            color: var(--white);
            border-radius: 50%;
            width: 20px;
            height: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 11px;
            font-weight: 700;
        }

        .user-profile {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 6px 12px;
            border-radius: 6px;
            cursor: pointer;
            transition: background-color 0.2s ease;
        }

        .user-profile:hover {
            background: rgba(255, 255, 255, 0.1);
        }

        .user-avatar {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.2);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
            color: var(--white);
        }

        .user-info {
            display: flex;
            flex-direction: column;
            gap: 2px;
            text-align: right;
        }

        .user-info .welcome {
            font-size: 12px;
            opacity: 0.75;
        }

        .user-info .address {
            font-size: 14px;
            font-weight: 600;
        }

        .user-caret {
            font-size: 12px;
            opacity: 0.75;
            transition: transform 0.2s ease;
        }

        .user-profile:hover .user-caret {
            transform: rotate(180deg);
        }

        .user-dropdown-menu {
            position: absolute;
            top: 100%;
            right: 0;
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: 8px;
            box-shadow: var(--shadow-hover);
            margin-top: 8px;
            min-width: 200px;
            z-index: 1000;
            opacity: 0;
            visibility: hidden;
            transform: translateY(-8px);
            transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
        }

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

        .user-dropdown-menu a {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 12px 16px;
            color: var(--text);
            text-decoration: none;
            font-size: 14px;
            transition: background-color 0.2s ease, color 0.2s ease;
        }

        .user-dropdown-menu a:last-child {
            border-top: 1px solid var(--border);
        }

        .user-dropdown-menu a:hover {
            background: var(--surface-muted);
            color: var(--primary);
        }

        .user-dropdown-menu a i {
            width: 16px;
            text-align: center;
        }

        .sub-header {
            background: #eceff3;
            border-top: 1px solid #e3e7ee;
            border-bottom: 1px solid #d9dee7;
            margin-bottom: 30px;
        }

        .sub-nav {
            margin: 0;
            padding: 0;
            list-style: none;
            display: flex;
            align-items: center;
            overflow-x: auto;
            scrollbar-width: thin;
        }

        .sub-nav li {
            position: relative;
            flex-shrink: 0;
        }

        .sub-nav > li > a {
            display: inline-flex;
            align-items: center;
            gap: 9px;
            padding: 16px 22px;
            text-decoration: none;
            font-size: 15px;
            font-weight: 500;
            color: #60697b;
            border-right: 1px solid #dde2ea;
            transition: background-color 0.2s ease, color 0.2s ease;
        }

        .sub-nav > li:first-child > a {
            border-left: 1px solid #dde2ea;
        }

        .sub-nav > li > a i {
            font-size: 14px;
            color: #7b8598;
        }

        .sub-nav > li > a:hover,
        .sub-nav > li > a.active {
            background: #e4e8ef;
            color: #3f4a61;
        }

        .sub-nav li.has-active > .sub-nav-toggle {
            background: #e4e8ef;
            color: #3f4a61;
        }

        .sub-nav > li > a:hover i,
        .sub-nav > li > a.active i {
            color: #58637a;
        }

        .sub-nav li.has-active > .sub-nav-toggle i {
            color: #58637a;
        }

        .dropdown-menu {
            display: none;
            position: absolute;
            top: 100%;
            left: 0;
            min-width: 200px;
            border-radius: 4px;
            border: 1px solid #bcc4d2;
            background: #ffffff;
            box-shadow: 0 8px 20px rgba(30, 43, 77, 0.16);
            padding: 6px 0;
            z-index: 1000;
            opacity: 0;
            visibility: hidden;
            transform: translateY(-8px);
            transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
        }

        .sub-nav li:hover .dropdown-menu,
        .sub-nav li:focus-within .dropdown-menu,
        .sub-nav li.mobile-open .dropdown-menu {
            display: block;
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }

        .dropdown-menu a {
            display: block;
            padding: 12px 18px;
            color: #5f687b;
            text-decoration: none;
            font-size: 15px;
            font-weight: 500;
            transition: background-color 0.2s ease, color 0.2s ease;
        }

        .dropdown-menu a:hover {
            background-color: #f0f3f8;
            color: #374156;
        }

        .dropdown-menu a.active {
            background-color: #eef3f9;
            color: #374156;
            font-weight: 600;
        }

        .page-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 12px;
            margin-bottom: 20px;
        }

        .page-title {
            margin: 0;
            font-size: 25px;
            font-weight: 700;
            color: var(--text);
        }

        .breadcrumb {
            font-size: 13px;
            color: var(--text-light);
        }

        .card {
            background: var(--surface);
            border-radius: 14px;
            border: 1px solid var(--border);
            box-shadow: var(--shadow-card);
            padding: 24px;
            margin-bottom: 24px;
        }

        .empty-state {
            text-align: center;
            padding: 60px 16px;
            color: var(--text-light);
        }

        .empty-state-icon {
            font-size: 48px;
            margin-bottom: 16px;
            color: #8ea0be;
        }

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

        .empty-state p {
            margin: 0;
            font-size: 14px;
        }

        .footer {
            background: linear-gradient(90deg, var(--primary-soft) 0%, var(--secondary) 100%);
            color: var(--white);
            text-align: center;
            padding: 20px;
            font-size: 13px;
            margin-top: 40px;
        }

        .back-button {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 24px;
            padding: 10px 16px;
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: 8px;
            color: var(--text);
            text-decoration: none;
            font-weight: 500;
            transition: background-color 0.2s ease;
        }

        .back-button:hover {
            background: var(--surface-muted);
        }

        .tabs {
            max-width: 100%;
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
        }

        .tabs .tab-btn {
            display: inline-flex !important;
            align-items: center;
            justify-content: center;
            white-space: nowrap;
        }

        .invoice-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 16px;
        }

        .invoice-table thead {
            background: var(--surface-muted);
            border-bottom: 2px solid var(--border);
        }

        .invoice-table th {
            padding: 12px 16px;
            text-align: left;
            font-weight: 600;
            color: var(--text);
            font-size: 13px;
        }

        .invoice-table td {
            padding: 12px 16px;
            border-bottom: 1px solid var(--border);
            font-size: 14px;
        }

        .invoice-table tbody tr:hover {
            background: var(--surface-muted);
        }

        .invoice-status {
            display: inline-block;
            padding: 4px 12px;
            border-radius: 6px;
            font-size: 12px;
            font-weight: 600;
        }

        .status-paid {
            background: #d4edda;
            color: #155724;
        }

        .status-pending {
            background: #fff3cd;
            color: #856404;
        }

        .status-overdue {
            background: #f8d7da;
            color: #721c24;
        }

        .btn-primary {
            background: var(--secondary);
            color: var(--white);
            padding: 6px 14px;
            border: none;
            border-radius: 6px;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            text-decoration: none;
            display: inline-block;
            transition: background-color 0.2s ease, transform 0.2s ease;
        }

        .btn-primary:hover {
            background: #1e6fa5;
            transform: translateY(-2px);
        }

        @media (max-width: 992px) {
            .header-content {
                flex-wrap: wrap;
                gap: 12px;
            }

            .logo-section {
                width: 100%;
                justify-content: space-between;
                gap: 12px;
            }

            .search-bar {
                order: 3;
                margin: 0;
                flex: 1 1 100%;
                max-width: 100%;
            }

            .header-actions {
                margin-left: auto;
            }

            .user-info .address {
                max-width: 140px;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
            }
        }

        @media (max-width: 768px) {
            .container {
                width: min(1200px, calc(100% - 24px));
            }

            .header-content {
                gap: 10px;
            }

            .logo h2 {
                font-size: 0.98rem;
                letter-spacing: 0.2px;
            }

            .main-nav {
                display: none;
            }

            .header-actions {
                width: 100%;
                justify-content: flex-end;
                gap: 12px;
            }

            .user-profile {
                padding: 4px 8px;
            }

            .user-info {
                display: none;
            }

            .sub-nav > li > a {
                padding: 12px 14px;
                font-size: 14px;
            }

            .dropdown-menu {
                position: static;
                min-width: 0;
                border: 0;
                border-top: 1px solid #d7e2ee;
                border-radius: 0;
                box-shadow: none;
                margin-top: 0;
                transform: none;
            }

            .tabs {
                display: flex !important;
                flex-wrap: wrap;
                gap: 8px;
                width: 100%;
                border-radius: 14px !important;
            }

            .tabs .tab-btn {
                flex: 1 1 calc(50% - 8px);
                min-width: 0;
                text-align: center;
            }

            .page-header {
                flex-direction: column;
                align-items: flex-start;
            }

            .search-bar {
                order: 3;
                margin: 0;
                flex: 1 1 100%;
                max-width: 100%;
            }

            .card {
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
            }

            .invoice-table {
                min-width: 620px;
                font-size: 12px;
            }

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

        @media (max-width: 480px) {
            .tabs .tab-btn {
                flex: 1 1 100%;
            }
        }
