:root {
    --primary-color: #1b4332;
    --secondary-color: #2d6a4f;
    --accent-color: #d4a373;
    --bg-color: #f8f9fa;
    --text-color: #212529;
    --white: #ffffff;
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    --radius: 12px;
    --transition: cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #F5F6F8;
    color: var(--text-color);
    line-height: 1.6;
}

/* Dashboard Mode Overrides */
body.dashboard-mode .app-container {
    max-width: 100%;
    padding: 0;
}

body.dashboard-mode .wizard-header,
body.dashboard-mode .wizard-nav,
body.dashboard-mode footer {
    display: none;
}

body.dashboard-mode #currentStep {
    transform: none;
    opacity: 1;
}

/* App Containers */
.app-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Wizard Header */
.wizard-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.logo-area h1 {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    color: var(--primary-color);
}

.logo-area h1 span {
    color: var(--accent-color);
}

/* Progress Bar */
.progress-container {
    width: 100%;
    max-width: 500px;
    position: relative;
    margin-top: 1rem;
}

.progress-bar {
    height: 4px;
    background: #E5E9F0;
    width: 100%;
    position: relative;
    border-radius: 2px;
}

.progress-bar::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: var(--progress, 0%);
    background: var(--primary-color);
    transition: width 0.4s var(--transition);
}

.steps-indicators {
    display: flex;
    justify-content: space-between;
    margin-top: -14px;
}

.step-dot {
    width: 24px;
    height: 24px;
    background: white;
    border: 3px solid #E5E9F0;
    border-radius: 50%;
    z-index: 2;
}

/* Wizard Components */
.step-section {
    display: none;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.4s var(--transition);
}

.step-section.active {
    display: block;
    opacity: 1;
    transform: translateX(0);
}

.step-card {
    background: white;
    padding: 3rem;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    margin-bottom: 2rem;
}

.step-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-family: 'Outfit', sans-serif;
}

.step-desc {
    color: #666;
    margin-bottom: 2.5rem;
}

.input-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.input-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.input-group input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #F0F0F0;
    border-radius: 12px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.input-group input:focus {
    border-color: var(--secondary-color);
}

.recommended-btn {
    background: var(--white);
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 1.5rem;
    width: 100%;
    transition: all 0.3s;
}

.recommended-btn:hover {
    background: var(--secondary-color);
    color: var(--white);
}

/* Item Selection */
.info-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info-list li {
    padding: 1rem;
    border: 2px solid #F5F6F8;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: 0.2s;
}

.info-list li:hover {
    border-color: #E5E9F0;
}

.info-list li.selected {
    border-color: var(--secondary-color);
    background: #F0F7F4;
}

.item-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid #CBD5E0;
    border-radius: 4px;
    position: relative;
}

.selected .item-checkbox {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
}

.selected .item-checkbox::after {
    content: '✓';
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
}

/* Dashboard Specific (SaaS Look) */
.dashboard-view {
    background: #F5F6F8;
}

.dashboard-header {
    background: white;
    padding: 1.5rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #E5E9F0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-metadata {
    display: flex;
    gap: 2.5rem;
}

.meta-item {
    display: flex;
    flex-direction: column;
}

.meta-label {
    font-size: 0.65rem;
    color: #8898AA;
    text-transform: uppercase;
    font-weight: 700;
}

.meta-value {
    font-size: 0.95rem;
    color: var(--primary-color);
    font-weight: 700;
}

.dashboard-grid {
    padding: 2.5rem;
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
}

/* Distribution Cards (Horizontal) */
.dist-section {
    grid-column: span 2;
}

.dist-section-title {
    font-weight: 800;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    color: #32325D;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.dist-list {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

.dist-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: var(--card-shadow);
}

.total-card {
    background: var(--primary-color);
    color: white;
}

.total-card .dist-name,
.total-card .dist-val,
.total-card .dist-perc {
    color: white;
}

.total-card .dist-bar-cont {
    background: rgba(255, 255, 255, 0.2);
}

.total-card .dist-bar-fill {
    background: white;
}

.dist-name {
    font-weight: 700;
    color: #525F7F;
    font-size: 0.8rem;
    height: 2.4rem;
    overflow: hidden;
}

.dist-bar-cont {
    height: 6px;
    background: #EDF2F7;
    border-radius: 3px;
    overflow: hidden;
}

.dist-bar-fill {
    height: 100%;
    background: var(--secondary-color);
    border-radius: 3px;
    transition: width 1s ease;
}

