/* Event Invite Agent - Professional Animated Styles */

/* Import beautiful fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Color System - Elegant Purple & Gold */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --accent: #f59e0b;
    --accent-dark: #d97706;
    
    /* Neutrals */
    --bg-dark: #0f172a;
    --bg-medium: #1e293b;
    --bg-light: #f8fafc;
    --text-dark: #0f172a;
    --text-light: #f8fafc;
    --text-gray: #64748b;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-accent: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    --shadow-glow: 0 0 30px rgba(102, 126, 234, 0.4);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: var(--gradient-hero);
    opacity: 0.05;
    animation: gradientShift 15s ease infinite;
    z-index: -1;
}

@keyframes gradientShift {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(5%, 5%) rotate(120deg); }
    66% { transform: translate(-5%, 5%) rotate(240deg); }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.8s ease;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

p {
    margin-bottom: var(--spacing-sm);
    color: var(--text-gray);
    font-size: 1.125rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

a:hover {
    color: var(--primary-dark);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--spacing-xl) var(--spacing-md);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(102, 126, 234, 0.1) 0%, transparent 50%);
    animation: pulse 4s ease-in-out infinite;
}

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

.hero-content {
    position: relative;
    z-index: 1;
    animation: fadeInUp 1s ease;
}

.hero h1 {
    margin-bottom: var(--spacing-md);
}

.hero p {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto var(--spacing-xl);
    animation: fadeInUp 1s ease 0.2s both;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 1.125rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 1s ease 0.4s both;
}

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

.btn-secondary {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
    animation: fadeInUp 1s ease 0.5s both;
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Navigation Links */
.nav-links {
    list-style: none;
    display: flex;
    gap: var(--spacing-lg);
    justify-content: center;
    flex-wrap: wrap;
    margin-top: var(--spacing-xl);
}

.nav-links li {
    animation: fadeInUp 1s ease both;
}

.nav-links li:nth-child(1) { animation-delay: 0.3s; }
.nav-links li:nth-child(2) { animation-delay: 0.4s; }
.nav-links li:nth-child(3) { animation-delay: 0.5s; }

.nav-links a {
    font-size: 1.25rem;
    font-weight: 600;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    display: inline-block;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover {
    transform: translateY(-2px);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* Floating Elements (decorative) */
.floating-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    opacity: 0.1;
}

.shape-1 {
    top: 10%;
    left: 10%;
    width: 100px;
    height: 100px;
    background: var(--gradient-primary);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: float 6s ease-in-out infinite;
}

.shape-2 {
    top: 60%;
    right: 10%;
    width: 150px;
    height: 150px;
    background: var(--gradient-accent);
    border-radius: 63% 37% 54% 46% / 55% 48% 52% 45%;
    animation: float 8s ease-in-out infinite reverse;
}

.shape-3 {
    bottom: 10%;
    left: 30%;
    width: 80px;
    height: 80px;
    background: var(--primary-light);
    border-radius: 50%;
    animation: float 7s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.125rem;
    }
    
    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    .nav-links {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-sm);
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

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

/* Toast Notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    max-width: 500px;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 9999;
    border-left: 4px solid var(--primary);
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toast-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
    font-size: 14px;
}

.toast-success {
    border-left-color: #10b981;
}

.toast-success .toast-icon {
    background: #d1fae5;
    color: #10b981;
}

.toast-error {
    border-left-color: #ef4444;
}

.toast-error .toast-icon {
    background: #fee2e2;
    color: #ef4444;
}

.toast-warning {
    border-left-color: #f59e0b;
}

.toast-warning .toast-icon {
    background: #fef3c7;
    color: #f59e0b;
}

.toast-info {
    border-left-color: #3b82f6;
}

.toast-info .toast-icon {
    background: #dbeafe;
    color: #3b82f6;
}

.toast-message {
    flex: 1;
    font-size: 0.9375rem;
    color: var(--text-dark);
}

/* Form Styles */
.form-container {
    max-width: 500px;
    margin: 4rem auto;
    padding: 2.5rem;
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    animation: fadeInUp 0.6s ease;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9375rem;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-input.input-error {
    border-color: #ef4444;
}

.error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: block;
    animation: fadeIn 0.3s ease;
}

.form-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.9375rem;
    color: var(--text-gray);
}

.form-footer a {
    color: var(--primary);
    font-weight: 600;
}

/* Button Full Width */
.btn-block {
    width: 100%;
    margin-top: 1rem;
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.page-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--text-gray);
}

/* Responsive Forms */
@media (max-width: 640px) {
    .form-container {
        margin: 2rem 1rem;
        padding: 2rem 1.5rem;
    }
    
    .toast {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
}

/* Navigation Bar */
.navbar {
    background: white;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand a {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-gray);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
}

/* Dashboard Container */
.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.dashboard-header {
    margin-bottom: 2rem;
    animation: fadeInUp 0.6s ease;
}

.dashboard-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dashboard-header p {
    color: var(--text-gray);
    font-size: 1.125rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInUp 0.6s ease;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }

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

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

.stat-content h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-gray);
    margin-bottom: 0.25rem;
    font-family: 'Inter', sans-serif;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
    font-family: 'Playfair Display', serif;
}

/* Dashboard Content */
.dashboard-content {
    background: white;
    padding: 3rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
    animation: fadeInUp 0.6s ease 0.5s both;
}

.empty-state {
    text-align: center;
    padding: 2rem;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: float 3s ease-in-out infinite;
}

.empty-state h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-gray);
    font-size: 1.125rem;
}

/* Dashboard Info */
.dashboard-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
    border-radius: var(--radius-xl);
    color: white;
    animation: fadeInUp 0.6s ease 0.6s both;
}

.dashboard-info h3 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 1.0625rem;
}

.feature-list li:last-child {
    border-bottom: none;
}

.feature-list strong {
    color: #fbbf24;
}

/* Responsive Dashboard */
@media (max-width: 768px) {
    .nav-menu {
        gap: 1rem;
        font-size: 0.875rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-content {
        padding: 2rem 1.5rem;
    }
}

/* Enhanced Professional Form Styles */
.form-container {
    max-width: 480px;
    margin: 3rem auto;
    padding: 3rem;
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.6s ease;
    position: relative;
}

.form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.page-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.page-header h2 {
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
    font-weight: 700;
}

.page-header p {
    color: var(--text-gray);
    font-size: 1rem;
    margin: 0;
}

.form-group {
    margin-bottom: 1.75rem;
}

.form-label {
    display: block;
    margin-bottom: 0.625rem;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9375rem;
    letter-spacing: 0.01em;
}

.form-input {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
    background: #f8fafc;
    color: var(--text-dark);
}

.form-input::placeholder {
    color: #94a3b8;
}

.form-input:hover {
    border-color: #cbd5e1;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    transform: translateY(-1px);
}

.form-input.input-error {
    border-color: #ef4444;
    background: #fef2f2;
}

.form-input.input-error:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    animation: fadeIn 0.3s ease;
}

.error-message::before {
    content: '⚠';
    font-size: 1rem;
}

.btn-block {
    width: 100%;
    margin-top: 0.5rem;
    padding: 1.125rem 2rem;
    font-size: 1.0625rem;
    font-weight: 600;
    letter-spacing: 0.025em;
}

.form-footer {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
    text-align: center;
    font-size: 0.9375rem;
    color: var(--text-gray);
}

.form-footer a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.form-footer a:hover {
    color: var(--primary-dark);
}

.form-footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.form-footer a:hover::after {
    width: 100%;
}

/* Remember me checkbox styling */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

input[type="checkbox"]:checked {
    background: var(--primary);
    border-color: var(--primary);
}

/* Form spacing improvements */
.form-group:last-of-type {
    margin-bottom: 2rem;
}

