/* ============================================
   HIVE CRM - Modern Dark Theme
   ============================================ */

:root {
    /* Color Palette - Deep Ocean */
    --bg-primary: #0a0e17;
    --bg-secondary: #111827;
    --bg-tertiary: #1a2235;
    --bg-card: #151d2e;
    --bg-card-hover: #1c2640;
    
    /* Accent Colors */
    --accent-primary: #6366f1;
    --accent-primary-hover: #818cf8;
    --accent-secondary: #22d3ee;
    --accent-tertiary: #f472b6;
    --accent-success: #34d399;
    --accent-warning: #fbbf24;
    --accent-danger: #f87171;
    
    /* Text Colors */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Border Colors */
    --border-color: #1e293b;
    --border-light: #334155;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-card: linear-gradient(145deg, #1a2235 0%, #151d2e 100%);
    --gradient-glow: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    
    /* Typography */
    --font-primary: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    /* Spacing */
    --sidebar-width: 260px;
    --header-height: 70px;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.3);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 400ms ease;
}

/* ============================================
   Base Styles
   ============================================ */

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

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

body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.06) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(34, 211, 238, 0.04) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ============================================
   App Container & Layout
   ============================================ */

.app-container {
    display: flex;
    min-height: 100vh;
}

/* ============================================
   Sidebar
   ============================================ */

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 32px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse 3s ease-in-out infinite;
}

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

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--border-radius);
    color: var(--text-secondary);
    font-weight: 500;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gradient-primary);
    transform: scaleY(0);
    transition: transform var(--transition-normal);
}

.nav-item:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.nav-item.active {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-primary);
}

.nav-item.active::before {
    transform: scaleY(1);
}

.nav-icon {
    font-size: 1.2rem;
}

.sidebar-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
}

.version-badge {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* ============================================
   Main Content
   ============================================ */

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.top-header {
    height: var(--header-height);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    background: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 50;
}

.top-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

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

.content-area {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 0.925rem;
    font-weight: 500;
    font-family: var(--font-primary);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-normal);
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.5);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
}

.btn-outline:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--accent-primary);
}

.btn-danger {
    background: var(--accent-danger);
    color: white;
}

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

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.btn-arrow {
    transition: transform var(--transition-normal);
}

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

.icon-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-sm);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 1rem;
}

.icon-btn:hover {
    background: var(--bg-tertiary);
}

.icon-btn.danger:hover {
    background: rgba(248, 113, 113, 0.2);
}

/* ============================================
   Form Elements
   ============================================ */

.form-page {
    max-width: 800px;
    margin: 0 auto;
}

.form-container {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 32px;
    border: 1px solid var(--border-color);
}

.form-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 20px;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

input[type="text"],
input[type="email"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.95rem;
    font-family: var(--font-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    transition: all var(--transition-normal);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    padding-right: 40px;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

/* Search Input */
.search-bar {
    margin-bottom: 24px;
}

.search-input {
    width: 100%;
    max-width: 400px;
    padding: 12px 16px 12px 44px;
    background: var(--bg-secondary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E") no-repeat 14px center;
}

/* Filter Elements */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    gap: 12px;
}

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

/* ============================================
   Dashboard
   ============================================ */

.dashboard {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.welcome-card {
    background: var(--gradient-card);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.welcome-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: var(--gradient-glow);
    pointer-events: none;
}

.welcome-content {
    position: relative;
    z-index: 1;
}

.welcome-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.welcome-content p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 24px;
}

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

.welcome-illustration {
    position: relative;
    width: 200px;
    height: 200px;
}

.hex-grid {
    position: relative;
    width: 100%;
    height: 100%;
}

.hex {
    position: absolute;
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    opacity: 0.3;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    animation: float 4s ease-in-out infinite;
}

.hex-1 { top: 20%; left: 20%; animation-delay: 0s; }
.hex-2 { top: 10%; left: 50%; animation-delay: 0.5s; opacity: 0.5; }
.hex-3 { top: 50%; left: 30%; animation-delay: 1s; opacity: 0.2; }
.hex-4 { top: 40%; left: 60%; animation-delay: 1.5s; opacity: 0.4; }

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

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.stat-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.stat-card.loading {
    opacity: 0.6;
}

.stat-icon {
    font-size: 2rem;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.15);
    border-radius: var(--border-radius);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

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

/* Quick Actions */
.quick-actions h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.action-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.action-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
    cursor: pointer;
}

.action-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
    transform: translateX(4px);
}

