/* Light shell for authenticated app pages — use with <body class="... app-light"> */

/* Brand color tokens (inlined so this stylesheet stays self-contained on
   pages that don't link styles.css — e.g. quality-audit.html). */
:root {
    --tjx-red: #c31230;
    --tjx-red-dark: #8e0e22;
    --tjx-red-mid: #9c1028;
    --tjx-red-light: #d42845;
    --tjx-red-tint: #fef2f2;
}

/* Hide role-gated tabs/sections until auth resolves and the JS adds
   .role-resolved to body. Prevents the CI tabs from flashing in front of
   an LP user during the auth round-trip. */
body:not(.role-resolved) [data-ci-only],
body:not(.role-resolved) [data-lp-only] {
    display: none !important;
}

body.app-light {
    background: #f9fafb !important;
    color: #111827;
}

body.app-light .bg-grid {
    background-image:
        linear-gradient(rgba(195, 18, 48, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(195, 18, 48, 0.04) 1px, transparent 1px) !important;
}

body.app-light .gradient-orb {
    opacity: 0.12 !important;
}

/* Navigation */
body.app-light .nav-glass {
    background: rgba(255, 255, 255, 0.96) !important;
    border-bottom: 1px solid rgba(195, 18, 48, 0.1) !important;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

body.app-light .nav-link {
    color: #4b5563 !important;
}

body.app-light .nav-link:hover,
body.app-light .nav-link.active {
    color: #c31230 !important;
    background: rgba(195, 18, 48, 0.06) !important;
}

/* User dropdown */
body.app-light .user-dropdown-menu {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12) !important;
}

body.app-light .user-dropdown-menu a {
    color: #374151 !important;
}

body.app-light .user-dropdown-menu a:hover {
    background: #f3f4f6 !important;
    color: #111827 !important;
}

body.app-light .user-dropdown-menu a.active {
    color: #c31230 !important;
    background: #fef2f2 !important;
}

body.app-light .user-dropdown-menu .divider {
    background: #e5e7eb !important;
}

body.app-light .user-dropdown-menu .border-white\/10,
body.app-light .user-dropdown [class*="border-white"] {
    border-color: #e5e7eb !important;
}

/* Dashboard-style cards */
body.app-light .glass-card,
body.app-light .metric-card,
body.app-light .section-card,
body.app-light .stat-box,
body.app-light .category-badge {
    background: #ffffff !important;
    border: 1px solid rgba(195, 18, 48, 0.1) !important;
    backdrop-filter: none !important;
}

body.app-light .glass-card:hover,
body.app-light .metric-card:hover {
    background: #fffdfd !important;
    border-color: rgba(195, 18, 48, 0.18) !important;
    box-shadow: 0 12px 28px rgba(17, 24, 39, 0.06) !important;
}

body.app-light .section-header {
    border-bottom-color: #e5e7eb !important;
}

body.app-light .quick-link {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
}

body.app-light .quick-link:hover {
    background: #fef2f2 !important;
    border-color: rgba(195, 18, 48, 0.2) !important;
}

body.app-light .quick-link-icon {
    color: #ffffff !important;
}

body.app-light .metric-label {
    color: #6b7280 !important;
}

body.app-light .metric-trend.neutral {
    color: #9ca3af !important;
}

body.app-light .metric-value {
    color: #111827 !important;
}

body.app-light .action-card {
    background: #f9fafb !important;
}

body.app-light .action-card:hover {
    background: #f3f4f6 !important;
}

body.app-light .action-card.info {
    border-left-color: #c31230 !important;
}

body.app-light .data-table th {
    color: #6b7280 !important;
    border-bottom-color: #e5e7eb !important;
}

body.app-light .data-table td {
    border-bottom-color: #f3f4f6 !important;
    color: #374151 !important;
}

body.app-light .data-table tr:hover td {
    background: #f9fafb !important;
}

body.app-light .form-select {
    background: #ffffff !important;
    border: 1px solid #d1d5db !important;
    color: #111827 !important;
}

body.app-light .form-select:focus {
    border-color: #c31230 !important;
}

body.app-light .form-select option {
    background: #ffffff !important;
    color: #111827 !important;
}

body.app-light .status-badge.inactive {
    background: #f3f4f6 !important;
    color: #6b7280 !important;
}

body.app-light ::-webkit-scrollbar-track {
    background: #f3f4f6 !important;
}

body.app-light ::-webkit-scrollbar-thumb {
    background: rgba(195, 18, 48, 0.25) !important;
}

/* Audit scheduler & similar */
body.app-light .page-card,
body.app-light .project-card,
body.app-light .audit-card {
    background: #ffffff !important;
    border: 1px solid rgba(195, 18, 48, 0.1) !important;
    backdrop-filter: none !important;
}

body.app-light .filter-tabs {
    background: #f3f4f6 !important;
    border: 1px solid #e5e7eb !important;
}

body.app-light .filter-tab {
    color: #6b7280 !important;
}

body.app-light .filter-tab:hover {
    color: #111827 !important;
    background: #ffffff !important;
}

body.app-light .filter-tab.active {
    color: #ffffff !important;
}

body.app-light .form-input,
body.app-light .form-textarea,
body.app-light .form-select {
    background: #fafafa !important;
    border: 1px solid #e5e7eb !important;
    color: #111827 !important;
}

body.app-light .form-input::placeholder,
body.app-light .form-textarea::placeholder {
    color: #9ca3af !important;
}

body.app-light .form-input:focus,
body.app-light .form-textarea:focus,
body.app-light .form-select:focus {
    border-color: #c31230 !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(195, 18, 48, 0.1) !important;
}

body.app-light .form-label {
    color: #374151 !important;
}

body.app-light .btn-cancel {
    background: #f3f4f6 !important;
    color: #374151 !important;
    border: 1px solid #e5e7eb !important;
}

body.app-light .btn-cancel:hover {
    background: #e5e7eb !important;
}

body.app-light .stat-card {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
}

/* Loading screen stays branded */
body.app-light .loading-screen {
    background: linear-gradient(135deg, #ffffff 0%, #fef2f2 100%) !important;
}

body.app-light .loading-screen .text-white\/70,
body.app-light .loading-screen p {
    color: #6b7280 !important;
}

body.app-light .loading-screen .spinner {
    border-color: #e5e7eb !important;
    border-top-color: #c31230 !important;
}

/* Gemba Walk & similar — cards that used dark translucent backgrounds */
body.app-light .session-card {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
}

body.app-light .session-card:hover {
    border-color: rgba(195, 18, 48, 0.22) !important;
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.06);
}

body.app-light .question-card {
    background: #f9fafb !important;
    border: 1px solid #e5e7eb !important;
}

body.app-light .project-idea-card {
    background: #f0fdf4 !important;
    border-color: #bbf7d0 !important;
}

body.app-light .analytics-chart-card {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
}

body.app-light .analytics-stat-card {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
}

/* Project Tracking — KPI strip (was white / faint green on white) */
body.app-light .kpi-card {
    background: #ffffff !important;
    border: 1px solid rgba(195, 18, 48, 0.12) !important;
    backdrop-filter: none !important;
}

body.app-light .kpi-card:hover {
    background: #fffdfd !important;
    border-color: rgba(195, 18, 48, 0.2) !important;
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.06) !important;
}