/* Mobile optimization */
@media (max-width: 640px) {
    .form-container {
        margin: 1.5rem 1rem;
        padding: 2rem 1.5rem;
    }
    
    .page-header h2 {
        font-size: 1.875rem;
    }
    
    .form-input {
        padding: 0.875rem 1rem;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .btn-block {
        padding: 1rem 1.5rem;
    }
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Smooth input transitions */
.form-input {
    transition: 
        border-color 0.3s ease,
        background-color 0.3s ease,
        transform 0.2s ease,
        box-shadow 0.3s ease;
}

/* Loading state for submit button */
.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn:disabled:hover {
    transform: none;
    box-shadow: var(--shadow-lg);
}

/* ========================================
   EVENT PAGES STYLES
   ======================================== */

/* Page Container */
.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    min-height: calc(100vh - 80px);
}

/* Page Header Section */
.page-header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    animation: fadeInUp 0.6s ease;
}

.page-header-section h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.page-header-section p {
    color: var(--text-gray);
    font-size: 1.125rem;
    margin: 0;
}

/* Breadcrumb */
.breadcrumb {
    margin-bottom: 2rem;
    animation: fadeInUp 0.6s ease;
}

.breadcrumb a {
    color: var(--text-gray);
    font-size: 0.9375rem;
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumb a:hover {
    color: var(--primary);
}

/* Empty State Card */
.empty-state-card {
    background: white;
    padding: 4rem 3rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    text-align: center;
    animation: fadeInUp 0.6s ease 0.3s both;
}

.empty-state-icon {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    animation: float 3s ease-in-out infinite;
}

.empty-state-card h2 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.empty-state-card p {
    color: var(--text-gray);
    font-size: 1.125rem;
    margin-bottom: 0;
}

/* Events Grid */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Event Card */
.event-card {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.6s ease both;
    display: flex;
    flex-direction: column;
}

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

/* Stagger animation for event cards */
.event-card:nth-child(1) { animation-delay: 0.1s; }
.event-card:nth-child(2) { animation-delay: 0.2s; }
.event-card:nth-child(3) { animation-delay: 0.3s; }
.event-card:nth-child(4) { animation-delay: 0.4s; }
.event-card:nth-child(5) { animation-delay: 0.5s; }
.event-card:nth-child(6) { animation-delay: 0.6s; }

/* Event Card Header */
.event-card-header {
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.event-card-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

/* Event Date Badge */
.event-date-badge {
    background: white;
    border-radius: var(--radius-md);
    padding: 0.5rem 0.75rem;
    text-align: center;
    min-width: 60px;
    box-shadow: var(--shadow-sm);
    position: relative;
    z-index: 1;
}

.event-month {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-day {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1;
    font-family: 'Playfair Display', serif;
}

/* Event Status Badge */
.event-status-badge {
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: capitalize;
    position: relative;
    z-index: 1;
}

.status-draft {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.status-active {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-completed {
    background: rgba(107, 114, 128, 0.2);
    color: #6b7280;
    border: 1px solid rgba(107, 114, 128, 0.3);
}

/* Event Card Content */
.event-card-content {
    padding: 1.5rem;
    flex: 1;
}

.event-title {
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-dark);
    line-height: 1.3;
}

.event-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.625rem;
    color: var(--text-gray);
    font-size: 0.9375rem;
}

.event-meta-icon {
    font-size: 1rem;
}

/* Event Stats */
.event-stats {
    display: flex;
    gap: 2rem;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e2e8f0;
}

.event-stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.event-stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    font-family: 'Playfair Display', serif;
}

.event-stat-label {
    font-size: 0.8125rem;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Event Card Actions */
.event-card-actions {
    padding: 1rem 1.5rem;
    background: #f8fafc;
    display: flex;
    gap: 0.75rem;
    border-top: 1px solid #e2e8f0;
}

.btn-action {
    flex: 1;
    padding: 0.625rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

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

.btn-action-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-action-secondary {
    background: white;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-action-secondary:hover {
    background: var(--primary);
    color: white;
}

/* ========================================
   EVENT FORM STYLES
   ======================================== */

/* Event Form Container */
.event-form-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 3rem;
    animation: fadeInUp 0.6s ease;
}

.event-form-header {
    text-align: center;
    margin-bottom: 3rem;
}

.event-form-header h1 {
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
}

.event-form-header p {
    color: var(--text-gray);
    font-size: 1.0625rem;
}

/* Form Sections */
.form-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 2px solid #f1f5f9;
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section-title {
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section-description {
    color: var(--text-gray);
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
}

/* Form Row (for side-by-side fields) */
.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

/* Form Textarea */
.form-textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

/* Form Hint */
.form-hint {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-gray);
    font-size: 0.875rem;
    font-style: italic;
}

/* Required indicator */
.required {
    color: #ef4444;
    font-weight: bold;
}

/* ========================================
   TONE SELECTOR STYLES
   ======================================== */

.tone-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.tone-option {
    cursor: pointer;
}

.tone-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.tone-card {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.tone-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tone-option:hover .tone-card {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.tone-card.selected {
    border-color: var(--primary);
    background: white;
    box-shadow: var(--shadow-lg);
}

.tone-card.selected::before {
    transform: scaleX(1);
}

.tone-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.tone-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.tone-description {
    color: var(--text-gray);
    font-size: 0.9375rem;
    margin-bottom: 1rem;
    flex: 1;
}

.tone-example {
    font-size: 0.875rem;
    font-style: italic;
    color: var(--primary);
    padding: 0.75rem;
    background: rgba(99, 102, 241, 0.05);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--primary);
}

/* ========================================
   FORM ACTIONS
   ======================================== */

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 2rem;
    border-top: 2px solid #f1f5f9;
}

/* ========================================
   RESPONSIVE STYLES
   ======================================== */

@media (max-width: 768px) {
    .page-header-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
    
    .page-header-section .btn {
        width: 100%;
    }
    
    .events-grid {
        grid-template-columns: 1fr;
    }
    
    .event-form-container {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .tone-selector {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column-reverse;
    }
    
    .form-actions .btn {
        width: 100%;
    }
    
    .event-card-actions {
        flex-direction: column;
    }
    
    .event-stats {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .page-header-section h1 {
        font-size: 2rem;
    }
    
    .event-form-header h1 {
        font-size: 1.875rem;
    }
    
    .event-title {
        font-size: 1.25rem;
    }
}

/* ========================================
   EVENT DETAIL PAGE STYLES
   ======================================== */

.event-detail-container {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 3rem;
    animation: fadeInUp 0.6s ease;
}

.event-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #f1f5f9;
}

.event-detail-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.event-description {
    color: var(--text-gray);
    font-size: 1.125rem;
    line-height: 1.7;
    margin: 0;
}

.event-detail-actions {
    display: flex;
    gap: 1rem;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

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

/* Event Info Grid */
.event-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.event-info-card {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: var(--radius-lg);
    border: 2px solid #e2e8f0;
}

.event-info-icon {
    font-size: 2rem;
}

.event-info-content h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-gray);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-info-content p {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

/* RSVP Stats Section */
.rsvp-stats-section {
    margin-bottom: 3rem;
}

.rsvp-stats-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.rsvp-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.rsvp-stat-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.rsvp-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.rsvp-stat-number {
    font-size: 3rem;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
    color: var(--primary);
}

.rsvp-stat-label {
    font-size: 0.9375rem;
    color: var(--text-gray);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rsvp-accepted {
    border-color: #10b981;
}

.rsvp-accepted .rsvp-stat-number {
    color: #10b981;
}

.rsvp-declined {
    border-color: #ef4444;
}

.rsvp-declined .rsvp-stat-number {
    color: #ef4444;
}

.rsvp-pending {
    border-color: #f59e0b;
}

.rsvp-pending .rsvp-stat-number {
    color: #f59e0b;
}

/* Coming Soon Section */
.coming-soon-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 3rem;
    border-radius: var(--radius-xl);
    color: white;
    text-align: center;
}

.coming-soon-section h3 {
    color: white;
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.coming-soon-section p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.125rem;
}

/* Responsive */
@media (max-width: 768px) {
    .event-detail-container {
        padding: 2rem 1.5rem;
    }
    
    .event-detail-header {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .event-detail-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .event-detail-actions .btn {
        width: 100%;
    }
    
    .event-info-grid {
        grid-template-columns: 1fr;
    }
    
    .rsvp-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========================================
   INVITEE MANAGEMENT STYLES
   ======================================== */

/* Invitee Section */
.invitee-section {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 2px solid #f1f5f9;
}

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

.invitee-section-header h3 {
    font-size: 1.75rem;
    margin: 0;
}

.invitee-actions {
    display: flex;
    gap: 1rem;
}

/* Invitee Empty State */
.invitee-empty-state {
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: var(--radius-xl);
    padding: 4rem 3rem;
    text-align: center;
}

.invitee-empty-state h4 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.invitee-empty-state p {
    color: var(--text-gray);
    font-size: 1.0625rem;
    margin: 0;
}

/* Invitees Table */
.invitees-table-container {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e2e8f0;
}

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

.invitees-table thead {
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
}

.invitees-table th {
    padding: 1rem 1.5rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.invitees-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.3s ease;
}

.invitees-table tbody tr:last-child {
    border-bottom: none;
}

.invitees-table tbody tr:hover {
    background: #f8fafc;
}

.invitees-table td {
    padding: 1.25rem 1.5rem;
    font-size: 0.9375rem;
    color: var(--text-dark);
}

/* Invitee Name Cell */
.invitee-name {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
}

.invitee-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}

/* RSVP Badge */
.rsvp-badge {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: capitalize;
}

.rsvp-pending {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.rsvp-accepted {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.rsvp-declined {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Text Center */
.text-center {
    text-align: center;
}

/* Button Icon */
.btn-icon {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    font-size: 1.25rem;
    transition: all 0.3s ease;
    border-radius: var(--radius-md);
}

.btn-icon:hover {
    background: #fef2f2;
    transform: scale(1.1);
}

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

/* ========================================
   MODAL STYLES
   ======================================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.modal-active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal.modal-active .modal-content {
    transform: scale(1);
}

.modal-large {
    max-width: 700px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 2rem 1rem;
    border-bottom: 2px solid #f1f5f9;
}

.modal-header h3 {
    font-size: 1.75rem;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-gray);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f1f5f9;
    color: var(--text-dark);
    transform: rotate(90deg);
}

.modal-content form {
    padding: 2rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #f1f5f9;
}

/* Import Instructions */
.import-instructions {
    background: #f8fafc;
    padding: 2rem;
    border-radius: var(--radius-lg);
    margin: 2rem;
}

.import-instructions h4 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.import-instructions p {
    color: var(--text-gray);
    margin-bottom: 0.75rem;
}

.csv-example {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 1rem;
    margin: 1rem 0;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    overflow-x: auto;
}

.csv-example code {
    display: block;
    color: var(--text-dark);
    white-space: pre;
}

/* File Input Styling */
.form-input-file {
    width: 100%;
    padding: 1rem;
    border: 2px dashed #cbd5e1;
    border-radius: var(--radius-md);
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-input-file:hover {
    border-color: var(--primary);
    background: white;
}

.form-input-file:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* Custom file input label */
.form-input-file::file-selector-button {
    padding: 0.625rem 1.25rem;
    margin-right: 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-input-file::file-selector-button:hover {
    background: var(--primary-dark);
}

/* ========================================
   RESPONSIVE STYLES FOR INVITEES
   ======================================== */

@media (max-width: 768px) {
    .invitee-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
    
    .invitee-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .invitee-actions .btn {
        width: 100%;
    }
    
    /* Make table scrollable on mobile */
    .invitees-table-container {
        overflow-x: auto;
    }
    
    .invitees-table {
        min-width: 600px;
    }
    
    .invitees-table th,
    .invitees-table td {
        padding: 1rem;
        font-size: 0.875rem;
    }
    
    .invitee-avatar {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
    
    .modal-content {
        width: 95%;
        max-width: 95%;
    }
    
    .modal-content form,
    .import-instructions {
        padding: 1.5rem;
    }
    
    .modal-actions {
        flex-direction: column-reverse;
    }
    
    .modal-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .invitee-empty-state {
        padding: 3rem 2rem;
    }
    
    .invitee-empty-state h4 {
        font-size: 1.25rem;
    }
    
    /* Stack table on very small screens */
    .invitees-table thead {
        display: none;
    }
    
    .invitees-table tbody tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid #e2e8f0;
        border-radius: var(--radius-lg);
    }
    
    .invitees-table td {
        display: flex;
        justify-content: space-between;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid #f1f5f9;
    }
    
    .invitees-table td:last-child {
        border-bottom: none;
    }
    
    .invitees-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-gray);
        font-size: 0.875rem;
        text-transform: uppercase;
    }
    
    .invitee-name {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ========================================
   ADDITIONAL BUTTON STYLES
   ======================================== */

.btn-secondary {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
}

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

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

/* Smooth transitions for table rows */
.invitees-table tbody tr {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Animation for new rows */
@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.invitees-table tbody tr.new-row {
    animation: slideInFromLeft 0.4s ease;
}

/* ========================================
   AI EMAIL GENERATION STYLES
   ======================================== */

/* AI Email Section */
.ai-email-section {
    margin-top: 3rem;
    padding: 3rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--radius-xl);
    color: white;
    animation: fadeInUp 0.6s ease;
}

.ai-email-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.ai-email-header h3 {
    color: white;
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.ai-email-header p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

/* Email Preview Container */
#email-preview-container {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-top: 2rem;
}

.email-preview-info {
    background: #f8fafc;
    border-left: 4px solid var(--primary);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
}

.email-preview-info p {
    color: var(--text-gray);
    margin: 0;
    font-size: 0.9375rem;
}

/* Email Preview Cards */
#email-previews {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.email-preview-card {
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
    animation: slideInFromLeft 0.5s ease;
}

.email-preview-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.email-preview-header {
    background: #f8fafc;
    padding: 1.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.email-preview-recipient {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.email-preview-recipient h4 {
    margin: 0;
    font-size: 1.125rem;
    color: var(--text-dark);
}

.email-preview-recipient p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-gray);
}

.email-preview-content {
    padding: 1.5rem;
}

.email-subject {
    padding: 1rem;
    background: #fef3c7;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.email-subject strong {
    color: #92400e;
    margin-right: 0.5rem;
}

.email-body {
    color: var(--text-dark);
    line-height: 1.8;
    font-size: 0.9375rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: var(--radius-md);
    max-height: 400px;
    overflow-y: auto;
}

/* Email Actions */
.email-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 2px solid #f1f5f9;
}

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

/* Loading State */
#email-loading {
    text-align: center;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
}

#email-loading p {
    color: white;
    margin-top: 1rem;
    font-size: 1.0625rem;
}

/* Loading Spinner */
.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

/* Bulk Actions Bar */
#bulk-actions-bar {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 2px solid #e2e8f0;
    padding: 1.5rem;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    z-index: 10;
    animation: slideInFromBottom 0.3s ease;
}

.bulk-actions-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#selected-count {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1.0625rem;
}

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

/* Checkbox Styling */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background: white;
    position: relative;
}

input[type="checkbox"]:checked {
    background: var(--primary);
    border-color: var(--primary);
}

input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
}

input[type="checkbox"]:hover {
    border-color: var(--primary);
}

/* Table Header Checkbox */
.invitees-table th input[type="checkbox"] {
    margin: 0;
}

/* ========================================
   RESPONSIVE STYLES FOR AI EMAIL
   ======================================== */

@media (max-width: 768px) {
    .ai-email-section {
        padding: 2rem 1.5rem;
    }

    .ai-email-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .ai-email-header .btn {
        width: 100%;
    }

    #email-preview-container {
        padding: 1.5rem;
    }

    .email-preview-card {
        margin: 0 -0.5rem;
    }

    .email-actions {
        flex-direction: column-reverse;
    }

    .email-actions .btn {
        width: 100%;
    }

    .bulk-actions-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .bulk-actions-content .btn {
        width: 100%;
    }

    .email-body {
        font-size: 0.875rem;
        max-height: 300px;
    }
}

@media (max-width: 480px) {
    .email-preview-recipient {
        flex-direction: column;
        align-items: flex-start;
    }

    .email-subject {
        font-size: 0.875rem;
    }
}

/* ========================================
   ANIMATION UTILITIES
   ======================================== */

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Stagger animation for email previews */
.email-preview-card:nth-child(1) {
    animation-delay: 0.1s;
}

.email-preview-card:nth-child(2) {
    animation-delay: 0.2s;
}

.email-preview-card:nth-child(3) {
    animation-delay: 0.3s;
}

/* Success state animation */
@keyframes successPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
}

.success-pulse {
    animation: successPulse 2s ease-in-out;
}

/* ========================================
   SCROLLBAR STYLING
   ======================================== */

.email-body::-webkit-scrollbar {
    width: 8px;
}

.email-body::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.email-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.email-body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ========================================
   ADDITIONAL BUTTON VARIANTS
   ======================================== */

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

.btn:disabled:hover {
    transform: none !important;
}

/* Info Banner */
.info-banner {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.info-banner-icon {
    font-size: 1.5rem;
}

.info-banner-text {
    flex: 1;
}

.info-banner-text p {
    margin: 0;
    color: white;
}

/* ========================================
   EMAIL CONTROL CENTER STYLES
   ======================================== */

/* Main Container */
.email-control-center {
    min-height: 100vh;
    background: #f8fafc;
}

/* Header */
.ecc-header {
    background: white;
    padding: 2rem;
    border-bottom: 2px solid #e2e8f0;
    animation: fadeInUp 0.6s ease;
}

.ecc-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-gray);
}

.ecc-breadcrumb a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.ecc-breadcrumb a:hover {
    color: var(--primary-dark);
}

.ecc-breadcrumb span {
    color: #cbd5e1;
}

.ecc-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ecc-subtitle {
    color: var(--text-gray);
    font-size: 1.0625rem;
    margin: 0;
}

/* Layout */
.ecc-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 2rem;
    padding: 2rem;
    max-width: 1800px;
    margin: 0 auto;
}

