/* ========================================
   MODERN CONNECTIONS DASHBOARD - COMPLETE
   Geoptimaliseerde basis + Alle ontbrekende functionaliteit
   ======================================== */

/* ========================================
   CSS VARIABLES & RESET
   ======================================== */
:root {
    /* Gradients */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --warning-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --dark-gradient: linear-gradient(180deg, #0f0f23 0%, #1a1a3e 100%);
    
    /* Colors */
    --dark-bg: #0a0a1b;
    --card-bg: rgba(16, 18, 40, 0.9);
    --card-hover: rgba(20, 23, 50, 0.95);
    --border-color: rgba(102, 126, 234, 0.15);
    --border-hover: rgba(102, 126, 234, 0.3);
    --text-primary: #ffffff;
    --text-secondary: #a8b2d1;
    --text-muted: #64748b;
    --accent: #667eea;
    --accent-light: #818cf8;
    
    /* Status Colors */
    --status-connected: #10b981;
    --status-disconnected: #ef4444;
    --status-pending: #f59e0b;
    --status-inactive: #6b7280;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 12px 48px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 10px rgba(102, 126, 234, 0.15);
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
}

body {
    background: var(--dark-bg);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* ========================================
   BASE COMPONENT SYSTEM
   ======================================== */

/* CONSOLIDATED BUTTON SYSTEM */
.btn {
    display: inline-flex;
    align-items: center;justify-content: flex-start;
    gap: 0.75rem;
    padding: 0.625rem 1.25rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    border: none;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    letter-spacing: 0.01em;
    width: 100%;
    min-height: 38px;
    /* will-change removed */
}

.btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Button Variants */
.btn--primary {
    background: var(--primary-gradient);
    color: white;
}

.btn--secondary {
    background: rgba(102, 126, 234, 0.1);
    color: var(--text-primary);
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.btn--danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--status-disconnected);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Button Size Modifiers */
.btn--sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    min-height: 36px;
}

.btn--lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* Button Context Modifiers */
.btn--modal {
    width: 100%;
    text-align: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    font-size: 0.9375rem;
}

.btn--property {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    justify-content: center;
    white-space: nowrap;
    width: auto;
}

/* Hover States */
.btn:hover:not(:disabled) {
    opacity: 0.9;
}

.btn--primary:hover:not(:disabled) {
    background: rgba(102, 126, 234, 0.9);
}

.btn--secondary:hover:not(:disabled) {
    background: rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.5);
}

.btn--danger:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.2);
    border-color: var(--status-disconnected);
}

/* CONSOLIDATED CARD SYSTEM */
.card {
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
    /* will-change removed */
}

.card:hover {
    /* All hover effects removed */
}

/* Card Variants */
.card--stat {
    background: var(--card-bg);
    padding: 1.5rem;
    min-height: 120px;
    box-shadow: var(--shadow-md);
}

.card--stat:hover {
    background: rgba(102, 126, 234, 0.03);
    border-color: rgba(102, 126, 234, 0.2);
}

.card--integration {
    background: var(--card-bg);
    padding: 1.25rem;
    min-height: 260px;
    box-shadow: var(--shadow-lg);
    overflow: visible;
}

.card--integration:hover {
    background: rgba(102, 126, 234, 0.03);
    border-color: rgba(102, 126, 234, 0.2);
}