body.app-light .kpi-label {
    color: #6b7280 !important;
}

body.app-light .kpi-value {
    color: #111827 !important;
}

body.app-light .kpi-trend {
    color: #6b7280 !important;
}

body.app-light .kpi-trend.positive {
    color: #15803d !important;
}

body.app-light .kpi-icon.blue {
    background: linear-gradient(135deg, rgba(195, 18, 48, 0.12), rgba(195, 18, 48, 0.06)) !important;
    color: #c31230 !important;
}

body.app-light .kpi-icon.green {
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.15), rgba(22, 163, 74, 0.06)) !important;
    color: #15803d !important;
}

body.app-light .kpi-icon.orange {
    background: linear-gradient(135deg, rgba(234, 88, 12, 0.15), rgba(234, 88, 12, 0.06)) !important;
    color: #c2410c !important;
}

body.app-light .kpi-icon.purple {
    background: linear-gradient(135deg, rgba(195, 18, 48, 0.12), rgba(124, 58, 237, 0.08)) !important;
    color: #7c3aed !important;
}

body.app-light .kpi-icon.cyan {
    background: linear-gradient(135deg, rgba(8, 145, 178, 0.12), rgba(8, 145, 178, 0.05)) !important;
    color: #0e7490 !important;
}

/* Project cards — title was white on pale gradient */
body.app-light .project-card-header {
    background: linear-gradient(135deg, #fef2f2 0%, #f5f3ff 50%, #eff6ff 100%) !important;
    border-bottom: 1px solid #e5e7eb !important;
}

body.app-light .project-card-header::before {
    background: rgba(195, 18, 48, 0.06) !important;
}

body.app-light .project-title {
    color: #111827 !important;
}

body.app-light .project-category {
    color: #6b7280 !important;
}

body.app-light .meta-item {
    background: #f9fafb !important;
    border-color: #e5e7eb !important;
}

body.app-light .meta-label {
    color: #6b7280 !important;
}

body.app-light .meta-value {
    color: #991b1b !important;
}

body.app-light .project-savings {
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%) !important;
    border-color: #bbf7d0 !important;
}

