/* Global Alpine Cloak */
[x-cloak] {
    display: none !important;
}

/* Make sure the main content flexes properly */
.wrapper {
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    overflow: hidden;
}

/* Sidebar Transitions & Widths (Fixed left) */
.sidebar {
    transition: width 0.3s ease;
    overflow-x: hidden;
    overflow-y: auto;
    z-index: 1040;
    flex-shrink: 0;
    height: 100vh;
    height: 100dvh;
}

.sidebar-collapsed {
    width: 70px;
    min-width: 70px;
}

.sidebar-expanded {
    width: 250px;
    min-width: 250px;
}

.sidebar-item-text {
    transition: opacity 0.2s ease, max-width 0.2s ease;
    white-space: nowrap;
}

.sidebar-collapsed .sidebar-item-text {
    opacity: 0;
    max-width: 0;
    display: none;
}

.sidebar-expanded .sidebar-item-text {
    opacity: 1;
    max-width: 200px;
    display: inline-block;
    margin-left: 10px;
}

/* Standard Header & Navbar Dimensions (Fixed top) */
.ppm-header-height {
    height: 65px;
    min-height: 65px;
    max-height: 65px;
    flex-shrink: 0;
}

.ppm-nav-icon {
    width: 25px;
}

.ppm-min-w-0 {
    min-width: 0;
}

.ppm-content-wrapper {
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    overflow: hidden;
}

.ppm-main-scrollable {
    overflow-y: auto;
    overflow-x: hidden;
    flex-grow: 1;
    min-height: 0;
}

/* Form Controls & Constraint Utilities (replaces inline styles) */
.ppm-search-box-md {
    max-width: 480px;
}

.ppm-entity-select-md {
    max-width: 380px;
}

.ppm-column-toggle-menu {
    min-width: 220px;
    max-height: 350px;
    overflow-y: auto;
}

.ppm-workbench-header-stat {
    min-width: 140px;
}

.ppm-cursor-pointer {
    cursor: pointer;
}

.ppm-w-auto-130 {
    width: auto;
    min-width: 130px;
}

.ppm-w-auto-95 {
    width: auto;
    min-width: 95px;
}

.ppm-icon-circle-38 {
    width: 38px;
    height: 38px;
}

.ppm-max-h-200 {
    max-height: 200px;
}

.ppm-max-h-220 {
    max-height: 220px;
}

.ppm-max-w-150 {
    max-width: 150px;
}

.ppm-max-w-180 {
    max-width: 180px;
}

.ppm-max-w-220 {
    max-width: 220px;
}

.ppm-fs-60 {
    font-size: 0.60rem;
}

.ppm-fs-65 {
    font-size: 0.65rem;
}

.ppm-fs-70 {
    font-size: 0.7rem;
}

.ppm-fs-75 {
    font-size: 0.75rem;
}

.ppm-min-w-140 {
    min-width: 140px;
}

.ppm-w-85 {
    width: 85px;
}

.ppm-max-h-180-auto {
    max-height: 180px;
    overflow-y: auto;
}

.ppm-max-h-160-auto {
    max-height: 160px;
    overflow-y: auto;
}

.ppm-timeline-dot {
    position: absolute;
    left: -19px;
    top: 6px;
    width: 10px;
    height: 10px;
}

/* Right Side Panel / Offcanvas Width (+25% increase from default 400px to 500px) */
.offcanvas.offcanvas-end,
#rightPanel.offcanvas,
#rightPanel.offcanvas-end,
#financialDrawer.offcanvas,
#financialDrawer.offcanvas-end,
.fin-drawer.offcanvas,
.fin-drawer.offcanvas-end,
#issueDrawer.offcanvas,
#issueDrawer.offcanvas-end {
    --bs-offcanvas-width: 500px;
    width: 500px;
    max-width: 90vw;
}

/* PPM Compact Typography to fit dense data views on 1920px screens (Main Views, Drawers & Modals) */
#main-content,
.offcanvas,
#rightPanel,
.fin-drawer,
.modal {
    font-size: 0.85rem;
    line-height: 1.4;
}

#main-content h1, #main-content .h1,
.offcanvas h1, .offcanvas .h1,
.modal h1, .modal .h1 { font-size: 1.5rem; }

#main-content h2, #main-content .h2,
.offcanvas h2, .offcanvas .h2,
.modal h2, .modal .h2 { font-size: 1.3rem; }

#main-content h3, #main-content .h3,
.offcanvas h3, .offcanvas .h3,
.modal h3, .modal .h3 { font-size: 1.15rem; }

#main-content h4, #main-content .h4,
.offcanvas h4, .offcanvas .h4,
.modal h4, .modal .h4 { font-size: 1.05rem; }

#main-content h5, #main-content .h5,
.offcanvas h5, .offcanvas .h5,
.modal h5, .modal .h5 { font-size: 0.95rem; }

