/* ========================================
   TRACKIFY PREMIUM - BUSINESS GRADE DESIGN
   Modern SaaS Email Tracking Platform
======================================== */

/* ========================================
   DESIGN SYSTEM - CSS VARIABLES
======================================== */

:root {
    /* Premium Color Palette */
    --color-primary: #667eea;
    --color-primary-dark: #5568d3;
    --color-primary-light: #818cf8;
    --color-secondary: #764ba2;
    --color-accent: #f093fb;
    
    /* Semantic Colors */
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-error: #ef4444;
    --color-info: #3b82f6;
    
    /* Neutrals - Eye Comfort */
    --color-gray-50: #fafafa;
    --color-gray-100: #f5f5f5;
    --color-gray-200: #e5e5e5;
    --color-gray-300: #d4d4d4;
    --color-gray-400: #a3a3a3;
    --color-gray-500: #737373;
    --color-gray-600: #525252;
    --color-gray-700: #404040;
    --color-gray-800: #262626;
    --color-gray-900: #171717;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-blue: linear-gradient(135deg, #667eea 0%, #4f46e5 100%);
    --gradient-purple: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
    --gradient-green: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-orange: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-black: 900;
    
    /* Shadows - Soft & Professional */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.12);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   BASE RESET & TYPOGRAPHY
======================================== */

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--color-gray-800);
    background: var(--color-gray-50);
}

.dashboard-body {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-bold);
    line-height: 1.2;
    color: var(--color-gray-900);
}

/* ========================================
   PREMIUM DASHBOARD LAYOUT
======================================== */

.premium-dashboard {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-2xl) var(--space-lg);
}

.dashboard-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-2xl);
}

/* ========================================
   HERO SECTION
======================================== */

.dashboard-hero {
    text-align: center;
    padding: var(--space-2xl) 0;
}

.hero-content {
    margin-bottom: var(--space-xl);
}

.hero-badge {
    margin-bottom: var(--space-md);
}

.hero-title {
    font-size: 3rem;
    font-weight: var(--font-weight-black);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-md);
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-gray-600);
    font-weight: var(--font-weight-medium);
}

.hero-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

.btn-hero-primary,
.btn-hero-secondary {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: var(--font-weight-bold);
    border-radius: var(--radius-xl);
    transition: var(--transition-base);
    text-decoration: none;
    border: 2px solid transparent;
}

.btn-hero-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-lg);
}

.btn-hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn-hero-secondary {
    background: white;
    color: var(--color-gray-900);
    border-color: var(--color-gray-300);
}

.btn-hero-secondary:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-icon {
    font-size: 1.25rem;
}

/* ========================================
   PREMIUM ALERT
======================================== */

.alert-premium {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    position: relative;
}

.alert-premium-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border: 2px solid var(--color-success);
}

.alert-premium-error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 2px solid var(--color-error);
}

.alert-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: var(--font-weight-black);
    flex-shrink: 0;
}

.alert-premium-success .alert-icon {
    background: var(--color-success);
    color: white;
}

.alert-premium-error .alert-icon {
    background: var(--color-error);
    color: white;
}

.alert-content {
    flex: 1;
    font-weight: var(--font-weight-medium);
    color: var(--color-gray-800);
}

.alert-close {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: rgba(0, 0, 0, 0.1);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.alert-close:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* ========================================
   PREMIUM STATS CARDS
======================================== */

.premium-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.premium-stat-card {
    border-radius: var(--radius-2xl);
    padding: var(--space-xl);
    position: relative;
    overflow: hidden;
    transition: var(--transition-base);
}

.stat-gradient-blue {
    background: linear-gradient(135deg, #667eea 0%, #5568d3 100%);
}

.stat-gradient-purple {
    background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
}

.stat-gradient-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.stat-gradient-orange {
    background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
}

.premium-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-2xl);
}

.stat-card-inner {
    position: relative;
    z-index: 1;
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-lg);
}

