/* ═══════════════════════════════════════════════════════
   ECOMANAGER AI — Module-Specific Styles
   AI Ads, Media Generator, Landing Pages, Chat, Orders, etc.
   ═══════════════════════════════════════════════════════ */

/* ══════ MODULE PAGE COMMON ══════ */
.module-hero {
    padding: 32px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(var(--accent-primary-rgb), 0.08) 0%, rgba(var(--accent-cyan-rgb), 0.04) 100%);
}

.module-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(var(--accent-primary-rgb), 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.module-hero-content {
    position: relative;
    z-index: 1;
}

.module-hero h2 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.module-hero h2 .ai-tag {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 10px;
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--radius-full);
    letter-spacing: 1px;
    animation: aiTagGlow 2s ease-in-out infinite;
}

@keyframes aiTagGlow {
    0%, 100% { box-shadow: 0 0 10px rgba(var(--accent-primary-rgb), 0.3); }
    50% { box-shadow: 0 0 20px rgba(var(--accent-primary-rgb), 0.5); }
}

.module-hero p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    max-width: 600px;
    line-height: 1.6;
}

.module-hero-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* ══════ AI ADS MODULE ══════ */
.ads-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
}

.upload-zone {
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    min-height: 250px;
    position: relative;
    overflow: hidden;
}

.upload-zone:hover {
    border-color: var(--accent-primary);
    background: rgba(var(--accent-primary-rgb), 0.03);
}

.upload-zone.dragging {
    border-color: var(--accent-primary);
    background: rgba(var(--accent-primary-rgb), 0.06);
    transform: scale(1.01);
}

.upload-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-xl);
    background: rgba(var(--accent-primary-rgb), 0.1);
    color: var(--accent-primary);
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.upload-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.upload-desc {
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

.upload-formats {
    display: flex;
    gap: 6px;
    margin-top: 14px;
}

.upload-format-tag {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 8px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ══════ CAMPAIGN CARDS ══════ */
.campaigns-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.campaign-card {
    padding: 22px;
    position: relative;
}

.campaign-card-status {
    position: absolute;
    top: 22px;
    right: 22px;
}

.campaign-platform {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.campaign-platform-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 1rem;
}

.campaign-platform-icon.facebook {
    background: rgba(24, 119, 242, 0.12);
    color: #1877f2;
}

.campaign-platform-icon.instagram {
    background: rgba(225, 48, 108, 0.12);
    color: #e1306c;
}

.campaign-platform-icon.tiktok {
    background: rgba(255, 0, 80, 0.12);
    color: #ff0050;
}

.campaign-name {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.campaign-desc {
    font-size: 0.82rem;
    color: var(--text-tertiary);
    margin-bottom: 16px;
    line-height: 1.5;
}

.campaign-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.campaign-metric {
    text-align: center;
}

.campaign-metric-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
}

.campaign-metric-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* ══════ AI MEDIA GENERATOR ══════ */
.media-workspace {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 20px;
    min-height: 600px;
}

.media-sidebar-panel {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.media-preview-panel {
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.media-preview-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-glass);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-lg);
    min-height: 400px;
    position: relative;
    overflow: hidden;
}

.media-placeholder {
    text-align: center;
    color: var(--text-muted);
}

.media-placeholder i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.3;
}

.media-placeholder p {
    font-size: 0.9rem;
}

.media-type-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.media-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 8px;
    border-radius: var(--radius-md);
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    font-size: 0.78rem;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.media-type-btn:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.media-type-btn.active {
    border-color: var(--accent-primary);
    background: rgba(var(--accent-primary-rgb), 0.08);
    color: var(--accent-primary);
}

.media-type-btn i {
    font-size: 1.2rem;
}

/* ══════ LANDING PAGE BUILDER ══════ */
.landing-builder {
    display: grid;
    grid-template-columns: 280px 1fr 260px;
    gap: 1px;
    background: var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: 650px;
}

.builder-components,
.builder-canvas,
.builder-properties {
    background: var(--bg-secondary);
    padding: 20px;
}

.builder-components {
    overflow-y: auto;
}

.builder-canvas {
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
}

.builder-canvas-frame {
    width: 100%;
    max-width: 900px;
    min-height: 500px;
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
}

.builder-section-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.component-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    cursor: grab;
    transition: all var(--transition-fast);
    margin-bottom: 4px;
}

.component-item:hover {
    background: var(--bg-glass);
}

.component-item i {
    width: 28px;
    text-align: center;
    color: var(--accent-primary);
    font-size: 0.9rem;
}

