/* Social Media AI Agent - Web Interface Styles */
/* Modern, professional design with wellness-inspired color palette */

:root {
    /* Art Deco Gold & Cream Color Palette */
    --primary-color: hsl(43, 74%, 49%); /* Beautiful gold */
    --primary-light: hsl(38, 82%, 58%); /* Lighter gold */
    --primary-dark: hsl(43, 74%, 39%); /* Deeper gold */
    --secondary-color: hsl(184, 28%, 76%); /* Elegant teal-blue */
    --accent-color: hsl(184, 35%, 85%); /* Light accent blue */
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --info-color: hsl(43, 74%, 49%);
    
    /* Art Deco Backgrounds - Warm Creams */
    --background-primary: hsl(36, 33%, 97%); /* Warm cream */
    --background-secondary: hsl(36, 50%, 98%); /* Card background */
    --background-tertiary: hsl(36, 33%, 95%); /* Subtle gradient end */
    --surface: hsl(36, 50%, 98%); /* Card surface */
    --surface-elevated: #ffffff;
    
    /* Art Deco Text Colors */
    --text-primary: hsl(30, 25%, 20%); /* Rich dark brown */
    --text-secondary: hsl(30, 15%, 45%); /* Muted brown */
    --text-muted: hsl(30, 10%, 65%); /* Light muted */
    --border-color: hsl(43, 30%, 85%); /* Warm gold border */
    --border-light: hsl(36, 33%, 92%); /* Light cream border */
    
    /* Art Deco Gradients */
    --gradient-gold: linear-gradient(135deg, hsl(43, 74%, 49%) 0%, hsl(38, 82%, 58%) 100%);
    --gradient-subtle: linear-gradient(180deg, hsl(36, 50%, 98%) 0%, hsl(36, 33%, 95%) 100%);
    --gradient-accent: linear-gradient(135deg, hsl(184, 35%, 85%) 0%, hsl(184, 28%, 76%) 100%);
    
    /* Art Deco Shadows */
    --shadow-elegant: 0 4px 20px -4px hsl(43, 74%, 49%, 0.15);
    --shadow-card: 0 2px 12px -2px hsl(30, 25%, 20%, 0.08);
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    --border-radius-sm: 0.375rem;
    --border-radius-md: 0.5rem;
    --border-radius-lg: 0.75rem;
    --border-radius-xl: 1rem;
    
    --font-family-sans: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-family-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --font-family-mono: 'SF Mono', Monaco, Inconsolata, 'Roboto Mono', Consolas, monospace;
}

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

body {
    font-family: var(--font-family-sans);
    background: var(--gradient-subtle);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-serif);
    font-weight: 600;
    color: var(--text-primary);
}

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

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 2px solid var(--border-color);
    box-shadow: var(--shadow-card);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-gold);
}

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

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

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

.logo h1 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: var(--font-family-serif);
    letter-spacing: 0.025em;
}

/* Navigation Tabs */
.nav-tabs {
    display: flex;
    gap: 0.5rem;
}

.nav-tab {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    border-radius: var(--border-radius-lg);
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

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

.nav-tab.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    box-shadow: var(--shadow-elegant);
    font-weight: 600;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    font-weight: 600;
    letter-spacing: 0.025em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, hsl(43, 74%, 44%) 0%, hsl(184, 28%, 71%) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-elegant);
}

.btn-secondary {
    background: var(--background-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

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

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

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

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

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

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: none;
    border-radius: var(--border-radius-sm);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: var(--background-tertiary);
    color: var(--text-primary);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

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

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

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

.content-header h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: var(--font-family-serif);
    letter-spacing: 0.025em;
    text-align: center;
    width: 100%;
}

/* Queue Stats */
.queue-stats {
    display: flex;
    gap: 1rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
}

.stat-card i {
    font-size: 1.25rem;
    color: var(--primary-color);
}

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

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

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 1.5rem;
}

