:root{
      --bg:#0b1020;
      --panel:#121933;
      --panel2:#182142;
      --line:rgba(255,255,255,.10);
      --text:#eef2ff;
      --muted:#a7b0d6;
      --accent:#6d28d9;
      --good-bg:rgba(34,197,94,.12);
      --warn-bg:rgba(245,158,11,.12);
      --bad-bg:rgba(239,68,68,.12);
      --zero:#7e8ab8;
      --shadow:0 16px 42px rgba(0,0,0,.28);
      --radius:18px;
      --header-h:68px;
    }

    html[data-theme="light"],body[data-theme="light"]{
      --bg:#ffffff;
      --panel:#ffffff;
      --panel2:#f8faff;
      --line:rgba(15,23,42,.12);
      --text:#0f172a;
      --muted:#64748b;
      --accent:#6d28d9;
      --good-bg:rgba(34,197,94,.10);
      --warn-bg:rgba(245,158,11,.10);
      --bad-bg:rgba(239,68,68,.10);
      --zero:#94a3b8;
      --shadow:none;
    }

    *{box-sizing:border-box}
    html,body{margin:0;padding:0;min-height:100%;background:var(--bg);color:var(--text);font-family:Inter,Arial,sans-serif}
    html[data-theme="light"],body[data-theme="light"]{background:#fff !important}
    body{padding:15px;min-height:100vh}
    .wrap{max-width:100%;margin:0 auto;min-height:calc(100vh - 30px)}
    .card{background:linear-gradient(180deg,var(--panel),var(--panel2));border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}
    .hidden{display:none !important}

    .loading-skeleton-block{position:relative;overflow:hidden;border:1px dashed rgba(148,163,184,.28);border-radius:18px;padding:16px;background:rgba(148,163,184,.06)}
    body[data-theme="light"] .loading-skeleton-block{background:rgba(148,163,184,.05);border-color:rgba(148,163,184,.22)}
    .loading-skeleton-grid{display:grid;gap:12px}
    .loading-skeleton-grid.is-2{grid-template-columns:repeat(2,minmax(0,1fr))}
    .loading-skeleton-grid.is-3{grid-template-columns:repeat(3,minmax(0,1fr))}
    .loading-skeleton-card{padding:14px;border-radius:16px;border:1px solid rgba(148,163,184,.18);background:rgba(255,255,255,.34);display:grid;gap:10px;min-width:0}
    body[data-theme="light"] .loading-skeleton-card{background:rgba(255,255,255,.8)}
    .loading-skeleton-line,.loading-skeleton-circle,.loading-skeleton-bar,.loading-skeleton-pill{position:relative;overflow:hidden;background:rgba(148,163,184,.18);border-radius:999px}
    .loading-skeleton-line::after,.loading-skeleton-circle::after,.loading-skeleton-bar::after,.loading-skeleton-pill::after,.loading-skeleton-card::after,.loading-skeleton-chart::after,.loading-skeleton-table-row::after{content:"";position:absolute;inset:0;transform:translateX(-100%);background:linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.44) 48%, rgba(255,255,255,0) 100%);animation:skeletonShimmer 1.35s ease-in-out infinite}
    body[data-theme="dark"] .loading-skeleton-line::after,body[data-theme="dark"] .loading-skeleton-circle::after,body[data-theme="dark"] .loading-skeleton-bar::after,body[data-theme="dark"] .loading-skeleton-pill::after,body[data-theme="dark"] .loading-skeleton-card::after,body[data-theme="dark"] .loading-skeleton-chart::after,body[data-theme="dark"] .loading-skeleton-table-row::after{background:linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.18) 48%, rgba(255,255,255,0) 100%)}
    .loading-skeleton-line{height:12px}
    .loading-skeleton-line.is-sm{height:10px}
    .loading-skeleton-line.is-lg{height:16px}
    .loading-skeleton-line.w-100{width:100%}.loading-skeleton-line.w-80{width:80%}.loading-skeleton-line.w-72{width:72%}.loading-skeleton-line.w-60{width:60%}.loading-skeleton-line.w-50{width:50%}.loading-skeleton-line.w-40{width:40%}.loading-skeleton-line.w-30{width:30%}.loading-skeleton-line.w-24{width:24%}
    .loading-skeleton-circle{width:56px;height:56px;border-radius:50%}
    .loading-skeleton-pill{height:28px;width:120px}
    .loading-skeleton-bar{height:9px;width:100%;border-radius:999px}
    .loading-skeleton-meta{display:flex;align-items:center;gap:10px;min-width:0}
    .loading-skeleton-lines{display:grid;gap:8px;min-width:0}
    .loading-skeleton-table{display:grid;gap:10px}
    .loading-skeleton-table-row{position:relative;overflow:hidden;display:grid;grid-template-columns:minmax(140px,1.7fr) repeat(4,minmax(68px,.8fr));gap:10px;padding:10px 0;border-bottom:1px solid rgba(148,163,184,.12)}
    .loading-skeleton-table-row.is-wide{grid-template-columns:minmax(160px,1.8fr) repeat(6,minmax(56px,.7fr))}
    .loading-skeleton-table-row:last-child{border-bottom:none;padding-bottom:0}
    .loading-skeleton-table-row > span{display:block;height:12px;border-radius:999px;background:rgba(148,163,184,.18)}
    .loading-skeleton-table-row > span:nth-child(1){width:88%}
    .loading-skeleton-table-row > span:nth-child(n+2){width:72%}
    .loading-skeleton-chart{position:relative;overflow:hidden;height:150px;border-radius:18px;background:linear-gradient(180deg, rgba(148,163,184,.08), rgba(148,163,184,.02));border:1px dashed rgba(148,163,184,.24)}
    .loading-skeleton-chart::before{content:"";position:absolute;left:18px;right:18px;bottom:20px;height:56px;border-radius:16px;background:linear-gradient(180deg, rgba(124,58,237,.18), rgba(124,58,237,.02))}
    .loading-skeleton-chart-grid{position:absolute;inset:14px 16px;display:grid;grid-template-rows:repeat(4,1fr)}
    .loading-skeleton-chart-grid span{display:block;border-top:1px solid rgba(148,163,184,.16)}
    .loading-skeleton-caption{margin-top:10px;font-size:12px;line-height:1.3;color:var(--muted);opacity:.3}
    .card.kpi.is-loading{position:relative;overflow:hidden}
    .card.kpi.is-loading .k,.card.kpi.is-loading .v,.card.kpi.is-loading .s{color:transparent !important;position:relative;user-select:none}
    .card.kpi.is-loading .k::before,.card.kpi.is-loading .v::before,.card.kpi.is-loading .s::before{content:'';display:block;height:12px;border-radius:999px;background:rgba(148,163,184,.18);position:relative;overflow:hidden}
    .card.kpi.is-loading .v::before{height:20px;width:62%}
    .card.kpi.is-loading .k::before{width:34%}
    .card.kpi.is-loading .s::before{width:46%}
    .card.kpi.is-loading .k::after,.card.kpi.is-loading .v::after,.card.kpi.is-loading .s::after{content:'';position:absolute;inset:0;transform:translateX(-100%);background:linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.44) 48%, rgba(255,255,255,0) 100%);animation:skeletonShimmer 1.35s ease-in-out infinite}
    body[data-theme='dark'] .card.kpi.is-loading .k::after,body[data-theme='dark'] .card.kpi.is-loading .v::after,body[data-theme='dark'] .card.kpi.is-loading .s::after{background:linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.18) 48%, rgba(255,255,255,0) 100%)}
    .loading-skeleton-split{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(96px,.38fr);gap:14px;align-items:stretch}
    .loading-skeleton-donut{width:100%;height:100%;min-height:144px;border-radius:18px;background:radial-gradient(circle at center, rgba(255,255,255,0) 24px, rgba(148,163,184,.16) 25px, rgba(148,163,184,.16) 39px, rgba(255,255,255,0) 40px), rgba(148,163,184,.06);border:1px dashed rgba(148,163,184,.22);position:relative;overflow:hidden}
    .loading-skeleton-donut::after{content:"";position:absolute;inset:0;transform:translateX(-100%);background:linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.44) 48%, rgba(255,255,255,0) 100%);animation:skeletonShimmer 1.35s ease-in-out infinite}
    body[data-theme="dark"] .loading-skeleton-donut::after{background:linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.18) 48%, rgba(255,255,255,0) 100%)}
    .loading-skeleton-inline{display:grid;gap:8px;padding:10px 0}
    .loading-skeleton-inline-card{display:grid;gap:10px;padding:14px;border-radius:16px;border:1px dashed rgba(148,163,184,.24);background:rgba(148,163,184,.04)}
    .loading-skeleton-manager{display:grid;gap:14px}
    .loading-skeleton-tabs,.loading-skeleton-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
    .loading-skeleton-tabs .loading-skeleton-pill{width:126px}
    .loading-skeleton-toolbar .loading-skeleton-pill{width:142px}
    .loading-skeleton-summary-grid{display:grid;grid-template-columns:1.45fr repeat(2,minmax(0,1fr));gap:12px}
    .loading-skeleton-card-wide{min-height:104px}
    .loading-skeleton-card-compact{min-height:88px}
    .loading-skeleton-campaign-card .loading-skeleton-metric-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
    .loading-skeleton-ad-card .loading-skeleton-mini-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
    .loading-skeleton-ad-card .loading-skeleton-mini-stats span{display:block;height:10px;border-radius:999px;background:rgba(148,163,184,.18);position:relative;overflow:hidden}
    .loading-skeleton-ad-card .loading-skeleton-mini-stats span::after{content:'';position:absolute;inset:0;transform:translateX(-100%);background:linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.44) 48%, rgba(255,255,255,0) 100%);animation:skeletonShimmer 1.35s ease-in-out infinite}
    body[data-theme='dark'] .loading-skeleton-ad-card .loading-skeleton-mini-stats span::after{background:linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.18) 48%, rgba(255,255,255,0) 100%)}
    .loading-skeleton-audience-card{display:grid;gap:12px;padding:4px 0}
    .loading-skeleton-block-manager .loading-skeleton-table-row{grid-template-columns:minmax(180px,1.8fr) repeat(6,minmax(68px,.72fr))}
    .loading-skeleton-block-daily{margin-top:10px}
    .loading-skeleton-daily-wrap{display:grid;gap:12px}
    .loading-skeleton-chart-daily{height:170px}
    .loading-skeleton-block-breakdown,.loading-skeleton-block-formats{min-height:132px}
    @media (max-width:900px){.loading-skeleton-summary-grid{grid-template-columns:minmax(0,1fr)}}
    @keyframes skeletonShimmer{100%{transform:translateX(100%)}}
    @media (max-width:900px){.loading-skeleton-grid.is-2,.loading-skeleton-grid.is-3,.loading-skeleton-split{grid-template-columns:minmax(0,1fr)}}


    body[data-app-page]{--sidebar-w:284px;--sidebar-collapsed-w:68px;transition:padding-left .22s ease}
    body.with-sidebar{padding-left:calc(var(--sidebar-w) + 30px)}
    body.with-sidebar.sidebar-collapsed{padding-left:calc(var(--sidebar-collapsed-w) + 30px)}
    .app-sidebar{position:fixed;left:15px;top:15px;bottom:15px;width:var(--sidebar-w);padding:12px 8px;display:flex;flex-direction:column;gap:10px;z-index:70;border-radius:24px 0 0 24px;background:linear-gradient(180deg,var(--panel),var(--panel2));border:1px solid var(--line);box-shadow:var(--shadow);transition:width .22s ease,transform .22s ease;overflow:visible}
    .app-sidebar.collapsed{width:var(--sidebar-collapsed-w)}
    .app-sidebar-top{display:grid;gap:10px;justify-items:start;padding:0}.app-sidebar-brand{display:flex;align-items:center;justify-content:flex-start;min-height:32px;height:32px;padding:0 8px;margin:0 0 2px 0;width:100%}.app-sidebar-logo-full{display:block;width:auto;max-width:100%;height:32px;transition:filter .2s ease}.app-sidebar-logo-crop{display:none;width:32px;height:32px;transition:filter .2s ease}.app-sidebar.collapsed .app-sidebar-logo-full{display:none}.app-sidebar.collapsed .app-sidebar-logo-crop{display:block}.app-sidebar.collapsed .app-sidebar-brand{justify-content:flex-start;padding:0 8px;width:100%}
    .app-sidebar-collapse{width:100%;min-height:44px;border-radius:12px;border:1px solid var(--line);background:rgba(255,255,255,.04);color:var(--text);cursor:pointer;display:inline-flex;align-items:center;justify-content:flex-start;gap:8px;flex:0 0 auto;margin:0;padding:0 10px;font-weight:800}
    body[data-theme="light"] .app-sidebar-collapse{background:#fff}
    .app-sidebar-scroll{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;padding-right:0;display:grid;gap:10px;align-content:start;justify-content:stretch;grid-auto-rows:max-content;scrollbar-width:none !important;-ms-overflow-style:none !important;scrollbar-color:transparent transparent}
    .app-sidebar-scroll::-webkit-scrollbar{width:0 !important;height:0 !important;display:none !important}
    .app-sidebar-scroll::-webkit-scrollbar-thumb{background:transparent !important;border:none !important;display:none !important}
    .app-sidebar-scroll::-webkit-scrollbar-track{background:transparent !important;display:none !important}
    .app-sidebar-section{display:grid;gap:6px}
    .app-sidebar-section-title{font-size:11px;font-weight:900;color:var(--muted);text-transform:uppercase;letter-spacing:.06em;padding:0 6px}.app-sidebar-section-sep{display:none;position:relative;align-items:center;justify-content:center;height:14px;margin:2px 6px 6px;color:var(--muted);font-size:10px;font-weight:900;letter-spacing:.12em;text-transform:uppercase}.app-sidebar-section-sep::before{content:"";position:absolute;left:0;right:0;top:50%;height:1px;background:var(--line);transform:translateY(-50%)}.app-sidebar-section-sep span{position:relative;padding:0 4px;background:var(--panel);line-height:1}
    .app-sidebar-user{padding:10px;border:1px solid var(--line);border-radius:16px;background:rgba(255,255,255,.03);display:grid;gap:8px}.app-sidebar-user-top{display:grid;gap:6px}.app-sidebar-user-role{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:12px;font-weight:800;min-height:44px;padding:0 10px;border:1px solid var(--line);border-radius:12px;background:rgba(255,255,255,.03)}.app-sidebar-user-role .app-sidebar-icon{border-radius:0}.app-sidebar-user-role-text{line-height:1}.app-sidebar-theme-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-top:2px}.app-sidebar-theme-row .theme-wrap{width:100%;justify-content:space-between;font-size:12px}
    body[data-theme="light"] .app-sidebar-user{background:rgba(15,23,42,.02)}
    .app-sidebar-user-name{font-size:15px;font-weight:900;line-height:1.25}
    .app-sidebar-user-meta{font-size:12px;color:var(--muted);line-height:1.45}
    .app-sidebar-user-accounts{font-size:11px;color:var(--muted);line-height:1.45;display:grid;gap:4px}
    .app-sidebar-btn-inline{height:44px;padding:0 10px;border-radius:12px;border:1px solid var(--line);background:transparent;color:var(--text);font-weight:800;cursor:pointer;justify-self:stretch;width:100%;display:inline-flex;align-items:center;justify-content:center;gap:8px;position:relative}.app-sidebar-bottom{margin-top:auto;padding-top:10px;position:sticky;bottom:0;background:linear-gradient(180deg,transparent,var(--panel) 34%);padding-bottom:4px}.app-sidebar-bottom .app-sidebar-btn-inline{justify-self:stretch}
    .app-sidebar-nav{display:grid;gap:6px;align-content:start;grid-auto-rows:max-content}
    .app-sidebar-link,.app-sidebar-placeholder{display:flex;align-items:center;gap:8px;padding:9px 10px;border-radius:12px;border:1px solid transparent;text-decoration:none;color:var(--text);font-size:13px;font-weight:800;background:rgba(255,255,255,.03);position:relative}
    body[data-theme="light"] .app-sidebar-link,body[data-theme="light"] .app-sidebar-placeholder{background:rgba(15,23,42,.02)}
    .app-sidebar-link.active{border-color:rgba(109,40,217,.28);background:rgba(109,40,217,.1)}
    .app-sidebar-item-main{display:flex;align-items:center;gap:8px;min-width:0;flex:1 1 auto}
    .app-sidebar-icon{width:20px;height:20px;border-radius:6px;object-fit:cover;flex:0 0 20px;display:block}
    .app-sidebar-icon.is-ui{color:var(--text)}
    body[data-theme="dark"] .app-sidebar-icon.is-ui{filter:brightness(0) invert(1)}
    body[data-theme="light"] .app-sidebar-icon.is-ui{filter:none}
    .app-sidebar-icon.is-brand{filter:none !important;opacity:1}
    .app-sidebar-item-text{display:grid;gap:2px;min-width:0}
    .app-sidebar-link-sub{font-size:10px;color:var(--muted);font-weight:700}
    .app-sidebar-placeholder,.app-sidebar-link.is-disabled{color:#94a3b8;border-color:rgba(148,163,184,.18);cursor:default;pointer-events:none}
    .app-sidebar-placeholder .app-sidebar-link-sub,.app-sidebar-link.is-disabled .app-sidebar-link-sub{color:#94a3b8}
    .app-sidebar-placeholder .app-sidebar-icon,.app-sidebar-link.is-disabled .app-sidebar-icon{opacity:.48}
    body[data-theme="light"] .app-sidebar-link.is-disabled{background:rgba(148,163,184,.10)}
    body[data-theme="light"] .app-sidebar-link.is-disabled .app-sidebar-icon.is-brand{filter:grayscale(1) brightness(1.08) !important;opacity:.42}
    body[data-theme="dark"] .app-sidebar-link.is-disabled{background:rgba(255,255,255,.02)}
    body[data-theme="dark"] .app-sidebar-link.is-disabled .app-sidebar-icon.is-brand{filter:grayscale(1) brightness(.88) !important;opacity:.34}
    body[data-theme="dark"] .app-sidebar-link.is-disabled .app-sidebar-icon.is-ui{filter:brightness(0) invert(1);opacity:.3}
    .app-sidebar.collapsed .app-sidebar-text,.app-sidebar.collapsed .app-sidebar-section-title,.app-sidebar.collapsed .app-sidebar-user-meta,.app-sidebar.collapsed .app-sidebar-user-accounts,.app-sidebar.collapsed .app-sidebar-link-sub,.app-sidebar.collapsed .app-sidebar-btn-inline .app-sidebar-text,.app-sidebar.collapsed .app-sidebar-theme-row,.app-sidebar.collapsed .app-sidebar-user-name{display:none !important}.app-sidebar.collapsed .app-sidebar-user{justify-items:stretch;padding:0;border:none;background:transparent}.app-sidebar.collapsed .app-sidebar-user-top{gap:10px}.app-sidebar.collapsed .app-sidebar-user-role{justify-content:center;padding:8px;min-height:44px}
    .app-sidebar.collapsed .app-sidebar-link,.app-sidebar.collapsed .app-sidebar-placeholder,.app-sidebar.collapsed .app-sidebar-collapse,.app-sidebar.collapsed .app-sidebar-btn-inline{justify-content:center;padding:8px;min-height:44px}


    .app-sidebar.collapsed .app-sidebar-item-main{justify-content:center;gap:0}.app-sidebar.collapsed .app-sidebar-section-sep{display:block}.app-sidebar[data-enhanced-tooltips="1"] [data-collapsed-title]{position:relative}

    .deferred-loading-box{display:flex;align-items:center;gap:10px;min-height:72px;padding:14px 16px;border-radius:16px;border:1px dashed rgba(148,163,184,.28);background:rgba(148,163,184,.05);color:var(--muted);font-size:13px;font-weight:700;line-height:1.35}
    .deferred-loading-dot{width:9px;height:9px;border-radius:50%;background:#0ea5e9;box-shadow:0 0 0 5px rgba(14,165,233,.10);flex:0 0 auto}
    .loading-skeleton-line::after,.loading-skeleton-circle::after,.loading-skeleton-bar::after,.loading-skeleton-pill::after,.loading-skeleton-card::after,.loading-skeleton-chart::after,.loading-skeleton-table-row::after,.loading-skeleton-donut::after,.loading-skeleton-ad-card .loading-skeleton-mini-stats span::after,.card.kpi.is-loading .k::after,.card.kpi.is-loading .v::after,.card.kpi.is-loading .s::after{display:none!important;animation:none!important}
    .toast-root{position:fixed;right:18px;bottom:18px;display:grid;gap:10px;z-index:120;max-width:min(360px,calc(100vw - 36px))}
    .toast{padding:14px 14px 14px 16px;border-radius:16px;border:1px solid var(--line);box-shadow:var(--shadow);background:linear-gradient(180deg,var(--panel),var(--panel2));display:grid;gap:5px;transform:translateY(6px);opacity:0;transition:opacity .18s ease,transform .18s ease;position:relative;overflow:hidden}
    .toast.show{opacity:1;transform:translateY(0)}
    .toast::before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:#64748b}
    .toast.success::before{background:#16a34a}
    .toast.warning::before{background:#f59e0b}
    .toast.error::before{background:#dc2626}
    .toast.info::before{background:#0ea5e9}
    .toast-title{font-size:13px;font-weight:900;line-height:1.25}
    .toast-text{font-size:12px;line-height:1.45;color:var(--muted)}
    body[data-app-page="dashboard"] #adminCard{display:none !important}
    body.with-sidebar:not(.sidebar-collapsed) .insight-ad-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
    body.with-sidebar:not(.sidebar-collapsed) .insight-ad-card{padding:8px}
    body.with-sidebar:not(.sidebar-collapsed) .insight-ad-name{font-size:10px;line-height:1.3}
    body.with-sidebar:not(.sidebar-collapsed) .insight-ad-meta{font-size:9px;line-height:1.28}
    @media (max-width:1100px){body.with-sidebar{padding-left:15px}.app-sidebar{transform:translateX(calc(-100% - 24px))}.app-sidebar.is-mobile-open{transform:translateX(0)}.app-sidebar.collapsed{width:var(--sidebar-w)}}
    body.page-dashboard #adminCard{display:none !important}

    .topbar{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:14px 16px;margin-bottom:14px;min-height:var(--header-h)}
    .brand{display:flex;flex-direction:column;align-items:flex-start;gap:8px;min-width:0;flex:1 1 auto}
    .brand-logo{display:block;width:148px;max-width:100%;height:auto;transition:filter .2s ease}
    .brand-tagline{max-width:100%;font-size:11px;line-height:1.25;color:var(--muted);font-weight:700;letter-spacing:.02em;text-transform:lowercase}
    .report-line{display:flex;align-items:center;gap:8px;color:var(--text);font-size:13px;font-weight:700;line-height:1.2;white-space:normal}
    .report-line-icon{width:18px;height:18px;flex:0 0 auto;display:block}
    body[data-theme="dark"] .brand-logo,body[data-theme="dark"] .app-sidebar-logo-full,body[data-theme="dark"] .app-sidebar-logo-crop{filter:brightness(0) invert(1)}
    body[data-theme="light"] .brand-logo,body[data-theme="light"] .app-sidebar-logo-full,body[data-theme="light"] .app-sidebar-logo-crop{filter:none}

    .topbar-actions{display:flex;align-items:center;gap:14px;flex-wrap:wrap;justify-content:flex-end;flex:0 0 auto}
    .theme-wrap{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:12px;white-space:nowrap}
    .switch{position:relative;display:inline-block;width:48px;height:24px;flex:0 0 auto}
    .switch input{opacity:0;width:0;height:0}
    .slider{position:absolute;inset:0;cursor:pointer;background:#334155;transition:.2s;border-radius:999px;border:1px solid rgba(255,255,255,.12)}
    body[data-theme="light"] .slider{background:#cbd5e1;border-color:rgba(15,23,42,.12)}
    .slider:before{content:"";position:absolute;height:18px;width:18px;left:2px;top:2px;background:#fff;border-radius:50%;transition:.2s;box-shadow:0 2px 6px rgba(0,0,0,.18)}
    .switch input:checked + .slider{background:#16a34a}
    .switch input:checked + .slider:before{transform:translateX(24px)}
    .icon-btn{width:42px;height:42px;border-radius:12px;border:1px solid var(--line);background:#0f1630;color:var(--text);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;flex:0 0 auto}
    body[data-theme="light"] .icon-btn{background:#fff}
    .icon-btn.is-active{outline:2px solid rgba(109,40,217,.28)}
    .icon-btn svg{width:20px;height:20px;stroke:currentColor}
    .auth-badge{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;border:1px solid var(--line);color:var(--muted);font-size:12px}
    .auth-dot{width:8px;height:8px;border-radius:50%;background:#64748b}
    .auth-badge.active .auth-dot{background:#16a34a}

    .auth-wall{padding:28px 22px;text-align:center;margin-bottom:14px}
    .auth-wall-title{font-size:24px;font-weight:900;margin-bottom:10px}
    .auth-wall-text{color:var(--muted);font-size:14px;line-height:1.6;max-width:680px;margin:0 auto 18px}
    .auth-wall-actions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap}

    .btn{height:40px;border-radius:12px;border:1px solid var(--line);background:#0f1630;color:var(--text);padding:0 12px;outline:none;cursor:pointer;font-weight:800;box-shadow:0 4px 10px rgba(0,0,0,.08)}
    body[data-theme="light"] .btn{background:#fff;color:var(--text);border-color:rgba(15,23,42,.12)}
    .btn.primary{background:linear-gradient(135deg,var(--accent),#4c1d95);color:#fff;border-color:transparent}
    .btn.green{background:linear-gradient(135deg,#15803d,#16a34a);color:#fff;border-color:transparent}
    .btn.ghost{background:transparent;color:var(--text)}
    .btn.toggle{background:linear-gradient(135deg,#1f2937,#111827);color:#fff;border-color:transparent}
    body[data-theme="light"] .btn.primary{background:linear-gradient(135deg,var(--accent),#4c1d95) !important;color:#fff !important;border-color:transparent !important}
    body[data-theme="light"] .btn.green{background:linear-gradient(135deg,#15803d,#16a34a) !important;color:#fff !important;border-color:transparent !important}
    body[data-theme="light"] .btn.toggle{background:linear-gradient(135deg,#1f2937,#111827) !important;color:#fff !important;border-color:transparent !important}
    body[data-theme="light"] .btn.ghost{background:#fff !important;color:var(--text) !important;border-color:rgba(15,23,42,.12) !important}
    .btn-sm{height:28px;border-radius:9px;border:1px solid var(--line);background:transparent;color:var(--text);padding:0 10px;font-size:11px;cursor:pointer}
    body[data-theme="light"] .btn-sm{background:#fff;color:var(--text);border-color:rgba(15,23,42,.12)}

    .controls{padding:16px;display:grid;gap:12px;align-items:end;margin-bottom:14px}
    .controls.month-mode{grid-template-columns:minmax(220px,1fr) minmax(140px,.65fr) minmax(180px,.78fr) minmax(340px,1.7fr) minmax(180px,.9fr) minmax(150px,.8fr)}
    .controls.custom-mode{grid-template-columns:minmax(220px,1fr) minmax(140px,.65fr) minmax(170px,.78fr) minmax(170px,.78fr) minmax(340px,1.6fr) minmax(180px,.9fr) minmax(150px,.8fr)}
    .controls .field{display:flex;flex-direction:column;gap:6px;min-width:0}
    .controls .select,.controls .input,.controls .btn{width:100%;min-width:0}
    .controls .export-dropdown{width:100%}
    .controls .export-main{width:100%;min-width:0}
    .controls .btn{white-space:nowrap;font-size:13px}
    .field{display:flex;flex-direction:column;gap:6px}
    .label{font-size:12px;color:var(--muted)}
    .select,.input{height:42px;border-radius:12px;border:1px solid var(--line);background:#0f1630;color:var(--text);padding:0 12px;outline:none;width:100%}
    body[data-theme="light"] .select,body[data-theme="light"] .input{background:#fff}
    .inline-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}

    .kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:14px}
    .kpi{padding:12px 14px;display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:'label value' 'sub sub';align-items:start;column-gap:10px;row-gap:6px;min-height:0}
    .kpi .k{grid-area:label;font-size:11px;color:var(--muted);margin:0;font-weight:800;display:inline-flex;align-items:center;gap:6px;line-height:1.2}
    .kpi .v{grid-area:value;font-size:20px;font-weight:900;line-height:1;white-space:nowrap}
    .kpi .s{grid-area:sub;margin:0;font-size:11px;color:var(--muted);line-height:1.25}
    .kpi-tooltip{display:inline-flex;align-items:center;gap:6px;cursor:help}
    .kpi-tooltip .kpi-info{display:inline-flex;align-items:center;justify-content:center;width:15px;height:15px;border-radius:999px;border:1px solid var(--line);font-size:10px;color:var(--muted);font-weight:800;flex:0 0 auto}

    .admin-card{padding:16px;margin-bottom:14px}
    .admin-toggle-only{display:none}.admin-toggle-only.show{display:block}.admin-content.hidden{display:none}
    .admin-topbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px;flex-wrap:wrap}
    .admin-title{font-size:18px;font-weight:900}
    .admin-sub{color:var(--muted);font-size:12px;margin-top:12px}
    .admin-alert{margin-top:12px;padding:12px 14px;border-radius:14px;border:1px solid var(--line);font-size:13px;line-height:1.5;white-space:normal;word-break:break-word}
    .admin-alert.success{background:var(--good-bg);border-color:rgba(34,197,94,.32);color:#22c55e}
    .admin-alert.warn{background:var(--warn-bg);border-color:rgba(245,158,11,.32);color:#b45309}
    .admin-alert.error{background:var(--bad-bg);border-color:rgba(239,68,68,.32);color:#dc2626}
    body[data-theme="dark"] .admin-alert.success{color:#bbf7d0} body[data-theme="dark"] .admin-alert.warn{color:#fde68a} body[data-theme="dark"] .admin-alert.error{color:#fecaca}
    .admin-actions{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0}
    .save-wrap{margin-left:auto;display:flex;gap:8px;flex-wrap:wrap}
    .admin-grid{display:grid;grid-template-columns:360px minmax(760px,1fr);gap:14px}
    .admin-box{border:1px solid var(--line);border-radius:16px;background:rgba(255,255,255,.03);overflow:hidden}
    body[data-theme="light"] .admin-box{background:rgba(15,23,42,.02)}
    .admin-box-head{padding:12px 14px;border-bottom:1px solid var(--line);background:rgba(255,255,255,.03);font-size:13px;font-weight:800}
    body[data-theme="light"] .admin-box-head{background:rgba(15,23,42,.03)}
    .admin-box-body{padding:12px;max-height:460px;overflow:auto}
    .account-list{display:grid;gap:8px}
    .account-item{display:flex;align-items:center;gap:10px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:rgba(255,255,255,.02)}
    body[data-theme="light"] .account-item{background:rgba(15,23,42,.02)}
    .account-item input[type="checkbox"]{width:16px;height:16px;accent-color:#7c3aed;cursor:pointer;flex:0 0 auto}
    .account-item span{font-size:13px;line-height:1.35}
    .admin-table-wrap{overflow:auto}
    .admin-table{width:100%;min-width:860px;border-collapse:separate;border-spacing:0}
    .admin-table th,.admin-table td{padding:10px 12px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);text-align:center;font-size:12px;background:rgba(255,255,255,.02);white-space:nowrap;vertical-align:middle}
    body[data-theme="light"] .admin-table th,body[data-theme="light"] .admin-table td{background:rgba(15,23,42,.02)}
    .admin-table thead th{position:sticky;top:0;z-index:2;background:#101832;color:#d6ddff;font-weight:800}
    body[data-theme="light"] .admin-table thead th{background:#eef2ff;color:#334155}
    .admin-table .acc-col{text-align:left;min-width:220px;max-width:220px;position:sticky;left:0;z-index:3;background:#101832}
    .admin-table tbody .acc-col{background:#0f1630;z-index:1}
    body[data-theme="light"] .admin-table .acc-col{background:#eef2ff} body[data-theme="light"] .admin-table tbody .acc-col{background:#f8fafc}
    .th-actions{display:flex;gap:6px;justify-content:center;margin-top:6px;flex-wrap:wrap}
    .mini{color:var(--muted);font-size:11px;line-height:1.55}
    .section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px;flex-wrap:wrap}
    .section-title{font-size:18px;font-weight:900}
    .dashboard-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;margin-bottom:14px}
    .chart-card,.list-card{padding:16px}
    .chart-wrap{position:relative;height:320px}
    .list-stack{display:grid;gap:10px}
    .top-item{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px;border:1px solid var(--line);border-radius:14px;background:rgba(255,255,255,.03)}
    body[data-theme="light"] .top-item{background:rgba(15,23,42,.02)}
    .top-item-name{font-size:13px;font-weight:800}
    .top-item-meta{font-size:11px;color:var(--muted);margin-top:4px}
    .top-item-value{text-align:right;font-size:13px;font-weight:900}
    .empty-box{padding:18px;border:1px dashed var(--line);border-radius:16px;color:var(--muted);text-align:center}

    .table-card{overflow:hidden}.table-wrap{overflow:auto;border-radius:var(--radius)}
    table.report{border-collapse:separate;border-spacing:0;min-width:100%;width:100%}
    table.report th,table.report td{padding:10px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);white-space:nowrap;text-align:left;font-size:12px;background:rgba(255,255,255,.02);font-variant-numeric:tabular-nums}
    body[data-theme="light"] table.report th,body[data-theme="light"] table.report td{background:rgba(15,23,42,.02)}
    table.report thead th{position:sticky;top:0;z-index:5;background:#101832;color:#d6ddff;font-weight:800}
    body[data-theme="light"] table.report thead th{background:#eef2ff;color:#334155}
    .pill{display:inline-flex;align-items:center;padding:4px 8px;border-radius:999px;background:rgba(109,40,217,.08);font-size:11px;margin-right:6px;margin-bottom:6px}

    .zero{color:var(--zero)}
    .good{background:var(--good-bg);color:#16a34a}
    .warn{background:var(--warn-bg);color:#b45309}
    .bad{background:var(--bad-bg);color:#dc2626}
    body[data-theme="dark"] .good{color:#bbf7d0}
    body[data-theme="dark"] .warn{color:#fde68a}
    body[data-theme="dark"] .bad{color:#fecaca}
    .export-field{position:relative}
    .export-dropdown{position:relative}
    .export-main{width:100%;display:flex;align-items:center;justify-content:space-between;gap:8px}
    .export-main .caret{font-size:12px;opacity:.85}
    .export-menu{position:absolute;top:calc(100% + 8px);left:0;min-width:220px;background:linear-gradient(180deg,var(--panel),var(--panel2));border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow);overflow:hidden;z-index:50}
    body[data-theme="light"] .export-menu{background:#fff}
    .export-item{width:100%;text-align:left;padding:12px 14px;border:0;border-bottom:1px solid var(--line);background:transparent;color:var(--text);font:inherit;cursor:pointer}
    .export-item:last-child{border-bottom:0}
    .export-item:hover{background:rgba(109,40,217,.08)}
    .warnings-card,.insight-card{padding:16px;margin-bottom:14px}
    .warning-list,.insight-list{display:grid;gap:10px}
    .warning-item,.insight-item{padding:12px 14px;border-radius:14px;border:1px solid var(--line);background:rgba(255,255,255,.03)}
    body[data-theme="light"] .warning-item, body[data-theme="light"] .insight-item{background:rgba(15,23,42,.02)}
    .insight-summary-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
    .insight-summary-card{padding:12px 14px;border:1px solid var(--line);border-radius:14px;background:rgba(255,255,255,.03)}
.insight-summary-card-ad{display:flex;align-items:flex-start;gap:10px;padding:12px}
.insight-summary-content{min-width:0;display:grid;gap:4px}
.insight-summary-meta{font-size:10px;line-height:1.35;color:var(--muted)}
    body[data-theme="light"] .insight-summary-card{background:rgba(15,23,42,.02)}
    .insight-summary-title{font-size:11px;color:var(--muted);margin-bottom:6px;text-transform:uppercase;letter-spacing:.03em}
    .insight-summary-value{font-size:13px;font-weight:800;line-height:1.45}
    .insight-section{border:1px solid var(--line);border-radius:16px;padding:12px;background:rgba(255,255,255,.03)}
    body[data-theme="light"] .insight-section{background:rgba(15,23,42,.02)}
    .insight-section-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
    .insight-section-title{font-size:13px;font-weight:900}
    .insight-section-sub{font-size:11px;color:var(--muted)}
    .insight-campaign-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
    .insight-campaign-card{padding:12px;border:1px solid var(--line);border-radius:14px;background:rgba(255,255,255,.03)}
    body[data-theme="light"] .insight-campaign-card{background:#fff}
    .insight-campaign-name{font-size:12px;font-weight:800;line-height:1.4;margin-bottom:8px;word-break:break-word}
    .insight-campaign-metrics{display:grid;gap:4px;font-size:11px;color:var(--muted)}
    .insight-ad-sections-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:start}
    .insight-ad-grid{display:grid;grid-template-columns:1fr;gap:8px}
    .insight-ad-card{display:flex;flex-direction:column;gap:8px;align-items:stretch;padding:10px;border:1px solid var(--line);border-radius:14px;background:rgba(255,255,255,.03);min-width:0}
    .insight-ad-card-inline{flex-direction:row;align-items:flex-start;gap:10px}
    .insight-ad-card-inline .creative-thumb-mini{flex:0 0 42px}

    .creative-thumb{width:100%;aspect-ratio:4/5;border-radius:12px;overflow:hidden;border:1px solid var(--line);background:linear-gradient(135deg,rgba(109,40,217,.15),rgba(76,29,149,.35));display:flex;align-items:center;justify-content:center;text-align:center;padding:6px;position:relative;flex:0 0 auto}
    .creative-thumb img{width:100%;height:100%;object-fit:cover;display:block}
    .creative-thumb-fallback{font-size:10px;font-weight:800;line-height:1.3;color:var(--text);display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}
    .creative-thumb-mini{width:42px;height:42px;aspect-ratio:auto;border-radius:10px;padding:0}
    .creative-thumb-mini .creative-thumb-fallback{width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:4px;font-size:9px;line-height:1.2;text-align:center;-webkit-line-clamp:unset}
    body[data-theme="light"] .insight-ad-card{background:#fff}
    .insight-ad-card-inline .insight-ad-content{min-width:0;display:grid;gap:4px}
    .insight-thumb{width:100%;aspect-ratio:4/5;border-radius:12px;overflow:hidden;border:1px solid var(--line);background:linear-gradient(135deg,rgba(109,40,217,.15),rgba(76,29,149,.35));display:flex;align-items:center;justify-content:center;text-align:center;padding:6px;position:relative}
    .insight-thumb img{width:100%;height:100%;object-fit:cover;display:block}
    .insight-thumb-fallback{font-size:10px;font-weight:800;line-height:1.3;color:var(--text);display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}
    .insight-ad-content{min-width:0}
    .insight-ad-name{font-size:11px;font-weight:800;line-height:1.35;margin-bottom:5px;word-break:break-word;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
    .insight-ad-meta{font-size:10px;color:var(--muted);line-height:1.35;display:grid;gap:2px;min-width:0}.insight-ad-meta > div{min-width:0;overflow-wrap:anywhere;word-break:break-word;hyphens:auto}.insight-ad-meta b{font-weight:800;overflow-wrap:anywhere;word-break:break-word}
    .insight-empty{padding:14px;border:1px dashed var(--line);border-radius:14px;text-align:center;color:var(--muted);font-size:12px}

    .ads-manager-card{padding:16px;margin-bottom:14px;overflow:hidden}
    .ads-manager-toolbar{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px;flex-wrap:wrap}
    .ads-manager-levels{display:flex;gap:8px;flex-wrap:wrap}
    .ads-manager-level-btn{height:38px;padding:0 14px;border-radius:12px;border:1px solid var(--line);background:rgba(255,255,255,.03);color:var(--text);font-weight:800;cursor:pointer}
    body[data-theme="light"] .ads-manager-level-btn{background:#fff;color:var(--text);border-color:var(--line)}
    .ads-manager-level-btn.active{background:linear-gradient(135deg,var(--accent),#4c1d95);color:#fff;border-color:transparent}
    body[data-theme="light"] .ads-manager-level-btn.active{background:linear-gradient(135deg,var(--accent),#4c1d95) !important;color:#fff !important;border-color:transparent !important;box-shadow:0 10px 20px rgba(109,40,217,.18)}
    .ads-manager-meta{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}
    .ads-manager-reset{height:38px;padding:0 12px}
    .ads-manager-crm-diag{margin:0 0 12px;padding:12px 14px;border-radius:14px;border:1px solid rgba(245,158,11,.26);background:rgba(245,158,11,.08);display:grid;gap:8px}
    .ads-manager-crm-diag.hidden{display:none !important}
    .ads-manager-crm-diag-title{font-size:13px;font-weight:800;color:var(--text)}
    .ads-manager-crm-diag-text{font-size:12px;line-height:1.45;color:var(--muted)}
    .ads-manager-crm-diag-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
    .ads-manager-crm-diag-pill{border:1px solid var(--line);background:rgba(255,255,255,.45);border-radius:12px;padding:8px 10px;display:grid;gap:2px}
    body[data-theme="dark"] .ads-manager-crm-diag-pill{background:rgba(255,255,255,.03)}
    .ads-manager-crm-diag-label{font-size:11px;line-height:1.3;color:var(--muted)}
    .ads-manager-crm-diag-value{font-size:16px;line-height:1.15;font-weight:800;color:var(--text)}
    .ads-manager-crm-diag-list{display:grid;gap:6px}
    .ads-manager-crm-diag-subblock{display:grid;gap:6px;padding-top:2px}
    .ads-manager-crm-diag-subtitle{font-size:12px;line-height:1.35;font-weight:700;color:var(--text)}
    .ads-manager-crm-diag-item{font-size:11px;line-height:1.4;color:var(--muted);padding-left:12px;position:relative}
    .ads-manager-crm-diag-item::before{content:'•';position:absolute;left:0;top:0;color:var(--accent)}
.ads-manager-crm-diag-toggle{all:unset;display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:10px;cursor:pointer}
.ads-manager-crm-diag-toggle-meta{font-size:11px;color:var(--muted);white-space:nowrap}
.ads-manager-crm-diag-toggle-icon{font-size:16px;line-height:1;color:var(--text)}
.ads-manager-crm-diag-panel.hidden{display:none !important}
.ads-manager-crm-diag-mini{display:grid;gap:4px;margin-top:6px;padding:6px 8px;border-radius:10px;background:rgba(15,23,42,.04);border:1px dashed rgba(148,163,184,.35)}
body[data-theme="dark"] .ads-manager-crm-diag-mini{background:rgba(255,255,255,.03)}
.ads-manager-crm-diag-mini-item{font-size:10px;line-height:1.35;color:var(--muted);word-break:break-word}
.ads-manager-crm-diag-mini-item span{color:var(--text);font-weight:700}
    .ads-manager-table-wrap{overflow:auto;border-radius:16px;border:1px solid var(--line);max-height:620px;scrollbar-gutter:stable both-edges}
    .ads-manager-table{min-width:1220px;width:max-content}
    .ads-manager-table thead th{vertical-align:middle}
    .ads-manager-head-btn{all:unset;display:inline-flex;align-items:center;gap:6px;cursor:pointer;color:inherit;font:inherit;font-weight:800;position:relative}
    .ads-manager-head-btn .sort-icon{font-size:11px;opacity:.85}
    .ads-manager-head-text{display:inline-flex;align-items:center;gap:6px}
    .ads-manager-head-info{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;border-radius:999px;border:1px solid var(--line);font-size:10px;color:var(--muted)}
    .ads-manager-tooltip{position:relative;display:inline-flex;align-items:center}
    .ads-manager-tooltip::after,.ads-manager-tooltip::before{display:none !important}
    .ads-manager-floating-tooltip{position:fixed;left:0;top:0;max-width:260px;min-width:180px;padding:8px 10px;border-radius:10px;background:rgba(15,23,42,.96);color:#fff;font-size:11px;line-height:1.35;font-weight:600;text-align:left;box-shadow:0 10px 24px rgba(15,23,42,.26);opacity:0;visibility:hidden;pointer-events:none;transform:translateY(4px);transition:opacity .14s ease,transform .14s ease,visibility .14s ease;z-index:99999}
    .ads-manager-floating-tooltip.show{opacity:1;visibility:visible;transform:translateY(0)}
    .ads-manager-entity{display:flex;align-items:flex-start;gap:10px;min-width:280px}
    .ads-manager-checkbox{width:16px;height:16px;accent-color:#7c3aed;cursor:pointer;flex:0 0 auto;margin-top:2px}
    .ads-manager-entity-content{min-width:0}
    .ads-manager-entity-btn{all:unset;cursor:pointer;color:var(--text);font-weight:800;line-height:1.35;display:inline-block}
    .ads-manager-entity-btn:hover{text-decoration:underline}
    .ads-manager-entity-sub{display:block;margin-top:4px;font-size:11px;line-height:1.35;color:var(--muted);white-space:normal}
    .ads-manager-adcell{display:flex;align-items:flex-start;gap:10px;min-width:330px}
    .ads-manager-adthumb{width:42px;height:42px;border-radius:10px;overflow:hidden;border:1px solid var(--line);background:linear-gradient(135deg,rgba(109,40,217,.15),rgba(76,29,149,.35));flex:0 0 auto}
    .ads-manager-adthumb img{width:100%;height:100%;object-fit:cover;display:block}
    .ads-manager-adthumb-fallback{width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-size:9px;font-weight:800;line-height:1.2;padding:4px;text-align:center;color:var(--text)}
    .ads-manager-admeta{display:grid;gap:2px;min-width:0}
    .ads-manager-adname{font-size:12px;font-weight:800;line-height:1.35;word-break:break-word}
    .ads-manager-adsub{font-size:10px;line-height:1.35;color:var(--muted);word-break:break-word}
.creative-inline-cell{display:flex;align-items:flex-start;gap:10px;min-width:220px}
.creative-inline-meta{min-width:0;display:grid;gap:2px}
.creative-inline-title{font-size:12px;font-weight:800;line-height:1.35;word-break:break-word}
.creative-inline-sub{font-size:10px;line-height:1.35;color:var(--muted);word-break:break-word}
    .ads-manager-selection{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
    .ads-manager-selection .mini{font-size:12px}
    .ads-manager-empty{padding:18px;border:1px dashed var(--line);border-radius:16px;color:var(--muted);text-align:center}
    .ads-manager-total-row td{background:rgba(109,40,217,.06) !important;font-weight:800}
    body[data-theme="light"] .ads-manager-total-row td{background:rgba(109,40,217,.06) !important}
    .ads-manager-total-row td:first-child{position:sticky;left:0;z-index:1}
    .ads-manager-status-cell{min-width:92px}
    .ads-manager-status-badge{display:inline-flex;align-items:center;justify-content:center;min-width:56px;padding:6px 10px;border-radius:999px;font-size:11px;font-weight:800;line-height:1.1;border:1px solid var(--line);background:rgba(148,163,184,.12);color:var(--text)}
    .ads-manager-status-badge.is-on{background:rgba(34,197,94,.12);border-color:rgba(34,197,94,.28)}
    .ads-manager-status-badge.is-off{background:rgba(245,158,11,.12);border-color:rgba(245,158,11,.28)}
    .ads-manager-status-badge.is-unknown{background:rgba(148,163,184,.12);border-color:rgba(148,163,184,.28)}

    .daily-cut-card{padding:16px;margin-bottom:14px;overflow:hidden}
    .daily-cut-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap}
    .daily-cut-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
    .daily-cut-mode{display:inline-flex;align-items:center;gap:6px;padding:4px;border:1px solid var(--line);border-radius:12px;background:rgba(255,255,255,.03)}
    body[data-theme="light"] .daily-cut-mode{background:rgba(15,23,42,.03)}
    .daily-cut-mode-btn{height:34px;padding:0 12px;border-radius:10px;border:1px solid transparent;background:transparent;color:var(--text);font-size:12px;font-weight:800;cursor:pointer}
    .daily-cut-mode-btn.active{background:linear-gradient(135deg,var(--accent),#4c1d95);color:#fff}
    .daily-cut-insights{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:12px}
    .daily-cut-insight{padding:12px 14px;border:1px solid var(--line);border-radius:14px;background:rgba(255,255,255,.03)}
    body[data-theme="light"] .daily-cut-insight{background:rgba(15,23,42,.02)}
    .daily-cut-insight-title{font-size:11px;color:var(--muted);margin-bottom:6px;text-transform:uppercase;letter-spacing:.03em}
    .daily-cut-insight-value{font-size:13px;font-weight:800;line-height:1.45}
    .daily-cut-scroll{overflow-x:auto;border-radius:16px;border:1px solid var(--line)}
    .daily-cut-table{border-collapse:separate;border-spacing:0;min-width:max-content;width:max-content}
    .daily-cut-table th,.daily-cut-table td{padding:9px 10px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);text-align:center;white-space:nowrap;font-variant-numeric:tabular-nums;background:rgba(255,255,255,.02);font-size:12px}
    body[data-theme="light"] .daily-cut-table th,body[data-theme="light"] .daily-cut-table td{background:rgba(15,23,42,.02)}
    .daily-cut-table thead th{background:#eef2ff;color:#334155;font-weight:800}
    body[data-theme="dark"] .daily-cut-table thead th{background:#101832;color:#d6ddff}
    .daily-cut-table .metric-head{font-size:11px;color:var(--muted);font-weight:700}

    .daily-cut-table .daily-cut-metric-col,
    .daily-cut-table .daily-cut-row-label{
      position:sticky;
      left:0;
      z-index:2;
      min-width:150px;
      text-align:left;
      background:#eef2ff;
      color:#334155;
      font-weight:900;
    }
    body[data-theme="dark"] .daily-cut-table .daily-cut-metric-col,
    body[data-theme="dark"] .daily-cut-table .daily-cut-row-label{
      background:#101832;
      color:#d6ddff;
    }
    .daily-cut-stack{display:flex;flex-direction:column;align-items:center;gap:3px;line-height:1.15}
    .daily-cut-stack b{font-size:13px;font-weight:900;color:var(--text)}
    .daily-cut-stack span{font-size:11px;color:var(--muted);font-weight:800}
    .daily-cut-table .daily-cut-good{background:rgba(34,197,94,.08) !important;color:#15803d}
    .daily-cut-table .daily-cut-warn{background:rgba(245,158,11,.08) !important;color:#b45309}
    .daily-cut-table .daily-cut-bad{background:rgba(239,68,68,.08) !important;color:#dc2626}
    body[data-theme="dark"] .daily-cut-table .daily-cut-good{color:#bbf7d0}
    body[data-theme="dark"] .daily-cut-table .daily-cut-warn{color:#fde68a}
    body[data-theme="dark"] .daily-cut-table .daily-cut-bad{color:#fecaca}
    .audience-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:14px}
    .audience-card{padding:16px}
    .audience-layout{display:grid;grid-template-columns:minmax(0,1fr) 150px;gap:14px;align-items:center}
    .audience-layout.is-crm{grid-template-columns:1fr;gap:12px}
    .audience-table-wrap{min-width:0}
    .audience-table-wrap.is-scroll{max-height:214px;overflow-y:auto;overflow-x:hidden;padding-right:4px;scrollbar-gutter:stable}
    .audience-table-wrap.is-crm{overflow:auto;padding-right:0}
    .audience-donut-wrap{display:flex;align-items:center;justify-content:center}
    .audience-donut-wrap.is-crm{padding-top:4px;border-top:1px dashed var(--line)}
    .audience-donut{width:132px;height:132px;display:block}
    .audience-donut-track{stroke:rgba(148,163,184,.18);fill:none}
    .audience-donut-hole{fill:var(--panel)}
    .audience-donut-center{font-size:10px;fill:var(--muted);font-weight:700;text-anchor:middle}
    .audience-donut-center-value{font-size:18px;fill:var(--text);font-weight:900;text-anchor:middle}
    .audience-donut-segment{transition:transform .18s ease, opacity .18s ease;transform-origin:60px 60px;cursor:pointer}
    .audience-donut-segment:hover{opacity:.92;transform:scale(1.03)}
    @media (max-width: 900px){.daily-cut-insights{grid-template-columns:repeat(2,minmax(0,1fr))}.audience-layout{grid-template-columns:1fr}}

    .audience-mobile-list{display:none}
    .audience-table{width:100%;border-collapse:collapse}
    .audience-table.is-crm{min-width:980px}
    .audience-table th,.audience-table td{padding:8px 6px;border-bottom:1px solid var(--line);font-size:12px;text-align:left;vertical-align:middle}
    .audience-table.is-crm th,.audience-table.is-crm td{padding:10px 8px;white-space:nowrap}
    .audience-table .audience-segment{white-space:normal;min-width:150px;max-width:220px}
    .audience-share-cell{min-width:160px}
    .audience-share-wrap{display:flex;align-items:center;gap:8px;min-width:140px}
    .audience-share-value{font-size:11px;white-space:nowrap}
    .audience-bar{display:block;height:8px;border-radius:999px;background:linear-gradient(135deg,#7c3aed,#4c1d95);opacity:.85}

    .heat-good{background:rgba(16,185,129,.075) !important;color:#15803d !important}
    .heat-warn{background:rgba(245,158,11,.07) !important;color:#92400e !important}
    .heat-bad{background:rgba(245,158,11,.055) !important;color:#92400e !important}
    body[data-theme="dark"] .heat-good{background:rgba(34,197,94,.10)!important;color:#bbf7d0 !important}
    body[data-theme="dark"] .heat-warn{background:rgba(245,158,11,.10)!important;color:#fde68a !important}
    body[data-theme="dark"] .heat-bad{background:rgba(245,158,11,.08)!important;color:#fed7aa !important}
    .caption{font-size:12px;color:var(--muted);margin-top:8px}


    .actions-line{display:flex;gap:8px;flex-wrap:wrap}
    .users-actions{display:flex;gap:6px;flex-wrap:wrap;min-width:280px}
    .users-actions .btn-sm{white-space:nowrap}
    .users-col-actions{min-width:320px}
    .account-list-names{display:grid;gap:4px;min-width:180px}
    .account-list-names .account-name-line{white-space:normal;line-height:1.35}
    .tag{display:inline-flex;align-items:center;padding:4px 8px;border-radius:999px;font-size:11px;font-weight:700;border:1px solid var(--line)}
    .tag.active{background:var(--good-bg);color:#16a34a}
    .tag.inactive{background:var(--bad-bg);color:#dc2626}
    body[data-theme="dark"] .tag.active{color:#bbf7d0}
    body[data-theme="dark"] .tag.inactive{color:#fecaca}

    .loading-overlay{position:fixed;inset:0;background:rgba(2,6,23,.58);display:flex;align-items:center;justify-content:center;padding:18px;z-index:1200;backdrop-filter:blur(4px)}
    .loading-overlay.hidden{display:none}
    body.page-dashboard .loading-overlay{display:none !important;pointer-events:none !important;opacity:0 !important;visibility:hidden !important}
    .loading-card{width:min(100%,340px);padding:22px 20px;border-radius:22px;border:1px solid var(--line);background:linear-gradient(180deg,var(--panel),var(--panel2));box-shadow:var(--shadow);text-align:center}
    .loading-title{font-size:18px;font-weight:900;margin-bottom:12px}
    .loading-percent{font-size:28px;font-weight:900;margin-bottom:10px}
    .loading-bar{height:10px;border-radius:999px;background:rgba(148,163,184,.18);overflow:hidden}
    .loading-bar-fill{height:100%;width:0%;background:linear-gradient(135deg,#7c3aed,#4c1d95);transition:width .22s ease}
    .loading-sub{margin-top:10px;font-size:12px;color:var(--muted)}

    .modal-overlay{position:fixed;inset:0;background:rgba(2,6,23,.62);display:flex;align-items:center;justify-content:center;padding:18px;z-index:1000}
    .modal-overlay.hidden{display:none}
    .modal{width:min(100%,420px);padding:18px}
    .modal.compact{width:min(100%,460px)}
    .modal-scroll{max-height:min(52vh,420px);overflow:auto;padding-right:4px}
    .modal-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
    .modal-title{font-size:18px;font-weight:900}
    .modal-close{width:34px;height:34px;border-radius:10px;border:1px solid var(--line);background:transparent;color:var(--text);cursor:pointer;font-size:18px;line-height:1}
    .modal-body{color:var(--text);font-size:14px;line-height:1.55}
    .modal-form{display:grid;gap:10px;margin-top:12px}
    .modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:16px;flex-wrap:wrap}
    .modal-error{margin-top:10px;color:#ef4444;font-size:12px;min-height:16px}

    
.crm-tag-stats-card{margin-top:16px;padding:14px 16px 16px}
.crm-tag-stats-wrap{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.crm-tag-stat{border:1px solid var(--line);border-radius:16px;padding:12px 14px;background:linear-gradient(180deg,rgba(255,255,255,.76),rgba(255,255,255,.54));display:grid;gap:3px;min-width:0}
body[data-theme="dark"] .crm-tag-stat{background:rgba(255,255,255,.03)}
.crm-tag-stat-label{font-size:12px;line-height:1.35;color:var(--muted);font-weight:800}
.crm-tag-stat-value{font-size:24px;line-height:1.05;font-weight:900;color:var(--text)}
.crm-tag-stat-note{font-size:11px;line-height:1.35;color:var(--muted)}
@media (max-width: 1280px){.crm-tag-stats-wrap{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media (max-width: 900px){.crm-tag-stats-wrap{grid-template-columns:1fr;}.crm-tag-stat-value{font-size:21px}}
@media (max-width: 1280px){.admin-grid{grid-template-columns:1fr}.controls{grid-template-columns:1fr 1fr}.kpis{grid-template-columns:1fr 1fr}.dashboard-grid{grid-template-columns:1fr}.insight-summary-grid,.insight-campaign-grid,.insight-ad-sections-grid{grid-template-columns:1fr}.insight-ad-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.daily-cut-insights{grid-template-columns:1fr}.ads-manager-toolbar{flex-direction:column;align-items:stretch}.ads-manager-meta{justify-content:flex-start}.ads-manager-crm-diag-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
    @media (max-width: 900px){body{padding:12px}.topbar{padding:12px;align-items:flex-start}.topbar-actions{width:100%;justify-content:space-between}.brand{width:100%;align-items:flex-start;gap:7px}.brand-logo{width:132px}.brand-tagline{width:132px;font-size:10px}.report-line{font-size:12px}.report-line-icon{width:16px;height:16px}.controls{grid-template-columns:1fr}.kpis{grid-template-columns:1fr}.admin-topbar{align-items:flex-start}.save-wrap{margin-left:0;width:100%;justify-content:flex-start}.admin-actions{width:100%}.btn,.select,.input{min-height:42px}.table-wrap{overflow:auto}.ads-manager-levels{width:100%}.ads-manager-level-btn{flex:1 1 0}.ads-manager-adcell,.ads-manager-entity{min-width:260px}.ads-manager-crm-diag-grid{grid-template-columns:1fr}.modal{width:min(100%,96vw);padding:16px}}
    @media (max-width: 560px){.topbar-actions{gap:10px}.theme-wrap{width:100%;justify-content:space-between}.admin-actions,.save-wrap,.auth-wall-actions{flex-direction:column}.btn{width:100%}.th-actions{flex-direction:column}}



.report-hero{
  position:relative;
  margin-bottom:18px;
  padding:22px 24px;
  display:flex;
  align-items:flex-start;
  justify-content:flex-start;
  gap:16px;
}
.report-hero-copy{
  min-width:0;
  flex:1 1 auto;
  padding-right:132px;
}
.report-hero-title{
  margin:0;
  font-size:26px;
  line-height:1.15;
  font-weight:800;
  letter-spacing:-0.02em;
  color:var(--text);
}
.report-hero-meta{
  margin:8px 0 0;
  font-size:12px;
  line-height:1.4;
  font-weight:500;
  color:var(--muted);
}
.report-hero-side{
  position:absolute;
  top:18px;
  right:20px;
  width:auto;
}
.report-hero-side-grid{
  display:grid;
  gap:8px;
  align-items:start;
  justify-items:end;
}
.report-hero-field{min-width:0;}
.report-hero-field .select,
.report-hero-field .input{width:100%;}
.report-hero-export-field{justify-self:end;}
.report-hero-export-label{
  margin-bottom:6px;
  text-align:right;
  font-size:11px;
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--muted);
}
.report-hero-export-icons{display:flex;align-items:center;gap:8px;}
.hero-icon-btn{
  width:42px;
  height:42px;
  border-radius:12px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.04);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  box-shadow:0 8px 18px rgba(15,23,42,.05);
  transition:transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
body[data-theme="light"] .hero-icon-btn{background:#fff;}
.hero-icon-btn:hover{
  transform:translateY(-1px);
  border-color:rgba(109,40,217,.28);
  box-shadow:0 12px 24px rgba(109,40,217,.10);
}
.hero-icon-btn .app-sidebar-icon{width:30px;height:30px;flex:0 0 30px;}
.period-card{
  position:relative;
  margin-bottom:14px;
  padding:12px 14px;
}
.period-toolbar{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;}
.period-toolbar-main{display:grid;gap:8px;min-width:0;width:100%;}
.period-quick-switch{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:6px;
  padding:6px;
  border-radius:18px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.03);
}
body[data-theme="light"] .period-quick-switch{background:#fff;}
.period-quick-btn,
.period-picker-open-btn{
  min-height:36px;
  padding:0 14px;
  border-radius:12px;
  border:1px solid transparent;
  background:transparent;
  color:var(--muted);
  font-size:12px;
  font-weight:800;
  letter-spacing:-0.01em;
  cursor:pointer;
  transition:background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.period-quick-btn:hover,
.period-picker-open-btn:hover{color:var(--text);}
.period-quick-btn.is-active{
  background:#0f172a;
  color:#fff;
  box-shadow:0 8px 18px rgba(15,23,42,.14);
}
body[data-theme="light"] .period-quick-btn.is-active{background:#0f172a;color:#fff;}
.period-picker-open-btn{
  margin-left:auto;
  border-color:rgba(148,163,184,.18);
  color:var(--text);
  background:rgba(255,255,255,.03);
}
body[data-theme="light"] .period-picker-open-btn{background:#fff;}
.period-summary-text{font-size:11px;color:var(--muted);font-weight:700;}
.period-picker-popover{position:absolute;right:0;top:calc(100% + 6px);z-index:30;width:min(100%, 760px);}
.period-picker-popover.hidden{display:none !important;}
.period-picker-card{border:1px solid var(--line);border-radius:18px;background:var(--panel);box-shadow:0 24px 56px rgba(15,23,42,.14);padding:12px 14px;}
body[data-theme="light"] .period-picker-card{background:#fff;}
.period-picker-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:10px;}
.period-picker-title{font-size:15px;font-weight:900;color:var(--text);}
.period-picker-sub{margin-top:3px;font-size:11px;color:var(--muted);}
.period-picker-close{width:32px;height:32px;border-radius:10px;border:1px solid var(--line);background:transparent;color:var(--muted);font-size:20px;line-height:1;cursor:pointer;}
.period-picker-grid{display:grid;grid-template-columns:180px minmax(0,1fr);gap:12px;align-items:stretch;}
.period-picker-presets{display:grid;gap:6px;grid-template-columns:1fr;align-content:start;padding-right:2px;}
.period-picker-preset{
  position:relative;
  min-height:36px;
  padding:0 11px;
  border-radius:11px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.03);
  color:var(--text);
  font-size:12px;
  font-weight:800;
  text-align:left;
  cursor:pointer;
  transition:border-color .18s ease, background .18s ease, box-shadow .18s ease, color .18s ease, transform .18s ease;
}
.period-picker-preset::before{display:none;content:none;}
.period-picker-preset:hover{border-color:rgba(109,40,217,.22);transform:translateY(-1px);}
.period-picker-preset.is-active{
  border-color:rgba(37,99,235,.26);
  background:rgba(59,130,246,.12);
  color:var(--text);
  box-shadow:inset 0 0 0 1px rgba(59,130,246,.08);
}
body[data-theme="light"] .period-picker-preset{background:#fff;}
body[data-theme="light"] .period-picker-preset.is-active{background:#edf4ff;border-color:#bfdbfe;}
.period-picker-calendar-panel{border:1px solid var(--line);border-radius:16px;padding:12px;background:rgba(255,255,255,.02);}
body[data-theme="light"] .period-picker-calendar-panel{background:#fbfcff;}
.period-picker-calendar-topbar{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px;}
.period-picker-range-meta{min-width:0;display:grid;gap:3px;justify-items:center;text-align:center;}
.period-picker-range-label{font-size:10px;font-weight:800;letter-spacing:.02em;text-transform:uppercase;color:var(--muted);}
.period-picker-range-value{font-size:13px;font-weight:800;color:var(--text);}
.period-picker-nav-btn{width:30px;height:30px;border-radius:9px;border:1px solid var(--line);background:transparent;color:var(--text);font-size:18px;line-height:1;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;transition:border-color .18s ease, background .18s ease, transform .18s ease;}
.period-picker-nav-btn:hover{border-color:rgba(109,40,217,.22);background:rgba(109,40,217,.06);transform:translateY(-1px);}
.period-picker-nav-btn:disabled{opacity:.45;cursor:not-allowed;transform:none;}
.period-picker-calendars{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
.period-picker-month{min-width:0;}
.period-picker-month-head{display:flex;align-items:center;justify-content:center;margin-bottom:7px;font-size:13px;font-weight:900;color:var(--text);}
.period-picker-weekdays,.period-picker-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:1px;}
.period-picker-weekday{height:22px;display:flex;align-items:center;justify-content:center;font-size:10px;font-weight:800;color:var(--muted);text-transform:uppercase;}
.period-picker-day-spacer{height:34px;}
.period-picker-day{
  position:relative;
  height:34px;
  border-radius:9px;
  border:1px solid transparent;
  background:transparent;
  color:var(--text);
  font-size:13px;
  font-weight:700;
  cursor:pointer;
  user-select:none;
  transition:background .16s ease, color .16s ease, border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.period-picker-day:hover{border-color:rgba(37,99,235,.16);background:rgba(59,130,246,.06);transform:translateY(-1px);}
.period-picker-day.is-today{border-color:rgba(59,130,246,.24);}
.period-picker-day.is-disabled{opacity:.35;cursor:not-allowed;pointer-events:none;}
.period-picker-calendars.is-dragging .period-picker-day:not(.is-disabled){cursor:grabbing;}
.period-picker-day.is-in-range{background:rgba(96,165,250,.14);border-radius:0;}
.period-picker-day.is-range-middle{border-radius:8px;}
.period-picker-day.is-start{border-radius:10px 6px 6px 10px;}
.period-picker-day.is-end{border-radius:6px 10px 10px 6px;}
.period-picker-day.is-start.is-end{border-radius:10px;}
.period-picker-day.is-start,.period-picker-day.is-end{background:#1d4ed8;color:#fff;border-color:#1d4ed8;box-shadow:0 6px 14px rgba(29,78,216,.20);z-index:1;}
body[data-theme="light"] .period-picker-day.is-in-range{background:#dbeafe;}
body[data-theme="light"] .period-picker-day.is-start,
body[data-theme="light"] .period-picker-day.is-end{background:#1d4ed8;color:#fff;border-color:#1d4ed8;}
.period-picker-selected-row{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:8px;align-items:center;margin-top:12px;}
.period-picker-selected-box{min-height:48px;border:1px solid var(--line);border-radius:12px;padding:9px 11px;background:rgba(255,255,255,.03);}
body[data-theme="light"] .period-picker-selected-box{background:#fff;}
.period-picker-selected-label{font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.02em;color:var(--muted);margin-bottom:3px;}
.period-picker-selected-value{font-size:13px;font-weight:800;color:var(--text);line-height:1.25;}
.period-picker-selected-sep{font-size:18px;font-weight:900;color:var(--muted);}
.period-picker-timezone{margin-top:8px;font-size:11px;color:var(--muted);}
.period-picker-tip{margin-top:8px;font-size:11px;color:var(--muted);}
.period-picker-compare{margin-top:12px;border:1px solid var(--line);border-radius:14px;padding:10px;background:rgba(255,255,255,.03);}
body[data-theme="light"] .period-picker-compare{background:#fff;}
.period-picker-compare-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px;}
.period-picker-compare-title{font-size:12px;font-weight:900;color:var(--text);}
.period-picker-compare-badge{font-size:10px;font-weight:800;color:var(--muted);padding:4px 7px;border-radius:999px;background:rgba(148,163,184,.12);}
.period-picker-compare-row{display:flex;align-items:center;justify-content:space-between;gap:10px;}
.period-picker-compare-select.hidden{display:none!important;}
.period-picker-compare-select{margin-top:8px;}
.period-picker-fields{display:none !important;}
.period-picker-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:12px;}
.controls-hidden-inputs{display:none !important;}
@media (max-width:1100px){
  .report-hero-copy{padding-right:120px;}
}
@media (max-width:900px){
  .report-hero{padding:18px 18px;margin-bottom:14px;}
  .report-hero-title{font-size:22px;}
  .report-hero-meta{font-size:12px;margin-top:8px;}
  .report-hero-copy{padding-right:0;}
  .report-hero-side{position:static;width:100%;}
  .report-hero-side-grid{grid-template-columns:1fr;justify-items:start;}
  .report-hero-export-label{text-align:left;}
  .period-card{padding:14px;}
  .period-quick-switch{border-radius:18px;padding:8px;}
  .period-quick-btn,.period-picker-open-btn{width:100%;justify-content:center;font-size:14px;min-height:40px;padding:0 14px;}
  .period-picker-open-btn{margin-left:0;}
  .period-picker-popover{position:static;width:100%;margin-top:12px;}
  .period-picker-grid{grid-template-columns:1fr;}
  .period-picker-calendars{grid-template-columns:1fr;}
  .period-picker-selected-row{grid-template-columns:1fr;}
  .period-picker-selected-sep{display:none;}
}
.report-hero-account{margin-top:14px;max-width:420px}
.report-hero-account .label{margin-bottom:6px}
.period-section-head{margin-bottom:8px;}
.period-card-has-compare .period-picker-popover{width:min(100%, 780px);}

.admin-check-wrap{display:inline-flex;align-items:center;gap:8px;justify-content:center;font-size:13px;color:var(--muted);}
.admin-check-wrap input{width:16px;height:16px;}

.crm-tag-board-card{margin-top:18px;padding:16px 16px 14px;overflow:hidden}
.crm-tag-board-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:10px}
.crm-tag-board-title{font-size:16px;margin-bottom:4px}
.crm-tag-board-head-sub{max-width:760px;line-height:1.45}
.crm-tag-scroll-hint{display:inline-flex;align-items:center;gap:6px;padding:8px 10px;border:1px dashed var(--line);border-radius:999px;white-space:nowrap;background:rgba(109,40,217,.04)}
.crm-tag-board-meta{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px}
.crm-tag-meta-chip{display:inline-flex;align-items:center;gap:8px;padding:8px 10px;border-radius:999px;border:1px solid var(--line);background:rgba(109,40,217,.04);font-size:12px;line-height:1.2}
.crm-tag-meta-chip-label{color:var(--muted);font-weight:700}
.crm-tag-meta-chip-value{font-weight:900;color:var(--text)}
.crm-tag-board-wrap{display:block}
.crm-tag-board-scroll{overflow-x:auto;overflow-y:hidden;padding:2px 0 8px;overscroll-behavior-x:contain;scrollbar-width:thin;scroll-snap-type:x proximity}
.crm-tag-board-scroll::-webkit-scrollbar{height:10px}
.crm-tag-board-scroll::-webkit-scrollbar-thumb{background:rgba(100,116,139,.35);border-radius:999px}
.crm-tag-board-scroll::-webkit-scrollbar-track{background:rgba(100,116,139,.10);border-radius:999px}
.crm-tag-board-grid{display:grid;grid-auto-flow:column;grid-auto-columns:max-content;gap:12px;align-items:start}
.crm-tag-matrix{border:1px solid var(--line);border-radius:18px;background:var(--panel-bg,#fff);overflow:hidden;width:min(620px,calc(100vw - 64px));box-shadow:0 10px 28px rgba(15,23,42,.06);scroll-snap-align:start}
body[data-theme="dark"] .crm-tag-matrix{box-shadow:none}
.crm-tag-matrix.is-compact{width:min(430px,calc(100vw - 64px))}
.crm-tag-matrix.is-summary{position:sticky;left:0;z-index:3}
.crm-tag-matrix-title{padding:13px 14px;border-bottom:1px solid var(--line);font-weight:800;font-size:14px;background:linear-gradient(180deg,rgba(109,40,217,.07),rgba(109,40,217,.03))}
.crm-tag-matrix-table-wrap{max-height:min(66vh,620px);overflow:auto}
.crm-tag-matrix-table-wrap::-webkit-scrollbar{width:9px;height:9px}
.crm-tag-matrix-table-wrap::-webkit-scrollbar-thumb{background:rgba(100,116,139,.28);border-radius:999px}
.crm-tag-matrix table{width:100%;border-collapse:separate;border-spacing:0;table-layout:fixed}
.crm-tag-matrix col.col-tag{width:98px}.crm-tag-matrix col.col-sales{width:86px}.crm-tag-matrix col.col-status{width:168px}.crm-tag-matrix col.col-count{width:94px}
.crm-tag-matrix th,.crm-tag-matrix td{border-bottom:1px solid var(--line);border-right:1px solid var(--line);padding:8px 9px;font-size:12px;vertical-align:middle}
.crm-tag-matrix th:last-child,.crm-tag-matrix td:last-child{border-right:none}
.crm-tag-matrix th{position:sticky;top:0;z-index:2;background:rgba(109,40,217,.06);font-weight:800;text-align:left;line-height:1.25;white-space:normal}
.crm-tag-matrix td{background:transparent;line-height:1.35}
.crm-tag-matrix tr:hover td{background:rgba(109,40,217,.03)}
.crm-tag-matrix-tag{font-weight:900;font-size:17px;text-align:center;letter-spacing:.01em}
.crm-tag-matrix-sales{font-weight:900;font-size:22px;text-align:center;background:rgba(34,197,94,.12)}
.crm-tag-matrix-status{word-break:break-word;color:var(--text)}
.crm-tag-matrix-count{font-weight:800;text-align:center}
.crm-tag-matrix-count.is-quality{background:rgba(245,158,11,.12)}
.crm-tag-matrix-count.is-bad{background:rgba(239,68,68,.12)}
.crm-tag-matrix tr.is-total td{font-weight:900;background:rgba(109,40,217,.08)}
.crm-tag-matrix tr.is-total-pct td{font-weight:900;background:rgba(109,40,217,.04)}
.crm-tag-board-sub{margin-top:10px;line-height:1.5}
@media (max-width: 1100px){
  .crm-tag-board-card{padding:14px 14px 12px}
  .crm-tag-matrix{width:min(560px,calc(100vw - 46px))}
  .crm-tag-matrix.is-compact{width:min(390px,calc(100vw - 46px))}
}
@media (max-width: 900px){
  .crm-tag-board-head{align-items:flex-start}
  .crm-tag-scroll-hint{width:100%;justify-content:center}
  .crm-tag-board-meta{gap:6px}
  .crm-tag-meta-chip{font-size:11px;padding:7px 9px}
  .crm-tag-matrix{width:min(92vw,520px)}
  .crm-tag-matrix.is-compact{width:min(88vw,360px)}
  .crm-tag-matrix.is-summary{position:relative;left:auto}
  .crm-tag-matrix-table-wrap{max-height:none}
  .crm-tag-matrix col.col-tag{width:84px}.crm-tag-matrix col.col-sales{width:74px}.crm-tag-matrix col.col-status{width:138px}.crm-tag-matrix col.col-count{width:82px}
  .crm-tag-matrix th,.crm-tag-matrix td{padding:7px 8px;font-size:11px}
  .crm-tag-matrix-tag{font-size:15px}
  .crm-tag-matrix-sales{font-size:18px}
}


/* fix-70: spacing and picker UX */
.section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:0 0 12px;}
.section-title{line-height:1.2;}
.card,.audience-card,.smm-audience-card,.smm-format-card,.setting-card,.user-form,.user-list-card,.channel-category,.channel-report-row{box-sizing:border-box;min-width:0;}
.audience-grid,.smm-audience-grid,.smm-formats-grid,.smm-two-col,.script-logs-grid,.report-settings-grid,.db-status-grid,.user-layout,.channel-grid{align-items:start;}
.period-picker-selected-box-btn{appearance:none;-webkit-appearance:none;text-align:left;cursor:pointer;width:100%;font:inherit;color:inherit;}
.period-picker-selected-box.is-active{border-color:rgba(109,40,217,.42);box-shadow:0 0 0 1px rgba(109,40,217,.16) inset;background:rgba(109,40,217,.05);}
body[data-theme="light"] .period-picker-selected-box.is-active{background:#f5f3ff;}
.report-hero,.period-card,.daily-cut-card,.crm-funnel-card,.card{overflow:hidden;}


/* fix-71: period picker visibility */
.period-card{overflow:visible;}
.period-picker-popover{z-index:1200;}

/* fix87 skeleton without shimmer */
.loading-skeleton-line::after,
.loading-skeleton-circle::after,
.loading-skeleton-bar::after,
.loading-skeleton-pill::after,
.loading-skeleton-card::after,
.loading-skeleton-chart::after,
.loading-skeleton-table-row::after,
.loading-skeleton-donut::after,
.loading-skeleton-ad-card .loading-skeleton-mini-stats span::after,
.card.kpi.is-loading .k::after,
.card.kpi.is-loading .v::after,
.card.kpi.is-loading .s::after{
  display:none!important;
  animation:none!important;
}


.report-block-settings-head{display:flex;gap:12px;align-items:end;flex-wrap:wrap;margin-bottom:14px}
.report-block-project-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px}
.report-block-project-card{padding:14px;border:1px solid var(--line);border-radius:16px;background:rgba(255,255,255,.03)}
body[data-theme="light"] .report-block-project-card{background:#fff}
.report-block-project-title{font-size:14px;font-weight:900;margin-bottom:10px}
.report-block-toggle-list{display:grid;gap:10px}
.report-block-toggle-row{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:13px}
.monthly-report-card{margin-top:14px;padding:16px;margin-bottom:14px;overflow:hidden}
.monthly-report-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:12px}
.monthly-report-wrap{overflow-x:auto;border-radius:16px;border:1px solid var(--line);background:rgba(255,255,255,.02)}
body[data-theme="light"] .monthly-report-wrap{background:rgba(15,23,42,.02)}
.monthly-report-table{border-collapse:separate;border-spacing:0;min-width:1080px;width:max-content}
.monthly-report-table th,.monthly-report-table td{padding:9px 10px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);vertical-align:middle;font-variant-numeric:tabular-nums;background:rgba(255,255,255,.02);font-size:12px;line-height:1.35}
body[data-theme="light"] .monthly-report-table th,body[data-theme="light"] .monthly-report-table td{background:rgba(15,23,42,.02)}
.monthly-report-table thead th{background:#eef2ff;color:#334155;font-weight:800}
body[data-theme="dark"] .monthly-report-table thead th{background:#101832;color:#d6ddff}
.monthly-report-table .monthly-summary-label,.monthly-report-table .monthly-metric-label{font-weight:800;white-space:nowrap}
.monthly-report-table .monthly-summary-label{font-size:12px}
.monthly-report-table .monthly-summary-row .monthly-value-cell,.monthly-report-table .monthly-summary-value{text-align:right;padding-right:16px}
.monthly-report-table .monthly-col-head{text-align:center;min-width:132px;font-size:12px}
.monthly-report-table .monthly-main-divider td,.monthly-report-table .monthly-main-divider th{background:#1f2937;border-color:#111827;height:10px;padding:0}
.monthly-report-table .monthly-campaign-cell,.monthly-report-table .monthly-adset-cell,.monthly-report-table .monthly-result-cell{font-weight:800;min-width:210px;font-size:11px;line-height:1.45}
.monthly-report-table .monthly-adset-cell{font-weight:700;min-width:190px}
.monthly-report-table .monthly-result-cell{font-weight:700;min-width:150px}
.monthly-report-table .monthly-metric-label{min-width:180px;font-size:11px;color:var(--muted)}
.monthly-report-table .monthly-value-cell{text-align:center;min-width:132px}
.monthly-report-table tr.monthly-campaign-tone-a td{background:rgba(15,23,42,.02)}
.monthly-report-table tr.monthly-campaign-tone-b td{background:#fff}
body[data-theme="dark"] .monthly-report-table tr.monthly-campaign-tone-a td{background:rgba(255,255,255,.03)}
body[data-theme="dark"] .monthly-report-table tr.monthly-campaign-tone-b td{background:rgba(255,255,255,.01)}
.monthly-report-table td.monthly-campaign-tone-a{background:rgba(15,23,42,.02)}
.monthly-report-table td.monthly-campaign-tone-b{background:#fff}
body[data-theme="dark"] .monthly-report-table td.monthly-campaign-tone-a{background:rgba(255,255,255,.03)}
body[data-theme="dark"] .monthly-report-table td.monthly-campaign-tone-b{background:rgba(255,255,255,.01)}
.monthly-report-table tr.monthly-campaign-tone-a:hover td,.monthly-report-table tr.monthly-campaign-tone-b:hover td{filter:brightness(.985)}
body[data-theme="dark"] .monthly-report-table tr.monthly-campaign-tone-a:hover td,body[data-theme="dark"] .monthly-report-table tr.monthly-campaign-tone-b:hover td{filter:brightness(1.06)}

.monthly-empty{padding:14px;text-align:center;color:var(--muted)}
@media (max-width: 1280px){.monthly-report-head{align-items:stretch}.monthly-report-table{min-width:960px}.monthly-report-table .monthly-campaign-cell,.monthly-report-table .monthly-adset-cell,.monthly-report-table .monthly-result-cell{min-width:170px}.monthly-report-table .monthly-metric-label{min-width:160px}}
@media (max-width: 900px){.monthly-report-card{padding:14px}.monthly-report-head{gap:10px}.monthly-report-table{min-width:880px}.monthly-report-table th,.monthly-report-table td{padding:8px 9px;font-size:11px}.monthly-report-table .monthly-col-head{min-width:112px;font-size:11px}}

/* fix-124: sidebar dashboard link and logo toggle */
.app-sidebar-brand{border:0;background:transparent;color:inherit;cursor:pointer;text-align:left}
.app-sidebar-brand:focus-visible{outline:2px solid rgba(109,40,217,.32);outline-offset:2px;border-radius:12px}
.app-sidebar-collapse.app-sidebar-dashboard-link{text-decoration:none}
.app-sidebar-collapse.app-sidebar-dashboard-link.active{border-color:rgba(109,40,217,.28);background:rgba(109,40,217,.10)}
body[data-theme="light"] .app-sidebar-collapse.app-sidebar-dashboard-link.active{background:rgba(109,40,217,.10)}
.app-sidebar.collapsed .app-sidebar-brand{justify-content:center}

/* ecosyst-054: mobile client report foundation */
.app-mobile-sidebar-overlay,
.app-mobile-bottom-nav,
.app-sidebar-mobile-close{display:none}
@media (max-width:760px){
  html{scroll-behavior:smooth}
  body[data-app-page]{--mobile-bottom-nav-h:72px;--sidebar-w:min(360px,calc(100vw - 24px));padding-left:0!important;padding-right:0!important;padding-bottom:calc(var(--mobile-bottom-nav-h) + env(safe-area-inset-bottom,0px) + 10px);overflow-x:hidden;}
  body.with-sidebar,body.with-sidebar.sidebar-collapsed{padding-left:0!important;}
  .wrap{width:100%!important;max-width:100%!important;margin:0!important;padding:12px 12px calc(var(--mobile-bottom-nav-h) + env(safe-area-inset-bottom,0px) + 16px)!important;}
  .card{border-radius:20px;box-shadow:0 10px 26px rgba(15,23,42,.08)}
  .app-sidebar{left:12px!important;top:12px!important;bottom:calc(var(--mobile-bottom-nav-h) + env(safe-area-inset-bottom,0px) + 14px)!important;width:var(--sidebar-w)!important;max-width:var(--sidebar-w)!important;border-radius:24px!important;padding:14px 12px!important;transform:translateX(calc(-100% - 22px));opacity:0;pointer-events:none;z-index:190;transition:transform .22s ease,opacity .18s ease;overflow:hidden;}
  body.mobile-sidebar-open .app-sidebar{transform:translateX(0);opacity:1;pointer-events:auto;}
  .app-sidebar-mobile-close{position:absolute;right:12px;top:12px;width:36px;height:36px;border-radius:14px;border:1px solid var(--line);background:rgba(255,255,255,.88);color:var(--text);box-shadow:0 10px 22px rgba(15,23,42,.10);display:flex;align-items:center;justify-content:center;font-size:22px;font-weight:900;line-height:1;cursor:pointer;z-index:3;}
  body[data-theme="dark"] .app-sidebar-mobile-close{background:rgba(15,23,42,.82);box-shadow:0 10px 22px rgba(0,0,0,.24);}
  .app-sidebar-mobile-close span{display:block;transform:translateY(-1px);}
  .app-sidebar-top{padding-right:42px;}
  .app-mobile-sidebar-overlay{position:fixed;inset:0;background:rgba(15,23,42,.42);backdrop-filter:blur(6px);z-index:180;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .18s ease,visibility .18s ease;display:block;}
  body.mobile-sidebar-open .app-mobile-sidebar-overlay{opacity:1;visibility:visible;pointer-events:auto;}
  .app-sidebar.collapsed .app-sidebar-text,
  .app-sidebar.collapsed .app-sidebar-section-title,
  .app-sidebar.collapsed .app-sidebar-user-meta,
  .app-sidebar.collapsed .app-sidebar-user-accounts,
  .app-sidebar.collapsed .app-sidebar-link-sub,
  .app-sidebar.collapsed .app-sidebar-btn-inline .app-sidebar-text,
  .app-sidebar.collapsed .app-sidebar-theme-row,
  .app-sidebar.collapsed .app-sidebar-user-name{display:initial!important;}
  .app-sidebar.collapsed .app-sidebar-logo-full{display:block!important;height:34px;}
  .app-sidebar.collapsed .app-sidebar-logo-crop{display:none!important;}
  .app-sidebar.collapsed .app-sidebar-brand{justify-content:flex-start!important;padding:0 8px!important;}
  .app-sidebar.collapsed .app-sidebar-link,
  .app-sidebar.collapsed .app-sidebar-placeholder,
  .app-sidebar.collapsed .app-sidebar-collapse,
  .app-sidebar.collapsed .app-sidebar-btn-inline{justify-content:flex-start!important;padding:10px 12px!important;min-height:46px;}
  .app-sidebar.collapsed .app-sidebar-item-main{justify-content:flex-start!important;gap:9px!important;}
  .app-sidebar.collapsed .app-sidebar-user{padding:10px!important;border:1px solid var(--line)!important;background:rgba(255,255,255,.03)!important;justify-items:stretch!important;}
  body[data-theme="light"] .app-sidebar.collapsed .app-sidebar-user{background:rgba(15,23,42,.02)!important;}
  .app-sidebar.collapsed .app-sidebar-user-role{justify-content:flex-start!important;padding:0 10px!important;}
  .app-sidebar.collapsed .app-sidebar-section-sep{display:none!important;}
  .app-mobile-bottom-nav{position:fixed;left:10px;right:10px;bottom:calc(10px + env(safe-area-inset-bottom,0px));height:62px;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;align-items:center;padding:6px;border-radius:22px;border:1px solid var(--line);background:rgba(255,255,255,.92);box-shadow:0 18px 42px rgba(15,23,42,.16);backdrop-filter:blur(18px);z-index:170;}
  body[data-theme="dark"] .app-mobile-bottom-nav{background:rgba(15,23,42,.92);box-shadow:0 18px 42px rgba(0,0,0,.28);}
  .app-mobile-nav-item{appearance:none;-webkit-appearance:none;border:0;background:transparent;text-decoration:none;color:var(--muted);height:50px;min-width:0;border-radius:16px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font:inherit;font-weight:900;font-size:10px;line-height:1;cursor:pointer;}
  .app-mobile-nav-item img{width:20px;height:20px;object-fit:contain;filter:none;opacity:.78;}
  body[data-theme="dark"] .app-mobile-nav-item img:not(.is-brand){filter:brightness(0) invert(1);opacity:.78;}
  .app-mobile-nav-item.active{background:rgba(109,40,217,.12);color:#6d28d9;}
  .app-mobile-nav-item.active img{opacity:1;}
  .app-mobile-nav-item.is-disabled{opacity:.45;pointer-events:none;}
  .toast-root{left:12px;right:12px;bottom:calc(var(--mobile-bottom-nav-h) + env(safe-area-inset-bottom,0px) + 14px);max-width:none;}
  .btn,.ds-btn{min-height:44px;padding:0 14px;border-radius:14px;}
  .input,.select{height:44px;border-radius:14px;}
  .kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
  .kpi{padding:12px;grid-template-columns:1fr;grid-template-areas:'label' 'value' 'sub';min-height:96px;}
  .kpi .v{font-size:22px;}
  .section-head{align-items:flex-start;gap:10px;}
  .section-title{font-size:17px;line-height:1.2;}
  .chart-wrap{height:260px;}
  .period-card{padding:14px!important;border-radius:20px;}
  .period-toolbar{display:grid;gap:12px;}
  .period-quick-switch{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:8px;border-radius:18px;}
  .period-quick-btn,.period-picker-open-btn{width:100%;min-height:44px;justify-content:center;white-space:nowrap;}
  .period-picker-open-btn{margin-left:0;}
  .period-picker-popover{position:fixed!important;left:10px!important;right:10px!important;bottom:calc(var(--mobile-bottom-nav-h) + env(safe-area-inset-bottom,0px) + 12px)!important;top:auto!important;width:auto!important;max-height:calc(100dvh - var(--mobile-bottom-nav-h) - 36px);overflow:auto;margin:0!important;z-index:210!important;}
  .period-picker-card{border-radius:22px;padding:14px;}
  .period-picker-grid{grid-template-columns:1fr!important;}
  .period-picker-presets{grid-template-columns:repeat(2,minmax(0,1fr));}
  .period-picker-calendars{grid-template-columns:1fr!important;}
  .period-picker-selected-row{grid-template-columns:1fr!important;}
  .period-picker-selected-sep{display:none!important;}
  .period-picker-actions{display:grid;grid-template-columns:1fr 1fr;}
  .daily-cut-table,.admin-table,table.report{font-size:12px;}
}

@media (max-width:480px){
  body[data-app-page]{--mobile-bottom-nav-h:70px;}
  .wrap{padding-left:10px!important;padding-right:10px!important;}
  .kpis{grid-template-columns:1fr;}
  .period-quick-switch{grid-template-columns:1fr 1fr;}
  .period-quick-btn,.period-picker-open-btn{font-size:13px;padding:0 8px;}
  .app-mobile-nav-item span{font-size:9px;}
}


/* ecosyst-056: mobile Ads report drill-down */
.ads-manager-mobile{display:none}
@media (max-width:760px){
  .ads-manager-card{padding:14px!important;border-radius:22px!important;}
  .ads-manager-card>.section-head{margin-bottom:10px!important;}
  .ads-manager-toolbar{display:grid!important;gap:10px!important;}
  .ads-manager-levels{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important;padding:6px!important;border-radius:18px!important;}
  .ads-manager-level-btn{min-height:40px!important;padding:0 8px!important;border-radius:14px!important;font-size:11px!important;line-height:1.1!important;white-space:normal!important;}
  .ads-manager-meta{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;}
  .ads-manager-reset{min-height:38px!important;font-size:12px!important;padding:0 10px!important;border-radius:12px!important;}
  .ads-manager-table-wrap{display:none!important;}
  .ads-manager-mobile{display:block;margin-top:12px;}
  .ads-manager-mobile-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:10px;padding:12px;border:1px solid var(--line);border-radius:18px;background:rgba(109,40,217,.055);}
  body[data-theme="dark"] .ads-manager-mobile-head{background:rgba(139,92,246,.12);}
  .ads-manager-mobile-eyebrow{font-size:10px;font-weight:950;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);margin-bottom:3px;}
  .ads-manager-mobile-heading{font-size:18px;font-weight:950;line-height:1.12;}
  .ads-manager-mobile-crumbs{display:flex;align-items:center;flex-wrap:wrap;gap:4px;margin-top:6px;font-size:11px;color:var(--muted);font-weight:850;}
  .ads-manager-mobile-crumb.active{color:#6d28d9;}
  body[data-theme="dark"] .ads-manager-mobile-crumb.active{color:#c4b5fd;}
  .ads-manager-mobile-crumb-sep{opacity:.55;}
  .ads-manager-mobile-back{appearance:none;border:1px solid var(--line);background:var(--card);color:var(--text);border-radius:14px;min-height:38px;padding:0 12px;font-weight:900;font-size:12px;white-space:nowrap;}
  .ads-manager-mobile-list{display:grid;gap:10px;}
  .ads-manager-mobile-card{border:1px solid var(--line);background:var(--card);border-radius:20px;padding:12px;box-shadow:0 8px 22px rgba(15,23,42,.07);}
  .ads-manager-mobile-card-top{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:flex-start;gap:10px;}
  .ads-manager-mobile-preview .creative-thumb-mini,.ads-manager-mobile-preview .creative-thumb{width:54px!important;height:54px!important;border-radius:14px!important;}
  .ads-manager-mobile-title{font-size:14px;font-weight:950;line-height:1.22;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
  .ads-manager-mobile-sub{margin-top:4px;color:var(--muted);font-size:11px;font-weight:750;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
  .ads-manager-mobile-card .ads-manager-status-badge{height:26px;min-width:48px;justify-content:center;font-size:10px;}
  .ads-manager-mobile-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:12px;}
  .ads-manager-mobile-metric{border:1px solid rgba(148,163,184,.20);border-radius:14px;padding:9px 10px;background:rgba(148,163,184,.055);min-width:0;}
  body[data-theme="light"] .ads-manager-mobile-metric{background:#f8fafc;}
  .ads-manager-mobile-metric span{display:block;color:var(--muted);font-size:10px;font-weight:950;letter-spacing:.035em;text-transform:uppercase;line-height:1.15;margin-bottom:3px;}
  .ads-manager-mobile-metric b{display:block;font-size:15px;font-weight:950;line-height:1.1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  .ads-manager-mobile-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px;}
  .ads-manager-mobile-action,.ads-manager-mobile-link{appearance:none;border-radius:14px;min-height:42px;padding:0 10px;font-weight:950;font-size:12px;cursor:pointer;}
  .ads-manager-mobile-action{border:1px solid rgba(109,40,217,.28);background:#6d28d9;color:#fff;}
  .ads-manager-mobile-link{border:1px solid var(--line);background:transparent;color:var(--text);}
  .ads-manager-mobile-empty{border:1px dashed var(--line);border-radius:18px;padding:16px;text-align:center;color:var(--muted);font-weight:800;}
  .modal.mobile-bottom-sheet{width:auto!important;max-width:none!important;left:10px;right:10px;bottom:calc(10px + env(safe-area-inset-bottom,0px));top:auto;position:fixed;border-radius:24px 24px 20px 20px;max-height:calc(100dvh - 28px);overflow:auto;}
  .modal.mobile-bottom-sheet .modal-head{position:sticky;top:0;background:var(--card);z-index:2;border-radius:24px 24px 0 0;}
  .ads-manager-mobile-detail{display:grid;gap:12px;}
  .ads-manager-mobile-detail-preview .creative-thumb{width:100%!important;max-height:240px!important;min-height:160px!important;border-radius:18px!important;}
  .ads-manager-mobile-detail-section{border:1px solid var(--line);border-radius:18px;padding:12px;background:rgba(148,163,184,.045);}
  body[data-theme="light"] .ads-manager-mobile-detail-section{background:#f8fafc;}
  .ads-manager-mobile-detail-title{font-size:12px;font-weight:950;color:var(--muted);letter-spacing:.055em;text-transform:uppercase;margin-bottom:10px;}
  .ads-manager-mobile-detail-grid,.ads-manager-mobile-detail-metrics{display:grid;gap:8px;}
  .ads-manager-mobile-detail-grid>div,.ads-manager-mobile-detail-metric{display:grid;grid-template-columns:minmax(92px,.45fr) minmax(0,1fr);gap:10px;align-items:start;padding:9px 0;border-bottom:1px solid rgba(148,163,184,.18);}
  .ads-manager-mobile-detail-grid>div:last-child,.ads-manager-mobile-detail-metric:last-child{border-bottom:0;}
  .ads-manager-mobile-detail-grid span,.ads-manager-mobile-detail-metric span{color:var(--muted);font-size:11px;font-weight:900;}
  .ads-manager-mobile-detail-grid b,.ads-manager-mobile-detail-metric b{font-size:13px;font-weight:950;line-height:1.28;min-width:0;overflow-wrap:anywhere;}
}


/* ecosyst-057: mobile charts, graph controls and touch-friendly analytics */
.mobile-chart-panel{display:none}
@media (max-width:760px){
  .chart-card{padding:14px!important;border-radius:22px!important;}
  .chart-card .section-head{margin-bottom:10px!important;}
  .chart-wrap{height:300px!important;border:1px solid rgba(148,163,184,.18);border-radius:18px;padding:10px;background:rgba(148,163,184,.04);}
  body[data-theme="light"] .chart-wrap{background:#f8fafc;}
  .mobile-chart-panel{display:grid;gap:10px;margin:4px 0 12px;}
  .mobile-chart-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;}
  .mobile-chart-tab{appearance:none;border:1px solid var(--line);background:var(--card);color:var(--muted);border-radius:13px;min-height:38px;padding:0 8px;font-size:11px;font-weight:950;line-height:1.1;cursor:pointer;}
  .mobile-chart-tab.active{background:linear-gradient(135deg,#7c3aed,#5b21b6);border-color:transparent;color:#fff;box-shadow:0 10px 22px rgba(109,40,217,.18);}
  .mobile-chart-summary{display:grid;grid-template-columns:1fr 1fr;gap:8px;}
  .mobile-chart-summary>div{border:1px solid rgba(148,163,184,.20);border-radius:15px;background:rgba(255,255,255,.56);padding:10px 11px;min-width:0;}
  body[data-theme="dark"] .mobile-chart-summary>div{background:rgba(255,255,255,.045);}
  .mobile-chart-summary span{display:block;color:var(--muted);font-size:10px;font-weight:950;letter-spacing:.045em;text-transform:uppercase;margin-bottom:4px;}
  .mobile-chart-summary b{display:block;color:var(--text);font-size:14px;font-weight:950;line-height:1.18;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  .daily-cut-scroll{overflow:visible!important;}
  .daily-cut-table{min-width:0!important;width:100%!important;}
  .daily-cut-table th,.daily-cut-table td{white-space:normal!important;padding:8px 6px!important;font-size:11px!important;}
  .daily-cut-table th:nth-child(n+5),.daily-cut-table td:nth-child(n+5){display:none!important;}
  .daily-cut-insights{grid-template-columns:1fr!important;gap:8px!important;}
  .insight-ad-sections-grid,.insight-campaign-grid,.insight-ad-grid{grid-template-columns:1fr!important;}
}
@media (max-width:420px){
  .mobile-chart-tabs{grid-template-columns:repeat(2,minmax(0,1fr));}
  .mobile-chart-summary{grid-template-columns:1fr;}
  .chart-wrap{height:280px!important;}
}

/* ecosyst-058: mobile CRM and CRM tag board polish */
.crm-mobile-app-card{display:none}
.crm-tag-mobile-board{display:none}
@media (max-width:820px){
  .crm-mobile-app-card{display:block;border:1px solid var(--line);border-radius:22px;background:var(--card);box-shadow:0 10px 26px rgba(15,23,42,.08);padding:14px;margin:12px 0;}
  .crm-mobile-app-card.hidden{display:none!important;}
  .crm-mobile-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px;}
  .crm-mobile-eyebrow{font-size:10px;font-weight:950;letter-spacing:.08em;text-transform:uppercase;color:#6d28d9;margin-bottom:3px;}
  body[data-theme="dark"] .crm-mobile-eyebrow{color:#c4b5fd;}
  .crm-mobile-title{font-size:18px;line-height:1.1;font-weight:950;color:var(--text);}
  .crm-mobile-status{display:inline-flex;align-items:center;justify-content:center;min-height:28px;padding:0 10px;border-radius:999px;font-size:11px;font-weight:950;white-space:nowrap;background:rgba(245,158,11,.12);color:#b45309;}
  .crm-mobile-status.is-ok{background:rgba(16,185,129,.12);color:#047857;}
  body[data-theme="dark"] .crm-mobile-status.is-ok{color:#6ee7b7;background:rgba(16,185,129,.18);}
  body[data-theme="dark"] .crm-mobile-status.is-warn{color:#fde68a;background:rgba(245,158,11,.18);}
  .crm-mobile-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:12px;}
  .crm-mobile-metrics>div{border:1px solid rgba(148,163,184,.22);border-radius:16px;padding:10px;background:rgba(148,163,184,.055);min-width:0;}
  body[data-theme="light"] .crm-mobile-metrics>div{background:#f8fafc;}
  .crm-mobile-metrics span{display:block;font-size:10px;font-weight:900;color:var(--muted);text-transform:uppercase;letter-spacing:.04em;margin-bottom:5px;}
  .crm-mobile-metrics b{display:block;font-size:17px;font-weight:950;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .crm-mobile-funnel{display:grid;gap:8px;}
  .crm-mobile-funnel-step{display:flex;align-items:center;justify-content:space-between;gap:10px;border:1px solid rgba(124,58,237,.16);border-radius:16px;padding:10px 11px;background:linear-gradient(180deg,rgba(124,58,237,.055),rgba(124,58,237,.016));}
  body[data-theme="light"] .crm-mobile-funnel-step{background:linear-gradient(180deg,#fcfaff,#fff);}
  .crm-mobile-funnel-copy{min-width:0;}
  .crm-mobile-funnel-copy b{display:block;font-size:13px;font-weight:950;color:var(--text);line-height:1.2;}
  .crm-mobile-funnel-copy span{display:block;font-size:11px;font-weight:750;color:var(--muted);line-height:1.25;margin-top:2px;}
  .crm-mobile-funnel-value{text-align:right;flex:0 0 auto;}
  .crm-mobile-funnel-value strong{display:block;font-size:21px;font-weight:950;color:var(--text);line-height:1;}
  .crm-mobile-funnel-value em{display:block;font-style:normal;font-size:10px;font-weight:950;color:#6d28d9;margin-top:3px;}
  body[data-theme="dark"] .crm-mobile-funnel-value em{color:#c4b5fd;}
  .crm-mobile-note{margin-top:10px;border:1px dashed rgba(148,163,184,.34);border-radius:14px;padding:10px;color:var(--muted);font-size:12px;line-height:1.45;font-weight:750;background:rgba(148,163,184,.05);}
  .crm-tag-board-scroll{display:none;}
  .crm-tag-mobile-board{display:grid;gap:10px;margin-top:10px;}
  .crm-tag-mobile-card{border:1px solid var(--line);background:var(--card);border-radius:18px;padding:12px;display:grid;gap:10px;box-shadow:0 8px 20px rgba(15,23,42,.06);}
  .crm-tag-mobile-top{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;}
  .crm-tag-mobile-top span{display:block;font-size:10px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);font-weight:900;margin-bottom:4px;}
  .crm-tag-mobile-top b{display:block;font-size:15px;color:var(--text);font-weight:950;}
  .crm-tag-mobile-top strong{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;padding:6px 9px;background:rgba(109,40,217,.10);color:#6d28d9;font-size:11px;font-weight:950;white-space:nowrap;}
  body[data-theme="dark"] .crm-tag-mobile-top strong{background:rgba(139,92,246,.18);color:#ddd6fe;}
  .crm-tag-mobile-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;}
  .crm-tag-mobile-metrics>div{border:1px solid rgba(148,163,184,.22);border-radius:13px;padding:8px;background:rgba(148,163,184,.05);}
  .crm-tag-mobile-metrics span{display:block;font-size:10px;color:var(--muted);font-weight:850;margin-bottom:4px;}
  .crm-tag-mobile-metrics b{display:block;font-size:15px;font-weight:950;color:var(--text);}
  .crm-tag-mobile-statuses{display:flex;flex-wrap:wrap;gap:6px;}
  .crm-tag-mobile-statuses span{display:inline-flex;align-items:center;min-height:26px;border-radius:999px;padding:0 8px;background:rgba(148,163,184,.10);color:var(--muted);font-size:10px;font-weight:900;}
  .crm-tag-mobile-statuses span.is-good{background:rgba(16,185,129,.12);color:#047857;}
  .crm-tag-mobile-statuses span.is-bad{background:rgba(239,68,68,.11);color:#b91c1c;}
  body[data-theme="dark"] .crm-tag-mobile-statuses span.is-good{color:#6ee7b7;background:rgba(16,185,129,.18);}
  body[data-theme="dark"] .crm-tag-mobile-statuses span.is-bad{color:#fecaca;background:rgba(239,68,68,.18);}
  .crm-tag-mobile-total,.crm-tag-mobile-empty{border:1px dashed var(--line);border-radius:16px;padding:12px;background:rgba(148,163,184,.05);color:var(--muted);font-size:12px;line-height:1.45;font-weight:800;}
  .crm-tag-mobile-total span{display:block;font-size:10px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);font-weight:950;margin-bottom:4px;}
  .crm-tag-mobile-total b{display:block;font-size:20px;font-weight:950;color:var(--text);}
  .crm-tag-mobile-total em{display:block;font-style:normal;margin-top:3px;color:var(--muted);}
  #crmKpisRow{display:none!important;}
  #crmFunnelCard{display:none!important;}
}


/* ecosyst-059: mobile polish / app-like utilities */
@media (max-width:760px){
  html{scroll-behavior:smooth;}
  body[data-app-page]{-webkit-tap-highlight-color:transparent;}
  .mobile-sticky-context{display:none;}
  .mobile-context-anchor{display:none;}
  .mobile-empty-state{padding:16px;border:1px dashed rgba(148,163,184,.34);border-radius:18px;background:rgba(148,163,184,.08);color:var(--muted);font-size:13px;line-height:1.45;}
  .mobile-empty-state strong{display:block;color:var(--text);font-size:15px;margin-bottom:4px;}
  .mobile-metric-hint{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:999px;border:1px solid var(--line);font-size:11px;font-weight:900;color:var(--muted);background:rgba(148,163,184,.08);}
  .home-channel-card:empty,.home-channel-summary:empty{display:none;}
  .home-table-wrap,.admin-table-wrap,.daily-cut-scroll,.crm-tag-board-scroll,.smm-table-wrap{max-width:100%;}
  .chart-wrap,.smm-chart-wrap{min-height:250px;}
  canvas{touch-action:pan-y;}
}


/* ecosyst-061: mobile /mktg layout polish, compact period, KPI grid, daily table scroll, audience cards */
@media (max-width:760px){
  body[data-app-page] .wrap{padding:12px 10px calc(var(--mobile-bottom-nav-h) + env(safe-area-inset-bottom,0px) + 18px)!important;}
  body[data-app-page] #protectedContent{display:grid;gap:16px;}
  body[data-app-page] #protectedContent.hidden{display:none!important;}
  .card{border-radius:22px;}
  .report-hero{padding:16px!important;margin-bottom:14px!important;border-radius:22px!important;}
  .report-hero-title{font-size:22px!important;line-height:1.12!important;}
  .report-hero-meta{font-size:11px!important;}
  #periodControlsMount{margin:0 0 16px 0!important;}
  .period-section-head{margin:0 0 8px!important;}
  .period-section-head .section-title{font-size:18px!important;line-height:1.15!important;}
  .period-card{padding:12px!important;margin-bottom:16px!important;border-radius:22px!important;overflow:visible!important;}
  .period-toolbar,.period-toolbar-main{display:grid!important;gap:10px!important;width:100%!important;}
  .period-quick-switch{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:7px!important;padding:7px!important;border-radius:22px!important;width:100%!important;box-sizing:border-box!important;}
  .period-quick-btn{width:100%!important;min-width:0!important;min-height:42px!important;padding:0 3px!important;border-radius:16px!important;font-size:11px!important;line-height:1.05!important;letter-spacing:-.03em!important;text-align:center!important;justify-content:center!important;}
  .period-quick-btn-month{font-size:12px!important;}
  .period-picker-open-btn{grid-column:1/-1!important;width:100%!important;min-height:44px!important;margin-left:0!important;border-radius:16px!important;font-size:13px!important;font-weight:950!important;justify-content:center!important;background:#fff!important;box-shadow:0 8px 18px rgba(15,23,42,.045)!important;}
  body[data-theme="dark"] .period-picker-open-btn{background:rgba(255,255,255,.055)!important;}
  .period-summary-text{font-size:12px!important;line-height:1.35!important;font-weight:850!important;padding:0 2px!important;}
  .section-head{margin-bottom:10px!important;gap:8px!important;}
  .section-title{font-size:19px!important;line-height:1.15!important;}
  #accountDashboardKpis.kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;margin:0 0 16px!important;}
  #accountDashboardKpis .kpi{padding:12px!important;border-radius:20px!important;min-height:104px!important;display:grid!important;grid-template-columns:1fr!important;grid-template-areas:'label' 'value' 'sub'!important;gap:7px!important;align-content:start!important;justify-items:start!important;}
  #accountDashboardKpis .kpi .k{font-size:11px!important;line-height:1.2!important;max-width:100%;}
  #accountDashboardKpis .kpi .v{font-size:23px!important;line-height:1.03!important;white-space:normal!important;word-break:break-word!important;}
  #accountDashboardKpis .kpi .s{font-size:11px!important;line-height:1.24!important;}
  .dashboard-grid{gap:14px!important;margin-bottom:16px!important;}
  .chart-card,.list-card,.daily-cut-card,.insight-card,.warnings-card{padding:14px!important;border-radius:22px!important;margin-bottom:0!important;}
  .daily-cut-card{overflow:hidden!important;}
  .daily-cut-head{margin-bottom:10px!important;}
  .daily-cut-insights{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;margin-bottom:10px!important;}
  .daily-cut-insight{padding:10px!important;border-radius:15px!important;}
  .daily-cut-insight-title{font-size:10px!important;margin-bottom:4px!important;}
  .daily-cut-insight-value{font-size:12px!important;line-height:1.35!important;}
  .daily-cut-scroll{overflow-x:auto!important;overflow-y:hidden!important;-webkit-overflow-scrolling:touch!important;border-radius:16px!important;border:1px solid var(--line)!important;max-width:100%!important;}
  .daily-cut-table{min-width:max-content!important;width:max-content!important;border-collapse:separate!important;border-spacing:0!important;}
  .daily-cut-table th,.daily-cut-table td{display:table-cell!important;white-space:nowrap!important;padding:9px 10px!important;font-size:12px!important;line-height:1.25!important;}
  .daily-cut-table th:nth-child(n+5),.daily-cut-table td:nth-child(n+5){display:table-cell!important;}
  .daily-cut-table .daily-cut-metric-col,.daily-cut-table .daily-cut-row-label{position:sticky!important;left:0!important;z-index:4!important;min-width:118px!important;text-align:left!important;}
  #audienceSectionHead{margin-top:4px!important;margin-bottom:10px!important;}
  .audience-grid{grid-template-columns:1fr!important;gap:12px!important;margin-top:0!important;}
  .audience-card{padding:14px!important;border-radius:22px!important;}
  .audience-card>.section-title{font-size:17px!important;margin-bottom:10px!important;}
  .audience-layout{display:none!important;}
  .audience-mobile-list{display:grid!important;gap:9px!important;}
  .audience-mobile-row{border:1px solid rgba(148,163,184,.22);border-radius:17px;padding:11px;background:rgba(148,163,184,.055);display:grid;gap:9px;min-width:0;}
  body[data-theme="light"] .audience-mobile-row{background:#f8fafc;}
  .audience-mobile-top{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;min-width:0;}
  .audience-mobile-title{min-width:0;font-size:14px;font-weight:950;line-height:1.22;color:var(--text);overflow:hidden;text-overflow:ellipsis;}
  .audience-mobile-share{flex:0 0 auto;border-radius:999px;padding:5px 8px;background:rgba(109,40,217,.10);color:#6d28d9;font-size:11px;font-weight:950;white-space:nowrap;}
  body[data-theme="dark"] .audience-mobile-share{background:rgba(139,92,246,.18);color:#ddd6fe;}
  .audience-mobile-bar{height:7px;border-radius:999px;background:rgba(148,163,184,.18);overflow:hidden;}
  .audience-mobile-bar i{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,#a78bfa,#6d28d9);}
  .audience-mobile-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;}
  .audience-mobile-metrics>div{min-width:0;border:1px solid rgba(148,163,184,.18);border-radius:13px;padding:8px;background:rgba(255,255,255,.55);}
  body[data-theme="dark"] .audience-mobile-metrics>div{background:rgba(255,255,255,.04);}
  .audience-mobile-metrics span{display:block;font-size:9px;font-weight:950;letter-spacing:.04em;text-transform:uppercase;color:var(--muted);margin-bottom:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .audience-mobile-metrics b{display:block;font-size:14px;font-weight:950;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
}
@media (max-width:420px){
  .period-quick-switch{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:6px!important;padding:6px!important;}
  .period-quick-btn{font-size:10px!important;min-height:40px!important;padding:0 2px!important;}
  .period-quick-btn-month{font-size:11px!important;}
  #accountDashboardKpis.kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;}
  #accountDashboardKpis .kpi{padding:11px!important;min-height:100px!important;}
  #accountDashboardKpis .kpi .v{font-size:21px!important;}
  .daily-cut-insights{grid-template-columns:1fr!important;}
  .audience-mobile-metrics{grid-template-columns:repeat(2,minmax(0,1fr));}
}

/* ecosyst-062/064: targeted mobile polish — full-width period, compact audience metrics, mobile-only report logo */
.report-hero-logo{
  display:none;
  width:90px;
  max-width:28vw;
  height:auto;
  margin:0 0 10px 0;
}
@media (max-width:760px){
  body[data-app-page] #periodControlsMount,
  body[data-app-page] .period-card,
  body[data-app-page] .period-toolbar,
  body[data-app-page] .period-toolbar-main,
  body[data-app-page] .period-quick-switch{
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    box-sizing:border-box!important;
    justify-self:stretch!important;
  }
  body[data-app-page] .period-card{
    display:block!important;
  }
  body[data-app-page] .period-toolbar{
    grid-template-columns:minmax(0,1fr)!important;
  }
  body[data-app-page] .period-quick-switch{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
  }
  body[data-app-page] .period-picker-open-btn{
    grid-column:1 / -1!important;
    width:100%!important;
  }
  .report-hero-logo{
    display:block;
    width:86px;
    max-width:90px;
    margin:0 0 8px 0;
  }
  .report-hero-copy{
    align-items:flex-start!important;
  }
  .audience-mobile-row{
    padding:9px!important;
    gap:7px!important;
    border-radius:16px!important;
  }
  .audience-mobile-top{
    align-items:center!important;
  }
  .audience-mobile-title{
    font-size:13px!important;
    line-height:1.16!important;
  }
  .audience-mobile-share{
    font-size:10px!important;
    padding:4px 7px!important;
  }
  .audience-mobile-bar{
    height:6px!important;
  }
  .audience-mobile-metrics{
    display:flex!important;
    flex-wrap:nowrap!important;
    align-items:stretch!important;
    justify-content:center!important;
    gap:4px!important;
    width:100%!important;
    min-width:0!important;
  }
  .audience-mobile-metrics>div{
    flex:1 1 0!important;
    min-width:0!important;
    padding:6px 3px!important;
    border-radius:11px!important;
    text-align:center!important;
    display:grid!important;
    place-items:center!important;
    align-content:center!important;
    gap:2px!important;
  }
  .audience-mobile-metrics span{
    font-size:7.5px!important;
    line-height:1.05!important;
    letter-spacing:.01em!important;
    margin:0!important;
    max-width:100%!important;
    text-align:center!important;
  }
  .audience-mobile-metrics b{
    font-size:10.5px!important;
    line-height:1.05!important;
    max-width:100%!important;
    text-align:center!important;
  }
}
@media (max-width:420px){
  .audience-mobile-metrics{gap:3px!important;}
  .audience-mobile-metrics>div{padding:5px 2px!important;border-radius:10px!important;}
  .audience-mobile-metrics span{font-size:7px!important;}
  .audience-mobile-metrics b{font-size:9.5px!important;letter-spacing:-.035em!important;}
  .report-hero-logo{width:82px;}
}


/* ecosyst-066: clean report footer and global collapsed-sidebar tooltip */
.report-legal-footer,
#loadStatus.report-legal-footer,
.smm-load-status.report-legal-footer{
  display:grid!important;
  gap:4px!important;
  width:100%!important;
  margin-top:auto!important;
  padding:28px 6px 24px!important;
  color:var(--muted)!important;
  font-size:11px!important;
  font-weight:500!important;
  line-height:1.45!important;
  text-align:center!important;
}
.report-legal-main{display:block;color:var(--muted);font-size:11px;font-weight:650;}
.report-legal-basis{display:block;color:var(--muted);font-size:10px;font-weight:400;opacity:.78;}
.report-legal-brand{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  min-height:24px;
  margin:0 auto 4px;
  color:var(--muted);
  font-size:9px;
  font-weight:700;
  letter-spacing:.16em;
}
.report-legal-brand img{display:block;width:auto;height:22px;max-width:92px;object-fit:contain;}
body[data-app-page] > .wrap:has(.report-legal-footer){display:flex;flex-direction:column;}
body[data-app-page] > .wrap > #protectedContent:not(.hidden):has(> .report-legal-footer),
body[data-app-page] > .wrap > #ttProtected:has(> .report-legal-footer),
body[data-app-page] > .wrap > #gadsProtected:has(> .report-legal-footer){display:flex;flex:1 1 auto;flex-direction:column;min-height:0;}
.app-sidebar-hover-tooltip{
  position:fixed;
  left:0;
  top:0;
  max-width:220px;
  padding:8px 10px;
  border-radius:10px;
  background:rgba(15,23,42,.96);
  color:#fff;
  font-size:11px;
  line-height:1.35;
  font-weight:700;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transform:translateY(4px);
  transition:opacity .14s ease,transform .14s ease,visibility .14s ease;
  z-index:99999;
  box-shadow:0 10px 24px rgba(15,23,42,.18);
}
.app-sidebar-hover-tooltip.show{
  opacity:1;
  visibility:visible;
  transform:translateY(0);
}
@media (max-width:760px){
  .report-legal-footer,
  #loadStatus.report-legal-footer,
  .smm-load-status.report-legal-footer{
    margin-top:auto!important;
    padding:24px 10px 18px!important;
    font-size:10px!important;
  }
  .report-legal-main{font-size:10px;}
  .report-legal-basis{font-size:9px;}
  .report-legal-brand{gap:7px;font-size:8px;}
  .report-legal-brand img{height:19px;max-width:80px;}
  .app-sidebar-hover-tooltip{display:none!important;}
}

/* fix-073: счётчик выбора в табах уровня + чип статуса выбора рядом с кнопкой сброса */
.ads-manager-level-btn .cnt{font-size:10px;font-weight:800;opacity:.85;margin-left:2px}
.ads-manager-level-btn:not(.active) .cnt{color:#7c3aed}
.ads-manager-level-btn.active .cnt{color:#fff}
.ads-manager-meta{display:flex;align-items:center;gap:10px}
.ads-manager-meta.has-selection #adsManagerSelectionInfo{
  display:inline-flex;
  align-items:center;
  background:rgba(37,99,235,.10);
  color:#0c447c;
  font-weight:800;
  padding:5px 10px;
  border-radius:999px;
}
body[data-theme="dark"] .ads-manager-meta.has-selection #adsManagerSelectionInfo{
  background:rgba(59,130,246,.18);
  color:#bfdbfe;
}

/* fix-073: подсветку CPL по качеству результата добавлять не потребовалось — в таблице
   "Управление рекламой" уже есть 3-уровневая heat-подсветка (heat-good/heat-warn/heat-bad,
   buildManagerHeatMap) по всем метрикам, включая CPL. Она уже стилизована в app.css выше
   (строки ~501-506) и уже применяется в разметке ячеек — предыдущая оценка (что подсветки
   там нет) была ошибочной, сделанной по сжатому скриншоту. Ничего дублировать не стал. */

/* fix-078: важно — предыдущий комментарий (fix-073) в этом файле заканчивался без закрывающего
   "звездочка-слэш", то есть весь остаток файла фактически был частью одного незакрытого
   комментария. Само по себе это ничего не ломало (после него ничего не было), но если бы кто-то
   дописал CSS в конец файла, не закрыв комментарий сам — это новое CSS тоже "исчезло" бы молча.
   Закрыл его выше перед тем, как дописывать стили ниже. */

/* fix-078: вкладка CRM в /mktg/admin/ (webhook, воронки, период загрузки, маппинг стадий,
   прогресс, логи) — у всех этих классов раньше не было ни одного CSS-правила (кроме общего
   box-sizing у .setting-card через комбинированный селектор выше). Приводим к общей визуальной
   системе панели (--line/--text/--muted/--accent/--radius/--good-bg/--warn-bg/--bad-bg), без
   новых цветов и эффектов. */

.setting-card{
  background:linear-gradient(180deg,var(--panel),var(--panel2));
  border:1px solid var(--line);
  border-radius:14px;
  padding:14px;
}

.crm-control-hero{
  display:flex;
  flex-wrap:wrap;
  gap:16px;
  align-items:flex-start;
  justify-content:space-between;
  background:linear-gradient(180deg,var(--panel),var(--panel2));
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:16px;
  margin-bottom:12px;
}
.crm-control-hero>div:first-child{flex:1 1 320px;min-width:0}
.admin-ux-kicker{font-size:11px;font-weight:800;letter-spacing:.04em;color:var(--accent);text-transform:uppercase;margin-bottom:4px}
.crm-control-hero strong{font-size:17px}
.crm-control-hero p{margin:6px 0 12px;color:var(--muted);font-size:13px;line-height:1.5}
.crm-control-actions{display:flex;gap:8px;flex-wrap:wrap}
.crm-control-stats{display:flex;flex-wrap:wrap;gap:10px;flex:0 0 auto}
.crm-control-stats>div{
  min-width:96px;
  padding:10px 14px;
  border-radius:12px;
  background:rgba(255,255,255,.03);
  border:1px solid var(--line);
  text-align:center;
}
body[data-theme="light"] .crm-control-stats>div{background:rgba(15,23,42,.03)}
.crm-control-stats>div span{display:block;font-size:11px;color:var(--muted);margin-bottom:4px}
.crm-control-stats>div strong{font-size:20px}
.crm-control-stats>div.good strong{color:#22c55e}
.crm-control-stats>div.warn strong{color:#f59e0b}
.crm-control-stats>div.bad strong{color:#ef4444}
.crm-toolbar-note{
  font-size:12px;
  color:var(--muted);
  background:rgba(109,40,217,.08);
  border:1px solid rgba(109,40,217,.20);
  border-radius:12px;
  padding:10px 14px;
  margin-bottom:12px;
  line-height:1.5;
}
.crm-account-list{display:flex;flex-direction:column;gap:12px}

.bitrix-fold{list-style:none}
.bitrix-fold summary{list-style:none;cursor:pointer}
.bitrix-fold summary::-webkit-details-marker{display:none}
.bitrix-fold-summary{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.crm-account-main{display:flex;align-items:center;gap:10px;min-width:0}
.bitrix-brand-icon{
  flex:0 0 auto;
  width:34px;height:34px;
  border-radius:10px;
  background:linear-gradient(135deg,var(--accent),#4c1d95);
  color:#fff;
  font-size:10px;
  font-weight:800;
  display:flex;align-items:center;justify-content:center;
}
.crm-account-title{display:flex;flex-direction:column;gap:2px;min-width:0}
.crm-account-title strong{font-size:14px}
.crm-account-title span{font-size:11px;color:var(--muted)}
.crm-account-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.crm-meta-pill{
  font-size:11px;
  padding:4px 10px;
  border-radius:999px;
  background:rgba(255,255,255,.05);
  color:var(--muted);
  white-space:nowrap;
}
body[data-theme="light"] .crm-meta-pill{background:rgba(15,23,42,.05)}
.crm-summary-action{
  font-size:11px;
  padding:6px 12px;
  border-radius:999px;
  border:1px solid var(--line);
  color:var(--text);
  white-space:nowrap;
}
.bitrix-fold-caret{color:var(--muted);transition:transform .15s ease;font-size:12px}
.bitrix-fold[open] .bitrix-fold-caret{transform:rotate(180deg)}
.bitrix-fold-body{margin-top:14px;display:flex;flex-direction:column;gap:14px}

.bitrix-status-box{
  border-radius:12px;
  padding:10px 12px;
  font-size:12px;
  line-height:1.5;
  border:1px solid var(--line);
  background:rgba(255,255,255,.03);
  color:var(--muted);
}
.bitrix-status-box.success{background:var(--good-bg);border-color:rgba(34,197,94,.24);color:var(--text)}
.bitrix-status-box.warning{background:var(--warn-bg);border-color:rgba(245,158,11,.24);color:var(--text)}
.bitrix-status-box.error{background:var(--bad-bg);border-color:rgba(239,68,68,.24);color:var(--text)}

.report-settings-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(240px,1fr));
  gap:12px;
}
@media (max-width:760px){.report-settings-grid{grid-template-columns:minmax(0,1fr)}}

.bitrix-job-text{color:var(--muted)}
.bitrix-progress{height:8px;border-radius:999px;background:rgba(255,255,255,.08);overflow:hidden;margin:8px 0}
body[data-theme="light"] .bitrix-progress{background:rgba(15,23,42,.08)}
.bitrix-progress-bar{height:100%;border-radius:999px;background:linear-gradient(90deg,var(--accent),#8b5cf6);transition:width .3s ease}
.bitrix-progress-bar.success{background:linear-gradient(90deg,#16a34a,#22c55e)}
.bitrix-progress-bar.error{background:linear-gradient(90deg,#dc2626,#ef4444)}
.crm-live-progress-card{margin-top:10px;border:1px solid rgba(148,163,184,.16);border-radius:14px;padding:12px;background:rgba(255,255,255,.025)}
body[data-theme="light"] .crm-live-progress-card{background:rgba(15,23,42,.02);border-color:rgba(15,23,42,.08)}
.crm-live-progress-card.is-completed{border-color:rgba(34,197,94,.22);background:rgba(34,197,94,.045)}
body[data-theme="light"] .crm-live-progress-card.is-completed{background:rgba(34,197,94,.06)}
.crm-live-progress-head{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:8px;font-size:12px;color:var(--muted);flex-wrap:wrap}
.crm-live-progress-head strong{color:var(--text);font-size:13px}
.crm-live-progress-period{font-size:12px;color:var(--muted);margin-bottom:8px}
.bitrix-progress-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:8px;margin-bottom:8px}
.bitrix-progress-stat{
  background:rgba(255,255,255,.03);
  border-radius:10px;
  padding:8px 10px;
}
body[data-theme="light"] .bitrix-progress-stat{background:rgba(15,23,42,.03)}
.bitrix-progress-stat-label{font-size:10px;color:var(--muted);margin-bottom:2px}
.bitrix-progress-stat-value{font-size:15px;font-weight:800}
.bitrix-progress-stat-value.is-utm{color:#22c55e}

.bitrix-nested-fold{padding:12px 14px}
.bitrix-nested-summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  cursor:pointer;
  list-style:none;
}
.bitrix-nested-summary::-webkit-details-marker{display:none}
.setting-title{font-size:13px;font-weight:800}
.bitrix-nested-body{margin-top:12px}

.bitrix-stage-row-junk td{background:rgba(239,68,68,.06)}
.bitrix-stage-junk-hint{font-size:11px;color:#ef4444;margin-top:3px;font-weight:400}

.bitrix-logs{display:flex;flex-direction:column;gap:8px;max-height:280px;overflow-y:auto}
.db-line{
  display:flex;
  justify-content:space-between;
  gap:12px;
  font-size:12px;
  padding-bottom:8px;
  border-bottom:1px dashed var(--line);
}
.db-line:last-child{border-bottom:none;padding-bottom:0}
.db-line span{color:var(--muted);white-space:nowrap}
.db-line strong{font-weight:700;text-align:right}


/* fix-083: progress bar is visibly alive during CRM background loading. */
.bitrix-progress-bar.active{
  background-image:linear-gradient(45deg,rgba(255,255,255,.22) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.22) 50%,rgba(255,255,255,.22) 75%,transparent 75%,transparent);
  background-size:22px 22px;
  animation:bitrixProgressMove .9s linear infinite;
}
@keyframes bitrixProgressMove{from{background-position:0 0}to{background-position:22px 0}}


/* ecosyst-087: CRM provider label inside CRM account badge */
.crm-provider-logo{
  width:auto;
  min-width:74px;
  height:42px;
  padding:0 10px;
  border-radius:14px;
  font-size:12px;
  font-weight:950;
  letter-spacing:-.02em;
  text-align:center;
  line-height:1.05;
}
@media (max-width:640px){
  .crm-provider-logo{min-width:64px;height:38px;font-size:11px;padding:0 8px;}
}

/* ecosyst-093: RNP report shell */
.report-hero-account-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.report-hero-account-row .select{flex:1 1 260px;min-width:220px}
.rnp-report-open-btn{white-space:nowrap;min-height:44px;border-radius:14px;font-weight:800}
.rnp-report-open-btn.active{border-color:rgba(124,58,237,.45);box-shadow:0 10px 24px rgba(124,58,237,.16);color:#6d28d9;background:rgba(124,58,237,.08)}
.rnp-report-card{margin-top:16px;border:1px solid rgba(124,58,237,.18);background:linear-gradient(180deg,rgba(124,58,237,.035),rgba(255,255,255,.94));box-shadow:0 18px 48px rgba(15,23,42,.06)}
body[data-theme="dark"] .rnp-report-card{background:linear-gradient(180deg,rgba(124,58,237,.12),rgba(15,23,42,.86));box-shadow:0 18px 48px rgba(0,0,0,.25)}
.rnp-report-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:16px}
.rnp-eyebrow{font-size:12px;font-weight:900;letter-spacing:.14em;text-transform:uppercase;color:#7c3aed;margin-bottom:5px}
.rnp-report-title{font-size:22px!important;margin:0 0 4px!important}
.rnp-report-meta{line-height:1.45}
.rnp-report-close-btn{white-space:nowrap}
.rnp-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}
.rnp-kpi-card{padding:14px;border:1px solid rgba(148,163,184,.22);border-radius:18px;background:rgba(255,255,255,.72);display:grid;gap:5px;min-height:108px}
body[data-theme="dark"] .rnp-kpi-card{background:rgba(15,23,42,.66)}
.rnp-kpi-card span{font-size:12px;font-weight:800;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}
.rnp-kpi-card b{font-size:25px;line-height:1.05;color:var(--text);word-break:break-word}
.rnp-kpi-card em{font-style:normal;font-size:12px;color:var(--muted);line-height:1.35}
.rnp-kpi-card.is-spend{border-color:rgba(124,58,237,.22)}
.rnp-kpi-card.is-leads{border-color:rgba(16,185,129,.24)}
.rnp-kpi-card.is-sales,.rnp-kpi-card.is-revenue,.rnp-kpi-card.is-romi{border-color:rgba(245,158,11,.25)}
.rnp-report-grid{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(320px,.75fr);gap:14px;margin-bottom:14px}
.rnp-panel{border:1px solid rgba(148,163,184,.20);border-radius:20px;background:rgba(255,255,255,.64);padding:16px;min-width:0}
body[data-theme="dark"] .rnp-panel{background:rgba(15,23,42,.58)}
.rnp-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}
.rnp-panel-title{font-size:16px;font-weight:900;color:var(--text);margin-bottom:10px}
.rnp-funnel{display:flex;align-items:stretch;gap:9px;overflow-x:auto;padding-bottom:4px}
.rnp-funnel-step{min-width:146px;border:1px solid rgba(124,58,237,.16);border-radius:18px;padding:13px;background:rgba(255,255,255,.72);display:flex;flex-direction:column;justify-content:space-between;gap:10px}
body[data-theme="dark"] .rnp-funnel-step{background:rgba(15,23,42,.62)}
.rnp-funnel-step span{display:block;font-size:12px;font-weight:800;color:var(--muted);line-height:1.25}.rnp-funnel-step b{font-size:22px;line-height:1;color:var(--text)}.rnp-funnel-step em{font-style:normal;font-size:12px;color:#7c3aed;font-weight:800}
.rnp-funnel-arrow{display:flex;align-items:center;color:#8b5cf6;font-size:20px;font-weight:900;opacity:.75;flex:0 0 auto}
.rnp-campaign-list{display:grid;gap:9px}.rnp-campaign-row{display:flex;gap:10px;align-items:flex-start;padding:10px;border:1px solid rgba(148,163,184,.18);border-radius:16px;background:rgba(255,255,255,.56)}
body[data-theme="dark"] .rnp-campaign-row{background:rgba(15,23,42,.50)}.rnp-campaign-rank{width:28px;height:28px;border-radius:10px;background:rgba(124,58,237,.10);color:#7c3aed;display:flex;align-items:center;justify-content:center;font-weight:900;flex:0 0 auto}.rnp-campaign-main{display:grid;gap:4px;min-width:0}.rnp-campaign-main b{font-size:13px;line-height:1.3;color:var(--text);word-break:break-word}.rnp-campaign-main span{font-size:12px;line-height:1.35;color:var(--muted)}.rnp-empty{font-size:13px;color:var(--muted);padding:12px;border:1px dashed rgba(148,163,184,.30);border-radius:14px}.rnp-daily-panel{margin-top:0}.rnp-table-scroll{overflow:auto;max-height:520px;border:1px solid rgba(148,163,184,.18);border-radius:16px}.rnp-daily-table{min-width:1180px;margin:0}.rnp-daily-table th{position:sticky;top:0;z-index:1;background:rgba(248,250,252,.98)}body[data-theme="dark"] .rnp-daily-table th{background:rgba(15,23,42,.98)}.rnp-daily-table td,.rnp-daily-table th{white-space:nowrap}.rnp-daily-table td:first-child,.rnp-daily-table th:first-child{position:sticky;left:0;z-index:2;background:rgba(255,255,255,.98)}body[data-theme="dark"] .rnp-daily-table td:first-child,body[data-theme="dark"] .rnp-daily-table th:first-child{background:rgba(15,23,42,.98)}
@media (max-width:1100px){.rnp-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.rnp-report-grid{grid-template-columns:1fr}.rnp-report-head{flex-direction:column}.rnp-report-close-btn{width:100%}}
@media (max-width:640px){.report-hero-account-row{display:grid}.report-hero-account-row .select{min-width:0;width:100%}.rnp-report-open-btn{width:100%}.rnp-kpi-grid{grid-template-columns:1fr}.rnp-report-card{padding:16px}.rnp-funnel-step{min-width:132px}.rnp-kpi-card b{font-size:22px}}

/* ecosyst-094: RNP cabinet + CRM breakdown */
.rnp-breakdown-panel{margin-top:14px}
.rnp-tabs{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.rnp-tab{border:1px solid rgba(124,58,237,.18);background:rgba(255,255,255,.78);color:var(--muted);border-radius:999px;padding:9px 14px;font-size:13px;font-weight:900;cursor:pointer;transition:.18s ease;box-shadow:0 8px 18px rgba(15,23,42,.04)}
.rnp-tab:hover{border-color:rgba(124,58,237,.34);color:#6d28d9;transform:translateY(-1px)}
.rnp-tab.active{background:linear-gradient(135deg,#7c3aed,#a855f7);border-color:transparent;color:#fff;box-shadow:0 12px 26px rgba(124,58,237,.22)}
body[data-theme="dark"] .rnp-tab{background:rgba(15,23,42,.72)}
body[data-theme="dark"] .rnp-tab.active{background:linear-gradient(135deg,#7c3aed,#9333ea);color:#fff}
.rnp-breakdown-hint{margin:-4px 0 10px;line-height:1.45}
.rnp-breakdown-table{min-width:1720px;margin:0}
.rnp-breakdown-table th{position:sticky;top:0;z-index:1;background:rgba(248,250,252,.98)}
body[data-theme="dark"] .rnp-breakdown-table th{background:rgba(15,23,42,.98)}
.rnp-breakdown-table td,.rnp-breakdown-table th{white-space:nowrap;vertical-align:top}
.rnp-breakdown-table td:first-child,.rnp-breakdown-table th:first-child{position:sticky;left:0;z-index:2;background:rgba(255,255,255,.98);min-width:280px;max-width:360px;white-space:normal}
body[data-theme="dark"] .rnp-breakdown-table td:first-child,body[data-theme="dark"] .rnp-breakdown-table th:first-child{background:rgba(15,23,42,.98)}
.rnp-name-cell{display:grid;gap:4px;min-width:0}.rnp-name-cell b{font-size:13px;line-height:1.3;color:var(--text);word-break:break-word}.rnp-name-cell span{font-size:12px;line-height:1.35;color:var(--muted);word-break:break-word}.rnp-total-row td{background:rgba(124,58,237,.055);border-top:1px solid rgba(124,58,237,.14)}
body[data-theme="dark"] .rnp-total-row td{background:rgba(124,58,237,.12)}
@media (max-width:760px){.rnp-tabs{width:100%;justify-content:stretch}.rnp-tab{flex:1 1 auto}.rnp-breakdown-table td:first-child,.rnp-breakdown-table th:first-child{min-width:220px;max-width:260px}}
.rnp-daily-table{min-width:1640px}

/* ecosyst-095: RNP dashboard UX */
.rnp-view-tabs{display:flex;align-items:center;gap:6px;flex-wrap:wrap;background:rgba(124,58,237,.055);border:1px solid rgba(124,58,237,.14);border-radius:16px;padding:6px;margin:0 0 16px}
.rnp-view-tab{border:0;background:transparent;color:var(--muted);border-radius:12px;padding:10px 14px;font-size:13px;font-weight:900;cursor:pointer;transition:.18s ease}
.rnp-view-tab:hover{color:#6d28d9;background:rgba(124,58,237,.07)}
.rnp-view-tab.active{background:#fff;color:#6d28d9;box-shadow:0 10px 24px rgba(15,23,42,.08);border:1px solid rgba(124,58,237,.14)}
body[data-theme="dark"] .rnp-view-tabs{background:rgba(124,58,237,.12)}
body[data-theme="dark"] .rnp-view-tab.active{background:rgba(15,23,42,.82);color:#c4b5fd}
.rnp-view-panel.hidden{display:none!important}
.rnp-insight-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:0 0 16px}
.rnp-insight-card{border:1px solid rgba(148,163,184,.22);border-radius:18px;padding:14px;background:rgba(255,255,255,.68);display:grid;gap:5px;min-height:100px;position:relative;overflow:hidden}
.rnp-insight-card:before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:rgba(124,58,237,.35)}
.rnp-insight-card span{font-size:12px;font-weight:900;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)}
.rnp-insight-card b{font-size:15px;line-height:1.25;color:var(--text);word-break:break-word}
.rnp-insight-card em{font-style:normal;font-size:12px;line-height:1.35;color:var(--muted)}
.rnp-insight-card.is-good:before{background:#10b981}.rnp-insight-card.is-warn:before{background:#f59e0b}.rnp-insight-card.is-info:before{background:#3b82f6}.rnp-insight-card.is-money:before{background:#7c3aed}
body[data-theme="dark"] .rnp-insight-card{background:rgba(15,23,42,.62)}
.rnp-daily-table tbody tr.is-sale td:first-child,.rnp-breakdown-table tbody tr.is-sale td:first-child{box-shadow:inset 4px 0 0 #10b981}
.rnp-daily-table tbody tr.is-quality td:first-child,.rnp-breakdown-table tbody tr.is-quality td:first-child{box-shadow:inset 4px 0 0 #3b82f6}
.rnp-daily-table tbody tr.is-leads td:first-child,.rnp-breakdown-table tbody tr.is-leads td:first-child{box-shadow:inset 4px 0 0 #a855f7}
.rnp-daily-table tbody tr.is-empty td:first-child,.rnp-breakdown-table tbody tr.is-empty td:first-child{box-shadow:inset 4px 0 0 rgba(148,163,184,.45)}
.rnp-panel{scroll-margin-top:96px}
@media (max-width:1100px){.rnp-insight-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.rnp-view-tab{flex:1 1 auto;text-align:center}}
@media (max-width:640px){.rnp-insight-grid{grid-template-columns:1fr}.rnp-view-tabs{display:grid}.rnp-view-tab{width:100%}}

/* ecosyst-096: clean report mode switch + polished RNP dashboard */
.report-mode-switch{
  margin-top:14px;
  margin-bottom:14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:14px;
  border:1px solid rgba(148,163,184,.18);
  border-radius:22px;
  background:linear-gradient(135deg,rgba(255,255,255,.96),rgba(248,250,252,.86));
  box-shadow:0 16px 38px rgba(15,23,42,.055);
}
body[data-theme="dark"] .report-mode-switch{background:linear-gradient(135deg,rgba(15,23,42,.86),rgba(30,41,59,.72));box-shadow:0 16px 38px rgba(0,0,0,.20)}
.report-mode-copy{display:grid;gap:2px;min-width:0}
.report-mode-eyebrow{font-size:11px;font-weight:900;letter-spacing:.16em;text-transform:uppercase;color:#7c3aed}
.report-mode-title{font-size:16px;font-weight:900;color:var(--text)}
.report-mode-actions{display:flex;align-items:center;gap:8px;flex:0 0 auto;padding:6px;border:1px solid rgba(148,163,184,.18);border-radius:18px;background:rgba(248,250,252,.75)}
body[data-theme="dark"] .report-mode-actions{background:rgba(15,23,42,.58)}
.report-mode-btn{border:0;border-radius:13px;background:transparent;color:var(--muted);font-weight:900;font-size:14px;padding:11px 18px;cursor:pointer;transition:.18s ease;white-space:nowrap}
.report-mode-btn:hover{color:#6d28d9;background:rgba(124,58,237,.08)}
.report-mode-btn.active{color:#fff;background:linear-gradient(135deg,#6d28d9,#8b5cf6);box-shadow:0 12px 24px rgba(124,58,237,.24)}
.rnp-report-card{
  margin:0 0 16px;
  padding:18px;
  border:1px solid rgba(148,163,184,.20)!important;
  border-radius:24px;
  background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(248,250,252,.92))!important;
  box-shadow:0 18px 44px rgba(15,23,42,.065)!important;
}
body[data-theme="dark"] .rnp-report-card{background:linear-gradient(180deg,rgba(15,23,42,.90),rgba(30,41,59,.78))!important;box-shadow:0 18px 44px rgba(0,0,0,.26)!important}
.rnp-report-head{padding:2px 2px 12px;margin-bottom:0;border-bottom:1px solid rgba(148,163,184,.16)}
.rnp-eyebrow{color:#7c3aed;font-size:11px;letter-spacing:.18em;margin-bottom:4px}
.rnp-report-title{font-size:24px!important;letter-spacing:-.02em}
.rnp-report-meta{font-size:13px;color:var(--muted)}
.rnp-view-tabs{margin:14px 0 16px!important;padding:6px!important;border-radius:18px!important;background:rgba(248,250,252,.88)!important;border:1px solid rgba(148,163,184,.18)!important}
body[data-theme="dark"] .rnp-view-tabs{background:rgba(15,23,42,.62)!important}
.rnp-view-tab{padding:11px 16px!important;border-radius:13px!important;color:var(--muted)!important}
.rnp-view-tab.active{background:#fff!important;color:#6d28d9!important;border:1px solid rgba(124,58,237,.14)!important;box-shadow:0 10px 24px rgba(15,23,42,.08)!important}
body[data-theme="dark"] .rnp-view-tab.active{background:rgba(30,41,59,.92)!important;color:#c4b5fd!important}
.rnp-kpi-grid{gap:10px!important;margin-bottom:12px!important}
.rnp-kpi-card{min-height:96px!important;padding:14px 15px!important;border-radius:18px!important;background:rgba(255,255,255,.88)!important;box-shadow:0 10px 24px rgba(15,23,42,.035)}
body[data-theme="dark"] .rnp-kpi-card{background:rgba(15,23,42,.68)!important}
.rnp-kpi-card b{font-size:24px!important;letter-spacing:-.02em}.rnp-kpi-card span{font-size:11px!important}.rnp-kpi-card em{font-size:12px!important}
.rnp-insight-grid{gap:10px!important;margin-bottom:12px!important}
.rnp-insight-card{min-height:88px!important;padding:13px 14px!important;border-radius:18px!important;background:rgba(255,255,255,.84)!important;box-shadow:0 10px 24px rgba(15,23,42,.03)}
body[data-theme="dark"] .rnp-insight-card{background:rgba(15,23,42,.64)!important}
.rnp-report-grid{grid-template-columns:minmax(0,1fr)!important;gap:12px!important;margin-bottom:12px!important}
.rnp-panel{border-radius:20px!important;background:rgba(255,255,255,.82)!important;padding:15px!important;box-shadow:0 10px 24px rgba(15,23,42,.035)}
body[data-theme="dark"] .rnp-panel{background:rgba(15,23,42,.62)!important}
.rnp-funnel{gap:8px!important}.rnp-funnel-step{min-width:140px!important;border-radius:17px!important;background:rgba(255,255,255,.88)!important}.rnp-funnel-step b{font-size:22px!important}
body[data-theme="dark"] .rnp-funnel-step{background:rgba(30,41,59,.78)!important}
.rnp-campaign-row{border-radius:16px!important;background:rgba(255,255,255,.84)!important;padding:11px!important}.rnp-campaign-rank{border-radius:12px!important}
body[data-theme="dark"] .rnp-campaign-row{background:rgba(15,23,42,.62)!important}
.rnp-table-scroll{border-radius:18px!important;max-height:560px!important;background:rgba(255,255,255,.72)}
body[data-theme="dark"] .rnp-table-scroll{background:rgba(15,23,42,.52)}
.rnp-breakdown-table td:first-child,.rnp-breakdown-table th:first-child{min-width:320px!important;max-width:430px!important}
.rnp-name-cell-ad{display:flex!important;align-items:flex-start;gap:10px;min-width:300px}
.rnp-name-cell-ad .creative-thumb-mini{width:48px;height:48px;border-radius:12px;flex:0 0 48px}
.rnp-name-meta{display:grid;gap:4px;min-width:0}.rnp-name-meta b{font-size:13px;line-height:1.3;color:var(--text);word-break:break-word}.rnp-name-meta span{font-size:12px;color:var(--muted);line-height:1.35;word-break:break-word}
@media (max-width:760px){
  .report-mode-switch{display:grid;padding:12px;border-radius:20px}.report-mode-actions{display:grid;grid-template-columns:1fr 1fr;width:100%}.report-mode-btn{width:100%;padding:11px 10px}.rnp-report-card{padding:14px}.rnp-report-title{font-size:20px!important}.rnp-kpi-grid{grid-template-columns:1fr!important}.rnp-breakdown-table td:first-child,.rnp-breakdown-table th:first-child{min-width:250px!important;max-width:300px!important}.rnp-name-cell-ad{min-width:230px}
}

/* ecosyst-097: RNP is CRM-only and no separate TOP campaigns panel */
.rnp-report-grid-single{grid-template-columns:1fr!important}
.report-mode-btn.hidden{display:none!important}


/* ecosyst-103: CRM quality/non-qual panel */
.crm-quality-wrap{margin-top:16px;display:grid;gap:14px;}
.crm-quality-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;}
.crm-quality-card{border:1px solid rgba(120,108,180,.16);background:rgba(255,255,255,.78);border-radius:18px;padding:14px 16px;box-shadow:0 10px 26px rgba(15,23,42,.05);}
.crm-quality-card span{display:block;font-size:12px;font-weight:700;color:#64748b;text-transform:uppercase;letter-spacing:.04em;margin-bottom:6px;}
.crm-quality-card b{display:block;font-size:24px;line-height:1.15;color:#1f2350;}
.crm-quality-card em{display:block;margin-top:5px;font-style:normal;font-size:12px;color:#64748b;}
.crm-quality-card.is-good{background:linear-gradient(135deg,rgba(20,184,166,.11),rgba(255,255,255,.82));}
.crm-quality-card.is-bad{background:linear-gradient(135deg,rgba(251,146,60,.10),rgba(255,255,255,.84));}
.crm-quality-reasons{border:1px solid rgba(120,108,180,.14);border-radius:18px;background:#fff;padding:14px;display:grid;gap:8px;}
.crm-quality-reasons-title{font-weight:800;color:#1f2350;font-size:13px;margin-bottom:2px;}
.crm-quality-reason{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border-radius:14px;background:rgba(248,250,252,.92);font-size:13px;color:#334155;}
.crm-quality-reason b{font-size:14px;color:#1f2350;}
.crm-quality-empty{padding:12px;border-radius:14px;background:rgba(248,250,252,.9);color:#64748b;font-size:13px;}
@media (max-width:900px){.crm-quality-grid{grid-template-columns:1fr;}.crm-quality-card b{font-size:22px;}}

/* ecosyst-104: RNP lead quality tab */
.rnp-quality-panel{display:flex;flex-direction:column;gap:14px}
.rnp-quality-kpi-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin:4px 0 2px}
.rnp-quality-grid{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(280px,.75fr);gap:12px;margin:4px 0 6px}
.rnp-quality-card-panel{border:1px solid rgba(148,163,184,.18);background:rgba(248,250,252,.82);border-radius:18px;padding:14px 16px;box-shadow:0 12px 28px rgba(15,23,42,.04)}
.rnp-quality-card-title{font-size:13px;font-weight:950;color:var(--text);margin-bottom:10px;letter-spacing:-.01em}
.rnp-quality-note{font-size:13px;line-height:1.55;color:var(--muted);font-weight:750}
.rnp-quality-reasons-list{display:grid;gap:8px}
.rnp-quality-reason-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:10px;border:1px solid rgba(148,163,184,.16);background:#fff;border-radius:14px;padding:9px 11px;font-size:12px}
.rnp-quality-reason-row span{font-weight:850;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rnp-quality-reason-row b{font-size:13px;color:#6d28d9}
.rnp-quality-reason-row em{font-style:normal;color:var(--muted);font-weight:800}
.rnp-quality-empty{border:1px dashed rgba(148,163,184,.34);border-radius:14px;padding:12px;color:var(--muted);font-size:12px;font-weight:800;background:rgba(255,255,255,.64)}
.rnp-quality-table th,.rnp-quality-table td{white-space:nowrap}
.rnp-quality-table .rnp-name-cell{min-width:260px}
.rnp-quality-reason-chips{display:flex;align-items:center;gap:6px;flex-wrap:wrap;min-width:180px;max-width:360px}
.rnp-quality-reason-chip{display:inline-flex;align-items:center;gap:6px;max-width:190px;border-radius:999px;padding:5px 8px;background:rgba(124,58,237,.08);border:1px solid rgba(124,58,237,.13);color:#5b21b6;font-size:11px;font-weight:850}
.rnp-quality-reason-chip b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:130px}
.rnp-quality-reason-chip em{font-style:normal;color:#7c3aed;font-weight:950}
.rnp-quality-reason-empty{color:var(--muted);font-weight:800}
.rnp-breakdown-table tr.is-warning td,.rnp-quality-table tr.is-warning td{background:rgba(251,191,36,.045)!important}
body[data-theme="dark"] .rnp-quality-card-panel{background:rgba(15,23,42,.58);border-color:rgba(148,163,184,.18)}
body[data-theme="dark"] .rnp-quality-reason-row{background:rgba(15,23,42,.68);border-color:rgba(148,163,184,.16)}
body[data-theme="dark"] .rnp-quality-empty{background:rgba(15,23,42,.42)}
body[data-theme="dark"] .rnp-quality-reason-chip{background:rgba(124,58,237,.18);border-color:rgba(196,181,253,.18);color:#ddd6fe}
body[data-theme="dark"] .rnp-quality-reason-chip em{color:#c4b5fd}
@media (max-width:1100px){.rnp-quality-kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.rnp-quality-grid{grid-template-columns:1fr}}
@media (max-width:640px){.rnp-quality-kpi-grid{grid-template-columns:1fr}.rnp-quality-reason-row{grid-template-columns:1fr auto}.rnp-quality-reason-row em{grid-column:1 / -1}.rnp-quality-reason-chips{min-width:0;max-width:260px}}

/* ecosyst-105: RNP deals tab */
.rnp-deals-panel{display:flex;flex-direction:column;gap:12px}
.rnp-deals-summary{border:1px solid rgba(124,58,237,.14);background:rgba(124,58,237,.06);border-radius:999px;padding:8px 12px;font-weight:850;color:#6d28d9;white-space:nowrap}
.rnp-deals-scroll{max-height:620px}
.rnp-deals-table{min-width:1380px;margin:0}
.rnp-deals-table th{position:sticky;top:0;z-index:1;background:rgba(248,250,252,.98)}
body[data-theme="dark"] .rnp-deals-table th{background:rgba(15,23,42,.98)}
.rnp-deals-table td,.rnp-deals-table th{white-space:nowrap;vertical-align:top}
.rnp-deals-table td:first-child,.rnp-deals-table th:first-child{position:sticky;left:0;z-index:2;background:rgba(255,255,255,.98);min-width:280px;max-width:360px;white-space:normal}
body[data-theme="dark"] .rnp-deals-table td:first-child,body[data-theme="dark"] .rnp-deals-table th:first-child{background:rgba(15,23,42,.98)}
.rnp-deal-row{cursor:pointer}.rnp-deal-row:hover td{background:rgba(124,58,237,.045)!important}.rnp-deal-name,.rnp-deal-client,.rnp-deal-utm{display:grid;gap:4px;min-width:0}.rnp-deal-name b,.rnp-deal-client b,.rnp-deal-utm b{font-size:13px;color:var(--text);line-height:1.3;word-break:break-word}.rnp-deal-name span,.rnp-deal-client span,.rnp-deal-utm span{font-size:12px;color:var(--muted);line-height:1.35;word-break:break-word}.rnp-deal-open{padding:8px 12px;border-radius:999px;font-size:12px;font-weight:900}
.rnp-deal-modal{position:fixed;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;padding:22px}.rnp-deal-modal.hidden{display:none!important}.rnp-deal-modal-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.58);backdrop-filter:blur(8px)}.rnp-deal-modal-dialog{position:relative;width:min(920px,calc(100vw - 32px));max-height:min(86vh,820px);overflow:auto;border-radius:24px;background:var(--card);border:1px solid rgba(148,163,184,.22);box-shadow:0 28px 90px rgba(15,23,42,.32);padding:22px}.rnp-deal-modal-close{position:absolute;top:14px;right:14px;width:36px;height:36px;border-radius:999px;border:1px solid rgba(148,163,184,.22);background:rgba(255,255,255,.86);font-size:24px;line-height:1;color:var(--muted);cursor:pointer}body[data-theme="dark"] .rnp-deal-modal-close{background:rgba(15,23,42,.82)}.rnp-deal-modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding-right:42px;margin-bottom:16px}.rnp-deal-modal-head h3{margin:0;font-size:24px;line-height:1.15;color:var(--text)}.rnp-deal-modal-head p{margin:6px 0 0;color:var(--muted);font-size:13px}.rnp-deal-modal-amount{font-size:22px;font-weight:950;color:#6d28d9;white-space:nowrap}.rnp-deal-info-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:12px 0 16px}.rnp-deal-info-row{border:1px solid rgba(148,163,184,.18);border-radius:16px;background:rgba(248,250,252,.72);padding:12px;display:grid;gap:5px;min-width:0}.rnp-deal-info-row span{font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);font-weight:900}.rnp-deal-info-row b{font-size:13px;color:var(--text);word-break:break-word;line-height:1.35}body[data-theme="dark"] .rnp-deal-info-row{background:rgba(15,23,42,.56)}.rnp-deal-modal-section{border-top:1px solid rgba(148,163,184,.16);padding-top:16px;margin-top:16px}.rnp-deal-modal-section h4{margin:0 0 8px;font-size:15px;color:var(--text)}.rnp-deal-modal-section p{margin:0 0 12px;color:var(--muted);font-size:13px;line-height:1.45}.rnp-deal-utm-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.rnp-deal-utm-grid div{border:1px solid rgba(124,58,237,.13);background:rgba(124,58,237,.045);border-radius:14px;padding:10px;display:grid;gap:4px;min-width:0}.rnp-deal-utm-grid span{font-size:10px;text-transform:uppercase;color:#7c3aed;font-weight:950;letter-spacing:.04em}.rnp-deal-utm-grid b{font-size:12px;color:var(--text);word-break:break-word}.rnp-deal-path{display:grid;gap:8px}.rnp-deal-path-step{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;border:1px solid rgba(148,163,184,.18);border-radius:16px;padding:11px 12px;background:rgba(255,255,255,.66)}body[data-theme="dark"] .rnp-deal-path-step{background:rgba(15,23,42,.58)}.rnp-deal-path-step b{display:block;font-size:13px;color:var(--text)}.rnp-deal-path-step span{display:block;margin-top:3px;font-size:12px;color:var(--muted)}.rnp-deal-path-step em{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end;font-style:normal}.rnp-deal-path-step i{font-style:normal;border-radius:999px;padding:4px 7px;background:rgba(16,185,129,.10);border:1px solid rgba(16,185,129,.16);color:#047857;font-size:11px;font-weight:900}.rnp-deal-empty{border:1px dashed rgba(148,163,184,.32);border-radius:14px;padding:12px;color:var(--muted);font-size:13px}
@media (max-width:900px){.rnp-deal-info-grid{grid-template-columns:1fr 1fr}.rnp-deal-utm-grid{grid-template-columns:1fr 1fr}.rnp-deal-modal-head{display:grid}.rnp-deal-modal-amount{font-size:20px}}
@media (max-width:620px){.rnp-deal-modal{padding:12px}.rnp-deal-modal-dialog{padding:18px;border-radius:20px}.rnp-deal-info-grid,.rnp-deal-utm-grid{grid-template-columns:1fr}.rnp-deal-modal-head h3{font-size:20px}.rnp-deals-summary{white-space:normal}.rnp-panel-head{align-items:stretch}}

/* ecosyst-106: RNP deals scope + UTM filter */
.rnp-deals-head{align-items:flex-start}
.rnp-deals-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:-2px 0 12px;padding:10px;border:1px solid rgba(148,163,184,.18);border-radius:16px;background:rgba(248,250,252,.72)}
body[data-theme="dark"] .rnp-deals-toolbar{background:rgba(15,23,42,.58)}
.rnp-deal-scope-tabs{display:flex;gap:8px;flex-wrap:wrap}
.rnp-deal-scope-tab{border:1px solid rgba(124,58,237,.16);background:rgba(255,255,255,.86);color:var(--muted);border-radius:999px;padding:9px 13px;font-size:13px;font-weight:900;cursor:pointer;transition:.18s ease}
.rnp-deal-scope-tab:hover{color:#6d28d9;border-color:rgba(124,58,237,.32)}
.rnp-deal-scope-tab.active{background:#fff;color:#6d28d9;border-color:rgba(124,58,237,.28);box-shadow:0 8px 18px rgba(124,58,237,.10)}
body[data-theme="dark"] .rnp-deal-scope-tab{background:rgba(30,41,59,.74)}
body[data-theme="dark"] .rnp-deal-scope-tab.active{background:rgba(51,65,85,.95);color:#c4b5fd}
.rnp-deals-filter-label{display:grid;gap:5px;font-size:11px;font-weight:900;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);min-width:220px}
.rnp-deals-filter-select{min-height:38px;border-radius:12px;font-size:13px;font-weight:800;text-transform:none;letter-spacing:0;color:var(--text)}
.rnp-deals-scope-note{margin:0 0 10px;padding:9px 11px;border-radius:14px;background:rgba(124,58,237,.055);border:1px solid rgba(124,58,237,.12);line-height:1.45}
@media (max-width:760px){.rnp-deals-toolbar{display:grid}.rnp-deal-scope-tab{flex:1 1 auto}.rnp-deals-filter-label{min-width:0}}

/* fix-107: compact CRM quality analytics */
.rnp-quality-chart-panel{margin-top:16px}
.rnp-quality-bars{display:grid;gap:14px;margin-top:14px}
.rnp-quality-bar-row{display:grid;gap:7px}
.rnp-quality-bar-label{display:flex;justify-content:space-between;gap:16px;align-items:center;font-size:13px}
.rnp-quality-bar-label span{color:var(--muted,#6b7280)}
.rnp-quality-bar-track{height:12px;border-radius:999px;background:rgba(148,163,184,.2);overflow:hidden}
.rnp-quality-bar-fill{display:block;height:100%;border-radius:inherit;background:#94a3b8;min-width:0}
.rnp-quality-bar-fill.is-quality{background:#22c55e}
.rnp-quality-bar-fill.is-warn{background:#f59e0b}


/* fix-109: marketing-only sections are never shown inside RNP mode */
body.rnp-report-mode #accountSectionHead,
body.rnp-report-mode #accountDashboardKpis,
body.rnp-report-mode #crmSectionHead,
body.rnp-report-mode #crmKpisRow,
body.rnp-report-mode #crmFunnelCard,
body.rnp-report-mode #crmMobileAppPanel,
body.rnp-report-mode #adsManagerCard,
body.rnp-report-mode #dailySliceCard {
  display:none !important;
}

/* fix-120-1: project-aware navigation */
.app-sidebar-project-section{margin-top:2px}
.app-project-switcher-wrap{display:grid;gap:7px;padding:11px;border:1px solid rgba(124,58,237,.16);border-radius:16px;background:linear-gradient(145deg,rgba(124,58,237,.075),rgba(124,58,237,.025));box-shadow:inset 0 1px 0 rgba(255,255,255,.55)}
.app-project-switcher-label{font-size:10px;font-weight:900;letter-spacing:.07em;text-transform:uppercase;color:var(--muted)}
.app-project-switcher{width:100%;min-width:0;height:42px;padding:0 34px 0 11px;border:1px solid var(--line);border-radius:12px;background:var(--panel);color:var(--text);font:inherit;font-size:12px;font-weight:850;outline:none;cursor:pointer;text-overflow:ellipsis;transition:border-color .18s ease,box-shadow .18s ease,background .18s ease}
.app-project-switcher:hover:not(:disabled){border-color:rgba(124,58,237,.38)}
.app-project-switcher:focus{border-color:rgba(109,40,217,.65);box-shadow:0 0 0 3px rgba(109,40,217,.12)}
.app-project-switcher:disabled{cursor:default;opacity:.88;background:rgba(255,255,255,.62)}
body[data-theme="dark"] .app-project-switcher:disabled{background:rgba(15,23,42,.62)}
.app-project-switcher-meta{display:flex;align-items:center;justify-content:space-between;gap:7px;min-width:0;font-size:10px;color:var(--muted)}
.app-project-switcher-meta>span:first-child{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.app-project-status{flex:0 0 auto;display:inline-flex;align-items:center;border-radius:999px;padding:3px 6px;background:rgba(16,185,129,.1);color:#047857;font-size:9px;font-weight:950;letter-spacing:.02em}
.app-project-status.is-paused{background:rgba(245,158,11,.12);color:#b45309}
.app-project-source-count{font-size:10px;font-weight:750;color:var(--muted)}
.app-sidebar-project-empty{padding:11px;border:1px dashed var(--line);border-radius:12px;color:var(--muted);font-size:11px;line-height:1.5;background:rgba(148,163,184,.045)}
.app-sidebar.collapsed .app-sidebar-project-section{display:none!important}
body[data-theme="dark"] .app-project-switcher-wrap{background:linear-gradient(145deg,rgba(124,58,237,.14),rgba(15,23,42,.2));border-color:rgba(196,181,253,.18);box-shadow:none}
body[data-theme="dark"] .app-project-status{color:#6ee7b7;background:rgba(16,185,129,.16)}
body[data-theme="dark"] .app-project-status.is-paused{color:#fcd34d;background:rgba(245,158,11,.17)}
@media(max-width:860px){.app-sidebar-project-section{margin-top:0}.app-project-switcher-wrap{padding:12px}.app-project-switcher{height:44px;font-size:13px}.app-project-switcher-label{font-size:11px}}


/* ECOSYST FIX 126: isolated classic/project report modes */
.app-report-mode-wrap{display:grid;gap:8px;padding-top:7px;border-top:1px solid var(--line)}
.app-report-mode-head{display:grid;gap:5px;font-size:11px;color:var(--muted);font-weight:800}
.app-report-mode-badge{display:inline-flex;align-items:center;width:max-content;max-width:100%;padding:5px 8px;border-radius:999px;font-size:10px;line-height:1.2;letter-spacing:.02em;background:#ede9fe;color:#6d28d9}
.app-report-mode-badge.is-project{background:#dcfce7;color:#15803d}
.app-report-mode-badge.is-project_bd{background:#dbeafe;color:#1d4ed8}
.app-report-mode-control{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:4px;border:1px solid var(--line);border-radius:12px;background:rgba(148,163,184,.09)}
.app-report-mode-btn{min-width:0;border:0;border-radius:9px;padding:8px 6px;background:transparent;color:var(--muted);font:inherit;font-size:10px;font-weight:900;cursor:pointer;transition:.16s ease}
.app-report-mode-btn:hover{color:var(--text)}
.app-report-mode-btn.is-active{background:#fff;color:#6d28d9;box-shadow:0 4px 12px rgba(15,23,42,.08)}
body[data-theme="dark"] .app-report-mode-btn.is-active{background:#1f2937;color:#c4b5fd}
.app-report-mode-btn:disabled{opacity:.58;cursor:wait}
body.report-mode-switching{cursor:wait}
body.report-mode-switching .app-sidebar{pointer-events:none;opacity:.78}
.app-sidebar.collapsed .app-report-mode-wrap{display:none!important}
@media(max-width:760px){.app-report-mode-btn{font-size:11px;padding:9px 7px}}

/* ECOSYST FIX 146-7: clearer sidebar navigation */
.app-sidebar-section-divided{
  margin-top:4px;
  padding-top:14px;
  border-top:1px solid var(--line);
}
.app-sidebar-link,
.app-sidebar-collapse,
.app-sidebar-btn-inline,
.app-sidebar-user-role{
  transition:background .16s ease,border-color .16s ease,box-shadow .16s ease,color .16s ease;
}
.app-sidebar-link:not(.is-disabled):hover,
.app-sidebar-collapse:hover,
.app-sidebar-btn-inline:hover{
  background:rgba(109,40,217,.08);
  border-color:rgba(109,40,217,.18);
}
.app-sidebar-link.active,
.app-sidebar-collapse.app-sidebar-dashboard-link.active{
  border-color:rgba(109,40,217,.28);
  background:rgba(109,40,217,.12);
  box-shadow:inset 3px 0 0 #7c3aed;
}
.app-sidebar-bottom{
  display:grid;
  gap:6px;
  border-top:1px solid var(--line);
}
.app-sidebar-bottom .app-sidebar-btn-inline{
  justify-content:flex-start;
}
.app-sidebar-collapse-action .app-sidebar-icon{
  transition:transform .2s ease;
}
.app-sidebar.collapsed .app-sidebar-collapse-action .app-sidebar-icon{
  transform:rotate(180deg);
}
.app-sidebar.collapsed .app-sidebar-section-divided{
  position:relative;
  margin:4px 0 0;
  padding-top:12px;
  border-top:0;
}
.app-sidebar.collapsed .app-sidebar-section-divided::before{
  content:"";
  position:absolute;
  top:0;
  left:10px;
  right:10px;
  height:1px;
  background:var(--line);
}
body[data-theme="dark"] .app-sidebar-link:not(.is-disabled):hover,
body[data-theme="dark"] .app-sidebar-collapse:hover,
body[data-theme="dark"] .app-sidebar-btn-inline:hover{
  background:rgba(167,139,250,.11);
  border-color:rgba(167,139,250,.2);
}
@media(max-width:760px){
  .app-sidebar-section-divided{margin-top:5px;padding-top:14px}
  .app-sidebar-bottom .app-sidebar-btn-inline{justify-content:flex-start}
  .app-sidebar-collapse-action{display:none!important}
}

/* fix-132: единый компактный стиль сквозного период-виджета и пикера (вся панель) */
#periodControlsMount{margin:0 0 12px 0!important}
.period-section-head{margin:0 0 6px!important}
.period-section-head .section-title{font-size:15px!important;font-weight:800!important;letter-spacing:-.01em!important}
.period-card{border-radius:12px!important;padding:11px 13px!important;margin-bottom:0!important}
.period-quick-btn{min-height:34px!important;border-radius:8px!important;font-size:11.5px!important}
.period-quick-btn-month{font-size:11.5px!important}
.period-picker-open-btn{min-height:34px!important;border-radius:8px!important;border:1px solid var(--line)!important;color:var(--text)!important;font-size:11.5px!important}
.period-summary-text{font-size:11px!important}
.period-picker-card{border-radius:12px!important;box-shadow:0 12px 32px rgba(15,23,42,.12)!important;padding:12px 13px!important}
.period-picker-title{font-size:14px!important}
.period-picker-sub{font-size:11px!important}
.period-picker-close{width:26px!important;height:26px!important;border-radius:7px!important;font-size:16px!important}
.period-picker-preset{min-height:32px!important;border-radius:8px!important;font-size:11px!important}
.period-picker-nav-btn{width:26px!important;height:26px!important;border-radius:7px!important;font-size:14px!important}
.period-picker-range-value{font-size:12px!important}
.period-picker-day{height:30px!important;border-radius:6px!important;font-size:11.5px!important}
.period-picker-month-head{font-size:12px!important;margin-bottom:5px!important}
.period-picker-selected-box{min-height:42px!important;border-radius:8px!important;padding:7px 10px!important}
.period-picker-selected-value{font-size:12px!important}
.period-picker-timezone,.period-picker-tip{font-size:10.5px!important;margin-top:7px!important}
.period-picker-actions{margin-top:11px!important;border-top:1px solid var(--line);padding-top:10px}

/* fix-134 канон: быстрые пресеты периода (сквозные для TikTok/CRM/RNP) — как эталон дашборда */
.period-tabs{display:flex;gap:6px;flex-wrap:wrap}
.period-tab{min-height:34px;padding:0 12px;border-radius:8px;border:1px solid var(--line);background:transparent;color:var(--muted);font-size:11.5px;font-weight:800;letter-spacing:-.01em;cursor:pointer;display:inline-flex;align-items:center;transition:color .12s,border-color .12s,background .12s}
.period-tab:hover{color:var(--text);border-color:var(--line)}
.period-tab.active{background:#0f172a;border-color:#0f172a;color:#fff}
@media(max-width:760px){.period-tabs{width:100%}.period-tab{flex:1;justify-content:center;padding:0 6px}}

/* fix-144-11: compact source reports inside the unified project shell */
html.report-embedded{height:auto!important;min-height:0!important;background:transparent!important;overflow-x:hidden}
body.report-embedded{height:auto!important;min-height:0!important;padding:0!important;background:transparent!important;overflow-x:hidden}
body.report-embedded #appSidebarRoot,
body.report-embedded .app-mobile-bottom-nav,
body.report-embedded .app-mobile-sidebar-overlay,
body.report-embedded #reportModeSwitch{display:none!important}
body.report-embedded .wrap,
body.report-embedded.with-sidebar .wrap,
body.report-embedded.sidebar-collapsed .wrap{display:flow-root;width:100%!important;max-width:none!important;min-height:0!important;margin:0!important;padding:1px 1px 10px!important}

body.report-embedded .report-hero,
body.report-embedded .home-hero{gap:10px!important;margin:0 0 8px!important;padding:12px 14px!important;border:1px solid var(--line)!important;border-radius:12px!important;background:linear-gradient(135deg,var(--card),rgba(248,250,252,.74))!important;box-shadow:none!important}
body[data-theme="dark"].report-embedded .report-hero,
body[data-theme="dark"].report-embedded .home-hero{background:linear-gradient(135deg,var(--card),rgba(30,41,59,.78))!important}
body.report-embedded .report-hero-logo,
body.report-embedded .home-eyebrow{display:none!important}
body.report-embedded .report-hero-copy{padding-right:96px!important}
body.report-embedded .report-hero-title,
body.report-embedded .home-title{margin:0!important;font-size:20px!important;line-height:1.1!important;letter-spacing:-.022em!important}
body.report-embedded .report-hero-meta,
body.report-embedded .home-subtitle{margin-top:4px!important;color:var(--muted)!important;font-size:11px!important;line-height:1.35!important}
body.report-embedded .report-hero-account{max-width:400px;margin-top:8px!important}
body.report-embedded .report-hero-account .label{margin-bottom:4px!important;font-size:10.5px!important}
body.report-embedded .report-hero-field .select,
body.report-embedded .report-hero-field .input{height:36px!important;min-height:36px!important;border-radius:9px!important;font-size:12px!important}
body.report-embedded .report-hero-side{top:11px!important;right:13px!important}
body.report-embedded .report-hero-side-grid{gap:5px!important}
body.report-embedded .report-hero-export-label{margin-bottom:4px!important;font-size:9px!important}
body.report-embedded .report-hero-export-icons{gap:5px!important}
body.report-embedded .hero-icon-btn{width:34px!important;height:34px!important;border-radius:9px!important;box-shadow:none!important}
body.report-embedded .hero-icon-btn .app-sidebar-icon{width:22px!important;height:22px!important;flex-basis:22px!important}

body.report-embedded #periodControlsMount{margin-bottom:8px!important}
body.report-embedded .period-section-head{margin-bottom:4px!important}
body.report-embedded .period-section-head .section-title{font-size:14px!important}
body.report-embedded .period-card{margin-bottom:0!important;padding:9px 11px!important;border-radius:11px!important}
body.report-embedded .period-quick-switch{padding:4px!important;border-radius:10px!important}
body.report-embedded .period-quick-btn,
body.report-embedded .period-picker-open-btn{min-height:32px!important;padding:0 10px!important;border-radius:8px!important;font-size:11px!important}
body.report-embedded .period-summary-text{font-size:10.5px!important}

body.report-embedded .section-head{gap:8px!important;margin:0 0 7px!important}
body.report-embedded .section-title{color:var(--text)!important;font-size:15px!important;font-weight:900!important;line-height:1.18!important;letter-spacing:-.012em!important}
body.report-embedded .mini{font-size:10.5px!important;line-height:1.4!important}
body.report-embedded .card{border-radius:12px!important;box-shadow:none!important}
body.report-embedded .kpis{gap:8px!important;margin-bottom:8px!important}
body.report-embedded .kpi{min-height:0!important;padding:9px 11px!important;column-gap:8px!important;row-gap:4px!important;border-radius:11px!important}
body.report-embedded .kpi .k{font-size:10px!important}
body.report-embedded .kpi .v{font-size:19px!important}
body.report-embedded .kpi .s{font-size:10px!important}
body.report-embedded .dashboard-grid{gap:8px!important;margin-bottom:8px!important}
body.report-embedded .chart-card,
body.report-embedded .list-card,
body.report-embedded .ads-manager-card,
body.report-embedded .daily-cut-card,
body.report-embedded .insight-card,
body.report-embedded .warnings-card,
body.report-embedded .audience-card{padding:11px 12px!important;margin-bottom:8px!important;border-radius:12px!important}
body.report-embedded .chart-wrap{height:310px!important}
body.report-embedded .ads-manager-toolbar{gap:8px!important;margin-bottom:8px!important}
body.report-embedded .ads-manager-levels{gap:5px!important}
body.report-embedded .ads-manager-level-btn,
body.report-embedded .ads-manager-reset{height:34px!important;min-height:34px!important;padding:0 10px!important;border-radius:9px!important;font-size:11px!important}
body.report-embedded .daily-cut-insights{gap:8px!important;margin-bottom:8px!important}
body.report-embedded .daily-cut-insight{padding:9px 10px!important;border-radius:10px!important}
body.report-embedded .daily-cut-insight-title{margin-bottom:4px!important;font-size:10px!important}
body.report-embedded .insight-summary-grid,
body.report-embedded .insight-campaign-grid,
body.report-embedded .insight-ad-sections-grid,
body.report-embedded .insight-ad-grid{gap:8px!important}
body.report-embedded .insight-summary-card,
body.report-embedded .insight-section,
body.report-embedded .insight-campaign-card,
body.report-embedded .insight-ad-card{padding:9px 10px!important;border-radius:10px!important}
body.report-embedded .audience-grid{gap:8px!important;margin-top:8px!important}
body.report-embedded #audienceSectionHead{margin-top:8px!important}
body.report-embedded .audience-layout{gap:10px!important;grid-template-columns:minmax(0,1fr) 132px!important}
body.report-embedded .audience-layout.is-crm{grid-template-columns:1fr!important}
body.report-embedded .audience-donut{width:118px!important;height:118px!important}
body.report-embedded table.report{overflow:hidden!important;border-radius:10px!important}
body.report-embedded table.report th,
body.report-embedded table.report td{padding:7px 8px!important;font-size:11.5px!important}
body.report-embedded table.report thead th{font-size:10px!important;font-weight:900!important;letter-spacing:.015em!important}
body.report-embedded .daily-cut-table th,
body.report-embedded .daily-cut-table td{padding:7px 8px!important;font-size:11px!important}

body.report-embedded .crm-report-page section.card:not(.home-hero){padding:11px 13px!important;margin-bottom:8px!important;border-radius:12px!important}
body.report-embedded .crm-funnel{gap:8px!important}
body.report-embedded .crm-funnel-item{padding:11px 12px!important;border-radius:11px!important}
body.report-embedded .crm-funnel-item strong{margin-top:5px!important;font-size:22px!important}
body.report-embedded .crm-stagebars{gap:7px!important}
body.report-embedded .crm-deals-head,
body.report-embedded .crm-deal-filters{margin-bottom:7px!important}

body.report-embedded .rnp-project-page>section.card:not(.report-hero):not(.period-card){padding:12px 14px!important;margin-bottom:9px!important}
body.report-embedded .rnp-project-kpis{gap:8px!important;margin-bottom:10px!important}
body.report-embedded .rnp-project-kpi{min-height:88px!important;padding:11px 12px!important;border-radius:13px!important;gap:4px!important}
body.report-embedded .rnp-project-kpi span{font-size:10px!important}
body.report-embedded .rnp-project-kpi strong{font-size:23px!important}
body.report-embedded .rnp-project-kpi small{font-size:10.5px!important}
body.report-embedded .rnp-project-funnel{gap:7px!important}
body.report-embedded .rnp-project-funnel-step{padding:11px 12px!important;border-radius:13px!important;gap:5px!important}
body.report-embedded .rnp-project-funnel-step strong{font-size:23px!important}
body.report-embedded .rnp-scope-tabs{gap:5px!important}
body.report-embedded .rnp-scope-tab{min-height:34px!important;padding:6px 10px!important;border-radius:9px!important;font-size:11px!important}
body.report-embedded .rnp-scope-note{margin-bottom:8px!important;padding:8px 10px!important;border-radius:10px!important;font-size:11px!important}

body.report-embedded .tt-metric-section,
body.report-embedded .tt-insights-card{padding:11px 12px!important;margin-top:8px!important;border-radius:12px!important}
body.report-embedded .tt-quick-insights,
body.report-embedded .tt-top-grid{gap:8px!important;margin-bottom:9px!important}
body.report-embedded .tt-insight-box{padding:9px!important;border-radius:10px!important}
body.report-embedded .tt-top-list{gap:6px!important}
body.report-embedded .tt-top-item{gap:8px!important;padding:8px!important;border-radius:10px!important}
body.report-embedded .tt-top-item img{width:44px!important;height:44px!important;border-radius:9px!important}
body.report-embedded .tt-funnel{gap:7px!important}
body.report-embedded .tt-funnel-step{padding:11px 12px!important;border-radius:13px!important}
body.report-embedded .tt-funnel-step b{margin-top:8px!important;font-size:27px!important}
body.report-embedded .tt-funnel-step small{margin-top:5px!important}
body.report-embedded .tt-empty{min-height:120px!important}
body.report-embedded .report-legal-footer,
body.report-embedded #loadStatus,
body.report-embedded .smm-load-status,
body.report-embedded [aria-label="Правовая информация"]{display:none!important}

@media(max-width:760px){
  body.report-embedded .wrap,
  body.report-embedded.with-sidebar .wrap,
  body.report-embedded.sidebar-collapsed .wrap{padding:0 0 8px!important}
  body.report-embedded .report-hero,
  body.report-embedded .home-hero{padding:10px 11px!important;border-radius:11px!important}
  body.report-embedded .report-hero-copy{padding-right:0!important}
  body.report-embedded .report-hero-title,
  body.report-embedded .home-title{font-size:18px!important}
  body.report-embedded .report-hero-side{position:static!important;width:100%!important}
  body.report-embedded .report-hero-field .select,
  body.report-embedded .report-hero-field .input{height:40px!important;min-height:40px!important}
  body.report-embedded .period-quick-btn,
  body.report-embedded .period-picker-open-btn{min-height:40px!important}
  body.report-embedded .section-title{font-size:15px!important}
  body.report-embedded .chart-wrap{height:280px!important}
  body.report-embedded .rnp-scope-tab{min-height:40px!important}
}
@media(min-width:381px) and (max-width:760px){
  body.report-embedded .tt-secondary-kpis,
  body.report-embedded .rnp-project-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
