/* ═══════════════════════════════════════════════════════════
   VIRALIX APP SHELL — layout only (stay-board-ui PageWrapper pattern)
   Tokens + component overrides for app pages; NOT landing/home styles.
   Home page: landing.css + landing-light.css
   ═══════════════════════════════════════════════════════════ */

body.app-light,
body.app-light.light-theme {
    --bg-primary: #f5f7fa;
    --bg-secondary: #eef1f6;
    --bg-surface: #ffffff;
    --bg-hover: #e8edf4;
    --bg-elevated: #ffffff;
    --bg-modal: #ffffff;

    --text-primary: #1a2332;
    --text-secondary: #5c6778;
    --text-tertiary: #8b95a5;
    --text-main: #1a2332;
    --text-muted: #5c6778;

    --border-primary: #dde3ec;
    --border-secondary: #c8d1de;
    --border-focus: rgba(0, 102, 204, 0.35);

    --accent-primary: #0066cc;
    --accent-secondary: #0078e8;
    --primary: #0066cc;
    --secondary: #0078e8;

    --glass-bg: rgba(255, 255, 255, 0.92);
    --glass-border: #dde3ec;

    --shadow-sm: 0 1px 2px rgba(26, 35, 50, 0.06);
    --shadow-md: 0 2px 8px rgba(26, 35, 50, 0.08);
    --shadow-lg: 0 4px 16px rgba(26, 35, 50, 0.1);

    /* Sidebar tokens — light professional */
    --shell-sidebar-bg: #ffffff;
    --shell-sidebar-fg: #1a2332;
    --shell-sidebar-muted: #8b95a5;
    --shell-sidebar-border: #dde3ec;
    --shell-sidebar-accent: #f0f4f9;
    --shell-sidebar-active-bg: #0066cc;
    --shell-sidebar-active-fg: #ffffff;

    --shell-topbar-bg: #ffffff;
    --shell-topbar-border: #dde3ec;

    --transition-base: 180ms ease;
    --transition-fast: 120ms ease;
    --accent-cyan: #0066cc;
    --accent-purple: #0078e8;
    --accent-success: #16a34a;
    --accent-meta: #0866ff;
    --gradient-btn: linear-gradient(135deg, #0066cc 0%, #0078e8 100%);
    --gradient-text: linear-gradient(135deg, #0066cc 0%, #0078e8 100%);

    background: var(--bg-primary);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
}

html:has(body.app-light[data-app-shell]) {
    height: 100%;
    overflow: hidden;
}

body.app-light .background-effects {
    display: none;
}

body.app-light .glass-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-primary);
    box-shadow: var(--shadow-sm);
}

body.app-light .glass-card::before {
    display: none;
}

body.app-light .glass-card:hover {
    background: var(--bg-surface);
    border-color: var(--border-secondary);
    box-shadow: var(--shadow-md);
}

/* ── Shell layout ── */
.app-shell {
    display: flex;
    height: 100%;
    min-height: 0;
    width: 100%;
    overflow: hidden;
    background: var(--bg-primary);
}

.app-sidebar {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    width: 208px;
    height: 100vh;
    background: var(--shell-sidebar-bg);
    border-right: 1px solid var(--shell-sidebar-border);
    transition: width 0.3s ease;
    z-index: 200;
}

.app-sidebar.is-collapsed {
    width: 52px;
}

.app-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    min-height: 56px;
    padding: 0 12px;
    border-bottom: 1px solid var(--shell-sidebar-border);
}

.app-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    text-decoration: none;
    color: inherit;
}

.app-sidebar-brand:hover {
    opacity: 0.85;
}