.content-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: all 0.2s ease;
}

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

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--background-secondary);
    border-bottom: 1px solid var(--border-light);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    border-radius: var(--border-radius-md);
    font-size: 0.8125rem;
    font-weight: 500;
}

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

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

.status-scheduled {
    background: #dbeafe;
    color: #1e40af;
}

.status-published {
    background: #e0e7ff;
    color: #5b21b6;
}

.status-failed {
    background: #fee2e2;
    color: #991b1b;
}

.card-actions {
    display: flex;
    gap: 0.25rem;
}

.card-content {
    padding: 1rem;
}

.content-preview {
    margin-bottom: 1rem;
}

.content-preview h4 {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.content-preview p {
    color: var(--text-primary);
    line-height: 1.5;
}

.visual-prompt {
    margin-bottom: 1rem;
}

.visual-prompt h4 {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.visual-prompt p {
    color: var(--text-secondary);
    font-style: italic;
    line-height: 1.4;
}

.hashtags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.hashtag {
    padding: 0.25rem 0.5rem;
    background: var(--primary-color);
    color: white;
    border-radius: var(--border-radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}

.card-footer {
    padding: 1rem;
    background: var(--background-secondary);
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

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

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

/* Forms */
.create-form {
    max-width: 800px;
    margin: 0 auto;
}

.form-section {
    margin-bottom: 1.5rem;
    padding: 2rem;
    background: var(--surface);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.form-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-gold);
}

.form-section h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.form-group label {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    background: var(--surface);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px hsl(43, 74%, 49%, 0.15);
    transform: translateY(-1px);
}

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

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
}

/* Settings */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.settings-section {
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
}

.settings-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-family: var(--font-family-serif);
    letter-spacing: 0.025em;
}

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

.analytics-card {
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
}

.analytics-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.metric {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

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

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

.chart-container {
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--surface);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-xl);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.2s ease;
}

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

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: var(--border-radius-sm);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--background-tertiary);
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--background-secondary);
}

/* Loading */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.loading.active {
    opacity: 1;
    visibility: visible;
}

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

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

.loading p {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    min-width: 300px;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
}

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

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

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

.toast-warning {
    border-left: 4px solid var(--warning-color);
}

.toast-info {
    border-left: 4px solid var(--info-color);
}

.toast i {
    font-size: 1.125rem;
}

.toast-success i {
    color: var(--success-color);
}

.toast-error i {
    color: var(--error-color);
}

.toast-warning i {
    color: var(--warning-color);
}

.toast-info i {
    color: var(--info-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .nav-tabs {
        width: 100%;
        justify-content: center;
    }

    .nav-tab {
        flex: 1;
        text-align: center;
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
    }

    .main-content {
        padding: 1rem;
    }

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

    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .queue-stats {
        width: 100%;
        justify-content: space-between;
    }

    .stat-card {
        flex: 1;
        flex-direction: column;
        text-align: center;
        padding: 0.75rem;
    }

    .analytics-grid,
    .settings-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        margin: 1rem;
    }

    .toast {
        min-width: auto;
        width: calc(100vw - 2rem);
        margin: 0 1rem;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1rem;
    }

    .nav-tab {
        padding: 0.5rem 0.25rem;
        font-size: 0.8125rem;
    }

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

    .content-header h2 {
        font-size: 1.5rem;
    }

    .card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .action-buttons {
        width: 100%;
        justify-content: flex-end;
    }
}

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

/* Focus styles for keyboard navigation */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
        --text-secondary: #000000;
    }
}

/* Scheduling Interface Styles */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--surface);
}