/* ========================================
   LEFT SIDEBAR - RECIPIENTS
   ======================================== */

.ecc-sidebar {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 250px);
    position: sticky;
    top: 2rem;
    animation: slideInFromLeft 0.6s ease;
}

.ecc-sidebar-header {
    padding: 1.5rem;
    border-bottom: 2px solid #f1f5f9;
}

.ecc-sidebar-header h3 {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    color: var(--text-dark);
}

.recipient-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.checkbox-container input[type="checkbox"] {
    margin: 0;
}

/* Recipient List */
.recipient-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.recipient-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    animation: fadeInUp 0.4s ease both;
}

.recipient-item:nth-child(1) { animation-delay: 0.1s; }
.recipient-item:nth-child(2) { animation-delay: 0.15s; }
.recipient-item:nth-child(3) { animation-delay: 0.2s; }
.recipient-item:nth-child(4) { animation-delay: 0.25s; }
.recipient-item:nth-child(5) { animation-delay: 0.3s; }

.recipient-item:hover {
    background: #f8fafc;
}

.recipient-checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    cursor: pointer;
}

.recipient-checkbox input[type="checkbox"] {
    margin: 0;
}

.recipient-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.recipient-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.recipient-details {
    flex: 1;
    min-width: 0;
}

.recipient-name {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recipient-email {
    font-size: 0.8125rem;
    color: var(--text-gray);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recipient-status {
    flex-shrink: 0;
}

.status-badge {
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

.status-draft {
    background: rgba(148, 163, 184, 0.1);
    color: #64748b;
}

.status-sent {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.status-failed {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Sidebar Footer */
.ecc-sidebar-footer {
    padding: 1.5rem;
    border-top: 2px solid #f1f5f9;
    background: #f8fafc;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

.selected-count {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 0.9375rem;
    color: var(--text-gray);
}

.selected-count strong {
    color: var(--primary);
    font-size: 1.5rem;
}

/* Empty State */
.ecc-empty-state {
    padding: 3rem 1.5rem;
    text-align: center;
}

.ecc-empty-state p {
    color: var(--text-gray);
    margin-bottom: 1.5rem;
}

/* ========================================
   MAIN CONTENT - EMAIL EDITOR
   ======================================== */

.ecc-main {
    animation: fadeInUp 0.6s ease 0.2s both;
}

/* AI Controls Panel */
.ai-controls-panel {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    padding: 2rem;
    margin-bottom: 2rem;
}

.ai-control-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto auto;
    gap: 1.5rem;
    align-items: end;
}

.ai-control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.control-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-dark);
}

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

.tone-dropdown,
.control-dropdown {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-family: inherit;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tone-dropdown:hover,
.control-dropdown:hover {
    border-color: var(--primary);
}

.tone-dropdown:focus,
.control-dropdown:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.btn-icon {
    margin-right: 0.5rem;
    font-size: 1.125rem;
}

/* Instructions Panel */
.ai-instructions-panel {
    margin-top: 1.5rem;
    border-top: 2px solid #f1f5f9;
    padding-top: 1.5rem;
}

.instructions-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s ease;
}

.instructions-toggle:hover {
    background: white;
    border-color: var(--primary);
}

.toggle-icon {
    margin-right: 0.5rem;
    font-size: 1.125rem;
}

.toggle-arrow {
    transition: transform 0.3s ease;
}

.instructions-content {
    margin-top: 1rem;
    animation: fadeIn 0.3s ease;
}

.instructions-textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s ease;
}

.instructions-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.instructions-examples {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: var(--radius-md);
}

.instructions-examples strong {
    display: block;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-gray);
}

.suggestion-btn {
    display: inline-block;
    padding: 0.5rem 0.875rem;
    margin: 0.25rem;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.suggestion-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-1px);
}