.action-icon {
    font-size: 1.5rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius);
}

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

.action-title {
    font-weight: 600;
    color: var(--text-primary);
}

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

/* ============================================
   Venues Grid
   ============================================ */

.venues-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.venue-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.venue-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.venue-card-header {
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-tertiary);
}

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

.venue-actions {
    display: flex;
    gap: 4px;
}

.venue-card-body {
    padding: 20px;
}

.venue-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.venue-address {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.venue-meta {
    display: flex;
    gap: 8px;
}

.meta-badge {
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-primary);
    border-radius: 20px;
}

.meta-badge.tone {
    background: rgba(34, 211, 238, 0.15);
    color: var(--accent-secondary);
}

.venue-card-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
}

.view-details {
    font-size: 0.875rem;
    color: var(--accent-primary);
    font-weight: 500;
    transition: transform var(--transition-normal);
    display: inline-block;
}

.venue-card:hover .view-details {
    transform: translateX(4px);
}

/* ============================================
   Venue Detail Page
   ============================================ */

.venue-detail-page {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.detail-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.card-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.card-body {
    padding: 24px;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

.info-item.full-width {
    grid-column: 1 / -1;
}

.info-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 0.95rem;
    color: var(--text-primary);
}

/* Data Status */
.data-status-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.status-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius);
}

.status-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.status-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-primary);
}

/* Upload Section */
.upload-section {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    padding: 32px;
}

.section-header {
    margin-bottom: 24px;
}

.section-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.upload-card {
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.upload-card:hover {
    border-color: var(--border-light);
}

.upload-card-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 20px;
}

.upload-type-icon {
    font-size: 1.75rem;
    flex-shrink: 0;
}

.upload-card-title {
    flex: 1;
}

.upload-card-title h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.upload-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    line-height: 1.4;
}

/* Dropzone Styles */
.upload-dropzone {
    margin-bottom: 16px;
    padding: 28px 20px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.03) 0%, rgba(139, 92, 246, 0.03) 100%);
    border: 2px dashed var(--border-light);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.upload-dropzone::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.upload-dropzone:hover {
    border-color: var(--accent-primary);
}

.upload-dropzone:hover::before {
    opacity: 1;
}

.upload-dropzone:hover .dropzone-svg {
    transform: translateY(-4px);
}

.upload-dropzone.drag-over {
    border-color: var(--accent-primary);
    border-style: solid;
    transform: scale(1.02);
}

.upload-dropzone.drag-over::before {
    opacity: 1;
}

.upload-dropzone.has-file {
    border-color: var(--accent-success);
    border-style: solid;
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.08) 0%, rgba(34, 197, 94, 0.08) 100%);
}

.upload-dropzone.has-file::before {
    display: none;
}

.dropzone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: none;
    position: relative;
    z-index: 1;
}

.dropzone-icon-wrapper {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 50%;
    margin-bottom: 4px;
}

.dropzone-svg {
    width: 28px;
    height: 28px;
    color: var(--accent-primary);
    transition: transform var(--transition-normal);
}

.dropzone-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
}

.dropzone-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.upload-dropzone.has-file .dropzone-content {
    display: none;
}

/* File info when selected */
.dropzone-file-info {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: none;
}

.upload-dropzone.has-file .dropzone-file-info {
    display: flex;
}

.file-check-icon {
    width: 40px;
    height: 40px;
    color: var(--accent-success);
}