.app-sidebar-logo {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: var(--shell-sidebar-active-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.app-sidebar-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.app-sidebar-logo i {
    color: #fff;
    font-size: 13px;
}

.app-sidebar-brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.app-sidebar-brand-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--shell-sidebar-fg);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-sidebar-brand-sub {
    font-size: 10px;
    color: var(--shell-sidebar-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-sidebar.is-collapsed .app-sidebar-brand-text {
    display: none;
}

.app-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.app-nav-group {
    margin-bottom: 12px;
}

.app-nav-group-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 6px 10px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--shell-sidebar-muted);
    transition: color 0.2s;
}

.app-nav-group-toggle:hover {
    color: var(--shell-sidebar-fg);
}

.app-nav-group-toggle i {
    font-size: 10px;
}

.app-sidebar.is-collapsed .app-nav-group-toggle span,
.app-sidebar.is-collapsed .app-nav-group-toggle i.fa-chevron-up,
.app-sidebar.is-collapsed .app-nav-group-toggle i.fa-chevron-down {
    display: none;
}

.app-nav-group-items {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-left: 2px;
}

.app-sidebar.is-collapsed .app-nav-group-items {
    padding-left: 0;
}

.app-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    color: rgba(26, 35, 50, 0.82);
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.app-nav-link i {
    width: 16px;
    text-align: center;
    font-size: 14px;
    flex-shrink: 0;
}

.app-nav-link:hover {
    background: var(--shell-sidebar-accent);
    color: var(--shell-sidebar-fg);
}

.app-nav-link.active {
    background: var(--shell-sidebar-active-bg);
    color: var(--shell-sidebar-active-fg);
    box-shadow: var(--shadow-md);
}

.app-nav-link.active i {
    color: var(--shell-sidebar-active-fg);
}

.app-sidebar.is-collapsed .app-nav-link span {
    display: none;
}

.app-sidebar.is-collapsed .app-nav-link {
    justify-content: center;
    padding: 8px;
}

.app-sidebar-footer {
    padding: 8px;
    border-top: 1px solid var(--shell-sidebar-border);
}

.app-sidebar-collapse-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border: none;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: rgba(26, 35, 50, 0.75);
    transition: background 0.2s, color 0.2s;
}

.app-sidebar-collapse-btn:hover {
    background: var(--shell-sidebar-accent);
    color: var(--shell-sidebar-fg);
}

.app-sidebar-collapse-btn i {
    width: 16px;
    text-align: center;
    font-size: 14px;
}

.app-sidebar.is-collapsed .app-sidebar-collapse-btn {
    justify-content: center;
    padding: 8px;
}

.app-sidebar.is-collapsed .app-sidebar-collapse-btn span {
    display: none;
}

/* ── Main column ── */
.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

.app-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    min-height: 56px;
    padding: 0 16px;
    background: var(--shell-topbar-bg);
    border-bottom: 1px solid var(--shell-topbar-border);
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.app-topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.app-topbar-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    background: var(--bg-surface);
    color: var(--text-primary);
    cursor: pointer;
}

.app-topbar-title-wrap {
    min-width: 0;
}

.app-topbar-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-topbar-subtitle {
    margin: 2px 0 0;
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.app-topbar-user {
    position: relative;
}

.app-topbar-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: var(--accent-primary);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-topbar-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: var(--bg-surface);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    padding: 6px;
    display: none;
    z-index: 300;
}

.app-topbar-dropdown.open {
    display: block;
}

.app-topbar-dropdown-label {
    padding: 8px 10px 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.app-topbar-dropdown-email {
    padding: 0 10px 8px;
    font-size: 11px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-primary);
    margin-bottom: 4px;
}

.app-topbar-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
    border: none;
    border-radius: 6px;
    background: transparent;
    text-decoration: none;
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
    text-align: left;
}

.app-topbar-dropdown-item:hover {
    background: var(--bg-hover);
}

.app-topbar-dropdown-item.danger {
    color: #dc2626;
}

/* ── Page content area ── */
.app-page-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 20px 32px;
    background: var(--bg-primary);
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
}

body.app-light .app-container,
body.app-light .main-content-single {
    max-width: 100%;
    margin: 0;
    padding: 0 !important;
}

body.app-light .hub-wrap {
    color: var(--text-primary);
}

body.app-light .hub-page-header {
    border-bottom-color: var(--border-primary);
}

body.app-light .hub-metric-card,
body.app-light .hub-stats > div,
body.app-light .hub-card {
    background: var(--bg-surface);
    border-color: var(--border-primary);
}

/* Sidebar mobile overlay */
.app-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(26, 35, 50, 0.35);
    z-index: 190;
}

