﻿/* ============================================================
   IDX HUB — Template marketplace, site settings, listings feed
   ============================================================ */

/* ── IDX page — semi-transparent dark so animated-bg bleeds through subtly ── */
#idxPage {
    background: rgba(7, 7, 15, 0.82);
    min-height: 100vh;
    padding: 40px 48px 56px;
    border-radius: 18px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* ── Page header ──────────────────────────────────────────── */
.idx-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.idx-page-title { margin-bottom: 2px !important; }
.idx-page-sub {
    font-size: 0.86rem;
    color: rgba(255,255,255,0.42);
    margin: 0;
}
.idx-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.idx-active-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255,255,255,0.72);
    background: rgba(99,102,241,0.14);
    border: 1px solid rgba(99,102,241,0.3);
    border-radius: 20px;
    padding: 5px 12px;
}
.idx-active-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #34d399;
    flex-shrink: 0;
}
.idx-preview-btn {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.14);
    color: rgba(255,255,255,0.8);
    border-radius: 9px;
    padding: 7px 16px;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.idx-preview-btn:hover { background: rgba(255,255,255,0.13); }

/* ── Tabs ─────────────────────────────────────────────────── */
.idx-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 22px;
    overflow-x: auto;
    scrollbar-width: none;
}
.idx-tabs::-webkit-scrollbar { display: none; }
.idx-tab {
    padding: 10px 18px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: rgba(255,255,255,0.45);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    margin-bottom: -1px;
    transition: color 0.15s, border-color 0.15s;
}
.idx-tab:hover { color: rgba(255,255,255,0.75); }
.idx-tab.active {
    color: #a5b4fc;
    border-bottom-color: #6366f1;
}

/* ── Panels ───────────────────────────────────────────────── */
.idx-panel { display: none; }
.idx-panel.active { display: block; }

/* ── Filter bar ───────────────────────────────────────────── */
.idx-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.idx-filter-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.idx-pill {
    display: flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.7);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.13s, border-color 0.13s, color 0.13s;
}
.idx-pill:hover { background: rgba(255,255,255,0.09); color: rgba(255,255,255,0.85); }
.idx-pill.active {
    background: rgba(99,102,241,0.2);
    border-color: rgba(99,102,241,0.5);
    color: #a5b4fc;
}
.idx-template-count {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.35);
    white-space: nowrap;
}

/* ── Template grid ────────────────────────────────────────── */
.idx-template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}
.idx-tpl-card {
    background: rgba(12, 14, 30, 0.68);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.18s, transform 0.18s;
}
.idx-tpl-card:hover {
    border-color: rgba(99,102,241,0.45);
    transform: translateY(-2px);
}

/* Preview area */
.idx-tpl-preview {
    position: relative;
    overflow: hidden;
    background: rgba(8, 10, 22, 0.82);
    aspect-ratio: 4/3;
}
/* Iframe thumbnail — scaled-down live template preview */
.idx-tpl-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 400%;
    height: 400%;
    border: none;
    transform: scale(0.25);
    transform-origin: top left;
    pointer-events: none;
    display: block;
}
.idx-tpl-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.18s;
}
.idx-tpl-card:hover .idx-tpl-overlay { opacity: 1; }
.idx-tpl-preview-btn {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    border-radius: 8px;
    padding: 8px 20px;
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: background 0.13s;
}
.idx-tpl-preview-btn:hover { background: rgba(255,255,255,0.25); }

/* Premium badge overlay on preview */
.idx-tpl-premium-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(0,0,0,0.7);
    border: 1px solid rgba(245,158,11,0.4);
    border-radius: 20px;
    padding: 3px 9px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #f59e0b;
    backdrop-filter: blur(4px);
}