.stat-icon-wrapper {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon {
    font-size: 2rem;
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: var(--font-weight-bold);
    color: white;
}

.trend-arrow {
    font-size: 1rem;
}

.stat-body {
    margin-bottom: var(--space-lg);
}

.stat-value {
    font-size: 3rem;
    font-weight: var(--font-weight-black);
    color: white;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: var(--font-weight-semibold);
}

.stat-footer {
    padding-top: var(--space-md);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-progress-mini {
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.stat-progress-fill {
    height: 100%;
    background: white;
    border-radius: var(--radius-full);
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-meta {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
}

/* ========================================
   TWO COLUMN LAYOUT
======================================== */

.dashboard-two-col {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: var(--space-xl);
}

.dashboard-col-main {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.dashboard-col-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

/* ========================================
   PREMIUM CARDS
======================================== */

.premium-card {
    background: white;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: var(--transition-base);
}

.premium-card:hover {
    box-shadow: var(--shadow-lg);
}

.card-highlight {
    border: 2px solid var(--color-primary);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.premium-card-header {
    padding: var(--space-xl);
    border-bottom: 1px solid var(--color-gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 1.25rem;
    font-weight: var(--font-weight-bold);
    color: var(--color-gray-900);
    margin: 0;
}

.card-subtitle {
    font-size: 0.875rem;
    color: var(--color-gray-600);
    margin-top: 0.25rem;
}

.card-action-link {
    font-size: 0.875rem;
    font-weight: var(--font-weight-semibold);
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.card-action-link:hover {
    color: var(--color-primary-dark);
}

.premium-card-body {
    padding: var(--space-xl);
}

/* ========================================
   ACTIVITY TIMELINE
======================================== */

.activity-timeline {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.activity-item-premium {
    display: flex;
    gap: var(--space-md);
    position: relative;
    padding-left: var(--space-md);
}

.activity-item-premium:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 23px;
    top: 48px;
    bottom: -24px;
    width: 2px;
    background: var(--color-gray-200);
}

.activity-dot {
    width: 12px;
    height: 12px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    position: absolute;
    left: 19px;
    top: 16px;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.activity-content-wrapper {
    flex: 1;
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
}

.activity-icon-circle {
    width: 48px;
    height: 48px;
    background: var(--color-gray-100);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.activity-details {
    flex: 1;
}

.activity-title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--color-gray-900);
}

.activity-meta-tags {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.meta-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    background: var(--color-gray-100);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    color: var(--color-gray-600);
    font-weight: var(--font-weight-medium);
}

.meta-icon {
    font-size: 0.875rem;
}

/* ========================================
   QUICK ACTIONS - VERTICAL
======================================== */

.quick-actions-vertical {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.quick-action-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--color-gray-50);
    border-radius: var(--radius-xl);
    text-decoration: none;
    transition: var(--transition-base);
    border: 2px solid transparent;
}

.quick-action-item:hover {
    background: white;
    border-color: var(--color-gray-300);
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

.quick-action-featured {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-color: var(--color-primary);
}

.quick-action-featured:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
}

.quick-action-icon-box {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.bg-blue { background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%); }
.bg-purple { background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%); }
.bg-green { background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%); }
.bg-yellow { background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%); }

.quick-action-text {
    flex: 1;
}

.quick-action-name {
    font-size: 1rem;
    font-weight: var(--font-weight-bold);
    color: var(--color-gray-900);
    margin-bottom: 0.125rem;
}

.quick-action-desc {
    font-size: 0.75rem;
    color: var(--color-gray-600);
}

.quick-action-arrow {
    font-size: 1.25rem;
    color: var(--color-gray-400);
    transition: var(--transition-fast);
}

.quick-action-item:hover .quick-action-arrow {
    color: var(--color-primary);
    transform: translateX(2px);
}

/* ========================================
   DEVICE MINI STATS
======================================== */

.device-mini-stats {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.device-mini-item {
    padding: var(--space-md);
    background: var(--color-gray-50);
    border-radius: var(--radius-lg);
}

.device-mini-info {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.device-mini-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.device-mini-name {
    font-size: 0.875rem;
    font-weight: var(--font-weight-bold);
    color: var(--color-gray-900);
}

.device-mini-count {
    font-size: 0.75rem;
    color: var(--color-gray-600);
}

/* ========================================
   GETTING STARTED STEPS
======================================== */

.steps-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.step-item {
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
}

.step-number {
    width: 36px;
    height: 36px;
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--font-weight-black);
    font-size: 1rem;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-title {
    font-size: 0.875rem;
    font-weight: var(--font-weight-bold);
    color: var(--color-gray-900);
    margin-bottom: 0.25rem;
}

.step-desc {
    font-size: 0.75rem;
    color: var(--color-gray-600);
}

/* ========================================
   EMPTY STATE
======================================== */

.empty-state-modern {
    text-align: center;
    padding: var(--space-3xl) var(--space-xl);
}

.empty-icon {
    font-size: 5rem;
    margin-bottom: var(--space-lg);
    opacity: 0.3;
}

.empty-state-modern h3 {
    font-size: 1.5rem;
    margin-bottom: var(--space-md);
}

.empty-state-modern p {
    color: var(--color-gray-600);
    margin-bottom: var(--space-xl);
}

.btn-empty-action {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.875rem 1.5rem;
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--radius-lg);
    font-weight: var(--font-weight-bold);
    text-decoration: none;
    transition: var(--transition-base);
    box-shadow: var(--shadow-md);
}

.btn-empty-action:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ========================================
   BADGES
======================================== */

.badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: var(--font-weight-bold);
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-free {
    background: var(--color-gray-600);
    color: white;
}

.badge-starter {
    background: var(--color-info);
    color: white;
}

.badge-professional {
    background: var(--color-primary);
    color: white;
}

.badge-enterprise {
    background: var(--color-success);
    color: white;
}

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

@media (max-width: 1024px) {
    .dashboard-two-col {
        grid-template-columns: 1fr;
    }
    
    .dashboard-col-sidebar {
        order: -1;
    }
}

@media (max-width: 768px) {
    .premium-dashboard {
        padding: var(--space-xl) var(--space-md);
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .premium-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-value {
        font-size: 2.5rem;
    }
    
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-hero-primary,
    .btn-hero-secondary {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .premium-card-header,
    .premium-card-body {
        padding: var(--space-lg);
    }
    
    .stat-value {
        font-size: 2rem;
    }
}

/* ========================================
   PREMIUM BACKGROUNDS & PATTERNS
======================================== */

/* Animated gradient background */
.gradient-bg {
    background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #4facfe);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Mesh gradient background */
.mesh-bg {
    background: 
        radial-gradient(at 40% 20%, rgba(102, 126, 234, 0.15) 0px, transparent 50%),
        radial-gradient(at 80% 0%, rgba(118, 75, 162, 0.15) 0px, transparent 50%),
        radial-gradient(at 0% 50%, rgba(240, 147, 251, 0.15) 0px, transparent 50%),
        radial-gradient(at 80% 50%, rgba(79, 172, 254, 0.15) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(16, 185, 129, 0.15) 0px, transparent 50%),
        radial-gradient(at 80% 100%, rgba(245, 158, 11, 0.15) 0px, transparent 50%);
    background-color: #fafafa;
}

/* Dotted pattern background */
.dotted-bg {
    background-color: #fafafa;
    background-image: radial-gradient(rgba(102, 126, 234, 0.15) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Grid pattern background */
.grid-bg {
    background-color: #fafafa;
    background-image: 
        linear-gradient(rgba(102, 126, 234, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(102, 126, 234, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* Floating shapes background */
.shapes-bg {
    position: relative;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    overflow: hidden;
}

.shapes-bg::before,
.shapes-bg::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 20s ease-in-out infinite;
}

.shapes-bg::before {
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    top: -300px;
    right: -200px;
    animation-delay: 0s;
}

.shapes-bg::after {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #f093fb 0%, #4facfe 100%);
    bottom: -200px;
    left: -100px;
    animation-delay: 5s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(50px, -50px) rotate(90deg); }
    50% { transform: translate(0, -100px) rotate(180deg); }
    75% { transform: translate(-50px, -50px) rotate(270deg); }
}

/* Wave background */
.wave-bg {
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    position: relative;
}

.wave-bg::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23ffffff' fill-opacity='1' d='M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,138.7C960,139,1056,117,1152,106.7C1248,96,1344,96,1392,96L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E") no-repeat bottom;
    background-size: cover;
}

/* Premium card with backdrop blur */
.glass-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}