.app-sidebar-backdrop.visible {
    display: block;
}

/* ── Desktop: hide old header if present inside page ── */
body[data-app-shell] > .app-header {
    display: none !important;
}

/* ── Mobile ── */
@media (max-width: 768px) {
    .app-shell {
        height: 100%;
    }

    .app-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: min(280px, 86vw) !important;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: var(--shadow-lg);
        z-index: 220;
    }

    .app-sidebar.is-collapsed {
        width: min(280px, 86vw) !important;
    }

    .app-sidebar.mobile-open {
        transform: translateX(0);
    }

    .app-sidebar-footer {
        display: none;
    }

    .app-main {
        min-height: 0;
        width: 100%;
    }

    .app-topbar {
        height: 52px;
        min-height: 52px;
        padding: 0 12px;
    }

    .app-topbar-menu-btn {
        display: flex;
        width: 40px;
        height: 40px;
    }

    .app-topbar-title {
        font-size: 16px;
    }

    .app-topbar-subtitle {
        display: none;
    }

    .app-topbar-right {
        gap: 6px;
    }

    .app-topbar-avatar {
        width: 32px;
        height: 32px;
        font-size: 11px;
    }

    .app-topbar-pricing-btn {
        width: 36px;
        height: 36px;
        padding: 0;
        justify-content: center;
    }

    .app-topbar-home-btn {
        width: 36px;
        height: 36px;
        padding: 0;
        justify-content: center;
    }

    .app-topbar-dropdown {
        right: 0;
        left: auto;
        min-width: 200px;
    }

    .app-page-content {
        padding: 12px 12px calc(16px + env(safe-area-inset-bottom, 0px));
    }

    body[data-app-shell] .mobile-bottom-nav {
        display: none !important;
    }

    body.app-light.sidebar-drawer-open .app-page-content {
        overflow: hidden;
    }
}

@media (min-width: 769px) {
    body[data-app-shell] .mobile-bottom-nav {
        display: none !important;
    }
}

/* ── Topbar pricing button ── */
.app-topbar-pricing-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    background: var(--bg-surface);
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.app-topbar-pricing-btn:hover {
    background: var(--bg-hover);
    border-color: var(--border-secondary);
}

.app-topbar-pricing-btn i {
    color: #d97706;
}

@media (max-width: 640px) {
    .app-topbar-pricing-btn span {
        display: none;
    }

    .app-topbar-home-btn span {
        display: none;
    }
}

/* ── Topbar home button (dashboard) ── */
.app-topbar-home-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    background: var(--bg-surface);
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}

.app-topbar-home-btn:hover {
    background: var(--bg-hover);
    border-color: var(--border-secondary);
}

.app-topbar-home-btn i {
    color: var(--accent-primary, #6366f1);
}

/* ═══════════════════════════════════════════════════════════
   LIGHT THEME — component overrides (counter style.css v4)
   ═══════════════════════════════════════════════════════════ */

body.app-light .background-effects,
body.app-light .background-effects::before,
body.app-light .floating-orb,
body.app-light .floating-orbs,
body.app-light .subtle-hexagons,
body.app-light .subtle-hexagon,
body.app-light .holographic-grid,
body.app-light .rgb-orb,
body.app-light .matrix-stream,
body.app-light .neon-grid-line,
body.app-light .hexagon,
body.app-light .energy-ring,
body.app-light .circuit-trace,
body.app-light .energy-spark,
body.app-light .color-stream,
body.app-light .rgb-cube,
body.app-light .data-node,
body.app-light .page-glow {
    display: none !important;
}

/* Glass cards */
body.app-light .glass-card {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-primary) !important;
    border-radius: 12px !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: var(--shadow-sm) !important;
    transition: border-color var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base) !important;
}

body.app-light .glass-card::before {
    display: none !important;
}

body.app-light .glass-card:hover {
    border-color: var(--border-secondary) !important;
    box-shadow: var(--shadow-md) !important;
    transform: translateY(-1px) !important;
}