body.app-light .savings-label {
    color: #166534 !important;
}

body.app-light .savings-value {
    color: #15803d !important;
}

body.app-light .project-footer {
    border-top-color: #e5e7eb !important;
}

/* Status pills — dark-theme neon greens were illegible on light fills */
body.app-light .status-badge.in-progress {
    background: #fef3c7 !important;
    color: #b45309 !important;
}

body.app-light .status-badge.completed {
    background: #dcfce7 !important;
    color: #166534 !important;
}

body.app-light .status-badge.planned {
    background: #fee2e2 !important;
    color: #b91c1c !important;
}

body.app-light .status-badge.on-hold {
    background: #ffedd5 !important;
    color: #c2410c !important;
}

body.app-light .status-badge.pending-approval {
    background: #fef3c7 !important;
    color: #b45309 !important;
}

body.app-light .status-badge.approved {
    background: #dcfce7 !important;
    color: #166534 !important;
}

body.app-light .status-badge.rejected {
    background: #fee2e2 !important;
    color: #b91c1c !important;
}

/* Inactive tab buttons next to KPIs */
body.app-light .tab-btn {
    background: #f3f4f6 !important;
    color: #4b5563 !important;
    border-color: #e5e7eb !important;
}

body.app-light .tab-btn:hover {
    color: #111827 !important;
    background: #ffffff !important;
}

/* Nav — hub name in brand red */
body.app-light .nav-hub-title {
    color: #c31230 !important;
}

/* Project Tracking — empty state & loading (page still used dark copy colors) */
body.app-light .empty-state i {
    color: #d1d5db !important;
}

body.app-light .empty-state h3 {
    color: #111827 !important;
}

body.app-light .empty-state p {
    color: #6b7280 !important;
}

body.app-light #loading-overlay {
    background: linear-gradient(135deg, #ffffff 0%, #fef2f2 100%) !important;
}

body.app-light #loading-overlay p {
    color: #6b7280 !important;
}

body.app-light #loading-overlay .spinner {
    border-color: #e5e7eb !important;
    border-top-color: #c31230 !important;
}

/* Project Tracking — list view row text was white on white card */
body.app-light .projects-grid.list-view .list-cell {
    color: #374151 !important;
}

body.app-light .projects-grid.list-view .list-cell.cipid-cell {
    color: #5b21b6 !important;
}

body.app-light .projects-grid.list-view .list-cell.title-cell {
    color: #111827 !important;
}

body.app-light .projects-grid.list-view .list-cell.savings-cell {
    color: #15803d !important;
}

body.app-light .list-header {
    background: #fef2f2 !important;
    border-color: rgba(195, 18, 48, 0.2) !important;
    color: #6b7280 !important;
}

