/* Global Styles & Variables */
:root {
    --bg-main: HSL(224, 25%, 10%);
    --panel-bg: rgba(30, 41, 59, 0.55);
    --panel-border: rgba(255, 255, 255, 0.08);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Neon gradients & accents */
    --accent-purple: HSL(263, 90%, 65%);
    --accent-cyan: HSL(198, 90%, 55%);
    --accent-pink: HSL(328, 85%, 60%);
    --gradient-primary: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
    --gradient-hover: linear-gradient(135deg, HSL(263, 90%, 70%), HSL(198, 90%, 60%));
    
    /* Status Colors */
    --success: HSL(142, 72%, 50%);
    --warning: HSL(38, 92%, 50%);
    --danger: HSL(0, 84%, 60%);
    --info: HSL(217, 91%, 60%);
    
    --font-primary: 'Outfit', 'Sarabun', system-ui, sans-serif;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-premium: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 1px 1px rgba(255, 255, 255, 0.05);
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* Background Glowing Orbs */
.background-decorations {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.25;
    animation: float-animation 20s infinite alternate ease-in-out;
}

.circle-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: var(--accent-purple);
}

.circle-2 {
    bottom: -10%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: var(--accent-cyan);
    animation-delay: -5s;
}

.circle-3 {
    top: 40%;
    left: 50%;
    width: 300px;
    height: 300px;
    background: var(--accent-pink);
    opacity: 0.15;
    animation-delay: -10s;
}

@keyframes float-animation {
    0% {
        transform: translate(0, 0) scale(1);
    }
    100% {
        transform: translate(50px, 30px) scale(1.1);
    }
}

/* Glassmorphism Panel Base */
.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(16px) saturate(120%);
    -webkit-backdrop-filter: blur(16px) saturate(120%);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    box-shadow: var(--shadow-premium);
    padding: 30px;
    transition: var(--transition-smooth);
}

.glass-panel:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

/* Login Container */
#login-container {
    width: 100%;
    max-width: 450px;
    display: none;
}

#login-container.active {
    display: block;
    animation: fade-in 0.5s ease-out;
}

.logo-icon {
    font-size: 3rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
    display: inline-block;
    filter: drop-shadow(0 4px 10px rgba(168, 85, 247, 0.4));
}

.text-center {
    text-align: center;
}

.panel-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.025em;
    background: linear-gradient(120deg, #ffffff, var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.panel-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 25px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

label i {
    margin-right: 5px;
    font-size: 0.85rem;
    color: var(--accent-cyan);
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="url"] {
    width: 100%;
    padding: 12px 16px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition-smooth);
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="url"]:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.25);
    background: rgba(15, 23, 42, 0.85);
}

input[type="text"]:disabled,
input[type="password"]:disabled,
input[type="email"]:disabled,
input[type="url"]:disabled {
    background: rgba(15, 23, 42, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
    color: var(--text-muted) !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    user-select: none !important;
}

.form-help {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 5px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-smooth);
    gap: 8px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.3);
}

.btn-primary:hover {
    background: var(--gradient-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(168, 85, 247, 0.45);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    background: var(--danger);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.35);
}

.btn-block {
    width: 100%;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 6px;
}

/* Error / Validation Text */
.error-text {
    color: var(--danger);
    font-size: 0.82rem;
    margin-top: 5px;
    display: block;
}

/* Dashboard Layout */
#dashboard-container {
    display: none;
    width: 100%;
    max-width: 1400px;
    min-height: calc(100vh - 40px);
    flex-direction: column;
    gap: 20px;
}

#dashboard-container.active {
    display: flex;
    animation: fade-in 0.6s ease-out;
}

/* Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.brand-icon {
    font-size: 2.2rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-brand h1 {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.app-status {
    font-size: 0.78rem;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

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

.status-dot.online {
    background-color: var(--success);
    box-shadow: 0 0 8px var(--success);
}

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

/* Grid Layout */
.grid-layout {
    display: grid;
    grid-template-columns: 1.1fr 1.3fr;
    gap: 20px;
    width: 100%;
    align-items: stretch;
}

.grid-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.flex-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Section Styling */
.section-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 10px;
}

.section-title i {
    color: var(--accent-purple);
}