/* Info section */
.idx-tpl-info {
    padding: 18px 20px 22px;
}
.idx-tpl-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.idx-tpl-name {
    font-size: 0.96rem;
    font-weight: 700;
    color: #e2e8f0;
}
.idx-tpl-badge {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
    letter-spacing: 0.02em;
}
.idx-tpl-badge--free {
    background: rgba(52,211,153,0.12);
    border: 1px solid rgba(52,211,153,0.3);
    color: #34d399;
}
.idx-tpl-badge--premium {
    background: rgba(245,158,11,0.12);
    border: 1px solid rgba(245,158,11,0.3);
    color: #f59e0b;
}
.idx-tpl-desc {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.45);
    margin: 0 0 10px;
    line-height: 1.5;
}
.idx-tpl-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 12px;
}
.idx-tpl-tags span {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.45);
}
.idx-tpl-activate-btn {
    width: 100%;
    padding: 9px 0;
    border-radius: 8px;
    border: none;
    background: rgba(99,102,241,0.22);
    border: 1px solid rgba(99,102,241,0.4);
    color: #a5b4fc;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}
.idx-tpl-activate-btn:hover { background: rgba(99,102,241,0.35); color: #c7d2fe; }
.idx-tpl-activate-btn--premium {
    background: rgba(245,158,11,0.12);
    border-color: rgba(245,158,11,0.35);
    color: #fbbf24;
}
.idx-tpl-activate-btn--premium:hover { background: rgba(245,158,11,0.22); }
.idx-tpl-activate-btn.activated {
    background: rgba(52,211,153,0.14);
    border-color: rgba(52,211,153,0.35);
    color: #34d399;
    cursor: default;
}

/* ── Section panels (profile + all My Website sections) ─────── */
.idx-profile-panel,
.idx-wp-panel {
    background: #16182a;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 28px;
}
.idx-profile-panel-header,
.idx-wp-panel-header {
    padding: 18px 22px 16px;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    letter-spacing: -0.01em;
}
.idx-profile-grid,
.idx-wp-panel-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 18px;
    align-items: start;
}
.idx-wp-panel-grid--2col {
    grid-template-columns: repeat(2, 1fr);
}
.idx-wp-panel-grid--1col {
    grid-template-columns: 1fr;
}
@media (max-width: 860px) {
    .idx-profile-grid,
    .idx-wp-panel-grid { grid-template-columns: 1fr; }
    .idx-wp-panel-grid--2col { grid-template-columns: 1fr; }
}
.idx-profile-grid .idx-setting-card,
.idx-wp-panel-grid .idx-setting-card {
    border-radius: 10px;
    height: 100%;
}
.idx-profile-panel-footer,
.idx-wp-panel-footer {
    padding: 14px 22px;
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid rgba(255,255,255,0.07);
}

/* ── Settings grid (My Website / Listings / Leads) ─────────── */
.idx-section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
    align-items: start;
}
.idx-setting-card {
    background: #16182a;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    padding: 18px 20px;
}
.idx-setting-card--wide { grid-column: 1 / -1; }
.idx-setting-card-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.88rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 12px;
}
.idx-setting-desc {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.42);
    margin: 0 0 10px;
    line-height: 1.5;
}

/* Form fields */
.idx-field-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.idx-field-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.idx-label {
    font-size: 0.74rem;
    font-weight: 600;
    color: rgba(255,255,255,0.42);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.idx-input {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    padding: 8px 11px;
    color: #e2e8f0;
    font-size: 0.86rem;
    outline: none;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.15s;
}
.idx-input:focus { border-color: rgba(99,102,241,0.5); }
.idx-input::placeholder { color: rgba(255,255,255,0.25); }
.idx-select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.35)' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px !important;
}
.idx-select option { background: #1e2235; color: #e2e8f0; }

/* Buttons */
.idx-btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    white-space: nowrap;
    transition: background 0.15s;
}
.idx-btn--primary {
    background: rgba(99,102,241,0.25);
    border-color: rgba(99,102,241,0.45);
    color: #a5b4fc;
}
.idx-btn--primary:hover { background: rgba(99,102,241,0.38); }
.idx-btn--ghost {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.65);
}
.idx-btn--ghost:hover { background: rgba(255,255,255,0.09); }

