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

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --error-color: #ef4444;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 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);
}

/* Base body styles for all pages */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
}

/* Specific styles for internal pages (not landing page) */
body:not(.landing-page) {
    background: var(--bg-light);
    overflow: hidden; /* Prevent body scroll */
}

/* Main content wrapper for pages with sidebar */
.main-content-wrapper {
    position: fixed;
    top: 64px; /* Start below navbar */
    left: 0; /* Changed from 280px to 0 - full width */
    right: 0;
    bottom: 0;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    scroll-behavior: smooth;
    min-height: calc(100vh - 64px);
}

/* Add a content container to handle the footer spacing */
.content-with-footer {
    min-height: 100%;
    position: relative;
    padding-bottom: 400px; /* Space for footer */
}

/* Custom scrollbar for main content */
.main-content-wrapper::-webkit-scrollbar {
    width: 8px;
}

.main-content-wrapper::-webkit-scrollbar-track {
    background: #f0f0f0;
}

.main-content-wrapper::-webkit-scrollbar-thumb {
    background: #c0c0c0;
    border-radius: 4px;
}

.main-content-wrapper::-webkit-scrollbar-thumb:hover {
    background: #a0a0a0;
}

/* Login Page Styles */
body:not(.landing-page) .container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

/* Override body overflow for login page */
body:has(.login-box) {
    overflow: auto !important;
}

/* Ensure login page doesn't get the fixed layout */
body:has(.login-box) .main-content-wrapper {
    position: static;
    left: auto;
    right: auto;
    bottom: auto;
    overflow: visible;
}

.login-box {
    background: var(--bg-white);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
    padding: 40px;
    animation: fadeInUp 0.5s ease-out;
}

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

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo {
    height: 60px;
    width: auto;
    margin-bottom: 20px;
    object-fit: contain;
}

.login-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.login-header p {
    color: var(--text-light);
    font-size: 16px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-white);
    transition: all 0.3s 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 3px rgba(99, 102, 241, 0.1);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 14px;
}

.remember-me {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: var(--primary-dark);
}

/* Button Styles */
.login-button,
.save-button {
    width: 100%;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.login-button:hover,
.save-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.login-button:active,
.save-button:active {
    transform: translateY(0);
}

.button-text {
    position: relative;
    z-index: 1;
}

.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.hidden {
    display: none !important;
}

/* Messages */
.error-message,
.success-message {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 16px;
    animation: fadeIn 0.3s ease-out;
}

.error-message {
    background-color: #fee;
    color: var(--error-color);
    border: 1px solid #fcc;
}

.success-message {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

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

.login-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-light);
}

.login-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

/* Dashboard Styles */
.navbar {
    background: var(--bg-white);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    width: 100%;
}

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

.nav-brand {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 16px; /* Add gap for hamburger button */
}