.card--modal {
    background: #1a1a3e;
    border-color: rgba(102, 126, 234, 0.3);
    border-radius: 16px;
    padding: 0;
    width: 720px;
    max-width: 90vw;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(102, 126, 234, 0.1) inset;
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* CONSOLIDATED STATUS BADGE SYSTEM */
.status-badge {
    display: inline-flex;
    align-items: center;gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.status-badge--connected {
    background: rgba(16, 185, 129, 0.1);
    color: var(--status-connected);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge--disconnected {
    background: rgba(239, 68, 68, 0.1);
    color: var(--status-disconnected);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-badge--pending {
    background: rgba(245, 158, 11, 0.1);
    color: var(--status-pending);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-badge--inactive {
    background: rgba(107, 114, 128, 0.1);
    color: var(--status-inactive);
    border: 1px solid rgba(107, 114, 128, 0.3);
}

/* ========================================
   BACKWARDS COMPATIBILITY LAYER
   ======================================== */

/* Button Compatibility */
.btn-primary,
.btn-secondary,
.btn-danger,
.logout-btn {
    display: inline-flex;
    align-items: center;justify-content: flex-start;
    gap: 0.75rem;
    padding: 0.625rem 1.25rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    border: none;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    letter-spacing: 0.01em;
    width: 100%;
    min-height: 38px;
    /* will-change removed */
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
}

.btn-secondary {
    background: rgba(102, 126, 234, 0.1);
    color: var(--text-primary);
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--status-disconnected);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.logout-btn {
    padding: 0.625rem 1.25rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition-normal);
    width: auto;
    text-transform: none;
}

/* Button Hover States */
.btn-primary:hover {
    background: rgba(102, 126, 234, 0.9);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.5);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: var(--status-disconnected);
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

/* Card Compatibility */
.stat-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    min-height: 120px;
    /* will-change removed */
}

.integration-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    position: relative;
    overflow: visible;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    min-height: 280px;
    /* will-change removed */
}

.modal {
    background: #1a1a3e;
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 16px;
    padding: 0;
    width: 720px;
    max-width: 90vw;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(102, 126, 234, 0.1) inset;
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Status Compatibility */
.stat-status {
    display: inline-flex;
    align-items: center;gap: 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.625rem;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: auto;
    align-self: flex-start;
    width: auto;
}

/* Refresh button with pill style */
.stat-status-refresh {
    display: inline-flex;
    align-items: center;gap: 0.5rem;
    padding: 0.25rem 0.625rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-radius: 100px;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border: 1px solid rgba(102, 126, 234, 0.3);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: auto;
    align-self: flex-start;
}

/* Spin animation for loading state */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spin {
    animation: spin 1s linear infinite;
}

.stat-status-refresh.connected {
    background: rgba(16, 185, 129, 0.1);
    color: var(--status-connected);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.stat-status-refresh.disconnected {
    background: rgba(239, 68, 68, 0.1);
    color: var(--status-disconnected);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.stat-status-refresh.pending {
    background: rgba(245, 158, 11, 0.1);
    color: var(--status-pending);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.stat-status-refresh:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

/* Legacy refresh button hover */
.refresh-btn:hover {
    background: rgba(102, 126, 234, 0.1) !important;
    border-color: rgba(102, 126, 234, 0.5) !important;
    transform: scale(1.05);
}

.stat-status.connected {
    background: rgba(16, 185, 129, 0.1);
    color: var(--status-connected);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.stat-status.disconnected {
    background: rgba(239, 68, 68, 0.1);
    color: var(--status-disconnected);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.stat-status.pending {
    background: rgba(245, 158, 11, 0.1);
    color: var(--status-pending);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.stat-status.inactive {
    background: rgba(107, 114, 128, 0.1);
    color: var(--status-inactive);
    border: 1px solid rgba(107, 114, 128, 0.3);
}

/* ========================================
   LAYOUT & PAGE STRUCTURE
   ======================================== */

/* Dashboard Page Background */
body.dashboard-page {
    background: var(--dark-bg);
    position: relative;
}

body.dashboard-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at top right, rgba(102, 126, 234, 0.15) 0%, transparent 40%),
        radial-gradient(ellipse at bottom left, rgba(118, 75, 162, 0.15) 0%, transparent 40%),
        radial-gradient(ellipse at center, rgba(240, 147, 251, 0.05) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* Dashboard Header */
.dashboard-header {
    background: rgba(15, 15, 35, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    padding: 1rem 0;
    z-index: 100;
}

.header-container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;gap: 3rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    letter-spacing: -0.02em;
    text-decoration: none;
    display: inline-block;
}

.header-nav {
    display: flex;
    gap: 2rem;
}

.header-nav a {
    padding: 0.625rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 25px;
    transition: all var(--transition-fast);
    font-weight: 500;
    font-size: 0.9375rem;
    position: relative;
    background: transparent;
    border: 1px solid transparent;
}

.header-nav a:hover {
    color: var(--text-primary);
    background: rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.2);
}

.header-nav a.active {
    color: #667eea;
    background: rgba(102, 126, 234, 0.15);
    border: 1px solid rgba(102, 126, 234, 0.3);
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;gap: 1.5rem;
}

.lang-switcher {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 20px;
    font-size: 0.875rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-switcher:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.3);
}

.lang-flag {
    font-size: 1.2rem;
}

.lang-code {
    font-weight: 600;
}

.user-email {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Main Container */
.dashboard-container {
    position: relative;
    z-index: 1;
    max-width: 1800px;
    margin: 0 auto;
    padding: 1rem 2rem 1rem;
}

.dashboard-main {
    position: relative;
    z-index: 1;
    overflow-x: hidden;
    padding-bottom: 0.5rem;
    min-height: calc(100vh - 160px);
}

/* Page Header */
.page-header {
    margin-bottom: 1.5rem;
    animation: fadeInDown 0.6s ease;
}

.page-title {
    font-size: 2.75rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.375rem;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.page-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 400;
}

/* ========================================
   SPECIFIC COMPONENTS
   ======================================== */

/* Connection Stats */
.connection-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.stat-card:hover {
    background: rgba(102, 126, 234, 0.03);
    border-color: rgba(102, 126, 234, 0.2);
}

.stat-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.stat-header {
    display: flex;
    align-items: center;gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 14px;
    display: flex;
    align-items: center;justify-content: center;
    flex-shrink: 0;
}

.stat-icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 0.375rem;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}

.status-indicator.connected {
    background: var(--status-connected);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
    animation: pulse 2s infinite;
}

.status-indicator.disconnected {
    background: var(--status-disconnected);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

/* Integrations Grid */
.integrations-section {
    margin-bottom: 1rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.01em;
}

.integrations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    align-items: start;
}

.integration-card:hover {
    background: rgba(102, 126, 234, 0.03);
    border-color: rgba(102, 126, 234, 0.2);
}

.integration-header {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1.75rem;
    flex-shrink: 0;
}

.integration-icon {
    width: 56px;
    height: 56px;
    background: var(--primary-gradient);
    border-radius: 14px;
    display: flex;
    align-items: center;justify-content: center;
    color: white;
    flex-shrink: 0;
    box-shadow: var(--shadow-md);
}

.integration-icon svg {
    width: 28px;
    height: 28px;
    stroke-width: 2;
}

.integration-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.integration-name {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
    margin-top: 4px;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.integration-description {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.5;
    font-weight: 400;
}

.integration-status {
    display: flex;
    align-items: center;gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}

.status-text {
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.2;
}

.integration-actions {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: auto;
    align-items: stretch;
    flex-shrink: 0;
}

/* ========================================
   MODAL SYSTEM
   ======================================== */

.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 17, 30, 0.95);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
    padding: 2rem;
}

.modal-header {
    padding: 2rem;
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
    background: linear-gradient(to bottom, rgba(102, 126, 234, 0.08), transparent);
    position: relative;
    flex-shrink: 0;
}

.modal-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    transform: scale(1.05);
}

.modal-close svg {
    width: 18px;
    height: 18px;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #fff 0%, #e0e7ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    background: #0f0f23;
}

.modal-description {
    background: rgba(102, 126, 234, 0.08);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9375rem;
    line-height: 1.5;
    margin: 0;
    padding: 1.25rem 2rem;
    text-align: center;
    border-bottom: 1px solid rgba(102, 126, 234, 0.15);
}

.modal-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.5rem 2rem;
    background: rgba(10, 10, 35, 0.5);
    border-top: 1px solid rgba(102, 126, 234, 0.2);
    flex-shrink: 0;
}

.modal-actions .btn {
    flex: 1;
    max-width: 50%;
}

/* Modal Specific Button Styles */
.modal .btn {
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    width: 100%;
    white-space: nowrap;
    text-align: center;
    justify-content: center;
}

.modal .btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.35);
    border: none;
}

.modal .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(102, 126, 234, 0.45);
}

.modal .btn-secondary {
    background: rgba(100, 116, 139, 0.1);
    color: var(--text-secondary);
    border: 1px solid rgba(100, 116, 139, 0.3);
}

.modal .btn-secondary:hover {
    background: rgba(100, 116, 139, 0.2);
    color: var(--text-primary);
    border-color: rgba(100, 116, 139, 0.5);
}

.modal .btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}