.radio-option:hover {
    border-color: var(--primary-light);
    background: var(--surface);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.radio-option input[type="radio"] {
    margin: 0;
}

.radio-option input[type="radio"]:checked + .radio-label {
    color: var(--primary-color);
    font-weight: 600;
}

.radio-option:has(input[type="radio"]:checked) {
    border-color: var(--primary-color);
    background: hsl(43, 74%, 49%, 0.1);
    box-shadow: 0 0 0 3px hsl(43, 74%, 49%, 0.15);
}

.quick-schedule {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.quick-schedule span {
    font-size: 14px;
    color: var(--text-secondary);
    margin-right: 8px;
}

.btn-quick-schedule {
    padding: 6px 12px;
    font-size: 12px;
    background: var(--background-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-quick-schedule:hover {
    background: var(--primary-light);
    color: white;
    border-color: var(--primary-light);
}

.platform-checkboxes {
    display: flex;
    gap: 16px;
}

.checkbox-option {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--surface);
}

.checkbox-option .checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.checkbox-option .help-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-left: 28px;
    margin-top: 2px;
}

.checkbox-option:hover {
    border-color: var(--primary-light);
    background: var(--surface);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.checkbox-option:has(input[type="checkbox"]:checked) {
    border-color: var(--primary-color);
    background: hsl(43, 74%, 49%, 0.1);
    box-shadow: 0 0 0 3px hsl(43, 74%, 49%, 0.15);
}

.checkbox-option input[type="checkbox"]:checked + .checkbox-label {
    color: var(--primary-color);
    font-weight: 600;
}

/* Quick schedule buttons */
.quick-schedule {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.quick-schedule span {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.btn-quick-schedule {
    padding: 6px 12px;
    font-size: 0.875rem;
    background: var(--background-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-quick-schedule:hover {
    background: var(--primary-light);
    color: white;
    border-color: var(--primary-light);
}

/* Scheduled Posts Tab */
.schedule-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.schedule-filter select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--surface);
}

.schedule-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.scheduled-posts-container {
    background: var(--surface);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.scheduled-posts-grid {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--border-light);
}

.scheduled-post-item {
    background: var(--surface);
    padding: 20px;
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 16px;
    align-items: center;
    transition: all 0.2s ease;
}

.scheduled-post-item:hover {
    background: var(--background-secondary);
}

.post-status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.post-status-indicator.scheduled {
    background: var(--warning-color);
}

.post-status-indicator.posted {
    background: var(--success-color);
}

.post-status-indicator.failed {
    background: var(--error-color);
}

.post-status-indicator.cancelled {
    background: var(--text-muted);
}

.scheduled-post-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.scheduled-post-preview {
    font-size: 16px;
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.4;
}

.scheduled-post-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    color: var(--text-secondary);
}

.scheduled-post-time {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    font-size: 14px;
}

.scheduled-time {
    color: var(--text-primary);
    font-weight: 600;
}

.scheduled-date {
    color: var(--text-secondary);
    margin-top: 2px;
}

.scheduled-post-actions {
    display: flex;
    gap: 8px;
}

.btn-schedule-action {
    padding: 6px 8px;
    font-size: 12px;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-edit-schedule {
    background: var(--info-color);
    color: white;
}

.btn-edit-schedule:hover {
    background: rgba(59, 130, 246, 0.8);
}

.btn-cancel-schedule {
    background: var(--error-color);
    color: white;
}

.btn-cancel-schedule:hover {
    background: rgba(239, 68, 68, 0.8);
}

.btn-delete-schedule {
    background: var(--text-muted);
    color: white;
}

.btn-delete-schedule:hover {
    background: rgba(156, 163, 175, 0.8);
}

.empty-schedule {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-schedule i {
    font-size: 48px;
    margin-bottom: 16px;
    color: var(--text-muted);
}

/* Text color utilities */
.text-warning { color: var(--warning-color); }
.text-success { color: var(--success-color); }
.text-danger { color: var(--error-color); }
.text-info { color: var(--info-color); }

/* Enhanced Schedule Modal Styles */
.schedule-content-preview {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.schedule-content-preview h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
}

.schedule-content-preview p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.schedule-options {
    margin-bottom: 1.5rem;
}

.schedule-options h4 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
}

.publish-option {
    margin-bottom: 0.75rem;
}

.publish-option input[type="radio"] {
    display: none;
}

.publish-option label {
    display: block;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--surface-color);
}

.publish-option label:hover {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.05);
}

.publish-option input[type="radio"]:checked + label {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.1);
}

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

.option-content i {
    font-size: 1.25rem;
    color: var(--primary-color);
    width: 24px;
    text-align: center;
}

.option-content div strong {
    display: block;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.option-content div p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.3;
}

.quick-schedule-section,
.custom-datetime-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.quick-schedule-section h4,
.custom-datetime-section h4 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
}

.quick-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.5rem;
}