.component-item span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ══════ AI CHAT / CUSTOMER BOT ══════ */
.chat-workspace {
    display: grid;
    grid-template-columns: 300px 1fr 280px;
    gap: 20px;
    min-height: 600px;
}

.chat-contacts {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.chat-contacts-header {
    padding: 18px;
    border-bottom: 1px solid var(--border-color);
}

.chat-contacts-list {
    flex: 1;
    overflow-y: auto;
}

.chat-contact {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    cursor: pointer;
    transition: background var(--transition-fast);
    border-bottom: 1px solid rgba(255,255,255,0.02);
}

.chat-contact:hover,
.chat-contact.active {
    background: var(--bg-glass);
}

.chat-contact-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

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

.chat-contact-name {
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-contact-msg {
    font-size: 0.78rem;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-contact-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.chat-contact-time {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.chat-unread-badge {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-primary);
    color: white;
    border-radius: 50%;
    font-size: 0.65rem;
    font-weight: 700;
}

.chat-main {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

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

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chat-message {
    display: flex;
    gap: 10px;
    max-width: 75%;
}

.chat-message.sent {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chat-msg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.chat-msg-bubble {
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    font-size: 0.88rem;
    line-height: 1.5;
}

.chat-message.received .chat-msg-bubble {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-bottom-left-radius: 4px;
}

.chat-message.sent .chat-msg-bubble {
    background: var(--accent-primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-message.ai-reply .chat-msg-avatar {
    background: var(--gradient-neon);
    color: white;
}

.chat-ai-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    color: var(--accent-cyan);
    font-weight: 600;
    margin-bottom: 4px;
}

.chat-input-area {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.chat-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.chat-input-wrapper input {
    flex: 1;
    font-size: 0.9rem;
}

.chat-analytics {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
}

/* ══════ ORDERS MODULE ══════ */
.orders-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.orders-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 7px 16px;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 500;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.filter-btn.active {
    background: rgba(var(--accent-primary-rgb), 0.12);
    border-color: rgba(var(--accent-primary-rgb), 0.3);
    color: var(--accent-primary);
}

.filter-btn:hover:not(.active) {
    background: var(--bg-glass-hover);
    color: var(--text-primary);
}

.order-tracking-pipeline {
    display: flex;
    gap: 4px;
    margin-bottom: 28px;
    background: var(--bg-glass);
    padding: 4px;
    border-radius: var(--radius-lg);
    overflow-x: auto;
}

.pipeline-stage {
    flex: 1;
    min-width: 140px;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.pipeline-stage.active {
    background: rgba(var(--accent-primary-rgb), 0.1);
}

.pipeline-stage-count {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 2px;
}

.pipeline-stage-label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.pipeline-stage.active .pipeline-stage-count { color: var(--accent-primary); }

/* Order Detail Modal */
.order-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.order-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 20px 0;
}

.timeline-item {
    display: flex;
    gap: 14px;
    padding-bottom: 24px;
    position: relative;
}

.timeline-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 36px;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item.completed::before {
    background: var(--accent-emerald);
}

.timeline-dot {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.75rem;
    flex-shrink: 0;
    z-index: 1;
}

.timeline-item.completed .timeline-dot {
    background: rgba(var(--accent-emerald-rgb), 0.15);
    color: var(--accent-emerald);
}

.timeline-item.current .timeline-dot {
    background: rgba(var(--accent-primary-rgb), 0.15);
    color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(var(--accent-primary-rgb), 0.1);
}

.timeline-item.pending .timeline-dot {
    background: var(--bg-glass);
    color: var(--text-muted);
}

.timeline-content h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.timeline-content p {
    font-size: 0.78rem;
    color: var(--text-tertiary);
}

/* ══════ PRODUCTS MODULE ══════ */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.product-card {
    overflow: hidden;
    transition: all var(--transition-base);
}

.product-card:hover {
    transform: translateY(-2px);
}

.product-img {
    height: 180px;
    background: var(--bg-glass);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}

.product-img::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(transparent, var(--bg-card));
}

.product-img .product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 1;
}

.product-body {
    padding: 16px;
}

.product-name {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-category {
    font-size: 0.78rem;
    color: var(--text-tertiary);
    margin-bottom: 12px;
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-price {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--accent-primary);
}

.product-stock {
    font-size: 0.78rem;
    color: var(--text-tertiary);
}

/* ══════ INVENTORY MODULE ══════ */
.inventory-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.inventory-alert {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    background: rgba(var(--accent-amber-rgb), 0.06);
    border: 1px solid rgba(var(--accent-amber-rgb), 0.15);
}

.inventory-alert.critical {
    background: rgba(var(--accent-rose-rgb), 0.06);
    border-color: rgba(var(--accent-rose-rgb), 0.15);
}

.inventory-alert-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-size: 1rem;
    flex-shrink: 0;
}

/* ══════ SHIPPING MODULE ══════ */
.shipping-providers {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.provider-card {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.provider-logo {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: var(--bg-glass);
    font-size: 1.3rem;
    flex-shrink: 0;
}

.provider-info {
    flex: 1;
}

.provider-name {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.provider-desc {
    font-size: 0.78rem;
    color: var(--text-tertiary);
}

.provider-status {
    flex-shrink: 0;
}

/* ══════ PAYMENTS MODULE ══════ */
.payment-methods {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.payment-card {
    padding: 20px;
    text-align: center;
}

.payment-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    font-size: 1.5rem;
    margin: 0 auto 14px;
}

.payment-name {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.payment-desc {
    font-size: 0.82rem;
    color: var(--text-tertiary);
    margin-bottom: 14px;
}

/* ══════ JOBS QUEUE MODULE ══════ */
.jobs-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.job-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.job-type-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    flex-shrink: 0;
}

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

.job-name {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.job-meta {
    font-size: 0.78rem;
    color: var(--text-tertiary);
    display: flex;
    gap: 12px;
}

.job-progress {
    width: 140px;
    flex-shrink: 0;
}

.job-status-badge {
    flex-shrink: 0;
}

/* ══════ SETTINGS MODULE ══════ */
.settings-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
}

.settings-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.settings-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.settings-nav-item:hover {
    background: var(--bg-glass);
    color: var(--text-primary);
}

.settings-nav-item.active {
    background: rgba(var(--accent-primary-rgb), 0.1);
    color: var(--accent-primary);
}

.settings-nav-item i {
    width: 20px;
    text-align: center;
}

.settings-section {
    padding: 28px;
}

.settings-group {
    margin-bottom: 32px;
}

.settings-group-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.settings-group-desc {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    margin-bottom: 20px;
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.settings-row-label {
    font-size: 0.9rem;
    font-weight: 500;
}

.settings-row-desc {
    font-size: 0.78rem;
    color: var(--text-tertiary);
    margin-top: 2px;
}

/* ══════ RESPONSIVE MODULES ══════ */
@media (max-width: 1200px) {
    .media-workspace {
        grid-template-columns: 1fr;
    }
    .landing-builder {
        grid-template-columns: 1fr;
    }
    .chat-workspace {
        grid-template-columns: 1fr;
    }
    .settings-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .ads-grid {
        grid-template-columns: 1fr;
    }
    .order-detail-grid {
        grid-template-columns: 1fr;
    }
    .inventory-stats,
    .jobs-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ═══════════════════════════════════════════════════════
   LIGHT THEME — Themes Page Overrides
   ═══════════════════════════════════════════════════════ */

/* Hero section */
[data-theme="light"] .ths-hero {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.06);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .ths-hero-bg {
    opacity: 0.2;
}
[data-theme="light"] .ths-hero-mesh {
    opacity: 0.15;
}
[data-theme="light"] .ths-hero-grid {
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
}
[data-theme="light"] .ths-hero-label {
    color: #888;
}
[data-theme="light"] .ths-hero-title {
    background: linear-gradient(135deg, #1a1a2e 0%, #444466 40%, var(--accent-primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
[data-theme="light"] .ths-hero-desc {
    color: #666;
}

/* Language toggle */
[data-theme="light"] .ths-lang-toggle {
    border-color: rgba(0, 0, 0, 0.1);
    background: rgba(0, 0, 0, 0.03);
}
[data-theme="light"] .ths-lang-btn {
    color: #555 !important;
}
[data-theme="light"] .ths-lang-btn[style*="rgba(255,255,255,0.15)"],
[data-theme="light"] .ths-lang-btn[style*="rgba(255, 255, 255, 0.15)"] {
    background: var(--accent-primary) !important;
    color: #fff !important;
}

/* Category orbs */
[data-theme="light"] .ths-orb {
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .ths-orb:hover {
    background: #fff;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .ths-orb.active {
    background: #fff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .ths-orb h3 {
    color: #1a1a2e;
}

/* Theme cards */
[data-theme="light"] .ths-card {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    animation: none;
}
[data-theme="light"] .ths-card:hover {
    background: #fff;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .ths-card-neon {
    opacity: 0 !important;
}
[data-theme="light"] .ths-card-scan {
    opacity: 0 !important;
}
[data-theme="light"] .ths-card-shimmer {
    background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,0.4) 42%, rgba(255,255,255,0.8) 50%, rgba(255,255,255,0.4) 58%, transparent 65%);
    background-size: 200% 100%;
}
[data-theme="light"] .ths-card-info {
    color: #1a1a2e;
}
[data-theme="light"] .ths-card-name {
    color: #1a1a2e;
}
[data-theme="light"] .ths-card-desc {
    color: #666;
}
[data-theme="light"] .ths-card-footer {
    border-top-color: rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .ths-palette-dot {
    border-color: rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .ths-card-grad {
    background: linear-gradient(transparent, rgba(255,255,255,0.9)) !important;
}

/* Hover buttons on cards */
[data-theme="light"] .ths-card-hover {
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.5), rgba(255,255,255,0.8)) !important;
}
[data-theme="light"] .ths-hover-btn[style*="rgba(255,255,255,0.1)"] {
    background: rgba(0, 0, 0, 0.06) !important;
    color: #333 !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}

/* Filter bar */
[data-theme="light"] .ths-filter-bar {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

/* Active tag */
[data-theme="light"] .ths-active-tag {
    animation: none !important;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.15);
}

/* Device frame in hero */
[data-theme="light"] .ths-device-frame {
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

/* ═══════════════════════════════════════════════════════
   LIGHT THEME — Customizer Overrides
   ═══════════════════════════════════════════════════════ */
[data-theme="light"] #custOverlay {
    background: #f0f2f8;
}
[data-theme="light"] #custSidebar {
    background: linear-gradient(180deg, #fff 0%, #f8f9fc 100%);
    border-right-color: rgba(0, 0, 0, 0.06);
}
[data-theme="light"] #custSidebar::after {
    background: linear-gradient(180deg, transparent, rgba(99,102,241,0.08), rgba(139,92,246,0.08), transparent);
}
[data-theme="light"] #custPreview {
    background: linear-gradient(135deg, #e8eaf0, #f0f2f8);
}
[data-theme="light"] .cust-header {
    background: rgba(255, 255, 255, 0.5);
    border-bottom-color: rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .cust-back {
    color: #555;
    border-color: rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .cust-back:hover {
    background: rgba(0, 0, 0, 0.04);
    color: #1a1a2e;
}
[data-theme="light"] .cust-title {
    color: #1a1a2e;
}
[data-theme="light"] .cust-panel {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .cust-panel:hover {
    border-color: rgba(0, 0, 0, 0.1);
}
[data-theme="light"] .cust-panel.open {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(99, 102, 241, 0.15);
}
[data-theme="light"] .cust-panel-head span {
    color: #1a1a2e;
}
[data-theme="light"] .cust-panel-head .cust-chev {
    color: #888;
    background: rgba(0, 0, 0, 0.03);
}
[data-theme="light"] .cust-panel.open .cust-chev {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-primary);
}
[data-theme="light"] .cust-input {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.1);
    color: #1a1a2e;
}
[data-theme="light"] .cust-input:focus {
    background: #fff;
    border-color: var(--accent-primary);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.08);
}
[data-theme="light"] .cust-input::placeholder {
    color: #aaa;
}
[data-theme="light"] .cust-label {
    color: #666;
}
[data-theme="light"] .cust-color-row {
    background: rgba(0, 0, 0, 0.02);
}
[data-theme="light"] .cust-color-row:hover {
    background: rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .cust-color-name {
    color: #333;
}
[data-theme="light"] .cust-color-hex {
    color: #777;
    background: rgba(0, 0, 0, 0.03);
}
[data-theme="light"] .cust-color-swatch {
    border-color: rgba(0, 0, 0, 0.1);
}
[data-theme="light"] .cust-drag-item {
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .cust-drag-item:hover {
    background: rgba(255, 255, 255, 0.8);
}
[data-theme="light"] .cust-drag-label {
    color: #333;
}
[data-theme="light"] .cust-drag-handle {
    color: #bbb;
}
[data-theme="light"] .cust-drag-input {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(0, 0, 0, 0.08);
    color: #333;
}
[data-theme="light"] .cust-add-btn {
    border-color: rgba(0, 0, 0, 0.08);
    color: #888;
}
[data-theme="light"] .cust-add-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.04);
}
[data-theme="light"] .cust-toggle {
    background: rgba(0, 0, 0, 0.02);
}
[data-theme="light"] .cust-toggle span {
    color: #333;
}
[data-theme="light"] .cust-toggle-sw {
    background: rgba(0, 0, 0, 0.12);
}
[data-theme="light"] .cust-addon {
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .cust-addon:hover {
    background: rgba(255, 255, 255, 0.8);
}
[data-theme="light"] .cust-addon-info h5 {
    color: #333;
}
[data-theme="light"] .cust-addon-info p {
    color: #888;
}
[data-theme="light"] .cust-preview-bar {
    background: rgba(255, 255, 255, 0.5);
    border-bottom-color: rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .cust-device {
    color: #888;
}
[data-theme="light"] .cust-device:hover {
    background: rgba(0, 0, 0, 0.04);
    color: #333;
}
[data-theme="light"] .cust-device.active {
    background: rgba(99, 102, 241, 0.08);
    color: var(--accent-primary);
    border-color: rgba(99, 102, 241, 0.15);
}
[data-theme="light"] .cust-iframe-wrap {
    background: radial-gradient(ellipse at 50% 50%, rgba(99, 102, 241, 0.03), transparent 70%);
}
[data-theme="light"] .cust-iframe-wrap iframe {
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.1);
}
[data-theme="light"] .cust-social-row {
    background: rgba(0, 0, 0, 0.02);
}
[data-theme="light"] .cust-social-row:hover {
    background: rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .cust-panels::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.08);
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE — Themes Page
   ═══════════════════════════════════════════════════════ */

/* Tablet */
@media (max-width: 1200px) {
    .ths-hero-content {
        flex-direction: column;
        text-align: center;
        padding: 32px 24px;
    }
    .ths-hero-info {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .ths-hero-desc {
        max-width: 100%;
    }
    .ths-hero-label {
        justify-content: center;
    }
    .ths-device {
        width: 100%;
        max-width: 400px;
    }
    .ths-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

/* Tablet portrait */
@media (max-width: 900px) {
    .ths-orb-wrap {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .ths-orb {
        padding: 20px;
        display: flex;
        align-items: center;
        gap: 16px;
        text-align: left;
    }
    .ths-orb-icon {
        margin: 0;
        width: 56px;
        height: 56px;
        font-size: 1.2rem;
    }
    .ths-orb h3 {
        font-size: 0.95rem;
        margin-bottom: 2px;
    }
    .ths-orb p {
        font-size: 0.72rem;
    }
    .ths-filter-bar {
        flex-wrap: wrap;
    }
    .ths-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
}

/* Mobile */
@media (max-width: 640px) {
    .ths-hero-content {
        padding: 24px 16px;
        gap: 24px;
        min-height: auto;
    }
    .ths-hero-title {
        font-size: 1.6rem !important;
        letter-spacing: -1px;
    }
    .ths-hero-desc {
        font-size: 0.75rem;
    }
    .ths-device {
        max-width: 100%;
    }
    .ths-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .ths-card-preview {
        height: 180px;
    }
    .ths-card-info {
        padding: 16px;
    }
    .ths-card-name {
        font-size: 0.95rem;
    }
    .ths-filter-bar {
        padding: 10px 12px;
        gap: 6px;
        border-radius: 14px;
    }
    .ths-orb {
        padding: 16px;
    }
    .page-container {
        padding: 16px;
    }
}

/* Customizer responsive */
@media (max-width: 1024px) {
    #custOverlay {
        flex-direction: column;
    }
    #custSidebar {
        width: 100% !important;
        max-height: 50vh;
        border-right: none !important;
        border-bottom: 1px solid rgba(255,255,255,0.06);
    }
    #custSidebar::after {
        display: none;
    }
    #custPreview {
        flex: 1;
        min-height: 50vh;
    }
    .cust-iframe-wrap {
        padding: 12px;
    }
}

@media (max-width: 640px) {
    #custSidebar {
        max-height: 45vh;
    }
    .cust-header {
        padding: 0 14px;
        height: 52px;
    }
    .cust-panels {
        padding: 12px;
    }
    .cust-panel-head {
        padding: 12px 14px;
    }
    .cust-panel-body {
        padding: 0 14px 14px;
    }
}

/* Dashboard responsive */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .dashboard-grid {
        grid-template-columns: 1fr !important;
    }
    .dashboard-grid .glass-card[style*="grid-column"] {
        grid-column: span 1 !important;
    }
    .page-header {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}