.nav-logo {
    height: 32px;
    width: auto;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.welcome-text {
    color: var(--text-dark);
    font-size: 14px;
}

.logout-btn {
    padding: 8px 16px;
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.dashboard-container {
    flex: 1;
    padding: 40px; /* Normalized padding since no sidebar offset */
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    overflow: visible;
}

.profile-section {
    background: var(--bg-white);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 50px;
    margin: 0 40px; /* Equal margins now */
    animation: fadeInUp 0.5s ease-out;
    overflow: visible;
}

.profile-section h1 {
    font-size: 32px;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.profile-section > p {
    color: var(--text-light);
    font-size: 16px;
    margin-bottom: 32px;
}

.profile-form {
    width: 100%;
}

.form-section {
    margin-bottom: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--border-color);
    width: 100%;
}

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

.form-section h2 {
    font-size: 20px;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

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

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.form-actions {
    display: flex;
    gap: 16px;
    margin-top: 32px;
}

.save-button {
    width: auto;
    min-width: 150px;
}

.cancel-button {
    padding: 12px 24px;
    background: transparent;
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-button:hover {
    background: var(--bg-light);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .login-box {
        padding: 30px 20px;
    }
    
    .profile-section {
        padding: 40px 20px;
        margin: 0 20px; /* Equal margins on mobile */
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .save-button,
    .cancel-button {
        width: 100%;
    }
    
    .nav-menu {
        flex-direction: column;
        align-items: flex-end;
        gap: 10px;
    }
    
    .welcome-text {
        font-size: 12px;
    }
}

/* Page Header Styles */
.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 32px;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.page-header p {
    color: var(--text-light);
    font-size: 16px;
    margin-bottom: 24px;
}

/* Progress Indicator */
.progress-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 24px;
    gap: 8px;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--text-light);
    transition: all 0.3s ease;
}

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

.progress-step.completed .step-number {
    background: var(--success-color);
    color: white;
    border-color: var(--success-color);
}

.step-label {
    font-size: 14px;
    color: var(--text-light);
    font-weight: 500;
}

.progress-step.active .step-label {
    color: var(--primary-color);
}

.progress-step.completed .step-label {
    color: var(--success-color);
}

.progress-line {
    width: 100px;
    height: 2px;
    background: var(--border-color);
    transition: all 0.3s ease;
}

.progress-line.completed {
    background: var(--success-color);
}

/* License Key Field */
#licenseKey {
    font-family: 'Courier New', Courier, monospace;
    font-size: 18px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Field Hints */
.field-hint {
    display: block;
    font-size: 13px;
    color: var(--text-light);
    margin-top: 4px;
}

/* Section Descriptions */
.section-description {
    color: var(--text-light);
    font-size: 15px;
    margin-bottom: 20px;
}

/* Configuration Placeholder */
.config-placeholder {
    background: var(--bg-light);
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    margin-bottom: 30px;
}

.placeholder-message {
    color: var(--text-light);
}

.placeholder-message p:first-child {
    font-size: 16px;
    color: var(--text-dark);
    margin-bottom: 8px;
}

/* Back Button */
.back-button {
    padding: 12px 24px;
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-button:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(-5px);
}

/* Success Message Extended */
.success-message h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: #065f46;
}

.success-message p {
    margin-bottom: 8px;
    line-height: 1.5;
}

/* Responsive Updates */
@media (max-width: 768px) {
    .progress-indicator {
        flex-direction: column;
    }
    
    .progress-line {
        width: 2px;
        height: 40px;
    }
    
    .page-header h1 {
        font-size: 24px;
    }
    
    .back-button {
        width: 100%;
        justify-content: center;
    }
}

/* Coming Soon Box Styles */
.coming-soon-box {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.coming-soon-box::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    bottom: -50%;
    left: -50%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.coming-soon-icon {
    font-size: 48px;
    margin-bottom: 16px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}

.coming-soon-box h3 {
    font-size: 28px;
    color: var(--text-dark);
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.coming-soon-box p {
    color: var(--text-light);
    font-size: 16px;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.coming-soon-features {
    font-weight: 600;
    color: var(--text-dark);
    margin-top: 24px;
    margin-bottom: 12px;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0 auto 20px;
    max-width: 400px;
    text-align: left;
    position: relative;
    z-index: 1;
}

.feature-list li {
    padding: 8px 0 8px 28px;
    position: relative;
    color: var(--text-light);
    font-size: 15px;
}

.feature-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
    font-size: 18px;
}

.notify-text {
    font-size: 14px;
    font-style: italic;
    color: var(--text-light);
    margin-top: 20px;
}

/* Modern Connection Card Styles */
.connection-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 10px 15px -5px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.3s ease;
}

.connection-card:hover {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Not Connected State */
.card-not-connected {
    padding: 48px;
    text-align: center;
}

.connection-graphic {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 24px;
}

.platform-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.connection-line {
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, #e0e0e0 0%, #e0e0e0 45%, transparent 45%, transparent 55%, #e0e0e0 55%, #e0e0e0 100%);
    position: relative;
}

.apas-logo {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 16px;
}

/* APAS Logo Image Styles */
.apas-logo-img {
    background: white;
    padding: 4px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Fallback text logo */
.apas-logo-text {
    /* Inherits all styles from .apas-logo */
}

.card-not-connected h3 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.card-not-connected p {
    color: var(--text-light);
    font-size: 16px;
    margin-bottom: 32px;
}

/* Google Sign-in Button */
.google-signin-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    background: white;
    border: 1px solid #dadce0;
    border-radius: 24px;
    font-size: 16px;
    font-weight: 500;
    color: #3c4043;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Google Sans', Roboto, sans-serif;
}

.google-signin-button:hover {
    background: #f8f9fa;
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3);
}

.google-signin-button:active {
    background: #e8eaed;
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 2px 6px 2px rgba(60, 64, 67, 0.15);
}

/* Connected State */
.card-connected {
    padding: 24px;
}

.connected-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 24px;
}

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

.platform-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.account-details {
    display: flex;
    flex-direction: column;
}

.connected-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--success-color);
    font-weight: 600;
}

