:root{--page-bg:#f6f8fb;--card-bg:#fff;--border:#dfe6ef;--ink:#0f1b33;--muted:#5d6b82;--blue:#2563eb;--green:#10a46f;--yellow:#e5a100;--purple:#8a3ffc;--danger:#dc2626;--navy:#071a3d}*{box-sizing:border-box}body{background:var(--page-bg);color:var(--ink);font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:15px}.app-shell{max-width:1840px}.topbar{position:sticky;top:0;z-index:10;background:rgba(255,255,255,.96);border-bottom:1px solid var(--border);backdrop-filter:blur(12px)}.panel-header-grid{display:grid;grid-template-columns:minmax(245px,1fr) auto 370px;align-items:center;gap:1rem}.panel-brand{display:flex;align-items:center;gap:1rem;min-width:0}.brand-icon,.metric-icon{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto}.brand-icon{width:48px;height:48px;color:var(--blue);font-size:2rem}.main-menu{display:flex;gap:.5rem;flex-wrap:wrap;justify-content:center}.menu-link{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;min-height:42px;padding:.55rem .9rem;color:var(--ink);font-weight:700;text-decoration:none;background:#fff;border:1px solid var(--border);border-radius:8px;white-space:nowrap}.menu-link:hover{color:var(--blue);border-color:#b9c9e6}.menu-link.active{color:#fff;background:var(--blue);border-color:var(--blue)}.segmented{display:inline-grid;grid-template-columns:repeat(4,minmax(86px,1fr));overflow:hidden;border:1px solid var(--border);border-radius:8px;background:#fff}.segment-link{padding:.75rem .9rem;color:var(--ink);font-weight:700;text-align:center;text-decoration:none;border-right:1px solid var(--border);white-space:nowrap}.segment-link:last-child{border-right:0}.segment-link.active{color:#fff;background:var(--blue)}.header-spacer{width:370px;min-width:370px;height:42px;visibility:hidden}.panel{background:var(--card-bg);border:1px solid var(--border);border-radius:8px;box-shadow:0 14px 32px rgba(15,27,51,.05)}.muted-copy{color:var(--muted)}.metric-card{height:100%;padding:1.25rem;transition:transform .18s ease,box-shadow .18s ease}.metric-card:hover{transform:translateY(-2px);box-shadow:0 18px 38px rgba(15,27,51,.09)}.metric-icon{width:58px;height:58px;font-size:1.65rem;border-radius:50%}.tone-blue .metric-icon{color:var(--blue);background:#eaf1ff}.tone-green .metric-icon{color:var(--green);background:#e8f8f1}.tone-yellow .metric-icon{color:var(--yellow);background:#fff3d9}.tone-purple .metric-icon{color:var(--purple);background:#f2e8ff}.metric-value{font-size:2rem;line-height:1}.trend-up{color:#0f9f56}.trend-down{color:var(--danger)}.trend-neutral{color:var(--muted)}.sparkline-wrap{width:120px;height:48px}.chart-wrap{height:340px}.table-card .table{--bs-table-bg:transparent;margin-bottom:0}.table-card thead th{color:#47566f;font-size:.88rem;font-weight:800;border-bottom-color:#cfd8e5;white-space:nowrap}.table-card tbody td{padding-top:1rem;padding-bottom:1rem;color:#14213d;border-color:#edf1f6;vertical-align:middle}.table-responsive{overflow-x:auto}.page-link-label{max-width:720px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.empty-state{padding:3rem 1rem;text-align:center;color:var(--muted)}.campaign-banner,.hero-panel{background:linear-gradient(135deg,#eef5ff 0%,#fff 100%);border:1px solid var(--border);border-radius:8px;box-shadow:0 12px 28px rgba(15,27,51,.05)}.campaign-banner{padding:1rem 1.25rem}.hero-panel{padding:1.75rem}.campaign-card{height:100%;padding:1.5rem;transition:transform .18s ease,box-shadow .18s ease}.campaign-card:hover{transform:translateY(-3px);box-shadow:0 18px 38px rgba(15,27,51,.09)}.tag{display:inline-flex;align-items:center;border-radius:999px;background:#eaf1ff;color:#1f4b99;font-weight:800;font-size:.82rem;padding:.35rem .7rem}.feature-list{padding-left:0;list-style:none}.feature-list li{display:flex;gap:.55rem;margin-bottom:.55rem;color:#31415c}.feature-list i{color:var(--green)}.price{font-size:1.2rem;font-weight:800}.whatsapp-btn{background:#128c7e;border-color:#128c7e;color:#fff;font-weight:800;border-radius:8px}.whatsapp-btn:hover{background:#0f766c;border-color:#0f766c;color:#fff}.login-shell{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:2rem 1rem;background:radial-gradient(circle at top left,rgba(37,99,235,.12),transparent 34rem),linear-gradient(180deg,#fff 0%,var(--page-bg) 100%)}.login-card{width:100%;max-width:560px;background:#fff;border:1px solid var(--border);border-radius:12px;box-shadow:0 24px 70px rgba(15,27,51,.10);padding:2rem}.form-control,.form-select{border-color:var(--border);border-radius:8px}.btn{border-radius:8px;font-weight:700}.btn-primary{background:var(--blue);border-color:var(--blue)}.admin-stat{padding:1.2rem}.admin-stat .stat-icon{width:44px;height:44px;display:inline-flex;align-items:center;justify-content:center;border-radius:12px;background:#eaf1ff;color:var(--blue);font-size:1.35rem}.admin-actions{display:flex;flex-wrap:wrap;gap:.4rem;justify-content:flex-end}.code-preview{white-space:pre-wrap;word-break:break-all;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.88rem;background:#f7f9fc;border:1px solid var(--border);border-radius:8px;padding:1rem}@media(max-width:1199.98px){.panel-header-grid{grid-template-columns:1fr}.main-menu{justify-content:flex-start}.segmented{width:max-content}.header-spacer{display:none}}@media(max-width:767.98px){.topbar{position:static}.app-shell{padding-left:1rem!important;padding-right:1rem!important}.panel-brand{align-items:flex-start}.main-menu{width:100%}.menu-link{flex:1 1 calc(50% - .5rem);white-space:normal}.segmented{display:grid;width:100%;grid-template-columns:repeat(2,1fr)}.segment-link{border-bottom:1px solid var(--border)}.segment-link:nth-child(2n){border-right:0}.metric-value{font-size:1.75rem}.sparkline-wrap{display:none}.hero-panel{padding:1.25rem}.admin-actions{justify-content:flex-start}.table{min-width:720px}}

/* Polished customer panel header */
.topbar{background:rgba(255,255,255,.98);box-shadow:0 10px 28px rgba(15,27,51,.06)}
.panel-header-grid{display:grid;grid-template-columns:minmax(220px,290px) minmax(0,1fr);align-items:center;gap:1.25rem}
.panel-brand{gap:.85rem}.panel-brand h1{line-height:1.12}.brand-icon{width:42px;height:42px;font-size:1.7rem;border:1px solid #dbe6f8;border-radius:12px;background:#f3f7ff}
.header-control-area{display:flex;align-items:center;justify-content:flex-end;gap:.8rem;min-width:0}
.primary-menu{display:flex;align-items:center;gap:.25rem;flex-wrap:nowrap;justify-content:center;padding:.25rem;background:#f3f6fb;border:1px solid var(--border);border-radius:12px;box-shadow:inset 0 1px 0 rgba(255,255,255,.8)}
.primary-menu .menu-link{border:0;background:transparent;min-height:40px;padding:.56rem .82rem;border-radius:9px;box-shadow:none;color:#263652}
.primary-menu .menu-link:hover{background:#fff;color:var(--blue);box-shadow:0 6px 16px rgba(15,27,51,.07)}
.primary-menu .menu-link.active{background:var(--blue);color:#fff;box-shadow:0 10px 20px rgba(37,99,235,.22)}
.header-side{display:flex;align-items:center;justify-content:flex-end;gap:.65rem;min-width:0}
.account-menu{display:flex;align-items:center;gap:.4rem;flex-wrap:nowrap}
.account-menu .menu-link{min-height:40px;padding:.55rem .72rem;background:#fff;border-color:#d8e2ef;color:#22324d;border-radius:10px;box-shadow:0 6px 16px rgba(15,27,51,.04)}
.account-menu .menu-link:hover{border-color:#b9c9e6;color:var(--blue);transform:translateY(-1px)}
.account-menu .menu-link.active{background:#0f1b33;border-color:#0f1b33;color:#fff}
.menu-link{transition:background .18s ease,border-color .18s ease,color .18s ease,box-shadow .18s ease,transform .18s ease}
.segmented{grid-template-columns:repeat(4,minmax(68px,1fr));border-radius:12px;box-shadow:0 6px 16px rgba(15,27,51,.04)}
.segment-link{min-height:40px;display:flex;align-items:center;justify-content:center;padding:.55rem .72rem;font-size:.93rem}
.segment-link.active{box-shadow:inset 0 0 0 1px rgba(255,255,255,.18)}
@media(max-width:1199.98px){.panel-header-grid{grid-template-columns:1fr}.header-control-area{justify-content:space-between;align-items:flex-start}.header-side{margin-left:auto}.topbar .app-shell{padding-top:.85rem!important;padding-bottom:.85rem!important}}
@media(max-width:991.98px){.header-control-area{flex-direction:column;align-items:stretch}.primary-menu{width:100%;justify-content:stretch}.primary-menu .menu-link{flex:1}.header-side{width:100%;margin-left:0;justify-content:space-between}.segmented{flex:1}.account-menu{flex:0 0 auto}}
@media(max-width:767.98px){.topbar{position:static}.panel-brand{align-items:center}.brand-icon{width:40px;height:40px}.primary-menu{display:grid;grid-template-columns:repeat(3,1fr)}.primary-menu .menu-link{min-width:0;padding:.55rem .45rem}.primary-menu .menu-link span,.account-menu .menu-link span{font-size:.9rem}.header-side{flex-direction:column;align-items:stretch}.account-menu{display:grid;grid-template-columns:repeat(2,1fr)}.account-menu .menu-link{justify-content:center}.segmented{width:100%;grid-template-columns:repeat(4,1fr)}.segment-link{font-size:.86rem;padding:.52rem .35rem}}
@media(max-width:420px){.panel-brand h1{font-size:1rem}.primary-menu .menu-link{gap:.35rem}.segmented{grid-template-columns:repeat(2,1fr)}}
/* Header v3: full labels, date filter outside menu */
.panel-topbar-v2 .app-shell{display:flex;flex-direction:column;gap:.85rem}
.topbar-row{display:flex;align-items:center;justify-content:space-between;gap:1rem;min-width:0}
.topbar-main-row{padding-bottom:.15rem}
.topbar-nav-row{justify-content:center}
.panel-topbar-v2 .panel-brand{min-width:260px}.panel-topbar-v2 .brand-icon{width:42px;height:42px;border-radius:12px;background:#f3f7ff;border:1px solid #dbe6f8;font-size:1.55rem}
.panel-topbar-v2 .primary-menu{display:inline-flex;width:auto;max-width:100%;padding:.25rem;background:#f3f6fb;border:1px solid var(--border);border-radius:14px;gap:.25rem;box-shadow:inset 0 1px 0 rgba(255,255,255,.85)}
.panel-topbar-v2 .primary-menu .menu-link{flex:0 0 auto;min-width:178px;padding:.62rem 1rem;border:0;background:transparent;border-radius:11px;color:#24324b;white-space:nowrap}
.panel-topbar-v2 .primary-menu .menu-link.active{background:var(--blue);color:#fff;box-shadow:0 10px 22px rgba(37,99,235,.22)}
.panel-topbar-v2 .account-menu{display:flex;gap:.45rem;flex:0 0 auto}.panel-topbar-v2 .account-menu .menu-link{min-width:132px;padding:.58rem .85rem;border-radius:11px;background:#fff;border-color:#d8e2ef;white-space:nowrap}.panel-topbar-v2 .account-menu .menu-link.active{background:#0f1b33;color:#fff;border-color:#0f1b33}
.filter-bar{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.9rem 1rem}.filter-title{font-weight:800;color:var(--ink)}.filter-bar .segmented{flex:0 0 auto;min-width:420px}
@media(max-width:991.98px){.topbar-row{align-items:stretch}.topbar-main-row,.topbar-nav-row{flex-direction:column}.panel-topbar-v2 .panel-brand{min-width:0}.panel-topbar-v2 .account-menu{width:100%;display:grid;grid-template-columns:repeat(2,1fr)}.panel-topbar-v2 .account-menu .menu-link{min-width:0}.panel-topbar-v2 .primary-menu{width:100%;display:grid;grid-template-columns:repeat(3,1fr)}.panel-topbar-v2 .primary-menu .menu-link{min-width:0}.filter-bar{align-items:stretch;flex-direction:column}.filter-bar .segmented{width:100%;min-width:0}}
@media(max-width:575.98px){.panel-topbar-v2 .primary-menu{grid-template-columns:1fr}.panel-topbar-v2 .account-menu{grid-template-columns:1fr}.filter-bar .segmented{grid-template-columns:repeat(2,1fr)}}
/* Header v4: slim desktop menu, icon account actions, hamburger mobile */
.panel-topbar-v3{background:rgba(255,255,255,.98);box-shadow:0 8px 24px rgba(15,27,51,.055)}
.panel-topbar-v3 .app-shell{display:block}.panel-topbar-v3 .topbar-row{display:grid;grid-template-columns:minmax(250px,310px) minmax(0,1fr) auto auto;align-items:center;gap:1rem}
.panel-topbar-v3 .panel-brand{gap:.75rem;min-width:0}.panel-topbar-v3 .panel-brand h1{font-size:1.15rem;line-height:1.15}.panel-topbar-v3 .brand-icon{width:40px;height:40px;border-radius:10px;background:#f4f7ff;border:1px solid #dce6f6;font-size:1.45rem}
.panel-topbar-v3 .primary-menu{justify-self:center;display:inline-flex;width:auto;max-width:100%;gap:.2rem;padding:.22rem;background:#f5f7fb;border:1px solid #dfe7f2;border-radius:12px;box-shadow:none}
.panel-topbar-v3 .primary-menu .menu-link{min-height:36px;min-width:0;padding:.48rem .78rem;border:0;border-radius:9px;background:transparent;color:#28364f;font-size:.94rem;font-weight:600;line-height:1;white-space:nowrap;box-shadow:none}
.panel-topbar-v3 .primary-menu .menu-link i{font-size:.96rem}.panel-topbar-v3 .primary-menu .menu-link:hover{background:#fff;color:var(--blue);box-shadow:0 4px 12px rgba(15,27,51,.06)}.panel-topbar-v3 .primary-menu .menu-link.active{background:var(--blue);color:#fff;box-shadow:0 8px 18px rgba(37,99,235,.2)}
.panel-topbar-v3 .desktop-account-menu{display:flex;gap:.4rem}.icon-menu-link{width:38px;height:38px;display:inline-flex;align-items:center;justify-content:center;border:1px solid #d8e2ef;border-radius:10px;background:#fff;color:#25334d;text-decoration:none;font-size:1rem;box-shadow:0 5px 14px rgba(15,27,51,.04);transition:all .18s ease}.icon-menu-link:hover{color:var(--blue);border-color:#b9c9e6;transform:translateY(-1px)}.icon-menu-link.active{background:#0f1b33;border-color:#0f1b33;color:#fff}
.mobile-menu-toggle,.hamburger-button,.mobile-menu-panel{display:none}.hamburger-button{width:40px;height:40px;align-items:center;justify-content:center;border:1px solid #d8e2ef;border-radius:10px;background:#fff;color:#17233c;font-size:1.35rem;cursor:pointer}
.mobile-menu-panel{padding-top:.85rem}.mobile-menu-panel nav{display:grid;gap:.45rem;padding:.55rem;background:#f5f7fb;border:1px solid var(--border);border-radius:12px}.mobile-menu-link{display:flex;align-items:center;gap:.65rem;padding:.72rem .8rem;border-radius:9px;color:#263652;text-decoration:none;font-weight:650}.mobile-menu-link.active{background:var(--blue);color:#fff}.mobile-menu-link:not(.active):hover{background:#fff;color:var(--blue)}
@media(max-width:991.98px){.panel-topbar-v3 .topbar-row{grid-template-columns:minmax(0,1fr) auto}.panel-topbar-v3 .desktop-menu,.panel-topbar-v3 .desktop-account-menu{display:none}.hamburger-button{display:inline-flex}.mobile-menu-toggle:checked ~ .hamburger-button{background:var(--blue);border-color:var(--blue);color:#fff}.panel-topbar-v3 .app-shell:has(.mobile-menu-toggle:checked) .mobile-menu-panel{display:block}}
@supports not selector(:has(*)){@media(max-width:991.98px){.mobile-menu-toggle:checked ~ .mobile-menu-panel{display:block}}}
@media(max-width:575.98px){.panel-topbar-v3 .panel-brand h1{font-size:1rem}.panel-topbar-v3 .brand-icon{width:38px;height:38px}.filter-bar{padding:.85rem}.filter-bar .segmented{grid-template-columns:repeat(2,1fr)}}
/* Fixed-height reporting tables with safe URL truncation */
.fixed-table-card{display:flex;flex-direction:column;min-height:0;overflow:hidden}
.fixed-table-card .table-scroll{max-height:350px;overflow-y:auto;overflow-x:auto;border-radius:8px;min-height:0;scrollbar-width:thin;scrollbar-color:#b8c4d6 #f3f6fb}
.fixed-table-card .table-scroll::-webkit-scrollbar{width:8px;height:8px}.fixed-table-card .table-scroll::-webkit-scrollbar-track{background:#f3f6fb;border-radius:999px}.fixed-table-card .table-scroll::-webkit-scrollbar-thumb{background:#b8c4d6;border-radius:999px;border:2px solid #f3f6fb}.fixed-table-card .table-scroll::-webkit-scrollbar-thumb:hover{background:#8ea0ba}
.fixed-table-card table{table-layout:fixed;width:100%;min-width:0}.fixed-table-card thead th{position:sticky;top:0;z-index:2;background:#fff;box-shadow:0 1px 0 #cfd8e5}.fixed-table-card tbody td{overflow:hidden;vertical-align:middle}
.page-link-label{display:block!important;width:100%;max-width:100%;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;word-break:normal!important;line-height:1.35}
.interaction-pages-table th:first-child,.interaction-pages-table td:first-child{width:auto;min-width:0}.interaction-pages-table th:not(:first-child),.interaction-pages-table td:not(:first-child){width:104px;white-space:nowrap}
.google-pages-table th:first-child,.google-pages-table td:first-child{width:auto;min-width:0}.google-pages-table th:not(:first-child),.google-pages-table td:not(:first-child){width:118px;white-space:nowrap}
.recent-table th:nth-child(1),.recent-table td:nth-child(1){width:142px;white-space:nowrap}.recent-table th:nth-child(2),.recent-table td:nth-child(2){width:132px;white-space:nowrap}.recent-table th:nth-child(3),.recent-table td:nth-child(3){width:112px;white-space:nowrap}.recent-table th:nth-child(4),.recent-table td:nth-child(4){width:auto;min-width:0}.recent-table th:nth-child(5),.recent-table td:nth-child(5){width:150px;min-width:0}
@media(max-width:767.98px){.fixed-table-card{max-width:100%;overflow:hidden}.fixed-table-card .table-scroll{max-height:350px;overflow-x:auto}.fixed-table-card table{min-width:620px}.recent-table{min-width:760px}.interaction-pages-table{min-width:650px}.google-pages-table{min-width:650px}.page-link-label{max-width:100%}.app-shell{overflow-x:hidden}}
/* Source badges in traffic tables */
.source-pill{display:inline-flex;align-items:center;gap:.42rem;max-width:100%;height:28px;padding:.28rem .58rem;border-radius:999px;font-size:.82rem;font-weight:750;line-height:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border:1px solid transparent}
.source-pill i{font-size:.9rem;flex:0 0 auto}.source-pill span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.source-google{color:#1d4ed8;background:#eaf1ff;border-color:#cfe0ff}.source-ai{color:#6d28d9;background:#f3e8ff;border-color:#e4d0ff}.source-social{color:#047857;background:#e8f8f1;border-color:#c8efdf}.source-yandex{color:#b45309;background:#fff3d9;border-color:#ffe1a6}.source-bing{color:#0369a1;background:#e0f2fe;border-color:#bae6fd}.source-direct{color:#334155;background:#f1f5f9;border-color:#dbe3ef}.source-other{color:#475569;background:#f8fafc;border-color:#e2e8f0}
.interaction-pages-table th:nth-child(2),.interaction-pages-table td:nth-child(2){width:132px}.interaction-pages-table th:nth-child(n+3),.interaction-pages-table td:nth-child(n+3){width:104px;white-space:nowrap}
.recent-table .source-pill,.interaction-pages-table .source-pill{width:100%;justify-content:flex-start}.recent-table th:nth-child(3),.recent-table td:nth-child(3){width:138px}.platform-source-table .source-pill{min-width:130px;max-width:190px}
@media(max-width:767.98px){.interaction-pages-table{min-width:780px}.platform-source-table{min-width:720px}.source-pill{height:30px}}.google-pages-table th:nth-child(2),.google-pages-table td:nth-child(2){width:118px}.google-pages-table th:nth-child(n+3),.google-pages-table td:nth-child(n+3){width:112px;white-space:nowrap}.google-pages-table .source-pill{width:100%;justify-content:flex-start}
/* Mobile hard limit for scrollable report cards */
.fixed-table-card.h-100{height:auto!important}
.fixed-table-card{max-height:430px!important}
.fixed-table-card .table-scroll{height:350px!important;max-height:350px!important;overflow-y:scroll!important;overflow-x:auto!important;overscroll-behavior:contain;scrollbar-gutter:stable both-edges}
@media(max-width:767.98px){.fixed-table-card{height:auto!important;max-height:340px!important;padding:1rem!important}.fixed-table-card .h5{font-size:.98rem;margin-bottom:.75rem!important}.fixed-table-card .table-scroll{height:260px!important;max-height:260px!important;overflow-y:scroll!important;overflow-x:auto!important}.fixed-table-card .table tbody td{padding-top:.72rem;padding-bottom:.72rem}.fixed-table-card .table thead th{font-size:.78rem}.recent-table{min-width:720px}.interaction-pages-table{min-width:760px}}
@media(max-width:420px){.fixed-table-card{max-height:320px!important}.fixed-table-card .table-scroll{height:240px!important;max-height:240px!important}}