@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700;800;900&family=Inter:wght@400;500;600;700&display=swap');

/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    --brand-lime: #dfff00;
    --text-light: #ffffff;
    --text-dark: #000000;
    --glass-bg: rgba(75, 85, 99, 0.4);
    --glass-border: rgba(255, 255, 255, 0.2);
    --auth-card-width: 500px;
    --sidebar-width: 260px;
    --progress-width: 280px;
}

* { box-sizing: border-box; }

body, html { height: 100%; margin: 0; font-family: 'Inter', sans-serif; background: #f9fafb; overflow-x: hidden; }

h1, h2, h3, .badge, .referral-title, .section-nav-header {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    margin: 0;
}

/* =========================================
   2. SHARED UI ELEMENTS
   ========================================= */
input, select {
    width: 100%; padding: 15px 20px; border-radius: 30px; border: 1px solid #e5e7eb;
    font-size: 16px; background-color: #fff; margin-bottom: 15px; outline: none;
}
input:focus, select:focus { border-color: #000; }

/* --- BUTTONS --- */
.btn-primary {
    display: inline-block; width: 100%; padding: 16px; border-radius: 30px; border: none;
    background-color: var(--brand-lime); color: var(--text-dark); font-weight: 700;
    font-size: 16px; cursor: pointer; text-align: center; text-decoration: none;
    transition: transform 0.2s, filter 0.2s;
}
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.05); }

/* FIX: Ensure Topbar Buttons never become massive */
.top-header .btn-primary, .header-actions .btn-primary { width: auto !important; padding: 12px 25px !important; font-size: 14px !important; }

.wizard-actions { display: flex; gap: 20px; margin-top: 40px; flex-wrap: wrap; }
.wizard-actions .btn-primary { width: auto; padding: 15px 40px; }