.account-email {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-dark);
}

.modern-disconnect {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.modern-disconnect:hover {
    border-color: var(--error-color);
    color: var(--error-color);
    background: #fee;
}

/* Campaign Container */
.campaigns-container {
    margin-top: 24px;
}

.campaigns-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.campaigns-header h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
}

.campaign-count {
    font-size: 14px;
    color: var(--text-light);
    background: #f5f5f5;
    padding: 4px 12px;
    border-radius: 20px;
}

/* Modern Campaign List */
.modern-campaigns-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.modern-campaign-item {
    position: relative;
    cursor: pointer;
}

.modern-campaign-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
}

.campaign-card {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 16px;
    transition: all 0.2s ease;
    background: white;
}

.modern-campaign-item:hover .campaign-card {
    border-color: #d0d0d0;
    background: #fafafa;
}

.modern-campaign-item input:checked ~ .campaign-card {
    border-color: var(--primary-color);
    background: #f5f6ff;
}

.campaign-card.inactive {
    opacity: 0.6;
}

.campaign-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.campaign-name {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-dark);
}

.campaign-type {
    font-size: 12px;
    padding: 4px 10px;
    background: #e8eaf6;
    color: #5f6368;
    border-radius: 12px;
}

.campaign-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.metric {
    display: flex;
    flex-direction: column;
}

.metric-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
}

.metric-label {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 2px;
}

/* Select Controls */
.select-controls {
    display: flex;
    gap: 8px;
}

.select-all-btn,
.clear-all-btn {
    flex: 1;
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    background: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.select-all-btn {
    color: var(--primary-color);
}

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

.clear-all-btn {
    color: #666;
}

.clear-all-btn:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
}

/* Responsive Design for Modern Connection Card */
@media (max-width: 768px) {
    .card-not-connected {
        padding: 32px 20px;
    }
    
    .connection-graphic {
        flex-direction: column;
        gap: 16px;
    }
    
    .connection-line {
        width: 2px;
        height: 40px;
        background: linear-gradient(180deg, #e0e0e0 0%, #e0e0e0 45%, transparent 45%, transparent 55%, #e0e0e0 55%, #e0e0e0 100%);
    }
    
    .campaign-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .select-controls {
        flex-direction: column;
    }
    
    /* MCC Responsive */
    .mcc-header {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .account-filters {
        flex-direction: column;
        width: 100%;
    }
    
    .account-search {
        width: 100%;
    }
    
    .account-metrics {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .account-main {
        flex-direction: column;
        gap: 8px;
    }
    
    .client-accounts-list {
        max-height: 400px;
    }
}

/* Remove old styles that are no longer needed */
.connection-status,
.status-card,
.connected-account,
.campaign-section,
.campaigns-list,
.campaign-item,
.campaign-checkbox,
.manual-config {
    /* These are from the old design - keeping empty to override if needed */
}

/* MCC Specific Styles */
.mcc-id {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 2px;
}

.mcc-container {
    margin-top: 24px;
}

.mcc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.mcc-header h4 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
}

.account-filters {
    display: flex;
    align-items: center;
    gap: 16px;
}

.account-search {
    padding: 8px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    width: 200px;
    transition: all 0.2s ease;
}

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

.client-accounts-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 20px;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 8px;
}

.account-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.group-label {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-dark);
}