.quick-buttons .btn {
    padding: 0.75rem;
    font-size: 0.875rem;
    text-align: center;
    transition: all 0.2s ease;
}

.quick-buttons .btn i {
    margin-right: 0.5rem;
}

.quick-buttons .btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.quick-buttons .btn.selected {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.datetime-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.datetime-inputs .form-group {
    margin-bottom: 0;
}

.datetime-inputs label {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
}

.datetime-inputs input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-color);
    color: var(--text-primary);
    font-size: 0.875rem;
}

.timezone-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.timezone-info i {
    color: var(--text-muted);
}

.schedule-preview {
    padding: 0.75rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 6px;
    margin-bottom: 1rem;
}

.preview-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-size: 0.875rem;
}

.preview-box i {
    font-size: 1rem;
}

/* Mobile responsiveness for schedule modal */
@media (max-width: 768px) {
    .datetime-inputs {
        grid-template-columns: 1fr;
    }
    
    .quick-buttons {
        grid-template-columns: 1fr;
    }
    
    .option-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .option-content i {
        align-self: center;
    }
}

/* ======================================
   ENHANCED SCHEDULED POSTS TABLE STYLES
   ====================================== */

/* Enhanced Schedule Controls */
.schedule-filters {
    display: flex;
    gap: 12px;
    align-items: center;
}

.schedule-filters select {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    background: var(--surface);
    color: var(--text-primary);
    font-size: 14px;
    min-width: 140px;
    transition: border-color 0.2s ease;
}

.schedule-filters select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 85, 48, 0.1);
}