.modal .btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}

/* ========================================
   GA4 & PROPERTIES COMPONENTS
   ======================================== */

/* Properties List */
.properties-list {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    max-height: 120px;
}

/* Hide scrollbar for properties list */
.properties-list::-webkit-scrollbar {
    width: 4px;
}

.properties-list::-webkit-scrollbar-track {
    background: transparent;
}

.properties-list::-webkit-scrollbar-thumb {
    background-color: rgba(102, 126, 234, 0.3);
    border-radius: 2px;
}

.property-item {
    display: flex;
    align-items: center;justify-content: flex-start;
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    margin-bottom: 0.5rem;
    border: 1px solid rgba(102, 126, 234, 0.1);
    transition: all 0.2s ease;
}

.property-item:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(102, 126, 234, 0.15);
}

.property-item:last-child {
    margin-bottom: 0;
}

.property-name {
    color: var(--text-primary);
    font-weight: 500;
    display: flex;
    align-items: center;gap: 0.75rem;
}

.property-id {
    color: var(--text-muted);
    font-family: monospace;
    font-size: 0.75rem;
    margin-left: 0.5rem;
}

/* GA4 Properties Modal */
.ga4-properties-container {
    background: transparent;
    padding: 0;
    margin: 0 auto;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.ga4-properties-inner {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.ga4-properties-inner::-webkit-scrollbar {
    display: none;
}

/* GA4 Loading State */
.ga4-loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;justify-content: center;
    gap: 1.5rem;
    padding: 4rem 0;
    color: var(--text-secondary);
}

.ga4-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(102, 126, 234, 0.15);
    border-top-color: #667eea;
    border-right-color: #764ba2;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* GA4 Controls */
.ga4-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;padding: 1rem 2rem;
    background: rgba(102, 126, 234, 0.05);
    border-bottom: 1px solid rgba(102, 126, 234, 0.15);
    flex-shrink: 0;
}