.section-desc {
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin-bottom: 20px;
    line-height: 1.4;
}

/* Form Actions Status Msg */
.form-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

.status-msg {
    font-size: 0.88rem;
    font-weight: 500;
    opacity: 0;
    transition: var(--transition-smooth);
}

.status-msg.show {
    opacity: 1;
}

.status-msg.success {
    color: var(--success);
}

.status-msg.error {
    color: var(--danger);
}

/* Input Group for Simulator */
.input-group {
    display: flex;
    gap: 10px;
}

.input-group input {
    flex: 1;
}

.text-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin: 10px 0;
}

.text-divider::before,
.text-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.text-divider span {
    padding: 0 10px;
}

/* Simulator Results */
.sim-result-box {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 20px;
    margin-top: 15px;
    animation: slide-down 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.sim-result-box h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.result-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

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

.result-item.full-width {
    grid-column: span 2;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 10px;
    margin-top: 5px;
}

.result-item .label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}

.result-item .val {
    font-size: 0.92rem;
    font-weight: 600;
}

.result-item .val.badge {
    align-self: flex-start;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.badge-a {
    background: rgba(168, 85, 247, 0.15);
    color: HSL(263, 90%, 75%);
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.badge-b {
    background: rgba(14, 165, 233, 0.15);
    color: HSL(198, 90%, 75%);
    border: 1px solid rgba(14, 165, 233, 0.3);
}

.link-url {
    color: var(--accent-cyan);
    text-decoration: none;
    word-break: break-all;
    font-size: 0.85rem;
    display: inline-block;
    transition: var(--transition-smooth);
}

.link-url:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Logs / Table Section */
.logs-section {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.section-title-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 10px;
}

.section-title-container .section-title {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.log-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-container {
    flex: 1;
    overflow-y: auto;
    max-height: 600px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Custom Scrollbar for Logs Table */
.table-container::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.table-container::-webkit-scrollbar-track {
    background: transparent;
}

.table-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    text-align: left;
}

thead th {
    background: rgba(15, 23, 42, 0.6);
    padding: 12px 16px;
    color: var(--text-secondary);
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: var(--transition-smooth);
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

tbody td {
    padding: 12px 16px;
    vertical-align: middle;
    color: var(--text-primary);
}

.text-muted {
    color: var(--text-muted) !important;
}

.text-center {
    text-align: center;
}

/* Logs Table Custom Badges */
.log-route {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.log-route.route-a {
    background: rgba(168, 85, 247, 0.12);
    color: HSL(263, 90%, 75%);
    border: 1px solid rgba(168, 85, 247, 0.25);
}

.log-route.route-b {
    background: rgba(14, 165, 233, 0.12);
    color: HSL(198, 90%, 75%);
    border: 1px solid rgba(14, 165, 233, 0.25);
}

.log-ip {
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--accent-cyan);
}

.log-country {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.log-flag {
    font-size: 1.1rem;
}

.log-url-cell {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1000;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s;
    opacity: 0;
    pointer-events: none;
    font-size: 0.92rem;
    font-weight: 500;
}

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

.toast-icon {
    color: var(--accent-purple);
}

/* Utility Animations */
.hidden {
    display: none !important;
}

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

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

/* Responsive adjustments */
@media (max-width: 1024px) {
    .grid-layout {
        grid-template-columns: 1fr;
    }
    body {
        padding: 10px;
    }
}

@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    .header-brand {
        flex-direction: column;
    }
    .grid-2-col {
        grid-template-columns: 1fr;
    }
}

/* Custom Dropdown Select */
select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition-smooth);
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
}

select:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.25);
    background-color: rgba(15, 23, 42, 0.85);
}

/* Clicks Statistics Badge */
.clicks-count-badge {
    background: rgba(255, 255, 255, 0.08);
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: monospace;
    color: var(--accent-cyan);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.cursor-pointer {
    cursor: pointer;
}

.animate-slide-down {
    animation: slide-down 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-inline-copy {
    padding: 4px 8px;
    font-size: 0.75rem;
    background: rgba(14, 165, 233, 0.1);
    color: var(--accent-cyan);
    border: 1px solid rgba(14, 165, 233, 0.2);
    border-radius: 4px;
    margin-left: 8px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-inline-copy:hover {
    background: var(--accent-cyan);
    color: white;
}

.link-slug-text {
    font-family: monospace;
    font-weight: 600;
    color: var(--accent-purple);
}

/* Custom Toggle Switch */
.switch-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    margin-bottom: 20px;
    transition: var(--transition-smooth);
}

.switch-group:hover {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.6);
}

.switch-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    user-select: none;
    flex: 1;
    margin-right: 15px;
}

