* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
}

.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 280px;
    background: #1E5898;
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.logo-section {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    background-color: #02B4F8;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
}

.logo-text {
    font-size: 14px;
    font-weight: 500;
}

.logo-icon-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
}

.navigation {
    padding: 24px 0;
    flex: 1;
}

.navigation h3 {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    opacity: 0.7;
    margin-bottom: 16px;
    padding: 0 20px;
}

.nav-list {
    list-style: none;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 0 25px 25px 0;
    margin-right: 20px;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.15);
    border-right: 3px solid white;
}

.nav-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}



.user-section {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.user-info {
    flex: 1;
}

.user-name {
    display: block;
    font-weight: 600;
    font-size: 14px;
}

.user-role {
    display: block;
    font-size: 12px;
    opacity: 0.7;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Main Content Styles */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 0;
}

.content-view {
    display: none;
}

.content-view.active {
    display: block;
}

.dashboard-header {
    background: white;
    padding: 32px 40px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-content h1 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1f2937;
}

.header-content p {
    color: #6b7280;
    font-size: 16px;
}

.create-ad-btn {
    background: #4a90e2;
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.create-ad-btn:hover {
    background: #357abd;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    padding: 32px 40px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-card.blue .stat-icon { background: #dbeafe; }
.stat-card.green .stat-icon { background: #dcfce7; }
.stat-card.purple .stat-icon { background: #f3e8ff; }
.stat-card.orange .stat-icon { background: #fed7aa; }

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
}

.stat-label {
    font-size: 14px;
    color: white;
    font-weight: 500;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
    padding: 0 40px 40px;
}

.campaigns-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.section-header {
    padding: 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
}

.refresh-btn {
    background: #f3f4f6;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.refresh-btn:hover {
    background: #e5e7eb;
}

.campaign-list {
    padding: 0;
}

.campaign-item {
    padding: 20px 24px;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.campaign-item:hover {
    background: #f9fafb;
}

.campaign-item:last-child {
    border-bottom: none;
}

/* Pagination Styles */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border-top: 1px solid #f3f4f6;
    margin-top: 16px;
}

.pagination-btn {
    background: #1E5898;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.pagination-btn:hover {
    background: #164a7a;
}

.pagination-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
}

.pagination-info {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

/* Ad Card Styles for Recent Campaigns */
.ad-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.ad-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #d1d5db;
}

.ad-card.google-ads-style {
    background: #ffffff;
    border: 1px solid #dadce0;
    border-radius: 8px;
    padding: 16px;
    font-family: arial, sans-serif;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ad-card .sponsored {
    font-size: 11px;
    color: #5f6368;
    font-weight: 400;
    margin-bottom: 4px;
}

.ad-card .url {
    font-size: 14px;
    color: #1a0dab;
    text-decoration: none;
    margin-bottom: 4px;
    display: block;
}

.ad-card .headline {
    font-size: 18px;
    color: #1a0dab;
    text-decoration: none;
    font-weight: 400;
    line-height: 1.3;
    margin-bottom: 4px;
    display: block;
}

.ad-card .headline:hover {
    text-decoration: underline;
}

.ad-card .description {
    font-size: 14px;
    color: #4d5156;
    line-height: 1.4;
    margin-bottom: 8px;
}

.ad-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f3f4f6;
}

.ad-type-badge {
    background: #1E5898;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.ad-date {
    font-size: 12px;
    color: #6b7280;
}

.ad-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.action-btn {
    background: #f3f4f6;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    color: #374151;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: #e5e7eb;
}

.action-btn.copy {
    background: #dbeafe;
    color: #1e40af;
}

.action-btn.copy:hover {
    background: #bfdbfe;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: #374151;
}

.empty-state p {
    font-size: 14px;
}

.campaign-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #1f2937;
}

.campaign-info p {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 8px;
}

.campaign-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.tag {
    padding: 10px 10px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
}

.tag.google {
    background: #dbeafe;
    color: #1e40af;
}

.tag.facebook {
    background: #ddd6fe;
    color: #7c3aed;
}

.tag.facebook-stories {
    background: #fce7f3;
    color: #be185d;
}

.tag-type {
    background: #f3f4f6;
    color: #6b7280;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.campaign-date {
    font-size: 12px;
    color: #9ca3af;
}

.campaign-status {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.compliant {
    background: #dcfce7;
    color: #166534;
}

.status-badge.warning {
    background: #fef3c7;
    color: #92400e;
}

.view-btn {
    background: none;
    border: 1px solid #d1d5db;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-btn:hover {
    background: #f3f4f6;
}

.sidebar-widgets {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.widget {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.widget h3 {
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.platform-stats {
    padding: 20px 24px;
}

.platform-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.platform-item:last-child {
    margin-bottom: 0;
}

.platform-name {
    font-size: 14px;
    color: #374151;
    min-width: 100px;
}

.platform-bar {
    flex: 1;
    height: 6px;
    background: #f3f4f6;
    border-radius: 3px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: #4a90e2;
    border-radius: 3px;
}

.platform-percent {
    font-size: 12px;
    color: #6b7280;
    min-width: 60px;
    text-align: right;
}

.action-buttons {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-size: 14px;
}

.action-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.action-icon {
    font-size: 16px;
}

/* Ad Generator View */
.generator-header {
    background: white;
    padding: 24px 40px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 20px;
}

.back-btn {
    background: #f3f4f6;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.back-btn:hover {
    background: #e5e7eb;
}

.generator-header h1 {
    font-size: 24px;
    font-weight: 600;
    color: #1f2937;
}

#ad-generator-content {
    padding: 0;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .sidebar-widgets {
        grid-template-columns: repeat(2, 1fr);
        display: grid;
    }
}

/* Create Ad Styles */
.platform-selection-container {
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.platform-selection-container .generator-header {
    text-align: center;
    margin-bottom: 40px;
}

.platform-selection-container .generator-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.platform-selection-container .generator-header p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 0;
}

.platforms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.platform-card {
    background: white;
    border-radius: 16px;
    padding: 32px 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.platform-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border-color: #e0e7ff;
}

.platform-card[data-platform="google-search"]:hover {
    border-color: #fee2e2;
}

.platform-card[data-platform="google-display"]:hover {
    border-color: #dbeafe;
}

.platform-card[data-platform="facebook-feed"]:hover,
.platform-card[data-platform="facebook-stories"]:hover {
    border-color: #ede9fe;
}

.platform-card[data-platform="facebook-reels"]:hover {
    border-color: #fce7f3;
}

.platform-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.platform-icon.red {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.platform-icon.blue {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.platform-icon.purple {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.platform-icon.pink {
    background: linear-gradient(135deg, #ec4899, #db2777);
}

.platform-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.platform-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.platform-badge.most-popular {
    background-color: #fef3c7;
    color: #92400e;
}

.platform-badge.visual {
    background-color: #dbeafe;
    color: #1e40af;
}

.platform-badge.social {
    background-color: #ede9fe;
    color: #6b21a8;
}

.platform-badge.mobile {
    background-color: #ede9fe;
    color: #6b21a8;
}

.platform-badge.video {
    background-color: #fce7f3;
    color: #be185d;
}

.platform-info p {
    color: #666;
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 16px;
}

.platform-limits {
    color: #888;
    font-size: 0.875rem;
    line-height: 1.4;
}

.platform-limits strong {
    color: #555;
}

/* Generator Content Styles */
.generator-content {
    padding: 20px;
}

.generator-content .generator-header {
    margin-bottom: 30px;
}

.generator-content .generator-header h1 {
    font-size: 2rem;
    color: #1a1a1a;
    margin-bottom: 8px;
}

@media (max-width: 768px) {
    .platforms-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .platform-card {
        padding: 24px 20px;
    }
    
    .platform-selection-container {
        padding: 20px;
    }
    
    .platform-selection-container .generator-header h1 {
        font-size: 2rem;
    }
    
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        padding: 20px;
    }
    
    .dashboard-header {
        padding: 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .dashboard-grid {
        padding: 0 20px 20px;
    }
    
    .sidebar-widgets {
        grid-template-columns: 1fr;
    }
}

/* User Info Section at Sidebar Bottom - Enhanced Design */
.user-info-section {
    margin-top: auto;
    padding: 20px 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
}

.user-info {
    padding: 20px 15px;
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.15) 0%, rgba(220, 53, 69, 0.08) 100%);
    border: 1px solid rgba(220, 53, 69, 0.2);
    border-radius: 12px;
    text-align: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.user-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.user-info p {
    margin: 0 0 15px 0;
    font-size: 15px;
    color: white;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.user-info .welcome-text {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.user-info .user-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
}

.user-info button {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-info button:hover {
    background: linear-gradient(135deg, #c82333 0%, #a71e2a 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

.login-prompt {
    padding: 20px 15px;
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.15) 0%, rgba(0, 123, 255, 0.08) 100%);
    border: 1px solid rgba(0, 123, 255, 0.2);
    border-radius: 12px;
    text-align: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.login-prompt:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.login-prompt p {
    margin: 0 0 15px 0;
    font-size: 15px;
    color: white;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.login-prompt .prompt-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.login-prompt .prompt-subtitle {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 15px;
}

.login-prompt button {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-prompt button:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}