/* Buttons */
body.app-light .cta-primary,
body.app-light .cta-btn,
body.app-light .btn-primary,
body.app-light .sim-generate-btn,
body.app-light .auth-submit-btn,
body.app-light .btn-launch,
body.app-light .plan-v2-btn:hover,
body.app-light .plan-card-v2.featured .plan-v2-btn {
    background: var(--accent-primary) !important;
    background-image: none !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    box-shadow: var(--shadow-sm) !important;
    transition: background var(--transition-base), box-shadow var(--transition-base), transform var(--transition-fast) !important;
}

body.app-light .cta-primary:hover,
body.app-light .cta-btn:hover,
body.app-light .btn-primary:hover,
body.app-light .sim-generate-btn:hover,
body.app-light .auth-submit-btn:hover,
body.app-light .btn-launch:hover:not(:disabled) {
    background: var(--accent-secondary) !important;
    color: #ffffff !important;
    box-shadow: var(--shadow-md) !important;
    transform: translateY(-1px) !important;
}

body.app-light .cta-secondary,
body.app-light .btn-outline,
body.app-light .btn-secondary,
body.app-light .plan-v2-btn {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-primary) !important;
    color: var(--text-primary) !important;
    border-radius: 8px !important;
    transition: background var(--transition-base), border-color var(--transition-base), color var(--transition-base) !important;
}

body.app-light .cta-secondary:hover,
body.app-light .btn-outline:hover,
body.app-light .btn-secondary:hover,
body.app-light .plan-v2-btn:hover {
    background: var(--bg-hover) !important;
    border-color: var(--border-secondary) !important;
    box-shadow: none !important;
}

body.app-light .btn-ghost {
    background: transparent !important;
    color: var(--accent-primary) !important;
    border: 1px solid rgba(0, 102, 204, 0.2) !important;
}

body.app-light .btn-ghost:hover {
    background: rgba(0, 102, 204, 0.06) !important;
}

/* Forms */
body.app-light input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="file"]),
body.app-light select,
body.app-light textarea,
body.app-light .form-input,
body.app-light .form-textarea,
body.app-light .form-select,
body.app-light .hub-select,
body.app-light .launch-input,
body.app-light .sim-input,
body.app-light .sim-select,
body.app-light .sim-textarea,
body.app-light .input-group-v2 input {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-primary) !important;
    border-radius: 8px !important;
    color: var(--text-primary) !important;
    transition: border-color var(--transition-base), box-shadow var(--transition-base) !important;
}

body.app-light input:focus,
body.app-light select:focus,
body.app-light textarea:focus,
body.app-light .form-input:focus,
body.app-light .form-textarea:focus,
body.app-light .form-select:focus,
body.app-light .hub-select:focus,
body.app-light .launch-input:focus,
body.app-light .sim-input:focus {
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.12) !important;
    outline: none !important;
}

body.app-light input::placeholder,
body.app-light textarea::placeholder {
    color: var(--text-tertiary) !important;
}

body.app-light select option {
    background: var(--bg-surface) !important;
    color: var(--text-primary) !important;
}

/* Tabs */
body.app-light .generator-tabs,
body.app-light .hub-tabs,
body.app-light .sim-tabs,
body.app-light .auth-tabs {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-primary) !important;
    border-radius: 10px !important;
}

body.app-light .tab-btn,
body.app-light .hub-tab,
body.app-light .sim-tabs .tab-btn,
body.app-light .auth-tab {
    color: var(--text-secondary) !important;
    background: transparent !important;
    border: none !important;
    transition: background var(--transition-base), color var(--transition-base) !important;
}

body.app-light .tab-btn:hover,
body.app-light .hub-tab:hover:not(.active),
body.app-light .sim-tabs .tab-btn:hover {
    color: var(--text-primary) !important;
    background: var(--bg-hover) !important;
}

body.app-light .tab-btn.active,
body.app-light .hub-tab.active,
body.app-light .sim-tabs .tab-btn.active,
body.app-light .auth-tab.active,
body.app-light .chip.active,
body.app-light .layout-btn.active {
    background: var(--accent-primary) !important;
    color: #ffffff !important;
    border-color: transparent !important;
    box-shadow: var(--shadow-sm) !important;
}

body.app-light .tab-btn.active::after {
    display: none !important;
}

/* Generator / Vision AI tabs */
body.app-light .generator-card .tab-content {
    display: none !important;
}