/* ========================================
   EMAIL EDITOR
   ======================================== */

.email-editor-container {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin-bottom: 2rem;
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.editor-header h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
    color: white;
    font-size: 1.375rem;
}

.editor-icon {
    font-size: 1.5rem;
}

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

.btn-icon-only {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.25rem;
}

.btn-icon-only:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Subject Editor */
.subject-editor {
    padding: 1.5rem 2rem;
    border-bottom: 2px solid #f1f5f9;
    background: #f8fafc;
}

.subject-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
    color: var(--text-dark);
}

.subject-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-md);
    font-size: 1.0625rem;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.3s ease;
}

.subject-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.subject-stats {
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-gray);
    text-align: right;
}

/* Editor Wrapper */
.editor-wrapper {
    position: relative;
    min-height: 500px;
}

.editor-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    z-index: 10;
}

.loading-spinner-large {
    width: 80px;
    height: 80px;
    border: 6px solid rgba(99, 102, 241, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.editor-loading p {
    font-size: 1.125rem;
    color: var(--text-gray);
    margin: 0;
}

/* Editor Footer */
.editor-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: #f8fafc;
    border-top: 2px solid #e2e8f0;
}

.editor-stats {
    display: flex;
    gap: 2rem;
}

.stat-item {
    font-size: 0.875rem;
    color: var(--text-gray);
}

.stat-item strong {
    color: var(--primary);
    font-size: 1.125rem;
}

.editor-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-gray);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
}

.status-dot.saved {
    background: #10b981;
}

.status-dot.saving {
    background: #f59e0b;
    animation: pulse 1s ease-in-out infinite;
}

/* ========================================
   PREVIEW PANEL
   ======================================== */

.preview-panel {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
    overflow: hidden;
}

.preview-panel.hidden {
    display: none;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
}

.preview-header h3 {
    margin: 0;
    font-size: 1.25rem;
}

.preview-tabs {
    display: flex;
    gap: 0.5rem;
}

.preview-tab {
    padding: 0.5rem 1rem;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.preview-tab:hover {
    border-color: var(--primary);
}

.preview-tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.preview-content {
    padding: 2rem;
    min-height: 400px;
}

.preview-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 400px;
    color: var(--text-gray);
}

