/* 
 * Ads Tracking System - Main Stylesheet
 * Simple CSS without framework
 */

/* === Reset & Base === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* === Layout === */
.wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container-fluid {
    width: 100%;
    padding: 0 10px;
    max-width: 1400px;
    margin: 0 auto;
}

.dashboard-layout .container-fluid {
    max-width: 100%;
    overflow-x: hidden;
}

main.main-content > .container-fluid {
    padding: 20px;
}

/* === Header === */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

/* Header Navigation */
.header-nav {
    display: flex;
    gap: 5px;
    align-items: center;
}
.platform-badge {
    font-size: 12px !important;
    font-weight: normal !important;
}
/* === Glassmorphism Floating Buttons === */
.glass-btn {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgb(117 117 117 / 22%);
    border-radius: 20px;
    padding: 12px 20px;
    cursor: pointer;
    box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #1f2937;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.glass-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.glass-btn:active {
    transform: scale(0.95);
}

/* Fixed positioning for special floating buttons */
.glass-btn-fixed {
    position: fixed;
    z-index: 998;
    opacity: 1;
    transform: translateY(0);
}

.glass-btn-fixed.hidden {
    transform: translateY(100px);
    opacity: 0;
    pointer-events: none;
}

.glass-btn-fixed:hover {
    transform: translateY(0) scale(1.05);
}

.glass-btn-fixed:active {
    transform: translateY(0) scale(0.95);
}

/* Specific glass button variants */
.glass-btn-primary {
    background: rgba(102, 126, 234, 0.3);
    border-color: rgba(102, 126, 234, 0.5);
}

.glass-btn-primary:hover {
    background: rgba(102, 126, 234, 0.4);
    border-color: rgba(102, 126, 234, 0.6);
}

.glass-btn-success {
    background: rgba(16, 185, 129, 0.3);
    border-color: rgba(16, 185, 129, 0.5);
}

.glass-btn-success:hover {
    background: rgba(16, 185, 129, 0.4);
    border-color: rgba(16, 185, 129, 0.6);
}

/* Floating Auth Buttons */
.floating-auth-buttons {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 998;
    display: flex;
    flex-direction: row;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 95vw;
    justify-content: center;
}

.floating-auth-buttons.hidden {
    transform: translateX(-50%) translateY(100px);
    opacity: 0;
    pointer-events: none;
}

.floating-auth-buttons .glass-btn {
    white-space: nowrap;
    flex: 0 0 auto;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    top: 20px;
    left: 20px;
    padding: 10px 14px;
}

.mobile-menu-toggle span {
    display: block;
    width: 26px;
    height: 3px;
    background: #c0c0c0;
    margin: 5px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.mobile-menu-toggle.hidden {
    transform: translateY(-100px) !important;
}

/* Offcanvas Overlay */
.offcanvas-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s;
}

.offcanvas-overlay.active {
    display: block;
    opacity: 1;
}

/* Offcanvas Menu */
.header-nav.offcanvas {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    background: white;
    z-index: 1000;
    flex-direction: column;
    align-items: stretch;
    padding: 20px 20px 20px;
    overflow-y: auto;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    transition: right 0.3s ease;
}

.header-nav.offcanvas.active {
    right: 0;
}

.header-nav.offcanvas .nav-link {
    color: #1f2937;
    padding: 15px 20px;
    font-size: 1rem;
    opacity: 1;
    margin-bottom: 5px;
}

.header-nav.offcanvas .nav-link:hover {
    background: #f3f4f6;
    color: #667eea;
}

.header-nav.offcanvas .nav-link.active {
    background: #e5e7eb;
    color: #667eea;
}

/* User menu in offcanvas */
.header-nav.offcanvas .user-menu-dropdown {
    margin-left: 0 !important;
}

.header-nav.offcanvas .user-menu-toggle {
    width: 100%;
    justify-content: space-between;
    background: #f3f4f6 !important;
    color: #1f2937 !important;
}

.header-nav.offcanvas .dropdown-menu {
    position: static !important;
    display: block !important;
    box-shadow: none !important;
    margin-top: 10px !important;
    border: 1px solid #e5e7eb;
}

.nav-link {
    padding: 8px 16px;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    opacity: 0.9;
}

.nav-link:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.15);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.25);
    opacity: 1;
}

/* === Language Switcher === */
.language-switcher {
    display: inline-flex;
    align-items: center;
    margin-left: 15px;
}

.language-select {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 12px;
    padding-right: 30px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
    appearance: none;
    -webkit-appearance: none;
    -moz-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='white'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
}

.language-select:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.language-select:focus {
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
    outline: none;
}

.language-select option {
    background: #1a1a1a;
    color: white;
    padding: 8px;
}

.language-submit-btn {
    display: none; /* Hidden, only shown for noscript */
}

/* Mobile responsive for language switcher */
@media (max-width: 768px) {
    .language-switcher {
        margin: 10px 0;
        width: 100%;
        order: 3; /* Place after navigation */
    }
    
    .language-select {
        width: 100%;
    }
}

/* === Logo Styles === */
.logo {
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: white;
    transition: all 0.3s;
}

.logo-link:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.logo-icon {
    width: 50px;
    height: 50px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s;
}

.logo-link:hover .logo-icon {
    transform: scale(1.05) rotate(2deg);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo h1 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.logo .company {
    font-size: 11px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 2px;
}

.header-stats {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

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

.stat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 11px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 5px;
}

.stat-item.blocked .stat-value {
    color: #ff6b6b;
}

.stat-item.risk .stat-value {
    color: #ffd93d;
}

.stat-item.leads .stat-value {
    color: #6bcf7f;
}

/* === Main Content === */
.main-content {
    flex: 1;
    padding: 0;
}

/* === Filters Panel === */
.filters-panel {
    background: white;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.filters-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.filter-group {
    flex: 1;
    min-width: 150px;
}

.filter-input,
.filter-select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: #667eea;
}

.filter-actions {
    display: flex;
    gap: 10px;
}

/* === Buttons === */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #e0e0e0;
    color: #666;
}

.btn-secondary:hover {
    background: #d0d0d0;
}