/* Subdomain note */
.idx-subdomain-note {
    font-size: 0.76rem;
    color: rgba(255,255,255,0.35);
    margin-top: 8px;
}
.idx-subdomain { color: rgba(99,102,241,0.8); }

/* Pages list */
.idx-pages-list { display: flex; flex-direction: column; gap: 8px; }
.idx-page-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.84rem;
    color: rgba(255,255,255,0.65);
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.idx-page-row:last-child { border-bottom: none; }
.idx-page-status {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
}
.idx-page-status--on { background: rgba(52,211,153,0.12); color: #34d399; }
.idx-page-status--off { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.35); }

/* Feed status */
.idx-feed-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.86rem;
    color: rgba(255,255,255,0.65);
}
.idx-feed-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.idx-feed-indicator--connected { background: #34d399; box-shadow: 0 0 6px #34d399; }
.idx-feed-indicator--disconnected { background: rgba(255,255,255,0.25); }

/* View toggle */
.idx-toggle-row { display: flex; gap: 4px; }
.idx-view-btn {
    padding: 6px 14px;
    border-radius: 7px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.5);
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.13s;
}
.idx-view-btn.active, .idx-view-btn:hover {
    background: rgba(99,102,241,0.2);
    border-color: rgba(99,102,241,0.4);
    color: #a5b4fc;
}

/* Checklist */
.idx-checklist {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.idx-check {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.83rem;
    color: rgba(255,255,255,0.65);
    cursor: pointer;
}

/* Empty mini state */
.idx-empty-mini {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.28);
    padding: 12px 0;
    text-align: center;
}

/* Color picker */
.idx-color-row { display: flex; align-items: center; gap: 10px; }
.idx-color-pick {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.12);
    background: none;
    cursor: pointer;
    padding: 2px;
}
.idx-color-label {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.55);
    font-family: monospace;
}

/* Toggle switches */
.idx-toggle-setting {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 0.84rem;
    color: rgba(255,255,255,0.65);
}
.idx-toggle-setting:last-child { border-bottom: none; }
.idx-switch { position: relative; display: inline-block; width: 36px; height: 20px; }
.idx-switch input { opacity: 0; width: 0; height: 0; }
.idx-switch-track {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.12);
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.2s;
}
.idx-switch-track::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    top: 3px;
    left: 3px;
    transition: transform 0.2s;
}
.idx-switch input:checked + .idx-switch-track { background: #6366f1; }
.idx-switch input:checked + .idx-switch-track::after { transform: translateX(16px); }

/* Code block */
.idx-code-block {
    background: rgba(0,0,0,0.55);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    padding: 12px 14px;
    font-family: monospace;
    font-size: 0.76rem;
    color: rgba(255,255,255,0.55);
    line-height: 1.7;
    word-break: break-all;
}

/* Active template row */
.idx-active-tpl-placeholder {
    font-size: 0.83rem;
    color: rgba(255,255,255,0.35);
    padding: 8px 0;
}
.idx-active-tpl-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

/* Analytics */
.idx-analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}
.idx-stat-card {
    background: #16182a;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 18px 20px;
}
.idx-stat-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.38);
    margin-bottom: 8px;
}
.idx-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 4px;
}
.idx-stat-sub {
    font-size: 0.76rem;
    color: rgba(255,255,255,0.35);
}
.idx-analytics-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 40px 20px;
    text-align: center;
    color: rgba(255,255,255,0.35);
    font-size: 0.86rem;
}

/* Hidden utility */
.hidden { display: none !important; }