body.app-light .view-toggle-btn {
    color: #6b7280 !important;
    background: #f3f4f6 !important;
    border-color: #e5e7eb !important;
}

body.app-light .view-toggle-btn:hover {
    color: #111827 !important;
}

/* ========================================
   WHITE-ON-WHITE TEXT FIX
   Cards that become #fff under app-light must
   have their text-white children overridden.
   ======================================== */

body.app-light .glass-card > h4.text-white,
body.app-light .glass-card h4.text-white,
body.app-light .glass-card .text-white:not([class*="bg-"]):not(.quick-link-icon),
body.app-light .page-card .text-white:not([class*="bg-"]):not(.quick-link-icon),
body.app-light .session-card .text-white:not([class*="bg-"]),
body.app-light .notification-card .text-white:not([class*="bg-"]),
body.app-light .analytics-chart-card .text-white:not([class*="bg-"]),
body.app-light .analytics-stat-card .text-white:not([class*="bg-"]) {
    color: #111827 !important;
}

body.app-light .glass-card .text-white\/90,
body.app-light .page-card .text-white\/90,
body.app-light .session-card .text-white\/90,
body.app-light .glass-card [class*="text-white/9"],
body.app-light .page-card [class*="text-white/9"] {
    color: #374151 !important;
}

body.app-light .glass-card .text-white\/80,
body.app-light .glass-card .text-white\/70,
body.app-light .page-card .text-white\/80,
body.app-light .page-card .text-white\/70 {
    color: #4b5563 !important;
}

body.app-light .quick-link h4.text-white,
body.app-light .quick-link .text-white:not(.quick-link-icon) {
    color: #111827 !important;
}

body.app-light .notification-card h4 {
    color: #111827 !important;
}

body.app-light .session-card .text-white\/60,
body.app-light .session-card .text-white\/50 {
    color: #6b7280 !important;
}

/* Activity items in page-card */
body.app-light .page-card .activity-text,
body.app-light .page-card .activity-item .text-white {
    color: #374151 !important;
}

/* Stat cards and metric labels that were white-on-dark */
body.app-light .stat-card .text-white:not([class*="bg-"]) {
    color: #111827 !important;
}

/* Yellow badge text on light backgrounds */
body.app-light .glass-card .text-yellow-300 {
    color: #b45309 !important;
}

body.app-light .glass-card .bg-yellow-500\/20 {
    background: #fef3c7 !important;
}

/* Table borders that were white-on-dark */
body.app-light .glass-card tr.border-b.border-white\/5,
body.app-light .glass-card [class*="border-white"] {
    border-color: #e5e7eb !important;
}