.switch-label .title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.switch-label .title i {
    color: var(--accent-cyan);
    margin-right: 6px;
}

.switch-label .desc {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: .3s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-secondary);
    transition: .3s;
    border-radius: 50%;
}

.switch input:checked + .slider {
    background: var(--gradient-primary);
    border-color: transparent;
}

.switch input:checked + .slider:before {
    transform: translateX(24px);
    background-color: white;
}

/* User Management & Multi-user Role Badges */
.role-admin-badge {
    background: rgba(168, 85, 247, 0.15);
    color: HSL(263, 90%, 75%);
    border: 1px solid rgba(168, 85, 247, 0.3);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 600;
    display: inline-block;
}

.role-user-badge {
    background: rgba(14, 165, 233, 0.15);
    color: HSL(198, 90%, 75%);
    border: 1px solid rgba(14, 165, 233, 0.3);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 600;
    display: inline-block;
}

.user-mgmt-grid {
    animation: slide-down 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#auth-wrapper {
    animation: fade-in 0.5s ease-out;
}

#register-container, #forgot-container {
    animation: fade-in 0.5s ease-out;
}

.hidden {
    display: none !important;
}

/* User Filter Dropdowns alignment styles */
.filter-group select {
    background-color: rgba(15, 23, 42, 0.8);
    border-color: rgba(255, 255, 255, 0.12);
}

.filter-group select:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(14, 165, 233, 0.2);
}

/* Responsive adjustments for User Management Panel */
@media (max-width: 1024px) {
    .user-mgmt-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Tab Buttons active styling */
.tab-btn.active {
    background: var(--gradient-primary) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.25) !important;
    border-color: transparent !important;
}

/* Accordion details/summary styles */
.advanced-rules-toggle {
    margin-top: 15px;
}

.advanced-header-btn:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}

.advanced-body-fields {
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-top: none;
    border-radius: 0 0 8px 8px;
    background: rgba(15, 23, 42, 0.3);
    animation: slide-down 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Responsive charts styling */
.charts-grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 20px;
    width: 100%;
}

@media (max-width: 768px) {
    .charts-grid-layout {
        grid-template-columns: 1fr !important;
    }
    .dashboard-tabs {
        padding: 10px !important;
        justify-content: center;
    }
}

/* Premium Pagination Styling */
.pagination-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    padding: 12px 20px;
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    gap: 15px;
    flex-wrap: wrap;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-premium);
}

.pagination-info {
    font-size: 0.88rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.pagination-controls-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.limit-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.limit-selector span {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.limit-selector select {
    width: auto;
    padding: 6px 32px 6px 12px;
    font-size: 0.85rem;
    height: 32px;
    border-radius: 8px;
    background-color: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    background-position: right 10px center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.limit-selector select:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background-color: rgba(15, 23, 42, 0.8);
}

.pagination-buttons {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pagination-btn {
    min-width: 32px;
    height: 32px;
    padding: 0 6px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-primary);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.pagination-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.pagination-btn.active {
    background: var(--gradient-primary);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.25);
}

.pagination-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    color: var(--text-muted);
}

/* Premium Light Theme variables & styles */
:root.light-theme {
    --bg-main: HSL(224, 20%, 94%);
    --panel-bg: rgba(255, 255, 255, 0.65);
    --panel-border: rgba(0, 0, 0, 0.08);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    
    /* Neon gradients & accents adapted for light backgrounds */
    --accent-purple: HSL(263, 85%, 55%);
    --accent-cyan: HSL(198, 85%, 45%);
    --accent-pink: HSL(328, 80%, 50%);
    --gradient-primary: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
    --gradient-hover: linear-gradient(135deg, HSL(263, 85%, 60%), HSL(198, 85%, 50%));
    
    --shadow-premium: 0 10px 30px -10px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.03);
}