/* Email Preview */
.email-preview {
    max-width: 600px;
    margin: 0 auto;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.email-preview-header {
    padding: 1.5rem;
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
}

.preview-from,
.preview-subject {
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
}

.preview-from strong,
.preview-subject strong {
    color: var(--text-gray);
}

.email-preview-body {
    padding: 2rem;
    background: white;
    line-height: 1.8;
}

/* ========================================
   ACTION BUTTONS
   ======================================== */

.ecc-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 2rem;
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

.btn-large {
    padding: 1.125rem 2.5rem;
    font-size: 1.125rem;
    position: relative;
}

.btn-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

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

@media (max-width: 1400px) {
    .ecc-layout {
        grid-template-columns: 280px 1fr;
    }
    
    .ai-control-row {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    
    .ai-control-row button {
        grid-column: span 2;
    }
}

@media (max-width: 1024px) {
    .ecc-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .ecc-sidebar {
        max-height: none;
        position: relative;
        top: 0;
    }
}

@media (max-width: 768px) {
    .ecc-header {
        padding: 1.5rem 1rem;
    }
    
    .ecc-header h1 {
        font-size: 2rem;
    }
    
    .ecc-layout {
        padding: 1rem;
    }
    
    .ai-controls-panel {
        padding: 1.5rem;
    }
    
    .ai-control-row {
        grid-template-columns: 1fr;
    }
    
    .ai-control-row button {
        grid-column: 1;
    }
    
    .editor-header,
    .subject-editor,
    .editor-footer {
        padding: 1rem;
    }
    
    .preview-content {
        padding: 1rem;
    }
    
    .ecc-actions {
        flex-direction: column;
        padding: 1.5rem;
    }
    
    .ecc-actions .btn {
        width: 100%;
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-block {
    width: 100%;
}

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/**
 * Email Control Center - Ultra Professional CSS
 * Vortex-Approved Design System
 */

/* ========================================
   DESIGN TOKENS & VARIABLES
   ======================================== */

:root {
    /* Professional Color Palette */
    --ecc-primary: #6366f1;
    --ecc-primary-dark: #4f46e5;
    --ecc-primary-light: #818cf8;
    --ecc-secondary: #8b5cf6;
    --ecc-accent: #ec4899;
    
    /* Neutrals */
    --ecc-gray-50: #f9fafb;
    --ecc-gray-100: #f3f4f6;
    --ecc-gray-200: #e5e7eb;
    --ecc-gray-300: #d1d5db;
    --ecc-gray-400: #9ca3af;
    --ecc-gray-500: #6b7280;
    --ecc-gray-600: #4b5563;
    --ecc-gray-700: #374151;
    --ecc-gray-800: #1f2937;
    --ecc-gray-900: #111827;
    
    /* Status Colors */
    --ecc-success: #10b981;
    --ecc-warning: #f59e0b;
    --ecc-error: #ef4444;
    --ecc-info: #3b82f6;
    
    /* Spacing System */
    --ecc-space-1: 0.25rem;
    --ecc-space-2: 0.5rem;
    --ecc-space-3: 0.75rem;
    --ecc-space-4: 1rem;
    --ecc-space-5: 1.25rem;
    --ecc-space-6: 1.5rem;
    --ecc-space-8: 2rem;
    --ecc-space-10: 2.5rem;
    --ecc-space-12: 3rem;
    
    /* Border Radius */
    --ecc-radius-sm: 0.375rem;
    --ecc-radius-md: 0.5rem;
    --ecc-radius-lg: 0.75rem;
    --ecc-radius-xl: 1rem;
    --ecc-radius-2xl: 1.5rem;
    --ecc-radius-full: 9999px;
    
    /* Shadows */
    --ecc-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --ecc-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --ecc-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --ecc-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --ecc-shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Transitions */
    --ecc-transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --ecc-transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --ecc-transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Typography */
    --ecc-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ========================================
   BASE STYLES
   ======================================== */

.ecc-body {
    font-family: var(--ecc-font-family);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   PROFESSIONAL NAVIGATION
   ======================================== */

.navbar-ecc {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--ecc-gray-200);
    box-shadow: var(--ecc-shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.navbar-ecc-container {
    max-width: 1920px;
    margin: 0 auto;
    padding: var(--ecc-space-4) var(--ecc-space-6);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-ecc-left {
    display: flex;
    align-items: center;
    gap: var(--ecc-space-8);
}

.navbar-ecc-brand {
    display: flex;
    align-items: center;
    gap: var(--ecc-space-3);
    text-decoration: none;
    color: var(--ecc-gray-900);
    font-weight: 700;
    font-size: 1.125rem;
    transition: transform var(--ecc-transition-fast);
}

.navbar-ecc-brand:hover {
    transform: translateX(-2px);
}

.brand-icon {
    font-size: 1.5rem;
}

.navbar-ecc-breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--ecc-space-2);
    font-size: 0.875rem;
}

.breadcrumb-link {
    color: var(--ecc-gray-600);
    text-decoration: none;
    transition: color var(--ecc-transition-fast);
}

.breadcrumb-link:hover {
    color: var(--ecc-primary);
}

.breadcrumb-separator {
    color: var(--ecc-gray-400);
}

.breadcrumb-current {
    color: var(--ecc-gray-900);
    font-weight: 600;
}

.navbar-btn {
    padding: var(--ecc-space-3) var(--ecc-space-5);
    background: white;
    border: 1px solid var(--ecc-gray-300);
    border-radius: var(--ecc-radius-lg);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ecc-gray-700);
    cursor: pointer;
    transition: all var(--ecc-transition-fast);
}

.navbar-btn:hover {
    border-color: var(--ecc-primary);
    color: var(--ecc-primary);
    transform: translateY(-1px);
    box-shadow: var(--ecc-shadow-md);
}

/* ========================================
   MAIN CONTAINER LAYOUT
   ======================================== */

.ecc-container {
    max-width: 1920px;
    margin: 0 auto;
    padding: var(--ecc-space-6);
    display: grid;
    grid-template-columns: 320px 1fr 400px;
    gap: var(--ecc-space-6);
    animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ========================================
   RECIPIENTS PANEL (LEFT SIDEBAR)
   ======================================== */

.ecc-recipients-panel {
    background: white;
    border-radius: var(--ecc-radius-2xl);
    box-shadow: var(--ecc-shadow-xl);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 120px);
    position: sticky;
    top: 100px;
    animation: slideInLeft 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.panel-header {
    padding: var(--ecc-space-6);
    border-bottom: 1px solid var(--ecc-gray-100);
}

.panel-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--ecc-space-4);
}

.panel-title {
    display: flex;
    align-items: center;
    gap: var(--ecc-space-3);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ecc-gray-900);
    margin: 0;
}

.panel-icon {
    font-size: 1.5rem;
}

.recipient-count-badge {
    background: linear-gradient(135deg, var(--ecc-primary) 0%, var(--ecc-secondary) 100%);
    color: white;
    padding: var(--ecc-space-1) var(--ecc-space-3);
    border-radius: var(--ecc-radius-full);
    font-size: 0.875rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.panel-select-all {
    margin-top: var(--ecc-space-3);
}

/* Custom Checkbox */
.custom-checkbox {
    display: flex;
    align-items: center;
    gap: var(--ecc-space-3);
    cursor: pointer;
    user-select: none;
    position: relative;
}

.custom-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkbox-mark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--ecc-gray-300);
    border-radius: var(--ecc-radius-sm);
    background: white;
    transition: all var(--ecc-transition-fast);
    position: relative;
    flex-shrink: 0;
}

.custom-checkbox input[type="checkbox"]:checked ~ .checkbox-mark {
    background: linear-gradient(135deg, var(--ecc-primary) 0%, var(--ecc-secondary) 100%);
    border-color: var(--ecc-primary);
}

.custom-checkbox input[type="checkbox"]:checked ~ .checkbox-mark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
}

.checkbox-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ecc-gray-700);
}

/* Recipients List */
.recipients-list {
    flex: 1;
    overflow-y: auto;
    padding: var(--ecc-space-4);
    scrollbar-width: thin;
    scrollbar-color: var(--ecc-gray-300) transparent;
}