.btn-action {
    padding: 6px 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-action:hover {
    background: #5568d3;
}

/* === Results Info === */
.results-info {
    margin-bottom: 15px;
    color: #666;
    font-size: 14px;
}

/* === Table === */
.table-container {
    background: white;
    border-radius: 8px;
    overflow: auto;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    max-height: 75vh;
}

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

.data-table thead {
    background: #f8f9fa;
}

.data-table th {
    padding: 15px 10px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
    border-bottom: 2px solid #e0e0e0;
}

.data-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.data-table tbody tr {
    transition: background 0.2s;
}

.data-table tbody tr:hover {
    background: #f8f9fa;
}

.data-table tbody tr.blocked-row {
    background: #fff5f5;
}

.data-table tbody tr.blocked-row:hover {
    background: #ffe8e8;
}

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

.ip-cell {
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

.fraud-score {
    font-weight: 600;
}

/* === Badges === */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-source {
    background: #e3f2fd;
    color: #1976d2;
}

.badge-paid_ads {
    background: #f3e5f5;
    color: #7b1fa2;
}

.badge-organic {
    background: #e8f5e9;
    color: #388e3c;
}

.badge-direct {
    background: #fff3e0;
    color: #f57c00;
}

.badge-referral {
    background: #e0f2f1;
    color: #00796b;
}

.badge-social {
    background: #fce4ec;
    color: #c2185b;
}

.badge-unknown {
    background: #f5f5f5;
    color: #757575;
}

.badge-risk-low {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-risk-medium {
    background: #fff3e0;
    color: #ef6c00;
}

.badge-risk-high {
    background: #ffebee;
    color: #c62828;
}

/* === Status Badges === */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.status-badge.active {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-badge.blocked {
    background: #ffebee;
    color: #c62828;
}

.status-badge.lead {
    background: #e3f2fd;
    color: #1565c0;
}

/* === Pagination === */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.page-link {
    padding: 8px 14px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.page-link:hover {
    background: #f8f9fa;
    border-color: #667eea;
}

.page-link.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

/* === Domain Switcher === */
.domain-switcher-container {
    margin-bottom: 25px;
}

.domain-switcher-card {
    display: flex;
    align-items: stretch;
    gap: 15px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    color: white;
}

.domain-switcher-card.admin-mode {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.domain-switcher-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    flex-shrink: 0;
}

.domain-switcher-icon.admin-icon {
    background: rgba(255, 255, 255, 0.3);
    animation: pulse-admin 2s infinite;
}

@keyframes pulse-admin {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(255, 255, 255, 0);
    }
}

.domain-switcher-icon svg {
    color: white;
}

.domain-switcher-content {
    flex: 1;
}

.domain-switcher-content label {
    display: block;
    margin: 0 0 6px 0;
    font-size: 12px;
    font-weight: 500;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.domain-switcher-content select {
    width: 100%;
    max-width: 400px;
    padding: 10px 15px;
    background: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.domain-switcher-content select:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.domain-switcher-content select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.domain-switcher-content select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Time Range Section */
.time-range-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 200px;
}

.time-range-section label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 6px 0;
}

.time-range-section select {
    width: 100%;
    padding: 10px 15px;
    background: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    margin-bottom: 6px;
}

.time-range-section select:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.time-range-section select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.time-range-section select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.time-range-display {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    white-space: nowrap;
}

/* CPC Section */
.domain-cpc-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 140px;
}

.domain-cpc-section label {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.domain-cpc-section input {
    color: #333;
    text-align: center;
}

.domain-cpc-section input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.domain-cpc-section input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.domain-cpc-section button:hover {
    background: rgba(255, 255, 255, 0.4) !important;
}

.domain-cpc-section button:active {
    transform: scale(0.95);
}

.domain-switcher-badge {
    width: 48px;
    height: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    flex-shrink: 0;
}

.domain-switcher-badge.admin-badge {
    background: rgba(255, 255, 255, 0.3);
}

.domain-switcher-badge span {
    font-size: 20px;
    font-weight: 700;
}

.domain-switcher-empty {
    padding: 40px 20px;
    text-align: center;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border: 2px dashed rgba(102, 126, 234, 0.3);
    border-radius: 12px;
    margin-bottom: 25px;
}

.domain-switcher-empty svg:first-child {
    color: #667eea;
    margin-bottom: 15px;
}

.domain-switcher-empty h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    color: #333;
}

.domain-switcher-empty p {
    margin: 0 0 20px 0;
    color: #666;
    font-size: 14px;
}

.domain-switcher-empty a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.domain-switcher-empty a:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* === Custom Date Picker Modal === */
#customDateModal.modal.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

#customDateModal .modal-content {
    max-width: 500px;
    padding: 30px;
    margin: 0;
}

#customDateModal h3 {
    margin: 0 0 20px 0;
    color: #667eea;
    font-size: 20px;
}

#customDateModal .date-picker-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

#customDateModal .date-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#customDateModal .date-input-wrapper label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

#customDateModal .date-input-wrapper input {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    font-family: inherit;
    cursor: pointer;
}

#customDateModal .date-input-wrapper input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#customDateModal .date-input-wrapper input::-webkit-calendar-picker-indicator {
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
}

#customDateModal .date-input-wrapper input::-webkit-calendar-picker-indicator:hover {
    background: rgba(102, 126, 234, 0.1);
}

#customDateModal .modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

#customDateModal .btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

#customDateModal .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

#customDateModal .btn-primary:hover {
    transform: translateY(-2px);
    border-radius: 6px !important;
}

.ui-datepicker td a:hover {
    background: #667eea !important;
    color: white !important;
}

.ui-datepicker-today a {
    background: rgba(102, 126, 234, 0.1) !important;
}

/* === Modal === */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    animation: fadeIn 0.3s;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #333;
}