/* ── IDX Template Preview Modal ────────────────────────────── */
.idx-tpl-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10001;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(6px);
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
}
.idx-tpl-modal-overlay.active {
    display: flex;
}
.idx-tpl-modal {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    background: #0f172a;
}
.idx-tpl-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 54px;
    background: #1e293b;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
    gap: 16px;
}
.idx-tpl-modal-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: rgba(255,255,255,0.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.idx-tpl-modal-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.idx-tpl-modal-activate-btn {
    background: #6366f1;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 18px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.13s;
    white-space: nowrap;
}
.idx-tpl-modal-activate-btn:hover { background: #4f46e5; }
.idx-tpl-modal-activate-btn--premium {
    background: rgba(201,169,110,0.14);
    color: #c9a96e;
    border: 1px solid rgba(201,169,110,0.35);
}
.idx-tpl-modal-activate-btn--premium:hover { background: rgba(201,169,110,0.22); }
.idx-tpl-modal-close-btn {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.13s;
    flex-shrink: 0;
}
.idx-tpl-modal-close-btn:hover { background: rgba(255,255,255,0.13); color: #fff; }
.idx-tpl-modal-body {
    flex: 1;
    overflow: hidden;
    position: relative;
}
.idx-tpl-modal-frame {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* ── Cloud theme overrides ────────────────────────────────── */
body[data-theme="cloud"] #idxPage {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(99, 102, 241, 0.18);
    box-shadow: 0 8px 18px rgba(49, 46, 129, 0.08);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    color: #1f2937;
}

body[data-theme="cloud"] #idxPage .idx-page-title,
body[data-theme="cloud"] #idxPage .page-title {
    color: #24145f !important;
    text-shadow: none;
}

body[data-theme="cloud"] #idxPage .idx-page-sub,
body[data-theme="cloud"] #idxPage .idx-setting-desc,
body[data-theme="cloud"] #idxPage .idx-template-count,
body[data-theme="cloud"] #idxPage .idx-stat-sub,
body[data-theme="cloud"] #idxPage .idx-active-tpl-placeholder,
body[data-theme="cloud"] #idxPage .idx-empty-mini,
body[data-theme="cloud"] #idxPage .idx-subdomain-note {
    color: #5d6f91;
}

body[data-theme="cloud"] #idxPage .idx-header {
    background: linear-gradient(135deg, #2f1a78 0%, #4c2fa3 100%);
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 18px;
    padding: 24px 28px;
    box-shadow: 0 6px 14px rgba(49, 46, 129, 0.12);
}

body[data-theme="cloud"] #idxPage .idx-header .idx-page-title,
body[data-theme="cloud"] #idxPage .idx-header .page-title {
    color: #ffffff !important;
}

body[data-theme="cloud"] #idxPage .idx-header .idx-page-sub {
    color: rgba(255, 255, 255, 0.82);
}

body[data-theme="cloud"] #idxPage .idx-active-badge {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.28);
    color: #ffffff;
}

body[data-theme="cloud"] #idxPage .idx-preview-btn,
body[data-theme="cloud"] #idxPage .idx-tpl-preview-btn,
body[data-theme="cloud"] #idxPage .idx-btn--primary {
    background: linear-gradient(135deg, #6366f1 0%, #7c3aed 100%);
    border-color: rgba(124, 58, 237, 0.35);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.18);
}

body[data-theme="cloud"] #idxPage .idx-preview-btn:hover,
body[data-theme="cloud"] #idxPage .idx-tpl-preview-btn:hover,
body[data-theme="cloud"] #idxPage .idx-btn--primary:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #6d28d9 100%);
    color: #ffffff;
}

body[data-theme="cloud"] #idxPage .idx-tabs {
    background: #ffffff;
    border: 1px solid rgba(99, 102, 241, 0.16);
    border-radius: 16px;
    padding: 6px;
    box-shadow: 0 4px 10px rgba(49, 46, 129, 0.06);
}

body[data-theme="cloud"] #idxPage .idx-tab {
    color: #574b87;
    border-radius: 12px;
    border-bottom: 0;
    margin-bottom: 0;
}

body[data-theme="cloud"] #idxPage .idx-tab:hover {
    background: #f4f1ff;
    color: #35206f;
}

body[data-theme="cloud"] #idxPage .idx-tab.active {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    color: #2f1a78;
    box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.2);
}