.recipients-list::-webkit-scrollbar {
    width: 6px;
}

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

.recipients-list::-webkit-scrollbar-thumb {
    background: var(--ecc-gray-300);
    border-radius: var(--ecc-radius-full);
}

.recipients-list::-webkit-scrollbar-thumb:hover {
    background: var(--ecc-gray-400);
}

/* Recipient Card */
.recipient-card {
    background: var(--ecc-gray-50);
    border: 2px solid transparent;
    border-radius: var(--ecc-radius-lg);
    padding: var(--ecc-space-4);
    margin-bottom: var(--ecc-space-3);
    transition: all var(--ecc-transition-base);
    animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.recipient-card:nth-child(1) { animation-delay: 0.05s; }
.recipient-card:nth-child(2) { animation-delay: 0.1s; }
.recipient-card:nth-child(3) { animation-delay: 0.15s; }
.recipient-card:nth-child(4) { animation-delay: 0.2s; }
.recipient-card:nth-child(5) { animation-delay: 0.25s; }

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

.recipient-card:hover {
    background: white;
    border-color: var(--ecc-primary);
    box-shadow: var(--ecc-shadow-md);
    transform: translateX(4px);
}

.recipient-card-content {
    display: flex;
    align-items: center;
    gap: var(--ecc-space-3);
    cursor: pointer;
    margin-bottom: var(--ecc-space-3);
}

.recipient-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid var(--ecc-gray-300);
    border-radius: var(--ecc-radius-sm);
    cursor: pointer;
    transition: all var(--ecc-transition-fast);
    flex-shrink: 0;
}

.recipient-checkbox:checked {
    background: linear-gradient(135deg, var(--ecc-primary) 0%, var(--ecc-secondary) 100%);
    border-color: var(--ecc-primary);
}

.recipient-avatar-wrapper {
    flex-shrink: 0;
}

.recipient-avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--ecc-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: white;
    box-shadow: var(--ecc-shadow-md);
}

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

.recipient-name {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--ecc-gray-900);
    margin-bottom: var(--ecc-space-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recipient-email {
    font-size: 0.8125rem;
    color: var(--ecc-gray-600);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recipient-status {
    display: flex;
    justify-content: flex-end;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: var(--ecc-space-2);
    padding: var(--ecc-space-2) var(--ecc-space-3);
    border-radius: var(--ecc-radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-draft {
    background: rgba(107, 114, 128, 0.1);
    color: var(--ecc-gray-700);
}

.status-sent {
    background: rgba(16, 185, 129, 0.1);
    color: var(--ecc-success);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Empty Recipients State */
.empty-recipients {
    padding: var(--ecc-space-12) var(--ecc-space-6);
    text-align: center;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: var(--ecc-space-4);
    opacity: 0.5;
}

.empty-recipients h3 {
    font-size: 1.25rem;
    color: var(--ecc-gray-900);
    margin: 0 0 var(--ecc-space-2) 0;
}

.empty-recipients p {
    color: var(--ecc-gray-600);
    margin: 0 0 var(--ecc-space-6) 0;
}

/* Panel Footer */
.panel-footer {
    padding: var(--ecc-space-6);
    border-top: 1px solid var(--ecc-gray-100);
    background: var(--ecc-gray-50);
    border-radius: 0 0 var(--ecc-radius-2xl) var(--ecc-radius-2xl);
}

.selection-summary {
    text-align: center;
    margin-bottom: var(--ecc-space-4);
    font-size: 0.875rem;
    color: var(--ecc-gray-600);
}

.selection-count strong {
    color: var(--ecc-primary);
    font-size: 1.75rem;
    font-weight: 800;
}

.btn-send-selected {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--ecc-space-2);
    padding: var(--ecc-space-4);
    background: linear-gradient(135deg, var(--ecc-primary) 0%, var(--ecc-secondary) 100%);
    color: white;
    border: none;
    border-radius: var(--ecc-radius-lg);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--ecc-transition-base);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

.btn-send-selected:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.4);
}

.btn-send-selected:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

/* Continue in next part... */

/* ========================================
   EDITOR PANEL (CENTER)
   ======================================== */

.ecc-editor-panel {
    display: flex;
    flex-direction: column;
    gap: var(--ecc-space-6);
    animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.1s backwards;
}

/* AI Generation Card */
.ai-generation-card {
    background: white;
    border-radius: var(--ecc-radius-2xl);
    box-shadow: var(--ecc-shadow-xl);
    overflow: hidden;
}

.card-header-compact {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: var(--ecc-space-6);
}

.card-title-compact {
    display: flex;
    align-items: center;
    gap: var(--ecc-space-3);
    color: white;
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0;
}

.title-icon {
    font-size: 1.75rem;
}

/* AI Controls Grid */
.ai-controls-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--ecc-space-6);
    padding: var(--ecc-space-6);
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: var(--ecc-space-3);
}

.control-label-modern {
    display: flex;
    align-items: center;
    gap: var(--ecc-space-2);
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--ecc-gray-900);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.select-modern {
    width: 100%;
    padding: var(--ecc-space-4);
    background: white;
    border: 2px solid var(--ecc-gray-200);
    border-radius: var(--ecc-radius-lg);
    font-family: var(--ecc-font-family);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--ecc-gray-900);
    cursor: pointer;
    transition: all var(--ecc-transition-base);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%234b5563' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 3rem;
}

.select-modern:hover {
    border-color: var(--ecc-primary);
    background-color: var(--ecc-gray-50);
}

.select-modern:focus {
    outline: none;
    border-color: var(--ecc-primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* AI Instructions Section */
.ai-instructions-section {
    padding: 0 var(--ecc-space-6) var(--ecc-space-6);
}

.instructions-toggle-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--ecc-space-4);
    background: linear-gradient(135deg, var(--ecc-gray-50) 0%, var(--ecc-gray-100) 100%);
    border: 2px solid var(--ecc-gray-200);
    border-radius: var(--ecc-radius-lg);
    font-weight: 700;
    font-size: 0.9375rem;
    color: var(--ecc-gray-900);
    cursor: pointer;
    transition: all var(--ecc-transition-base);
}

.instructions-toggle-btn:hover {
    background: white;
    border-color: var(--ecc-primary);
    transform: translateY(-2px);
    box-shadow: var(--ecc-shadow-md);
}

.toggle-text {
    flex: 1;
    text-align: left;
}

.toggle-arrow {
    font-size: 1.25rem;
    transition: transform var(--ecc-transition-base);
}

.instructions-toggle-btn:hover .toggle-arrow {
    transform: translateX(4px);
}

.instructions-panel {
    margin-top: var(--ecc-space-4);
    animation: expandDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes expandDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

.instructions-input {
    width: 100%;
    padding: var(--ecc-space-4);
    background: white;
    border: 2px solid var(--ecc-gray-200);
    border-radius: var(--ecc-radius-lg);
    font-family: var(--ecc-font-family);
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--ecc-gray-900);
    resize: vertical;
    transition: all var(--ecc-transition-base);
}

.instructions-input:focus {
    outline: none;
    border-color: var(--ecc-primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.instructions-input::placeholder {
    color: var(--ecc-gray-400);
}

/* Quick Suggestions */
.quick-suggestions {
    margin-top: var(--ecc-space-4);
    padding: var(--ecc-space-4);
    background: var(--ecc-gray-50);
    border-radius: var(--ecc-radius-lg);
    display: flex;
    flex-wrap: wrap;
    gap: var(--ecc-space-2);
    align-items: center;
}

.suggestions-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--ecc-gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: var(--ecc-space-2);
}

.suggestion-chip {
    padding: var(--ecc-space-2) var(--ecc-space-4);
    background: white;
    border: 2px solid var(--ecc-gray-200);
    border-radius: var(--ecc-radius-full);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--ecc-gray-700);
    cursor: pointer;
    transition: all var(--ecc-transition-fast);
}

