/* ── Reset & base ────────────────────────────────────────────────────── */
      *,
      *::before,
      *::after {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
      }
      :root {
        --sidebar-w: 232px;
        --sidebar-bg: #0f172a;
        --sidebar-hover: #1e293b;
        --sidebar-active: #224f68;
        --sidebar-text: #94a3b8;
        --sidebar-text-active: #f8fafc;
        --content-bg: #f1f5f9;
        --card-bg: #ffffff;
        --border: #e2e8f0;
        --primary: #224f68;
        --primary-light: #e7f7fa;
        --accent: #8ddae1;
        --accent-dark: #5cb7c7;
        --text: #0f172a;
        --text-2: #475569;
        --text-3: #94a3b8;
        --green: #10b981;
        --green-bg: #ecfdf5;
        --amber: #f59e0b;
        --amber-bg: #fffbeb;
        --blue: #3b82f6;
        --blue-bg: #eff6ff;
        --red: #ef4444;
        --red-bg: #fef2f2;
        --font: "Inter", -apple-system, sans-serif;
        --radius: 10px;
        --shadow: 0 1px 4px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.04);
        --shadow-lg: 0 4px 24px rgba(0, 0, 0, 0.1);
        --transition: 150ms ease;
      }
      html,
      body {
        height: 100%;
        font-family: var(--font);
        color: var(--text);
        background: var(--content-bg);
        font-size: 14px;
        line-height: 1.5;
      }
      button {
        font-family: var(--font);
        cursor: pointer;
      }
      a {
        text-decoration: none;
        color: inherit;
      }
      input,
      select,
      textarea {
        font-family: var(--font);
      }

      /* ── Layout ──────────────────────────────────────────────────────────── */
      #app {
        display: flex;
        height: 100vh;
        overflow: hidden;
      }
      body.dashboard-booting #app {
        visibility: hidden;
      }

      /* ── Sidebar ─────────────────────────────────────────────────────────── */
      #sidebar {
        width: var(--sidebar-w);
        background: var(--sidebar-bg);
        display: flex;
        flex-direction: column;
        flex-shrink: 0;
        overflow-y: auto;
        z-index: 30;
      }
      #sidebar-logo {
        padding: 22px 20px 18px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        display: flex;
        align-items: center;
        gap: 10px;
      }
      .logo-icon {
        width: 34px;
        height: 34px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
      }
      .logo-icon img {
        width: 34px;
        height: 34px;
        object-fit: contain;
        display: block;
        border-radius: 9px;
      }
      .logo-text {
        font-size: 15px;
        font-weight: 700;
        color: #f8fafc;
        letter-spacing: -0.3px;
      }
      .logo-badge {
        font-size: 10px;
        font-weight: 700;
        color: #224f68;
        background: #d8f3f7;
        padding: 1px 6px;
        border-radius: 4px;
        margin-left: 2px;
      }

      #sidebar-nav {
        padding: 12px 10px;
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 2px;
      }
      .sidebar-bottom-nav {
        margin-top: auto;
        padding-top: 12px;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        display: flex;
        flex-direction: column;
        gap: 2px;
      }
      .nav-section-label {
        font-size: 10px;
        font-weight: 700;
        letter-spacing: 1px;
        color: rgba(148, 163, 184, 0.4);
        text-transform: uppercase;
        padding: 16px 12px 5px;
        display: flex;
        align-items: center;
        gap: 8px;
      }
      .nav-section-label::after {
        content: "";
        flex: 1;
        height: 1px;
        background: rgba(255, 255, 255, 0.05);
      }
      .nav-item {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 9px 12px;
        border-radius: 8px;
        color: var(--sidebar-text);
        font-size: 13px;
        font-weight: 500;
        transition:
          background var(--transition),
          color var(--transition),
          border-color var(--transition);
        cursor: pointer;
        border: none;
        border-left: 3px solid transparent;
        background: none;
        width: 100%;
        text-align: left;
      }
      .nav-item:hover {
        background: rgba(255, 255, 255, 0.05);
        color: #cbd5e1;
      }
      .nav-item.active {
        background: rgba(141, 218, 225, 0.1);
        color: #f0fdff;
        border-left-color: var(--accent);
        border-radius: 0 8px 8px 0;
        padding-left: 9px;
      }
      .nav-item svg {
        width: 16px;
        height: 16px;
        fill: currentColor;
        flex-shrink: 0;
        opacity: 0.7;
      }
      .nav-item:hover svg {
        opacity: 0.9;
      }
      .nav-item.active svg {
        opacity: 1;
        color: var(--accent);
      }
      .nav-badge {
        margin-left: auto;
        background: rgba(255, 255, 255, 0.08);
        color: #94a3b8;
        font-size: 11px;
        font-weight: 600;
        padding: 1px 7px;
        border-radius: 10px;
      }
      .nav-item.active .nav-badge {
        background: rgba(141, 218, 225, 0.2);
        color: var(--accent);
      }

      #sidebar-footer {
        padding: 14px 10px;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
      }
      .sidebar-site-card {
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 8px;
        padding: 10px 12px;
        display: flex;
        align-items: center;
        gap: 10px;
      }
      .site-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--green);
        flex-shrink: 0;
      }
      .site-info {
        flex: 1;
        min-width: 0;
      }
      .site-name {
        font-size: 12px;
        font-weight: 600;
        color: #e2e8f0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }
      .site-status {
        font-size: 11px;
        color: var(--sidebar-text);
      }
      .view-demo-btn {
        font-size: 11px;
        color: var(--sidebar-text);
        background: none;
        border: none;
        cursor: pointer;
        padding: 2px 4px;
        border-radius: 4px;
        transition: color var(--transition);
        flex-shrink: 0;
      }
      .view-demo-btn:hover {
        color: #e2e8f0;
      }

      /* ── Main ────────────────────────────────────────────────────────────── */
      #main {
        flex: 1;
        display: flex;
        flex-direction: column;
        overflow: hidden;
      }

      /* ── Topbar ──────────────────────────────────────────────────────────── */
      #topbar {
        background: var(--card-bg);
        border-bottom: 1px solid var(--border);
        padding: 0 28px;
        height: 58px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-shrink: 0;
        gap: 16px;
      }
      #topbar-left {
        display: flex;
        flex-direction: column;
      }
      #page-title {
        font-size: 16px;
        font-weight: 700;
        color: var(--text);
      }
      #page-sub {
        font-size: 12px;
        color: var(--text-3);
      }
      #topbar-right {
        display: flex;
        align-items: center;
        gap: 10px;
      }

      .topbar-btn {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 7px 14px;
        border-radius: 8px;
        font-size: 13px;
        font-weight: 500;
        border: 1.5px solid var(--border);
        background: #fff;
        color: var(--text-2);
        transition:
          border-color var(--transition),
          color var(--transition);
      }
      .topbar-btn:hover {
        border-color: var(--primary);
        color: var(--primary);
      }
      .topbar-btn svg {
        width: 14px;
        height: 14px;
        fill: currentColor;
      }

      .topbar-btn-primary {
        background: var(--primary);
        color: #fff;
        border-color: var(--primary);
      }
      .topbar-btn-primary:hover {
        background: #4f46e5;
        border-color: #4f46e5;
        color: #fff;
      }
      .lang-select {
        border: 1.5px solid var(--border);
        border-radius: 12px;
        background: #fff;
        color: var(--text-2);
        min-height: 52px;
        padding: 0 16px;
        font-size: 16px;
        font-weight: 600;
        line-height: 1.2;
        box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
        outline: none;
        appearance: auto;
      }

      /* ── Content ─────────────────────────────────────────────────────────── */
      #content {
        flex: 1;
        overflow-y: auto;
        padding: 24px 28px;
        min-height: 0;
        position: relative;
      }
      #content.content-pending-translate {
        visibility: hidden;
      }

      /* ── Page views ──────────────────────────────────────────────────────── */
      .page-view {
        display: none;
      }
      .page-view.active {
        display: block;
      }

      /* ── Billing page ────────────────────────────────────────────────────── */
      .billing-shell {
        display: flex;
        flex-direction: column;
        gap: 16px;
        max-width: 1120px;
      }
      .billing-intro-card {
        overflow: visible;
      }
      .billing-intro-header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 20px;
        flex-wrap: wrap;
      }
      .billing-toolbar {
        display: flex;
        align-items: flex-end;
        gap: 12px;
        flex-wrap: wrap;
        justify-content: flex-end;
        width: 100%;
      }
      .billing-kicker,
      .billing-section-kicker,
      .billing-comparison-kicker,
      .billing-plan-flag {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 5px 10px;
        border-radius: 999px;
        background: rgba(34, 79, 104, 0.08);
        color: var(--primary);
        font-size: 11px;
        font-weight: 800;
        letter-spacing: 0.08em;
        text-transform: uppercase;
      }
      .billing-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: flex-end;
        align-items: stretch;
        width: 100%;
      }
      .billing-summary-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
      }
      .billing-summary-card {
        min-height: 136px;
      }
      .billing-summary-value {
        font-size: 30px;
        font-weight: 800;
        color: var(--text);
        letter-spacing: -0.04em;
        line-height: 1.05;
      }
      .billing-summary-sub {
        margin-top: 8px;
        font-size: 12px;
        color: var(--text-2);
        line-height: 1.6;
      }
      .billing-section-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
      }
      .billing-section-title,
      .billing-card-title {
        margin-top: 8px;
        font-size: 18px;
        line-height: 1.2;
        letter-spacing: -0.02em;
        color: var(--text);
      }
      .billing-section-note,
      .billing-comparison-copy {
        max-width: 40ch;
        color: var(--text-2);
        font-size: 13px;
        line-height: 1.7;
      }
      .billing-currency-picker {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 5px;
        border-radius: 999px;
        background: #f8fafc;
        border: 1px solid var(--border);
        flex-wrap: wrap;
        max-width: 100%;
      }
      .billing-currency-btn {
        min-width: 72px;
        min-height: 40px;
        padding: 0 16px;
        border: none;
        border-radius: 999px;
        background: transparent;
        color: var(--text-2);
        font-size: 13px;
        font-weight: 800;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        transition: background var(--transition), color var(--transition), opacity var(--transition);
      }
      .billing-action-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 48px;
        padding: 0 22px;
        border-radius: 14px;
        white-space: normal;
        text-align: center;
        line-height: 1.2;
        flex: 0 1 auto;
        min-width: 220px;
        max-width: 100%;
      }
      .install-check-row {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-top: 14px;
      }
      .install-check-input {
        flex: 1 1 auto;
        min-width: 0;
        min-height: 52px;
        padding: 0 16px;
        border: 1.5px solid var(--border);
        border-radius: 12px;
        background: #fff;
        color: var(--text);
        font-size: 16px;
        font-weight: 500;
      }
      .install-check-btn {
        flex: 0 0 auto;
        min-height: 52px;
        min-width: 168px;
        padding: 0 24px;
        white-space: nowrap;
      }
      .billing-currency-btn.active {
        background: var(--primary);
        color: #fff;
      }
      .billing-currency-btn:disabled {
        opacity: 0.42;
        cursor: not-allowed;
      }
      .billing-plans-card .card-body {
        padding-top: 18px;
      }
      .billing-pricing-grid {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 16px;
        align-items: stretch;
      }
      .billing-plan-card {
        position: relative;
        display: flex;
        flex-direction: column;
        gap: 16px;
        min-height: 100%;
        padding: 18px;
        border-radius: 18px;
        background: #fff;
        border: 1px solid var(--border);
        transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
        overflow: hidden;
      }
      .billing-plan-card:hover {
        border-color: rgba(34, 79, 104, 0.22);
        box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
      }
      .billing-plan-featured {
        border-color: rgba(34, 79, 104, 0.22);
        background: linear-gradient(180deg, #ffffff 0%, #f8fcfd 100%);
      }
      .billing-plan-flag {
        align-self: flex-start;
      }
      .billing-card-header {
        display: flex;
        justify-content: space-between;
        gap: 16px;
        align-items: flex-start;
        flex-wrap: wrap;
      }
      .billing-tier-name {
        font-size: 18px;
        font-weight: 800;
        letter-spacing: -0.03em;
        color: var(--text);
      }
      .billing-tier-desc {
        margin-top: 6px;
        font-size: 13px;
        color: var(--text-2);
        line-height: 1.6;
      }
      .billing-tier-price {
        display: flex;
        align-items: baseline;
        justify-content: flex-end;
        gap: 6px;
        flex-wrap: wrap;
        max-width: 100%;
        font-size: 28px;
        font-weight: 800;
        line-height: 1;
        letter-spacing: -0.05em;
        color: var(--text);
        text-align: right;
      }
      .billing-price-main {
        display: inline-block;
        min-width: 0;
        overflow-wrap: anywhere;
      }
      .billing-price-period {
        font-size: 12px;
        font-weight: 700;
        color: var(--text-3);
        letter-spacing: 0;
      }
      .billing-feature-list {
        list-style: none;
        display: flex;
        flex-direction: column;
        gap: 10px;
      }
      .billing-feature-list li {
        position: relative;
        padding-left: 22px;
        font-size: 13px;
        color: var(--text);
      }
      .billing-feature-list li::before {
        content: "";
        position: absolute;
        left: 0;
        top: 7px;
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
        box-shadow: 0 0 0 4px rgba(141, 218, 225, 0.16);
      }
      .billing-plan-btn {
        width: 100%;
        margin-top: auto;
      }
      .billing-detail-grid {
        margin-bottom: 0;
      }
      .billing-note-card {
        background: linear-gradient(180deg, rgba(231, 247, 250, 0.7) 0%, #ffffff 100%);
      }
      .billing-comparison-grid {
        display: grid;
        gap: 12px;
      }
      .billing-compare-row {
        display: flex;
        justify-content: space-between;
        gap: 16px;
        padding-bottom: 12px;
        border-bottom: 1px solid var(--border);
      }
      .billing-compare-row:last-child {
        padding-bottom: 0;
        border-bottom: none;
      }
      .billing-compare-label {
        font-size: 13px;
        font-weight: 700;
        color: var(--text);
      }
      .billing-compare-values {
        font-size: 13px;
        color: var(--text-2);
        text-align: right;
      }

      /* ── Stat cards ──────────────────────────────────────────────────────── */
      .stats-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
        margin-bottom: 24px;
      }
      .stat-card {
        background: var(--card-bg);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        padding: 18px 20px;
        box-shadow: var(--shadow);
      }
      .stat-label {
        font-size: 12px;
        font-weight: 500;
        color: var(--text-3);
        margin-bottom: 8px;
        text-transform: uppercase;
        letter-spacing: 0.4px;
      }
      .stat-value {
        font-size: 28px;
        font-weight: 800;
        color: var(--text);
        letter-spacing: -1px;
        line-height: 1;
      }
      .stat-sub {
        font-size: 12px;
        color: var(--text-3);
        margin-top: 6px;
        display: flex;
        align-items: center;
        gap: 4px;
      }
      .stat-up {
        color: var(--green);
        font-weight: 600;
      }
      .stat-icon {
        float: right;
        width: 38px;
        height: 38px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
      }
      .stat-icon svg {
        width: 18px;
        height: 18px;
      }

      /* ── Grid 2 cols ─────────────────────────────────────────────────────── */
      .grid-2 {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
        margin-bottom: 24px;
      }
      .grid-3-1 {
        display: grid;
        grid-template-columns: 2fr 1fr;
        gap: 16px;
        margin-bottom: 24px;
      }

      /* ── Card ────────────────────────────────────────────────────────────── */
      .card {
        background: var(--card-bg);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        box-shadow: var(--shadow);
        overflow: hidden;
      }
      .card-header {
        padding: 14px 18px;
        border-bottom: 1px solid var(--border);
        display: flex;
        align-items: center;
        justify-content: space-between;
      }
      .card-title {
        font-size: 13px;
        font-weight: 700;
        color: var(--text);
      }
      .card-action {
        font-size: 12px;
        color: var(--primary);
        cursor: pointer;
        font-weight: 500;
        background: none;
        border: none;
      }
      .card-action:hover {
        text-decoration: underline;
      }
      .card-body {
        padding: 16px 18px;
      }

      /* ── Status bars ─────────────────────────────────────────────────────── */
      .status-breakdown {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 16px 18px;
      }
      .status-row {
        display: flex;
        flex-direction: column;
        gap: 5px;
      }
      .status-row-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
      }
      .status-row-label {
        font-size: 12px;
        font-weight: 600;
      }
      .status-row-count {
        font-size: 12px;
        color: var(--text-3);
        font-weight: 500;
      }
      .status-bar-track {
        height: 6px;
        background: #f1f5f9;
        border-radius: 3px;
        overflow: hidden;
      }
      .status-bar-fill {
        height: 100%;
        border-radius: 3px;
        transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
      }

      /* ── Recent ideas (overview) ─────────────────────────────────────────── */
      .mini-idea-list {
        display: flex;
        flex-direction: column;
      }
      .mini-idea {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 18px;
        border-bottom: 1px solid var(--border);
        transition: background var(--transition);
      }
      .mini-idea:last-child {
        border-bottom: none;
      }
      .mini-idea:hover {
        background: #f8fafc;
      }
      .mini-idea-votes {
        font-size: 13px;
        font-weight: 700;
        color: var(--primary);
        min-width: 32px;
        text-align: right;
        display: flex;
        align-items: center;
        gap: 3px;
      }
      .mini-idea-votes svg {
        width: 11px;
        height: 11px;
        fill: var(--primary);
      }
      .mini-idea-text {
        flex: 1;
        font-size: 13px;
        font-weight: 500;
        color: var(--text);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }
      .mini-idea-status {
        flex-shrink: 0;
      }

      /* ── Status pill ─────────────────────────────────────────────────────── */
      .pill {
        font-size: 11px;
        font-weight: 600;
        padding: 3px 9px;
        border-radius: 20px;
        white-space: nowrap;
      }
      .pill-under-review {
        background: var(--amber-bg);
        color: var(--amber);
      }
      .pill-planned {
        background: var(--primary-light);
        color: var(--primary);
      }
      .pill-in-progress {
        background: var(--blue-bg);
        color: var(--blue);
      }
      .pill-complete {
        background: var(--green-bg);
        color: var(--green);
      }

      /* ── Ideas table ─────────────────────────────────────────────────────── */
      .filter-bar {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 16px;
        flex-wrap: wrap;
      }
      .filter-tab {
        padding: 6px 14px;
        border-radius: 8px;
        font-size: 13px;
        font-weight: 500;
        border: 1.5px solid var(--border);
        background: #fff;
        color: var(--text-2);
        cursor: pointer;
        transition: all var(--transition);
      }
      .filter-tab:hover {
        border-color: var(--primary);
        color: var(--primary);
      }
      .filter-tab.active {
        background: var(--primary);
        border-color: var(--primary);
        color: #fff;
      }
      .filter-tab .tab-count {
        display: inline-block;
        background: rgba(0, 0, 0, 0.08);
        font-size: 11px;
        padding: 0 6px;
        border-radius: 10px;
        margin-left: 4px;
      }
      .filter-tab.active .tab-count {
        background: rgba(255, 255, 255, 0.22);
        color: #fff;
      }

      .search-box {
        margin-left: auto;
        position: relative;
      }
      .search-box svg {
        position: absolute;
        left: 10px;
        top: 50%;
        transform: translateY(-50%);
        width: 14px;
        height: 14px;
        fill: var(--text-3);
      }
      .search-box input {
        padding: 7px 12px 7px 32px;
        border: 1.5px solid var(--border);
        border-radius: 8px;
        font-size: 13px;
        color: var(--text);
        outline: none;
        transition: border-color var(--transition);
        width: 200px;
      }
      .search-box input:focus {
        border-color: var(--primary);
      }

      .ideas-table-wrap {
        overflow-x: auto;
      }
      table {
        width: 100%;
        border-collapse: collapse;
      }
      thead tr {
        background: #f8fafc;
      }
      th {
        font-size: 11px;
        font-weight: 700;
        color: var(--text-3);
        text-transform: uppercase;
        letter-spacing: 0.5px;
        padding: 10px 14px;
        text-align: left;
        border-bottom: 1px solid var(--border);
        white-space: nowrap;
      }
      th:first-child {
        border-radius: 8px 0 0 0;
      }
      th:last-child {
        border-radius: 0 8px 0 0;
      }
      td {
        padding: 12px 14px;
        border-bottom: 1px solid var(--border);
        vertical-align: middle;
      }
      tr:last-child td {
        border-bottom: none;
      }
      tbody tr {
        transition: background var(--transition);
      }
      tbody tr:hover {
        background: #fafbff;
      }
      .td-title {
        font-size: 13px;
        font-weight: 600;
        color: var(--text);
        max-width: 280px;
      }
      .td-desc {
        font-size: 12px;
        color: var(--text-3);
        max-width: 280px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin-top: 2px;
      }
      .td-votes {
        font-size: 14px;
        font-weight: 700;
        color: var(--primary);
        display: flex;
        align-items: center;
        gap: 4px;
      }
      .td-votes svg {
        width: 12px;
        height: 12px;
        fill: var(--primary);
      }
      .td-date {
        font-size: 12px;
        color: var(--text-3);
        white-space: nowrap;
      }
      .td-actions {
        display: flex;
        align-items: center;
        gap: 6px;
      }

      /* Status select dropdown */
      .status-select {
        appearance: none;
        -webkit-appearance: none;
        font-size: 11px;
        font-weight: 600;
        padding: 3px 24px 3px 9px;
        border-radius: 20px;
        border: none;
        cursor: pointer;
        outline: 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='%2394A3B8'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 6px center;
        transition: opacity var(--transition);
      }
      .status-select:hover {
        opacity: 0.8;
      }
      .status-select.under-review {
        background-color: var(--amber-bg);
        color: var(--amber);
      }
      .status-select.planned {
        background-color: var(--primary-light);
        color: var(--primary);
      }
      .status-select.in-progress {
        background-color: var(--blue-bg);
        color: var(--blue);
      }
      .status-select.complete {
        background-color: var(--green-bg);
        color: var(--green);
      }

      /* Action buttons */
      .icon-btn {
        width: 30px;
        height: 30px;
        border-radius: 7px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: 1.5px solid var(--border);
        color: var(--text-3);
        cursor: pointer;
        transition: all var(--transition);
      }
      .icon-btn svg {
        width: 13px;
        height: 13px;
        fill: currentColor;
      }
      .icon-btn:hover {
        border-color: var(--red);
        color: var(--red);
        background: var(--red-bg);
      }

      /* Empty state */
      .empty-state {
        text-align: center;
        padding: 48px 20px;
        color: var(--text-3);
      }
      .empty-state svg {
        width: 40px;
        height: 40px;
        fill: #e2e8f0;
        margin-bottom: 12px;
      }
      .empty-state p {
        font-size: 14px;
      }

      /* Loading */
      .skeleton {
        background: linear-gradient(
          90deg,
          #f1f5f9 25%,
          #e2e8f0 50%,
          #f1f5f9 75%
        );
        background-size: 200% 100%;
        animation: shimmer 1.4s infinite;
        border-radius: 6px;
      }
      @keyframes shimmer {
        0% {
          background-position: 200% 0;
        }
        100% {
          background-position: -200% 0;
        }
      }
      .view-loading-shell {
        display: flex;
        flex-direction: column;
        gap: 16px;
      }
      .view-loading-grid {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 16px;
      }
      .view-loading-grid-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
      .view-loading-card {
        background: var(--card-bg);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        box-shadow: var(--shadow);
        padding: 18px;
      }

      /* ── Install page ─────────────────────────────────────────────────────── */
      .install-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
      }
      .install-grid.install-grid-single {
        grid-template-columns: minmax(0, 1fr);
      }
      .install-step {
        display: flex;
        gap: 14px;
        background: var(--card-bg);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        padding: 18px;
        box-shadow: var(--shadow);
        margin-bottom: 14px;
      }
      .step-num {
        width: 28px;
        height: 28px;
        border-radius: 50%;
        background: var(--primary);
        color: #fff;
        font-size: 13px;
        font-weight: 700;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
      }
      .step-content {
        flex: 1;
      }
      .step-title {
        font-size: 14px;
        font-weight: 700;
        margin-bottom: 4px;
      }
      .step-desc {
        font-size: 13px;
        color: var(--text-2);
        line-height: 1.55;
        margin-bottom: 12px;
      }

      .code-block {
        background: #0f172a;
        border-radius: 8px;
        padding: 12px 14px;
        position: relative;
        font-family: "Fira Code", "Cascadia Code", "Courier New", monospace;
        font-size: 12.5px;
        color: #e2e8f0;
        line-height: 1.6;
        overflow-x: auto;
        white-space: pre;
      }
      .code-highlight-attr {
        color: #93c5fd;
      }
      .code-highlight-val {
        color: #6ee7b7;
      }
      .code-highlight-tag {
        color: #f9a8d4;
      }

      .copy-btn {
        position: absolute;
        top: 8px;
        right: 8px;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.1);
        color: #94a3b8;
        font-size: 11px;
        font-weight: 500;
        padding: 4px 10px;
        border-radius: 6px;
        cursor: pointer;
        transition: all var(--transition);
        display: flex;
        align-items: center;
        gap: 4px;
      }
      .copy-btn:hover {
        background: rgba(255, 255, 255, 0.14);
        color: #e2e8f0;
      }
      .copy-btn svg {
        width: 12px;
        height: 12px;
        fill: currentColor;
      }
      .copy-btn.copied {
        color: var(--green);
        border-color: var(--green);
      }

      /* ── Platform how-to guide ───────────────────────────────────────────── */
      .platform-guide-card {
        background: var(--card-bg);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        box-shadow: var(--shadow);
        margin-bottom: 14px;
        overflow: hidden;
      }
      /* .platform-guide-header defined below with step badge support */
      .platform-tabs-row {
        display: flex;
        gap: 0;
        border-bottom: 1px solid var(--border);
        overflow-x: auto;
      }
      .platform-tab {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 10px 16px;
        font-size: 12.5px;
        font-weight: 500;
        color: var(--text-2);
        background: transparent;
        border: none;
        border-bottom: 2px solid transparent;
        cursor: pointer;
        white-space: nowrap;
        transition: color 0.15s, border-color 0.15s, background 0.15s;
        flex-shrink: 0;
      }
      .platform-tab svg {
        width: 14px;
        height: 14px;
        fill: currentColor;
        flex-shrink: 0;
      }
      .platform-tab:hover {
        color: var(--text);
        background: var(--hover-bg);
      }
      .platform-tab.active {
        color: var(--primary);
        border-bottom-color: var(--primary);
        font-weight: 600;
      }
      .platform-panel {
        padding: 18px;
      }
      .platform-step-list {
        margin: 0 0 12px 0;
        padding-left: 22px;
        display: flex;
        flex-direction: column;
        gap: 10px;
      }
      .platform-step-list li {
        font-size: 13px;
        color: var(--text-2);
        line-height: 1.5;
      }
      .platform-step-list li strong {
        color: var(--text);
        font-weight: 600;
      }
      .platform-step-list li code {
        font-size: 11.5px;
        background: #f1f5f9;
        padding: 1px 5px;
        border-radius: 4px;
        font-family: "Fira Code", "Cascadia Code", "Courier New", monospace;
      }
      .platform-step-list li em {
        color: var(--text-3);
        font-style: normal;
      }
      .platform-tip {
        display: flex;
        align-items: flex-start;
        gap: 8px;
        background: rgba(34, 79, 104, 0.07);
        border: 1px solid rgba(34, 79, 104, 0.15);
        border-radius: 8px;
        padding: 10px 12px;
        font-size: 12px;
        color: var(--text-2);
        line-height: 1.5;
      }
      .platform-tip svg {
        width: 14px;
        height: 14px;
        fill: var(--primary);
        flex-shrink: 0;
        margin-top: 1px;
      }
      .platform-tip strong {
        color: var(--text);
        font-weight: 600;
      }
      .platform-tip code {
        font-size: 11px;
        background: rgba(34,79,104,0.1);
        padding: 1px 4px;
        border-radius: 3px;
        font-family: "Fira Code", "Cascadia Code", "Courier New", monospace;
      }

      /* Customizer */
      .customizer-card {
        background: var(--card-bg);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        box-shadow: var(--shadow);
        overflow: hidden;
      }
      .customizer-header {
        padding: 14px 18px;
        border-bottom: 1px solid var(--border);
        font-size: 13px;
        font-weight: 700;
      }
      .customizer-body {
        padding: 18px;
        display: flex;
        flex-direction: column;
        gap: 14px;
      }
      .field {
        display: flex;
        flex-direction: column;
        gap: 5px;
      }
      .field label {
        font-size: 12px;
        font-weight: 600;
        color: var(--text-2);
      }
      .field-input,
      .field input[type="text"],
      .field input[type="color"] {
        border: 1.5px solid var(--border);
        border-radius: 8px;
        padding: 8px 10px;
        font-size: 13px;
        font-family: var(--font);
        background: var(--card-bg);
        color: var(--text);
        outline: none;
        transition: border-color var(--transition);
        width: 100%;
      }
      .field-input:focus,
      .field input[type="text"]:focus {
        border-color: var(--primary);
      }
      .field input[type="color"] {
        padding: 4px 6px;
        height: 38px;
        cursor: pointer;
      }

      /* Widget preview */
      .widget-preview {
        background: linear-gradient(135deg, #f8fafc 0%, #e7f7fa 100%);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        height: 180px;
        display: flex;
        align-items: flex-end;
        justify-content: flex-end;
        padding: 16px;
        position: relative;
        overflow: hidden;
      }
      .preview-label {
        position: absolute;
        top: 12px;
        left: 14px;
        font-size: 11px;
        font-weight: 600;
        color: var(--text-3);
        text-transform: uppercase;
        letter-spacing: 0.5px;
      }
      #preview-fab {
        height: 40px;
        padding: 0 16px;
        border-radius: 20px;
        border: none;
        cursor: default;
        display: flex;
        align-items: center;
        gap: 7px;
        font-size: 13px;
        font-weight: 600;
        box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
      }
      #preview-fab.icon-only {
        width: 44px;
        height: 44px;
        padding: 0;
        border-radius: 50%;
        justify-content: center;
        gap: 0;
      }
      #preview-fab svg {
        width: 14px;
        height: 14px;
        fill: currentColor;
      }
      #preview-icon-wrap img {
        width: 18px;
        height: 18px;
        object-fit: contain;
        flex-shrink: 0;
        display: block;
      }
      @keyframes previewPanelIn {
        from { opacity: 0; transform: translateY(8px) scale(0.97); }
        to   { opacity: 1; transform: translateY(0) scale(1); }
      }

      /* ── Widget Behavior card ────────────────────────────────────────────── */
      .icon-picker {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        gap: 6px;
      }
      .icon-opt {
        width: 100%;
        aspect-ratio: 1;
        border-radius: 9px;
        border: 2px solid var(--border);
        background: #f8fafc;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition:
          border-color 0.15s,
          background 0.15s;
      }
      .icon-opt svg {
        width: 18px;
        height: 18px;
        fill: var(--text-3);
        transition: fill 0.15s;
      }
      .icon-opt:hover {
        border-color: var(--primary);
        background: var(--primary-light);
      }
      .icon-opt:hover svg {
        fill: var(--primary);
      }
      .icon-opt.selected {
        border-color: var(--primary);
        background: var(--primary-light);
      }
      .icon-opt.selected svg {
        fill: var(--primary);
      }

      .pos-toggle {
        display: flex;
        border: 1.5px solid var(--border);
        border-radius: 8px;
        overflow: hidden;
      }
      .pos-btn {
        flex: 1;
        padding: 8px 10px;
        font-size: 12px;
        font-weight: 600;
        border: none;
        background: none;
        cursor: pointer;
        color: var(--text-2);
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 5px;
        transition:
          background 0.15s,
          color 0.15s;
      }
      .pos-btn svg {
        width: 14px;
        height: 14px;
        fill: currentColor;
      }
      .pos-btn:first-child {
        border-right: 1.5px solid var(--border);
      }
      .pos-btn.selected {
        background: var(--primary);
        color: #fff;
      }

      .toggle-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
      }
      .toggle-switch {
        position: relative;
        display: inline-block;
        width: 38px;
        height: 22px;
        flex-shrink: 0;
      }
      .toggle-switch input {
        opacity: 0;
        width: 0;
        height: 0;
      }
      .toggle-slider {
        position: absolute;
        cursor: pointer;
        inset: 0;
        background: #cbd5e1;
        border-radius: 22px;
        transition: background 0.2s;
      }
      .toggle-slider::before {
        content: "";
        position: absolute;
        width: 16px;
        height: 16px;
        left: 3px;
        bottom: 3px;
        background: #fff;
        border-radius: 50%;
        transition: transform 0.2s;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
      }
      .toggle-switch input:checked + .toggle-slider {
        background: var(--primary);
      }
      .toggle-switch input:checked + .toggle-slider::before {
        transform: translateX(16px);
      }

      .delay-row {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-top: 8px;
      }
      .delay-row input[type="range"] {
        flex: 1;
        accent-color: var(--primary);
      }
      .delay-val {
        font-size: 12px;
        font-weight: 700;
        color: var(--primary);
        min-width: 52px;
      }

      /* ── History filter bar ─────────────────────────────────────────────── */
      .history-filter-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 16px;
        flex-wrap: wrap;
      }
      .history-tabs {
        display: flex;
        background: var(--hover);
        border-radius: 10px;
        padding: 3px;
        gap: 2px;
      }
      .history-tab {
        padding: 7px 16px;
        border: none;
        border-radius: 8px;
        font-size: 13px;
        font-weight: 500;
        cursor: pointer;
        background: transparent;
        color: var(--text-2);
        transition: background 0.15s, color 0.15s;
      }
      .history-tab.active {
        background: white;
        color: var(--primary);
        font-weight: 600;
        box-shadow: 0 1px 3px rgba(0,0,0,0.08);
      }
      .history-filter-right {
        display: flex;
        gap: 8px;
        align-items: center;
      }
      .history-search {
        padding: 7px 12px;
        border: 1px solid var(--border);
        border-radius: 8px;
        font-size: 13px;
        font-family: inherit;
        color: var(--text);
        background: white;
        outline: none;
        width: 160px;
        transition: border-color 0.15s, box-shadow 0.15s;
      }
      .history-search:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(34,79,104,0.08);
      }
      .history-sort {
        padding: 7px 10px;
        border: 1px solid var(--border);
        border-radius: 8px;
        font-size: 13px;
        font-family: inherit;
        color: var(--text);
        background: white;
        outline: none;
        cursor: pointer;
      }

      /* ── Settings page ───────────────────────────────────────────────────── */
      .settings-shell {
        display: flex;
        flex-direction: column;
        max-width: 1120px;
      }

      .settings-tab-panel {
        padding-bottom: 24px;
      }
      .settings-grid {
        display: grid;
        grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
        gap: 20px;
        align-items: start;
      }
      .widget-settings-grid {
        display: grid;
        grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
        gap: 20px;
        align-items: start;
      }
      @media (max-width: 1320px) {
        .widget-settings-grid,
        .settings-two-col {
          grid-template-columns: 1fr;
        }
      }
      .settings-stack {
        display: flex;
        flex-direction: column;
        gap: 20px;
      }
      .widget-customizer-card {
        position: sticky;
        top: 24px;
      }
      .settings-card {
        background: linear-gradient(180deg, #ffffff 0%, #fcfdfe 100%);
        border: 1px solid var(--border);
        border-radius: 20px;
        box-shadow: var(--shadow);
        overflow: hidden;
      }
      .settings-card-header {
        padding: 18px 20px 0;
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 16px;
      }
      .settings-card-eyebrow {
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: var(--primary);
        margin-bottom: 8px;
      }
      .settings-card-title {
        font-size: 18px;
        font-weight: 700;
        letter-spacing: -0.02em;
      }
      .settings-card-sub {
        margin-top: 6px;
        color: var(--text-2);
        font-size: 13px;
        line-height: 1.6;
      }
      .settings-card-body {
        padding: 20px;
        display: flex;
        flex-direction: column;
        gap: 18px;
      }
      .settings-account-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
      }
      .settings-inline-input {
        display: flex;
        gap: 8px;
        align-items: center;
      }
      .settings-inline-input .field {
        flex: 1;
      }
      .settings-info-panel {
        display: flex;
        flex-direction: column;
        gap: 14px;
        padding: 16px;
        border-radius: 16px;
        background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
        border: 1px solid var(--border);
      }
      .settings-toggle-panel {
        display: grid;
        grid-template-columns: 1fr;
        align-items: start;
        gap: 16px;
        padding: 16px;
        border-radius: 16px;
        background: linear-gradient(135deg, #e7f7fa 0%, #f8fafc 100%);
        border: 1px solid #dde5ff;
        overflow: visible;
      }
      .settings-toggle-panel > div:first-child {
        min-width: 0;
      }
      .settings-toggle-panel .toggle-switch {
        justify-self: end;
      }
      .settings-toggle-title {
        font-size: 14px;
        font-weight: 700;
        color: var(--text);
        margin-bottom: 3px;
      }
      .settings-toggle-copy {
        font-size: 12px;
        color: var(--text-2);
        line-height: 1.6;
        max-width: 30ch;
      }
      .settings-actions {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
      }
      .field-actions {
        display: flex;
        gap: 10px;
        margin-top: 12px;
        flex-wrap: wrap;
      }
      .danger-btn {
        color: #dc2626;
        border-color: #fecaca;
        background: #fff5f5;
      }
      .danger-btn:hover {
        color: #b91c1c;
        border-color: #fca5a5;
        background: #fef2f2;
      }
      .settings-stats-list {
        display: flex;
        flex-direction: column;
        gap: 10px;
      }
      .settings-stat-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        padding: 12px 14px;
        border-radius: 14px;
        background: #f8fafc;
        border: 1px solid #e8eef7;
      }
      .settings-stat-label {
        font-size: 13px;
        color: var(--text-2);
      }
      .settings-stat-value {
        font-size: 16px;
        font-weight: 800;
        color: var(--text);
      }
      .settings-stat-value.accent {
        color: var(--primary);
        max-width: 180px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        text-align: right;
      }
      .settings-label-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
      }
      .settings-label-column {
        padding: 16px;
        border-radius: 16px;
        background: #f8fafc;
        border: 1px solid #e8eef7;
        display: flex;
        flex-direction: column;
        gap: 12px;
      }
      .settings-label-column textarea {
        border: 1.5px solid var(--border);
        border-radius: 10px;
        padding: 10px 12px;
        font-size: 13px;
        color: var(--text);
        outline: none;
        transition: border-color var(--transition);
        width: 100%;
        font-family: var(--font);
        resize: none;
        overflow: hidden;
        min-height: 42px;
        line-height: 1.5;
        background: #fff;
      }
      .settings-label-column textarea:focus {
        border-color: var(--primary);
      }
      .history-shell {
        display: flex;
        flex-direction: column;
        gap: 20px;
        max-width: 920px;
      }
      .history-gate-card {
        display: flex;
        flex-direction: column;
        gap: 14px;
      }
      .history-gate-title {
        font-size: 22px;
        font-weight: 800;
        letter-spacing: -0.03em;
        color: var(--text);
      }
      .history-gate-copy {
        max-width: 58ch;
        font-size: 14px;
        line-height: 1.7;
        color: var(--text-2);
      }
      .history-gate-note {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        font-size: 13px;
        font-weight: 700;
        color: var(--primary);
      }
      .history-gate-note svg {
        width: 16px;
        height: 16px;
        fill: currentColor;
        flex-shrink: 0;
      }
      .settings-label-title {
        font-size: 11px;
        font-weight: 800;
        color: var(--text-3);
        text-transform: uppercase;
        letter-spacing: 0.08em;
      }
      .settings-footer-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        padding-top: 18px;
        border-top: 1px solid var(--border);
        flex-wrap: wrap;
      }
      .settings-note {
        display: flex;
        align-items: center;
        gap: 8px;
        color: var(--text-3);
        font-size: 12px;
        line-height: 1.6;
      }
      .settings-note svg {
        width: 14px;
        height: 14px;
        fill: currentColor;
        flex-shrink: 0;
      }

      /* ── Toast ───────────────────────────────────────────────────────────── */
      #toast {
        position: fixed;
        bottom: 24px;
        left: 50%;
        transform: translateX(-50%) translateY(80px);
        background: #1e293b;
        color: #f8fafc;
        padding: 10px 20px;
        border-radius: 10px;
        font-size: 13px;
        font-weight: 500;
        box-shadow: var(--shadow-lg);
        transition:
          transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
          opacity 0.2s;
        opacity: 0;
        pointer-events: none;
        z-index: 999;
      }
      #toast.show {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
      }

      /* ── Confirm modal ───────────────────────────────────────────────────── */
      #modal-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 100;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s;
      }
      #modal-overlay.show {
        opacity: 1;
        pointer-events: all;
      }
      #modal {
        background: #fff;
        border-radius: 14px;
        padding: 24px;
        width: 360px;
        box-shadow: var(--shadow-lg);
        transform: scale(0.95);
        transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
      }
      #modal-overlay.show #modal {
        transform: scale(1);
      }
      .modal-title {
        font-size: 15px;
        font-weight: 700;
        margin-bottom: 8px;
      }
      .modal-desc {
        font-size: 13px;
        color: var(--text-2);
        line-height: 1.55;
        margin-bottom: 20px;
      }
      .modal-actions {
        display: flex;
        gap: 10px;
        justify-content: flex-end;
      }
      .modal-btn {
        padding: 8px 18px;
        border-radius: 8px;
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
        border: none;
      }
      .modal-btn-cancel {
        background: #f1f5f9;
        color: var(--text-2);
      }
      .modal-btn-cancel:hover {
        background: #e2e8f0;
      }
      .modal-btn-danger {
        background: var(--red);
        color: #fff;
      }
      .modal-btn-danger:hover {
        background: #dc2626;
      }

      /* ── Settings tabs ───────────────────────────────────────────────────── */
      .settings-tabs-row {
        display: flex;
        border-bottom: 1px solid var(--border);
        margin-bottom: 24px;
        gap: 0;
        position: sticky;
        top: -24px;
        z-index: 10;
        background: var(--content-bg);
      }
      .settings-tab {
        display: flex;
        align-items: center;
        gap: 7px;
        padding: 11px 20px;
        font-size: 13px;
        font-weight: 500;
        color: var(--text-2);
        background: transparent;
        border: none;
        border-bottom: 2px solid transparent;
        cursor: pointer;
        white-space: nowrap;
        transition: color 0.15s, border-color 0.15s;
        flex-shrink: 0;
        margin-bottom: -1px;
      }
      .settings-tab svg {
        width: 15px;
        height: 15px;
        fill: currentColor;
        flex-shrink: 0;
      }
      .settings-tab:hover {
        color: var(--text);
      }
      .settings-tab.active {
        color: var(--primary);
        border-bottom-color: var(--primary);
        font-weight: 600;
      }
      .settings-two-col {
        display: grid;
        grid-template-columns: minmax(280px, 1.15fr) minmax(260px, 0.85fr);
        gap: 20px;
        align-items: start;
      }

      /* ── Customizer tabs ─────────────────────────────────────────────────── */
      .customizer-tabs-row {
        display: flex;
        border-bottom: 1px solid var(--border);
      }
      .customizer-tab {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 11px 14px;
        font-size: 12.5px;
        font-weight: 500;
        color: var(--text-2);
        background: transparent;
        border: none;
        border-bottom: 2px solid transparent;
        cursor: pointer;
        transition: color 0.15s, border-color 0.15s;
        margin-bottom: -1px;
      }
      .customizer-tab svg {
        width: 14px;
        height: 14px;
        fill: currentColor;
        flex-shrink: 0;
      }
      .customizer-tab:hover {
        color: var(--text);
      }
      .customizer-tab.active {
        color: var(--primary);
        border-bottom-color: var(--primary);
        font-weight: 600;
      }

      /* ── Platform guide step badge ───────────────────────────────────────── */
      .platform-guide-header {
        padding: 12px 18px;
        border-bottom: 1px solid var(--border);
        font-size: 13px;
        font-weight: 700;
        display: flex;
        align-items: center;
        gap: 10px;
      }
      .platform-guide-step-num {
        width: 22px;
        height: 22px;
        border-radius: 50%;
        background: var(--primary);
        color: #fff;
        font-size: 11px;
        font-weight: 700;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
      }

      /* ── Responsive ──────────────────────────────────────────────────────── */
      @media (max-width: 1100px) {
        .billing-summary-grid,
        .billing-pricing-grid,
        .view-loading-grid {
          grid-template-columns: repeat(2, minmax(0, 1fr));
        }
        .billing-section-head {
          flex-direction: column;
          align-items: flex-start;
        }
        .stats-grid {
          grid-template-columns: repeat(2, 1fr);
        }
        .install-grid {
          grid-template-columns: 1fr;
        }
        .settings-grid,
        .widget-settings-grid,
        .settings-account-grid,
        .settings-label-grid,
        .settings-two-col {
          grid-template-columns: 1fr;
        }
        #preset-mode-cards {
          grid-template-columns: 1fr !important;
        }
      }
      @media (max-width: 820px) {
        .billing-intro-header,
        .billing-toolbar {
          flex-direction: column;
          align-items: stretch;
        }
        .billing-actions {
          justify-content: stretch;
          width: 100%;
        }
        .billing-action-btn {
          width: 100%;
          min-width: 0;
        }
        .billing-summary-grid {
          grid-template-columns: 1fr;
        }
        .install-check-row {
          flex-direction: column;
          align-items: stretch;
        }
        .install-check-btn {
          width: 100%;
          min-width: 0;
        }
        .widget-customizer-card {
          position: static;
        }
        html,
        body {
          font-size: 13px;
        }
        #app {
          display: block;
          min-height: 100vh;
          height: auto;
          overflow: visible;
        }
        #sidebar {
          position: fixed;
          left: 0;
          right: 0;
          bottom: 0;
          width: 100%;
          height: auto;
          background: rgba(15, 23, 42, 0.96);
          backdrop-filter: blur(16px);
          border-top: 1px solid rgba(141, 218, 225, 0.18);
          overflow: hidden;
          z-index: 60;
        }
        #sidebar-logo,
        #sidebar-footer,
        .nav-section-label {
          display: none;
        }
        #sidebar-nav {
          padding: 10px 10px calc(10px + env(safe-area-inset-bottom, 0px));
          flex-direction: row;
          align-items: stretch;
          gap: 8px;
          overflow-x: auto;
          scrollbar-width: none;
        }
        #sidebar-nav::-webkit-scrollbar {
          display: none;
        }
        .nav-item {
          min-width: 52px;
          justify-content: center;
          padding: 11px 12px;
          background: rgba(255, 255, 255, 0.04);
          border: 1px solid rgba(255, 255, 255, 0.06);
          border-left: 3px solid transparent;
          border-radius: 8px;
          color: #94a3b8;
        }
        .nav-item span:not(.nav-badge):not(#nav-btn-primary-icon) {
          display: none;
        }
        .nav-item svg,
        #nav-btn-primary-icon svg {
          width: 18px;
          height: 18px;
          opacity: 0.7;
        }
        #nav-btn-primary-icon {
          display: inline-flex;
          align-items: center;
          justify-content: center;
        }
        .nav-item.active {
          background: rgba(141, 218, 225, 0.12);
          border-color: rgba(255, 255, 255, 0.06);
          border-left-color: var(--accent);
          border-radius: 0 8px 8px 0;
          color: #f0fdff;
        }
        .nav-item.active svg {
          opacity: 1;
          color: var(--accent);
        }
        .nav-badge {
          display: none;
        }
        #main {
          min-height: 100vh;
          padding-bottom: calc(82px + env(safe-area-inset-bottom, 0px));
          overflow: visible;
        }
        #topbar {
          position: sticky;
          top: 0;
          z-index: 40;
          height: 58px;
          padding: 10px 16px;
          align-items: center;
          flex-direction: row;
        }
        #topbar-left,
        #topbar-right {
          width: auto;
        }
        #topbar-right {
          margin-left: auto;
          justify-content: flex-end;
          flex-wrap: nowrap;
        }
        #page-sub {
          display: none;
        }
        #active-preset-badge {
          width: auto;
          max-width: 52vw;
          justify-content: flex-end;
          gap: 6px !important;
          padding: 6px 10px !important;
        }
        #active-widget-prefix {
          display: none;
        }
        #active-preset-label {
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
        }
        .grid-2,
        .grid-3-1 {
          grid-template-columns: 1fr;
        }
        .stats-grid {
          grid-template-columns: 1fr;
          gap: 12px;
        }
        #content {
          padding: 16px;
          overflow: visible;
        }
        .card-header,
        .card-body,
        .customizer-body,
        .settings-card-body,
        .settings-card-header {
          padding-left: 16px;
          padding-right: 16px;
        }
        .card-header {
          flex-wrap: wrap;
          gap: 8px;
        }
        .filter-bar {
          align-items: stretch;
        }
        .filter-tab {
          flex: 1 1 calc(50% - 8px);
          text-align: center;
        }
        .search-box {
          margin-left: 0;
          width: 100%;
        }
        .search-box input {
          width: 100%;
        }
        .install-step {
          padding: 16px;
        }
        .widget-preview {
          height: 140px;
          padding: 12px;
        }
        .icon-picker {
          grid-template-columns: repeat(3, 1fr);
        }
        .pos-toggle {
          flex-direction: column;
        }
        .pos-btn:first-child {
          border-right: none;
          border-bottom: 1.5px solid var(--border);
        }
        .settings-card {
          border-radius: 16px;
        }
        .settings-label-column {
          padding: 14px;
        }
        .settings-actions,
        .field-actions,
        .settings-inline-input,
        .settings-footer-row {
          flex-direction: column;
          align-items: stretch;
        }
        .settings-toggle-panel {
          flex-direction: column;
          align-items: stretch;
        }
        .settings-inline-input .topbar-btn,
        .field-actions .save-preset-btn,
        .settings-actions .topbar-btn,
        .settings-actions .save-preset-btn,
        .settings-footer-row .save-preset-btn {
          width: 100%;
          justify-content: center;
        }
        .settings-toggle-panel,
        .settings-stat-row {
          align-items: flex-start;
        }
        #modal {
          width: calc(100vw - 28px);
          max-width: 360px;
          padding: 20px;
        }
      }
      @media (max-width: 560px) {
        .billing-summary-grid,
        .billing-pricing-grid,
        .view-loading-grid,
        .view-loading-grid-2 {
          grid-template-columns: 1fr;
        }
        .billing-currency-picker {
          width: 100%;
          justify-content: space-between;
        }
        .billing-currency-btn {
          flex: 1;
        }
        .billing-tier-price {
          font-size: 28px;
          justify-content: flex-start;
          text-align: left;
        }
        #page-title {
          font-size: 15px;
        }
        #active-preset-badge {
          max-width: 58vw;
        }
        .filter-tab {
          flex-basis: 100%;
        }
        .step-num {
          width: 24px;
          height: 24px;
          font-size: 12px;
        }
        .install-step {
          gap: 10px;
        }
        .code-block {
          font-size: 11.5px;
        }
        .settings-stat-value.accent {
          max-width: 140px;
        }
        .mode-banner-wrap,
        .settings-note,
        .toggle-row {
          align-items: flex-start;
        }
        .mode-banner-wrap {
          flex-direction: column;
        }
        .mode-banner-left {
          width: 100%;
        }
        .switch-mode-btn,
        .card-action {
          width: 100%;
          justify-content: center;
        }
        .modal-actions {
          flex-direction: column;
        }
        .modal-btn {
          width: 100%;
        }
      }

      /* ── Mode banner ─────────────────────────────────────────────────────── */
      #mode-banner {
        margin-bottom: 18px;
      }
      .mode-banner-wrap {
        border-radius: 12px;
        padding: 13px 18px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
      }
      .mode-banner-left {
        display: flex;
        align-items: center;
        gap: 12px;
      }
      .mode-banner-icon {
        width: 38px;
        height: 38px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
      }
      .mode-banner-icon svg {
        width: 20px;
        height: 20px;
      }
      .mode-banner-title {
        font-size: 13px;
        font-weight: 700;
        color: #111;
      }
      .mode-banner-sub {
        font-size: 12px;
        color: #64748b;
        margin-top: 2px;
        max-width: 480px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }
      .mode-banner-right {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-shrink: 0;
      }
      .live-dot-wrap {
        display: flex;
        align-items: center;
        gap: 6px;
      }
      .live-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        animation: pulse-dot 2s infinite;
      }
      @keyframes pulse-dot {
        0%,
        100% {
          opacity: 1;
          transform: scale(1);
        }
        50% {
          opacity: 0.5;
          transform: scale(0.8);
        }
      }
      .live-label {
        font-size: 12px;
        font-weight: 600;
      }
      .switch-mode-btn {
        font-size: 12px;
        font-weight: 500;
        color: var(--text-2);
        background: rgba(255, 255, 255, 0.7);
        border: 1.5px solid var(--border);
        border-radius: 7px;
        padding: 5px 12px;
        cursor: pointer;
        font-family: var(--font);
        transition: all var(--transition);
      }
      .switch-mode-btn:hover {
        border-color: var(--primary);
        color: var(--primary);
        background: #fff;
      }

      /* ── Presets ─────────────────────────────────────────────────────────── */
      .preset-card {
        background: var(--card-bg);
        border: 2px solid var(--border);
        border-radius: 14px;
        padding: 20px;
        cursor: pointer;
        transition: all 0.18s;
        position: relative;
        display: flex;
        flex-direction: column;
        gap: 10px;
      }
      .preset-card:hover {
        border-color: var(--primary);
        box-shadow: 0 0 0 4px rgba(34, 79, 104, 0.08);
      }
      .preset-card.active-preset {
        border-color: var(--primary);
        background: var(--primary-light);
      }
      .preset-card.active-preset .preset-card-title {
        color: var(--primary);
      }
      .preset-icon {
        width: 42px;
        height: 42px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 2px;
      }
      .preset-icon svg {
        width: 22px;
        height: 22px;
      }
      .preset-card-title {
        font-size: 14px;
        font-weight: 700;
        color: var(--text);
      }
      .preset-card-desc {
        font-size: 12px;
        color: var(--text-3);
        line-height: 1.55;
      }
      .preset-active-badge {
        position: absolute;
        top: 12px;
        right: 12px;
        background: var(--primary);
        color: #fff;
        font-size: 10px;
        font-weight: 700;
        padding: 2px 8px;
        border-radius: 20px;
        letter-spacing: 0.3px;
      }
      .preset-activate-btn {
        margin-top: auto;
        padding: 7px 14px;
        border-radius: 8px;
        font-size: 12px;
        font-weight: 600;
        cursor: pointer;
        border: 1.5px solid var(--border);
        background: #fff;
        color: var(--text-2);
        transition: all 0.15s;
      }
      .preset-activate-btn:hover {
        border-color: var(--primary);
        color: var(--primary);
      }
      .preset-card.active-preset .preset-activate-btn {
        background: var(--primary);
        border-color: var(--primary);
        color: #fff;
      }

      /* Editor area */
      .preset-editor-card {
        background: var(--card-bg);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        box-shadow: var(--shadow);
      }
      .preset-editor-header {
        padding: 14px 20px;
        border-bottom: 1px solid var(--border);
        display: flex;
        align-items: center;
        justify-content: space-between;
      }
      .preset-editor-title {
        font-size: 14px;
        font-weight: 700;
      }
      .preset-editor-body {
        padding: 20px;
        display: flex;
        flex-direction: column;
        gap: 16px;
      }
      .pfield {
        display: flex;
        flex-direction: column;
        gap: 5px;
      }
      .pfield label {
        font-size: 12px;
        font-weight: 600;
        color: var(--text-2);
      }
      .pfield input[type="text"],
      .pfield textarea {
        border: 1.5px solid var(--border);
        border-radius: 9px;
        padding: 9px 12px;
        font-size: 13px;
        color: var(--text);
        outline: none;
        transition: border-color 0.15s;
        width: 100%;
        font-family: var(--font);
        resize: none;
      }
      .pfield input:focus,
      .pfield textarea:focus {
        border-color: var(--primary);
      }
      .pfield-hint {
        font-size: 11px;
        color: var(--text-3);
      }

      /* Poll options editor */
      .poll-option-row {
        display: flex;
        align-items: center;
        gap: 8px;
      }
      .poll-option-row input {
        flex: 1;
        border: 1.5px solid var(--border);
        border-radius: 8px;
        padding: 8px 11px;
        font-size: 13px;
        color: var(--text);
        outline: none;
        transition: border-color 0.15s;
        font-family: var(--font);
      }
      .poll-option-row input:focus {
        border-color: var(--primary);
      }
      .poll-option-handle {
        color: var(--text-3);
        cursor: grab;
        font-size: 16px;
      }
      .remove-opt-btn {
        width: 28px;
        height: 28px;
        border-radius: 7px;
        flex-shrink: 0;
        background: none;
        border: 1.5px solid var(--border);
        color: var(--text-3);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.15s;
      }
      .remove-opt-btn:hover {
        border-color: var(--red);
        color: var(--red);
        background: var(--red-bg);
      }
      .remove-opt-btn svg {
        width: 13px;
        height: 13px;
        fill: currentColor;
      }
      .add-opt-btn {
        display: flex;
        align-items: center;
        gap: 6px;
        background: none;
        border: 1.5px dashed var(--border);
        border-radius: 8px;
        padding: 8px 14px;
        font-size: 13px;
        color: var(--text-3);
        cursor: pointer;
        transition: all 0.15s;
        width: 100%;
        justify-content: center;
      }
      .add-opt-btn:hover {
        border-color: var(--primary);
        color: var(--primary);
      }

      .save-preset-btn {
        background: var(--primary);
        color: #fff;
        border: none;
        cursor: pointer;
        padding: 10px 24px;
        border-radius: 9px;
        font-size: 14px;
        font-weight: 600;
        transition: opacity 0.15s;
        align-self: flex-start;
      }
      .save-preset-btn:hover {
        opacity: 0.88;
      }
      .save-preset-btn:disabled {
        opacity: 0.5;
        cursor: default;
      }

      /* Opinion responses table */
      .response-row {
        padding: 12px 16px;
        border-bottom: 1px solid var(--border);
        font-size: 13px;
        color: var(--text);
        line-height: 1.5;
      }
      .response-row:last-child {
        border-bottom: none;
      }
      .response-meta {
        font-size: 11px;
        color: var(--text-3);
        margin-top: 4px;
      }

      /* Poll live results in dashboard */
      .dash-poll-bar-row {
        display: flex;
        flex-direction: column;
        gap: 4px;
        margin-bottom: 8px;
      }
      .dash-poll-bar-header {
        display: flex;
        justify-content: space-between;
        font-size: 13px;
      }
      .dash-poll-bar-label {
        font-weight: 500;
      }
      .dash-poll-bar-count {
        color: var(--primary);
        font-weight: 600;
      }
      .dash-poll-track {
        height: 8px;
        background: #f1f5f9;
        border-radius: 4px;
        overflow: hidden;
      }
      .dash-poll-fill {
        height: 100%;
        border-radius: 4px;
        background: var(--primary);
        transition: width 0.5s ease;
      }
