:root {
    /* Color Palette */
    --bg-dark: #0f111a;
    --bg-sidebar: #161b2c;
    --bg-card: #1e2337;
    --bg-input: #121624;

    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);

    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --text-dim: #64748b;

    --border: #2d3748;
    --border-light: rgba(255, 255, 255, 0.08);

    --success: #10b981;
    --danger: #ef4444;

    /* Effects */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --glow: 0 0 20px rgba(99, 102, 241, 0.2);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
}

/* Layout */
.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    flex-shrink: 0;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 2.5rem;
    padding: 0 0.5rem;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--primary-gradient);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    box-shadow: var(--glow);
}

.logo-container h1 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.nav-menu {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-weight: 500;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    font-size: inherit;
    font-family: inherit;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

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

.nav-item i {
    font-size: 1.25rem;
}

.user-profile {
    position: relative;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
}

.user-profile-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.user-profile-trigger:hover {
    background: rgba(255, 255, 255, 0.05);
}

.user-profile-trigger .dropdown-icon {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 14px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    overflow: hidden;
    background: var(--primary-gradient);
    border: 2px solid var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    flex-shrink: 0;
}

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

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

.user-info .name {
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-info .plan {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.user-info .plan.free {
    color: var(--text-muted);
}

.user-info .plan.pro {
    color: #a5b4fc;
}

.user-info .plan.enterprise {
    color: #fcd34d;
}

/* User Dropdown Menu */
.user-dropdown {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 100;
}

.user-profile.open .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.dropdown-item i {
    font-size: 18px;
    color: var(--text-muted);
}

.dropdown-item.logout {
    color: var(--danger);
}

.dropdown-item.logout i {
    color: var(--danger);
}

.dropdown-item.logout:hover {
    background: rgba(239, 68, 68, 0.1);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-light);
    margin: 0.5rem 0;
}

/* Main Content */
.main-content {
    flex: 1;
    background-image: radial-gradient(circle at top right, rgba(99, 102, 241, 0.08), transparent 40%);
    overflow-y: auto;
    position: relative;
    padding: 2rem;
}

/* View Sections */
.view-section {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.view-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2.5rem;
}

.header-text h2 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: -webkit-linear-gradient(right, #fff, #cbd5e1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

/* Buttons */
.btn-primary {
    background: var(--primary-gradient);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

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

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.btn-icon:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

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

.stat-card {
    background: rgba(30, 35, 55, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(99, 102, 241, 0.2);
    background: rgba(30, 35, 55, 0.8);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-icon.purple {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.stat-icon.blue {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

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

.stat-icon.yellow {
    background: rgba(234, 179, 8, 0.1);
    color: #eab308;
}

.stat-info h3 {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.stat-info .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-trend {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.stat-trend.positive {
    color: var(--success);
}

/* Projects Grid */
.section-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-title-row h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.see-all {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit;
}

.see-all:hover {
    text-decoration: underline;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

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

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

.project-preview {
    height: 160px;
    width: 100%;
}

.gradient-1 {
    background: linear-gradient(45deg, #FF9A9E 0%, #FECFEF 99%, #FECFEF 100%);
}

.gradient-2 {
    background: linear-gradient(120deg, #84fab0 0%, #8fd3f4 100%);
}

.gradient-3 {
    background: linear-gradient(to right, #4facfe 0%, #00f2fe 100%);
}

.project-details {
    padding: 1.25rem;
}

.project-details h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

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

/* Chat Layout */
.chat-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 1.5rem;
    height: calc(100vh - 180px);
}

.chat-container {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.message {
    display: flex;
    gap: 1rem;
    max-width: 80%;
}

.message.ai .message-avatar {
    width: 32px;
    height: 32px;
    background: var(--primary-gradient);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.message-content {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 0 var(--radius-md) var(--radius-md) var(--radius-md);
    line-height: 1.5;
}

.chat-input-area {
    padding: 1rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    gap: 0.75rem;
}

.chat-input-area input {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-full);
    color: white;
    outline: none;
    transition: var(--transition);
}

.chat-input-area input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.btn-send {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-full);
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.btn-mic {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-full);
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: var(--transition);
}

.btn-mic:hover {
    background: var(--bg-card);
    color: var(--text-main);
    border-color: var(--primary);
}

.btn-mic.recording {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.ad-preview-panel {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    overflow-y: auto;
}

.ad-preview-panel h3 {
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea,
.select-wrapper select {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    color: white;
    outline: none;
    font-family: inherit;
    transition: var(--transition);
}

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

.form-group input:focus,
.form-group textarea:focus,
.select-wrapper select:focus {
    border-color: var(--primary);
}

.preview-area {
    margin-top: 2rem;
    background: var(--bg-input);
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    gap: 0.5rem;
}

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

/* Library */
.library-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 150px;
}

.filter-group label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-group .select-wrapper select {
    min-width: 150px;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
}

.btn-clear-filters {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--danger);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    transition: var(--transition);
    height: fit-content;
}

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

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

.library-item {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.library-item:hover {
    transform: translateY(-4px);
}

.item-preview {
    height: 140px;
    width: 100%;
}

.item-info {
    padding: 1rem;
}

.item-info h4 {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-dim);
}

.library-item .btn-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
}

/* Settings */
.settings-container {
    display: grid;
    gap: 1.5rem;
    max-width: 800px;
}

.settings-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    padding: 2rem;
}

.settings-card h3 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 1rem;
}

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

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

.setting-text h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.setting-text p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.toggle-switch {
    width: 48px;
    height: 24px;
    background: var(--border);
    border-radius: var(--radius-full);
    position: relative;
    cursor: pointer;
    transition: var(--transition);
}

.toggle-switch.checked {
    background: var(--primary);
}

.toggle-knob {
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: var(--transition);
}

.toggle-switch.checked .toggle-knob {
    left: 26px;
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 500;
}

.danger-zone {
    border-color: rgba(239, 68, 68, 0.2);
}

.danger-zone h3 {
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.1);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}


/* Form Section Headers */
.form-section-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary);
    margin: 2rem 0 1rem 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 0.5rem;
}

.form-section-title:first-child {
    margin-top: 0;
}

.row-group {
    display: flex;
    gap: 1rem;
}


/* Multi-select Chips */
.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.chip-option {
    background: var(--bg-input);
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.chip-option:hover {
    border-color: var(--primary);
    color: var(--text-main);
}

.chip-option.selected {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

/* Folder Styles */
.folder-item {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
    cursor: pointer;
}

.folder-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(99, 102, 241, 0.2);
}

.folder-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.folder-info {
    flex: 1;
}

.folder-info h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

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

.folder-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.folder-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.btn-back {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.btn-back:hover {
    background: var(--bg-card);
    border-color: var(--primary);
}

.folder-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.empty-folder,
.empty-library {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-folder i,
.empty-library i {
    margin-bottom: 1rem;
}

.empty-folder p,
.empty-library p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

/* Ad Detail Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--danger);
}

.modal-image-section {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: var(--bg-input);
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.modal-image-section img {
    width: 100%;
    border-radius: var(--radius-md);
    object-fit: contain;
    max-height: 400px;
    background: var(--bg-dark);
}

.btn-download {
    background: var(--primary-gradient);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.modal-text-section {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.modal-field label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.copyable-text {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem;
    position: relative;
    display: flex;
    gap: 1rem;
}

.copyable-text p,
.copyable-text .copy-content {
    flex: 1;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.btn-copy {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition);
}

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

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

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

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1001;
    background: var(--primary);
    border: none;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 1.5rem;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

/* Tablet */
@media (max-width: 1024px) {
    .chat-layout {
        grid-template-columns: 1fr;
        height: auto;
    }

    .ad-preview-panel {
        max-height: 60vh;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .sidebar-overlay.active {
        display: block;
    }

    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
        width: 260px;
    }

    .sidebar.open {
        left: 0;
    }

    .main-content {
        padding: 1rem;
        padding-top: 4rem;
    }

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

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

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

    .stat-card {
        padding: 1rem;
    }

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

    /* Chat Layout Mobile */
    .chat-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
        height: auto;
    }

    .chat-container {
        height: 50vh;
        min-height: 300px;
    }

    .ad-preview-panel {
        max-height: none;
        height: auto;
    }

    .row-group {
        flex-direction: column;
        gap: 0;
    }

    /* Library Mobile */
    .library-toolbar {
        flex-direction: column;
        gap: 1rem;
    }

    .library-filters {
        flex-direction: column;
        width: 100%;
    }

    .filter-group {
        width: 100%;
        min-width: auto;
    }

    .filter-group .select-wrapper select {
        width: 100%;
        min-width: auto;
    }

    .library-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .library-item .item-info h4 {
        font-size: 0.8rem;
    }

    .item-preview {
        height: 120px;
    }

    /* Header Actions Mobile */
    .header-actions {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }

    .search-bar {
        width: 100%;
    }

    .search-bar input {
        width: 100%;
    }

    /* Bulk Actions Bar Mobile */
    .bulk-actions-bar {
        flex-direction: column;
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .bulk-actions {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .bulk-actions .btn-small {
        flex: 1;
        min-width: 100px;
        justify-content: center;
    }

    /* Modal Mobile */
    .modal-content {
        grid-template-columns: 1fr;
        width: 95%;
        max-height: 95vh;
    }

    .modal-image-section {
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        padding: 1rem;
    }

    .modal-image-section img {
        max-height: 250px;
    }

    .modal-text-section {
        padding: 1rem;
    }

    .modal-close {
        top: 0.5rem;
        right: 0.5rem;
    }

    /* Small Modal Mobile */
    .small-modal {
        width: 95% !important;
        padding: 1rem;
    }

    /* Settings Mobile */
    .settings-container {
        gap: 1rem;
    }

    .settings-card {
        padding: 1rem;
    }

    .setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .library-grid {
        grid-template-columns: 1fr;
    }

    .chip-group {
        gap: 0.35rem;
    }

    .chip-option {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }

    .btn-primary {
        width: 100%;
        justify-content: center;
    }
}

/* ===== IMPROVED LIBRARY STYLES ===== */

/* Library Toolbar */
.library-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Search Bar */
.search-bar {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 0.5rem 1rem;
    gap: 0.5rem;
    min-width: 250px;
}

.search-bar i {
    color: var(--text-muted);
}

.search-bar input {
    background: transparent;
    border: none;
    color: var(--text-main);
    outline: none;
    font-size: 0.9rem;
    width: 100%;
}

/* Header Actions */
.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Buttons */
.btn-secondary {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 0.6rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: var(--bg-input);
    border-color: var(--primary);
}

.btn-text {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    transition: var(--transition);
}

.btn-text:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.btn-text.active {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.btn-small {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    transition: var(--transition);
}

.btn-small:hover {
    background: var(--bg-input);
    border-color: var(--primary);
}

.btn-small.danger {
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.3);
}

.btn-small.danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Toggle Filter */
.toggle-filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
    font-size: 0.9rem;
}

.toggle-filter:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.toggle-filter.active {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

/* Bulk Actions Bar */
.bulk-actions-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card);
    border: 1px solid var(--primary);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    animation: slideDown 0.2s ease;
}

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

.selected-count {
    font-weight: 600;
    color: var(--primary);
}

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

/* Selection Checkbox */
.selection-checkbox {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: var(--radius-sm);
    display: none;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    z-index: 5;
    transition: var(--transition);
}

.selection-checkbox.visible {
    display: flex;
}

.library-item.selected .selection-checkbox {
    background: var(--primary);
}

.library-item.selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3);
}

/* Favorite Button */
.btn-favorite {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 5;
}

.btn-favorite:hover {
    background: rgba(0, 0, 0, 0.7);
}

.btn-favorite.active {
    color: #f59e0b;
}

/* Item Preview positioning */
.item-preview {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.modal-content.small-modal {
    max-width: 500px;
    display: block;
    padding: 2rem;
}

.small-modal h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.small-modal p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.modal-footer {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.modal-footer-split {
    justify-content: space-between;
}

.modal-footer-right {
    display: flex;
    gap: 0.75rem;
}

/* Editable Text Container */
.editable-text-container {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}

.editable-input,
.editable-textarea {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.5;
    transition: var(--transition);
}

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

.editable-input:read-only,
.editable-textarea:read-only {
    background: transparent;
    border-color: transparent;
    cursor: default;
}

.editable-input:read-only:hover,
.editable-textarea:read-only:hover {
    background: var(--bg-input);
    border-color: var(--border);
}

.editable-textarea {
    min-height: 150px;
    resize: vertical;
}

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

.edit-actions .btn-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.edit-actions .btn-copy {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.edit-actions .btn-copy:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.edit-actions .btn-copy.copied {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

/* Copy All Button */
.btn-copy-all {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
    width: 100%;
}

.btn-copy-all:hover {
    background: var(--bg-input);
    border-color: var(--primary);
}

.btn-copy-all.copied {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

/* ===== NEW LIBRARY IMPROVEMENTS ===== */

/* View Toggle */
.toolbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.view-toggle {
    display: flex;
    background: var(--bg-input);
    border-radius: var(--radius-md);
    padding: 0.25rem;
    gap: 0.25rem;
}

.btn-view {
    background: transparent;
    border: none;
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-view:hover {
    color: var(--text-main);
}

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

/* Pagination Controls */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem 0;
    flex-direction: column;
}

.pagination-info {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.btn-load-more {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 0.75rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.btn-load-more:hover {
    background: var(--bg-input);
    border-color: var(--primary);
}

.btn-load-more:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* List View Mode */
.library-grid.list-view {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.library-grid.list-view .library-item {
    display: grid;
    grid-template-columns: 120px 1fr auto auto;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
}

.library-grid.list-view .item-preview {
    height: 80px;
    border-radius: var(--radius-sm);
}

.library-grid.list-view .item-info {
    padding: 0;
}

.library-grid.list-view .item-info h4 {
    font-size: 1rem;
}

.library-grid.list-view .selection-checkbox {
    position: static;
    margin-right: 0.5rem;
}

.library-grid.list-view .btn-favorite {
    position: static;
}

/* Hover Preview Tooltip */
.library-item {
    position: relative;
}

.hover-preview {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem;
    width: 280px;
    max-width: 90vw;
    box-shadow: var(--shadow-lg);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    pointer-events: none;
}

.library-item:hover .hover-preview {
    opacity: 1;
    visibility: visible;
}

.hover-preview h5 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.hover-preview p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Modal Image Actions */
.modal-image-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-duplicate {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 0.6rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.btn-duplicate:hover {
    background: var(--bg-input);
    border-color: var(--primary);
}

/* Compare Modal */
.compare-modal {
    max-width: 95vw;
    width: 1200px;
}

.compare-modal h3 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.compare-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-height: 70vh;
    overflow-y: auto;
    padding: 0.5rem;
}

.compare-item {
    background: var(--bg-input);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.compare-item img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    background: var(--bg-card);
    cursor: pointer;
    transition: var(--transition);
}

.compare-item img:hover {
    opacity: 0.9;
}

/* Fullscreen image view */
.compare-item img.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    object-fit: contain;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.95);
    cursor: zoom-out;
}

.compare-item-content {
    padding: 1rem;
}

.compare-item-content h5 {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.compare-item-content p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    max-height: 150px;
    overflow-y: auto;
}

.compare-item-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.compare-item-meta span {
    background: var(--bg-card);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Clear Filters Button */
.btn-clear-filters {
    background: transparent;
    border: none;
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-clear-filters:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* Mobile adjustments for new elements */
@media (max-width: 768px) {
    .toolbar-actions {
        width: 100%;
        justify-content: space-between;
    }

    .compare-modal {
        width: 95%;
    }

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

    .library-grid.list-view .library-item {
        grid-template-columns: 80px 1fr;
        grid-template-rows: auto auto;
    }

    .library-grid.list-view .btn-favorite,
    .library-grid.list-view .btn-icon {
        grid-row: 1 / 3;
    }

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

    .pagination-controls {
        padding: 1rem 0;
    }
}

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

/* Modal hint text */
.modal-hint {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    text-align: center;
}

/* Form group for modals */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.form-group .editable-input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
}

/* Small modal icon in title */
.small-modal h3 i {
    color: var(--primary);
    margin-right: 0.5rem;
}

/* Improve move modal with folder list */
.folder-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 0.5rem;
}

.folder-option:hover {
    background: var(--bg-card);
    border-color: var(--primary);
}

.folder-option.selected {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

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

.folder-option-info {
    flex: 1;
}

.folder-option-name {
    font-weight: 500;
    color: var(--text-main);
}

.folder-option-count {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.create-folder-inline {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.create-folder-inline input {
    flex: 1;
}

.create-folder-inline button {
    white-space: nowrap;
}

/* Folder list container */
.folder-list {
    max-height: 250px;
    overflow-y: auto;
    margin: 1rem 0;
}

/* ===== FOLDERS VIEW STYLES ===== */

/* Folders Section Header */
.folders-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    margin-bottom: 1rem;
    grid-column: 1 / -1;
}

.folders-section-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
}

.folders-section-header h3 i {
    color: var(--primary);
}

.folder-count {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Folders Grid */
.folders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    grid-column: 1 / -1;
    margin-bottom: 2rem;
}

/* Folder Card */
.folder-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition);
}

.folder-card:hover {
    background: var(--bg-input);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.folder-card-icon {
    width: 48px;
    height: 48px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.folder-card-icon i {
    font-size: 1.5rem;
    color: var(--primary);
}

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

.folder-card-info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.folder-card-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.folder-card-actions {
    opacity: 0;
    transition: var(--transition);
}

.folder-card:hover .folder-card-actions {
    opacity: 1;
}

/* All Ads Section */
.all-ads-section {
    grid-column: 1 / -1;
    margin-top: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.view-all-btn {
    width: auto;
}

/* Empty State */
.empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
    background: var(--bg-card);
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
}

.empty-state i {
    font-size: 3rem;
    color: var(--primary);
    opacity: 0.5;
    margin-bottom: 1rem;
}

.empty-state h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

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

.empty-ads-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
}

.empty-ads-state i {
    font-size: 2.5rem;
    color: var(--text-muted);
    opacity: 0.5;
    margin-bottom: 1rem;
}

.empty-ads-state h4 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.empty-ads-state p {
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* Folder View Header (when inside a folder) */
.folder-view-header {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
}

.folder-view-header .btn-back {
    width: 40px;
    height: 40px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.folder-view-header .btn-back:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.folder-view-info {
    flex: 1;
}

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

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

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.breadcrumb-link {
    cursor: pointer;
    transition: var(--transition);
}

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

.breadcrumb-current {
    color: var(--text-dim);
}

.folder-view-info h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-main);
}

.folder-view-info h3 i {
    color: var(--primary);
}

.ads-count {
    font-size: 0.85rem;
    color: var(--text-muted);
    background: var(--bg-input);
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-full);
}

/* Ads Grid Container */
.ads-grid-container {
    display: contents;
}

/* Mobile adjustments for folders */
@media (max-width: 768px) {
    .folders-grid {
        grid-template-columns: 1fr;
    }

    .folder-card {
        padding: 1rem;
    }

    .folder-card-icon {
        width: 40px;
        height: 40px;
    }

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

    .folder-view-header {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .folder-view-info {
        order: 2;
        width: 100%;
    }

    .ads-count {
        order: 1;
        margin-left: auto;
    }
}

/* ===== GENERATION PROGRESS STYLES ===== */

.generation-progress {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-top: 1rem;
}

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

.progress-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-main);
}

.progress-title i {
    color: var(--primary);
}

.btn-cancel {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-cancel:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger);
    color: var(--danger);
}

.progress-bar-container {
    background: var(--bg-input);
    border-radius: var(--radius-full);
    height: 8px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary), #818cf8);
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
}

.progress-status {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.progress-ads {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.progress-ad-thumb {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.progress-ad-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.progress-ad-thumb i {
    font-size: 1.5rem;
    color: var(--text-muted);
}

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

/* Spinner animation */
.ph-spin {
    animation: spin 1s linear infinite;
}

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

/* ===== TOAST NOTIFICATION STYLES ===== */

.toast-notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-lg);
    z-index: 10001;
    animation: slideInUp 0.3s ease;
}

.toast-notification.toast-success {
    border-color: var(--success);
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(16, 185, 129, 0.1) 100%);
}

.toast-notification.toast-error {
    border-color: var(--danger);
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(239, 68, 68, 0.1) 100%);
}

.toast-notification span {
    font-weight: 500;
    color: var(--text-main);
}

.toast-notification button {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.toast-notification button:hover {
    color: var(--text-main);
}

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

/* Mobile toast */
@media (max-width: 768px) {
    .toast-notification {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }

    .generation-progress {
        padding: 1rem;
    }

    .progress-ad-thumb {
        width: 50px;
        height: 50px;
    }
}

/* Dashboard - Loading & Empty States */
.loading-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 3rem;
    color: var(--text-muted);
    grid-column: 1 / -1;
}

.loading-placeholder i {
    font-size: 2rem;
    color: var(--primary);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 3rem;
    color: var(--text-muted);
    grid-column: 1 / -1;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--border);
}

.empty-state i {
    font-size: 3rem;
    color: var(--text-dim);
}

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

/* Dashboard - Project Cards Clickable */
.project-card {
    cursor: pointer;
}

.project-preview {
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-preview i {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.5);
}

.gradient-4 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.see-all-card .project-preview i {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Dashboard - Active Jobs Section */
.active-jobs-section {
    margin-bottom: 2rem;
}

.active-jobs-section .section-title-row h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
}

.active-jobs-section .section-title-row h3 i {
    animation: spin 1s linear infinite;
}

.jobs-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.job-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

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

.job-name {
    font-weight: 600;
    font-size: 0.95rem;
}

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

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

.progress-bar-mini {
    width: 100px;
    height: 6px;
    background: var(--bg-input);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar-mini .progress-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 600;
    min-width: 35px;
    text-align: right;
}

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