body.app-light .generator-card .tab-content.active:not(.hidden) {
    display: block !important;
}

/* Drop zone & upload */
body.app-light .drop-zone,
body.app-light .upload-wrapper {
    background: var(--bg-surface) !important;
    border: 2px dashed var(--border-secondary) !important;
    transition: border-color var(--transition-base), background var(--transition-base) !important;
}

body.app-light .drop-zone:hover,
body.app-light .drop-zone.dragover,
body.app-light .upload-wrapper:hover,
body.app-light .upload-wrapper.drag-active {
    border-color: var(--accent-primary) !important;
    background: rgba(0, 102, 204, 0.04) !important;
    box-shadow: none !important;
}

body.app-light .drop-zone::before {
    display: none !important;
}

/* Hub dashboard */
body.app-light .hub-page-eyebrow,
body.app-light .hub-card-title i,
body.app-light .launch-step,
body.app-light .ai-tip,
body.app-light .ai-analyzing,
body.app-light .profile-badge,
body.app-light .tag,
body.app-light .sim-step.active {
    color: var(--accent-primary) !important;
}

body.app-light .hub-card-title i,
body.app-light .profile-badge,
body.app-light .tag {
    background: rgba(0, 102, 204, 0.08) !important;
    border-color: rgba(0, 102, 204, 0.15) !important;
}

body.app-light .post-card,
body.app-light .sel-info,
body.app-light .history-item,
body.app-light .health-card,
body.app-light .hc-metric,
body.app-light .launch-ids span,
body.app-light .hub-step-tag,
body.app-light .color-preview,
body.app-light .result-box,
body.app-light .audience-list {
    background: var(--bg-secondary) !important;
    border-color: var(--border-primary) !important;
}

body.app-light .post-img-wrap {
    background: var(--bg-hover) !important;
}

body.app-light .target-explanation-box,
body.app-light .advisory-box,
body.app-light .launch-step {
    background: rgba(0, 102, 204, 0.04) !important;
    border-color: rgba(0, 102, 204, 0.12) !important;
}

body.app-light .sel-info.has-selection {
    background: rgba(22, 163, 74, 0.06) !important;
    border-color: rgba(22, 163, 74, 0.2) !important;
    color: #15803d !important;
}

body.app-light .launch-success h3,
body.app-light .hc-status.active,
body.app-light .ai-score-badge.score-high {
    color: #15803d !important;
}

body.app-light .launch-error,
body.app-light .btn-danger {
    color: #dc2626 !important;
}

/* Studio & design */
body.app-light .studio-controls,
body.app-light .studio-controls textarea,
body.app-light .canvas-wrapper,
body.app-light .editor-panel {
    background: var(--bg-surface) !important;
    border-color: var(--border-primary) !important;
    color: var(--text-primary) !important;
}

body.app-light .control-group label,
body.app-light .compact-header h2,
body.app-light .section-heading,
body.app-light .profile-page-header h1,
body.app-light .sim-header h2,
body.app-light .sim-header h3 {
    color: var(--text-primary) !important;
}

body.app-light .compact-header p,
body.app-light .form-label,
body.app-light .hub-label,
body.app-light .launch-field label {
    color: var(--text-secondary) !important;
}

body.app-light .result-header {
    border-bottom-color: var(--border-primary) !important;
}

body.app-light .chip {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-primary) !important;
    color: var(--text-primary) !important;
    transition: background var(--transition-base), border-color var(--transition-base) !important;
}

body.app-light .chip.active {
    background: var(--accent-primary) !important;
    color: #fff !important;
    border-color: var(--accent-primary) !important;
}

body.app-light .template-type-card {
    background: var(--bg-secondary) !important;
    border-color: var(--border-primary) !important;
    color: var(--text-primary) !important;
}

body.app-light .template-type-card.active {
    border-color: var(--accent-primary) !important;
    background: rgba(0, 102, 204, 0.08) !important;
    box-shadow: 0 0 0 1px rgba(0, 102, 204, 0.2) !important;
}

body.app-light .template-type-card .tt-desc {
    color: var(--text-secondary) !important;
}