.ga4-controls-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.ga4-controls-actions {
    display: flex;
    gap: 0.5rem;
}

.ga4-control-btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 8px;
    color: var(--accent-light);
    cursor: pointer;
    transition: all 0.2s ease;
}

.ga4-control-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateY(-1px);
}

/* GA4 Account Section */
.ga4-account-section {
    background: transparent;
    padding: 0;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

.ga4-account-section:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(102, 126, 234, 0.15);
}

.ga4-account-section:last-child {
    border-bottom: none;
}

.ga4-account-header {
    font-size: 0.875rem;
    color: rgba(102, 126, 234, 0.9);
    font-weight: 600;
    padding: 1rem 2rem 0.75rem;
    background: rgba(102, 126, 234, 0.05);
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
    display: flex;
    align-items: center;justify-content: space-between;
    gap: 0.5rem;
}

.ga4-account-header > span {
    display: flex;
    align-items: center;gap: 0.5rem;
}

.ga4-account-header > span::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

.ga4-disconnect-btn {
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: rgba(239, 68, 68, 0.8);
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.ga4-disconnect-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.5);
    color: #ef4444;
}

/* GA4 Property Items */
.ga4-property-item {
    margin: 0;
}

.ga4-property-item label {
    display: flex;
    align-items: center;gap: 1rem;
    cursor: pointer;
    padding: 0.875rem 2rem;
    transition: all 0.15s ease;
    background: transparent;
    border-bottom: 1px solid rgba(102, 126, 234, 0.05);
}

.ga4-property-item label:hover {
    background: rgba(102, 126, 234, 0.08);
    padding-left: 2.5rem;
}

.ga4-property-item:last-child label {
    border-bottom: none;
}