.group-count {
    font-size: 14px;
    color: var(--text-light);
}

.client-account-item {
    position: relative;
    cursor: pointer;
}

.client-account-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
}

.client-account-item .account-card {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s ease;
    background: white;
}

.client-account-item:hover .account-card {
    border-color: #d0d0d0;
    background: #fafafa;
}

.client-account-item input:checked ~ .account-card {
    border-color: var(--primary-color);
    background: #f5f6ff;
}

.account-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

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

.account-name {
    font-weight: 600;
    font-size: 17px;
    color: var(--text-dark);
}

.account-id {
    font-size: 14px;
    color: var(--text-light);
    font-family: 'Courier New', Courier, monospace;
}

.account-status {
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

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

.account-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.client-account-item .account-card.inactive {
    opacity: 0.7;
}

.client-account-item .account-card.inactive .account-metrics {
    opacity: 0.6;
}

/* MCC Note Styles */
.mcc-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: #f0f7ff;
    border-radius: 8px;
    margin-top: 20px;
}

.mcc-note svg {
    flex-shrink: 0;
    color: var(--primary-color);
    margin-top: 2px;
}

.mcc-note p {
    font-size: 14px;
    color: var(--text-dark);
    line-height: 1.5;
    margin: 0;
}

/* Custom Scrollbar for Account List */
.client-accounts-list::-webkit-scrollbar {
    width: 6px;
}

.client-accounts-list::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 3px;
}

.client-accounts-list::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 3px;
}

.client-accounts-list::-webkit-scrollbar-thumb:hover {
    background: #b0b0b0;
}

/* Microsoft Ads Specific Styles */
.microsoft-signin-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    background: white;
    border: 1px solid #8c8c8c;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    color: #5e5e5e;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

.microsoft-signin-button:hover {
    background: #f3f2f1;
    border-color: #323130;
    color: #201f1e;
}

.microsoft-signin-button:active {
    background: #edebe9;
    border-color: #201f1e;
}

/* Microsoft logo sizing */
.microsoft-logo {
    width: 48px;
    height: 48px;
    padding: 8px;
    background: white;
    border-radius: 8px;
    box-sizing: border-box;
}

.platform-icon.microsoft-icon {
    width: 40px;
    height: 40px;
    padding: 6px;
    background: white;
    border-radius: 8px;
    box-sizing: border-box;
}

/* APAS logo text for Microsoft section */
.apas-logo-text-ms {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 16px;
}

/* Meta Ads Specific Styles */
.meta-signin-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    color: #1877F2;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.meta-signin-button:hover {
    background: #f5f5f5;
    border-color: #1877F2;
}

.meta-signin-button:active {
    background: #edebe9;
    border-color: #1877F2;
}

/* Meta logo sizing */
.meta-logo {
    width: 48px;
    height: 48px;
}

.platform-icon.meta-icon {
    width: 40px;
    height: 40px;
}

/* APAS logo text for Meta section */
.apas-logo-text-meta {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 16px;
}

/* Business name style for Meta accounts */
.business-name {
    font-size: 12px;
    color: var(--text-light);
    font-style: italic;
    margin-top: 2px;
}

/* Professional Footer Styles */
.site-footer {
    background: #1a1a1a;
    color: #e0e0e0;
    font-size: 14px;
    position: relative;
    width: 100%; /* Simple full width */
    margin-left: 0; /* No offset needed */
    margin-top: 60px;
    box-sizing: border-box;
    z-index: 1; /* Lower than sidebar overlay */
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px; /* Simple padding */
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding: 40px 0 30px 0;
}