.suggestion-chip:hover {
    background: var(--ecc-primary);
    color: white;
    border-color: var(--ecc-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* AI Action Buttons */
.ai-action-buttons {
    display: flex;
    gap: var(--ecc-space-4);
    padding: 0 var(--ecc-space-6) var(--ecc-space-6);
}

.btn-regenerate {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--ecc-space-2);
    padding: var(--ecc-space-4);
    background: white;
    border: 2px solid var(--ecc-primary);
    border-radius: var(--ecc-radius-lg);
    font-size: 1rem;
    font-weight: 700;
    color: var(--ecc-primary);
    cursor: pointer;
    transition: all var(--ecc-transition-base);
}

.btn-regenerate:hover {
    background: var(--ecc-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

.btn-generate {
    flex: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--ecc-space-3);
    padding: var(--ecc-space-5);
    background: linear-gradient(135deg, var(--ecc-primary) 0%, var(--ecc-secondary) 100%);
    border: none;
    border-radius: var(--ecc-radius-lg);
    font-size: 1.125rem;
    font-weight: 800;
    color: white;
    cursor: pointer;
    transition: all var(--ecc-transition-base);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-generate::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-generate:hover::before {
    left: 100%;
}

.btn-generate:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.5);
}

.btn-generate .btn-icon {
    font-size: 1.5rem;
}

/* ========================================
   EMAIL EDITOR CARD
   ======================================== */

.email-editor-card {
    background: white;
    border-radius: var(--ecc-radius-2xl);
    box-shadow: var(--ecc-shadow-xl);
    overflow: hidden;
    position: relative;
}

/* Loading Overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    animation: fadeIn 0.3s ease;
}

.loading-content {
    text-align: center;
    padding: var(--ecc-space-8);
}

.loading-spinner-pro {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--ecc-space-6);
    border: 6px solid var(--ecc-gray-200);
    border-top-color: var(--ecc-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--ecc-gray-900);
    margin: 0 0 var(--ecc-space-2) 0;
}

.loading-subtitle {
    font-size: 1rem;
    color: var(--ecc-gray-600);
    margin: 0;
}

/* Editor Header */
.editor-header-pro {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--ecc-space-6);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.editor-header-left {
    display: flex;
    align-items: center;
    gap: var(--ecc-space-6);
}

.editor-title {
    display: flex;
    align-items: center;
    gap: var(--ecc-space-3);
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0;
}

.editor-status-indicator {
    display: flex;
    align-items: center;
    gap: var(--ecc-space-2);
    padding: var(--ecc-space-2) var(--ecc-space-4);
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--ecc-radius-full);
    backdrop-filter: blur(10px);
}

.status-dot-animated {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ecc-gray-400);
    animation: pulse 2s ease-in-out infinite;
}

.status-dot-animated.saving {
    background: var(--ecc-warning);
}

.status-dot-animated.saved {
    background: var(--ecc-success);
}

.status-text {
    font-size: 0.8125rem;
    font-weight: 600;
}

.editor-header-right {
    display: flex;
    gap: var(--ecc-space-2);
}

.btn-icon-pro {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: var(--ecc-radius-lg);
    font-size: 1.25rem;
    cursor: pointer;
    transition: all var(--ecc-transition-fast);
    backdrop-filter: blur(10px);
}

.btn-icon-pro:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Subject Line Editor */
.subject-line-editor {
    padding: var(--ecc-space-6);
    background: linear-gradient(to bottom, var(--ecc-gray-50) 0%, white 100%);
    border-bottom: 1px solid var(--ecc-gray-200);
}

.subject-input-wrapper {
    margin-bottom: var(--ecc-space-3);
}

.subject-label-pro {
    display: block;
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--ecc-gray-700);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--ecc-space-3);
}

.subject-input-pro {
    width: 100%;
    padding: var(--ecc-space-4);
    background: white;
    border: 2px solid var(--ecc-gray-200);
    border-radius: var(--ecc-radius-lg);
    font-family: var(--ecc-font-family);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--ecc-gray-900);
    transition: all var(--ecc-transition-base);
}

.subject-input-pro:focus {
    outline: none;
    border-color: var(--ecc-primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.subject-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--ecc-space-4);
}

.subject-length-indicator {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--ecc-gray-600);
}

.subject-quality {
    display: flex;
    align-items: center;
    gap: var(--ecc-space-2);
    font-size: 0.75rem;
    color: var(--ecc-gray-500);
}

.quality-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ecc-gray-400);
}

/* WYSIWYG Wrapper */
.wysiwyg-wrapper {
    min-height: 500px;
    padding: var(--ecc-space-6);
}

/* Editor Stats Bar */
.editor-stats-bar {
    padding: var(--ecc-space-4) var(--ecc-space-6);
    background: var(--ecc-gray-50);
    border-top: 1px solid var(--ecc-gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stats-left {
    display: flex;
    gap: var(--ecc-space-6);
}

.stat-item-pro {
    display: flex;
    align-items: center;
    gap: var(--ecc-space-2);
}

.stat-icon {
    font-size: 1.125rem;
    opacity: 0.7;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--ecc-primary);
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--ecc-gray-600);
}

/* ========================================
   ACTION BAR
   ======================================== */

.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--ecc-space-4);
    padding: var(--ecc-space-6);
    background: white;
    border-radius: var(--ecc-radius-2xl);
    box-shadow: var(--ecc-shadow-xl);
}

.btn-secondary-pro {
    display: flex;
    align-items: center;
    gap: var(--ecc-space-2);
    padding: var(--ecc-space-4) var(--ecc-space-6);
    background: white;
    border: 2px solid var(--ecc-gray-300);
    border-radius: var(--ecc-radius-lg);
    font-size: 1rem;
    font-weight: 700;
    color: var(--ecc-gray-700);
    cursor: pointer;
    transition: all var(--ecc-transition-base);
}

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

.btn-primary-pro {
    display: flex;
    align-items: center;
    gap: var(--ecc-space-3);
    padding: var(--ecc-space-5) var(--ecc-space-8);
    background: linear-gradient(135deg, var(--ecc-primary) 0%, var(--ecc-secondary) 100%);
    border: none;
    border-radius: var(--ecc-radius-lg);
    font-size: 1.125rem;
    font-weight: 800;
    color: white;
    cursor: pointer;
    transition: all var(--ecc-transition-base);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
    position: relative;
}

.btn-primary-pro:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.5);
}

.btn-primary-pro:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary-large {
    font-size: 1.25rem;
    padding: var(--ecc-space-6) var(--ecc-space-10);
}

.btn-count-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    min-width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 var(--ecc-space-2);
    background: var(--ecc-error);
    color: white;
    border-radius: var(--ecc-radius-full);
    font-size: 0.75rem;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Continue in next message... */

/* ========================================
   PREVIEW PANEL (RIGHT SIDEBAR)
   ======================================== */

.ecc-preview-panel {
    background: white;
    border-radius: var(--ecc-radius-2xl);
    box-shadow: var(--ecc-shadow-xl);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 120px);
    position: sticky;
    top: 100px;
    animation: slideInRight 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.2s backwards;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.preview-tabs-wrapper {
    padding: var(--ecc-space-4) var(--ecc-space-6) 0;
}

.preview-tabs {
    display: flex;
    gap: var(--ecc-space-2);
    background: var(--ecc-gray-100);
    padding: var(--ecc-space-2);
    border-radius: var(--ecc-radius-lg);
}

.preview-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--ecc-space-2);
    padding: var(--ecc-space-3) var(--ecc-space-4);
    background: transparent;
    border: none;
    border-radius: var(--ecc-radius-md);
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--ecc-gray-600);
    cursor: pointer;
    transition: all var(--ecc-transition-fast);
}

.preview-tab:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--ecc-primary);
}

.preview-tab.active {
    background: white;
    color: var(--ecc-primary);
    box-shadow: var(--ecc-shadow-sm);
}

.tab-icon {
    font-size: 1.125rem;
}

/* Preview Viewport */
.preview-viewport {
    flex: 1;
    overflow-y: auto;
    padding: var(--ecc-space-6);
    scrollbar-width: thin;
    scrollbar-color: var(--ecc-gray-300) transparent;
}