/* CI Games — game cards on light background */
body.app-light .game-card {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

body.app-light .game-card:hover {
    background: #ffffff !important;
    border-color: rgba(16, 185, 129, 0.4) !important;
    box-shadow: 0 12px 28px rgba(17, 24, 39, 0.08) !important;
}

body.app-light .game-card.selected {
    border: 2px solid #10b981 !important;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.15) !important;
}

/* Session card text for ci-games */
body.app-light .session-card h4 {
    color: #111827 !important;
}

body.app-light .session-card p {
    color: #4b5563 !important;
}

/* Audit card text */
body.app-light .audit-card .text-white:not([class*="bg-"]) {
    color: #111827 !important;
}

/* ============================================================
   LP Audit (quality-audit.html) — light-theme overrides
   The page's inline <style> targets the legacy dark theme. These
   rules surface LP cards, history rows, photo zones, modals, and
   pale accent text on the white + TJX-red shell.
   ============================================================ */
body.app-light .stat-card {
    background: #ffffff !important;
    border: 1px solid rgba(195, 18, 48, 0.12) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    backdrop-filter: none !important;
}

body.app-light .audit-history-card {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

body.app-light .audit-history-card:hover {
    background: #fafafa !important;
    border-color: rgba(195, 18, 48, 0.35) !important;
}

body.app-light .audit-type-card {
    background: #ffffff !important;
    border: 2px solid #e5e7eb !important;
}

body.app-light .audit-type-card:hover {
    background: rgba(195, 18, 48, 0.06) !important;
    border-color: rgba(195, 18, 48, 0.45) !important;
}

body.app-light .audit-type-card.selected {
    background: rgba(195, 18, 48, 0.10) !important;
    border-color: var(--tjx-red) !important;
}

body.app-light .question-group {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
}

body.app-light .question-group.nc-active {
    background: rgba(195, 18, 48, 0.06) !important;
    border-color: rgba(195, 18, 48, 0.45) !important;
    box-shadow: 0 0 16px rgba(195, 18, 48, 0.12) !important;
}

body.app-light .photo-upload-zone {
    border: 2px dashed #d1d5db !important;
    background: #fafafa !important;
}

body.app-light .photo-upload-zone:hover {
    border-color: var(--tjx-red) !important;
    background: rgba(195, 18, 48, 0.05) !important;
}

body.app-light .photo-preview img {
    border: 2px solid #e5e7eb !important;
}

body.app-light .radio-option:hover {
    background: #f3f4f6 !important;
}

body.app-light .radio-option input[type="radio"] {
    accent-color: var(--tjx-red) !important;
}

body.app-light .filter-tab.active,
body.app-light button.filter-tab.active {
    background: linear-gradient(135deg, #c31230, #8e0e22) !important;
    background-color: #c31230 !important;
    border-color: #c31230 !important;
    color: #ffffff !important;
}

/* Darken pale Tailwind text colors inside LP tabs so icons & badges
   keep meaning on a white background. */
body.app-light .lp-tab-content .text-red-400,
body.app-light .stat-card .text-red-400 {
    color: #dc2626 !important;
}
body.app-light .lp-tab-content .text-yellow-400,
body.app-light .stat-card .text-yellow-400 {
    color: #b45309 !important;
}
body.app-light .lp-tab-content .text-green-400,
body.app-light .stat-card .text-green-400 {
    color: #15803d !important;
}
body.app-light .lp-tab-content .text-amber-400,
body.app-light .stat-card .text-amber-400 {
    color: #b45309 !important;
}

/* Amber "Remove CSV imports" pill */
body.app-light .bg-amber-500\/20 {
    background-color: rgba(245, 158, 11, 0.12) !important;
}

/* "Import CSV Data" pill uses bg-dsv-blue/20 + text-dsv-glow — make
   sure it reads on white. */
body.app-light .lp-tab-content .bg-dsv-blue\/20 {
    background-color: rgba(195, 18, 48, 0.10) !important;
}
body.app-light .lp-tab-content .bg-dsv-blue\/20:hover,
body.app-light .lp-tab-content .hover\:bg-dsv-blue\/30:hover {
    background-color: rgba(195, 18, 48, 0.18) !important;
}

/* LP analytics filter wrapper still carries old utility classes
   (bg-black/20 border-white/5) — neutralise on light shell. */
body.app-light .page-card.bg-black\/20 {
    background: #ffffff !important;
}
body.app-light .border-white\/5 {
    border-color: #e5e7eb !important;
}

/* LP modals (Audits list + View Audit) — strip the dark slate
   gradient so the gray-900 text inside is legible. */
body.app-light #lp-analytics-audits-modal .bg-gradient-to-br,
body.app-light #view-audit-modal .bg-gradient-to-br {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
}

/* Multi-select "Reason for Exceptions" — boxed container with chip-style
   checkboxes that visibly fill when checked. Used by lpMultiReasonField. */
.lp-reason-box {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #fafafa;
    border: 1px solid #e5e7eb;
    border-radius: 0.625rem;
}

.lp-reason-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: #374151;
    transition: all 0.15s ease;
    user-select: none;
}

.lp-reason-chip:hover {
    border-color: #c31230;
    background: #fef2f2;
}

.lp-reason-chip input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: #c31230;
    cursor: pointer;
    margin: 0;
}

.lp-reason-chip:has(input[type="checkbox"]:checked) {
    background: #fef2f2;
    border-color: #c31230;
    color: #8e0e22;
    font-weight: 600;
}