/* === Animations === */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* === Responsive === */
@media (max-width: 768px) {
    /* Show mobile menu toggle, hide desktop nav */
    .mobile-menu-toggle {
        display: block;
    }
    
    .header-nav:not(.offcanvas) {
        display: none;
    }
    
    .header-content {
        flex-direction: row;
        justify-content: center;
        padding-left: 60px; /* Space for fixed menu button */
    }
    
    .header {
        position: relative;
    }
    
    /* Adjust floating auth buttons for mobile */
    .floating-auth-buttons {
        flex-direction: row;
        gap: 8px;
        bottom: 15px;
        max-width: 95vw;
    }
    
    .floating-auth-buttons .glass-btn {
        font-size: 0.95rem;
        padding: 10px 14px;
        flex: 1 1 auto;
        min-width: 0;
        justify-content: center;
    }
    
    
    .header-stats {
        justify-content: center;
        gap: 20px;
    }
    
    .filters-form {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-actions {
        width: 100%;
    }
    
    .filter-actions .btn {
        flex: 1;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .data-table {
        min-width: 900px;
    }
    
    .modal-content {
        width: 95%;
        padding: 20px;
    }
    
    .logo-icon {
        width: 40px;
        height: 40px;
    }
    
    .logo h1 {
        font-size: 18px;
    }
    
    .logo .company {
        font-size: 10px;
    }
    
    .footer-logo-icon {
        width: 50px;
        height: 50px;
    }
}

/* === Detail View in Modal === */
.detail-section {
    margin-bottom: 25px;
}

.detail-section h3 {
    font-size: 16px;
    color: #667eea;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
}

.detail-row {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

.detail-label {
    flex: 0 0 200px;
    font-weight: 600;
    color: #666;
    font-size: 14px;
}

.detail-value {
    flex: 1;
    color: #333;
    font-size: 14px;
}

.detail-value code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

/* === Footer === */
.footer {
    background: linear-gradient(135deg, #1a252f 0%, #2c3e50 100%);
    color: #ecf0f1;
    padding: 60px 0 0;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #667eea, #764ba2, transparent);
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 40px;
}

.footer-section h4 {
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid #667eea;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links a .link-icon {
    opacity: 0.7;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    color: #fff;
    transform: translateX(5px);
}

.footer-links a:hover .link-icon {
    opacity: 1;
}

.footer-description {
    color: #bdc3c7;
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 20px;
}

/* Footer Brand Section */
.footer-brand-section {
    padding-right: 20px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.footer-logo-icon {
    width: 70px;
    height: 70px;
    filter: drop-shadow(0 4px 12px rgba(102, 126, 234, 0.4));
    transition: all 0.3s ease;
}

.footer-logo:hover .footer-logo-icon {
    transform: scale(1.05) rotate(-3deg);
    filter: drop-shadow(0 6px 16px rgba(102, 126, 234, 0.6));
}

.footer-logo-text h4 {
    color: #fff;
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 5px 0;
    border: none;
    padding: 0;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-tagline {
    color: #95a5a6;
    font-size: 13px;
    margin: 0;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-brand-section .footer-description {
    text-align: left;
    max-width: 100%;
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 18px;
}

.social-link:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Company Info Section */
.footer-company-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 0;
    margin-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.company-details h5 {
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.company-details p {
    color: #95a5a6;
    font-size: 13px;
    margin: 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.company-details .info-icon {
    font-size: 16px;
}

.certification-badge {
    height: 69px;
    width: auto;
    opacity: 0.9;
    transition: opacity 0.3s;
}

.certification-badge:hover {
    opacity: 1;
}

.footer-bottom {
    background: rgba(0, 0, 0, 0.2);
    padding: 25px 0;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-bottom p {
    margin: 0;
    color: #95a5a6;
    font-size: 13px;
}

.copyright {
    flex: 1;
}

.footer-credits {
    text-align: center;
    flex: 1;
}

.footer-version {
    text-align: right;
    flex: 1;
}

.footer-brand {
    color: #667eea;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s;
}

.footer-brand:hover {
    color: #764ba2;
}

.footer-separator {
    margin: 0 8px;
    color: #667eea;
    font-weight: 300;
}

.footer-bottom a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 600;
}

.footer-bottom a:hover {
    color: #764ba2;
}

.badge-version {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

i[class^="icon-"] {
  font-style: normal;
}

/* Responsive Footer */
@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
    
    .footer-brand-section {
        grid-column: 1 / -1;
        text-align: center;
        padding-right: 0;
    }
    
    .footer-logo {
        justify-content: center;
    }
    
    .footer-brand-section .footer-description {
        text-align: center;
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-company-info {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .footer {
        padding: 40px 0 0;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 35px;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .footer-section h4 {
        font-size: 16px;
    }
    
    .footer-links a {
        justify-content: center;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
    
    .copyright,
    .footer-credits,
    .footer-version {
        text-align: center;
    }
    
    .company-details p {
        justify-content: center;
    }
}

.footer-bottom a:hover {
    color: #2980b9;
}

/* Dashboard Stats (Page Specific) */
.dashboard-stats {
    background: white;
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 25px;
}

.dashboard-stats .stat-item {
    text-align: center;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 8px;
    min-width: 150px;
}

.dashboard-stats .stat-value {
    display: block;
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
    color: #667eea;
}

.dashboard-stats .stat-label {
    display: block;
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 8px;
}

.dashboard-stats .stat-item.blocked .stat-value {
    color: #ff6b6b;
}

.dashboard-stats .stat-item.risk .stat-value {
    color: #ffd93d;
}

.dashboard-stats .stat-item.leads .stat-value {
    color: #6bcf7f;
}

/* Gradient card for special stats (cost savings, etc.) */
.dashboard-stats .stat-item.gradient-card {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
}

.dashboard-stats .stat-item.gradient-card .stat-value {
    color: white !important;
}

.dashboard-stats .stat-item.gradient-card .stat-label {
    color: rgba(255, 255, 255, 0.9) !important;
}

.dashboard-stats .stat-item.gradient-card span:not(.stat-value):not(.stat-label) {
    color: rgba(255, 255, 255, 0.8) !important;
}

.column-selector .column-options {
    max-height: 60vh;
    overflow-y: scroll;
}

/* Filter Row 2 - Force single row layout */
.filter-row-2 {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    margin-top: 10px !important;
    align-items: center !important;
}

.filter-row-2 select.filter-select {
    flex: 0 0 auto !important;
    min-width: 180px !important;
    max-width: 200px !important;
}

#customDateRange {
    display: flex;
    gap: 10px;
}

#customDateRange input {
    flex: 0 0 auto;
    width: 150px !important;
}

/* === Dashboard Layout with Sidebar === */
.dashboard-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 30px;
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* Sidebar Styles */
.analytics-sidebar {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    height: fit-content;
    position: sticky;
    top: 0px;
    transition: transform 0.3s ease;
}

/* Mobile Sidebar Toggle Button */
.sidebar-toggle {
    display: none;
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 997;
    background: linear-gradient(135deg, #c92f15 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 
        0 4px 12px rgba(102, 126, 234, 0.4),
        0 0 0 0 rgba(102, 126, 234, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: sidebar-pulse 2s infinite;
}

/* Pulsing glow animation */
@keyframes sidebar-pulse {
    0% {
        box-shadow: 
            0 4px 12px rgba(102, 126, 234, 0.4),
            0 0 0 0 rgba(102, 126, 234, 0.7);
    }
    50% {
        box-shadow: 
            0 4px 12px rgba(102, 126, 234, 0.4),
            0 0 0 8px rgba(102, 126, 234, 0);
    }
    100% {
        box-shadow: 
            0 4px 12px rgba(102, 126, 234, 0.4),
            0 0 0 0 rgba(102, 126, 234, 0);
    }
}

/* Adjust position when floating auth buttons are visible */
body:not(.logged-in) .sidebar-toggle {
    bottom: 140px;
}

.sidebar-toggle:hover {
    transform: scale(1.1);
    box-shadow: 
        0 6px 16px rgba(102, 126, 234, 0.5),
        0 0 20px rgba(102, 126, 234, 0.6);
    animation: none;
}

.sidebar-toggle:active {
    transform: scale(0.95);
}

/* Sidebar Overlay for Mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

.sidebar-nav {
    padding: 0;
}

.nav-group {
    margin-bottom: 30px;
}

.nav-group-title {
    padding: 10px 15px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    color: #754fa7;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #eee;
    border-radius: 20px;
}

.nav-group-title i {
    font-size: 14px;
}

.nav-items {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin: 2px 0;
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 5px 10px;
    color: #374151;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 13px;
}

.nav-item a:hover {
    background: #f3f4f6;
    color: #667eea;
}

.nav-item.active a {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-weight: 500;
}

.nav-item a i {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

/* Collapsible Navigation Item with Submenu */
.nav-item-collapsible {
    position: relative;
}

.nav-item-collapsible > a.nav-link-main {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 35px; /* Space for toggle button */
}

.nav-toggle {
    position: absolute;
    right: 8px;
    top: 3px;
    background: #00000059;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #ffffff;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.nav-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #667eea;
}

.nav-toggle svg {
    transition: transform 0.2s ease;
}

.nav-item-collapsible.submenu-open .nav-toggle svg,
.nav-submenu.expanded + .nav-toggle svg {
    transform: rotate(180deg);
}

/* Submenu Styles */
.nav-submenu {
    list-style: none;
    margin: 0;
    padding: 0;
    padding-left: 10px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

.nav-submenu.expanded {
    max-height: 500px; /* Adjust based on number of items */
    opacity: 1;
    margin-top: 4px;
    margin-bottom: 4px;
}

.nav-submenu .nav-item {
    margin: 2px 0;
}

.nav-submenu .nav-item a {
    padding: 8px 12px;
    font-size: 12px;
    color: #6b7280;
    border-left: 2px solid transparent;
    transition: all 0.2s ease;
    background: #efefef57;
}

.nav-submenu .nav-item a:hover {
    background: #f9fafb;
    color: #667eea;
    border-left-color: #667eea;
}

.nav-submenu .nav-item.active a {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    color: #667eea;
    border-left-color: #667eea;
    font-weight: 500;
}

/* Lucide Icons Styling */
[data-lucide] {
    display: inline-block;
    vertical-align: middle;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

/* Icon in navigation items */
.nav-item a [data-lucide],
.nav-group-title [data-lucide] {
    margin-right: 8px;
    flex-shrink: 0;
}

/* Icon in buttons */
.btn [data-lucide] {
    margin-right: 6px;
    vertical-align: middle;
}

/* Icon in stat cards */
.stat-icon [data-lucide] {
    color: #667eea;
}

/* Icon sizing utilities */
[data-lucide].icon-sm { width: 16px; height: 16px; }
[data-lucide].icon-md { width: 20px; height: 20px; }
[data-lucide].icon-lg { width: 24px; height: 24px; }
[data-lucide].icon-xl { width: 32px; height: 32px; }

/* Conversion type icons */
.conversion-icon {
    color: #667eea;
}

/* Main content area with sidebar */
.main-content.with-sidebar {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    min-height: 400px;
    overflow-x: auto;
    max-width: 100%;
}

/* Scrollbar styling for sidebar */
.analytics-sidebar::-webkit-scrollbar {
    width: 6px;
}

.analytics-sidebar::-webkit-scrollbar-track {
    background: #f9fafb;
}

.analytics-sidebar::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.analytics-sidebar::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}
.user-menu-toggle:hover {
    background: rgba(255,255,255,0.2);
}
.dropdown-menu a:hover {
    background: #f8f9fa;
}
/* Mobile responsive for dashboard layout */
@media (max-width: 768px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
        padding: 10px;
        gap: 0;
    }
    
    /* Transform sidebar to offcanvas on mobile */
    .analytics-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 85%;
        max-width: 320px;
        height: 100vh;
        z-index: 999;
        border-radius: 0;
        padding: 20px 20px 20px;
        overflow-y: auto;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
        transition: left 0.3s ease;
        -webkit-overflow-scrolling: touch;
    }
    
    .analytics-sidebar.active {
        left: 0;
    }
    
    /* Show sidebar toggle button on mobile */
    .sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Adjust main content padding on mobile */
    .main-content.with-sidebar {
        padding: 20px 10px;
        margin: 0;
    }
    
    /* Larger nav items for touch on mobile */
    .nav-item a {
        padding: 14px 15px;
        font-size: 15px;
        gap: 14px;
    }
    
    .nav-item a i {
        font-size: 20px;
    }
    
    .nav-group-title {
        padding: 12px 15px;
        font-size: 13px;
    }
    
    .nav-group {
        margin-bottom: 25px;
    }
    
    /* Submenu on mobile */
    .nav-submenu {
        padding-left: 36px;
    }
    
    .nav-submenu .nav-item a {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    .nav-toggle {
        right: 10px;
        padding: 6px;
    }
    
    /* Better spacing for charts on mobile */
    .charts-section .content-card {
        margin-bottom: 20px;
    }
    
    /* Ensure stats cards stack nicely */
    .stats-grid {
        gap: 15px;
    }
}
/* === Charts Section - Universal Styles === */
.charts-section {
    margin-bottom: 30px;
    padding: 40px 20px;
}

.charts-grid {
    display: grid;
    gap: 30px;
}

/* Grid Layout Options */
.charts-grid-1col {
    grid-template-columns: 1fr;
}

.charts-grid-2col {
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
}

.charts-grid-auto {
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
}

/* Full-width chart container */
.chart-full-width {
    grid-column: 1 / -1;
}

/* Chart Card Styles */
.chart-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease;
}

.chart-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.chart-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.chart-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.chart-card-subtitle {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 5px 0 0 0;
}

.chart-card-body {
    position: relative;
    min-height: 300px;
}

.charts-section canvas {
    width: 100% !important;
    height: auto !important;
    max-height: 500px;
}

/* Chart Loading State */
.chart-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    color: #9ca3af;
    font-size: 0.9rem;
}

/* Chart Error State */
.chart-error {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    color: #ef4444;
    font-size: 0.9rem;
}

/* Mobile Responsive Charts */
@media (max-width: 768px) {
    .charts-section {
        padding: 20px 10px;
    }
    
    .charts-grid,
    .charts-grid-1col,
    .charts-grid-2col,
    .charts-grid-auto {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    
    .chart-card {
        padding: 15px;
        overflow-x: auto;
        max-width: 100%;
    }
    
    .chart-card-body {
        min-height: 250px;
        max-width: 100%;
        overflow-x: auto;
    }
    
    .charts-section canvas {
        min-height: 250px;
        max-width: 100%;
    }
    
    .chart-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    /* Force full width on mobile */
    .chart-full-width {
        grid-column: 1 / -1 !important;
    }
}
        
/* Spinner for loading */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* === Responsive Domain Switcher === */
@media (max-width: 768px) {
    .domain-switcher-card {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .domain-switcher-content select {
        max-width: 100%;
    }
    
    .time-range-section {
        width: 100%;
        align-items: center;
    }
    
    .time-range-section select {
        max-width: 100%;
    }
    
    .domain-cpc-section {
        width: 100%;
        align-items: center;
    }
    
    .domain-cpc-section > div {
        width: 100%;
        max-width: 200px;
    }
}

/* === Conversions Overview Page Styles === */

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    font-size: 36px;
    line-height: 1;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.2;
}

.stat-label {
    font-size: 13px;
    color: #6b7280;
    margin-top: 4px;
    font-weight: 500;
}

/* Conversion Type List */
.type-list {
    display: grid;
    gap: 12px;
    margin-top: 20px;
}

.type-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 18px;
    background: #f9fafb;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    transition: all 0.3s;
    cursor: default;
}

.type-item:hover {
    background: #f3f4f6;
    border-left-color: #764ba2;
}

.type-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.type-info .type-icon {
    font-size: 20px;
}

.type-info .type-name {
    font-weight: 600;
    color: #374151;
}

.type-value {
    font-size: 20px;
    font-weight: 700;
    color: #667eea;
}

/* Customer Info Display */
.customer-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    line-height: 1.4;
}

.info-item strong {
    color: #6b7280;
    font-weight: 600;
    min-width: 70px;
}

.contact-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.contact-link:hover {
    color: #5568d3;
    text-decoration: underline;
}

.message-preview {
    color: #4b5563;
    font-style: italic;
    max-width: 250px;
    word-break: break-word;
}

/* Date/Time Cell */
.datetime-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.datetime-cell .date {
    font-weight: 600;
    color: #1f2937;
}

.datetime-cell .time {
    font-size: 12px;
    color: #9ca3af;
}

/* Conversion Type Badges */
.badge-conversion {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

/* Domain Badge */
.domain-badge {
    display: inline-block;
    background: #e0e7ff;
    color: #4338ca;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

/* Value Highlight */
.value-highlight {
    color: #10b981;
    font-weight: 700;
    font-size: 15px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
}

.empty-state .empty-icon {
    font-size: 64px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 16px;
    font-weight: 500;
}

/* Detail Modal */
.detail-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s;
}

.detail-modal-content {
    background: white;
    border-radius: 16px;
    padding: 30px;
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: #dc2626;
    transform: rotate(90deg);
}

.detail-section {
    margin-bottom: 25px;
}

.detail-section h4 {
    color: #374151;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e7eb;
}

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

.detail-table td {
    padding: 10px;
    border-bottom: 1px solid #f3f4f6;
}

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

.detail-table td:first-child {
    width: 35%;
    vertical-align: top;
}

.detail-table a {
    color: #667eea;
    text-decoration: none;
    word-break: break-all;
}

.detail-table a:hover {
    text-decoration: underline;
}

.json-display {
    background: #1f2937;
    color: #10b981;
    padding: 15px;
    border-radius: 8px;
    font-size: 12px;
    font-family: 'Courier New', monospace;
    overflow-x: auto;
    line-height: 1.6;
}

/* Responsive adjustments for conversions page */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-icon {
        font-size: 28px;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .type-item {
        padding: 12px;
    }
    
    .customer-info {
        font-size: 12px;
    }
    
    .info-item strong {
        min-width: 60px;
    }
    
    .message-preview {
        max-width: 200px;
    }
    
    .detail-modal-content {
        padding: 20px;
        width: 95%;
    }
    
    .detail-table td {
        display: block;
        width: 100% !important;
        padding: 8px 0;
    }
    
    .detail-table td:first-child {
        font-weight: 600;
        padding-bottom: 4px;
    }
    
    .detail-table tr {
        padding: 10px 0;
        border-bottom: 1px solid #f3f4f6;
    }
}

/* === Blocked IPs V2 - 20-80 Layout === */
.blocked-ips-layout {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.filters-sidebar {
    width: 20%;
    min-width: 250px;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.content-area {
    width: 80%;
    flex: 1;
}

.filter-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.filter-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.filter-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    padding: 8px 0;
    cursor: pointer;
}

.filter-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
}

.filter-checkbox label {
    flex: 1;
    cursor: pointer;
    font-size: 13px;
    color: #4b5563;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-count {
    background: #e5e7eb;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
}


.filter-actions button {
    flex: 1;
    padding: 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.btn-apply-filter {
    background: #667eea;
    color: white;
    border: none;
}

.btn-apply-filter:hover {
    background: #5568d3;
}

.btn-clear-filter {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.btn-clear-filter:hover {
    background: #e5e7eb;
}

/* Export Modal for blocked-ips - Fullscreen Sidebar Layout */
.export-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.export-modal.active {
    display: flex;
}

.export-modal-fullscreen {
    background: white;
    width: 95%;
    height: 95vh;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Modal Header */
.export-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 2px solid #e0e0e0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.export-modal-header h2 {
    margin: 0;
    color: white;
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.export-close {
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    padding: 8px;
    line-height: 1;
    transition: all 0.3s;
}

.export-close:hover {
    background: rgba(255,255,255,0.3);
}

/* Modal Body: Sidebar + Content */
.export-modal-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Left Sidebar */
.export-sidebar {
    width: 280px;
    background: #f8f9fa;
    border-right: 2px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.export-sidebar-title {
    padding: 15px 20px;
    font-weight: 700;
    color: #667eea;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Vertical Campaign Tabs */
.campaign-tabs-vertical {
    display: flex;
    flex-direction: column;
    padding: 10px;
    gap: 8px;
}

.campaign-tab-vertical {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
}

.campaign-tab-vertical:hover {
    border-color: #667eea;
    background: #f0f4ff;
    transform: translateX(3px);
}

.campaign-tab-vertical.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
    box-shadow: 0 4px 12px rgba(102,126,234,0.3);
}

.campaign-tab-vertical .tab-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(102,126,234,0.1);
    border-radius: 8px;
}

.campaign-tab-vertical.active .tab-icon {
    background: rgba(255,255,255,0.2);
}

.campaign-tab-vertical .tab-info {
    flex: 1;
    min-width: 0;
}

.campaign-tab-vertical .tab-name {
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.campaign-tab-vertical .tab-provider {
    font-size: 11px;
    opacity: 0.7;
    text-transform: capitalize;
}

.campaign-tab-vertical.active .tab-provider {
    opacity: 0.9;
}

.campaign-tab-vertical .tab-count {
    font-size: 12px;
    font-weight: 700;
    margin-top: 4px;
    opacity: 0.8;
}

.campaign-tab-vertical.active .tab-count {
    opacity: 1;
}

/* Right Content Area */
.export-content {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.export-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.export-summary-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

.export-summary-item:last-child {
    border-bottom: none;
}

.export-summary-label {
    color: #666;
    font-weight: 500;
}

.export-summary-value {
    color: #333;
    font-weight: 600;
}

.campaign-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #667eea;
}

.campaign-info-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 13px;
}

.campaign-info-label {
    color: #666;
    font-weight: 500;
}

.campaign-info-value {
    color: #333;
    font-weight: 700;
}

.export-ips-container {
    margin: 20px 0;
}

.export-ips-textarea {
    width: 100%;
    height: 300px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: "Courier New", monospace;
    font-size: 13px;
    resize: vertical;
    box-sizing: border-box;
}

.export-ips-textarea:focus {
    outline: none;
    border-color: #667eea;
}

.export-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

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

/* Modal Footer */
.export-modal-footer {
    padding: 15px 30px;
    background: #f8f9fa;
    border-top: 2px solid #e0e0e0;
}

.export-tips {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #666;
}

.export-tips svg {
    color: #ffc107;
}

.export-tips a {
    color: #667eea;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}

.export-tips a:hover {
    text-decoration: underline;
}

/* Responsive for blocked-ips */
@media (max-width: 1200px) {
    .blocked-ips-layout {
        flex-direction: column;
    }
    .filters-sidebar {
        width: 100%;
        position: relative;
        top: 0;
    }
    .content-area {
        width: 100%;
    }
    .export-modal-fullscreen {
        width: 100%;
        height: 100vh;
        border-radius: 0;
    }
    .export-modal-body {
        flex-direction: column;
    }
    .export-sidebar {
        width: 100%;
        max-height: 200px;
        border-right: none;
        border-bottom: 2px solid #e0e0e0;
    }
    .campaign-tabs-vertical {
        flex-direction: row;
        overflow-x: auto;
        padding: 10px;
    }
    .campaign-tab-vertical {
        min-width: 200px;
    }
}

/* === Dashboard Welcome Section === */
.dashboard-welcome-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 20px;
    margin-bottom: 30px;
}

.welcome-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
}

.welcome-banner-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
}

.welcome-left-section {
    flex: 1;
    min-width: 300px;
}

.welcome-right-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-shrink: 0;
    align-items: flex-end;
}

.pending-payment-card {
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 12px;
    padding: 16px;
    min-width: 280px;
    max-width: 320px;
    backdrop-filter: blur(10px);
}

.pending-payment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.pending-payment-title {
    color: white;
    font-size: 0.95rem;
    margin: 0;
    font-weight: 600;
}

.pending-payment-body {
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
}

.pending-payment-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.pending-payment-label {
    color: rgba(255,255,255,0.85);
    font-size: 0.85rem;
}

.pending-payment-value {
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
}

.pending-payment-amount {
    font-size: 0.9rem;
}

.pending-payment-divider {
    padding-top: 6px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.pending-payment-footer {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.pending-payment-date {
    color: rgba(255,255,255,0.85);
    font-size: 0.8rem;
}

.pending-payment-btn {
    display: block;
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: #000;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    text-align: center;
    font-size: 0.85rem;
    box-shadow: 0 2px 8px rgba(255,193,7,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.pending-payment-btn:hover {
    background: linear-gradient(135deg, #ffcd38 0%, #ffa726 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255,193,7,0.5);
}

.discount-badge {
    background: #28a745;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.welcome-title {
    margin: 0 0 8px 0;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.welcome-info {
    margin: 0;
    opacity: 0.9;
    font-size: 1rem;
}

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

.welcome-action-btn {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    font-size: 0.9rem;
    border: 1px solid rgba(255,255,255,0.3);
}

.welcome-action-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

.welcome-action-btn.primary {
    background: white;
    color: #667eea;
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.welcome-action-btn.primary:hover {
    background: #f8f9fa;
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

/* === Badge Styles === */
.badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-warning {
    background: rgba(255,193,7,0.75);
    color: #856404;
}

.badge-pending {
    background: rgba(255,193,7,0.75);
    color: #856404;
}

.badge-success {
    background: rgba(40,167,69,0.75);
    color: #155724;
}

.badge-danger {
    background: rgba(220,53,69,0.75);
    color: #721c24;
}

/* === Integrations Widget === */
.integrations-widget {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.integrations-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.integrations-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.view-all-link {
    color: #1967d2;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.view-all-link:hover {
    text-decoration: underline;
}

.integrations-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* === Provider Card === */
.provider-card {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    transition: all 0.3s;
}

.provider-card.connected {
    border-color: #34a853;
}

.provider-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.provider-icon {
    width: 32px;
    height: 32px;
}

.provider-info {
    flex: 1;
    min-width: 0;
}

.provider-name {
    margin: 0 0 2px 0;
    font-size: 14px;
    color: #333;
}

.provider-status {
    font-size: 11px;
    color: #5f6368;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.provider-status.connected {
    color: #34a853;
    font-weight: 600;
}

.provider-stats {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    font-size: 11px;
    color: #5f6368;
}

.provider-stats strong {
    color: #333;
}

.provider-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.provider-btn {
    flex: 1;
    text-align: center;
    padding: 6px 12px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.2s;
}

.provider-btn-primary {
    background: #1967d2;
    color: white;
}

.provider-btn-primary:hover {
    background: #1557b0;
}

.provider-btn-secondary {
    background: white;
    color: #1967d2;
    border: 1px solid #1967d2;
}

.provider-btn-secondary:hover {
    background: #f0f7ff;
}

.provider-btn-connect {
    display: block;
    margin-top: 8px;
    padding: 8px;
    background: #1967d2;
    color: white;
}

.provider-btn-connect:hover {
    background: #1557b0;
}

/* === Column Selector === */
.column-selector {
    position: fixed;
    top: 100px;
    right: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 15px;
    width: 250px;
    display: none;
    z-index: 1000;
}

.column-selector.active {
    display: block;
}

.column-selector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
}

.column-option {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.column-option:last-child {
    border-bottom: none;
}

.column-option label {
    cursor: pointer;
    margin-left: 8px;
    flex: 1;
}

/* === Table Sorting === */
.sortable-header {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 20px !important;
}

.sortable-header:hover {
    background: rgba(102, 126, 234, 0.1);
}

.sort-icon {
    position: absolute;
    right: 8px;
    font-size: 10px;
    color: #999;
}

.sort-icon.active {
    color: #667eea;
}

/* === IP Tracking === */
.ip-frequency {
    font-size: 11px;
    color: #666;
    display: block;
}

.ip-frequency.high {
    color: #dc3545;
    font-weight: 600;
}

.domain-badge {
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    display: inline-block;
}

/* === Filter Enhancements === */
.filter-row-2 {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    margin-top: 10px !important;
    align-items: center !important;
}

.filter-select-compact {
    flex: 0 0 auto !important;
    min-width: 180px !important;
    max-width: 200px !important;
}

.btn-columns {
    background: #6c757d;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-columns:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.btn-mass-toggle {
    background: #6c757d;
    color: white;
    padding: 10px 15px;
}

.dropdown-menu {
    animation: fadeIn 0.2s;
}

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

#customDateRange {
    display: flex;
    gap: 10px;
}

#customDateRange input {
    flex: 0 0 auto;
    width: 150px !important;
}

/* === Alert Components === */
.alert-pending-payment {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.alert-content {
    display: flex;
    align-items: start;
    gap: 15px;
}

.alert-icon {
    color: #856404;
}

.alert-body {
    flex: 1;
}

.alert-title {
    margin: 0 0 10px 0;
    color: #856404;
    font-size: 1.2rem;
}

.alert-info {
    margin: 0 0 10px 0;
    color: #856404;
}

.alert-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-warning {
    background: #ffc107;
    color: #000;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-warning:hover {
    background: #e0a800;
}

.btn-success {
    background: #28a745;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: #dc3545;
    color: white;
    padding: 10px 15px;
    border-radius: 6px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger:hover {
    background: #c82333;
}

/* === Compact Filter Layout === */
.filter-row-main {
    display: flex;
    align-items: stretch;
    gap: 10px;
    flex-wrap: nowrap;
}

.filter-group-search {
    flex: 1;
    min-width: 250px;
}

.filter-group-search .filter-input {
    width: 100%;
    height: 42px;
}

.filter-group {
    display: flex;
    align-items: center;
}

.filter-group .filter-select {
    height: 42px;
    min-width: 180px;
}

.filter-actions {
    display: flex;
    align-items: stretch;
    gap: 8px;
    flex-wrap: nowrap;
}

/* Balance all buttons to same height as inputs */
.btn-advanced-toggle,
.btn-primary,
.btn-secondary,
.btn-columns,
.btn-mass-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-advanced-toggle {
    background: #f8f9fa;
    color: #495057;
    border-color: #dee2e6;
}

.btn-advanced-toggle:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.btn-advanced-toggle.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.btn-advanced-toggle .toggle-indicator {
    font-size: 10px;
    margin-left: 4px;
    transition: transform 0.2s;
}

.btn-primary {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.btn-primary:hover {
    background: #5568d3;
    border-color: #5568d3;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border-color: #6c757d;
    text-decoration: none;
}

.btn-secondary:hover {
    background: #5a6268;
    border-color: #545b62;
}

.btn-columns {
    background: #6c757d;
    color: white;
    border-color: #6c757d;
}

.btn-columns:hover {
    background: #5a6268;
    border-color: #545b62;
}

.btn-mass-toggle {
    background: #6c757d;
    color: white;
    border-color: #6c757d;
}

.btn-mass-toggle:hover {
    background: #5a6268;
    border-color: #545b62;
}

.advanced-filters {
    margin-top: 12px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    animation: slideDown 0.3s ease-out;
}

.advanced-filters-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.filter-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

/* === Mass Action Bar === */
.mass-action-bar {
    display: none;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    border: 2px solid #667eea;
}

.mass-action-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.mass-action-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.mass-action-count {
    font-weight: 600;
    color: #667eea;
}

.mass-action-buttons {
    display: flex;
    gap: 10px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

/* === Animations === */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* === Responsive Dashboard === */
@media (max-width: 1400px) {
    .advanced-filters-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1200px) {
    .filter-row-main {
        flex-wrap: wrap;
    }
    
    .filter-actions {
        flex-wrap: wrap;
    }
    
    .advanced-filters-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .dashboard-welcome-grid {
        grid-template-columns: 1fr;
    }
    
    .integrations-widget {
        max-width: 600px;
    }
}

@media (max-width: 768px) {
    .filter-row-main {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group-search {
        width: 100%;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-group .filter-select {
        width: 100%;
    }
    
    .filter-actions {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .btn-advanced-toggle,
    .btn-primary,
    .btn-secondary,
    .btn-columns,
    .btn-mass-toggle {
        flex: 1;
        min-width: 120px;
    }
    
    .advanced-filters-grid {
        grid-template-columns: 1fr;
    }
    
    .mass-action-content {
        flex-direction: column;
        align-items: stretch;
    }
    
    .mass-action-info,
    .mass-action-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .mass-action-buttons {
        flex-direction: column;
    }
    
    .mass-action-buttons .btn {
        width: 100%;
    }
    
    /* Welcome Banner Mobile */
    .welcome-banner-content {
        flex-direction: column;
    }
    
    .welcome-left-section {
        min-width: 100%;
    }
    
    .welcome-right-section {
        width: 100%;
        align-items: stretch;
    }
    
    .pending-payment-card {
        max-width: 100%;
    }
    
    .welcome-actions {
        width: 100%;
    }
    
    .welcome-action-btn {
        flex: 1;
    }
}

/* === Icon Glow Effects === */
.icon-glow {
    display: inline-block;
    filter: drop-shadow(0 0 8px currentColor);
    animation: iconPulse 2s ease-in-out infinite;
}

/* Glow Intensities */
.icon-glow-light {
    filter: drop-shadow(0 0 4px currentColor);
}

.icon-glow-medium {
    filter: drop-shadow(0 0 8px currentColor) drop-shadow(0 0 12px currentColor);
}

.icon-glow-strong {
    filter: drop-shadow(0 0 12px currentColor) drop-shadow(0 0 20px currentColor) drop-shadow(0 0 28px currentColor);
}

/* Custom glow color */
.icon-glow-custom {
    filter: drop-shadow(0 0 8px var(--glow-color)) drop-shadow(0 0 12px var(--glow-color));
}

.icon-glow-custom.icon-glow-light {
    filter: drop-shadow(0 0 4px var(--glow-color));
}

.icon-glow-custom.icon-glow-strong {
    filter: drop-shadow(0 0 12px var(--glow-color)) drop-shadow(0 0 20px var(--glow-color)) drop-shadow(0 0 28px var(--glow-color));
}

/* Pulse Animation */
@keyframes iconPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.85;
        transform: scale(1.05);
    }
}

/* Hover enhancement */
.icon-glow:hover {
    animation: iconPulse 1s ease-in-out infinite;
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

/* === Domain Management === */
.domains-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.domains-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.quota-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.quota-badge.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
}

.btn-add-domain {
    padding: 12px 24px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-add-domain:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.3);
}

.btn-add-domain:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    transform: none;
}

.domains-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.domain-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s;
}

.domain-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.domain-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.domain-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1f2937;
    word-break: break-all;
    display: flex;
    align-items: center;
    gap: 8px;
}

.domain-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.status-verified {
    background: #d1fae5;
    color: #065f46;
}

.status-unverified {
    background: #fef3c7;
    color: #92400e;
}

.domain-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 15px 0;
}

.domain-stat-item {
    text-align: center;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
}

.domain-stat-item.domain-stat-savings {
    background: #f0fdf4;
    border: 1px solid #86efac;
}

.domain-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
}

.domain-stat-item.domain-stat-savings .domain-stat-value {
    color: #16a34a;
}

.domain-stat-label {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.domain-stat-item.domain-stat-savings .domain-stat-label {
    color: #16a34a;
}

.domain-meta {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

.domain-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-small {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-delete {
    background: #fee;
    color: #c00;
}

.btn-delete:hover {
    background: #fcc;
}

.btn-verify {
    background: #efe;
    color: #0a0;
}

.btn-verify:hover {
    background: #cfc;
}

.cpc-input-wrapper {
    margin-top: 15px;
    padding: 12px;
    background: #fef3c7;
    border-radius: 8px;
    border: 1px solid #fbbf24;
}

.cpc-input-wrapper label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #92400e;
    margin-bottom: 8px;
}

.cpc-input-wrapper .cpc-input-row {
    display: flex;
    gap: 8px;
}

.cpc-input {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #fbbf24;
    border-radius: 6px;
    font-size: 0.9rem;
}

.cpc-input:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.btn-update-cpc {
    padding: 8px 16px;
    background: #f59e0b;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: all 0.3s;
}

.btn-update-cpc:hover {
    background: #d97706;
    transform: translateY(-1px);
}

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

.cpc-input-wrapper small {
    display: block;
    margin-top: 6px;
    color: #92400e;
    font-size: 0.75rem;
}

.add-domain-form {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
}

.add-domain-form.quota-warning {
    background: #fef3c7;
    border-color: #f59e0b;
}

.add-domain-form.quota-warning p {
    color: #92400e;
    margin: 0;
    font-weight: 600;
}

@media (max-width: 768px) {
    .domains-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .domains-grid {
        grid-template-columns: 1fr;
    }
    
    .domain-stats {
        grid-template-columns: 1fr;
    }
}
small {
    font-size: 0.75rem;
}

/* === Toggle Switch Styles === */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #10b981;
}

.toggle-switch input:focus + .toggle-slider {
    box-shadow: 0 0 1px #10b981;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.toggle-switch input:disabled + .toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Note icon tooltip */
.note-icon {
    display: inline-block;
    font-size: 14px;
    vertical-align: middle;
}

/* Export Modal - Summary Section */
.export-summary {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 12px;
}

.export-summary-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.export-summary-stats {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.export-summary-total {
    font-weight: 600;
    color: #111827;
}

.export-summary-total .label {
    color: #6b7280;
    font-size: 13px;
}

.export-summary-total .count {
    color: #2563eb;
    font-size: 16px;
    margin-left: 6px;
}

.export-summary-total .unit {
    color: #6b7280;
    font-size: 13px;
    margin-left: 2px;
}

.export-summary-cidr {
    display: none;
    font-size: 12px;
    color: #6b7280;
}

.export-summary-cidr.active {
    display: block;
}

.export-summary-cidr .arrow {
    color: #059669;
    font-weight: 500;
}

.export-summary-cidr .count {
    margin-left: 4px;
}

.export-summary-meta {
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.export-summary-meta svg {
    width: 12px;
    height: 12px;
}

.export-summary-meta span {
    margin-left: 4px;
}

.export-summary-time {
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
}

.export-summary-time svg {
    width: 12px;
    height: 12px;
}

.export-summary-time span {
    margin-left: 4px;
}

/* Export IPs Container Header */
.export-ips-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.export-ips-label {
    font-size: 13px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 4px;
}

.export-ips-label svg {
    width: 14px;
    height: 14px;
}

/* Responsive Export Modal */
@media (max-width: 768px) {
    .export-summary-wrapper {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }
    
    .export-summary-stats {
        width: 100%;
        justify-content: flex-start !important;
        gap: 12px !important;
    }
    
    .export-summary-meta {
        max-width: 100% !important;
    }
}

@media (max-width: 480px) {
    .export-summary {
        padding: 10px 12px !important;
    }
    
    .export-summary-stats {
        flex-direction: column !important;
        gap: 6px !important;
    }
    
    .export-summary-total .count {
        font-size: 15px !important;
    }
}