/* Enhanced Stats Section */
.schedule-stats-enhanced {
    margin-bottom: 32px;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

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

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-pending .stat-icon {
    background: rgba(251, 191, 36, 0.1);
    color: var(--warning-color);
}

.stat-approved .stat-icon {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.stat-scheduled .stat-icon {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info-color);
}

.stat-published .stat-icon {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.stat-failed .stat-icon {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
}

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

.stat-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 4px;
}

/* Performance Metrics */
.performance-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.metric-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 20px;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.metric-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.metric-header i {
    color: var(--primary-color);
    font-size: 16px;
}

.metric-header span {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.metric-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1;
}

.metric-trend {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 500;
}

.metric-trend i {
    font-size: 10px;
}

.metric-trend .fa-arrow-up {
    color: var(--success-color);
}

.metric-trend .fa-arrow-down {
    color: var(--error-color);
}

/* Posts Table Container */
.posts-table-container {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    background: var(--background-secondary);
}

.table-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

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

.table-actions .btn-sm {
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
}

/* Table Styles */
.table-responsive {
    overflow-x: auto;
}

.posts-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.posts-table thead {
    background: var(--background-tertiary);
}

.posts-table th {
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.posts-table th:first-child {
    padding-left: 24px;
    width: 40px;
}

.posts-table th:last-child {
    padding-right: 24px;
    width: 120px;
}

.posts-table tbody tr {
    border-bottom: 1px solid var(--border-light);
    transition: background-color 0.15s ease;
}

.posts-table tbody tr:hover {
    background: var(--background-secondary);
}

.posts-table td {
    padding: 16px 12px;
    vertical-align: middle;
}

.posts-table td:first-child {
    padding-left: 24px;
}

.posts-table td:last-child {
    padding-right: 24px;
}

/* Table Cell Content */
.post-id {
    font-family: var(--font-family-mono);
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.post-content-preview {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
    color: var(--text-primary);
}

.post-content-preview:hover {
    color: var(--primary-color);
    cursor: pointer;
}

.platform-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--border-radius-sm);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.platform-badge.facebook {
    background: rgba(24, 119, 242, 0.1);
    color: #1877f2;
}

.platform-badge.instagram {
    background: rgba(225, 48, 108, 0.1);
    color: #e1306c;
}

.platform-badge.both {
    background: rgba(139, 92, 246, 0.1);
    color: var(--secondary-color);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--border-radius-sm);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.pending {
    background: rgba(251, 191, 36, 0.1);
    color: var(--warning-color);
    border: 1px solid rgba(251, 191, 36, 0.2);
}

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

.status-badge.scheduled {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info-color);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.status-badge.processing {
    background: rgba(139, 92, 246, 0.1);
    color: var(--secondary-color);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.status-badge.published {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

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

.status-badge.cancelled {
    background: rgba(156, 163, 175, 0.1);
    color: var(--text-muted);
    border: 1px solid rgba(156, 163, 175, 0.2);
}

.datetime-cell {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.datetime-primary {
    font-weight: 500;
    color: var(--text-primary);
}

.datetime-relative {
    font-size: 12px;
    color: var(--text-muted);
}

.engagement-metric {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.engagement-metric i {
    font-size: 12px;
    color: var(--text-muted);
}

.engagement-high {
    color: var(--success-color);
}

.engagement-medium {
    color: var(--warning-color);
}

.engagement-low {
    color: var(--text-muted);
}

.reach-metric {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.reach-metric i {
    font-size: 12px;
    color: var(--text-muted);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 4px;
}

.btn-action {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 12px;
}

.btn-action.btn-edit {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info-color);
}

.btn-action.btn-edit:hover {
    background: rgba(59, 130, 246, 0.2);
}

.btn-action.btn-delete {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
}

.btn-action.btn-delete:hover {
    background: rgba(239, 68, 68, 0.2);
}

.btn-action.btn-approve {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.btn-action.btn-approve:hover {
    background: rgba(16, 185, 129, 0.2);
}

.btn-action.btn-reschedule {
    background: rgba(251, 191, 36, 0.1);
    color: var(--warning-color);
}

.btn-action.btn-reschedule:hover {
    background: rgba(251, 191, 36, 0.2);
}

.btn-action.btn-view {
    background: rgba(139, 92, 246, 0.1);
    color: var(--secondary-color);
}

.btn-action.btn-view:hover {
    background: rgba(139, 92, 246, 0.2);
}

/* Table Pagination */
.table-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    background: var(--background-secondary);
}

.pagination-info {
    font-size: 14px;
    color: var(--text-secondary);
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-numbers {
    display: flex;
    gap: 4px;
    margin: 0 16px;
}

.page-number {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-color);
    background: var(--surface);
    color: var(--text-secondary);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 13px;
    font-weight: 500;
}

.page-number:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.page-number.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.page-number.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Loading States */
.table-loading {
    padding: 40px;
    text-align: center;
    color: var(--text-muted);
}

.table-loading i {
    font-size: 24px;
    margin-bottom: 12px;
    animation: spin 1s linear infinite;
}

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

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

.table-empty i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
    .stats-row {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .performance-metrics {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .schedule-filters {
        flex-wrap: wrap;
    }
    
    .table-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
}

/* New Options Grid Layout */
.options-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

.option-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.publish-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.publish-options .radio-option {
    padding: 1.5rem;
}

.publish-options .option-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
}

.option-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.option-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.option-details .radio-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.option-details small {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.schedule-time-section {
    background: var(--background-secondary);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    margin-top: 1rem;
}

/* Help text styling */
.help-text {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    line-height: 1.4;
}

/* Settings specific styling */
.settings-section textarea {
    min-height: 120px;
    font-family: var(--font-family-sans);
    resize: vertical;
}

.settings-section .checkbox-option {
    margin-top: 1rem;
}

/* Mobile first responsive design */
@media (min-width: 768px) {
    .options-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .stats-row {
        grid-template-columns: 1fr;
    }
    
    .performance-metrics {
        grid-template-columns: 1fr;
    }
    
    .posts-table {
        font-size: 13px;
    }
    
    .form-section {
        padding: 1.5rem;
    }
    
    .publish-options .option-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .option-icon {
        font-size: 2rem;
        align-self: center;
    }
    
    .posts-table th,
    .posts-table td {
        padding: 12px 8px;
    }
    
    .posts-table th:first-child,
    .posts-table td:first-child {
        padding-left: 16px;
    }
    
    .posts-table th:last-child,
    .posts-table td:last-child {
        padding-right: 16px;
    }
    
    .post-content-preview {
        max-width: 150px;
    }
    
    .table-pagination {
        flex-direction: column;
        gap: 16px;
        align-items: center;
    }
    
    .pagination-controls {
        justify-content: center;
    }
}

/* ===============================================
   Design Studio Integrated Sections
   =============================================== */

/* Design Section Container */
.design-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--surface-elevated);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-card);
}

.section-header {
    margin-bottom: 1.5rem;
    text-align: center;
}

.section-header h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-family: var(--font-family-serif);
    font-size: 1.5rem;
}

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

/* Visual Selection Tabs */
.visual-tabs {
    display: flex;
    background: var(--background-tertiary);
    border-radius: var(--border-radius-md);
    padding: 0.25rem;
    margin-bottom: 1.5rem;
    gap: 0.25rem;
}

.visual-tab {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    font-weight: 500;
}

.visual-tab:hover {
    background: rgba(255, 255, 255, 0.5);
    color: var(--text-primary);
}

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

.visual-tab i {
    margin-right: 0.5rem;
}

/* Visual Content */
.visual-content {
    min-height: 200px;
}

.visual-tab-content {
    display: none;
}

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

/* Upload Area */
.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--background-primary);
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: var(--background-secondary);
}

.upload-area.dragover {
    border-color: var(--primary-color);
    background: rgba(218, 165, 32, 0.1);
}

.upload-instructions i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.upload-instructions h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.upload-instructions p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.upload-instructions small {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Uploaded Images Grid */
.uploaded-images {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
}

.uploaded-image {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    border: 2px solid var(--border-light);
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.uploaded-image.selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-color);
}

.uploaded-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.uploaded-image .remove-btn {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.7rem;
}

/* Image Library Styles */
.library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    padding: 1rem 0;
}

