        :root {
            /* Default Dark Theme */
            --bg-color: #0c0c0c;
            --surface: #171717;
            --surface-hover: #262626;
            --border: #333333;
            --border-hover: #444444;
            --text-primary: #ededed;
            --text-secondary: #888888;
            
            --success: #10b981;
            --success-glow: rgba(16, 185, 129, 0.5);
            --error: #ef4444;
            --error-glow: rgba(239, 68, 68, 0.5);
            --pending: #f5a623;
            --pending-glow: rgba(245, 166, 35, 0.5);
            
            --font-sans: 'Inter', -apple-system, sans-serif;
            --transition: all 0.2s ease;
            --radius: 12px;
        }

        [data-theme="light"] {
            /* Vercel Light Theme */
            --bg-color: #fafafa;
            --surface: #ffffff;
            --surface-hover: #f4f4f5;
            --border: #eaeaea;
            --border-hover: #d4d4d8;
            --text-primary: #000000;
            --text-secondary: #666666;
        }

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

        /* Hide scrollbar for Chrome, Safari and Opera */
        ::-webkit-scrollbar {
            display: none;
        }

        body {
            margin: 0;
            padding: 40px 20px;
            font-family: var(--font-sans);
            background: var(--bg-color);
            color: var(--text-primary);
            min-height: 100vh;
            -webkit-font-smoothing: antialiased;
            -webkit-user-select: none;
            user-select: none;
            transition: background 0.3s ease, color 0.3s ease;
            
            /* Hide scrollbar for IE, Edge and Firefox */
            -ms-overflow-style: none;  /* IE and Edge */
            scrollbar-width: none;  /* Firefox */
        }

        .copyable-key {
            font-family: monospace;
            background: transparent;
            padding: 6px 12px;
            border-radius: 20px;
            cursor: pointer;
            border: 1px solid var(--border);
            transition: var(--transition);
            font-size: 13px;
            display: inline-block;
            color: var(--text-primary);
        }
        .copyable-key:hover {
            border-color: var(--text-primary);
            background: var(--surface);
            box-shadow: 0 0 12px rgba(255,255,255,0.08);
        }
        [data-theme="light"] .copyable-key:hover {
            box-shadow: 0 0 12px rgba(0,0,0,0.08);
        }
        
        /* Analytics Cards */
        .analytics-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 16px;
            margin-bottom: 24px;
        }
        .stat-card {
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: var(--radius);
            padding: 16px;
            display: flex;
            flex-direction: column;
            gap: 8px;
            transition: var(--transition);
        }
        .stat-card:hover {
            border-color: var(--border-hover);
            transform: translateY(-2px);
        }
        .stat-title {
            font-size: 13px;
            color: var(--text-secondary);
            font-weight: 500;
        }
        .stat-value {
            font-size: 24px;
            font-weight: 600;
            color: var(--text-primary);
        }
        .stat-sub {
            font-size: 12px;
            color: var(--text-secondary);
        }
        
        /* Table Sorting */
        th.sortable {
            cursor: pointer;
            user-select: none;
            transition: var(--transition);
        }
        th.sortable:hover {
            color: var(--text-primary);
        }
        .sort-icon {
            display: inline-block;
            margin-left: 4px;
            font-size: 10px;
            opacity: 0.5;
        }
        
        @keyframes highlightRow {
            0% { background: var(--success-glow); }
            100% { background: transparent; }
        }
        tr.recently-created {
            animation: highlightRow 2s ease forwards;
        }

        .container {
            max-width: 1400px;
            margin: 0 auto;
            animation: fadeIn 0.4s ease forwards;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px; /* Reduced gap */
            padding-bottom: 20px;
            border-bottom: 1px solid var(--border);
        }

        h1, h2, h3 {
            margin: 0;
            font-weight: 600;
            letter-spacing: -0.02em;
        }

        h1 { font-size: 24px; }
        h2 { font-size: 20px; }
        h3 { font-size: 16px; margin-bottom: 15px; }

        table {
            width: 100%;
            border-collapse: collapse;
            text-align: center;
        }

        th, td {
            padding: 16px 12px;
            border-bottom: 1px solid var(--border);
            font-size: 14px;
            vertical-align: middle;
            text-align: center;
        }

        th {
            font-size: 12px;
            color: var(--text-secondary);
            font-weight: 500;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            padding-bottom: 12px;
        }

        @keyframes rowEnter {
            from { opacity: 0; transform: translateY(15px); }
            to { opacity: 1; transform: translateY(0); }
        }

        tr {
            transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease, background 0.3s ease;
            animation: rowEnter 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) backwards;
        }

        tbody tr:hover {
            background: var(--surface-hover);
        }

        .spotlight-wrapper {
            position: relative;
            overflow: hidden;
        }
        
        .spotlight-wrapper::before {
            content: "";
            position: absolute;
            top: 0; left: 0; right: 0; bottom: 0;
            background: radial-gradient(300px circle at var(--mouse-x, -500px) var(--mouse-y, -500px), rgba(255, 255, 255, 0.08), transparent 40%);
            opacity: 0;
            transition: opacity 0.3s ease;
            pointer-events: none;
            z-index: 0;
            border-radius: inherit;
        }
        
        .spotlight-wrapper:hover::before {
            opacity: 1;
        }

        [data-theme="light"] .spotlight-wrapper::before {
            background: radial-gradient(300px circle at var(--mouse-x, -500px) var(--mouse-y, -500px), rgba(0, 0, 0, 0.05), transparent 40%);
        }

        button::before {
            content: "";
            position: absolute;
            top: 0; left: 0; right: 0; bottom: 0;
            background: radial-gradient(150px circle at var(--mouse-x, -500px) var(--mouse-y, -500px), color-mix(in srgb, currentColor 15%, transparent), transparent 40%);
            opacity: 0;
            transition: opacity 0.3s ease;
            pointer-events: none;
            z-index: 0;
            border-radius: inherit;
        }
        
        button:hover::before {
            opacity: 1;
        }

        .badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            padding: 6px 12px;
            border-radius: 9999px;
            font-size: 12px;
            font-weight: 500;
            border: 1px solid var(--border);
            background: var(--surface);
            color: var(--text-secondary);
        }

        .badge::before {
            content: '';
            display: block;
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: var(--text-secondary);
        }

        @keyframes pulse-success {
            0% { box-shadow: 0 0 0 0 var(--success-glow); }
            70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
            100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
        }
        @keyframes pulse-error {
            0% { box-shadow: 0 0 0 0 var(--error-glow); }
            70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
            100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
        }
        @keyframes pulse-pending {
            0% { box-shadow: 0 0 0 0 var(--pending-glow); }
            70% { box-shadow: 0 0 0 6px rgba(245, 166, 35, 0); }
            100% { box-shadow: 0 0 0 0 rgba(245, 166, 35, 0); }
        }

        .badge.active::before { background: var(--success); animation: pulse-success 2s infinite; }
        .badge.active { color: var(--text-primary); border-color: var(--border-hover); }

        @keyframes float {
            0% { transform: translateY(0px); }
            50% { transform: translateY(-10px); }
            100% { transform: translateY(0px); }
        }

        .analytics-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
        }

        .badge.blocked::before { background: var(--error); animation: pulse-error 2s infinite; }
        .badge.blocked { color: var(--text-primary); }

        .badge.pending::before { background: var(--pending); animation: pulse-pending 2s infinite; }
        .badge.pending { color: var(--text-primary); }

        button {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 0 16px;
            height: 36px;
            border-radius: var(--radius);
            border: 1px solid transparent;
            font-size: 13px;
            font-weight: 500;
            font-family: var(--font-sans);
            cursor: pointer;
            transition: var(--transition);
            white-space: nowrap;
            position: relative;
            overflow: hidden;
            box-sizing: border-box;
            line-height: 1;
        }

        /* Primary Solid Button */
        .btn-primary {
            background: var(--text-primary);
            color: var(--bg-color);
            box-shadow: 0 4px 14px 0 rgba(0,0,0,0.1);
            border: 1px solid var(--text-primary);
        }

        .btn-primary:hover {
            background: transparent;
            color: var(--text-primary);
            box-shadow: 0 0 15px rgba(255,255,255,0.15);
        }
        [data-theme="light"] .btn-primary:hover {
            box-shadow: 0 0 15px rgba(0,0,0,0.15);
        }

        /* Outlined Glowing Button */
        .btn-outline {
            background: transparent;
            color: var(--text-primary);
            border: 1px solid var(--border-hover);
            box-shadow: none;
        }

        .btn-outline:hover {
            border-color: var(--text-primary);
            background: var(--surface);
            box-shadow: 0 0 12px rgba(255,255,255,0.08);
        }
        [data-theme="light"] .btn-outline:hover {
            box-shadow: 0 0 12px rgba(0,0,0,0.08);
        }

        /* Small Table Button */
        .btn-small {
            height: 32px;
            padding: 0 12px;
            font-size: 13px;
            background: var(--bg-color);
            color: var(--text-secondary);
            border: 1px solid var(--border);
        }

        .btn-small:hover {
            color: var(--text-primary);
            border-color: var(--text-primary);
            background: var(--surface);
            box-shadow: 0 4px 12px rgba(255,255,255,0.05);
        }
        [data-theme="light"] .btn-small:hover {
            box-shadow: 0 4px 12px rgba(0,0,0,0.05);
        }

        /* Context Cues */
        .btn-extend:hover {
            color: var(--success) !important;
            border-color: var(--success) !important;
            box-shadow: 0 0 15px var(--success-glow) !important;
        }

        .btn-danger:hover {
            color: var(--error) !important;
            border-color: var(--error) !important;
            box-shadow: 0 0 15px var(--error-glow) !important;
        }

        /* Hold Button Animation */
        .hold-btn {
            position: relative;
            user-select: none;
            -webkit-user-select: none;
            overflow: hidden;
        }
        .hold-btn::after {
            content: "";
            position: absolute;
            top: 0; left: 0; bottom: 0;
            width: 0%;
            background: var(--text-primary);
            opacity: 0.15;
            transition: width 0s linear;
            z-index: 1;
            pointer-events: none;
        }
        .hold-btn.holding::after {
            transition: width 1s linear;
            width: 100%;
        }
        .hold-btn.btn-danger::after { background: var(--error); opacity: 0.25; }
        .hold-btn.btn-extend::after { background: var(--success); opacity: 0.25; }

        .header-btn {
            height: 40px !important;
            padding: 0 16px !important;
            font-size: 14px !important;
            font-weight: 500 !important;
            box-sizing: border-box;
        }

        .icon-btn {
            height: 40px !important;
            width: 40px !important;
            padding: 0 !important;
            display: inline-flex !important;
            align-items: center;
            justify-content: center;
            box-sizing: border-box;
        }

        @keyframes modalBgEnter { from { opacity: 0; } to { opacity: 1; } }
        @keyframes modalBgExit { from { opacity: 1; } to { opacity: 0; } }

        /* Modal */
        .modal {
            display: none;
            position: fixed;
            top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(0,0,0,0.7);
            justify-content: center;
            align-items: center;
            backdrop-filter: blur(8px);
            z-index: 999;
            animation: modalBgEnter 0.2s ease forwards;
        }
        
        .modal.closing {
            animation: modalBgExit 0.2s ease forwards;
        }

        .modal-content {
            background: var(--bg-color);
            padding: 32px;
            border-radius: var(--radius);
            border: 1px solid var(--border);
            width: 100%;
            max-width: 400px;
            box-shadow: 0 20px 40px rgba(0,0,0,0.5);
            animation: modalContentEnter 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
        }
        
        .modal.closing .modal-content {
            animation: modalContentExit 0.2s ease forwards;
        }

        @keyframes modalContentEnter {
            from { opacity: 0; transform: scale(0.95) translateY(10px); }
            to { opacity: 1; transform: scale(1) translateY(0); }
        }
        
        @keyframes modalContentExit {
            from { opacity: 1; transform: scale(1) translateY(0); }
            to { opacity: 0; transform: scale(0.95) translateY(10px); }
        }

        input {
            width: 100%;
            padding: 0 12px;
            height: 40px;
            margin: 8px 0 12px;
            border-radius: var(--radius);
            border: 1px solid var(--border);
            background: var(--bg-color);
            color: var(--text-primary);
            font-family: var(--font-sans);
            font-size: 14px;
            box-sizing: border-box;
            transition: var(--transition);
        }

        .copyable-key {
            cursor: pointer;
            padding: 2px 6px;
            border-radius: 4px;
            background: var(--surface-hover);
            transition: var(--transition);
            display: inline-block;
            font-family: monospace;
            font-size: 13px;
            -webkit-user-select: text;
            user-select: text;
        }

        input:focus {
            outline: none;
            border-color: var(--text-secondary);
            box-shadow: 0 0 0 2px rgba(136,136,136,0.2);
        }

        label {
            font-size: 13px;
            color: var(--text-secondary);
            font-weight: 500;
        }

        .login-screen {
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
        }
        
        .login-box {
            width: 100%;
            max-width: 360px;
            padding: 40px;
            border: 1px solid var(--border);
            border-radius: var(--radius);
            background: var(--bg-color);
            animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
            box-shadow: 0 10px 30px rgba(0,0,0,0.2);
        }

        .presets {
            display: flex;
            gap: 8px;
            margin-bottom: 24px;
            flex-wrap: wrap;
        }

        /* Mobile */
        @media (max-width: 768px) {
            body { padding: 20px 10px; }
            .header { flex-direction: column; gap: 20px; align-items: flex-start; }
            table { display: block; overflow-x: auto; white-space: nowrap; }
        }
        /* Toasts */
        #toastContainer {
            position: fixed;
            bottom: 24px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            flex-direction: column;
            gap: 12px;
            z-index: 9999;
            pointer-events: none;
            align-items: center;
        }
        
        .toast {
            background: var(--surface);
            color: var(--text-primary);
            padding: 14px 18px;
            border-radius: var(--radius);
            box-shadow: 0 10px 30px rgba(0,0,0,0.15);
            border: 1px solid var(--border);
            display: flex;
            flex-direction: column;
            gap: 4px;
            pointer-events: auto;
            min-width: 280px;
            max-width: 400px;
            animation: toastEnter 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
            position: relative;
        }
        
        [data-theme="light"] .toast {
            box-shadow: 0 10px 30px rgba(0,0,0,0.08);
        }
        
        .toast.toast-exit {
            animation: toastExit 0.3s ease-in forwards;
        }
        
        .toast-progress {
            position: absolute;
            bottom: 0; left: 0;
            height: 3px;
            width: 100%;
            animation: toastProgress linear forwards;
            transform-origin: left;
        }
        .toast-progress.bg-success { background: var(--success); }
        .toast-progress.bg-error { background: var(--error); }
        .toast-progress.bg-info { background: var(--primary); }
        
        @keyframes toastProgress {
            from { transform: scaleX(1); }
            to { transform: scaleX(0); }
        }
        
        .toast-success { border-left: 4px solid var(--success); }
        .toast-error { border-left: 4px solid var(--error); }
        .toast-info { border-left: 4px solid var(--primary); }
        
        .toast-title { font-size: 14px; font-weight: 600; }
        .toast-message { font-size: 13px; color: var(--text-secondary); line-height: 1.4; white-space: pre-wrap; word-break: break-word; }
        
        @keyframes toastEnter {
            from { opacity: 0; transform: translateY(40px) scale(0.9); }
            to { opacity: 1; transform: translateY(0) scale(1); }
        }
        @keyframes toastExit {
            from { opacity: 1; transform: translateY(0) scale(1); }
            to { opacity: 0; transform: translateY(20px) scale(0.9); }
        }

        /* Custom Dropdown */
        .dropdown-item {
            padding: 8px 12px;
            font-size: 13px;
            cursor: pointer;
            transition: background 0.2s;
            color: var(--text-primary);
        }
        .dropdown-item:hover {
            background: rgba(255, 255, 255, 0.05);
        }
        [data-theme="light"] .dropdown-item:hover {
            background: rgba(0, 0, 0, 0.05);
        }

        /* --- Mobile Responsive Card Layout --- */
        @media (max-width: 768px) {
            table, thead, tbody, th, td, tr { display: block; }
            thead { display: none; }
            
            tr {
                margin-bottom: 16px;
                background: var(--surface);
                border: 1px solid var(--border);
                border-radius: 20px;
                padding: 20px;
                position: relative;
                display: flex;
                flex-wrap: wrap;
                column-gap: 4%;
                row-gap: 12px;
                align-items: start;
                transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
                box-shadow: 0 4px 20px rgba(0,0,0,0.06);
            }
            [data-theme="light"] tr { box-shadow: 0 4px 20px rgba(0,0,0,0.03); }
            
            /* Fluid animation on tap */
            tr:active { transform: scale(0.97); }
            
            td {
                border: none;
                padding: 0;
                text-align: left;
                display: flex;
                flex-direction: column;
                align-items: flex-start;
                gap: 2px;
            }
            
            td::before {
                content: attr(data-label);
                font-size: 10px;
                color: var(--text-secondary);
                text-transform: uppercase;
                letter-spacing: 0.05em;
                font-weight: 600;
            }
            
            /* Client Name (Top left) */
            td:nth-child(1) {
                width: 100%;
                font-size: 20px;
                font-weight: 600;
                padding-right: 90px; /* Space for status badge */
                margin-bottom: 2px;
            }
            td:nth-child(1)::before { display: none; }
            
            /* Status Badge (Top right corner) */
            td:nth-child(3) {
                position: absolute;
                top: 20px;
                right: 20px;
                width: auto;
            }
            td:nth-child(3)::before { display: none; }
            
            /* License Key (Full width) */
            td:nth-child(2) {
                width: 100%;
                margin-bottom: 4px;
            }
            
            /* Details in 2 Columns */
            td:nth-child(4), td:nth-child(5), td:nth-child(6), td:nth-child(7), td:nth-child(8) {
                width: 48%;
                font-size: 13px;
            }
            
            /* Actions Cell (Bottom) */
            td:last-child {
                width: 100%;
                margin-top: 8px;
                padding-top: 16px;
                border-top: 1px solid var(--border);
            }
            td:last-child::before { display: none; }
            
            td:last-child > div {
                display: flex;
                flex-direction: row;
                flex-wrap: wrap;
                width: 100%;
                gap: 8px !important;
                justify-content: flex-start;
            }
            
            /* Pill buttons */
            td:last-child button {
                width: auto;
                flex-grow: 1;
                margin: 0;
                padding: 10px 14px;
                border-radius: 30px;
                font-size: 12px;
                font-weight: 600;
            }
            
            /* Top Header layout */
            .header {
                flex-direction: column;
                gap: 15px;
                align-items: center;
                text-align: center;
            }
            .header > div {
                flex-direction: column;
                width: 100%;
                align-items: stretch !important;
            }
            .header-btn {
                width: 100%;
                border-radius: 30px;
                padding: 12px;
            }
            
            /* Move Theme Toggle to Bottom Right on Mobile */
            #themeToggle {
                position: fixed;
                bottom: 24px;
                right: 24px;
                z-index: 1000;
                width: 48px;
                height: 48px;
                border-radius: 50%;
                background: var(--surface);
                box-shadow: 0 4px 15px rgba(0,0,0,0.15);
                display: flex;
                align-items: center;
                justify-content: center;
            }
            [data-theme="light"] #themeToggle {
                box-shadow: 0 4px 15px rgba(0,0,0,0.08);
            }
            
            /* Analytics Grid */
            .analytics-grid {
                grid-template-columns: 1fr 1fr;
            }
            
            /* Filter inputs */
            input#filterName, select#filterStatus, select#filterDuration {
                max-width: 100% !important;
                width: 100%;
                border-radius: 20px !important;
            }
            .copyable-key {
                max-width: 100%;
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
            }
        }

        /* Hold-to-delete button */
        .hold-btn {
            position: relative;
            overflow: hidden;
            cursor: pointer;
            user-select: none;
        }
        .hold-btn::after {
            content: '';
            position: absolute;
            inset: 0;
            background: rgba(239, 68, 68, 0.35);
            transform: scaleX(0);
            transform-origin: left center;
            transition: none;
            border-radius: inherit;
            pointer-events: none;
        }
        .hold-btn.holding::after {
            transform: scaleX(1);
            transition: transform 1s linear;
        }