body.app-light .comp-style-card {
    background: var(--bg-secondary) !important;
    border-color: var(--border-primary) !important;
}

body.app-light .comp-style-card.active {
    border-color: var(--accent-primary) !important;
    background: rgba(0, 102, 204, 0.08) !important;
}

body.app-light .comp-preview {
    background: #e8edf4 !important;
    border-color: var(--border-primary) !important;
}

body.app-light .comp-preview .cp-img { background: rgba(0, 102, 204, 0.35) !important; }
body.app-light .comp-preview .cp-text { background: rgba(255,255,255,0.95) !important; }
body.app-light .comp-preview .cp-cta { background: rgba(0, 180, 170, 0.75) !important; }

/* Modals */
body.app-light .modal-overlay,
body.app-light .pricing-modal-overlay {
    background: rgba(26, 35, 50, 0.4) !important;
    backdrop-filter: blur(4px) !important;
}

body.app-light .modal-content,
body.app-light .modal.glass-card,
body.app-light .auth-modal-content,
body.app-light .auth-modal-v2,
body.app-light .pricing-modal-content {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-primary) !important;
    border-radius: 12px !important;
    box-shadow: var(--shadow-lg) !important;
    backdrop-filter: none !important;
    color: var(--text-primary) !important;
}

body.app-light .plan-card-v2,
body.app-light .plan-card {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-primary) !important;
    backdrop-filter: none !important;
    transition: border-color var(--transition-base), box-shadow var(--transition-base) !important;
}

body.app-light .plan-card-v2.featured {
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 0 1px rgba(0, 102, 204, 0.15), var(--shadow-md) !important;
}

body.app-light .plan-card-v2 .price {
    background: none !important;
    -webkit-text-fill-color: var(--text-primary) !important;
    color: var(--text-primary) !important;
}

body.app-light .close-modal,
body.app-light .close-pricing {
    color: var(--text-secondary) !important;
    transition: color var(--transition-fast) !important;
}

body.app-light .close-modal:hover,
body.app-light .close-pricing:hover {
    color: var(--text-primary) !important;
}

/* Footer */
body.app-light .app-footer,
body.app-light .landing-footer.app-footer {
    background: var(--bg-surface) !important;
    border-top: 1px solid var(--border-primary) !important;
    color: var(--text-secondary) !important;
}

body[data-app-shell] .mobile-bottom-nav {
    display: none !important;
}

/* Landing extras */
body.app-light .compare-box.bad {
    background: rgba(220, 38, 38, 0.05) !important;
    border-color: rgba(220, 38, 38, 0.15) !important;
}

body.app-light .compare-box.good {
    background: rgba(0, 102, 204, 0.05) !important;
    border-color: rgba(0, 102, 204, 0.18) !important;
    box-shadow: var(--shadow-sm) !important;
}

body.app-light .compare-box.good::after {
    display: none !important;
}

body.app-light .compare-desc,
body.app-light .feature-list,
body.app-light .faq-a,
body.app-light .testi-text,
body.app-light .step-card p {
    color: var(--text-secondary) !important;
}

body.app-light .faq-q {
    color: var(--text-primary) !important;
}

body.app-light .faq-item.open .faq-a {
    color: var(--text-secondary) !important;
}

body.app-light .testi-card > i {
    color: var(--accent-primary) !important;
}

body.app-light .author-img {
    color: #ffffff !important;
    background: var(--accent-primary) !important;
}

body.app-light .compare-box.bad .big-num.bad {
    color: #dc2626 !important;
}

body.app-light .compare-box.good .big-num.good {
    color: #15803d !important;
}

body.app-light .faq-q .icon-accent {
    color: var(--accent-primary) !important;
}

body.app-light .roi-badge {
    background: rgba(0, 102, 204, 0.1) !important;
    color: var(--accent-primary) !important;
}

body.app-light .roi-save-val {
    color: var(--accent-primary) !important;
}

body.app-light .profile-avatar {
    background: var(--accent-primary) !important;
    color: #fff !important;
}

body.app-light .profile-status {
    background: rgba(0, 102, 204, 0.08) !important;
    color: var(--accent-primary) !important;
    border: 1px solid rgba(0, 102, 204, 0.15) !important;
}