.file-name {
    font-size: 0.85rem;
    color: var(--accent-success);
    font-weight: 500;
    word-break: break-all;
    text-align: center;
    max-width: 100%;
}

/* Upload Button */
.btn-upload {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-secondary);
    cursor: not-allowed;
    transition: all var(--transition-normal);
}

.btn-upload:not(:disabled) {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-upload:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-upload svg {
    flex-shrink: 0;
}

/* Campaigns Section */
.campaigns-section {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    padding: 32px;
}

.campaigns-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.campaigns-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.campaign-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.campaign-item:hover {
    border-color: var(--accent-primary);
    transform: translateX(4px);
}

.campaign-type-badge {
    padding: 6px 12px;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.campaign-type-badge.item_order {
    background: rgba(99, 102, 241, 0.2);
    color: var(--accent-primary);
}

.campaign-type-badge.high_value_booking {
    background: rgba(34, 211, 238, 0.2);
    color: var(--accent-secondary);
}

.campaign-type-badge.repeat_visit {
    background: rgba(244, 114, 182, 0.2);
    color: var(--accent-tertiary);
}

.campaign-info {
    flex: 1;
}

.campaign-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.campaign-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.campaign-meta {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.campaign-arrow {
    color: var(--accent-primary);
    font-size: 1.2rem;
}

.empty-campaigns {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

.empty-campaigns p {
    margin-bottom: 16px;
}

/* ============================================
   Campaigns Table
   ============================================ */

.campaigns-table-container {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

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

.campaigns-table th,
.campaigns-table td {
    padding: 16px 20px;
    text-align: left;
}

.campaigns-table th {
    background: var(--bg-tertiary);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

.campaigns-table tr {
    border-bottom: 1px solid var(--border-color);
}

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

.campaigns-table tr.clickable-row {
    cursor: pointer;
    transition: background var(--transition-fast);
}

.campaigns-table tr.clickable-row:hover {
    background: var(--bg-tertiary);
}

.campaign-name-cell {
    display: flex;
    flex-direction: column;
}

.campaign-name {
    font-weight: 600;
}

.campaign-subject {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.type-badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
}

.type-badge.item_order {
    background: rgba(99, 102, 241, 0.2);
    color: var(--accent-primary);
}

.type-badge.high_value_booking {
    background: rgba(34, 211, 238, 0.2);
    color: var(--accent-secondary);
}

.type-badge.repeat_visit {
    background: rgba(244, 114, 182, 0.2);
    color: var(--accent-tertiary);
}

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

/* ============================================
   Campaign Detail Page
   ============================================ */

.campaign-detail-page {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.campaign-header-card {
    background: var(--gradient-card);
    border-radius: var(--border-radius-lg);
    padding: 32px;
    display: flex;
    align-items: center;
    gap: 24px;
    border: 1px solid var(--border-color);
}

.campaign-type-badge.large {
    padding: 12px 20px;
    font-size: 0.85rem;
}

.campaign-header-info h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.campaign-schedule {
    display: flex;
    gap: 24px;
}

.schedule-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.campaign-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.content-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.content-card .card-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.content-text {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* Email Preview */
.email-preview-section {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    padding: 32px;
}

.email-preview-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.email-preview {
    background: var(--bg-tertiary);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.email-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.email-subject,
.email-preview-text {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
}

.email-preview-text {
    margin-bottom: 0;
}

.email-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    min-width: 60px;
}

.email-value {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.email-body-preview {
    padding: 24px;
}

.email-mock {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 16px;
}

.email-mock-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.mock-avatar {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 50%;
}

.mock-sender {
    display: flex;
    flex-direction: column;
}

.mock-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.mock-subject {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.email-mock-preview {
    font-size: 0.9rem;
    color: var(--text-muted);
    padding-left: 52px;
}

/* Venue Info Section */
.venue-info-section {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    padding: 32px;
}

.venue-info-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.venue-link-card {
    background: var(--bg-tertiary);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.venue-link-content {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    cursor: pointer;
    transition: background var(--transition-normal);
}

.venue-link-content:hover {
    background: var(--bg-card-hover);
}

.venue-link-content .venue-icon {
    font-size: 2rem;
}

.venue-details {
    flex: 1;
}

.venue-details h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.venue-details p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.venue-badges {
    display: flex;
    gap: 8px;
}

.badge {
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: 500;
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-primary);
    border-radius: 20px;
}

.venue-arrow {
    font-size: 1.2rem;
    color: var(--accent-primary);
}

/* ============================================
   Campaign Generate Page
   ============================================ */

.campaign-generate-page {
    max-width: 1000px;
    margin: 0 auto;
}

.venue-summary-card {
    background: var(--gradient-card);
    border-radius: var(--border-radius-lg);
    padding: 24px 32px;
    display: flex;
    align-items: center;
    gap: 20px;
    border: 1px solid var(--border-color);
    margin-bottom: 32px;
}

.venue-summary-card .venue-icon {
    font-size: 2.5rem;
}

.venue-summary-card .venue-info {
    flex: 1;
}

.venue-summary-card .venue-info h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.venue-summary-card .venue-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.campaign-types-section {
    margin-bottom: 32px;
}

.campaign-types-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.section-desc {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.campaign-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.campaign-type-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.campaign-type-card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
}

.campaign-type-card.selected {
    border-color: var(--accent-primary);
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.2);
}

.type-icon {
    font-size: 2rem;
    margin-bottom: 16px;
}

.type-content h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.type-content p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.type-features {
    list-style: none;
    margin-bottom: 16px;
}

.type-features li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding-left: 20px;
    position: relative;
    margin-bottom: 6px;
}

.type-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-success);
}

.type-requirements {
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.req-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.req-badge {
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 12px;
    background: rgba(248, 113, 113, 0.15);
    color: var(--accent-danger);
}

.req-badge.available {
    background: rgba(52, 211, 153, 0.15);
    color: var(--accent-success);
}

.req-badge.missing {
    background: rgba(248, 113, 113, 0.15);
    color: var(--accent-danger);
}

/* Generate Section */
.generate-section {
    text-align: center;
    padding: 40px;
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
}

.generate-section .btn-large {
    min-width: 300px;
}

.generate-hint {
    margin-top: 16px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Generation Progress */
.generation-progress {
    margin-top: 32px;
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    padding: 40px;
}

.progress-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-bottom: 32px;
}

.progress-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.progress-text h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.progress-text p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.progress-steps {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.step {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
    opacity: 0.5;
    transition: all var(--transition-normal);
}

.step.active {
    opacity: 1;
    color: var(--accent-primary);
}

.step-icon {
    font-size: 1.2rem;
}

/* ============================================
   Loading & Toast States
   ============================================ */

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px;
    color: var(--text-muted);
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 14, 23, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.loading-overlay.hidden {
    display: none;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.loading-spinner .spinner {
    width: 48px;
    height: 48px;
}

/* Toast Container */
#toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
}

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

.toast.success {
    border-left: 4px solid var(--accent-success);
}

.toast.error {
    border-left: 4px solid var(--accent-danger);
}

.toast-icon {
    font-size: 1.2rem;
}

.toast-message {
    flex: 1;
    font-size: 0.9rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 40px;
}

.empty-state.hidden {
    display: none;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.error-state {
    text-align: center;
    padding: 40px;
    color: var(--accent-danger);
}

/* Hidden utility */
.hidden {
    display: none !important;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 1024px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .campaign-content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform var(--transition-normal);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .top-header {
        padding: 0 16px;
    }
    
    .content-area {
        padding: 16px;
    }
    
    .welcome-card {
        flex-direction: column;
        text-align: center;
    }
    
    .welcome-illustration {
        display: none;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        flex-direction: column;
    }
    
    .campaigns-table th:nth-child(4),
    .campaigns-table td:nth-child(4),
    .campaigns-table th:nth-child(5),
    .campaigns-table td:nth-child(5) {
        display: none;
    }
}
