/* Meta Service — reuses .templates-page / .content-panel / .content-body /
   .node-header / .table-panel / .users-table / .status-badge / .btn chrome. */

.templates-page.meta-service-page.no-tree { grid-template-columns: minmax(0, 1fr); }
/* Tabs sit at the top of the content panel (above the node-header), like Org Hierarchy. */
.meta-tabs { margin: 0; }

.meta-intro { margin: 2px 0 18px; }
.meta-intro-title { font-size: 17px; font-weight: 700; color: var(--text); }
.meta-intro-sub { font-size: 13px; color: var(--text-muted); margin-top: 4px; max-width: 720px; line-height: 1.5; }

/* ===== Meta ∞ logo mark ===== */
.meta-logo-mark { display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; color: #0668E1; line-height: 1; }
.meta-logo-mark.lg { font-size: 26px; }

/* ===== Channel icons ===== */
.meta-ch-ic { display: inline-flex; align-items: center; justify-content: center; border-radius: 7px; flex-shrink: 0; }
.meta-ch-ic.wa { background: #25D366; }
.meta-ch-ic.ig { background: radial-gradient(circle at 30% 110%, #FEDA75, #FA7E1E 25%, #D62976 55%, #962FBF 80%, #4F5BD5); }
.meta-ch-ic.fb { background: #1877F2; }

/* ===== Purchase / Activate gate ===== */
.meta-gate { display: flex; justify-content: center; padding: 8px 0 24px; }
.meta-gate-card { width: 100%; max-width: 560px; border: 1px solid var(--border); border-radius: 14px; background: #fff; padding: 24px; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.meta-gate-purchased { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: #0f7a3a; background: var(--green-bg); padding: 6px 12px; border-radius: 999px; margin-bottom: 16px; }
.meta-purchased-tick { display: inline-flex; width: 18px; height: 18px; border-radius: 50%; background: var(--green); color: #fff; align-items: center; justify-content: center; }
.meta-gate-head { display: flex; align-items: flex-start; gap: 14px; }
.meta-gate-ic { width: 48px; height: 48px; border-radius: 12px; background: #eaf1fd; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.meta-gate-title { font-size: 17px; font-weight: 700; color: var(--text); }
.meta-gate-sub { font-size: 13px; color: var(--text-muted); margin-top: 4px; line-height: 1.5; }
.meta-gate-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin: 20px 0; padding: 16px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.meta-price-val { font-size: 26px; font-weight: 700; color: var(--text); }
.meta-price-per { font-size: 14px; color: var(--text-muted); }
.meta-price-type { margin-inline-start: auto; font-size: 12px; font-weight: 500; color: var(--teal); background: #eef5f4; padding: 4px 10px; border-radius: 999px; }
.meta-gate-req-h { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 10px; }
.meta-gate-req ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.meta-gate-req li { display: flex; align-items: flex-start; gap: 10px; font-size: 12.5px; color: var(--text-muted); line-height: 1.45; }
.meta-req-tick { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: #eef5f4; color: var(--teal); flex-shrink: 0; margin-top: 1px; }
.meta-gate-btn { width: 100%; justify-content: center; margin-top: 22px; padding: 11px; font-size: 14px; }

/* ===== Channel hub — empty state ===== */
.meta-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 56px 24px; border: 1px dashed var(--border); border-radius: 14px; background: #fafbfb; }
.meta-empty-ic { width: 64px; height: 64px; border-radius: 50%; background: #eef2f1; color: var(--text-muted); display: inline-flex; align-items: center; justify-content: center; }
.meta-empty-title { font-size: 15px; font-weight: 600; color: var(--text); }
.meta-empty-btn { padding: 10px 18px; }
.meta-empty-note { font-size: 12px; color: var(--text-muted); max-width: 440px; line-height: 1.5; }

/* ===== Channel hub — grid ===== */
.meta-table th, .meta-table td { white-space: nowrap; vertical-align: middle; }
.meta-type-cell { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; color: var(--text); }
.meta-asset { display: inline-flex; flex-direction: column; }
.meta-asset strong { font-weight: 600; color: var(--text); }
.meta-asset-sub { font-size: 11.5px; color: var(--text-muted); }
.meta-empty-row { text-align: center; color: var(--text-muted); padding: 32px; font-size: 13px; }
.meta-table .col-actions { width: 90px; }
.meta-actions { display: inline-flex; gap: 8px; }
.meta-act-btn { padding: 6px 12px; border: 1px solid var(--border); border-radius: 7px; background: #fff; font-size: 12.5px; font-weight: 500; color: var(--text); cursor: pointer; }
.meta-act-btn:hover { border-color: var(--teal); color: var(--teal); }
.meta-act-btn.warn { border-color: #f0c36b; color: #a85a00; background: #fff8ec; }
.meta-act-btn.warn:hover { border-color: #d99a2b; }
.meta-act-btn.danger:hover { border-color: var(--red); color: var(--red); }
.meta-grid-note { font-size: 12px; color: var(--text-muted); margin-top: 14px; line-height: 1.5; }

/* ===== Simulated Meta OAuth popup ===== */
.meta-oauth-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(15,23,33,.55); display: flex; align-items: center; justify-content: center; padding: 24px; }
.meta-oauth { width: 420px; max-width: 100%; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.4); }
.meta-oauth-bar { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; background: #f0f2f5; border-bottom: 1px solid #dadde1; }
.meta-oauth-url { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: #444; font-family: -apple-system, system-ui, sans-serif; }
.meta-oauth-url svg { color: #1f9d55; }
.meta-oauth-x { border: none; background: transparent; color: #65676b; cursor: pointer; padding: 3px; border-radius: 5px; }
.meta-oauth-x:hover { background: #e4e6eb; }
.meta-oauth-body { padding: 22px 24px 24px; }
.meta-oauth-logo { display: inline-flex; align-items: center; gap: 8px; font-size: 22px; font-weight: 800; color: #0668E1; margin-bottom: 16px; }
.meta-oauth-logo .meta-logo-mark { font-size: 24px; }
.meta-oauth-h { font-size: 17px; font-weight: 700; color: #1c1e21; }
.meta-oauth-sub { font-size: 13px; color: #606770; margin: 4px 0 16px; }
.meta-oauth-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.meta-oauth-field span { font-size: 12px; color: #606770; }
.meta-oauth-field input { padding: 10px 12px; border: 1px solid #ccd0d5; border-radius: 8px; font-size: 14px; color: #1c1e21; }
.meta-oauth-login { width: 100%; padding: 10px; border: none; border-radius: 8px; background: #1877F2; color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; margin: 6px 0 18px; }
.meta-oauth-login:hover { background: #166fe5; }
.meta-oauth-allow-h { font-size: 13px; font-weight: 600; color: #1c1e21; padding-top: 16px; border-top: 1px solid #e4e6eb; margin-bottom: 10px; }
.meta-oauth-cb { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #1c1e21; padding: 6px 0; cursor: pointer; }
.meta-oauth-cb input { width: 16px; height: 16px; accent-color: #1877F2; }
.meta-oauth-allow { width: 100%; padding: 11px; border: none; border-radius: 8px; background: #0668E1; color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; margin-top: 14px; }
.meta-oauth-allow:hover { background: #0a5fc7; }

/* ===== Syncing overlay ===== */
.meta-sync-overlay { position: fixed; inset: 0; z-index: 1100; background: rgba(255,255,255,.72); backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; }
.meta-sync-box { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.meta-spinner { width: 40px; height: 40px; border-radius: 50%; border: 3px solid #d7e3e2; border-top-color: var(--teal); animation: metaSpin .8s linear infinite; }
@keyframes metaSpin { to { transform: rotate(360deg); } }
.meta-sync-text { font-size: 14px; font-weight: 500; color: var(--text); }

/* ===== Remove confirm ===== */
.meta-modal-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(15,30,33,.42); display: flex; align-items: center; justify-content: center; padding: 24px; }
.meta-confirm { width: 400px; max-width: 100%; background: #fff; border-radius: 14px; box-shadow: 0 24px 60px rgba(0,0,0,.22); padding: 26px 24px 22px; text-align: center; }
.meta-confirm-icon { width: 48px; height: 48px; border-radius: 50%; background: var(--red-bg); color: var(--red); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.meta-confirm-title { font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.meta-confirm-body { font-size: 13px; color: var(--text-muted); line-height: 1.5; margin-bottom: 20px; }
.meta-confirm-actions { display: flex; justify-content: center; gap: 10px; }
.meta-confirm-del { background: var(--red); color: #fff; border: none; }
.meta-confirm-del:hover { background: #c5302d; }