#main-content h6, #main-content .h6,
.offcanvas h6, .offcanvas .h6,
.modal h6, .modal .h6 { font-size: 0.85rem; }

.offcanvas .offcanvas-title,
.modal .modal-title {
    font-size: 0.95rem;
    font-weight: 700;
}

#main-content .table,
.offcanvas .table,
.modal .table {
    font-size: 0.82rem;
}

#main-content .btn,
.offcanvas .btn,
.modal .btn {
    font-size: 0.85rem;
}

#main-content .btn-sm,
.offcanvas .btn-sm,
.modal .btn-sm {
    font-size: 0.78rem;
    padding: 0.2rem 0.45rem;
}

#main-content .badge,
.offcanvas .badge,
.modal .badge {
    font-size: 0.75rem;
}

#main-content .form-control,
#main-content .form-select,
.offcanvas .form-control,
.offcanvas .form-select,
.modal .form-control,
.modal .form-select {
    font-size: 0.85rem;
}

#main-content .form-control-sm,
#main-content .form-select-sm,
.offcanvas .form-control-sm,
.offcanvas .form-select-sm,
.modal .form-control-sm,
.modal .form-select-sm {
    font-size: 0.78rem;
    padding: 0.25rem 0.5rem;
}

#main-content .form-label,
#main-content label,
.offcanvas .form-label,
.offcanvas label,
.modal .form-label,
.modal label {
    font-size: 0.82rem;
}

#main-content .form-text,
.offcanvas .form-text,
.modal .form-text {
    font-size: 0.75rem;
}

#main-content .input-group-text,
.offcanvas .input-group-text,
.modal .input-group-text {
    font-size: 0.82rem;
}

#main-content .nav-tabs .nav-link,
#main-content .nav-pills .nav-link,
.offcanvas .nav-tabs .nav-link,
.offcanvas .nav-pills .nav-link,
.modal .nav-tabs .nav-link,
.modal .nav-pills .nav-link {
    font-size: 0.82rem;
}

#main-content .alert,
.offcanvas .alert,
.modal .alert {
    font-size: 0.82rem;
}

#main-content small,
#main-content .small,
.offcanvas small,
.offcanvas .small,
.modal small,
.modal .small {
    font-size: 0.75rem;
}

/* Resource Management & Calendar Heatmap Components (Strictly ZERO Inline Styles) */
.ppm-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.5rem;
}

