/* Server-rendered controls and integration adapters. */
[data-push-settings] .button-row { display:flex; flex-wrap:wrap; gap:10px; }
[data-push-settings] [hidden] { display:none; }
[data-push-settings] > p { line-height:1.7; }
[data-push-settings] .card-head { margin-bottom:0; }
.wa-workspace { display:grid; gap:20px; margin-top:24px; }
.wa-provider { display:flex; flex-direction:column; gap:20px; }
.wa-provider[hidden],.wa-qr-frame [hidden],.wa-pairing [hidden] { display:none !important; }
.wa-provider-tabs { display:inline-flex; justify-self:start; gap:4px; padding:4px; border:1px solid var(--border); border-radius:14px; background:var(--input-surface); max-width:100%; }
.wa-provider-tabs button { position:relative; display:inline-flex; align-items:center; gap:6px; min-height:40px; padding:0 16px; border:0; border-radius:10px; background:transparent; color:var(--muted); font:inherit; font-size:14px; font-weight:600; line-height:1; cursor:pointer; transition:background-color 160ms ease,color 160ms ease; }
.wa-provider-tabs button small { font-size:11px; font-weight:500; line-height:1; opacity:.75; }
.wa-provider-tabs button:hover { color:var(--navy); }
.wa-provider-tabs button[aria-selected="true"] { background:var(--surface); color:var(--navy); box-shadow:0 1px 3px #071b3614; }
.wa-provider-tabs button:focus-visible { outline:2px solid var(--primary); outline-offset:-2px; }
.wa-tab-active { width:6px; height:6px; margin-left:2px; border-radius:50%; background:var(--success,#15803d); }
.wa-frame-state.is-offline .icon { color:var(--warning,#a9650b); }
[data-view="offline"] .wa-pairing-button .icon { display:none; }
.wa-active-badge { display:inline-flex; align-items:center; gap:5px; }
.wa-active-badge .icon { width:14px; height:14px; }
.wa-status-line { display:flex; align-items:center; gap:9px; flex-wrap:wrap; }
.wa-status { margin:0; color:var(--navy); font-weight:600; font-size:13px; }
.wa-status-dot { width:8px; height:8px; border-radius:50%; background:var(--muted); flex-shrink:0; }
.wa-status-dot[data-connected] { background:var(--success,#15803d); }
.wa-setup-layout,.wa-baileys-layout { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(240px,1fr); gap:32px; align-items:start; }
.wa-cloud-form,.wa-form-section { display:grid; gap:14px; }
.wa-form-section { padding-bottom:22px; border-bottom:1px solid var(--border); }
.wa-form-section + .wa-form-section { padding-top:8px; }
.wa-form-section h3,.wa-setup-help h3 { margin:0 0 4px; font-size:14px; color:var(--navy); }
.wa-field-pair { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.wa-cloud-form small { font-size:12px; line-height:1.6; }
.wa-form-actions { padding-top:4px; }
.wa-verify-action { display:flex; align-items:center; gap:14px; flex-wrap:wrap; margin-top:14px; }
.wa-verify-action small { font-size:11px; }
.wa-setup-help { min-width:0; display:grid; gap:20px; padding:22px; background:var(--primary-soft); border:1px solid var(--border); border-radius:14px; }
.wa-setup-help p { margin:0; font-size:12px; line-height:1.8; color:var(--muted); }
.wa-setup-help summary { font-size:12px; color:var(--navy); font-weight:600; cursor:pointer; }
.wa-setup-help details p { margin-top:12px; }
.wa-cloud-metadata { display:grid; gap:18px; margin:0; }
.wa-cloud-metadata dt { color:var(--muted); font-size:11px; }
.wa-cloud-metadata dd { margin:6px 0 0; min-width:0; font-size:12px; }
.wa-provider code,.recipient-row small { overflow-wrap:anywhere; }
.wa-pairing { min-width:0; display:grid; justify-items:center; gap:14px; padding:22px; border:1px solid var(--border); border-radius:16px; }
.wa-pairing-head { display:flex; align-items:center; justify-content:space-between; gap:12px; width:min(300px,100%); }
.wa-chip { display:inline-flex; align-items:center; gap:7px; color:var(--navy); font-size:13px; font-weight:600; }
.wa-chip[data-wa-tone="success"] .wa-status-dot { background:var(--success,#15803d); }
.wa-chip[data-wa-tone="pending"] .wa-status-dot { background:var(--warning,#a9650b); animation:wa-pulse 1.4s ease-in-out infinite; }
.wa-chip[data-wa-tone="warning"] .wa-status-dot { background:var(--warning,#a9650b); }
.wa-countdown { color:var(--muted); font-size:12px; font-variant-numeric:tabular-nums; }
.wa-qr-frame { position:relative; display:grid; place-items:center; width:min(300px,100%); aspect-ratio:1; border-radius:16px; background:var(--input-surface); overflow:hidden; }
[data-view="qr"] .wa-qr-frame { background:#fff; box-shadow:inset 0 0 0 1px var(--border); }
.wa-qr-frame img { display:block; width:100%; height:100%; object-fit:contain; image-rendering:pixelated; }
.wa-frame-state { display:grid; justify-items:center; gap:8px; padding:24px; text-align:center; }
.wa-frame-state .icon { width:40px; height:40px; color:var(--muted); stroke-width:1.5; }
.wa-frame-state.is-connected .icon { color:var(--success,#15803d); }
.wa-frame-state strong { color:var(--navy); font-size:15px; }
.wa-frame-state span { color:var(--muted); font-size:13px; line-height:1.5; overflow-wrap:anywhere; }
.wa-spinner { width:28px; height:28px; border:3px solid var(--border); border-top-color:var(--primary); border-radius:50%; animation:wa-spin .8s linear infinite; }
.wa-qr-timer { width:min(300px,100%); height:3px; border-radius:99px; background:var(--border); overflow:hidden; }
.wa-qr-timer span { display:block; height:100%; background:var(--primary); transform-origin:left; transition:transform 1s linear; }
.wa-pairing-message { width:min(300px,100%); margin:0; padding:10px 12px; border-radius:10px; background:color-mix(in srgb,var(--warning,#a9650b) 10%,var(--surface)); color:var(--ink); font-size:12px; line-height:1.55; }
.wa-pairing-message[data-tone="danger"] { background:color-mix(in srgb,var(--danger,#b42318) 9%,var(--surface)); color:var(--danger,#b42318); }
.wa-pairing-message:empty { display:none; }
.wa-pairing-button { width:min(300px,100%); justify-content:center; }
.wa-pairing-steps { display:grid; gap:12px; padding-left:20px; margin:0; font-size:13px; line-height:1.6; color:var(--navy); }
.wa-pairing-steps li { padding-left:4px; }
.wa-risk-note { display:flex; align-items:flex-start; gap:10px; padding-top:16px; border-top:1px solid var(--border); }
.wa-risk-note > .icon { flex-shrink:0; width:18px; height:18px; color:var(--muted); }
.wa-disconnect { justify-self:start; padding:0; border:0; background:none; color:var(--danger,#b42318); font:inherit; font-size:13px; font-weight:600; cursor:pointer; }
.wa-disconnect:hover { text-decoration:underline; }
.wa-panel-footnote { display:flex; align-items:center; gap:9px; padding-top:18px; border-top:1px solid var(--border); font-size:12px; line-height:1.6; color:var(--muted); }
.wa-panel-footnote .icon { width:16px; height:16px; flex-shrink:0; }
@keyframes wa-spin { to { transform:rotate(360deg); } }
@keyframes wa-pulse { 50% { opacity:.35; } }
@media (prefers-reduced-motion:reduce) { .wa-spinner,.wa-chip .wa-status-dot { animation:none; } .wa-qr-timer span { transition:none; } }
@media(max-width:1100px) { .wa-setup-layout,.wa-baileys-layout { grid-template-columns:minmax(0,1fr); gap:20px; } }
@media(max-width:600px) { .wa-workspace { gap:16px; margin-top:16px; } .wa-provider-tabs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); justify-self:stretch; } .wa-provider-tabs button { justify-content:center; padding:0 10px; } .wa-field-pair { grid-template-columns:minmax(0,1fr); } .wa-setup-help,.wa-pairing { padding:16px; } .wa-provider .card-head form,.wa-provider .card-head .btn,.wa-form-actions .btn,.wa-verify-action .btn { width:100%; } }
.report-empty-state { display:grid; grid-template-columns:minmax(0,1fr); justify-items:center; align-content:center; gap:14px; padding:36px 16px; min-height:380px; width:100%; min-width:0; box-sizing:border-box; text-align:center; }
.report-empty-state .notice-empty-art { width:min(280px,100%); min-width:0; }
.report-empty-state .notice-empty-art img { display:block; width:100%; max-width:100%; height:auto; }
.report-empty-state > h3, .report-empty-state > p { max-width:100%; overflow-wrap:break-word; }
.report-empty-state h3 { margin:0; color:var(--navy); font-size:19px; line-height:1.4; font-weight:650; }
.report-empty-state > p { margin:0; max-width:360px; color:var(--muted); font-size:14px; line-height:1.7; }
.report-empty-compact { min-height:300px; flex:0 0 100%; padding-block:24px; }
.report-empty-compact .notice-empty-art { width:220px; margin-bottom:0; }
.report-empty-compact .notice-empty-art img { width:152px; }
.login-field-error { color:#b42318; font-size:12px; line-height:1.5; margin:6px 0 0; }
.login-field .login-input:has([aria-invalid="true"]) { border-color:#b42318; }
.history-page #reports-list > .empty { display:flex; flex-direction:column; align-items:center; gap:12px; }
.history-page #reports-list > .empty > .icon,
.history-page #reports-list > .empty > h3,
.history-page #reports-list > .empty > p,
.history-page #reports-list > .empty > .btn { margin:0; }
.ad-trend-filter { display:flex; flex-wrap:wrap; align-items:flex-end; gap:12px; margin:16px 0; }
.ad-trend-filter .field { flex:1 1 140px; min-width:0; }
.ad-trend-filter [hidden] { display:none; }
.ad-metric-value { display:flex; align-items:center; justify-content:center; min-height:68px; text-align:center; }
.ad-metric-value > strong { display:block; margin:0; font-size:36px; font-weight:700; line-height:1.15; font-variant-numeric:tabular-nums; color:var(--navy); }
.ad-metric-primary .ad-metric-value > strong { color:var(--navy); }
.page-heading.page-heading-description { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; }
.page-heading.page-heading-description > p { margin:0; flex:1 1 240px; }
.page-heading.page-heading-description > :not(p) { flex:none; margin-left:auto; }
.page-heading.page-heading-description > .row { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:10px; }
@media (max-width:600px) { .page-heading.page-heading-description > :not(p) { flex:1 1 100%; margin-left:0; } .page-heading.page-heading-description > .row { justify-content:stretch; } .page-heading.page-heading-description > .row > .btn { flex:1 1 auto; justify-content:center; white-space:nowrap; } }
/* Reporter pages render their own title (with back link); the desktop topbar would repeat it. */
@media (min-width:761px) { .reporter-shell:has(.content :is(.standalone-heading, .news-page-intro, .section-page-heading)) .workspace-title { visibility:hidden; } }
.category-image { display:block; width:100%; height:100%; object-fit:contain; border-radius:inherit; }
.category-media-editor { display:grid; gap:16px; }
.category-media-preview img { display:block; width:72px; height:72px; object-fit:contain; border:1px solid var(--border); border-radius:12px; }
.report-category-mark { width:48px; height:48px; display:grid; place-items:center; border-radius:12px; background:var(--primary-soft); color:var(--navy); }
.admin-reference-icon { overflow:hidden; }
.category-order-actions { display:flex; align-items:center; gap:6px; white-space:nowrap; }
.category-order-actions > span { min-width:24px; text-align:center; font-variant-numeric:tabular-nums; }
.order-up { transform:rotate(-90deg); }
.order-down { transform:rotate(90deg); }
.category-group-form { padding:16px 0; border-top:1px solid var(--border); }
#category-groups > .modal-body { display:flex; flex-direction:column; }
#category-groups .category-group-form { flex:0 0 auto; }
.category-icon-tools { display:flex; align-items:center; gap:10px; margin-top:10px; }
.category-icon-current { width:44px; height:44px; display:grid; place-items:center; background:var(--primary-soft); border:1px solid var(--border); border-radius:12px; color:var(--navy); }
.category-icon-current .icon { width:24px; height:24px; }
.category-icon-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }
.category-icon-grid button { display:grid; justify-items:center; align-content:start; gap:5px; min-width:0; min-height:94px; padding:12px 6px; border:1px solid var(--border); border-radius:12px; background:white; color:var(--navy); }
.category-icon-grid button .icon { width:26px; height:26px; }
.category-icon-grid button span { font-size:12px; overflow-wrap:anywhere; }
.category-icon-grid button small { font-size:10px; color:var(--muted); }
.category-icon-grid button:hover,.category-icon-grid button[aria-pressed=true] { background:var(--primary-soft); border-color:var(--primary); }
@media(max-width:400px) { .category-icon-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
.status-button { width:40px;height:32px;padding:6px 3px;border:0;background:transparent;display:inline-grid;place-items:center; }
.status-button > span { width:34px;height:20px;border-radius:99px;background:#d3dce7;border:1px solid #a6b4c5; }
.status-button > span::after { content:'';display:block;width:14px;height:14px;border-radius:50%;background:white;margin:2px; }
.status-button[aria-checked=true] > span { background:#124c8c;border-color:#124c8c; }
.status-button[aria-checked=true] > span::after { transform:translateX(14px); }
.status-button:disabled { opacity:.5; }
[hidden] { display:none !important; }
.sr-only { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0; }
.workspace { display:flex;flex-direction:column;min-width:0;min-height:100dvh; }
.content { width:100%;flex:1;min-width:0; }
.page-heading > div { flex:1;min-width:0; }
.page-heading { flex-wrap:wrap; }
.stack { display:grid;gap:16px; }
.narrow { max-width:680px;margin-inline:auto; }
.sub { display:block;color:var(--muted);font-size:11px;margin-top:4px; }
.error-text { color:var(--danger); }
.flash { display:flex;gap:12px;justify-content:space-between;align-items:start;padding:12px 16px;border:1px solid #b8d8c4;background:#eef8f1;color:#176644;border-radius:12px;margin:12px 0; }
.flash.error { color:#912e36;background:#fff1f2;border-color:#e4bfc3; }
.flash ul { margin:0;padding-left:18px; }
.flash button { border:0;background:transparent;color:inherit;font-size:20px; }
.notice { border:1px solid #cadced;background:#edf5fc;border-radius:12px;padding:14px;color:#315574; }
.table-wrap { max-width:100%;overflow:auto;border:1px solid #e1e6ed;border-radius:8px; }
table { width:100%; }
.table-footer { display:flex;gap:16px;align-items:center;justify-content:space-between;flex-wrap:wrap;margin-top:16px;font-size:12px;color:var(--muted); }
.admin-table-toolbar { flex-wrap:nowrap;gap:8px; }
.admin-table-toolbar .admin-table-search { flex:1 1 0; }
.admin-table-toolbar .admin-table-tools { flex:0 0 auto; }
.filter-dialog-fields { display:grid;gap:16px; }
.admin-standard-table td { overflow-wrap:anywhere; }
.admin-standard-table td:last-child { white-space:nowrap; }
.inline-form { display:flex;gap:12px;align-items:end;flex-wrap:wrap; }
.inline-form .field { flex:1;min-width:150px; }
.tags { display:flex;gap:5px;flex-wrap:wrap; }
button.copy { border:1px solid #d8e2ef;background:#f3f6fb;padding:5px 8px;border-radius:6px;color:var(--navy);display:inline-flex;align-items:center;gap:6px; }
button.copy .icon { width:13px;height:13px; }
.modal-head { display:flex;flex:none;justify-content:space-between;align-items:center;padding:20px 24px;border-bottom:1px solid var(--border);gap:16px; }
.modal-head h2 { font-size:18px; }
.modal-body { padding:24px; }
.modal-foot { display:flex;flex:none;justify-content:flex-end;gap:10px;padding:16px 24px;border-top:1px solid var(--border); }
.modal-body .page-heading { display:none; }
.modal-body .card { padding:0;border:0;background:transparent;box-shadow:none; }
.modal-body .content { padding:0; }
.modal-body form { overflow:visible;flex-shrink:0; }
.modal-body .card + .card,.modal-body #reset-password { margin-top:24px; }
.login-panel .flash { font-size:12px; }
.ad-period-control a { padding:8px 14px;border-radius:8px;font-size:12px;color:var(--muted); }
.ad-period-control a[aria-current] { background:#124c8c;color:white; }
.ad-pie-legend { min-width:0; }
.ad-category-panel { container-type:inline-size; }
@container (max-width:360px) { .ad-pie-layout { grid-template-columns:minmax(0,1fr);gap:12px; } }
.ad-panel { min-width:0; }
.report-page { max-width:760px;margin-inline:auto; }
.report-clock-values { font-size:13px; }
.report-clock-values time { display:block; }
.report-file-picker input { max-width:100%; }
.file-list { display:flex;flex-wrap:wrap;gap:12px; }
.file-list figure { margin:0;width:100px;font-size:10px;overflow-wrap:anywhere; }
.file-list :is(img,video) { width:100px;height:80px;object-fit:cover;border-radius:8px; }
.metadata { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:20px 0; }
.metadata dt { font-size:12px;color:var(--muted); }
.metadata dd { margin:4px 0 0;overflow-wrap:anywhere; }
.description { white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.8; }
.evidence-grid { display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:16px; }
.evidence-grid figure { margin:0;min-width:0; }
.evidence-grid :is(img,video) { width:100%;max-height:360px;object-fit:contain;background:#edf3fa;border-radius:12px; }
.evidence-grid figcaption { font-size:12px;overflow-wrap:anywhere; }
.profile-setting-row { display:flex;align-items:center;width:100%;color:var(--ink); }
.profile-row-copy { flex:1; }
.notification { display:flex;gap:14px;align-items:start;padding:20px 0;border-bottom:1px solid var(--border); }
.notification > div { flex:1;min-width:0; }
.notification p { overflow-wrap:anywhere; }
.empty { padding:32px;text-align:center;color:var(--muted); }
.avatar { overflow:hidden; }
@media(max-width:1000px) { .ad-chart-layout { grid-template-columns:minmax(0,1fr); } }
@media(max-width:650px) {
 .admin-table-toolbar { align-items:center;gap:8px; }
 .admin-table-toolbar .admin-table-search { flex:1 1 0;gap:6px; }
 .admin-table-toolbar .admin-table-tools { flex:0 0 auto;gap:8px; }
 .page-heading { gap:12px; }
 .page-heading h1 { font-size:22px; }
 .metadata { grid-template-columns:minmax(0,1fr); }
 .modal-body { padding:18px; }
 .modal-head,.modal-foot { padding:16px 18px; }
 .notification { flex-wrap:wrap; }
 input,select,textarea { min-width:0;max-width:100%; }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto!important;transition:none!important; } }