.preview-viewport::-webkit-scrollbar {
    width: 6px;
}

.preview-viewport::-webkit-scrollbar-track {
    background: transparent;
}

.preview-viewport::-webkit-scrollbar-thumb {
    background: var(--ecc-gray-300);
    border-radius: var(--ecc-radius-full);
}

/* Empty Preview State */
.preview-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 400px;
    text-align: center;
    padding: var(--ecc-space-8);
}

.empty-preview-icon {
    font-size: 5rem;
    margin-bottom: var(--ecc-space-6);
    opacity: 0.3;
    animation: float 3s ease-in-out infinite;
}

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

.preview-empty-state h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ecc-gray-900);
    margin: 0 0 var(--ecc-space-2) 0;
}

.preview-empty-state p {
    font-size: 0.9375rem;
    color: var(--ecc-gray-600);
    margin: 0;
}

/* Email Preview Display */
.email-preview-display {
    background: white;
    border: 2px solid var(--ecc-gray-200);
    border-radius: var(--ecc-radius-lg);
    overflow: hidden;
    box-shadow: var(--ecc-shadow-md);
    animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.email-preview-header {
    padding: var(--ecc-space-5);
    background: linear-gradient(to bottom, var(--ecc-gray-50) 0%, white 100%);
    border-bottom: 2px solid var(--ecc-gray-200);
}

.preview-from,
.preview-to,
.preview-subject-line {
    display: flex;
    gap: var(--ecc-space-3);
    margin-bottom: var(--ecc-space-3);
    font-size: 0.875rem;
}

.preview-from:last-child,
.preview-to:last-child,
.preview-subject-line:last-child {
    margin-bottom: 0;
}

.preview-label {
    font-weight: 700;
    color: var(--ecc-gray-600);
    min-width: 60px;
}

.preview-value {
    color: var(--ecc-gray-900);
}

.preview-subject-line .preview-value {
    font-weight: 700;
}

.email-preview-body {
    padding: var(--ecc-space-6);
    font-family: var(--ecc-font-family);
    font-size: 1rem;
    line-height: 1.8;
    color: var(--ecc-gray-900);
}

.email-preview-body p {
    margin: 0 0 1em 0;
}

.email-preview-body p:last-child {
    margin-bottom: 0;
}

/* Mobile Preview Mode */
.preview-viewport.mobile-view .email-preview-display {
    max-width: 375px;
    margin: 0 auto;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.btn-primary-sm {
    display: inline-flex;
    align-items: center;
    gap: var(--ecc-space-2);
    padding: var(--ecc-space-3) var(--ecc-space-5);
    background: linear-gradient(135deg, var(--ecc-primary) 0%, var(--ecc-secondary) 100%);
    color: white;
    border: none;
    border-radius: var(--ecc-radius-lg);
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--ecc-transition-base);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary-sm:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

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

@media (max-width: 1600px) {
    .ecc-container {
        grid-template-columns: 300px 1fr 360px;
    }
}

@media (max-width: 1400px) {
    .ecc-container {
        grid-template-columns: 280px 1fr 340px;
    }
    
    .ai-controls-grid {
        grid-template-columns: 1fr;
    }
    
    .panel-title {
        font-size: 1.125rem;
    }
}

@media (max-width: 1200px) {
    /* Stack preview panel below */
    .ecc-container {
        grid-template-columns: 280px 1fr;
    }
    
    .ecc-preview-panel {
        grid-column: 1 / -1;
        max-height: 600px;
        position: relative;
        top: 0;
    }
}

@media (max-width: 1024px) {
    /* Single column layout */
    .ecc-container {
        grid-template-columns: 1fr;
        gap: var(--ecc-space-4);
        padding: var(--ecc-space-4);
    }
    
    .ecc-recipients-panel,
    .ecc-preview-panel {
        position: relative;
        top: 0;
        max-height: none;
    }
    
    .navbar-ecc-container {
        padding: var(--ecc-space-3) var(--ecc-space-4);
    }
    
    .navbar-ecc-breadcrumb {
        display: none;
    }
}

@media (max-width: 768px) {
    .ecc-body {
        background: var(--ecc-gray-100);
    }
    
    .navbar-ecc-brand {
        font-size: 1rem;
    }
    
    .brand-text {
        display: none;
    }
    
    .ecc-container {
        padding: var(--ecc-space-3);
        gap: var(--ecc-space-3);
    }
    
    .panel-header,
    .ai-controls-grid,
    .ai-instructions-section,
    .ai-action-buttons,
    .subject-line-editor,
    .wysiwyg-wrapper,
    .editor-stats-bar,
    .action-bar {
        padding: var(--ecc-space-4);
    }
    
    .card-header-compact,
    .editor-header-pro {
        padding: var(--ecc-space-4);
    }
    
    .panel-title,
    .card-title-compact,
    .editor-title {
        font-size: 1.125rem;
    }
    
    .ai-action-buttons {
        flex-direction: column;
    }
    
    .btn-regenerate,
    .btn-generate {
        width: 100%;
    }
    
    .action-bar {
        flex-direction: column;
    }
    
    .btn-secondary-pro,
    .btn-primary-pro {
        width: 100%;
        justify-content: center;
    }
    
    .preview-tabs {
        flex-direction: column;
    }
    
    .preview-tab {
        width: 100%;
    }
    
    .stats-left {
        flex-wrap: wrap;
        gap: var(--ecc-space-4);
    }
    
    .stat-item-pro {
        flex: 1;
        min-width: 100px;
    }
}

@media (max-width: 480px) {
    .navbar-ecc-container {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--ecc-space-3);
    }
    
    .navbar-btn {
        width: 100%;
    }
    
    .recipient-card {
        padding: var(--ecc-space-3);
    }
    
    .recipient-avatar {
        width: 36px;
        height: 36px;
        font-size: 0.875rem;
    }
    
    .recipient-name {
        font-size: 0.875rem;
    }
    
    .recipient-email {
        font-size: 0.75rem;
    }
    
    .quick-suggestions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .suggestion-chip {
        width: 100%;
        text-align: center;
    }
}

/* ========================================
   ADVANCED ANIMATIONS
   ======================================== */

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.shimmer-effect {
    background: linear-gradient(
        90deg,
        var(--ecc-gray-200) 25%,
        var(--ecc-gray-100) 50%,
        var(--ecc-gray-200) 75%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

.bounce-in {
    animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

.slide-in-up {
    animation: slideInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Gradient Animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.animated-gradient {
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

/* ========================================
   FOCUS VISIBLE IMPROVEMENTS
   ======================================== */

*:focus-visible {
    outline: 2px solid var(--ecc-primary);
    outline-offset: 2px;
}

button:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .navbar-ecc,
    .ecc-recipients-panel,
    .ecc-preview-panel,
    .ai-generation-card,
    .action-bar,
    .editor-header-pro,
    .editor-stats-bar {
        display: none;
    }
    
    .ecc-container {
        grid-template-columns: 1fr;
    }
    
    .email-editor-card {
        box-shadow: none;
    }
}

/* ========================================
   ACCESSIBILITY IMPROVEMENTS
   ======================================== */

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ========================================
   DARK MODE SUPPORT (BONUS)
   ======================================== */

@media (prefers-color-scheme: dark) {
    .ecc-body {
        background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    }
    
    /* Additional dark mode styles can be added here */
}

/* ========================================
   PERFORMANCE OPTIMIZATIONS
   ======================================== */

/* GPU Acceleration for animations */
.recipient-card,
.btn-generate,
.btn-primary-pro,
.suggestion-chip {
    will-change: transform;
}

/* Contain layout shifts */
.ecc-recipients-panel,
.ecc-editor-panel,
.ecc-preview-panel {
    contain: layout;
}

/* ========================================
   FINAL POLISH
   ======================================== */

::selection {
    background: rgba(99, 102, 241, 0.2);
    color: var(--ecc-gray-900);
}

::-moz-selection {
    background: rgba(99, 102, 241, 0.2);
    color: var(--ecc-gray-900);
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Better text rendering */
body {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