/* LP Analytics & History date-range pill buttons — active state */
.lp-range-btn.active,
.lp-history-range-btn.active {
    background-color: #c31230 !important;
    color: #ffffff !important;
    font-weight: 600;
}

/* LP Analytics sub-tab buttons */
.lpa-subtab-btn {
    color: #6b7280;
    background: transparent;
}
.lpa-subtab-btn:hover {
    color: #111827;
    background: rgba(255, 255, 255, 0.5);
}
.lpa-subtab-btn.active {
    background: #ffffff !important;
    color: #c31230 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* LP Analytics sub-tab content — show only the section that matches the
   currently active tab. body[data-lpa-tab="X"] is set by switchLPAnalyticsSubtab. */
body[data-lpa-tab="overview"] .lp-analytics-subtab:not([data-subtab="overview"]),
body[data-lpa-tab="trends"] .lp-analytics-subtab:not([data-subtab="trends"]),
body[data-lpa-tab="compliance"] .lp-analytics-subtab:not([data-subtab="compliance"]),
body[data-lpa-tab="auditors"] .lp-analytics-subtab:not([data-subtab="auditors"]) {
    display: none !important;
}

/* Element only renders in the printed Weekly Brief. */
.lp-brief-only { display: none; }

/* ═══════════════════════════════════════════════════════════════════════
   LP Weekly Brief — print stylesheet
   On screen the body.lp-printing-brief class also styles the page to
   preview-mode briefly, but @media print is the real source of truth.
   ═══════════════════════════════════════════════════════════════════════ */
@media print {
    /* Hide everything outside the LP Analytics tab + its sub-tab content */
    nav, .nav-glass, footer, .filter-tab, .user-dropdown, #lp-analytics-audits-modal, #view-audit-modal,
    body > *:not(main):not(#lp-tab-lp-analytics):not(.lp-brief-only) {
        display: none !important;
    }
    /* Within the analytics tab, hide everything except the Overview sub-tab content + brief header */
    #lp-tab-lp-analytics > *:not(#lp-brief-header):not(.lp-analytics-subtab) {
        display: none !important;
    }
    /* Show the brief header */
    .lp-brief-only { display: block !important; }
    /* Force the Overview tab content visible regardless of sub-tab state */
    .lp-analytics-subtab[data-subtab="overview"] { display: block !important; }
    .lp-analytics-subtab:not([data-subtab="overview"]) { display: none !important; }
    /* Also include the Period Comparison + Auditor Leaderboard for a richer brief */
    .lp-analytics-subtab[data-subtab="trends"]:has(#lp-period-comparison-tbody),
    .lp-analytics-subtab[data-subtab="auditors"] { display: block !important; }

    /* Layout for print: white background, tight spacing, no shadows */
    body, .page-card {
        background: #ffffff !important;
        box-shadow: none !important;
        border: 1px solid #e5e7eb !important;
    }
    .page-card { break-inside: avoid; page-break-inside: avoid; padding: 0.75rem !important; margin-bottom: 0.5rem !important; }
    .lp-chart-wrap, canvas { max-height: 200px !important; height: 200px !important; }
    main { padding: 0 !important; margin: 0 !important; }
    @page { size: letter portrait; margin: 0.5in; }

    /* Reduce font sizes a touch so things fit */
    .text-2xl { font-size: 1.25rem !important; }
    .text-xl { font-size: 1.05rem !important; }
    h3, h4 { font-size: 0.95rem !important; }
}

/* LP Analytics chart wrappers — Chart.js responsive needs a fixed-height,
   position: relative parent. Canvas must be display:block so its inline
   baseline doesn't feed extra pixels back into the parent's measurement
   on every resize tick (which is what caused the infinite-grow bug). */
.lp-chart-wrap {
    position: relative;
    width: 100%;
    overflow: hidden;
}
.lp-chart-wrap > canvas {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
    max-height: 100%;
}

.lp-range-btn.active:hover,
.lp-history-range-btn.active:hover {
    background-color: #8e0e22 !important;
}
