/* Official PIO brand. Semantic statuses and neutral surfaces stay in component CSS. */
:root {
 --primary:#2600BC; --primary-hover:#1D0094; --primary-soft:#F0EDFC;
 --primary-border:#CFC5F1; --primary-on:#FFFFFF;
 --accent:#FDC500; --accent-on:#18324E;
 --background:#F5F7FB; --surface:#FFFFFF;
 --text-primary:#18324E; --text-secondary:#718295;
 --pio-blue:var(--primary); --pio-yellow:var(--accent);
 --purple:var(--primary); --purple-dark:var(--primary-hover); --purple-soft:var(--primary-soft);
 --violet-bg:var(--primary-soft); --violet-text:var(--primary);
}
html:root:root body .portal-clean { --portal-blue:var(--primary); }
/* Navigation */
html:root:root body :is(.sidebar,.mayor-sidebar) { background:linear-gradient(165deg,var(--primary),var(--primary-hover))!important; }
html:root:root body :is(.sidebar-link.active,.mayor-sidebar-link.active) { background:var(--primary)!important;color:white!important;box-shadow:inset 3px 0 var(--accent)!important; }
html:root:root body :is(.sidebar-link.active,.mayor-sidebar-link.active) svg { color:var(--accent)!important; }
html:root:root body .gov-nav a.active-link,html:root:root body .gov-nav a:hover { color:var(--primary)!important;text-decoration:underline;text-decoration-color:var(--accent);text-underline-offset:8px; }
html:root:root body :is(.tab-btn.active,.mysub-tab.active,.doc-filter-btn.active,.advisory-tabs a.active) { background:var(--primary)!important;color:white!important;border-color:var(--primary)!important; }
/* Primary actions. Destructive, warning and success actions are intentionally excluded. */
html:root:root body :is(.hero-btn,.gov-hero-btn,.primary-hero-btn,.mayor-hero-btn.primary,.department-submit-btn,.form-submit-btn,.template-save-btn,.workspace-submit-btn,.btn-primary,.primary-btn,.review-primary-action,.save-btn,.filter-btn,.apply-filter-btn,.document-button,.quill-save-btn,.run-ai-btn,.verify-button,.attachment-download-button,.ord-read-btn,.eo-read-btn,.highlight-btn),html:root:root body .login-box button[type=submit] {
 background:var(--primary)!important;color:white!important;border-color:var(--primary)!important;
}
html:root:root body :is(.hero-btn,.gov-hero-btn,.primary-hero-btn,.mayor-hero-btn.primary,.department-submit-btn,.form-submit-btn,.template-save-btn,.workspace-submit-btn,.btn-primary,.primary-btn,.review-primary-action,.save-btn,.filter-btn,.apply-filter-btn,.document-button,.quill-save-btn,.run-ai-btn,.verify-button,.attachment-download-button,.ord-read-btn,.eo-read-btn,.highlight-btn):hover,html:root:root body .login-box button[type=submit]:hover {
 background:var(--primary-hover)!important;color:white!important;border-color:var(--primary-hover)!important;
}
html:root:root body :is(.document-button.document-button-secondary,.btn-secondary,.secondary-btn,.review-secondary-action,.workspace-btn-secondary,.mysub-btn-secondary,.mayor-link-btn,.mayor-review-secondary,.back-button,.attachment-view-button,.view-existing-btn,.calendar-nav-btn,.ord-tool-btn,.eo-tool-btn,.news-action-btn) {
 background:var(--primary-soft)!important;color:var(--primary)!important;border-color:var(--primary-border)!important;
}
html:root:root body :is(.document-button.document-button-secondary,.btn-secondary,.secondary-btn,.review-secondary-action,.workspace-btn-secondary,.mysub-btn-secondary,.mayor-link-btn,.mayor-review-secondary,.back-button,.attachment-view-button,.view-existing-btn,.calendar-nav-btn,.ord-tool-btn,.eo-tool-btn,.news-action-btn):hover {
 background:var(--primary-border)!important;color:var(--primary-hover)!important;border-color:var(--primary-border)!important;
}
/* Branding labels and interactive text, not article content or status badges. */
html:root:root body :is(.page-title,.records-title h1,.mayor-page-title,.gov-brand h3,.login-badge,.hero-kicker,.panel-kicker,.mayor-hero-kicker,.submission-kicker,.documents-eyebrow,.home-section-heading>span,.home-weather-intro>span,.section-title i,.document-title,.documents-back,.documents-pagination a,.document-filter-actions a,.home-weather-intro a,.news-back-link,.back-link,.achievement-read-link,.source-reference-link,.card-link,.records-card .view-btn) { color:var(--primary)!important; }
html:root:root body .documents-page a:not(.document-button) { color:var(--primary)!important; }
html:root:root body :is(.profile-avatar,.admin-avatar,.profile-mini-avatar) { background:var(--primary)!important;color:white!important; }
html:root:root body :is(.documents-private,.stat-icon.purple,.audit-badge-purple) { background:var(--primary-soft)!important;color:var(--primary)!important; }
html:root:root body :is(.profile-hero,.nagcarlan-weather) { background:linear-gradient(125deg,var(--primary-hover),var(--primary))!important; }
/* Controlled yellow detail */
html:root:root body :is(.hero-line,.hero-badge span) { background:var(--accent)!important; }
html:root:root body .hero-badge { background:var(--primary)!important;color:white!important; }
html:root:root body .hero-dot.active { background:var(--accent)!important; }
html:root:root body .weather-day strong { color:var(--accent)!important; }
html:root:root body .weather-foot a { color:white!important; }
html:root:root body :is(input,select,textarea,button,a,[contenteditable=true]):focus-visible { outline:2px solid var(--primary)!important;outline-offset:3px; }
html:root:root body .workspace-rich-editor .ql-toolbar .ql-stroke { stroke:var(--primary)!important; }
html:root:root body .workspace-rich-editor .ql-toolbar .ql-fill { fill:var(--primary)!important; }
html:root:root body .workspace-rich-editor .ql-toolbar .ql-picker { color:var(--primary)!important; }
/* Remaining shared tabs, informational controls and overlays. */
html:root:root body :is(.content-tabs a.active,.notification-filter.active) { background:var(--primary)!important;color:white!important;border-color:var(--primary)!important; }
html:root:root body :is(.content-filters button,.modal-download,.mayor-review-approve,.resend-button.ready,.records-search button) { background:var(--primary)!important;color:white!important;border-color:var(--primary)!important; }
html:root:root body :is(.content-filters button,.modal-download,.mayor-review-approve,.resend-button.ready,.records-search button):hover { background:var(--primary-hover)!important;color:white!important; }
html:root:root body :is(.text-btn,.action-btn-refresh,.action-btn-edit,.action-btn-preview,.view-analytics,.panel-link) { color:var(--primary)!important; }
html:root:root body .profile-dropdown a:hover { background:var(--primary-soft)!important;color:var(--primary)!important; }
html:root:root body .calendar-cell-link.active-date { background:var(--primary-soft)!important; }
html:root:root body .calendar-cell-link.active-date .calendar-date { color:var(--primary)!important; }
html:root:root body .calendar-post-count { background:var(--primary)!important;color:white!important; }
html:root:root body .calendar-post-dot { background:var(--accent)!important; }

/* Shared back navigation across PIO screens. */
html:root:root body :is(.submission-back,.quill-edit-back-btn,.documents-back,.back-button) {
 display:inline-flex;align-items:center;justify-content:center;gap:8px;
 padding:10px 16px;border:1px solid #d5ddec;border-radius:8px;
 background:#fff;color:var(--primary,#2600bc);text-decoration:none;font-weight:600;line-height:1.4;
}
html:root:root body :is(.submission-back,.quill-edit-back-btn,.documents-back,.back-button):hover {background:#f1f5f9;}
html:root:root body :is(.submission-back,.quill-edit-back-btn,.documents-back,.back-button):focus-visible {outline:3px solid #fdc500;outline-offset:2px;}