.ppm-calendar-day-card {
    min-height: 110px;
    border-radius: 0.375rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ppm-calendar-day-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.ppm-calendar-day-normal {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
}

.ppm-calendar-day-weekend {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    opacity: 0.75;
}

.ppm-calendar-day-allocated {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.ppm-calendar-day-unavailable {
    background-color: #fff1f2;
    border: 1px solid #fecdd3;
    opacity: 0.85;
}

.ppm-calendar-day-placeholder {
    min-height: 110px;
    background-color: #f8f9fa;
    border: 1px dashed #dee2e6;
    border-radius: 0.375rem;
    opacity: 0.45;
}

.ppm-calendar-day-full {
    background-color: #fefce8;
    border: 1px solid #fef08a;
}

.ppm-calendar-day-overallocated {
    background-color: #fef2f2;
    border: 2px solid #ef4444;
}

.ppm-calendar-day-conflict {
    background-color: #fef2f2;
    border: 2px dashed #dc2626;
}

.ppm-progress-bar-thin {
    height: 6px;
    border-radius: 3px;
}

.ppm-badge-overallocated {
    background-color: #dc2626;
    color: #ffffff;
    font-weight: 700;
}

.ppm-badge-capacity-full {
    background-color: #eab308;
    color: #000000;
    font-weight: 600;
}

.ppm-badge-available {
    background-color: #22c55e;
    color: #ffffff;
}

.ppm-calendar-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.ppm-resource-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Bulletproof Modal Stacking Context */
.modal-backdrop {
    z-index: 1050 !important;
}

.modal {
    z-index: 1060 !important;
}

.modal-dialog {
    z-index: 1065 !important;
}

/* Authentication Layout & Cards (Strictly ZERO Inline Styles) */
.ppm-auth-wrapper {
    min-height: 100vh;
    background-color: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.ppm-auth-card {
    width: 100%;
    max-width: 440px;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.02);
    background-color: #ffffff;
    overflow: hidden;
}

.ppm-auth-header {
    padding: 2rem 2rem 1.25rem 2rem;
    text-align: center;
}

.ppm-auth-body {
    padding: 1.5rem 2rem 2rem 2rem;
}

.ppm-auth-footer {
    padding: 1rem 2rem;
    background-color: #f8fafc;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

.ppm-auth-logo {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.ppm-navbar-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.text-flowpulse-blue {
    color: #25A9C4 !important;
}

.ppm-navbar-slogan {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: #25A9C4;
    font-family: 'Dancing Script', 'Caveat', 'Segoe Script', 'Brush Script MT', cursive;
    font-size: 1.55rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
    user-select: none;
    pointer-events: none;
    z-index: 1;
}

.btn-outline-flowpulse {
    color: #25A9C4;
    border-color: #25A9C4;
    background-color: transparent;
}

.btn-outline-flowpulse:hover,
.btn-outline-flowpulse:focus,
.btn-outline-flowpulse:active,
.btn-outline-flowpulse.show {
    color: #ffffff;
    background-color: #25A9C4;
    border-color: #25A9C4;
}

.ppm-user-toggle {
    color: #25A9C4 !important;
    text-decoration: none;
}

.ppm-user-toggle:hover,
.ppm-user-toggle:focus {
    color: #1f8e9f !important;
}

.ppm-user-toggle .fa-circle-user,
.ppm-user-toggle .ppm-user-name,
.ppm-user-toggle .ppm-user-role {
    color: #25A9C4 !important;
}

/* FlowPulse Top Navbar Dropdowns */
.ppm-navbar-dropdown {
    border-top: 3px solid #25A9C4;
    border-radius: 0.5rem;
}

.ppm-navbar-dropdown .dropdown-item:hover,
.ppm-navbar-dropdown .dropdown-item:focus {
    background-color: rgba(37, 169, 196, 0.08);
    color: #25A9C4;
}

.ppm-navbar-dropdown .dropdown-item.active,
.ppm-navbar-dropdown .dropdown-item:active {
    background-color: #25A9C4;
    color: #ffffff;
}

.ppm-navbar-dropdown .dropdown-item:hover .fa-solid,
.ppm-navbar-dropdown .dropdown-item:focus .fa-solid {
    color: #25A9C4 !important;
}

.ppm-navbar-dropdown .ppm-badge-flowpulse {
    background-color: #25A9C4 !important;
    color: #ffffff !important;
}

.ppm-navbar-dropdown .ppm-badge-admin {
    background-color: #dc3545 !important;
    color: #ffffff !important;
    font-weight: 700;
}

.ppm-navbar-dropdown .ppm-dropdown-user-name {
    color: #25A9C4 !important;
}

.ppm-navbar-dropdown .ppm-dropdown-user-email {
    color: #25A9C4 !important;
    opacity: 0.8;
}

.ppm-navbar-dropdown .ppm-dropdown-admin-link {
    color: #dc3545 !important;
    font-weight: 700 !important;
}

.ppm-navbar-dropdown .ppm-dropdown-admin-link .fa-gear {
    color: #dc3545 !important;
}

.ppm-navbar-dropdown .ppm-dropdown-admin-link:hover,
.ppm-navbar-dropdown .ppm-dropdown-admin-link:focus {
    background-color: rgba(220, 53, 69, 0.1) !important;
    color: #b02a37 !important;
}

.ppm-navbar-dropdown .ppm-dropdown-admin-link:hover .fa-gear,
.ppm-navbar-dropdown .ppm-dropdown-admin-link:focus .fa-gear {
    color: #b02a37 !important;
}

.ppm-auth-brand-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.025em;
}

/* RBAC UI Directives */
.ppm-btn-disabled {
    cursor: not-allowed !important;
    opacity: 0.55;
    pointer-events: none;
}

.ppm-badge-role {
    font-size: 0.72rem;
    padding: 0.25rem 0.5rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.ppm-field-masked {
    letter-spacing: 0.2em;
    font-family: monospace;
    color: #94a3b8;
}

/* ==========================================================================
   Executive PMO Command Center Components (Strictly ZERO Inline Styles)
   ========================================================================== */

.ppm-period-banner {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border: 1px solid #334155;
    border-radius: 0.5rem;
    color: #f8fafc;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

.ppm-chart-doughnut-container {
    height: 320px;
    position: relative;
    width: 100%;
}

.ppm-chart-doughnut-sm-container {
    height: 230px;
    position: relative;
    width: 100%;
}

.ppm-chart-histogram-container {
    height: 250px;
    position: relative;
    width: 100%;
}

.ppm-chart-initiatives-container {
    min-height: 340px;
    height: 360px;
    position: relative;
    width: 100%;
}

.ppm-chart-bar-sm-container {
    height: 200px;
    position: relative;
    width: 100%;
}


.ppm-chart-center-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    text-align: center;
    z-index: 5;
}

.ppm-center-stat-val {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    color: #0f172a;
}

.ppm-center-stat-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #64748b;
}

/* High-Density Executive KPI Cards */
.ppm-kpi-card-exec {
    border-left-width: 4px;
    border-left-style: solid;
    border-radius: 0.375rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ppm-kpi-card-exec:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px -2px rgba(0, 0, 0, 0.08);
}

.ppm-kpi-card-exec-primary { border-left-color: #0d6efd; }
.ppm-kpi-card-exec-success { border-left-color: #10b981; }
.ppm-kpi-card-exec-warning { border-left-color: #f59e0b; }
.ppm-kpi-card-exec-danger { border-left-color: #ef4444; }
.ppm-kpi-card-exec-info { border-left-color: #06b6d4; }
.ppm-kpi-card-exec-dark { border-left-color: #1e293b; }

.ppm-kpi-val {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.2;
    color: #0f172a;
}

.ppm-kpi-val-sm {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.2;
}

.ppm-kpi-label {
    font-size: 0.70rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #64748b;
    margin-bottom: 0.25rem;
}

/* 2x2 Financial Inflow / Outflow Matrix */
.ppm-flow-card {
    border-radius: 0.375rem;
    border-left-width: 4px;
    border-left-style: solid;
}

.ppm-flow-card-inbound {
    background-color: #fef2f2;
    border-left-color: #ef4444;
}

.ppm-flow-card-outbound {
    background-color: #f0fdf4;
    border-left-color: #10b981;
}

.ppm-flow-card-net {
    background-color: #f8fafc;
    border-left-color: #3b82f6;
}

/* Status Indicators & Legend Swatches */
.ppm-status-pill-g {
    background-color: #d1fae5;
    color: #065f46;
    font-weight: 600;
    font-size: 0.72rem;
    padding: 0.2rem 0.5rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.ppm-status-pill-y {
    background-color: #fef3c7;
    color: #92400e;
    font-weight: 600;
    font-size: 0.72rem;
    padding: 0.2rem 0.5rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.ppm-status-pill-r {
    background-color: #fee2e2;
    color: #991b1b;
    font-weight: 600;
    font-size: 0.72rem;
    padding: 0.2rem 0.5rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.ppm-legend-swatch {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    display: inline-block;
    flex-shrink: 0;
}

.ppm-swatch-green { background-color: #10b981; }
.ppm-swatch-yellow { background-color: #f59e0b; }
.ppm-swatch-red { background-color: #ef4444; }
.ppm-swatch-portfolios { background-color: #059669; }
.ppm-swatch-programs { background-color: #10b981; }
.ppm-swatch-projects { background-color: #34d399; }
.ppm-swatch-primary { background-color: #0d6efd; }
.ppm-swatch-secondary { background-color: #6c757d; }
.ppm-swatch-purple { background-color: #6f42c1; }
.ppm-swatch-info { background-color: #0dcaf0; }
.ppm-swatch-dark { background-color: #212529; }
.ppm-swatch-warning { background-color: #ffc107; }
.ppm-swatch-danger { background-color: #dc3545; }
.ppm-swatch-teal { background-color: #20c997; }
.ppm-swatch-indigo { background-color: #6610f2; }
.ppm-swatch-cyan { background-color: #0dcaf0; }

.ppm-progress-thin {
    height: 6px;
    border-radius: 3px;
}

.ppm-progress-sm {
    height: 10px;
    border-radius: 5px;
}

.ppm-table-dense th,
.ppm-table-dense td {
    padding: 0.45rem 0.65rem;
    vertical-align: middle;
}

.ppm-w-170 {
    width: 170px;
}

.ppm-w-190 {
    width: 190px;
}

.ppm-h-4 {
    height: 4px;
}

.ppm-h-24 {
    height: 24px;
}

.ppm-modal-backdrop-semi {
    background-color: rgba(0, 0, 0, 0.5);
}

/* 4-Line Baseline & Timeline Comparison Modal (Strictly ZERO Inline Styles) */
.ppm-timeline-label-col {
    width: 215px;
    min-width: 215px;
    max-width: 215px;
}

.ppm-timeline-track {
    flex-grow: 1;
    position: relative;
    height: 28px;
    border-radius: 0.375rem;
    background-color: var(--bs-gray-100);
    border: 1px solid var(--bs-gray-200);
    overflow: hidden;
}

.ppm-timeline-bar {
    position: absolute;
    height: 100%;
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    padding: 0 0.5rem;
}

/* Project Resource Allocation Calendar (Strictly ZERO Inline Styles) */
.ppm-proj-cal-card {
    background-color: #ffffff;
    border-radius: 0.5rem;
}

.ppm-proj-cal-table {
    table-layout: fixed;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    overflow: hidden;
}

.ppm-proj-cal-th {
    width: 14.285%;
    padding: 0.65rem 0.5rem;
    text-align: center;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background-color: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
    color: #475569;
}

.ppm-proj-cal-week-th {
    width: 50px;
    padding: 0.65rem 0.25rem;
    text-align: center;
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    background-color: #f1f5f9;
    border-bottom: 2px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    color: #64748b;
}

.ppm-proj-cal-week-td {
    width: 50px;
    background-color: #f8fafc;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    vertical-align: top;
    padding: 0.5rem 0.25rem;
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.ppm-proj-cal-cell {
    min-height: 120px;
    height: 120px;
    vertical-align: top;
    padding: 0.4rem;
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    background-color: #ffffff;
    transition: background-color 0.15s ease;
}

.ppm-proj-cal-cell-other-month {
    background-color: #fafafa;
    opacity: 0.6;
}

.ppm-proj-cal-cell-weekend {
    background-color: #f8f9fa;
}

.ppm-proj-cal-cell-today {
    background-color: #eff6ff;
    border: 2px solid #3b82f6 !important;
}

.ppm-proj-cal-day-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.35rem;
    padding-bottom: 0.2rem;
    border-bottom: 1px dashed #e2e8f0;
    cursor: pointer;
}

.ppm-proj-cal-day-num {
    font-weight: 700;
    font-size: 0.825rem;
    color: #1e293b;
}

.ppm-proj-cal-day-num-today {
    color: #1d4ed8;
    background-color: #dbeafe;
    padding: 0.1rem 0.35rem;
    border-radius: 0.25rem;
}

.ppm-proj-cal-day-total {
    font-size: 0.7rem;
    font-weight: 700;
    color: #0284c7;
    background-color: #e0f2fe;
    padding: 0.1rem 0.35rem;
    border-radius: 0.25rem;
    font-family: monospace;
}

.ppm-proj-cal-resources-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    max-height: 85px;
    overflow-y: auto;
}

.ppm-proj-cal-res-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.2rem 0.35rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    border: 1px solid transparent;
}

.ppm-proj-cal-res-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

.ppm-proj-cal-res-person {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.ppm-proj-cal-res-tool {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    color: #334155;
}

.ppm-proj-cal-res-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 105px;
}

.ppm-proj-cal-res-hours {
    font-family: monospace;
    font-weight: 700;
    font-size: 0.725rem;
    margin-left: 0.25rem;
    flex-shrink: 0;
}

/* 12-Month Annual Resource Calendar Grid (Strictly ZERO Inline Styles) */
.ppm-annual-calendar-wrapper {
    overflow-x: auto;
    width: 100%;
}

.ppm-annual-calendar-table {
    table-layout: fixed;
    width: 100%;
    min-width: 1080px;
    font-size: 0.8rem;
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.ppm-annual-col-month {
    width: 125px;
    min-width: 125px;
    max-width: 125px;
    font-weight: 600;
    white-space: nowrap;
    position: sticky;
    left: 0;
    z-index: 2;
    background-color: #f8fafc;
    border-right: 2px solid #cbd5e1;
    padding: 6px 8px;
    vertical-align: middle;
}

.ppm-annual-col-month-hdr {
    position: sticky;
    left: 0;
    z-index: 3;
    background-color: #f1f5f9;
    border-right: 2px solid #cbd5e1;
    padding: 8px;
    font-weight: 700;
}

.ppm-annual-col-day {
    width: calc((100% - 245px) / 31);
    min-width: 26px;
    max-width: 32px;
    text-align: center;
    padding: 4px 1px;
    font-size: 0.775rem;
    font-family: monospace;
    vertical-align: middle;
}

.ppm-annual-col-day-hdr {
    text-align: center;
    padding: 6px 2px;
    font-weight: 700;
    font-size: 0.75rem;
    background-color: #f8fafc;
    color: #475569;
    border-bottom: 2px solid #cbd5e1;
}

.ppm-annual-col-total {
    width: 120px;
    min-width: 120px;
    max-width: 120px;
    text-align: center;
    white-space: nowrap;
    font-family: monospace;
    font-size: 0.8rem;
    font-weight: 600;
    vertical-align: middle;
    border-left: 2px solid #cbd5e1;
    padding: 6px 4px;
}

.ppm-annual-col-total-hdr {
    text-align: center;
    font-weight: 700;
    background-color: #f8fafc;
    border-left: 2px solid #cbd5e1;
    border-bottom: 2px solid #cbd5e1;
    padding: 8px 4px;
}

.ppm-annual-cell {
    height: 34px;
    transition: background-color 0.1s ease, transform 0.1s ease;
    cursor: pointer;
    border: 1px solid #e2e8f0;
    position: relative;
    user-select: none;
}

.ppm-annual-cell:hover {
    transform: scale(1.08);
    z-index: 5;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.ppm-annual-cell-empty {
    background-color: #f8fafc;
    color: #cbd5e1;
    cursor: default;
    border: 1px solid #f1f5f9;
    pointer-events: none;
}

.ppm-annual-cell-nonworking {
    background-color: #e2e8f0;
    color: #64748b;
    font-weight: 500;
}

.ppm-annual-cell-ooo {
    background-color: #ffedd5;
    color: #c2410c;
    font-weight: 700;
}

.ppm-annual-cell-ooo-over {
    background-color: #fed7aa;
    color: #991b1b;
    font-weight: 800;
    border: 2px solid #dc2626 !important;
}

.ppm-annual-cell-overallocated {
    background-color: #fee2e2;
    color: #991b1b;
    font-weight: 800;
    border: 1px solid #fca5a5;
}

.ppm-annual-cell-allocated {
    background-color: #e0f2fe;
    color: #0369a1;
    font-weight: 600;
}

.ppm-annual-cell-normal {
    background-color: #ffffff;
    color: #94a3b8;
}

.ppm-annual-comparison-alert {
    color: #dc2626;
    font-weight: 800;
    background-color: #fef2f2;
}

.ppm-annual-comparison-ok {
    color: #15803d;
    font-weight: 700;
}

.ppm-annual-comparison-neutral {
    color: #475569;
}

.ppm-annual-legend-box {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    vertical-align: middle;
    margin-right: 5px;
    border: 1px solid rgba(0,0,0,0.1);
}

.ppm-annual-filter-input {
    max-width: 145px;
}

.ppm-annual-filter-num {
    max-width: 80px;
}

.ppm-annual-filter-select {
    min-width: 130px;
}

/* Tabulator Annual Calendar Matrix Specific Rules */
.tabulator .tabulator-cell.ppm-annual-cell {
    height: 36px;
    line-height: 26px;
    padding: 4px 1px;
    font-size: 0.775rem;
    font-family: monospace;
    text-align: center;
    cursor: pointer;
    box-sizing: border-box;
    transition: background-color 0.1s ease, filter 0.1s ease;
    user-select: none;
}

.tabulator .tabulator-cell.ppm-annual-cell:hover {
    filter: brightness(0.92);
    z-index: 5;
}

/* 1. Empty / Non-existent Day (e.g. Feb 30/31) */
.tabulator .tabulator-cell.ppm-annual-cell-empty {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0 !important;
    color: #cbd5e1;
    cursor: default;
    pointer-events: none;
}

/* 2. Non-business Day / Weekend: gray background, stronger gray border */
.tabulator .tabulator-cell.ppm-annual-cell-nonworking {
    background-color: #f1f5f9;
    border: 2px solid #94a3b8 !important;
    color: #475569;
    font-weight: 600;
}

/* 3. Out of Office (OoO) Day: orange background, stronger orange border */
.tabulator .tabulator-cell.ppm-annual-cell-ooo {
    background-color: #ffedd5;
    border: 2px solid #ea580c !important;
    color: #9a3412;
    font-weight: 700;
}

/* 4. OoO AND Over-scheduled: orange background, strong dark red border */
.tabulator .tabulator-cell.ppm-annual-cell-ooo-over {
    background-color: #fed7aa;
    border: 2px solid #b91c1c !important;
    color: #7f1d1d;
    font-weight: 800;
}

/* 5. Over-scheduled Working Day: red background, stronger red border */
.tabulator .tabulator-cell.ppm-annual-cell-overallocated {
    background-color: #fee2e2;
    border: 2px solid #dc2626 !important;
    color: #991b1b;
    font-weight: 800;
}

/* 6. Allocated Working Day: light blue background, stronger blue border */
.tabulator .tabulator-cell.ppm-annual-cell-allocated {
    background-color: #e0f2fe;
    border: 2px solid #0284c7 !important;
    color: #0369a1;
    font-weight: 700;
}

/* 7. Normal Working Day Unallocated: white background, clean slate border */
.tabulator .tabulator-cell.ppm-annual-cell-normal {
    background-color: #ffffff;
    border: 1px solid #cbd5e1 !important;
    color: #94a3b8;
}

.tabulator .tabulator-cell.ppm-annual-col-year {
    background-color: #f8fafc;
    font-weight: 600;
    border-right: 1px solid #cbd5e1;
    padding: 6px 4px;
    text-align: center;
}

.tabulator .tabulator-cell.ppm-annual-col-month {
    background-color: #f8fafc;
    font-weight: 600;
    border-right: 2px solid #cbd5e1;
    padding: 6px 8px;
}

.tabulator .tabulator-cell.ppm-annual-col-total {
    border-left: 2px solid #cbd5e1;
    padding: 6px 4px;
    font-family: monospace;
    font-weight: 700;
    text-align: center;
}

.tabulator .tabulator-header .tabulator-col.ppm-annual-tabulator-year-hdr {
    background-color: #f1f5f9;
    border-right: 1px solid #cbd5e1;
    font-weight: 700;
    text-align: center;
}

.tabulator .tabulator-header .tabulator-col.ppm-annual-tabulator-month-hdr {
    background-color: #f1f5f9;
    border-right: 2px solid #cbd5e1;
    font-weight: 700;
}

.tabulator .tabulator-header .tabulator-col.ppm-annual-tabulator-total-hdr {
    background-color: #f1f5f9;
    border-left: 2px solid #cbd5e1;
    font-weight: 700;
}

.tabulator .tabulator-footer {
    background-color: #f8fafc;
    border-top: 2px solid #cbd5e1;
    font-size: 0.8rem;
}

/* Day Column Headers (1 to 31) in Annual Calendar */
.tabulator .tabulator-header .tabulator-col.ppm-annual-tabulator-day-hdr {
    padding: 0 !important;
    text-align: center !important;
    border-right: 1px solid #cbd5e1;
}

.tabulator .tabulator-header .tabulator-col.ppm-annual-tabulator-day-hdr .tabulator-col-content {
    padding: 6px 1px !important;
    text-align: center !important;
}

.tabulator .tabulator-header .tabulator-col.ppm-annual-tabulator-day-hdr .tabulator-col-title-holder {
    text-align: center !important;
}

.tabulator .tabulator-header .tabulator-col.ppm-annual-tabulator-day-hdr .tabulator-col-title {
    text-align: center !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    color: #475569 !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
}

/* Resizable Year and Month First Columns */
.tabulator .tabulator-header .tabulator-col.ppm-annual-tabulator-year-hdr,
.tabulator .tabulator-header .tabulator-col.ppm-annual-tabulator-month-hdr {
    position: relative;
}

.tabulator .tabulator-header .tabulator-col.ppm-annual-tabulator-year-hdr .tabulator-col-resize-handle,
.tabulator .tabulator-header .tabulator-col.ppm-annual-tabulator-month-hdr .tabulator-col-resize-handle {
    width: 8px !important;
    position: absolute !important;
    right: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    z-index: 30 !important;
    cursor: col-resize !important;
}

.tabulator .tabulator-header .tabulator-col.ppm-annual-tabulator-year-hdr .tabulator-col-resize-handle:hover,
.tabulator .tabulator-header .tabulator-col.ppm-annual-tabulator-month-hdr .tabulator-col-resize-handle:hover {
    background-color: #0d6efd !important;
}

/* Legend items with matching background and stronger borders */
.ppm-annual-legend-box.ppm-annual-cell-normal {
    background-color: #ffffff;
    border: 2px solid #cbd5e1;
}
.ppm-annual-legend-box.ppm-annual-cell-allocated {
    background-color: #e0f2fe;
    border: 2px solid #0284c7;
}
.ppm-annual-legend-box.ppm-annual-cell-nonworking {
    background-color: #f1f5f9;
    border: 2px solid #94a3b8;
}
.ppm-annual-legend-box.ppm-annual-cell-ooo {
    background-color: #ffedd5;
    border: 2px solid #ea580c;
}
.ppm-annual-legend-box.ppm-annual-cell-overallocated {
    background-color: #fee2e2;
    border: 2px solid #dc2626;
}

/* PPM Multi-Criteria Filter Controls (zero inline styles) */
.ppm-filter-input-date {
    width: 140px;
}
.ppm-filter-input-num {
    width: 85px;
}
.ppm-filter-btn-reset {
    white-space: nowrap;
}

/* Milestone Diamond Status Indicators */
.ppm-diamond-green {
    color: #198754 !important;
}

.ppm-diamond-amber {
    color: #f59e0b !important;
}

.ppm-diamond-danger {
    color: #dc3545 !important;
}

/* Risk Inspector & Modal Scrollable Fixes (Strictly ZERO Inline Styles) */
#riskInspectorModal .modal-dialog-scrollable .modal-content {
    max-height: calc(100vh - 3.5rem);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#riskInspectorModal .modal-dialog-scrollable .modal-body {
    overflow-y: auto !important;
    flex: 1 1 auto;
    min-height: 0;
    max-height: calc(100vh - 12rem);
    scrollbar-gutter: stable;
}

/* ==========================================================================
   PPM Inheritance Graph Styles (D3 + Dagre direct Left-to-Right DAG)
   ========================================================================== */
.ppm-graph-wrapper {
    position: relative;
    width: 100%;
    height: 440px;
    min-height: 400px;
    background-color: #f8fafc;
    background-image: radial-gradient(#cbd5e1 1px, transparent 1px);
    background-size: 20px 20px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.ppm-inheritance-graph-svg {
    width: 100%;
    height: 100%;
    display: block;
    cursor: grab;
}

.ppm-inheritance-graph-svg:active {
    cursor: grabbing;
}

/* Floating Zoom Toolbar in Graph View */
.ppm-graph-toolbar {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    display: flex;
    gap: 4px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 3px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Edges & Markers */
.ppm-graph-edge {
    fill: none;
    stroke: #94a3b8;
    stroke-width: 2px;
    transition: stroke 0.2s ease, stroke-width 0.2s ease;
}

.ppm-graph-edge.ppm-graph-edge-highlight {
    stroke: #0d6efd;
    stroke-width: 2.5px;
}

.ppm-graph-edge.ppm-graph-edge-impact {
    stroke: #f59e0b;
    stroke-width: 2.2px;
    stroke-dasharray: 4 2;
}

.ppm-graph-arrow-head {
    fill: #94a3b8;
}

.ppm-graph-arrow-head-active {
    fill: #0d6efd;
}

.ppm-graph-arrow-head-impact {
    fill: #f59e0b;
}

/* Edge Weight Badges */
.ppm-graph-edge-badge-rect {
    fill: #ffffff;
    stroke: #cbd5e1;
    stroke-width: 1.5px;
}

.ppm-graph-edge-badge-rect.active {
    fill: #eff6ff;
    stroke: #3b82f6;
}

.ppm-graph-edge-badge-rect.impact {
    fill: #fffbeb;
    stroke: #f59e0b;
}

.ppm-graph-edge-badge-text {
    font-size: 11px;
    font-weight: 700;
    font-family: monospace;
    fill: #475569;
    user-select: none;
}

.ppm-graph-edge-badge-text.active {
    fill: #1d4ed8;
}

.ppm-graph-edge-badge-text.impact {
    fill: #b45309;
}

/* Node Cards */
.ppm-graph-node-card {
    fill: #ffffff;
    stroke: #e2e8f0;
    stroke-width: 1.5px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.04));
    transition: all 0.2s ease;
}

.ppm-graph-node-card.active-border {
    stroke: #0d6efd;
    stroke-width: 2.5px;
    filter: drop-shadow(0 4px 10px rgba(13, 110, 253, 0.18));
}

.ppm-graph-node-group:hover .ppm-graph-node-card {
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.1));
}

/* Left Accent Bars */
.ppm-graph-node-accent.danger {
    fill: #dc3545;
}

.ppm-graph-node-accent.warning {
    fill: #ffc107;
}

.ppm-graph-node-accent.success {
    fill: #198754;
}

.ppm-graph-card-inner {
    user-select: none;
    box-sizing: border-box;
}

/* ==========================================================================
   PPM Movable & Resizable Modals (Strictly ZERO Inline Styles)
   ========================================================================== */
.ppm-modal-header-draggable {
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.ppm-modal-header-draggable:active,
.ppm-modal-header-active,
body.ppm-modal-dragging .ppm-modal-header-draggable {
    cursor: grabbing !important;
}

body.ppm-modal-dragging {
    cursor: grabbing !important;
    user-select: none !important;
    -webkit-user-select: none !important;
}

body.ppm-modal-resizing {
    user-select: none !important;
    -webkit-user-select: none !important;
}

.ppm-modal-resizable {
    position: relative;
}

.ppm-modal-resizable .modal-content {
    position: relative;
}

.ppm-modal-resized {
    max-width: none !important;
    min-height: 0 !important;
}

.ppm-modal-resized .modal-content {
    height: 100% !important;
    max-height: none !important;
    display: flex !important;
    flex-direction: column !important;
}

.ppm-modal-resized .modal-content > form {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
}

.ppm-modal-resized .modal-body {
    max-height: none !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
}

/* Diagonal Corner Handle (Bottom-Right) */
.ppm-modal-resize-handle {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    cursor: se-resize;
    z-index: 1070;
    opacity: 0.5;
    transition: opacity 0.15s ease, transform 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

.ppm-modal-resize-handle::after {
    content: "";
    width: 9px;
    height: 9px;
    border-right: 2px solid #64748b;
    border-bottom: 2px solid #64748b;
    border-radius: 1px;
}

.ppm-modal-resize-handle:hover,
body.ppm-modal-resizing .ppm-modal-resize-handle {
    opacity: 1;
    transform: scale(1.15);
}

/* Horizontal Right Edge Handle */
.ppm-modal-resize-edge-e {
    position: absolute;
    top: 0;
    right: -3px;
    width: 10px;
    height: 100%;
    cursor: e-resize;
    z-index: 1069;
}

/* Vertical Bottom Edge Handle */
.ppm-modal-resize-edge-s {
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 10px;
    cursor: s-resize;
    z-index: 1069;
}

/* Global Time Frame Filter Bar */
.ppm-timeframe-bar {
    position: relative;
    z-index: 1045;
}

.ppm-timeframe-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background-color: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    padding: 0.2rem 0.5rem;
}

.ppm-timeframe-select {
    width: auto;
    min-width: 145px;
    max-width: 185px;
    font-size: 0.8rem;
    font-weight: 600;
    border-color: #cbd5e1;
}

.ppm-timeframe-range-btn {
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    color: #0d6efd;
    background-color: #eef5ff;
    border: 1px solid #cfe2ff;
    border-radius: 0.25rem;
    padding: 0.2rem 0.5rem;
}

.ppm-timeframe-range-btn:hover {
    background-color: #dbeafe;
    color: #0a58ca;
}

.ppm-timeframe-popover {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 310px;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    padding: 0.875rem;
    z-index: 1060;
}

.ppm-schedule-alert-banner {
    border-left: 4px solid #f59e0b;
}

/* Global Time Frame Loading Overlay */
.ppm-timeframe-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(30, 41, 59, 0.45);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease-in-out;
}

.ppm-timeframe-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.ppm-timeframe-spinner-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    min-width: 220px;
    text-align: center;
}

.ppm-timeframe-spinner-icon {
    font-size: 2.25rem;
    color: #2563eb;
}

.ppm-timeframe-spinnerText {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
    letter-spacing: -0.01em;
}



