* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        :root {
            --primary: #6366f1;
            --primary-dark: #4f46e5;
            --accent: #ec4899;
            --success: #10b981;
            --warning: #f59e0b;
            --info: #06b6d4;
            --danger: #ef4444;
            --bg-main: #0f0f1a;
            --bg-card: #1a1a2e;
            --bg-elevated: #232340;
            --text-primary: #ffffff;
            --text-secondary: #a0a0c0;
            --border: #2d2d45;
            --sidebar-width: 280px;
        }

        [data-theme="light"] {
            --bg-main: #f8f9fa;
            --bg-card: #ffffff;
            --bg-elevated: #f1f3f5;
            --text-primary: #1a1a1a;
            --text-secondary: #6b7280;
            --border: #e5e7eb;
        }

        body {
            background: var(--bg-main);
            color: var(--text-primary);
            line-height: 1.6;
            overflow-x: hidden;
            transition: background 0.3s, color 0.3s;
        }

        .heading-font {
            font-family: sans-serif;
        }

        /* Sidebar Styles */
        .sidebar {
            position: fixed;
            left: 0;
            top: 0;
            width: var(--sidebar-width);
            height: 100vh;
            background: var(--bg-card);
            border-right: 1px solid var(--border);
            z-index: 1000;
            transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            overflow-y: auto;
        }

        .sidebar.closed {
            transform: translateX(-100%);
        }

        /* Sidebar overlay */
        .sidebar-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.5);
            z-index: 999;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.3s, visibility 0.3s;
        }

        .sidebar-overlay.active {
            opacity: 1;
            visibility: visible;
        }

        /* Modal overlay */
        .modal-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.7);
            z-index: 9998;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.3s, visibility 0.3s;
            backdrop-filter: blur(4px);
        }

        .modal-overlay.active {
            opacity: 1;
            visibility: visible;
        }

        /* Modal container */
        .modal {
            position: fixed;
            top: 0;
            right: -100%;
            width: 100%;
            max-width: 900px;
            height: 100vh;
            background: var(--bg-card);
            z-index: 9999;
            overflow-y: auto;
            transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            border-left: 1px solid var(--border);
        }

        .modal.active {
            right: 0;
        }

        @media (max-width: 768px) {
            .modal {
                max-width: 100%;
            }
        }

        .modal-header {
            position: sticky;
            top: 0;
            background: var(--bg-card);
            border-bottom: 1px solid var(--border);
            padding: 24px;
            z-index: 10;
        }

        .modal-content {
            padding: 24px;
        }

        .close-btn {
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: var(--bg-elevated);
            border: 1px solid var(--border);
            cursor: pointer;
            transition: all 0.3s;
        }

        .close-btn:hover {
            background: var(--border);
        }

        .section-title {
            font-size: 1.25rem;
            font-weight: 600;
            margin-bottom: 20px;
            color: var(--text-primary);
        }

        .activity-item {
            padding: 16px 0;
            border-bottom: 1px solid var(--border);
        }

        .activity-item:last-child {
            border-bottom: none;
        }

        .activity-time {
            font-size: 0.875rem;
            color: var(--text-secondary);
        }

        .activity-description {
            margin-top: 4px;
            color: var(--text-primary);
        }

        .note-box {
            background: var(--bg-elevated);
            border: 1px solid var(--border);
            padding: 20px;
            margin-bottom: 16px;
        }

        .note-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 12px;
        }

        .note-author {
            font-weight: 600;
            color: var(--text-primary);
        }

        .note-date {
            font-size: 0.875rem;
            color: var(--text-secondary);
        }

        .note-content {
            color: var(--text-primary);
            line-height: 1.6;
        }

        .action-btn {
            padding: 12px 20px;
            background: var(--bg-elevated);
            border: 1px solid var(--border);
            color: var(--text-primary);
            cursor: pointer;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            gap: 8px;
            width: 100%;
            justify-content: center;
            font-weight: 600;
        }

        .action-btn:hover {
            background: var(--border);
        }

        .action-btn-primary {
            background: linear-gradient(135deg, var(--primary), var(--accent));
            color: white;
            border: none;
        }

        .action-btn-primary:hover {
            box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
        }

        .action-btn-danger {
            color: var(--danger);
            border-color: var(--danger);
        }

        .action-btn-danger:hover {
            background: rgba(239, 68, 68, 0.1);
        }

        .main-content {
            margin-left: var(--sidebar-width);
            transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .main-content.full-width {
            margin-left: 0;
        }

        .sidebar-nav-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 14px 20px;
            color: var(--text-secondary);
            text-decoration: none;
            transition: all 0.2s;
            border-left: 3px solid transparent;
        }

        .sidebar-nav-item:hover {
            background: var(--bg-elevated);
            color: var(--text-primary);
        }

        .sidebar-nav-item.active {
            background: var(--bg-elevated);
            color: var(--primary);
            border-left-color: var(--primary);
        }

        @media (max-width: 1024px) {
            .sidebar {
                transform: translateX(-100%);
            }
            
            .sidebar.open {
                transform: translateX(0);
            }

            .main-content {
                margin-left: 0;
            }
        }

        /* Card and container styles */
        .card {
            background: var(--bg-card);
            border: 1px solid var(--border);
            transition: all 0.3s;
        }

        .elevated {
            background: var(--bg-elevated);
        }

        /* Search bar styles */
        .search-container {
            transition: all 0.3s;
        }

        .search-container:focus-within {
            box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
        }

        /* Custom scrollbar */
        ::-webkit-scrollbar {
            width: 8px;
        }

        ::-webkit-scrollbar-track {
            background: var(--bg-card);
        }

        ::-webkit-scrollbar-thumb {
            background: var(--primary);
            border-radius: 10px;
        }

        ::-webkit-scrollbar-thumb:hover {
            background: var(--primary-dark);
        }

        /* Tab animation */
        .tab {
            position: relative;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .tab::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 0;
            height: 3px;
            background: linear-gradient(90deg, var(--primary), var(--accent));
            transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .tab.active::after {
            width: 100%;
        }

        .tab:hover:not(.active) {
            color: var(--primary);
            background: var(--bg-elevated);
        }

        /* Card hover effects */
        .customer-card {
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            overflow: hidden;
            padding: 28px !important;
        }

        @media (max-width: 640px) {
            .customer-card {
                padding: 20px !important;
            }
        }

        .customer-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.05), transparent);
            transition: left 0.5s;
        }

        .customer-card:hover::before {
            left: 100%;
        }

        .customer-card:hover {
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
            border-color: var(--primary);
        }

        [data-theme="light"] .customer-card:hover {
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
        }

        /* Status badges */
        .status-badge {
            padding: 6px 16px;
            font-size: 0.875rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            animation: fadeIn 0.5s ease-out;
        }
        .status-badges {
            position:relative;
            padding: 6px 16px;
            font-size: 13px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            animation: fadeIn 0.5s ease-out;
        }

        .status-paid {
            left:0rem;
            top: 10px;
            width: 45%;
            text-align:center;
            background: rgba(16, 185, 129, 0.1);
            color: var(--success);
            border: 1px solid rgba(16, 185, 129, 0.3);
        }
        .status-pending{
            left: 0rem;
            top: 10px;
            background: #ef4444;
            text-align:center;
            width: 45%;
            color: #fff7f7;
            border: 1px solid #ef4444;
        }
        @media (max-width: 768px) {
    .status-paid,
    .status-pending {
        width: 50%;           /* fixed width */
        display: inline-block; /* ensures they can sit side by side */
        box-sizing: border-box; /* includes padding/border in width */
    }
}

        .status-unpaid {
            background: rgba(245, 158, 11, 0.1);
            color: var(--warning);
            border: 1px solid rgba(245, 158, 11, 0.3);
        }

        .status-refunded {
            width:40%;
            background: rgba(6, 182, 212, 0.1);
            color: var(--info);
            border: 1px solid rgba(6, 182, 212, 0.3);
        }

        .status-badge::before {
            content: '';
            width: 8px;
            height: 8px;
            animation: pulse 2s infinite;
        }

        .status-paid::before {
            background: var(--success);
        }

        .status-unpaid::before {
            background: var(--warning);
        }

        .status-refunded::before {
            background: var(--info);
        }

        @keyframes pulse {
            0%, 100% {
                opacity: 1;
                transform: scale(1);
            }
            50% {
                opacity: 0.5;
                transform: scale(1.2);
            }
        }

        /* Button styles */
        .btn-view {
            padding: 10px 24px;
            background: linear-gradient(135deg, var(--primary), var(--accent));
            color: white;
            border: none;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            display: inline-flex;
            align-items: center;
            gap: 8px;
            position: relative;
            overflow: hidden;
        }

        .btn-view::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 0;
            height: 0;
            background: rgba(255, 255, 255, 0.2);
            transform: translate(-50%, -50%);
            transition: width 0.6s, height 0.6s;
        }

        .btn-view:hover::before {
            width: 300px;
            height: 300px;
        }

        .btn-view:hover {
            box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
        }

        /* Toggle button */
        .theme-toggle {
            width: 50px;
            height: 26px;
            background: var(--border);
            border: none;
            position: relative;
            cursor: pointer;
            transition: background 0.3s;
        }

        .theme-toggle::after {
            content: '';
            position: absolute;
            top: 3px;
            left: 3px;
            width: 20px;
            height: 20px;
            background: white;
            transition: transform 0.3s;
        }

        .theme-toggle.active {
            background: var(--primary);
        }

        .theme-toggle.active::after {
            transform: translateX(24px);
        }

        /* Hamburger menu */
        .hamburger {
            width: 24px;
            height: 20px;
            position: relative;
            cursor: pointer;
            display: none;
        }

        .hamburger span {
            display: block;
            position: absolute;
            height: 2px;
            width: 100%;
            background: var(--text-primary);
            opacity: 1;
            left: 0;
            transition: 0.25s ease-in-out;
        }

        .hamburger span:nth-child(1) { top: 0px; }
        .hamburger span:nth-child(2) { top: 9px; }
        .hamburger span:nth-child(3) { top: 18px; }

        .hamburger.active span:nth-child(1) {
            top: 9px;
            transform: rotate(135deg);
        }

        .hamburger.active span:nth-child(2) {
            opacity: 0;
            left: -60px;
        }

        .hamburger.active span:nth-child(3) {
            top: 9px;
            transform: rotate(-135deg);
        }

        @media (max-width: 1024px) {
            .hamburger {
                display: block;
            }
        }

        /* Animations */
        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes slideIn {
            from {
                opacity: 0;
                transform: translateX(-20px);
            }
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

        .animate-fade-in {
            animation: fadeIn 0.6s ease-out backwards;
        }

        .animate-slide-in {
            animation: slideIn 0.6s ease-out backwards;
        }

        /* Stagger animation delays */
        .customer-card:nth-child(1) { animation-delay: 0.1s; }
        .customer-card:nth-child(2) { animation-delay: 0.15s; }
        .customer-card:nth-child(3) { animation-delay: 0.2s; }
        .customer-card:nth-child(4) { animation-delay: 0.25s; }
        .customer-card:nth-child(5) { animation-delay: 0.3s; }
        .customer-card:nth-child(6) { animation-delay: 0.35s; }

        /* Icon styles */
        .icon {
            width: 20px;
            height: 20px;
            stroke: currentColor;
            stroke-width: 2;
            fill: none;
            stroke-linecap: round;
            stroke-linejoin: round;
        }

        /* Info grid */
        .info-item {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .info-label {
            font-size: 0.75rem;
            color: var(--text-secondary);
            font-weight: 500;
            text-transform: uppercase;
            letter-spacing: 0.8px;
        }

        .info-value {
            font-size: 0.95rem;
            color: var(--text-primary);
            font-weight: 500;
        }

        /* Customer card grid layout */
        .customer-info-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 24px;
        }

        @media (max-width: 1024px) {
            .customer-info-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 20px;
            }
        }

        @media (max-width: 640px) {
            .customer-info-grid {
                grid-template-columns: 1fr;
                gap: 16px;
            }
        }

        /* Horizontal divider line */
        .divider-line {
            width: 100%;
            height: 1px;
            background: var(--border);
            margin: 20px 0;
        }

        /* Action button container */
        .action-container {
            display: flex;
            justify-content: flex-end;
            padding-top: 4px;
        }

        @media (max-width: 640px) {
            .action-container {
                justify-content: flex-start;
                padding-top: 0;
            }
        }

        /* Stats cards */
        .stat-card {
            padding: 28px;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            cursor: pointer;
            position: relative;
            overflow: hidden;
        }

        .stat-card::after {
            content: '';
            position: absolute;
            top: 0;
            right: 0;
            width: 100px;
            height: 100px;
            opacity: 0.05;
            transition: all 0.3s;
        }

        .stat-card:hover {
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }

        [data-theme="light"] .stat-card:hover {
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
        }

        .stat-all { background: rgba(99, 102, 241, 0.08); border: 1px solid rgba(99, 102, 241, 0.2); }
        .stat-paid { background: rgba(16, 185, 129, 0.08); border: 1px solid rgba(16, 185, 129, 0.2); }
        .stat-unpaid { background: rgba(245, 158, 11, 0.08); border: 1px solid rgba(245, 158, 11, 0.2); }
        .stat-refunded { background: rgba(6, 182, 212, 0.08); border: 1px solid rgba(6, 182, 212, 0.2); }

        .stat-all::after { background: var(--primary); }
        .stat-paid::after { background: var(--success); }
        .stat-unpaid::after { background: var(--warning); }
        .stat-refunded::after { background: var(--info); }

        .stat-number {
            font-size: 2rem;
            font-weight: 700;
            line-height: 1;
            margin-top: 8px;
        }

        @media (max-width: 640px) {
            .stat-card {
                padding: 20px;
            }
            
            .stat-number {
                font-size: 1.75rem;
            }
        }

        /* Empty state */
        .empty-state {
            text-align: center;
            padding: 60px 20px;
            color: var(--text-secondary);
        }

        .empty-icon {
            width: 80px;
            height: 80px;
            margin: 0 auto 20px;
            opacity: 0.3;
        }

        /* Modal overlay */
        .modal-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.7);
            z-index: 9998;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.3s, visibility 0.3s;
            backdrop-filter: blur(4px);
        }

        .modal-overlay.active {
            opacity: 1;
            visibility: visible;
        }

        /* Modal container */
        .modal {
            position: fixed;
            top: 0;
            right: -100%;
            width: 100%;
            max-width: 900px;
            height: 100vh;
            background: var(--bg-card);
            z-index: 9999;
            overflow-y: auto;
            transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            border-left: 1px solid var(--border);
        }

        .modal.active {
            right: 0;
        }

        @media (max-width: 768px) {
            .modal {
                max-width: 100%;
            }
        }

        .modal-header {
            position: sticky;
            top: 0;
            background: var(--bg-card);
            border-bottom: 1px solid var(--border);
            padding: 24px;
            z-index: 10;
        }

        .modal-content {
            padding: 24px;
        }

        .close-btn {
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: var(--bg-elevated);
            border: 1px solid var(--border);
            cursor: pointer;
            transition: all 0.3s;
        }

        .close-btn:hover {
            background: var(--border);
        }

        .section-title {
            font-size: 1.25rem;
            font-weight: 600;
            margin-bottom: 20px;
            color: var(--text-primary);
        }

        .activity-item {
            padding: 16px 0;
            border-bottom: 1px solid var(--border);
        }

        .activity-item:last-child {
            border-bottom: none;
        }

        .activity-time {
            font-size: 0.875rem;
            color: var(--text-secondary);
        }

        .activity-description {
            margin-top: 4px;
            color: var(--text-primary);
        }

        .note-box {
            background: var(--bg-elevated);
            border: 1px solid var(--border);
            padding: 20px;
            margin-bottom: 16px;
        }

        .note-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 12px;
        }

        .note-author {
            font-weight: 600;
            color: var(--text-primary);
        }

        .note-date {
            font-size: 0.875rem;
            color: var(--text-secondary);
        }

        .note-content {
            color: var(--text-primary);
            line-height: 1.6;
        }

        .action-btn {
            padding: 12px 20px;
            background: var(--bg-elevated);
            border: 1px solid var(--border);
            color: var(--text-primary);
            cursor: pointer;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            gap: 8px;
            width: 100%;
            justify-content: center;
            font-weight: 600;
        }

        .action-btn:hover {
            background: var(--border);
        }

        .action-btn-primary {
            background: linear-gradient(135deg, var(--primary), var(--accent));
            color: white;
            border: none;
        }

        .action-btn-primary:hover {
            box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
        }
        .sno-circle {
            display: inline-block;
            width: 24px;
            height: 24px;
            line-height: 24px;
            border-radius: 50%;
            background-color: #4caf50; /* green circle */
            color: white;
            text-align: center;
            font-weight: bold;
            font-size: 14px;
        }


        .action-btn-danger {
            color: var(--danger);
            border-color: var(--danger);
        }

        .action-btn-danger:hover {
            background: rgba(239, 68, 68, 0.1);
        }

        .divider-line {
            width: 100%;
            height: 1px;
            background: var(--border);
            margin: 20px 0;
        }