/* Light Theme overrides for interactive components */
.light-theme input[type="text"],
.light-theme input[type="password"],
.light-theme input[type="email"],
.light-theme input[type="url"],
.light-theme select {
    background-color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.12);
    color: #0f172a;
}

.light-theme input[type="text"]:focus,
.light-theme input[type="password"]:focus,
.light-theme input[type="email"]:focus,
.light-theme input[type="url"]:focus,
.light-theme select:focus {
    background-color: #ffffff;
    border-color: var(--accent-purple);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.15);
}

.light-theme select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.light-theme .clicks-count-badge {
    background: rgba(0, 0, 0, 0.05);
    color: #0f172a;
}

.light-theme .advanced-header-btn {
    background: rgba(0, 0, 0, 0.03) !important;
    border-color: rgba(0, 0, 0, 0.05) !important;
    color: var(--text-secondary) !important;
}

.light-theme .advanced-body-fields {
    background: rgba(0, 0, 0, 0.02) !important;
    border-color: rgba(0, 0, 0, 0.05) !important;
}

.light-theme #logs-table-tab thead th,
.light-theme #logs-table thead th,
.light-theme #links-table thead th {
    background: rgba(0, 0, 0, 0.03);
    color: var(--text-secondary);
}

.light-theme tr {
    border-bottom-color: rgba(0, 0, 0, 0.05) !important;
}

.light-theme tr:hover {
    background: rgba(0, 0, 0, 0.02) !important;
}

.light-theme .btn-secondary {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
    border-color: rgba(0, 0, 0, 0.06);
}

.light-theme .btn-secondary:hover {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.08);
}

.light-theme .btn-icon {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.06);
    color: var(--text-secondary);
}

.light-theme .btn-icon:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}

.light-theme .quick-stats-bar {
    background: rgba(255, 255, 255, 0.5) !important;
    box-shadow: var(--shadow-premium) !important;
}

.light-theme .quick-stat-item div div {
    color: var(--text-secondary) !important;
}

.light-theme .card-val {
    color: #0f172a !important;
}

.light-theme .analytics-card {
    background: rgba(255, 255, 255, 0.7) !important;
}

.light-theme .chart-container {
    background: rgba(255, 255, 255, 0.7) !important;
    color: #0f172a !important;
}

.light-theme .chart-header {
    border-bottom-color: rgba(0, 0, 0, 0.08) !important;
    color: #0f172a !important;
}

.light-theme .pagination-container {
    background: rgba(255, 255, 255, 0.5) !important;
    border-color: rgba(0, 0, 0, 0.05) !important;
}

.light-theme .pagination-btn {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.06);
    color: var(--text-secondary);
}

.light-theme .pagination-btn:hover:not(:disabled) {
    background: rgba(0, 0, 0, 0.08);
    color: var(--text-primary);
}

.light-theme .pagination-btn.active {
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.2);
}

/* Light Theme Table & Typography Contrast Tweaks */
.light-theme .table-container {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: var(--shadow-premium) !important;
}

.light-theme thead th {
    background: rgba(0, 0, 0, 0.04) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
    color: var(--text-secondary) !important;
}

.light-theme tbody tr {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
}

.light-theme tbody tr:hover {
    background: rgba(0, 0, 0, 0.015) !important;
}

.light-theme tbody td {
    color: #1e293b !important;
}

.light-theme .text-muted {
    color: #475569 !important; /* Higher contrast text-muted */
}

.light-theme .log-route.route-a {
    background: rgba(147, 51, 234, 0.12) !important;
    color: #7c3aed !important;
    border: 1px solid rgba(147, 51, 234, 0.22) !important;
}

.light-theme .log-route.route-b {
    background: rgba(13, 148, 136, 0.12) !important;
    color: #0d9488 !important;
    border: 1px solid rgba(13, 148, 136, 0.22) !important;
}

.light-theme .link-slug-text {
    color: #7c3aed !important;
}

.light-theme .log-ip {
    color: #0284c7 !important;
}

.light-theme .link-url {
    color: #2563eb !important;
}

.light-theme .link-url:hover {
    color: #1d4ed8 !important;
    text-decoration: underline;
}