.footer-section h4 {
    color: white;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.footer-company {
    max-width: 320px;
}

.footer-logo {
    height: 40px;
    width: auto;
    margin-bottom: 16px;
}

.footer-description {
    line-height: 1.6;
    margin-bottom: 16px;
    color: #b0b0b0;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    width: 36px;
    height: 36px;
    background: #2a2a2a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b0b0b0;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #b0b0b0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #2a2a2a;
    padding: 20px 0;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-copyright {
    margin: 0;
    color: #808080;
}

.footer-legal {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-legal a {
    color: #b0b0b0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-legal a:hover {
    color: white;
}

.footer-separator {
    color: #606060;
}

@media (max-width: 968px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    
    .footer-company {
        grid-column: span 2;
        max-width: none;
    }
}

@media (max-width: 640px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 30px 20px 20px; /* Keep horizontal padding on mobile */
    }
    
    .footer-company {
        grid-column: span 1;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        padding: 0 20px; /* Keep horizontal padding */
    }
    
    .footer-legal {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Main content area should expand to push footer down */
main {
    flex: 1;
}

/* Dashboard and configuration containers */
.dashboard-container,
.profile-section,
.container {
    flex: 1;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 64px; /* Height of navbar */
    left: -280px; /* Hidden by default */
    width: 280px;
    height: calc(100vh - 64px); /* Full height */
    background: var(--bg-white);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000; /* High z-index for overlay */
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    transition: left 0.3s ease; /* Smooth slide animation */
}

/* Sidebar open state */
.sidebar.open {
    left: 0; /* Slide in */
}

/* Overlay for sidebar */
.sidebar-overlay {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

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

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

.sidebar-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-light);
}

.sidebar-close:hover {
    background: var(--bg-light);
    color: var(--text-dark);
    border-color: var(--text-dark);
}

.sidebar-nav {
    flex: 1;
    padding: 20px 16px;
    overflow-y: auto;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 4px;
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 15px;
    font-weight: 500;
}

.sidebar-link:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

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

.sidebar-icon {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 16px;
    padding-bottom: 24px; /* Extra bottom padding */
    border-top: 1px solid var(--border-color);
    margin-top: auto; /* Push to bottom of sidebar */
}

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

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
}

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

.user-email-sidebar {
    font-size: 14px;
    color: var(--text-dark);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Remove these since sidebar is now hidden by default */
.sidebar-toggle,
.sidebar-close-old {
    display: none !important;
}

/* Remove sidebar overlay since it's not needed */
.sidebar-overlay {
    display: none !important;
}

/* Responsive sidebar - show hamburger menu on all screens */
@media (max-width: 1024px) {
    /* Remove the hide sidebar rule since it's now always a hamburger menu */
    
    .main-content-wrapper {
        position: relative;
        top: 0;
        left: 0;
        margin-left: 0;
        width: 100%;
        overflow-y: visible;
        padding-right: 0;
    }
    
    body:not(.landing-page) {
        overflow: auto;
        padding-top: 64px;
    }
    
    .dashboard-container {
        margin-left: 0;
        margin-right: 0;
        max-width: 1200px;
        width: 100%;
        padding: 20px;
    }
    
    .profile-section {
        margin: 0 20px;
    }
    
    .site-footer {
        position: relative;
        margin-top: 60px;
        width: 100%;
        margin-left: 0;
    }
    
    .footer-container {
        padding: 0 20px;
    }
    
    .nav-container {
        padding: 16px 20px;
    }
}

/* Responsive Footer - Combined all media queries */
@media (max-width: 1024px) {
    /* Removed duplicate footer-container rule */
}

.sidebar-footer {
    padding: 16px;
    padding-bottom: 24px; /* Extra bottom padding */
    border-top: 1px solid var(--border-color);
    margin-top: auto; /* Push to bottom of sidebar */
}

.sidebar-user-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: all 0.2s ease;
    border-radius: 8px;
    padding: 8px;
    margin: -8px;
}

.sidebar-user-link:hover {
    background: var(--bg-light);
}

.sidebar-user-link.active {
    background: rgba(99, 102, 241, 0.1);
}

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

/* Hamburger Menu Button */
.hamburger-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 16px;
}

.hamburger-menu:hover {
    background: var(--bg-light);
    border-color: var(--primary-color);
}

.hamburger-menu svg {
    width: 24px;
    height: 24px;
    color: var(--text-dark);
}