.ga4-property-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    appearance: none;
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.3);
    position: relative;
    transition: all 0.2s ease, transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.ga4-property-checkbox:checked {
    background: var(--primary-gradient);
    border-color: transparent;
    animation: checkboxCheck 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ga4-property-checkbox:checked::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 6px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    animation: checkmarkAppear 0.2s cubic-bezier(0.4, 0, 0.2, 1) 0.1s both;
}

.ga4-property-checkbox:hover {
    border-color: var(--accent);
    transform: scale(1.05);
}

.ga4-property-info {
    flex: 1;
}

.ga4-property-name {
    font-size: 0.9375rem;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 0.25rem;
    letter-spacing: 0.01em;
}

.ga4-property-id {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    opacity: 0.7;
}

/* GA4 Empty State */
.ga4-empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
}

.ga4-empty-state-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    opacity: 0.3;
}

/* ========================================
   SUCCESS COMPONENTS
   ======================================== */

.success-banner {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(52, 211, 153, 0.1) 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;gap: 1rem;
    max-width: 90%;
    animation: fadeIn 0.4s ease 0.3s both;
}

.success-banner-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    background: rgba(16, 185, 129, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;justify-content: center;
}

.success-banner-icon svg {
    width: 14px;
    height: 14px;
    stroke: var(--status-connected);
    stroke-width: 3;
}

.success-banner-text {
    flex: 1;
    font-size: 0.9375rem;
    color: var(--status-connected);
    font-weight: 500;
}

/* Modal Icon */
.modal-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s both;
    margin: 1rem auto;
    display: flex;
    align-items: center;justify-content: center;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
}

.modal-icon svg {
    width: 44px;
    height: 44px;
    stroke: white;
    stroke-width: 3.5;
    stroke-dasharray: 50;
    stroke-dashoffset: 50;
    animation: checkmark 0.6s ease-out 0.5s both;
}

/* GA4 Success Modal */
.modal.ga4-success .modal-header {
    text-align: center;
}

.modal.ga4-success .success-banner {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin: 2rem;
    text-align: left;
}

.modal.ga4-success .success-banner-text {
    font-size: 1rem;
    font-weight: 500;
    color: var(--status-connected);
    line-height: 1.5;
}

/* ========================================
   UTILITY CLASSES & STATES
   ======================================== */

.hidden {
    display: none !important;
}

.demo-badge {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    animation: pulse-demo 2s ease-in-out infinite;
}

.demo-info-banner {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(99, 102, 241, 0.08) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    margin-top: 1rem;
    display: flex;
    align-items: center;gap: 0.75rem;
    animation: fadeIn 0.6s ease;
}

.demo-info-banner svg {
    width: 16px;
    height: 16px;
    color: #60a5fa;
    flex-shrink: 0;
}

.demo-info-banner p {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.demo-info-banner strong {
    color: #60a5fa;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-state-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.skeleton {
    background: linear-gradient(90deg, var(--card-bg) 25%, rgba(102, 126, 234, 0.1) 50%, var(--card-bg) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 8px;
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: rgba(30, 30, 60, 0.95);
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;gap: 0.75rem;
    z-index: 10000;
    animation: slideIn 0.3s ease;
}

.toast-notification.success {
    border-left: 4px solid #10b981;
}

.toast-notification svg {
    color: #10b981;
}

/* Special GA4 Card Styling */
#ga4Card {
    position: relative;
}

#ga4Card .properties-list {
    display: none;
}

#ga4Card .properties-list[style*="display: block"],
#ga4Card .properties-list[style*="display:block"] {
    display: block !important;
}

#ga4Card .integration-actions {
    gap: 1.25rem;
}

#ga4Card .btn {
    min-height: 42px;
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
}

/* Inactive Connection Styling */
.property-item.inactive-connection {
    padding: 1.25rem;
    background: rgba(239, 68, 68, 0.03);
    border: 1px solid rgba(239, 68, 68, 0.2);
    transition: all 0.3s ease;
}

.property-item.inactive-connection:hover {
    background: rgba(239, 68, 68, 0.06);
    border-color: rgba(239, 68, 68, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.1);
}