.btn-back { background: #000 !important; color: #fff !important; }
.btn-exit { background: transparent !important; border: 1px solid #000; color: #000 !important; }

.btn-review { 
    background: #f3f4f6 !important; 
    border: 1px solid #d1d5db !important; 
    color: #374151 !important; 
}
.btn-review:hover {
    background: #e5e7eb !important;
    color: #000 !important;
}

label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 14px; color: #374151; text-align: left; }

/* =========================================
   3. AUTH PAGES
   ========================================= */
.auth-body {
    margin: 0; height: 100vh; width: 100vw; display: flex; align-items: center; justify-content: center;
    background-image: url('https://images.unsplash.com/photo-1522202176988-66273c2fd55f?auto=format&fit=crop&w=1920&q=80');
    background-size: cover; background-position: center; background-attachment: fixed;
}
.auth-card {
    background: var(--glass-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border); border-radius: 24px; padding: 40px; width: 100%;
    max-width: 500px; text-align: center; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); margin: 20px;
}
.auth-card h1 { font-size: 32px; margin-bottom: 10px; color: var(--text-light); }
.subtitle { color: #d1d5db; margin-bottom: 30px; font-size: 15px; }

/* =========================================
   4. LAYOUT & SIDEBARS
   ========================================= */
.app-container { display: flex; min-height: 100vh; width: 100%; align-items: stretch; }

.sidebar {
    width: var(--sidebar-width); background: #fff; border-right: 1px solid #e5e7eb;
    display: flex; flex-direction: column; padding: 40px 24px; height: 100vh;
    position: sticky; top: 0; flex-shrink: 0; z-index: 100;
}
.sidebar-logo { width: 100%; max-width: 180px; margin-bottom: 48px; }

.nav-item {
    display: flex; align-items: center; gap: 12px; padding: 12px 16px;
    color: #4b5563; text-decoration: none; font-weight: 500; border-radius: 12px; margin-bottom: 4px;
}
.nav-item.active { background: var(--brand-lime); font-weight: 700; color: #000; }

.progress-sidebar {
    background: var(--brand-lime); width: var(--progress-width); padding: 60px 30px;
    height: 100vh; position: sticky; top: 0; flex-shrink: 0; overflow-y: auto;
}

.main-content-wrapper { flex-grow: 1; display: flex; flex-direction: column; min-width: 0; background: #f9fafb; overflow-x: hidden; }
.main-content, .main-content-inner { padding: 40px 60px; max-width: 1200px; }

.dashboard-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; align-items: start; }
.content-card { background: #fff; border-radius: 32px; padding: 48px; box-shadow: 0 4px 20px rgba(0,0,0,0.03); }

/* =========================================
   5. WIZARD UI (Clean Sidebar)
   ========================================= */
.section-nav-header { font-size: 15px; color: #000; margin-top: 30px; margin-bottom: 12px; text-decoration: underline; text-underline-offset: 4px; text-align: left; }
.sub-nav-list { list-style: none; padding: 0; margin: 0; }
.sub-nav-item { margin-bottom: 10px; text-align: left; }
.sub-nav-item a { text-decoration: none; color: #000; font-weight: 400; font-size: 13.5px; display: block; opacity: 0.6; }
.sub-nav-item.active-sub a { font-weight: 700; opacity: 1; }
.sub-nav-item a:hover { opacity: 1; }

.badge {
    background-color: var(--brand-lime); color: var(--text-dark); padding: 8px 16px;
    border-radius: 20px; display: inline-block; margin-bottom: 20px; font-size: 14px;
    border: 2px solid var(--text-dark); text-transform: uppercase;
}

/* =========================================
   6. INDUSTRY TILES
   ========================================= */
.industry-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 15px; margin-bottom: 30px; }
.industry-grid input { display: none; }
.industry-tile {
    border: 2px solid #e5e7eb; border-radius: 16px; padding: 25px 15px; text-align: center;
    cursor: pointer; background: #fff; display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.industry-tile svg { width: 35px; height: 35px; stroke: #6b7280; }
.industry-grid input:checked + .industry-tile { background: var(--brand-lime); border-color: #000; font-weight: 800; color: #000; }
.industry-grid input:checked + .industry-tile svg { stroke: #000; }

/* =========================================
   7. AVATARS & TOPBAR
   ========================================= */
.top-header { display: flex; justify-content: flex-end; align-items: center; padding: 20px 0; width: 100%; margin-bottom: 20px; }
.header-actions { display: flex; align-items: center; gap: 20px; }

.header-avatar, .topbar-avatar {
    width: 45px; height: 45px; border-radius: 50% !important; object-fit: cover;
    border: 2px solid var(--brand-lime); background-color: #f3f4f6;
    flex-shrink: 0; aspect-ratio: 1 / 1; 
}
.pfp-circle {
    width: 150px; height: 150px; border-radius: 50% !important; margin: 0 auto;
    border: 4px solid var(--brand-lime); background-size: cover; background-position: center;
    flex-shrink: 0; aspect-ratio: 1 / 1;
}

.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 3000; align-items: center; justify-content: center; }
.confirm-modal { background: #fff; padding: 40px; border-radius: 24px; max-width: 400px; text-align: center; }
.referral-banner { background: var(--brand-lime); border-radius: 32px; padding: 40px; text-align: center; }
.referral-title { font-weight: 900; line-height: 1; font-size: 48px; margin-bottom: 16px; color: #000; }

/* =========================================
   8. REVIEW & PUBLISH PAGE
   ========================================= */
.review-section-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 20px; padding: 30px; margin-bottom: 30px; }
.review-section-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #f9fafb; padding-bottom: 15px; margin-bottom: 20px; }
.review-section-header h2 { font-size: 20px; margin: 0; }
.edit-link { color: #6b7280; font-size: 14px; font-weight: 600; text-decoration: underline; transition: color 0.2s; }
.edit-link:hover { color: #000; }
.review-q-block { margin-bottom: 20px; }
.review-q { font-size: 13px; color: #6b7280; margin-bottom: 4px; font-weight: 500; }
.review-a { font-size: 15px; color: #000; font-weight: 600; }
.review-a.missing { color: #ef4444; font-style: italic; font-weight: 400; }
.publish-banner { background: #000; color: #fff; border-radius: 24px; padding: 40px; text-align: center; margin-top: 40px; }
.publish-banner h2 { color: #fff; margin-bottom: 15px; }
.publish-banner p { color: #9ca3af; margin-bottom: 25px; }

/* =========================================
   9. MOBILE RESPONSIVENESS (FIXED MENU)
   ========================================= */
.mobile-header { display: none !important; }

@media (max-width: 1024px) {
    /* Hide the desktop topbar entirely */
    .top-header { display: none !important; }
    
    .mobile-header {
        display: flex !important; position: fixed; top: 0; left: 0; right: 0;
        height: 70px; background: #fff; border-bottom: 1px solid #eee;
        padding: 0 20px; align-items: center; justify-content: space-between; z-index: 1000;
    }
    
    .sidebar {
        display: none; position: fixed; top: 70px; left: 0; width: 100%; height: calc(100vh - 70px);
        background: #fff; z-index: 999; flex-direction: column; justify-content: flex-start;
        align-items: stretch; padding: 20px; overflow-y: auto; border-right: none;
    }
    .sidebar.active { display: flex !important; }
    .sidebar-logo, .progress-sidebar { display: none !important; }
    
    .sidebar .nav-item { padding: 16px 20px; font-size: 16px; margin-bottom: 8px; border-radius: 16px; }
    
    .app-container { flex-direction: column; }
    .main-content-wrapper { padding-top: 70px; }
    .main-content, .main-content-inner { padding: 30px 20px !important; }
    .dashboard-grid { grid-template-columns: 1fr; }
    
    .wizard-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
    .wizard-actions .btn-primary { width: 100%; padding: 15px 0; }
    
    .btn-exit, .btn-review { grid-column: span 2; }
    
    /* Ensure editor pages fit on mobile */
    .a4-landscape { transform: scale(0.35); transform-origin: top left; margin-bottom: -130mm; }
}

.menu-toggle { width: 30px; height: 30px; position: relative; cursor: pointer; z-index: 1001; }
.menu-toggle::before { content: ''; position: absolute; top: 50%; left: 2px; right: 2px; height: 3px; background: #000; border-radius: 3px; transform: translateY(-50%); transition: transform 0.3s; }
.menu-toggle::after { content: ''; position: absolute; left: 50%; top: 2px; bottom: 2px; width: 3px; background: #000; border-radius: 3px; transform: translateX(-50%); transition: transform 0.3s; }
.menu-toggle.open::before { transform: translateY(-50%) rotate(45deg); }
.menu-toggle.open::after { transform: translateX(-50%) rotate(45deg); }

/* =========================================
   10. THEME SELECTOR PAGE
   ========================================= */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; margin-top: 20px; }
.theme-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 20px; overflow: hidden; transition: transform 0.2s, box-shadow 0.2s; display: flex; flex-direction: column; cursor: pointer; }
.theme-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.05); }
.theme-thumbnail { width: 100%; height: 300px; background-color: #f3f4f6; background-size: cover; background-position: top center; border-bottom: 1px solid #e5e7eb; }
.theme-info { padding: 24px; display: flex; flex-direction: column; flex-grow: 1; }
.theme-title { font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 18px; margin-bottom: 8px; color: #000; }
.theme-desc { color: #6b7280; font-size: 14px; margin-bottom: 24px; flex-grow: 1; line-height: 1.5; }
.theme-actions { display: flex; gap: 10px; }
.theme-actions .btn-preview { background: #fff !important; border: 1px solid #d1d5db !important; color: #000 !important; width: 50%; padding: 12px 0; font-size: 14px; }
.theme-actions .btn-preview:hover { background: #f9fafb !important; }
.theme-actions .btn-select { width: 50%; padding: 12px 0; font-size: 14px; }

/* Large Preview Modal */
.preview-modal { background: #fff; padding: 30px; border-radius: 24px; width: 95%; max-width: 900px; height: 90vh; display: flex; flex-direction: column; }
.preview-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.preview-header h2 { font-size: 24px; margin: 0; }
.close-preview { background: none; border: none; font-size: 32px; cursor: pointer; line-height: 1; color: #6b7280; transition: color 0.2s; }
.close-preview:hover { color: #000; }
.preview-content { flex-grow: 1; overflow-y: auto; background: #f3f4f6; border-radius: 12px; display: flex; justify-content: center; padding: 40px; }
.preview-image { width: 100%; max-width: 700px; aspect-ratio: 3 / 2; object-fit: cover; object-position: center; box-shadow: 0 10px 30px rgba(0,0,0,0.15); border-radius: 4px; }
.modal-footer { display: flex; justify-content: center; gap: 15px; margin-top: 20px; padding-top: 20px; border-top: 1px solid #e5e7eb; width: 100%; }

.carousel-container { position: relative; width: 100%; display: flex; align-items: center; justify-content: center; }
.carousel-arrow { position: absolute; top: 50%; transform: translateY(-50%); background: #fff; border: 1px solid #e5e7eb; border-radius: 50%; width: 44px; height: 44px; font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 10px rgba(0,0,0,0.1); z-index: 10; color: #000; transition: background 0.2s, transform 0.2s; }
.carousel-arrow:hover { background: #f9fafb; transform: translateY(-50%) scale(1.05); }
.carousel-prev { left: 10px; } .carousel-next { right: 10px; }
.carousel-dots { display: flex; justify-content: center; gap: 10px; margin-top: 24px; }
.carousel-dot { width: 12px; height: 12px; border-radius: 50%; background: #d1d5db; cursor: pointer; transition: background 0.2s; }
.carousel-dot.active { background: #000; }

/* =========================================
   11. A4 LANDSCAPE EDITOR (DON'T CRY WOLF)
   ========================================= */
.editor-workspace {
    background-color: #e5e7eb; 
    padding: 60px 40px; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 60px;
    border-radius: 24px;
    width: 100%;
    box-shadow: inset 0 10px 20px rgba(0,0,0,0.05);
}

/* The True A4 Physical Page (Strictly enforced, NO scrolling allowed) */
.a4-landscape {
    width: 1122px !important; 
    height: 794px !important; 
    min-height: 794px !important;
    max-height: 794px !important;
    background-color: var(--user-bg, #000);
    color: var(--user-text, #fff);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.4);
    flex-shrink: 0;
    position: relative;
    overflow: hidden; /* ABSOLUTELY NO SCROLLING */
    page-break-after: always;
    display: flex;
    transform-origin: top center;
}

@media (max-width: 1600px) { .a4-landscape { transform: scale(0.85); margin-bottom: -120px; } }
@media (max-width: 1300px) { .a4-landscape { transform: scale(0.7); margin-bottom: -240px; } }

/* --- THE DISRUPTOR THEME STYLES (Dynamic Colors) --- */
.theme_disruptor { background: var(--user-bg, #000); color: var(--user-text, #fff); }

/* DIVIDER PAGE */
.dcw-divider { display: flex; align-items: center; justify-content: center; background-color: var(--user-primary, #dfff00); color: var(--user-bg, #000); padding: 80px; text-align: center; }
.dcw-divider h2 { font-family: 'Montserrat', sans-serif; font-size: 130px; font-weight: 900; text-transform: uppercase; line-height: 0.85; letter-spacing: -3px; word-wrap: break-word; }

/* PAGE 1: COVER */
.dcw-cover { flex-direction: column; justify-content: center; padding: 80px; }
.dcw-cover-title { font-family: 'Montserrat', sans-serif; font-size: 140px; font-weight: 900; color: var(--user-primary, #dfff00); line-height: 0.85; text-transform: uppercase; margin-bottom: 20px; letter-spacing: -4px; }
.dcw-cover-sub { font-size: 28px; font-weight: 700; color: var(--user-text, #fff); border-top: 6px solid var(--user-primary, #dfff00); padding-top: 20px; display: inline-block; text-transform: uppercase;}

/* PAGE 2: EXEC SUMMARY */
.dcw-exec { display: grid; grid-template-columns: 1fr 2fr; width: 100%; }
.dcw-exec-left { background-color: var(--user-primary, #dfff00); padding: 60px; color: var(--user-bg, #000); display: flex; align-items: flex-end; }
.dcw-exec-left h2 { font-size: 90px; line-height: 0.9; text-transform: uppercase; letter-spacing: -3px; margin: 0; font-family: 'Montserrat'; font-weight: 900;}
.dcw-exec-right { padding: 80px; display: flex; flex-direction: column; justify-content: center; background: var(--user-bg, #000); }
.dcw-exec-right p { font-size: 22px; line-height: 1.6; margin-bottom: 24px; color: var(--user-text, #fff); opacity: 0.9;}

/* PAGE 3: CONTENTS */
.dcw-contents { background-color: #f9fafb; color: #000; flex-direction: column; padding: 80px; }
.dcw-contents h2 { font-size: 60px; text-transform: uppercase; border-bottom: 8px solid #000; padding-bottom: 20px; margin-bottom: 40px; letter-spacing: -2px; font-family: 'Montserrat'; font-weight: 900;}
.dcw-toc-list { display: flex; flex-direction: column; gap: 20px; width: 80%; }
.dcw-toc-item { display: flex; justify-content: space-between; font-size: 32px; font-weight: 800; font-family: 'Montserrat'; border-bottom: 2px dashed #d1d5db; padding-bottom: 15px; }

/* PAGE 4+: DATA SECTIONS */
.dcw-section { display: grid; grid-template-columns: 350px 1fr; width: 100%; }
.dcw-section-left { background-color: var(--user-primary, #dfff00); color: var(--user-bg, #000); display: flex; justify-content: center; align-items: center; }
.dcw-section-left h2 { font-size: 80px; text-transform: uppercase; transform: rotate(-90deg); white-space: nowrap; letter-spacing: -2px; margin: 0; font-family: 'Montserrat'; font-weight: 900;}
.dcw-section-right { padding: 60px; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-content: start; background: var(--user-bg, #000); overflow: hidden; }

.dcw-card { padding: 25px 0; border-top: 4px solid var(--user-primary, #dfff00); }
.dcw-stat { font-size: 80px; font-weight: 900; font-family: 'Montserrat'; color: var(--user-primary, #dfff00); line-height: 1; margin-bottom: 15px; letter-spacing: -3px;}
.dcw-label { font-size: 15px; color: var(--user-text, #fff); line-height: 1.5; font-weight: 500; opacity: 0.9;}
/* PAGE LAST: THANK YOU */
.dcw-thank-you { 
    background-color: var(--user-bg, #000); 
    color: var(--user-primary, #dfff00); 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    text-align: center; 
    padding: 80px; 
}
.dcw-thank-you h1 { 
    font-family: 'Montserrat', sans-serif; 
    font-size: 150px; 
    font-weight: 900; 
    text-transform: uppercase; 
    margin: 0 0 40px 0; 
    letter-spacing: -4px; 
    line-height: 0.85; 
}
/* Smart logo resizing - ensures it fits a specific box without stretching */
.dcw-ty-logo { 
    max-width: 400px; 
    max-height: 200px; 
    object-fit: contain; 
    margin-bottom: 20px; 
}
.dcw-ty-website { 
    font-size: 24px; 
    font-weight: 700; 
    color: var(--user-text, #fff); 
    text-decoration: none; 
    border-bottom: 3px solid var(--user-primary); 
    padding-bottom: 5px; 
}