.dist-val-group {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.dist-val {
    font-weight: 800;
    color: var(--primary-color);
    font-size: 1rem;
}

.dist-perc {
    font-size: 0.75rem;
    color: var(--secondary-color);
    font-weight: 700;
}

/* Funnel Visualizer (Real Shape) */
.funnel-card {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: var(--card-shadow);
}

/* Funnel Visualizer (5 Steps) */
.funnel-visual {
    width: 250px;
    height: 400px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.funnel-step {
    width: 100%;
    height: 65px;
    background: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    text-align: center;
    padding: 0 10px;
}

.funnel-step:nth-child(1) {
    clip-path: polygon(0 0, 100% 0, 85% 100%, 15% 100%);
    background: #1b4332;
}

.funnel-step:nth-child(2) {
    clip-path: polygon(15% 0, 85% 0, 75% 100%, 25% 100%);
    background: #2d6a4f;
}

.funnel-step:nth-child(3) {
    clip-path: polygon(25% 0, 75% 0, 68% 100%, 32% 100%);
    background: #40916c;
}

.funnel-step:nth-child(4) {
    clip-path: polygon(32% 0, 68% 0, 62% 100%, 38% 100%);
    background: #52b788;
}

.funnel-step:nth-child(5) {
    clip-path: polygon(38% 0, 62% 0, 50% 100%, 50% 100%);
    background: #74c69d;
    height: 90px;
    padding-bottom: 30px;
}

/* Video Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: black;
    width: 90%;
    max-width: 900px;
    aspect-ratio: 16/9;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    font-weight: 800;
    z-index: 1001;
    line-height: 1;
}

.modal-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Accordions */
.accordion-cont {
    grid-column: 1;
}

.acc-item {
    background: white;
    border-radius: 12px;
    margin-bottom: 0.8rem;
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.acc-header {
    padding: 1.2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    border-bottom: 1px solid #F6F9FC;
}

.acc-title {
    font-weight: 700;
    color: #32325D;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.acc-badge {
    background: #F0F7F4;
    color: var(--secondary-color);
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 700;
}

.acc-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s;
}

.acc-item.open .acc-content {
    max-height: 600px;
}

.acc-inner {
    padding: 2rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    background: #FCFDFF;
}

.acc-block h5 {
    font-size: 0.65rem;
    color: #8898AA;
    text-transform: uppercase;
    margin-bottom: 0.6rem;
}

.acc-block p {
    font-size: 0.85rem;
    color: #525F7F;
    font-weight: 600;
}

/* Audience Flow (Visible Arrows) */
.flow-section {
    grid-column: span 2;
    margin-top: 2rem;
}

.flow-card {
    background: white;
    padding: 3rem;
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--card-shadow);
}

.flow-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}

.flow-icon {
    width: 60px;
    height: 60px;
    background: #F0F7F4;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--secondary-color);
}

.flow-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: #525F7F;
}

.flow-arrow {
    color: var(--primary-color);
    font-size: 2.5rem;
    font-weight: 900;
    opacity: 0.8;
}

/* Navigation & Footer */
.wizard-nav {
    display: flex;
    justify-content: space-between;
    padding: 1.5rem 0;
    margin-top: auto;
}

.primary-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}

.primary-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.primary-btn:disabled {
    background: #E5E9F0;
    color: #A0AEC0;
    cursor: not-allowed;
    transform: none;
}

.secondary-btn {
    background: #EDF2F7;
    color: #4A5568;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
}

.secondary-btn:disabled {
    opacity: 0;
    pointer-events: none;
}

.action-btn {
    background: white;
    border: 1px solid #E5E9F0;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.8rem;
    height: fit-content;
}

.action-btn:hover {
    background: #F7FAFC;
}

.action-btn.primary {
    background: var(--primary-color);
    color: white;
    border: none;
}

.creative-link {
    background: var(--accent-color);
    color: white !important;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 800;
    text-decoration: none;
}

footer {
    margin-top: 3rem;
    text-align: center;
    color: #A0AEC0;
    font-size: 0.8rem;
    padding-bottom: 2rem;
}

.hidden {
    display: none !important;
}

/* Saved Clients */
.saved-clients-dropdown {
    margin-top: 2rem;
    text-align: center;
}

.toggle-clients-btn {
    background: none;
    border: 1px solid #E2E8F0;
    color: #718096;
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    font-size: 0.75rem;
    cursor: pointer;
}

.clients-list-drawer {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 1rem;
    margin-top: 1rem;
    background: white;
    border-radius: 12px;
}

.client-chip {
    background: #F7FAFC;
    padding: 0.6rem 1rem;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    white-space: nowrap;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid #EDF2F7;
}

.delete-client {
    color: #E53E3E;
    font-weight: 800;
    cursor: pointer;
}

@media (max-width: 1200px) {
    .dist-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dist-list {
        grid-template-columns: 1fr 1fr;
    }

    .acc-inner {
        grid-template-columns: 1fr;
    }
}

/* Specific Small Screen Refinements (Mobile) */
@media (max-width: 600px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
        padding: 1.5rem;
    }

    .header-metadata {
        flex-direction: column;
        gap: 1rem;
    }

    .header-actions {
        width: 100%;
        display: flex;
        gap: 0.5rem;
    }

    .header-actions .action-btn {
        flex: 1;
        padding: 0.6rem 0.4rem;
        font-size: 0.7rem;
        text-align: center;
    }

    .dist-list {
        grid-template-columns: 1fr;
    }

    .dist-card {
        padding: 1rem;
    }

    .funnel-visual {
        width: 100%;
        max-width: 250px;
    }

    .flow-card {
        flex-direction: column;
        gap: 1.5rem;
        padding: 2rem;
    }

    .flow-arrow {
        transform: rotate(90deg);
        font-size: 1.5rem;
    }

    .modal-content {
        width: 95%;
    }

    .acc-header {
        padding: 1rem;
    }

    .acc-inner {
        padding: 1.5rem 1rem;
        gap: 1.5rem;
    }
}