.inactive-connection-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    align-items: center;text-align: center;
}

.inactive-connection-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    align-items: center;
}

.inactive-connection-actions .btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s ease;
    border-radius: 10px;
    width: auto;
    min-width: 200px;
    max-width: 280px;
    text-align: center;
    display: flex;
    align-items: center;justify-content: center;
    gap: 0.5rem;
}

/* Property Buttons */
.property-item .btn {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;justify-content: center;
    gap: 0.5rem;
    border: 1px solid transparent;
    white-space: nowrap;
}

.property-item .btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
    min-width: fit-content;
}

.property-item .btn-primary {
    background: var(--primary-gradient);
    color: white;
    border: none;
}

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

.property-item .btn-secondary {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.property-item .btn-secondary:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    transform: translateY(-1px);
}

/* Icon Variants */
.integration-icon.piwik-gradient {
    background: linear-gradient(135deg, #00A6E5 0%, #0082B4 100%);
}

.integration-icon.matomo-gradient {
    background: linear-gradient(135deg, #3152A0 0%, #2A4590 100%);
}

/* ========================================
   ANIMATIONS & KEYFRAMES
   ======================================== */

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2); }
    50% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2); }
}

@keyframes pulse-demo {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.05); opacity: 1; }
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes checkboxCheck {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

@keyframes checkmarkAppear {
    0% {
        opacity: 0;
        transform: rotate(45deg) scale(0.5);
    }
    100% {
        opacity: 1;
        transform: rotate(45deg) scale(1);
    }
}

@keyframes checkmark {
    to { 
        stroke-dashoffset: 0;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

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

/* ========================================
   FOOTER
   ======================================== */

.dashboard-footer {
    background: rgba(10, 10, 27, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    padding: 1.25rem 0;
    margin-top: auto;
}

.footer-container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-left {
    color: var(--text-muted);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
}

.footer-right {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.footer-right a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
    font-size: 0.875rem;
}

.footer-right a:hover {
    color: var(--text-primary);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1024px) {
    .integrations-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    
    .property-item > div {
        flex-wrap: wrap;
    }
    
    .property-item > div > div:first-child {
        flex: 1 1 100%;
        margin-bottom: 0.5rem;
    }
    
    .property-item > div > div:last-child {
        flex: 1 1 auto;
    }
}

@media (max-width: 992px) {
    .connection-stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .dashboard-container {
        padding: 2rem 1rem;
    }

    .page-title {
        font-size: 2rem;
    }

    .integrations-grid {
        grid-template-columns: 1fr;
    }

    .connection-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-card {
        padding: 1.5rem;
    }

    .header-container {
        padding: 0 1rem;
    }

    .header-nav {
        display: none;
    }

    .header-right {
        gap: 1rem;
    }

    .user-email {
        display: none;
    }
    
    .lang-switcher {
        margin-right: 0;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .integration-header {
        gap: 1rem;
    }

    .integration-icon {
        width: 48px;
        height: 48px;
    }

    .integration-icon svg {
        width: 24px;
        height: 24px;
    }

    .modal {
        width: 95vw;
        margin: 1rem;
    }

    .modal-actions {
        flex-direction: column;
    }

    .modal-actions .btn {
        max-width: 100%;
    }

    .property-item > div {
        flex-direction: column;
        align-items: stretch;
    }
    
    .property-item > div > div:last-child {
        margin-top: 0.75rem;
        display: flex;
        gap: 0.5rem;
        width: 100%;
    }
    
    .property-item > div > div:last-child button {
        flex: 1;
    }

    .inactive-connection-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;    text-align: left;
    }
    
    .inactive-connection-content .property-name {
        width: auto;
    }
    
    .inactive-connection-actions {
        width: auto;
        flex-shrink: 0;
        align-items: flex-end;
    }
    
    .inactive-connection-actions .btn {
        min-width: 180px;
        max-width: 220px;
    }
}

@media (min-width: 768px) {
    .inactive-connection-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;    text-align: left;
    }
    
    .inactive-connection-content .property-name {
        width: auto;
    }
    
    .inactive-connection-actions {
        width: auto;
        flex-shrink: 0;
        align-items: flex-end;
    }
    
    .inactive-connection-actions .btn {
        min-width: 180px;
        max-width: 220px;
    }
}

/* ========================================
   ACCESSIBILITY & PERFORMANCE
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Light mode disabled - always use dark theme
@media (prefers-color-scheme: light) {
    :root {
        --dark-bg: #f8fafc;
        --text-primary: #1e293b;
        --text-secondary: #475569;
        --card-bg: rgba(255, 255, 255, 0.9);
    }
} */

/* Focus management for accessibility */
.btn:focus-visible,
.card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Touch targets */
.btn,
.lang-switcher {
    min-height: 44px;
    min-width: 44px;
}

.modal-close {
    min-height: 32px;
    min-width: 32px;
}

/* ========================================
   NICE-TO-HAVE ENHANCEMENTS
   ======================================== */

/* Enhanced Hover Patterns */
.btn::before {
    display: none !important;
}

.btn:hover::before {
    display: none !important;
}

/* Interactive card enhancements - Removed for cleaner design */
/* .card::after pseudo-element removed to prevent hover overflow */

/* .card:hover::after removed - no longer needed */

/* Focus-within states for enhanced keyboard navigation */
.modal:focus-within {
    border-color: var(--accent-light);
    box-shadow: 
        0 24px 48px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(102, 126, 234, 0.3) inset,
        0 0 0 3px rgba(102, 126, 234, 0.2);
}

.integration-card:focus-within {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Custom Scrollbar Styling - Webkit */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(16, 18, 40, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.6), rgba(118, 75, 162, 0.6));
    border-radius: 4px;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.8), rgba(118, 75, 162, 0.8));
}