body[data-theme="cloud"] #idxPage .idx-pill,
body[data-theme="cloud"] #idxPage .idx-view-btn,
body[data-theme="cloud"] #idxPage .idx-btn--ghost {
    background: #f4f1ff;
    border-color: rgba(99, 102, 241, 0.24);
    color: #3f2a84;
}

body[data-theme="cloud"] #idxPage .idx-pill:hover,
body[data-theme="cloud"] #idxPage .idx-view-btn:hover,
body[data-theme="cloud"] #idxPage .idx-btn--ghost:hover {
    background: #ede9fe;
    color: #2f1a78;
}

body[data-theme="cloud"] #idxPage .idx-pill.active,
body[data-theme="cloud"] #idxPage .idx-view-btn.active {
    background: linear-gradient(135deg, #6366f1 0%, #7c3aed 100%);
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 3px 8px rgba(99, 102, 241, 0.16);
}

body[data-theme="cloud"] #idxPage .idx-tpl-card,
body[data-theme="cloud"] #idxPage .idx-profile-panel,
body[data-theme="cloud"] #idxPage .idx-wp-panel {
    background: #ffffff;
    border: 1px solid rgba(99, 102, 241, 0.18);
    box-shadow: 0 4px 16px rgba(49, 46, 129, 0.08);
}
body[data-theme="cloud"] #idxPage .idx-profile-panel-header,
body[data-theme="cloud"] #idxPage .idx-wp-panel-header {
    color: #111827;
    border-bottom-color: rgba(99, 102, 241, 0.1);
}
body[data-theme="cloud"] #idxPage .idx-profile-panel-footer,
body[data-theme="cloud"] #idxPage .idx-wp-panel-footer {
    border-top-color: rgba(99, 102, 241, 0.1);
}

body[data-theme="cloud"] #idxPage .idx-setting-card,
body[data-theme="cloud"] #idxPage .idx-stat-card {
    background: #ffffff;
    border: 1px solid rgba(99, 102, 241, 0.18);
    box-shadow: 0 4px 12px rgba(49, 46, 129, 0.07);
    color: #1f2937;
}

body[data-theme="cloud"] #idxPage .idx-tpl-card {
    contain: layout paint style;
    content-visibility: auto;
    contain-intrinsic-size: 280px 360px;
}

body[data-theme="cloud"] #idxPage .idx-tpl-card:hover,
body[data-theme="cloud"] #idxPage .idx-setting-card:hover,
body[data-theme="cloud"] #idxPage .idx-stat-card:hover {
    border-color: rgba(99, 102, 241, 0.36);
    box-shadow: 0 6px 14px rgba(49, 46, 129, 0.1);
}

body[data-theme="cloud"] #idxPage .idx-tpl-preview {
    background: linear-gradient(135deg, #f8f7ff 0%, #ebe7ff 100%);
    border-bottom: 1px solid rgba(99, 102, 241, 0.14);
}

body[data-theme="cloud"] #idxPage .idx-tpl-info {
    background: #ffffff;
}

body[data-theme="cloud"] #idxPage .idx-tpl-name,
body[data-theme="cloud"] #idxPage .idx-setting-card-title,
body[data-theme="cloud"] #idxPage .idx-stat-value {
    color: #1f2937;
}

body[data-theme="cloud"] #idxPage .idx-tpl-desc,
body[data-theme="cloud"] #idxPage .idx-page-row,
body[data-theme="cloud"] #idxPage .idx-feed-status,
body[data-theme="cloud"] #idxPage .idx-check,
body[data-theme="cloud"] #idxPage .idx-toggle-setting,
body[data-theme="cloud"] #idxPage .idx-color-label {
    color: #475569;
}

body[data-theme="cloud"] #idxPage .idx-label,
body[data-theme="cloud"] #idxPage .idx-stat-label {
    color: #5b6b8b;
}

body[data-theme="cloud"] #idxPage .idx-tpl-tags span {
    background: #f1efff;
    border: 1px solid rgba(99, 102, 241, 0.16);
    color: #4f46e5;
}