body.app-light .btn-logout {
    background: rgba(220, 38, 38, 0.08) !important;
    color: #dc2626 !important;
    border: 1px solid rgba(220, 38, 38, 0.15) !important;
}

/* Toast & badges */
body.app-light .vx-toast-success {
    background: rgba(22, 163, 74, 0.1) !important;
    color: #15803d !important;
    border-color: rgba(22, 163, 74, 0.2) !important;
}

body.app-light .vx-toast-error {
    background: rgba(220, 38, 38, 0.1) !important;
    color: #dc2626 !important;
    border-color: rgba(220, 38, 38, 0.2) !important;
}

body.app-light .vx-toast-info {
    background: rgba(0, 102, 204, 0.1) !important;
    color: var(--accent-primary) !important;
    border-color: rgba(0, 102, 204, 0.2) !important;
}

body.app-light .badge-new-small {
    background: var(--accent-primary) !important;
    color: #fff !important;
}

/* Scrollbar */
body.app-light ::-webkit-scrollbar-thumb {
    background: var(--border-secondary) !important;
}

body.app-light ::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary) !important;
}

/* Links */
body.app-light a:not(.app-nav-link):not(.cta-btn):not(.btn-primary) {
    transition: color var(--transition-fast) !important;
}

body.app-light .history-view-btn:hover,
body.app-light .sim-step:hover,
body.app-light .sim-copy-btn:hover {
    background: var(--bg-hover) !important;
    color: var(--text-primary) !important;
}

body.app-light .sim-copy-btn {
    background: var(--bg-secondary) !important;
    border-color: var(--border-primary) !important;
    color: var(--text-primary) !important;
}

body.app-light .landing-hero {
    background: var(--bg-surface) !important;
}

body.app-light .meta-btn-copy {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-primary) !important;
}

body.app-light .meta-btn-copy:hover {
    background: var(--bg-hover) !important;
}

/* Design studio helpers */
body.app-light .studio-placeholder-icon {
    font-size: 3rem;
    color: var(--border-secondary) !important;
    margin-bottom: 15px;
}

body.app-light .studio-placeholder-text {
    color: var(--text-tertiary) !important;
    max-width: 250px;
}

body.app-light .editor-divider {
    border-top: 1px solid var(--border-primary);
    padding-top: 15px;
}

body.app-light .download-canvas-btn {
    background: var(--accent-primary) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    border: none !important;
}

body.app-light .download-canvas-btn:hover {
    background: var(--accent-secondary) !important;
}

body.app-light .meta-section-container {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-primary) !important;
    color: var(--text-primary) !important;
}

body.app-light .ratio-btn,
body.app-light .style-btn,
body.app-light .fx-btn,
body.app-light .toggle-layer {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-primary) !important;
    color: var(--text-secondary) !important;
    transition: background var(--transition-base), border-color var(--transition-base), color var(--transition-base) !important;
}

body.app-light .ratio-btn:hover,
body.app-light .style-btn:hover,
body.app-light .fx-btn:hover,
body.app-light .toggle-layer:hover {
    background: var(--bg-hover) !important;
    color: var(--text-primary) !important;
}

body.app-light .ratio-btn.active,
body.app-light .style-btn.active,
body.app-light .fx-btn.active,
body.app-light .toggle-layer.active {
    background: rgba(0, 102, 204, 0.08) !important;
    border-color: var(--accent-primary) !important;
    color: var(--accent-primary) !important;
    box-shadow: none !important;
}

body.app-light .post-canvas-container {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-primary) !important;
}

body.app-light .content-box,
body.app-light .idea-card,
body.app-light #contentOutput,
body.app-light .output-box {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-primary) !important;
    color: var(--text-primary) !important;
}

body.app-light .idea-card h4 {
    color: var(--accent-primary) !important;
}

body.app-light #campaignContent strong,
body.app-light #campaignContent h1,
body.app-light #campaignContent h2,
body.app-light #campaignContent h3 {
    color: var(--text-primary) !important;
}

body.app-light .editor-select {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-primary) !important;
    color: var(--text-primary) !important;
}