::-webkit-scrollbar-corner {
    background: rgba(16, 18, 40, 0.3);
}

/* Firefox Scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(102, 126, 234, 0.6) rgba(16, 18, 40, 0.3);
}

/* Enhanced Loading States */
.btn.loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Interactive Status Indicators */
.status-indicator.connected::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent, var(--status-connected), transparent);
    animation: rotate 3s linear infinite;
    z-index: -1;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* High Contrast Mode Support - DISABLED 
@media (prefers-contrast: high) {
    :root {
        --border-color: rgba(255, 255, 255, 0.4);
        --border-hover: rgba(255, 255, 255, 0.6);
        --text-secondary: #e0e0e0;
        --card-bg: rgba(0, 0, 0, 0.8);
    }
    
    .btn {
        border: 2px solid currentColor;
    }
    
    .card {
        border-width: 2px;
    }
    
    .modal {
        border-width: 3px;
    }
} */

/* Enhanced Tooltip System */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: rgba(20, 20, 40, 0.95);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition-fast);
    z-index: 1001;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(102, 126, 234, 0.2);
}

[data-tooltip]::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-2px);
    border: 4px solid transparent;
    border-top-color: rgba(20, 20, 40, 0.95);
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition-fast);
    z-index: 1001;
}

[data-tooltip]:hover::before,
[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
}

/* Microinteractions */
.btn-primary {
    background-size: 200% 200%;
    background-position: 100% 0;
    transition: all var(--transition-normal), background-position 0.6s ease;
}

.btn-primary:hover {
    background-position: 0 100%;
}

/* Enhanced Card Shine Effect - DISABLED */
.stat-card::before {
    display: none !important;
}

.stat-card:hover::before {
    display: none !important;
}

/* Print Styles */
@media print {
    :root {
        --dark-bg: white;
        --text-primary: black;
        --text-secondary: #333;
        --card-bg: white;
        --border-color: #ccc;
    }
    
    body.dashboard-page::before {
        display: none;
    }
    
    .dashboard-header,
    .dashboard-footer,
    .btn,
    .modal-container {
        display: none !important;
    }
    
    .card,
    .stat-card,
    .integration-card {
        break-inside: avoid;
        border: 1px solid #ccc;
        box-shadow: none;
        background: white;
    }
    
    .page-title {
        color: black;
        background: none;
        -webkit-text-fill-color: initial;
    }
    
    .stat-value {
        color: black;
    }
    
    .integration-name {
        color: black;
    }
    
    @page {
        margin: 1in;
        size: portrait;
    }
}