body[data-theme="cloud"] #idxPage .idx-tpl-badge--free,
body[data-theme="cloud"] #idxPage .idx-page-status--on {
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #047857;
}

body[data-theme="cloud"] #idxPage .idx-tpl-badge--premium {
    background: #fff7ed;
    border: 1px solid #fdba74;
    color: #b45309;
}

body[data-theme="cloud"] #idxPage .idx-tpl-premium-overlay {
    background: rgba(255, 247, 237, 0.94);
    border-color: #fdba74;
    color: #b45309;
}

body[data-theme="cloud"] #idxPage .idx-tpl-activate-btn {
    background: #f4f1ff;
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #4338ca;
}

body[data-theme="cloud"] #idxPage .idx-tpl-activate-btn:hover {
    background: linear-gradient(135deg, #6366f1 0%, #7c3aed 100%);
    border-color: transparent;
    color: #ffffff;
}

body[data-theme="cloud"] #idxPage .idx-tpl-activate-btn--premium {
    background: #fff7ed;
    border-color: #fdba74;
    color: #b45309;
}

body[data-theme="cloud"] #idxPage .idx-tpl-activate-btn--premium:hover {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-color: transparent;
    color: #ffffff;
}

body[data-theme="cloud"] #idxPage .idx-tpl-activate-btn.activated {
    background: #ecfdf5;
    border-color: #6ee7b7;
    color: #047857;
}

body[data-theme="cloud"] #idxPage .idx-input,
body[data-theme="cloud"] #idxPage .idx-select {
    background-color: #ffffff;
    border: 1px solid rgba(99, 102, 241, 0.24);
    color: #1f2937;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

body[data-theme="cloud"] #idxPage .idx-input:focus,
body[data-theme="cloud"] #idxPage .idx-select:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.14);
}

body[data-theme="cloud"] #idxPage .idx-input::placeholder {
    color: #94a3b8;
}

body[data-theme="cloud"] #idxPage .idx-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%234f46e5' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}

body[data-theme="cloud"] #idxPage .idx-select option {
    background: #ffffff;
    color: #1f2937;
}

body[data-theme="cloud"] #idxPage .idx-page-row,
body[data-theme="cloud"] #idxPage .idx-toggle-setting {
    border-bottom-color: rgba(99, 102, 241, 0.12);
}

body[data-theme="cloud"] #idxPage .idx-page-status--off {
    background: #f1f5f9;
    color: #64748b;
}

body[data-theme="cloud"] #idxPage .idx-switch-track {
    background: #dbe4ff;
    border: 1px solid rgba(99, 102, 241, 0.18);
}

body[data-theme="cloud"] #idxPage .idx-switch input:checked + .idx-switch-track {
    background: linear-gradient(135deg, #6366f1 0%, #7c3aed 100%);
}

body[data-theme="cloud"] #idxPage .idx-code-block {
    background: #f8f7ff;
    border-color: rgba(99, 102, 241, 0.18);
    color: #475569;
}

body[data-theme="cloud"] #idxPage .idx-analytics-empty {
    color: #64748b;
}

body[data-theme="cloud"] .idx-tpl-modal-overlay {
    background: rgba(31, 41, 55, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

body[data-theme="cloud"] .idx-tpl-modal {
    background: #ffffff;
    color: #1f2937;
}

body[data-theme="cloud"] .idx-tpl-modal-header {
    background: linear-gradient(135deg, #2f1a78 0%, #4c2fa3 100%);
    border-bottom-color: rgba(255, 255, 255, 0.22);
}

body[data-theme="cloud"] .idx-tpl-modal-title {
    color: #ffffff;
}

body[data-theme="cloud"] .idx-tpl-modal-close-btn {
    background: transparent;
    border-color: transparent;
    color: #ffffff;
}

body[data-theme="cloud"] .idx-tpl-modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

@media (max-width: 640px) {
    #idxPage {
        padding: 24px 16px 40px;
        border-radius: 10px;
    }
}