.library-image {
    background: var(--surface-elevated);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-card);
    transition: all 0.3s ease;
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.library-image:hover {
    box-shadow: var(--shadow-elegant);
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.library-image-preview {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.library-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.library-image:hover .library-image-preview img {
    transform: scale(1.05);
}

.library-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.library-image:hover .library-image-overlay {
    opacity: 1;
}

.library-image-info {
    padding: 1rem;
}

.image-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.image-metadata {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.content-type-tag {
    background: var(--primary-color);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.content-type-tag.facebook-post { background: #4267B2; }
.content-type-tag.facebook-story { background: #4267B2; }
.content-type-tag.facebook-reel { background: #4267B2; }
.content-type-tag.post { background: #E4405F; }
.content-type-tag.story { background: #E4405F; }
.content-type-tag.reel { background: #E4405F; }

.image-stats {
    color: var(--text-muted);
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.image-dimensions {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

/* Library States */
.library-loading,
.library-empty,
.library-error {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.library-loading i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    animation: spin 1s linear infinite;
}

.library-empty i {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.library-empty h4 {
    margin: 1rem 0 0.5rem 0;
    color: var(--text-primary);
}

.library-error i {
    font-size: 2rem;
    color: var(--error-color);
    margin-bottom: 1rem;
}

/* Selected Image Indicator */
.uploaded-image.selected {
    border: 2px solid var(--primary-color);
    position: relative;
}

.selection-indicator {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    border: 2px solid var(--surface-elevated);
    box-shadow: var(--shadow-sm);
}

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

/* Canva Connect */
.canva-connect {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.connect-placeholder {
    text-align: center;
    padding: 2rem;
}

.connect-placeholder i {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.connect-placeholder h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.connect-placeholder p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Library Grid */
.library-grid {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.library-placeholder {
    text-align: center;
    color: var(--text-muted);
}

.library-placeholder i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

/* Social Media Mocks */
.preview-container {
    margin-bottom: 2rem;
}

.social-mock {
    max-width: 400px;
    margin: 0 auto;
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

/* Facebook Mock */
.facebook-mock {
    border: 1px solid #e4e6ea;
}

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

.facebook-mock .profile-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.facebook-mock .profile-pic img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.facebook-mock .profile-name {
    font-weight: 600;
    color: #1c1e21;
    font-size: 0.9rem;
}

.facebook-mock .post-time {
    font-size: 0.8rem;
    color: #65676b;
}

.facebook-mock .post-options {
    color: #65676b;
    cursor: pointer;
    padding: 0.5rem;
}

.facebook-mock .mock-text {
    padding: 0 1rem 1rem;
    color: #1c1e21;
    line-height: 1.4;
    font-size: 0.9rem;
}

.facebook-mock .mock-image {
    background: #f0f2f5;
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #65676b;
}

.facebook-mock .mock-actions {
    display: flex;
    border-top: 1px solid #e4e6ea;
    padding: 0.5rem;
}

.facebook-mock .action-btn {
    flex: 1;
    text-align: center;
    padding: 0.5rem;
    color: #65676b;
    cursor: pointer;
    border-radius: var(--border-radius-sm);
    font-size: 0.85rem;
}

.facebook-mock .action-btn:hover {
    background: #f0f2f5;
}

.facebook-mock .action-btn i {
    margin-right: 0.5rem;
}

/* Instagram Mock */
.instagram-mock {
    border: 1px solid #dbdbdb;
}

.instagram-mock .mock-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
}

.instagram-mock .profile-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.instagram-mock .gradient-ring {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    border-radius: 50%;
    padding: 2px;
}

.instagram-mock .gradient-ring img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid white;
}

.instagram-mock .profile-name {
    font-weight: 600;
    color: #262626;
    font-size: 0.85rem;
}

.instagram-mock .location {
    font-size: 0.75rem;
    color: #8e8e8e;
}

.instagram-mock .post-options {
    color: #262626;
    cursor: pointer;
}

.instagram-mock .mock-image {
    background: #f5f5f5;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8e8e8e;
}

.instagram-mock .mock-content {
    padding: 1rem;
}

.instagram-mock .action-buttons {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.instagram-mock .left-actions {
    display: flex;
    gap: 1rem;
}

.instagram-mock .left-actions i,
.instagram-mock .right-actions i {
    font-size: 1.1rem;
    color: #262626;
    cursor: pointer;
}

.instagram-mock .engagement-info {
    margin-bottom: 0.5rem;
}

.instagram-mock .likes {
    font-weight: 600;
    font-size: 0.85rem;
    color: #262626;
    margin-bottom: 0.25rem;
}

.instagram-mock .post-time {
    font-size: 0.7rem;
    color: #8e8e8e;
    text-transform: uppercase;
}

.instagram-mock .mock-text {
    font-size: 0.85rem;
    line-height: 1.4;
    color: #262626;
}

.instagram-mock .username {
    font-weight: 600;
    margin-right: 0.5rem;
}

.instagram-mock .caption {
    color: #262626;
}

/* Editable Preview */
.editable-preview {
    outline: none;
    border-radius: var(--border-radius-sm);
    transition: all 0.2s ease;
}

.editable-preview:focus {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 2px var(--primary-color);
}

.editable-preview:empty:before {
    content: attr(data-placeholder);
    color: #8e8e8e;
    font-style: italic;
}

/* Image Placeholder */
.image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 100%;
    padding: 2rem;
}

.image-placeholder i {
    font-size: 2rem;
    opacity: 0.5;
}

.image-placeholder p {
    margin: 0;
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Design Actions */
.design-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
}

.design-actions .btn {
    flex: 1;
    max-width: 150px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .design-section {
        margin-top: 1.5rem;
        padding: 1rem;
    }
    
    .visual-tabs {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .visual-tab {
        text-align: center;
    }
    
    .upload-area {
        padding: 1.5rem 1rem;
    }
    
    .uploaded-images {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.75rem;
    }
    
    .social-mock {
        max-width: 100%;
        margin: 0;
    }
    
    .design-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .design-actions .btn {
        max-width: none;
    }
}

/* ===== AI PROGRESS SECTION STYLES ===== */
.progress-section {
    background: var(--surface);
    border-radius: var(--border-radius-xl);
    border: 1px solid var(--border-light);
    padding: 1.5rem;
    margin: 1.5rem 0;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: var(--shadow-card);
    animation: slideIn 0.3s ease-out;
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.progress-section.fade-out {
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
}

.progress-section .section-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.progress-section .section-header h3 {
    color: var(--primary-color);
    font-family: var(--font-family-serif);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.progress-section .subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
}

.progress-container {
    max-width: 450px;
    margin: 0 auto;
}

/* Progress Steps */
.progress-steps {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--background-tertiary);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-lg);
    transition: all 0.3s ease;
    position: relative;
}

.progress-step.pending {
    background: var(--background-secondary);
    border-color: var(--border-color);
}

.progress-step.active {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
    border-color: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-elegant);
    animation: pulse 1.5s infinite;
}

.progress-step.completed {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
    border-color: var(--success-color);
    color: white;
    box-shadow: 0 4px 20px -4px rgba(16, 185, 129, 0.3);
}

.progress-step.error {
    background: linear-gradient(135deg, var(--error-color) 0%, #dc2626 100%);
    border-color: var(--error-color);
    color: white;
    box-shadow: 0 4px 20px -4px rgba(239, 68, 68, 0.3);
}

/* Step Icons */
.step-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.progress-step.pending .step-icon {
    background: var(--background-primary);
    color: var(--text-muted);
    border: 2px solid var(--border-color);
}

.progress-step.active .step-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.progress-step.completed .step-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.progress-step.error .step-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

/* Step Content */
.step-content {
    flex: 1;
    min-width: 0;
}

.step-title {
    font-weight: 600;
    font-size: 1rem;
    margin: 0 0 0.25rem 0;
    color: inherit;
}

.step-description {
    font-size: 0.875rem;
    margin: 0;
    opacity: 0.8;
    color: inherit;
}

.progress-step.pending .step-title {
    color: var(--text-secondary);
}

.progress-step.pending .step-description {
    color: var(--text-muted);
}

/* Step Status */
.step-status {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.75rem;
    border-radius: var(--border-radius-sm);
    background: rgba(255, 255, 255, 0.1);
    color: inherit;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.progress-step.pending .step-status {
    background: var(--background-primary);
    color: var(--text-muted);
    border-color: var(--border-color);
}

/* Progress Bar Container */
.progress-bar-container {
    margin-top: 2rem;
}

.progress-bar {
    width: 100%;
    height: 0.5rem;
    background: var(--background-tertiary);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-light);
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-gold);
    border-radius: var(--border-radius-sm);
    transition: width 0.6s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shine 2s infinite;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    font-size: 0.9rem;
}

#currentStepText {
    color: var(--text-primary);
    font-weight: 500;
}

#progressPercentage {
    color: var(--primary-color);
    font-weight: 600;
    font-family: var(--font-family-mono);
}

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

@keyframes pulse {
    0%, 100% {
        box-shadow: var(--shadow-elegant);
    }
    50% {
        box-shadow: var(--shadow-elegant), 0 0 0 4px rgba(220, 184, 65, 0.2);
    }
}

@keyframes shine {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .progress-section {
        padding: 1rem;
        margin: 1rem 0;
        max-width: 90%;
    }
    
    .progress-step {
        padding: 0.75rem 1rem;
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .step-icon {
        width: 2rem;
        height: 2rem;
        font-size: 1rem;
    }
    
    .progress-text {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}