/* Motion Preference Enhancements */
@media (prefers-reduced-motion: no-preference) {
    .card:hover {
        /* No animation */
    }
    
    .btn:active {
        animation: buttonPress 0.15s ease-out;
    }
    
    @keyframes buttonPress {
        0% { transform: translateY(-2px) scale(1); }
        50% { transform: translateY(0) scale(0.98); }
        100% { transform: translateY(-2px) scale(1); }
    }
}

/* Enhanced Selection Styles */
::selection {
    background: rgba(102, 126, 234, 0.3);
    color: var(--text-primary);
}

::-moz-selection {
    background: rgba(102, 126, 234, 0.3);
    color: var(--text-primary);
}

/* Progressive Enhancement for Modern Browsers */
@supports (backdrop-filter: blur(10px)) {
    .card {
        background: rgba(16, 18, 40, 0.7);
        backdrop-filter: blur(15px) saturate(1.8);
    }
    
    .modal {
        backdrop-filter: blur(20px) brightness(0.8);
    }
}

@supports (color: color-mix(in srgb, white, black)) {
    .btn--secondary {
        background: color-mix(in srgb, var(--accent) 10%, transparent);
        border-color: color-mix(in srgb, var(--accent) 30%, transparent);
    }
    
    .btn--secondary:hover {
        background: color-mix(in srgb, var(--accent) 20%, transparent);
        border-color: color-mix(in srgb, var(--accent) 50%, transparent);
    }
}

/* Container Query Support */
@supports (container-type: inline-size) {
    .integrations-grid {
        container-type: inline-size;
    }
    
    @container (max-width: 600px) {
        .integration-header {
            flex-direction: column;
            text-align: center;
        }
        
        .integration-icon {
            align-self: center;
        }
    }
}

/* Enhanced Error States */
.input-error {
    border-color: var(--status-disconnected);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* Success State Enhancements */
.success-glow {
    position: relative;
}

.success-glow::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: linear-gradient(45deg, transparent, var(--status-connected), transparent);
    animation: successGlow 2s linear infinite;
    z-index: -1;
}

@keyframes successGlow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Dark Mode Optimizations */
@media (prefers-color-scheme: dark) {
    :root {
        --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
        --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
        --shadow-xl: 0 12px 48px rgba(0, 0, 0, 0.6);
    }
}

/* Notification Enhancements */
.notification-enter {
    animation: notificationEnter 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes notificationEnter {
    0% {
        transform: translateX(100%) scale(0.8);
        opacity: 0;
    }
    100% {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

/* Loading Skeleton Improvements */
.skeleton-text {
    background: linear-gradient(
        90deg,
        var(--card-bg) 25%,
        rgba(102, 126, 234, 0.1) 50%,
        var(--card-bg) 75%
    );
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
    height: 1em;
    margin: 0.25rem 0;
}

.skeleton-text.title {
    height: 1.5em;
    width: 60%;
}

.skeleton-text.subtitle {
    height: 1em;
    width: 80%;
}

.skeleton-text.body {
    height: 0.875em;
    width: 100%;
}

/* Enhanced Modal Animations */
.modal-scale-enter {
    animation: modalScaleEnter 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalScaleEnter {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Final Cleanup Classes */
.modal-container.hidden {
    display: none;
}

.properties-list.hidden {
    display: none;
    margin-top: 1.5rem;
}
/* Main content containers - 1280px max-width */
.dashboard-container,
.dashboard-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

@media (max-width: 768px) {
    .dashboard-container,
    .dashboard-main {
        padding: 0 1rem;
    }
}

/* ACCOUNT MENU BUTTON STYLING */
.user-email-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-email-btn:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.5);
}

.user-email-btn.active svg {
    transform: rotate(180deg);
}

.user-email-btn svg {
    transition: transform 0.2s ease;
}

.user-email {
    color: inherit;
    font-size: inherit;
}
