/* Harmonisation MARRION DH selon BELEJ SAP ERP Design Guidelines. */
:root {
    --navy-950: var(--color-shell);
    --navy-900: #2d4356;
    --navy-800: var(--color-sidebar);
    --blue-700: var(--color-primary-hover);
    --blue-600: var(--color-primary);
    --gray-950: var(--color-text);
    --gray-800: #334a5e;
    --gray-700: #465d6f;
    --gray-600: var(--color-text-muted);
    --gray-500: #748391;
    --gray-300: var(--color-border-strong);
    --gray-200: var(--color-border);
    --gray-100: #edf0f2;
    --gray-50: var(--color-background);
    --success-700: var(--color-success);
    --warning-700: var(--color-warning);
    --danger-700: var(--color-danger);
    --info-700: var(--color-information);
    --sidebar-width: 15rem;
    --sidebar-collapsed: 3.5rem;
    --topbar-height: 3rem;
    --radius-sm: var(--radius-small);
    --radius-md: var(--radius-medium);
    --radius-lg: var(--radius-medium);
    --shadow-sm: var(--shadow-subtle);
    --shadow-md: 0 4px 12px rgba(29,45,62,.12);
    --shadow-lg: 0 12px 30px rgba(29,45,62,.18);
    --color-canvas: var(--color-background);
    --color-ink: var(--color-text);
    --color-muted: var(--color-text-muted);
    --color-line: var(--color-border);
    --color-accent: var(--color-primary);
}

html { scroll-behavior: smooth; }
body { font-size: .875rem; line-height: 1.4; }
:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.skip-link { position: fixed; z-index: 200; top: .35rem; left: .5rem; padding: .5rem .75rem; color: #fff; background: var(--color-primary); border-radius: var(--radius-small); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

.app-topbar { gap: var(--space-2); padding: 0 var(--space-3); background: var(--color-shell); box-shadow: none; }
.brand { min-width: calc(var(--sidebar-width) - 2.5rem); gap: var(--space-2); }
.brand-mark { width: 1.85rem; height: 1.85rem; border-radius: var(--radius-small); background: var(--color-primary); box-shadow: none; font-size: .78rem; }
.brand strong { font-size: .8rem; }
.brand small { margin: 0; font-size: .57rem; letter-spacing: .075em; }
.icon-button { width: 2.25rem; height: 2.25rem; }
.topbar-search { width: min(22rem,32vw); height: 2rem; border-radius: var(--radius-small); background: rgba(255,255,255,.09); }
.topbar-search input { font-size: .78rem; }
.user-menu { height: 2.25rem; border-radius: var(--radius-small); }
.avatar { width: 1.65rem; height: 1.65rem; font-size: .65rem; }
.user-menu strong { font-size: .72rem; }
.user-menu small { display: none; }

.app-sidebar { color: #e3e8ec; background: var(--color-sidebar); }
.sidebar-nav { padding: var(--space-2) var(--space-1); }
.nav-section { margin: var(--space-4) var(--space-3) var(--space-1); color: #b7c3cc; font-size: .6rem; }
.nav-link { min-height: 2.25rem; margin: 1px 0; gap: var(--space-3); padding: .45rem .7rem; border-radius: var(--radius-small); color: #edf1f4; font-size: .78rem; }
.nav-link:hover { background: rgba(255,255,255,.1); }
.nav-link.is-active { background: var(--color-sidebar-active); box-shadow: none; }
.nav-link[aria-disabled="true"] { opacity: .55; }
.sidebar-footer { padding: var(--space-2) var(--space-3); }

.content-header { min-height: 2.75rem; padding: .55rem clamp(.75rem,2vw,1.5rem); background: var(--color-surface-muted); }
.breadcrumb { font-size: .72rem; }
.app-main { max-width: 120rem; padding: clamp(.75rem,2vw,1.5rem); }

.page-heading { margin-bottom: var(--space-4); padding-bottom: var(--space-3); border-bottom: 1px solid var(--color-border); }
.page-heading h1 { font-size: clamp(1.25rem,2vw,1.5rem); line-height: 1.25; letter-spacing: -.01em; }
.page-heading > p:not(.eyebrow), .page-heading div > p:not(.eyebrow) { margin-top: var(--space-1); font-size: .8rem; }
.eyebrow { margin-bottom: var(--space-1); font-size: .61rem; letter-spacing: .09em; }
.section-heading { margin: var(--space-5) 0 var(--space-2); align-items: center; }
.section-heading h2 { font-size: 1rem; }
.section-heading p { font-size: .78rem; }

.button, .primary-button, .primary-link { min-height: 2.25rem; padding: .45rem .75rem; border-radius: var(--radius-small); font-size: .78rem; }
.button:hover, .primary-link:hover, .primary-button:hover { transform: none; box-shadow: none; }
.button-small { min-height: 1.85rem; padding: .3rem .5rem; font-size: .72rem; }
.button-danger { border-color: var(--color-danger); }

.kpi-grid, .metric-grid { gap: var(--space-3); }
.kpi-card, .metric-grid article { padding: var(--space-3); border-radius: var(--radius-medium); box-shadow: none; }
.kpi-card::after { width: 3px; height: auto; inset: 0 auto 0 0; }
.kpi-card-header { font-size: .72rem; }
.kpi-icon { width: 1.8rem; height: 1.8rem; }
.kpi-card > span:first-child, .metric-grid article > span:first-child { display: block; margin-bottom: var(--space-1); color: var(--color-text-muted); font-size: .7rem; font-weight: 600; }
.kpi-card > strong, .metric-grid article > strong { display: block; color: var(--color-text); font-size: clamp(1.15rem,2vw,1.45rem); line-height: 1.25; overflow-wrap: anywhere; }
.kpi-card > strong + small, .metric-grid article > strong + small { display: block; margin-top: var(--space-1); color: var(--color-text-muted); }
.kpi-value, .metric-grid strong { margin-top: var(--space-1); font-size: clamp(1.25rem,2vw,1.55rem); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi-trend { margin-top: 2px; }
.panel, .card, .admin-card, .welcome-panel, .reference-section, .profile-section, .admin-form, .auth-card { border-radius: var(--radius-medium); box-shadow: none; }
.card, .admin-card { padding: var(--space-3); }
.panel-header { min-height: 2.75rem; padding: .6rem .75rem; }
.panel-body { padding: .75rem; }
.welcome-panel { padding: var(--space-5); }
.welcome-panel h1 { font-size: 1.75rem; line-height: 1.2; }

.filter-bar { padding: var(--space-3); background: var(--color-surface-muted); }
.filter-bar .form-grid { grid-template-columns: repeat(4,minmax(9rem,1fr)); gap: var(--space-2) var(--space-3); }
.filter-bar .field, .filter-bar .form-field { margin-bottom: 0; }
.filter-bar .form-actions { margin-top: var(--space-2); }
.form-grid { gap: 0 var(--space-3); }
.form-field, .field { margin-bottom: var(--space-3); }
.field, .form-field label { font-size: .73rem; }
.field > span, .form-field label { margin-bottom: var(--space-1); }
.form-field input, .form-field select, .form-field textarea, .field input, .field select, .field textarea, .inline-form input, .inline-form select { min-height: 2.25rem; padding: .45rem .6rem; border-radius: var(--radius-small); font-size: .8rem; }
.form-field textarea, .field textarea { min-height: 5rem; }
.form-actions { gap: var(--space-2); margin-top: var(--space-3); }
.dashboard-filter .filter-bar { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: var(--space-2) var(--space-3); align-items: end; }
.dashboard-filter .filter-bar label { min-width: 0; display: grid; gap: var(--space-1); color: var(--color-text-muted); font-size: .7rem; font-weight: 600; }
.dashboard-filter .filter-bar input, .dashboard-filter .filter-bar select { width: 100%; min-width: 0; min-height: 2.25rem; padding: .45rem .6rem; border: 1px solid var(--color-border-strong); border-radius: var(--radius-small); background: var(--color-surface); }
.dashboard-filter .filter-bar > .button { justify-self: start; }

.table-shell { border-radius: var(--radius-medium); box-shadow: none; }
.data-table { font-size: .77rem; font-variant-numeric: tabular-nums; }
.data-table th, .data-table td { height: 2.35rem; padding: .45rem .7rem; }
.data-table th { position: sticky; z-index: 1; top: 0; color: #405364; background: #eef1f3; font-size: .63rem; letter-spacing: .045em; }
.data-table tbody tr:nth-child(even) { background: #fbfcfc; }
.data-table tbody tr:hover { background: #eef6fc; }
.table-actions { gap: var(--space-2); white-space: nowrap; }
.table-actions a { font-size: .73rem; }
.pagination { margin-top: var(--space-3); }
.page-link { min-width: 2rem; height: 2rem; font-size: .75rem; }

.status-pill, .status-badge, .badge { gap: var(--space-1); padding: .18rem .42rem; border: 1px solid transparent; border-radius: 999px; font-size: .64rem; }
.status-badge { display: inline-flex; align-items: center; color: var(--color-neutral); background: #f0f1f2; font-weight: 700; white-space: nowrap; }
.status-blocked, .status-rejected, .status-cancelled, .status-critical { color: var(--color-danger); background: #ffebeb; border-color: #f7c6c6; }
.status-completed, .status-closed, .status-approved, .status-validated, .status-accepted { color: var(--color-success); background: #e8f5ed; border-color: #b7ddc6; }
.status-planned, .status-in_progress, .status-executing, .status-submitted { color: var(--color-information); background: #eaf3fc; border-color: #b7d5f2; }
.status-draft, .status-archived { color: var(--color-neutral); background: #f0f1f2; border-color: #d8dcdf; }

.tabs { background: var(--color-surface); }
.tab-list { gap: 0; }
.tab-button, .tab { min-height: 2.4rem; padding: .45rem .7rem; font-size: .76rem; }
.tab-panel { padding: var(--space-3) 0; }
.tab-panel.card { margin-top: var(--space-3); }
.detail-grid > div { padding: .7rem; }
.detail-grid span { font-size: .62rem; }
.project-hero { border-radius: var(--radius-medium); box-shadow: none; }
.project-hero-main { padding: var(--space-4); }
.project-hero-main > div:first-child { min-width: 0; max-width: 100%; }
.project-hero-main h1 { max-width: 100%; font-size: 1.4rem; overflow-wrap: anywhere; }
.project-hero-main p:last-child { min-width: 0; flex-wrap: wrap; overflow-wrap: anywhere; }
.project-facts > div { padding: .65rem .8rem; }
.project-tabs .tab-list { top: var(--topbar-height); background: var(--color-surface); border-bottom: 1px solid var(--color-border); }
.schedule-canvas { min-height: 24rem; border-radius: var(--radius-medium); }
.checklist-question, .field-card, .notification-item { border-radius: var(--radius-medium); box-shadow: none; }
.workspace-metrics span { padding: .35rem .55rem; }
.chart-shell { height: 15rem; }
.dataTables_wrapper .dataTables_filter input, .dataTables_wrapper .dataTables_length select { border-radius: var(--radius-small); }
.drawer { width: min(30rem,100%); }
.drawer-header, .drawer-footer { padding: .75rem 1rem; }
.drawer-body { padding: 1rem; }
.modal { border-radius: var(--radius-medium); }
.empty-state { min-height: 8rem; padding: var(--space-4); }
.empty-state h3 { font-size: .9rem; }

.guest-shell { min-width: 0; background: var(--color-background); }
.guest-header { min-height: 3rem; padding: .5rem clamp(1rem,5vw,4rem); }
.guest-main { min-width: 0; }
.auth-card { width: 100%; max-width: 30rem; padding: var(--space-5); }
.auth-card h1 { font-size: 1.5rem; }

@media (max-width: 72rem) {
    .filter-bar .form-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .dashboard-filter .filter-bar { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 56rem) {
    .app-topbar { padding-inline: var(--space-2); }
    .topbar-search { width: min(18rem,38vw); }
    .user-menu > span:not(.avatar), .user-menu > .lucide { display: none; }
    .kpi-grid, .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 40rem) {
    body { width: 100%; max-width: 100vw; overflow-x: hidden; }
    .topbar-search { display: none; }
    .content-header { min-height: 2.4rem; overflow-x: auto; }
    .app-main { width: 100vw; max-width: 100vw; min-width: 0; padding: .75rem; overflow-x: hidden; }
    .app-content-wrap { width: 100vw; min-width: 0; max-width: 100vw; overflow-x: hidden; }
    .project-hero, .project-kpis, .project-tabs { width: 100%; min-width: 0; max-width: 100%; }
    .project-hero-main, .project-hero-main > div:first-child { width: 100%; min-width: 0; max-width: 100%; }
    .project-hero-main h1, .project-hero-main p { max-width: 100%; white-space: normal; word-break: break-word; overflow-wrap: anywhere; }
    .project-hero-main p:last-child { display: block; }
    .project-hero-main p:last-child svg { display: inline-block; margin-right: var(--space-1); vertical-align: middle; }
    .with-action { align-items: flex-start; }
    .with-action > .button, .with-action > .primary-link { width: auto; }
    .filter-bar .form-grid, .form-grid, .detail-grid { grid-template-columns: 1fr; }
    .dashboard-filter .filter-bar { grid-template-columns: 1fr; }
    .dashboard-filter .filter-bar > .button { width: 100%; }
    .field-span-2, .form-span-2 { grid-column: span 1; }
    .filter-bar .form-actions, .form-actions { align-items: stretch; flex-wrap: wrap; }
    .filter-bar .form-actions > *, .form-actions > * { flex: 1 1 auto; }
    .kpi-grid, .metric-grid { grid-template-columns: 1fr; }
    .kpi-grid, .metric-grid { gap: var(--space-2); }
    .kpi-card, .metric-grid article { padding: var(--space-2); }
    .guest-shell { width: 100vw; min-width: 0; max-width: 100vw; overflow-x: hidden; }
    .guest-main { width: calc(100vw - 1rem); min-width: 0; max-width: 30rem; }
    .auth-card { width: 100%; min-width: 0; max-width: 100%; }
    .auth-card p { max-width: 100%; overflow-wrap: anywhere; }
    .table-shell::before { content: 'Faites défiler horizontalement pour voir toutes les colonnes'; display: block; padding: .35rem .6rem; color: var(--color-text-muted); background: var(--color-surface-muted); border-bottom: 1px solid var(--color-border); font-size: .65rem; }
}
/* Project portfolio */
/* SAP-inspired project cockpit */
.project-hero{margin-bottom:0;border-radius:0;border-inline:0;background:#fff}.project-hero-main{padding:.85rem 1rem}.project-hero-main h1{font-size:1.28rem;margin:.08rem 0 .25rem}.project-hero-main .eyebrow{font-size:.6rem}.project-hero-main .form-actions{margin:0}.project-facts{display:grid;grid-template-columns:repeat(8,minmax(7rem,1fr));border-top:1px solid var(--color-border);background:#fbfcfd}.project-facts>div{min-width:0;padding:.55rem .75rem;border-right:1px solid var(--color-border)}.project-facts>div:last-child{border-right:0}.project-facts span{font-size:.62rem}.project-facts strong{display:flex;align-items:center;gap:.35rem;margin-top:.15rem;font-size:.7rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.project-kpis{display:none}.project-tabs{margin-top:0}.project-tabs>.tab-list{gap:0;padding:0 .65rem;border-top:1px solid var(--color-border);box-shadow:none}.project-tabs>.tab-list .tab{min-height:2.5rem;padding:.55rem .75rem;border-radius:0;font-size:.68rem}.project-tabs>.tab-panel{margin:0;padding:.8rem;border:0;border-radius:0;box-shadow:none}.project-overview{background:transparent!important}.project-overview-grid{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(22rem,1fr);gap:.65rem}.project-general-card{padding:0;min-width:0}.compact-card-header{display:flex;align-items:center;justify-content:space-between;min-height:2.25rem;padding:.45rem .65rem;border-bottom:1px solid var(--color-border)}.compact-card-header h2{margin:0;font-size:.78rem}.compact-card-header>svg{width:.85rem;color:var(--color-text-muted)}.compact-card-header>a,.compact-card-header>span{font-size:.62rem}.project-general-grid{display:grid;grid-template-columns:1fr 1fr}.project-general-grid dl{margin:0;padding:.5rem .65rem}.project-general-grid dl+dl{border-left:1px solid var(--color-border)}.project-general-grid dl>div{display:grid;grid-template-columns:7rem minmax(0,1fr);gap:.5rem;padding:.28rem 0}.project-general-grid dt{color:var(--color-text-muted);font-size:.64rem}.project-general-grid dd{margin:0;font-size:.66rem;font-weight:500;overflow-wrap:anywhere}.priority-dot,.status-dot{display:inline-block;width:.42rem;height:.42rem;margin-right:.3rem;border-radius:50%;background:#249168}.priority-high{background:#ed8b00}.priority-critical{background:#d9363e}.priority-low{background:#8091a3}.project-finance-grid{display:grid;grid-template-columns:1fr 1fr;gap:.65rem}.project-finance-card{display:flex;align-items:flex-start;justify-content:space-between;min-height:5.2rem;padding:.7rem}.project-finance-card div{display:flex;flex-direction:column;gap:.13rem}.project-finance-card span,.project-finance-card small{font-size:.62rem;color:var(--color-text-muted)}.project-finance-card strong{font-size:1rem;color:#0866c6}.project-finance-card>svg{box-sizing:content-box;width:1rem;height:1rem;padding:.5rem;border-radius:50%;color:#0866c6;background:#e8f2fc}.project-phase-card,.project-risk-card,.project-activity-card{padding:0;min-width:0}.project-phase-card{grid-column:1}.project-risk-card{grid-column:2}.project-activity-card{grid-column:1/-1}.compact-project-table{font-size:.64rem}.compact-project-table th{padding:.35rem .5rem;background:#f4f6f8;font-size:.58rem;text-transform:none}.compact-project-table td{height:1.85rem;padding:.3rem .5rem}.compact-project-table small{display:block;font-size:.56rem;color:var(--color-text-muted)}.phase-progress{display:flex;align-items:center;gap:.35rem}.phase-progress>span{width:5rem;height:.32rem;overflow:hidden;border-radius:1rem;background:#dfe5eb}.phase-progress i{display:block;height:100%;background:#249168}.phase-progress strong{font-size:.6rem}.risk-level{display:inline-block;padding:.12rem .3rem;border-radius:.18rem;background:#e8edf2}.risk-high,.risk-critical{color:#fff;background:#d9363e}.risk-medium{color:#714200;background:#ffdca8}.health-text{padding:0;background:transparent}.schedule-visuals{padding:.65rem 0}.schedule-visuals .section-heading{margin-bottom:.5rem}.schedule-visuals .section-heading h2{font-size:.85rem}.schedule-switch{margin-bottom:.45rem}.schedule-canvas{min-height:22rem;padding:.4rem;border-radius:0}.project-tree{font-size:.65rem}.project-tree th,.project-tree td{padding:.32rem .45rem}.project-tree td:first-child{max-width:24rem;overflow:hidden;text-overflow:ellipsis}.tab-panel[data-tab-panel=planning]>.section-heading{margin:.7rem 0 .45rem}.tab-panel[data-tab-panel=planning]>.section-heading h2{font-size:.85rem}
.planning-toolbar{display:flex;align-items:center;justify-content:space-between;gap:1rem;min-height:3.2rem;padding:.55rem .7rem;border:1px solid var(--color-border);background:#fff}.planning-toolbar h2{margin:.05rem 0 0;font-size:1rem}.planning-toolbar .eyebrow{font-size:.58rem}.planning-toolbar .form-actions{margin:0}.planning-summary{display:flex;align-items:center;gap:1.15rem;padding:.42rem .7rem;border:1px solid var(--color-border);border-top:0;background:#f5f8fb;color:var(--color-text-muted);font-size:.64rem}.planning-summary strong{color:var(--color-text);font-size:.72rem}.planning-workbench{display:grid;grid-template-columns:minmax(31rem,42%) minmax(38rem,58%);height:35rem;border:1px solid var(--color-border);border-top:0;background:#fff;overflow:hidden}.planning-tree-pane,.planning-visual-pane{min-width:0;overflow:hidden}.planning-tree-pane{border-right:1px solid #9eabb8}.planning-pane-title,.planning-visual-toolbar{display:flex;align-items:center;justify-content:space-between;min-height:2.55rem;padding:.45rem .6rem;border-bottom:1px solid var(--color-border);background:#f8fafc}.planning-pane-title{flex-direction:column;align-items:flex-start;justify-content:center}.planning-pane-title strong,.planning-visual-toolbar strong{font-size:.7rem}.planning-pane-title small,.planning-visual-toolbar small{display:block;color:var(--color-text-muted);font-size:.57rem}.planning-tree-pane>.table-scroll{height:calc(35rem - 2.55rem);overflow:auto}.planning-tree-pane .project-tree{min-width:46rem;font-size:.59rem}.planning-tree-pane .project-tree thead{position:sticky;z-index:2;top:0}.planning-tree-pane .project-tree th{height:1.8rem;padding:.3rem .38rem;border-right:1px solid #dce3ea;background:#edf2f6;color:#405267;font-size:.55rem;white-space:nowrap}.planning-tree-pane .project-tree td{height:1.8rem;padding:.25rem .38rem;border-right:1px solid #e7ebef;white-space:nowrap}.planning-tree-pane .project-tree td:first-child{width:18rem;max-width:18rem}.planning-tree-pane .project-tree td:nth-child(2){width:7rem;max-width:7rem;overflow:hidden;text-overflow:ellipsis}.planning-tree-pane .project-tree td:nth-child(3),.planning-tree-pane .project-tree td:nth-child(4){width:5.5rem}.planning-tree-pane .tree-project{background:#dbe8f4;color:#193b5c}.planning-tree-pane .tree-phase{background:#edf3f8;color:#263f58}.planning-tree-pane .tree-task{background:#fff}.planning-tree-pane .tree-phase td:first-child{padding-left:1.15rem}.planning-tree-pane .tree-task td:first-child{padding-left:2.4rem}.planning-tree-pane .tree-toggle{width:1.25rem;height:1.25rem}.planning-tree-pane .tree-toggle svg,.planning-tree-pane .tree-row td>svg{width:.7rem;height:.7rem}.tree-add,.tree-progress-action{display:inline-grid;place-items:center;width:1.2rem;height:1.2rem;margin-left:.25rem;padding:0;border:0;background:transparent;color:#0b66d8;cursor:pointer}.tree-add svg,.tree-progress-action svg{width:.65rem}.tree-progress{display:inline-block;width:2.5rem;height:.22rem;margin-right:.3rem;overflow:hidden;border-radius:1rem;background:#dfe5eb;vertical-align:middle}.tree-progress i{display:block;height:100%;background:#0b66d8}.planning-visual-pane{overflow:auto}.planning-visual-pane .schedule-visuals{min-width:42rem;height:100%;padding:0}.planning-visual-toolbar .form-actions{margin:0}.planning-visual-toolbar .button{min-height:1.75rem}.planning-visual-pane .alert{margin:.35rem .5rem;padding:.45rem .6rem;font-size:.62rem}.planning-visual-pane .schedule-switch{display:flex;align-items:center;justify-content:space-between;min-height:2.35rem;margin:0;padding:.3rem .5rem;border-bottom:1px solid var(--color-border)}.schedule-switch>div{display:flex;gap:.3rem}.gantt-scale{display:flex;align-items:center;gap:.35rem;color:var(--color-text-muted);font-size:.6rem}.gantt-scale select{min-height:1.75rem;padding:.2rem 1.5rem .2rem .4rem;border:1px solid var(--color-border);font-size:.62rem}.planning-visual-pane .schedule-canvas{height:calc(35rem - 4.9rem);min-height:0;padding:0;border:0;overflow:auto}.planning-visual-pane .gantt-container{min-width:56rem}.planning-visual-pane .gantt .grid-header{fill:#f1f4f7;stroke:#d8e0e7}.planning-visual-pane .gantt .grid-row{fill:#fff}.planning-visual-pane .gantt .row-line,.planning-visual-pane .gantt .tick{stroke:#e1e7ed}.planning-visual-pane .gantt .bar{fill:#0b66d8}.planning-visual-pane .gantt .bar-progress{fill:#064e9e}.planning-visual-pane .gantt-phase .bar{fill:#40556a}.planning-visual-pane .gantt-milestone .bar{fill:#ed8b00}.planning-visual-pane .gantt .arrow{stroke:#0b66d8}.planning-visual-pane .gantt .today-highlight{fill:#e9f3ff;opacity:.75}
@media(max-width:80rem){.project-facts{grid-template-columns:repeat(4,minmax(0,1fr))}.project-facts>div:nth-child(4n){border-right:0}.project-overview-grid{grid-template-columns:1fr}.project-risk-card,.project-phase-card{grid-column:1}.project-finance-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
.planning-tree-pane .project-tree{min-width:37rem;font-size:.57rem}.planning-tree-pane .project-tree th{padding-inline:.3rem;font-size:.53rem}.planning-tree-pane .project-tree td{padding-inline:.3rem}.planning-tree-pane .project-tree td:first-child{width:15rem;max-width:15rem}.planning-tree-pane .project-tree td:nth-child(2){width:5.8rem;max-width:5.8rem}.planning-tree-pane .project-tree td:nth-child(3),.planning-tree-pane .project-tree td:nth-child(4){width:4.7rem}.planning-tree-pane .project-tree td:nth-child(5){width:5rem}.planning-visual-pane .schedule-visuals{min-width:40rem}.planning-visual-toolbar .form-actions{flex-wrap:nowrap}.planning-visual-toolbar .button{white-space:nowrap}.tree-progress{width:2.2rem;margin-right:.2rem}
.planning-pane-title{flex-direction:row;align-items:center;justify-content:space-between;gap:.5rem}.planning-pane-title>div{min-width:0}.planning-pane-title label{position:relative;display:flex;align-items:center;width:8.5rem}.planning-pane-title label svg{position:absolute;left:.42rem;width:.7rem;color:var(--color-text-muted)}.planning-pane-title input{width:100%;min-height:1.65rem;padding:.25rem .4rem .25rem 1.4rem;border:1px solid var(--color-border);border-radius:.2rem;background:#fff;font-size:.58rem}.planning-tree-pane .project-tree{width:100%;min-width:0;table-layout:fixed}.planning-tree-pane .tree-col-name{width:48%}.planning-tree-pane .tree-col-owner{width:17%}.planning-tree-pane .tree-col-date{width:12%}.planning-tree-pane .tree-col-progress{width:11%}.planning-tree-pane .project-tree td:first-child,.planning-tree-pane .project-tree td:nth-child(2),.planning-tree-pane .project-tree td:nth-child(3),.planning-tree-pane .project-tree td:nth-child(4),.planning-tree-pane .project-tree td:nth-child(5){width:auto;max-width:none;overflow:hidden;text-overflow:ellipsis}.planning-tree-pane .project-tree td:first-child strong{display:inline;overflow:hidden;text-overflow:ellipsis}.planning-tree-pane .tree-phase td:first-child{padding-left:.65rem}.planning-tree-pane .tree-task td:first-child{padding-left:1.75rem}.planning-tree-pane .tree-row td>svg{margin-inline:.12rem}.planning-tree-pane .tree-progress-action{display:none}.planning-tree-pane tr:hover .tree-progress-action{display:inline-grid}.planning-visual-pane .gantt .bar{rx:3;ry:3}.planning-visual-pane .gantt .bar-label{font-size:10px}.planning-visual-pane .gantt .upper-text{font-size:11px;font-weight:600}.planning-visual-pane .gantt .lower-text{font-size:9px}.planning-visual-pane .gantt-container .popup-wrapper{max-width:17rem;padding:.55rem .65rem;border-radius:.3rem;box-shadow:0 5px 15px rgba(12,38,61,.16);font-size:.68rem}.planning-visual-pane .gantt-container .popup-wrapper .title{font-size:.72rem}.tab-panel#planning.is-focus-mode{position:fixed;z-index:85;inset:.5rem;margin:0!important;padding:.65rem!important;overflow:auto;background:#f4f6f8!important;box-shadow:0 0 0 100vmax rgba(7,21,37,.55)}.tab-panel#planning.is-focus-mode .planning-workbench{height:calc(100vh - 8.25rem)}.tab-panel#planning.is-focus-mode .planning-tree-pane>.table-scroll{height:calc(100vh - 13.35rem)}.tab-panel#planning.is-focus-mode .planning-visual-pane .schedule-canvas{height:calc(100vh - 13.35rem)}body.planning-focus-open{overflow:hidden}
@media(max-width:70rem){.planning-workbench{grid-template-columns:1fr;height:auto;overflow:visible}.planning-tree-pane{border-right:0;border-bottom:1px solid #9eabb8}.planning-tree-pane>.table-scroll{height:20rem}.planning-visual-pane .schedule-canvas{height:25rem}.planning-visual-pane .schedule-visuals{height:auto}.planning-summary{flex-wrap:wrap}}
@media(max-width:48rem){.project-facts{grid-template-columns:1fr 1fr}.project-overview-grid{display:block}.project-overview-grid>*{margin-bottom:.65rem}.project-general-grid,.project-finance-grid{grid-template-columns:1fr}.project-general-grid dl+dl{border-left:0;border-top:1px solid var(--color-border)}.project-general-grid dl>div{grid-template-columns:6.5rem minmax(0,1fr)}.project-tabs>.tab-list{overflow-x:auto;flex-wrap:nowrap}.project-tabs>.tab-list .tab{white-space:nowrap}.project-finance-card{min-height:4.5rem}.compact-project-table{min-width:38rem}.planning-toolbar{align-items:flex-start;flex-direction:column}.planning-toolbar .form-actions{width:100%;overflow-x:auto;flex-wrap:nowrap}.planning-toolbar .button{white-space:nowrap}.planning-summary{gap:.55rem}.planning-workbench{border-inline:0}.planning-tree-pane .project-tree{min-width:42rem}.planning-visual-pane .schedule-visuals{min-width:40rem}}
.portfolio-heading{align-items:flex-start}.page-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:.5rem}.button-count{display:inline-grid;place-items:center;min-width:1.25rem;height:1.25rem;padding:0 .3rem;border-radius:999px;background:var(--color-primary-700,#063b71);color:#fff;font-size:.7rem}.portfolio-search{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.7rem .8rem;margin-bottom:.75rem}.portfolio-search form{display:flex;align-items:center;gap:.5rem;flex:1}.portfolio-search label{position:relative;display:flex;align-items:center;flex:1}.portfolio-search label>svg{position:absolute;left:.75rem;width:1rem;color:var(--color-text-muted)}.portfolio-search input[type=search]{width:100%;padding-left:2.25rem}.portfolio-search>span{white-space:nowrap;color:var(--color-text-muted);font-size:.8125rem}.portfolio-filters{padding:1rem;margin-bottom:.75rem}.portfolio-filter-grid{display:grid;grid-template-columns:repeat(4,minmax(10rem,1fr));gap:.75rem}.portfolio-table-card{padding:0;margin-bottom:1rem;overflow:visible}.portfolio-table-card>.card-header{padding:.85rem 1rem;border-bottom:1px solid var(--color-border);align-items:center}.portfolio-table-card h2,.chart-card h2{font-size:1rem;margin:0}.portfolio-columns{position:relative}.portfolio-columns summary{list-style:none}.portfolio-columns summary::-webkit-details-marker{display:none}.portfolio-columns>div{position:absolute;z-index:5;right:0;top:calc(100% + .35rem);min-width:12rem;padding:.75rem;background:#fff;border:1px solid var(--color-border);box-shadow:var(--shadow-lg);border-radius:var(--radius-md)}.portfolio-columns label{display:flex;align-items:center;gap:.5rem;padding:.35rem}.portfolio-table{min-width:86rem;font-size:.75rem}.portfolio-table th,.portfolio-table td{padding:.55rem .65rem;vertical-align:middle}.portfolio-table .number{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}.portfolio-table small{color:var(--color-text-muted)}.portfolio-table tfoot th{background:#f3f6f9;border-top:2px solid #7e8c9b}.portfolio-group td{padding:0!important}.portfolio-group button{display:flex;align-items:center;gap:.45rem;width:100%;padding:.5rem .7rem;border:0;background:transparent;color:inherit;text-align:left;cursor:pointer}.portfolio-group button svg{width:.95rem;height:.95rem}.portfolio-group button span{margin-left:.35rem;color:var(--color-text-muted);font-weight:400}.portfolio-client-row{background:#eaf2fa}.portfolio-client-row button{color:#0b385f}.portfolio-site-row{background:#f5f8fb}.portfolio-site-row button{padding-left:1.8rem}.portfolio-group button[aria-expanded=false] svg:first-child{transform:rotate(-90deg)}.portfolio-project-name{display:flex;flex-direction:column;gap:.15rem;color:var(--color-text)}.portfolio-project-name:hover strong{color:var(--color-primary)}.portfolio-project-name small{display:none}.mono{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;white-space:nowrap}.portfolio-progress{display:flex;align-items:center;gap:.4rem;min-width:6.5rem}.portfolio-progress>span{display:block;width:4.25rem;height:.3rem;overflow:hidden;border-radius:2rem;background:#e1e7ed}.portfolio-progress i{display:block;height:100%;background:#0b66d8}.portfolio-progress strong{font-size:.72rem}.portfolio-variance{font-weight:600;white-space:nowrap}.portfolio-variance.is-negative{color:#d9363e}.portfolio-variance.is-positive{color:#249168}.portfolio-health{display:inline-flex;align-items:center;gap:.4rem;white-space:nowrap}.portfolio-health i{width:.55rem;height:.55rem;border-radius:50%;background:#8091a3}.portfolio-health.health-green i{background:#249168}.portfolio-health.health-blue i{background:#0b66d8}.portfolio-health.health-yellow i{background:#ed8b00}.portfolio-health.health-red i{background:#d9363e}.risk-count{display:inline-grid;place-items:center;min-width:1.6rem;height:1.45rem;border-radius:999px;background:#edf1f5;font-weight:700}.row-actions .icon-button{width:1.9rem;height:1.9rem}.portfolio-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.75rem;margin-bottom:1rem}.portfolio-kpi{display:flex;align-items:flex-start;justify-content:space-between;padding:1rem}.portfolio-kpi div{display:flex;flex-direction:column;gap:.25rem}.portfolio-kpi span,.portfolio-kpi small{color:var(--color-text-muted)}.portfolio-kpi strong{font-size:1.35rem;font-variant-numeric:tabular-nums}.portfolio-kpi>svg{box-sizing:content-box;width:1.4rem;height:1.4rem;padding:.65rem;border-radius:.35rem}.kpi-blue>svg{color:#0b66d8;background:#e7f2ff}.kpi-orange>svg{color:#c56d00;background:#fff0df}.kpi-green>svg{color:#137657;background:#e5f5ef}.kpi-red>svg{color:#c72f37;background:#fdebec}.portfolio-charts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.75rem}.chart-card{padding:1rem;min-width:0}.chart-card-wide{grid-column:span 2}.portfolio-chart{height:15rem;margin-top:.75rem}
/* Dense professional portfolio grid */
.portfolio-kpis{grid-template-columns:repeat(6,minmax(0,1fr));gap:.5rem}.portfolio-kpi{min-height:5.35rem;padding:.7rem .75rem;border:1px solid var(--color-border);color:inherit;font:inherit;text-align:left;cursor:pointer;transition:border-color .15s ease,box-shadow .15s ease,transform .15s ease}.portfolio-kpi:hover,.portfolio-kpi:focus-visible{border-color:#86add4;box-shadow:0 3px 10px rgba(18,54,83,.09);transform:translateY(-1px)}.portfolio-kpi span{font-size:.675rem;font-weight:600}.portfolio-kpi strong{font-size:1.02rem;line-height:1.15;white-space:nowrap}.portfolio-kpi small{font-size:.625rem;line-height:1.25}.portfolio-kpi>svg{width:1rem;height:1rem;padding:.45rem}.portfolio-charts{grid-template-columns:repeat(4,minmax(0,1fr));gap:.5rem}.chart-card,.chart-card-wide{grid-column:auto;padding:.7rem;cursor:pointer;transition:border-color .15s ease,box-shadow .15s ease}.chart-card:hover,.chart-card:focus-visible{border-color:#86add4;box-shadow:0 3px 10px rgba(18,54,83,.09);outline:0}.chart-card header{display:flex;align-items:flex-start;justify-content:space-between}.chart-card header>svg{width:.85rem;color:var(--color-text-muted)}.chart-card h2{font-size:.78rem}.chart-card .eyebrow{font-size:.575rem}.portfolio-chart{height:10.5rem;margin-top:.35rem}.portfolio-detail-drawer{width:min(52rem,96vw)}.portfolio-detail-drawer .drawer-header{padding:1rem 1.15rem}.portfolio-detail-drawer .drawer-header p:last-child{margin:.25rem 0 0;color:var(--color-text-muted);font-size:.7rem}.portfolio-detail-drawer .drawer-body{padding:.75rem 1rem}.portfolio-detail-table{max-height:calc(100vh - 11rem);border:1px solid var(--color-border)}.portfolio-detail-table table{font-size:.68rem}.portfolio-detail-table thead{position:sticky;top:0;z-index:1}.portfolio-detail-table th{padding:.4rem .45rem;background:#edf2f6;color:#405267;font-size:.6rem;text-transform:uppercase;white-space:nowrap}.portfolio-detail-table td{padding:.38rem .45rem;vertical-align:top}.portfolio-detail-drawer .drawer-footer{gap:.5rem}.portfolio-detail-drawer .drawer-footer .button-primary{margin-left:auto}
.portfolio-table-card>.card-header{min-height:3rem;padding:.55rem .75rem;background:#fff}.portfolio-table-card>.table-scroll{max-height:34rem;border-bottom:1px solid var(--color-border);scrollbar-width:thin}.portfolio-table{min-width:78rem;font-size:.7rem;line-height:1.25;table-layout:auto}.portfolio-table thead{position:sticky;z-index:3;top:0}.portfolio-table thead th{height:2rem;padding:.35rem .5rem;border-right:1px solid #dce3ea;border-bottom:1px solid #c8d2dc;background:#edf2f6;color:#405267;font-size:.625rem;font-weight:700;letter-spacing:.035em;text-transform:uppercase;white-space:nowrap}.portfolio-table thead th:last-child{border-right:0}.portfolio-table tbody td{height:2.15rem;padding:.3rem .5rem;border-bottom:1px solid #e3e8ed;color:#28394a}.portfolio-project-row:hover td{background:#f4f8fc}.portfolio-project-row td:first-child{width:16rem}.portfolio-project-row td:nth-child(2){width:8rem}.portfolio-project-row td:nth-child(4){max-width:8rem}.portfolio-table .badge{padding:.18rem .4rem;border-radius:.2rem;font-size:.625rem;font-weight:650;white-space:nowrap}.portfolio-table .number{font-size:.6875rem}.portfolio-table tfoot{position:sticky;z-index:2;bottom:0}.portfolio-table tfoot th{height:2.1rem;padding:.35rem .5rem;border-top:1px solid #9aa9b8;background:#e9eef3;color:#26394c;font-size:.6875rem}.portfolio-group button{min-height:1.95rem;padding:.3rem .5rem;font-size:.6875rem}.portfolio-group button svg{width:.8rem;height:.8rem}.portfolio-group button span{font-size:.625rem}.portfolio-client-row{background:#e5eef7}.portfolio-client-row button{font-weight:600}.portfolio-site-row{background:#f4f7fa}.portfolio-site-row button{padding-left:1.45rem}.portfolio-project-name{gap:.08rem}.portfolio-project-name strong{display:block;max-width:15rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.7rem}.portfolio-progress{min-width:5.5rem;gap:.3rem}.portfolio-progress>span{width:3.4rem;height:.25rem}.portfolio-progress strong{min-width:1.8rem;font-size:.65rem}.portfolio-health{gap:.28rem;font-size:.65rem}.portfolio-health i{width:.42rem;height:.42rem}.risk-count{min-width:1.3rem;height:1.2rem;font-size:.625rem}.portfolio-table .row-actions{width:2rem;padding-inline:.2rem}.portfolio-table .row-actions .icon-button{width:1.55rem;height:1.55rem;border:1px solid transparent;color:#526579}.portfolio-table .row-actions .icon-button:hover{border-color:#b8c7d6;background:#fff;color:#0b66d8}.portfolio-table .row-actions svg{width:.78rem;height:.78rem}
@media(max-width:75rem){.portfolio-filter-grid{grid-template-columns:repeat(3,minmax(10rem,1fr))}.portfolio-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.portfolio-charts{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:48rem){.portfolio-heading .page-actions{display:grid;grid-template-columns:1fr 1fr;width:100%;justify-content:stretch}.portfolio-heading .page-actions .button{width:100%;justify-content:center}.portfolio-search{align-items:stretch;flex-direction:column}.portfolio-search form{align-items:stretch;flex-wrap:wrap}.portfolio-search label{min-width:0;flex-basis:100%}.portfolio-search .button{width:100%;justify-content:center;padding-inline:.75rem}.portfolio-filter-grid{grid-template-columns:1fr}.portfolio-kpis,.portfolio-charts{grid-template-columns:1fr}.chart-card-wide{grid-column:auto}.portfolio-table{min-width:0;display:block}.portfolio-table thead,.portfolio-table tfoot,.portfolio-table .portfolio-group{display:none}.portfolio-table tbody{display:grid;gap:.65rem;padding:.65rem}.portfolio-project-row{display:grid;grid-template-columns:1fr;border:1px solid var(--color-border);border-radius:var(--radius-md);padding:.75rem;background:#fff;min-width:0}.portfolio-project-row td{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.42rem .2rem;border:0!important;text-align:right!important;min-width:0}.portfolio-project-row td::before{content:attr(data-label);color:var(--color-text-muted);font-size:.7rem;font-weight:600;text-align:left}.portfolio-project-row td:first-child{grid-column:1/-1;display:block;text-align:left!important;border-bottom:1px solid var(--color-border)!important;padding-bottom:.65rem}.portfolio-project-row td:first-child::before,.portfolio-project-row .row-actions::before{display:none}.portfolio-project-name small{display:block}.portfolio-project-row .row-actions{position:absolute;right:1rem}.portfolio-progress{justify-content:flex-end;min-width:0}.portfolio-chart{height:13rem}}
@media(max-width:48rem){.portfolio-table-card>.table-scroll{max-height:none;border-bottom:0}.portfolio-table thead,.portfolio-table tfoot{position:static}.portfolio-project-name strong{max-width:none;white-space:normal;overflow-wrap:anywhere}.portfolio-table tbody td{height:auto;font-size:.7rem}}

/* Project cockpit: restrained colour system, full-width timeline and AJAX forms */
.project-overview{--project-navy:#163954;--project-blue:#2e658f;--project-slate:#60758a;--project-green:#2d715c;--project-amber:#9a681f;--project-red:#a84949}.project-overview .card{border-color:#d8e0e7;box-shadow:0 1px 3px rgba(18,48,72,.045)}.project-overview .compact-card-header{background:#f8fafc;color:var(--project-navy)}.project-overview .compact-card-header h2{font-weight:700}.project-general-card{border-top:2px solid var(--project-navy)!important}.project-general-grid dt{color:#6e7f8f}.project-general-grid dd{color:#263b4c}.project-finance-card{position:relative;overflow:hidden;border-top:2px solid var(--project-blue)!important;background:linear-gradient(135deg,#fff 65%,#f5f8fa)}.project-finance-card:nth-child(1){border-top-color:var(--project-navy)!important}.project-finance-card:nth-child(2){border-top-color:var(--project-blue)!important}.project-finance-card:nth-child(3){border-top-color:var(--project-slate)!important}.project-finance-card:nth-child(4){border-top-color:var(--project-green)!important}.project-finance-card strong{color:var(--project-navy)}.project-finance-card>svg{color:var(--project-blue);background:#edf3f7}.project-finance-card:nth-child(1)>svg{color:var(--project-navy)}.project-finance-card:nth-child(3)>svg{color:var(--project-slate)}.project-finance-card:nth-child(4)>svg{color:var(--project-green);background:#edf6f2}.project-phase-card{border-top:2px solid var(--project-blue)!important}.project-risk-card{border-top:2px solid var(--project-amber)!important}.project-activity-card{border-top:2px solid var(--project-slate)!important}.project-overview .compact-project-table th{background:#f2f5f7;color:#516474}.project-overview .compact-project-table tbody tr:hover td{background:#f6f9fb}.project-overview .phase-progress i{background:var(--project-blue)}.project-overview .risk-high,.project-overview .risk-critical{background:#a84949}.project-overview .risk-medium{color:#765019;background:#f5e9d2}

.planning-workbench{display:flex;flex-direction:column;height:auto;min-height:0;overflow:visible}.planning-visual-pane{order:1;width:100%;overflow:hidden;border-bottom:1px solid #aab8c5}.planning-tree-pane{order:2;width:100%;border-right:0}.planning-visual-pane .schedule-visuals{min-width:0;height:auto}.planning-visual-pane .schedule-canvas{height:30rem;min-height:30rem;overflow:auto}.planning-visual-pane .gantt-container{min-width:68rem}.planning-tree-pane>.table-scroll{height:auto;max-height:22rem;overflow:auto}.planning-tree-pane .project-tree{min-width:58rem}.planning-pane-title{border-top:0}.tab-panel#planning.is-focus-mode .planning-workbench{height:auto}.tab-panel#planning.is-focus-mode .planning-visual-pane .schedule-canvas{height:calc(100vh - 13.5rem);min-height:28rem}.tab-panel#planning.is-focus-mode .planning-tree-pane>.table-scroll{max-height:16rem;height:auto}

.project-confirm-modal{width:min(31rem,calc(100vw - 2rem))!important;padding:1.1rem!important;border-radius:.45rem!important}.project-confirm-modal .swal2-title{color:#173852;font-size:1.05rem!important}.project-confirm-modal .swal2-html-container{margin:.55rem 0 0!important;color:#536678;font-size:.72rem!important}.ajax-confirm-lead{margin:0 0 .65rem;text-align:left}.ajax-confirm-table{width:100%;border-collapse:collapse;border:1px solid #dde4ea;text-align:left}.ajax-confirm-table th,.ajax-confirm-table td{padding:.42rem .5rem;border-bottom:1px solid #e5eaee;vertical-align:top}.ajax-confirm-table th{width:38%;background:#f5f7f9;color:#536678;font-size:.65rem}.ajax-confirm-table td{color:#263b4c;font-weight:600;overflow-wrap:anywhere}.ajax-confirm-empty{text-align:left}.ajax-error-list{margin:.6rem 0 0;padding-left:1.1rem;text-align:left}.is-loading{position:relative;cursor:wait;opacity:.68}.project-confirm-modal .swal2-actions{gap:.35rem;margin-top:.8rem}.project-confirm-modal .swal2-confirm{background:#1769aa!important}.project-confirm-modal .swal2-cancel{color:#344b5e!important;background:#edf1f4!important}

@media(max-width:48rem){.planning-visual-pane .schedule-canvas{height:24rem;min-height:24rem}.planning-visual-pane .schedule-visuals{min-width:0}.planning-visual-pane .gantt-container{min-width:56rem}.planning-tree-pane .project-tree{min-width:46rem}.project-confirm-modal{padding:.85rem!important}.ajax-confirm-table th{width:42%}}
.project-tabs form label,.project-tabs .drawer-body label{display:flex;flex-direction:column;gap:.28rem;color:#43596c;font-size:.68rem;font-weight:650}.project-tabs form input:not([type=checkbox]):not([type=radio]),.project-tabs form select,.project-tabs form textarea,.drawer[id$="-drawer"] form input:not([type=checkbox]):not([type=radio]),.drawer[id$="-drawer"] form select,.drawer[id$="-drawer"] form textarea{width:100%;min-height:2.15rem;padding:.45rem .55rem;border:1px solid #cbd5de;border-radius:.28rem;background:#fff;color:#203749;font:inherit;transition:border-color .15s ease,box-shadow .15s ease}.project-tabs form textarea,.drawer[id$="-drawer"] form textarea{min-height:4.5rem;resize:vertical}.project-tabs form input:focus,.project-tabs form select:focus,.project-tabs form textarea:focus,.drawer[id$="-drawer"] form input:focus,.drawer[id$="-drawer"] form select:focus,.drawer[id$="-drawer"] form textarea:focus{border-color:#4b83ad;outline:0;box-shadow:0 0 0 3px rgba(47,105,149,.12)}.project-tabs form input:invalid:not(:placeholder-shown),.drawer[id$="-drawer"] form input:invalid:not(:placeholder-shown){border-color:#a84949}.drawer[id$="-drawer"] .drawer-header{background:#f7f9fb;border-bottom-color:#d7e0e7}.drawer[id$="-drawer"] .drawer-header h2{color:#173852;font-size:1rem}.drawer[id$="-drawer"] .drawer-body{display:grid;gap:.75rem}.drawer[id$="-drawer"] .drawer-footer{background:#f7f9fb;border-top-color:#d7e0e7}.project-tabs form .button,.drawer[id$="-drawer"] form .button{min-height:2.15rem}
.project-finance-card:nth-child(4){border-top-color:var(--project-slate)!important}.project-finance-card:nth-child(4)>svg{color:var(--project-slate);background:#edf2f5}

/* Drawers must always stay above sticky planning headers and keep forms usable. */
.planning-visual-pane{position:relative;z-index:0;isolation:isolate}.planning-visual-pane .gantt-container .grid-header,.planning-visual-pane .gantt-container .side-header{z-index:4}.planning-visual-pane .gantt-container .current-ball-highlight{z-index:5}.planning-visual-pane .gantt-container .popup-wrapper{z-index:6}.drawer-overlay{z-index:300}.drawer{z-index:301;isolation:isolate}.drawer>form{display:flex;flex:1 1 auto;flex-direction:column;width:100%;height:100%;min-height:0;overflow:hidden}.drawer>form>.drawer-header,.drawer>form>.drawer-footer{position:relative;z-index:2;flex:0 0 auto;background:#fff}.drawer>form>.drawer-body{position:relative;z-index:1;flex:1 1 auto;min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}.drawer>form>.drawer-footer{box-shadow:0 -2px 8px rgba(18,48,72,.06)}
@media(max-width:48rem){.drawer{width:100%;max-width:100%}.drawer>form>.drawer-header,.drawer>form>.drawer-footer{padding:.7rem .85rem}.drawer>form>.drawer-body{padding:.85rem}}

/* Task-oriented primary navigation */
.sidebar-nav{padding:.45rem .4rem 1rem}.sidebar-nav>.nav-section{margin:.65rem .7rem .35rem}.sidebar-nav>.nav-home{margin-bottom:.35rem}.nav-group{margin:.12rem 0;border-radius:.3rem}.nav-group>summary{display:flex;align-items:center;gap:.65rem;min-height:2.25rem;padding:.48rem .65rem;border-radius:.3rem;color:#dce5ec;font-size:.73rem;font-weight:650;list-style:none;cursor:pointer;white-space:nowrap;transition:background .15s ease,color .15s ease}.nav-group>summary::-webkit-details-marker{display:none}.nav-group>summary:hover{color:#fff;background:rgba(255,255,255,.075)}.nav-group>summary>svg:first-child{width:.95rem;height:.95rem;color:#9eb1c0}.nav-group>summary .nav-chevron{width:.75rem;height:.75rem;margin-left:auto;transition:transform .18s ease}.nav-group[open]>summary{color:#fff;background:rgba(255,255,255,.055)}.nav-group[open]>summary .nav-chevron{transform:rotate(180deg)}.nav-group-links{position:relative;padding:.12rem 0 .28rem .72rem}.nav-group-links::before{content:"";position:absolute;top:.1rem;bottom:.35rem;left:1.12rem;width:1px;background:rgba(255,255,255,.12)}.nav-group-links .nav-link{position:relative;min-height:1.95rem;margin:1px 0;padding:.35rem .55rem .35rem 1.45rem;border-radius:.25rem;color:#c8d4dd;font-size:.69rem}.nav-group-links .nav-link>svg{width:.82rem;height:.82rem}.nav-group-links .nav-link.is-active{background:#176db5;box-shadow:none;color:#fff}.nav-group-links .nav-link.is-active::before{content:"";position:absolute;left:.34rem;width:.18rem;height:1rem;border-radius:1rem;background:#8fc5f1}.nav-group-settings{margin-top:.45rem;padding-top:.35rem;border-top:1px solid rgba(255,255,255,.1)}.sidebar-collapsed .nav-group>summary{justify-content:center;padding-inline:.5rem}.sidebar-collapsed .nav-group>summary span,.sidebar-collapsed .nav-chevron,.sidebar-collapsed .nav-group-links{display:none}.sidebar-collapsed .nav-group[open]>.nav-group-links{display:none}.sidebar-collapsed .nav-home{justify-content:center;padding-inline:.5rem}.sidebar-collapsed .nav-home span{display:none}
@media(max-width:56rem){.sidebar-collapsed .nav-group>summary{justify-content:flex-start;padding-inline:.65rem}.sidebar-collapsed .nav-group>summary span,.sidebar-collapsed .nav-chevron{display:block}.sidebar-collapsed .nav-group[open]>.nav-group-links{display:block}.sidebar-collapsed .nav-home{justify-content:flex-start;padding-inline:.7rem}.sidebar-collapsed .nav-home span{display:inline}}

/* Executive dashboard */
.executive-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:1rem;margin-bottom:.65rem}.executive-heading h1{margin:.08rem 0;font-size:1.35rem;color:#192f43}.executive-heading p:last-child{margin:0;color:#718191;font-size:.72rem}.executive-heading .page-actions{flex-wrap:nowrap}.executive-filters{margin-bottom:.7rem;padding:.65rem}.executive-filters .filter-bar{display:grid;grid-template-columns:repeat(6,minmax(8rem,1fr)) auto auto;gap:.45rem;align-items:end}.executive-filters label{display:grid;gap:.2rem;min-width:0;color:#607385;font-size:.61rem;font-weight:650}.executive-filters input,.executive-filters select{width:100%;min-width:0;min-height:2rem;padding:.35rem .45rem;border:1px solid #cad5df;border-radius:.25rem;background:#fff;color:#253b4d;font-size:.66rem}.executive-filters .button{min-height:2rem;padding:.35rem .6rem;white-space:nowrap}.executive-kpis{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:.55rem;margin-bottom:.65rem}.executive-kpi{display:flex;align-items:flex-start;justify-content:space-between;min-height:6rem;padding:.75rem;color:inherit;text-decoration:none}.executive-kpi div{display:flex;min-width:0;flex-direction:column;gap:.2rem}.executive-kpi span{color:#344b5e;font-size:.66rem;font-weight:700}.executive-kpi strong{color:#172d40;font-size:1.15rem;line-height:1.25;white-space:nowrap}.executive-kpi small{color:#708193;font-size:.58rem}.executive-kpi>svg{box-sizing:content-box;flex:none;width:1rem;height:1rem;padding:.55rem;border-radius:50%;color:#1769aa;background:#e7f1fa}.executive-kpi.tone-navy>svg{color:#173852;background:#e7edf2}.executive-kpi.tone-slate>svg{color:#62788b;background:#edf1f4}.executive-kpi.tone-green>svg{color:#2d715c;background:#e4f1eb}.executive-kpi.tone-amber>svg{color:#a36619;background:#f8ebd6}.executive-kpi.tone-red>svg{color:#a84949;background:#f8e3e3}.executive-primary-grid{display:grid;grid-template-columns:1.8fr .9fr 1.05fr;gap:.6rem;margin-bottom:.65rem}.executive-primary-grid>.card{min-width:0;padding:0}.executive-chart-wide{grid-column:auto}.executive-chart header,.executive-alerts header,.executive-table-card>header,.executive-decisions>header{display:flex;align-items:center;justify-content:space-between;min-height:2.65rem;padding:.55rem .7rem;border-bottom:1px solid #dce3e9}.executive-chart header h2,.executive-alerts header h2,.executive-table-card header h2,.executive-decisions header h2{margin:.05rem 0 0;color:#253b4d;font-size:.74rem}.executive-chart header>svg{width:.8rem;color:#708193}.executive-chart header>strong{font-size:1.05rem}.executive-chart .chart-shell{height:14rem;padding:.55rem}.executive-status-chart .chart-shell{height:12rem}.card-footer-link{display:flex;align-items:center;justify-content:space-between;padding:.5rem .7rem;border-top:1px solid #dce3e9;color:#1769aa;font-size:.64rem;text-decoration:none}.card-footer-link svg{width:.72rem}.executive-alerts header>span,.executive-table-card header>span{display:grid;place-items:center;min-width:1.35rem;height:1.35rem;border-radius:99px;color:#8f3737;background:#f7e2e2;font-size:.62rem;font-weight:700}.executive-alert-list>a{display:grid;grid-template-columns:.45rem minmax(0,1fr) auto;align-items:start;gap:.45rem;padding:.52rem .65rem;border-bottom:1px solid #e5eaee;color:inherit;text-decoration:none}.executive-alert-list>a:hover{background:#f7f9fb}.executive-alert-list>a>i{width:.4rem;height:.4rem;margin-top:.18rem;border-radius:50%;background:#b64747}.executive-alert-list a span{display:flex;min-width:0;flex-direction:column;gap:.12rem}.executive-alert-list strong{overflow:hidden;font-size:.62rem;text-overflow:ellipsis;white-space:nowrap}.executive-alert-list small,.executive-alert-list time{color:#718191;font-size:.56rem}.executive-alert-list time{color:#a84949;white-space:nowrap}.executive-empty{display:grid;place-items:center;min-height:11rem;color:#698071;text-align:center}.executive-empty svg{width:1.4rem;color:#2d715c}.executive-table-card{margin-bottom:.65rem;padding:0}.executive-table-card header a{color:#1769aa;font-size:.64rem}.executive-project-table{font-size:.63rem}.executive-project-table th{padding:.4rem .5rem;background:#f1f4f6;font-size:.56rem}.executive-project-table td{height:2.5rem;padding:.35rem .5rem}.executive-project-table td small{display:block;margin-top:.12rem;color:#708193;font-size:.54rem}.executive-project-table td>a{text-decoration:none}.dashboard-status{display:inline-block;padding:.15rem .35rem;border-radius:.2rem;background:#e8edf1;white-space:nowrap}.status-blocked{color:#943d3d;background:#f6dfdf}.status-executing,.status-planned{color:#145d94;background:#e0edf8}.status-closed,.status-accepted{color:#286651;background:#e2f0ea}.dashboard-progress{display:flex;align-items:center;gap:.35rem}.dashboard-progress>span{display:block;width:4.5rem;height:.3rem;overflow:hidden;border-radius:1rem;background:#e0e6eb}.dashboard-progress i{display:block;height:100%;background:#1769aa}.dashboard-progress strong{font-size:.58rem}.dashboard-health{display:inline-flex;align-items:center;gap:.3rem;text-transform:capitalize}.dashboard-health i{width:.45rem;height:.45rem;border-radius:50%;background:#708397}.dashboard-health.health-green i{background:#2e8065}.dashboard-health.health-blue i{background:#1769aa}.dashboard-health.health-yellow i{background:#c48a2b}.dashboard-health.health-red i{background:#a84949}.executive-decisions{margin-bottom:.65rem;padding:0}.executive-decisions>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.55rem;padding:.6rem}.executive-decisions article{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:.65rem;padding:.65rem;border:1px solid #dce3e9;border-radius:.3rem}.decision-icon{display:grid;place-items:center;width:2rem;height:2rem;border-radius:50%;color:#a84949;background:#f7e2e2}.decision-icon svg{width:1rem}.executive-decisions strong{display:block;font-size:.64rem}.executive-decisions p{margin:.12rem 0;color:#536779;font-size:.58rem}.executive-decisions small{color:#7a8997;font-size:.54rem}.field-dashboard-grid{display:grid;grid-template-columns:1fr 1fr;gap:.65rem;margin-bottom:.65rem}.field-action{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:.75rem;padding:1rem;color:inherit;text-decoration:none}.field-action svg{width:1.2rem;color:#1769aa}.field-action span{font-size:.72rem}.field-action strong{font-size:1.35rem}
@media(max-width:80rem){.executive-filters .filter-bar{grid-template-columns:repeat(4,minmax(8rem,1fr))}.executive-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.executive-primary-grid{grid-template-columns:1.5fr 1fr}.executive-alerts{grid-column:1}.executive-status-chart{grid-column:2}.executive-decisions>div{grid-template-columns:1fr}}
@media(max-width:50rem){.executive-heading{align-items:flex-start;flex-direction:column}.executive-heading .page-actions{width:100%}.executive-heading .button{flex:1}.executive-filters .filter-bar{grid-template-columns:1fr 1fr}.executive-kpis{grid-template-columns:1fr 1fr}.executive-primary-grid{grid-template-columns:1fr}.executive-alerts,.executive-status-chart{grid-column:auto}.executive-chart .chart-shell{height:13rem}.field-dashboard-grid{grid-template-columns:1fr}.executive-project-table{min-width:58rem}}
@media(max-width:32rem){.executive-filters .filter-bar,.executive-kpis{grid-template-columns:1fr}.executive-kpi{min-height:4.8rem}}

/* Dashboard drill-down drawers */
.dashboard-drilldown{position:relative;cursor:pointer;transition:border-color .15s ease,box-shadow .15s ease,transform .15s ease}.dashboard-drilldown::after{content:"";position:absolute;top:.55rem;right:.55rem;width:.38rem;height:.38rem;border-top:1px solid #668096;border-right:1px solid #668096;opacity:0;transform:rotate(45deg);transition:opacity .15s ease}.dashboard-drilldown:hover,.dashboard-drilldown:focus-visible{border-color:#8ab0cf;box-shadow:0 3px 12px rgba(18,54,83,.09);outline:0}.dashboard-drilldown:hover::after,.dashboard-drilldown:focus-visible::after{opacity:1}.executive-kpi.dashboard-drilldown:hover{transform:translateY(-1px)}.executive-chart.dashboard-drilldown::after,.executive-alerts.dashboard-drilldown::after,.project-health-card.dashboard-drilldown::after,.executive-decisions.dashboard-drilldown::after{top:.8rem;right:.75rem}.dashboard-detail-drawer{width:min(56rem,96vw)}.dashboard-detail-drawer .drawer-header{padding:1rem 1.1rem}.dashboard-detail-drawer .drawer-header p:last-child{margin:.18rem 0 0;color:#718191;font-size:.65rem}.dashboard-detail-drawer .drawer-body{padding:.7rem .9rem}.dashboard-detail-table{max-height:calc(100vh - 10.5rem);border:1px solid #d8e0e7}.dashboard-detail-table table{font-size:.66rem}.dashboard-detail-table thead{position:sticky;z-index:2;top:0}.dashboard-detail-table th{padding:.42rem .48rem;background:#edf2f5;color:#405568;font-size:.57rem;text-transform:uppercase;white-space:nowrap}.dashboard-detail-table td{padding:.42rem .48rem;vertical-align:top}.dashboard-detail-table tbody tr:hover td{background:#f6f9fb}.dashboard-detail-drawer .drawer-footer{gap:.45rem}.dashboard-detail-drawer .drawer-footer .button-primary{margin-left:auto}
@media(max-width:48rem){.dashboard-detail-drawer{width:100vw}.dashboard-detail-table table{min-width:42rem}.dashboard-detail-drawer .drawer-footer{display:grid;grid-template-columns:1fr 1fr}.dashboard-detail-drawer .drawer-footer .button{justify-content:center}.dashboard-detail-drawer .drawer-footer .button-primary{grid-column:1/-1;width:100%;margin-left:0}}

/* Operational client directory */
.client-directory-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:1rem;margin-bottom:.75rem}.client-directory-heading h1{margin:.1rem 0;font-size:1.3rem;color:#1d3346}.client-directory-heading p:last-child{margin:0;color:#708193;font-size:.7rem}.client-directory-layout{display:grid;grid-template-columns:minmax(0,1fr) 16rem;gap:.65rem;align-items:start}.client-directory-layout>main{min-width:0}.client-directory-filters{display:grid;grid-template-columns:minmax(16rem,2fr) repeat(3,minmax(7rem,1fr)) auto auto;gap:.5rem;align-items:end;margin-bottom:.5rem;padding:.65rem}.client-directory-filters label{display:grid;gap:.2rem;min-width:0;color:#5d7184;font-size:.6rem;font-weight:650}.client-directory-filters input,.client-directory-filters select{width:100%;min-width:0;min-height:2rem;padding:.35rem .45rem;border:1px solid #cbd6df;border-radius:.25rem;background:#fff;color:#293f51;font-size:.65rem}.client-directory-filters .client-search{position:relative}.client-directory-filters .client-search svg{position:absolute;z-index:1;top:.55rem;left:.55rem;width:.8rem;color:#708193}.client-directory-filters .client-search input{padding-left:1.75rem}.client-directory-filters .button{min-height:2rem;padding:.35rem .55rem;white-space:nowrap}.client-filter-chips{display:flex;align-items:center;gap:.35rem;margin:0 0 .5rem;color:#617486;font-size:.6rem}.client-filter-chips>span:not(:first-child){padding:.22rem .42rem;border-radius:1rem;background:#eaf0f5;color:#345069}.client-directory-table-card{padding:0;overflow:visible}.client-directory-table-card>header{display:flex;align-items:center;justify-content:space-between;min-height:2.7rem;padding:.5rem .65rem;border-bottom:1px solid #dce3e9}.client-directory-table-card h2{margin:.05rem 0 0;font-size:.75rem}.client-directory-table{min-width:72rem;table-layout:auto;font-size:.61rem}.client-directory-table thead{position:sticky;z-index:2;top:0}.client-directory-table th{height:1.9rem;padding:.35rem .42rem;background:#edf2f5;color:#405568;font-size:.54rem;text-transform:uppercase;white-space:nowrap}.client-directory-table td{height:3.05rem;padding:.38rem .42rem;vertical-align:middle}.client-directory-table tbody tr:hover td{background:#f5f8fb}.client-directory-table td small{display:block;margin-top:.12rem;color:#748493;font-size:.52rem}.client-identity{display:flex;align-items:center;gap:.48rem;min-width:12rem;color:inherit;text-decoration:none}.client-identity:hover strong{color:#1769aa}.client-avatar{display:grid;place-items:center;flex:none;width:1.8rem;height:1.8rem;border-radius:50%;color:#fff;background:#1769aa;font-size:.55rem;font-weight:750}.client-directory-table tr:nth-child(3n+2) .client-avatar{background:#2d715c}.client-directory-table tr:nth-child(3n) .client-avatar{background:#5b638f}.client-count{color:#1769aa;font-weight:750;text-decoration:none}.client-status{display:inline-flex;align-items:center;gap:.28rem;white-space:nowrap}.client-status i{width:.4rem;height:.4rem;border-radius:50%;background:#2d8064}.client-status.status-inactive i,.client-status.status-archived i{background:#7d8b98}.client-status.status-suspended i{background:#b9574d}.client-directory-table .icon-button{width:1.55rem;height:1.55rem}.client-directory-table.is-extra-compact td{height:2.15rem;padding-block:.25rem}.client-directory-table.is-extra-compact .client-avatar{width:1.45rem;height:1.45rem}.client-directory-table.is-extra-compact td small{display:none}.client-directory-summary{position:sticky;top:calc(var(--topbar-height) + .75rem);padding:0}.client-directory-summary>header{display:flex;align-items:center;justify-content:space-between;min-height:2.7rem;padding:.55rem .7rem;border-bottom:1px solid #dce3e9}.client-directory-summary h2{margin:.06rem 0 0;font-size:.75rem}.client-directory-summary header>svg{width:.8rem;color:#728291}.client-summary-metrics{padding:.2rem .7rem}.client-summary-metrics article{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:.55rem;padding:.65rem 0;border-bottom:1px solid #e4e9ed}.summary-icon{display:grid;place-items:center;width:2rem;height:2rem;border-radius:50%;color:#1769aa;background:#e6f0f8}.summary-icon svg{width:1rem}.summary-icon.tone-green{color:#2d715c;background:#e3f1eb}.summary-icon.tone-navy{color:#274b69;background:#e7edf2}.summary-icon.tone-red{color:#a84949;background:#f7e2e2}.client-summary-metrics article>div{display:grid}.client-summary-metrics span{color:#607486;font-size:.6rem}.client-summary-metrics strong{color:#1e3447;font-size:1rem}.client-summary-metrics small{color:#718394;font-size:.54rem}.client-location-summary{padding:.65rem .7rem}.client-location-summary h3{margin:0 0 .65rem;font-size:.68rem}.client-location-summary>div{margin-bottom:.55rem}.client-location-summary div>span{display:flex;justify-content:space-between;margin-bottom:.18rem;color:#526779;font-size:.58rem}.client-location-summary div>i{display:block;height:.2rem;overflow:hidden;border-radius:1rem;background:#e1e7ec}.client-location-summary div b{display:block;height:100%;border-radius:inherit;background:#1769aa}
@media(max-width:78rem){.client-directory-layout{grid-template-columns:1fr}.client-directory-summary{position:static;display:grid;grid-template-columns:1fr 1fr}.client-directory-summary>header{grid-column:1/-1}.client-summary-metrics{display:grid;grid-template-columns:1fr 1fr}.client-location-summary{border-left:1px solid #dce3e9}.client-directory-filters{grid-template-columns:2fr repeat(3,1fr)}}
@media(max-width:52rem){.client-directory-heading{align-items:flex-start;flex-direction:column}.client-directory-heading .page-actions{width:100%}.client-directory-heading .button{flex:1}.client-directory-filters{grid-template-columns:1fr 1fr}.client-directory-filters .client-search{grid-column:1/-1}.client-directory-summary{display:block}.client-location-summary{border-left:0;border-top:1px solid #dce3e9}.client-directory-table{min-width:60rem}}
@media(max-width:34rem){.client-directory-filters{grid-template-columns:1fr}.client-directory-filters .client-search{grid-column:auto}.client-summary-metrics{grid-template-columns:1fr}}

/* Keep the client grid inside its column; only the table itself scrolls. */
.client-directory-layout,.client-directory-layout>main,.client-directory-table-card{min-width:0;max-width:100%}.client-directory-table-card{overflow:hidden}.client-directory-table-card>.table-scroll{display:block;width:100%;max-width:100%;overflow-x:auto;overflow-y:auto;overscroll-behavior-inline:contain;scrollbar-gutter:stable;scrollbar-width:thin}.client-directory-table{width:max-content;min-width:100%}.client-directory-table thead{position:static}.client-directory-table th{position:sticky;z-index:2;top:0}.client-directory-summary{z-index:3}
@media(max-width:78rem){.client-directory-table-card>.table-scroll{max-height:none}.client-directory-summary{z-index:auto}}

/* Client 360° profile */
.client-profile-hero{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin:-.35rem 0 0;padding:.75rem 1rem;background:#fff;border:1px solid #dce3e9;border-radius:.3rem .3rem 0 0}.client-profile-identity{display:flex;align-items:center;gap:.85rem;min-width:0}.client-profile-avatar{display:grid;place-items:center;flex:none;width:3.75rem;height:3.75rem;border-radius:.35rem;color:#fff;background:linear-gradient(145deg,#173f55,#246b61);font-size:1.35rem;font-weight:750;letter-spacing:-.05em}.client-profile-title{display:flex;align-items:center;gap:.65rem}.client-profile-title h1{margin:.08rem 0;color:#172b3c;font-size:1.35rem}.client-profile-code{margin:.15rem 0 0;color:#64788a;font-size:.65rem}.client-profile-code span{margin:0 .25rem;color:#a5b0b9}.client-profile-hero .page-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:.4rem}.client-profile-hero .page-actions form{margin:0}.client-profile-hero .button{min-height:2rem;padding:.38rem .65rem;font-size:.64rem}.button-quiet{border:1px solid transparent;background:transparent;color:#526a7d}.button-quiet:hover{border-color:#cbd6df;background:#f4f7f9}.client-profile-tabs{margin-top:0}.client-profile-tabs>.tab-list{gap:0;overflow-x:auto;padding:0 .55rem;border:1px solid #dce3e9;border-top:0;background:#fff;scrollbar-width:thin}.client-profile-tabs>.tab-list .tab{flex:none;min-height:2.45rem;padding:.5rem .8rem;border-radius:0;font-size:.65rem}.client-profile-tabs>.tab-list .tab span{display:inline-grid;place-items:center;min-width:1.15rem;height:1.15rem;margin-left:.25rem;padding:0 .25rem;border-radius:1rem;background:#e9eef2;color:#5d7184;font-size:.53rem}.client-profile-tabs>.tab-panel{margin:.65rem 0 0}.client-profile-overview{padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important}.client-profile-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:.55rem;margin-bottom:.6rem}.client-profile-kpis article{display:flex;align-items:flex-start;justify-content:space-between;min-height:5.35rem;padding:.65rem}.client-profile-kpis article>div{display:grid;min-width:0;gap:.13rem}.client-profile-kpis span{color:#52687a;font-size:.59rem;font-weight:700}.client-profile-kpis strong{overflow:hidden;color:#1769aa;font-size:1rem;line-height:1.3;text-overflow:ellipsis;white-space:nowrap}.client-profile-kpis small{color:#718293;font-size:.52rem}.client-profile-kpis article>svg{box-sizing:content-box;flex:none;width:.95rem;height:.95rem;padding:.45rem;border-radius:50%;color:#1769aa;background:#e7f1fa}.client-profile-kpis article:nth-child(2)>svg{color:#244d69;background:#e8edf2}.client-profile-kpis article:nth-child(3)>svg{color:#2d715c;background:#e4f1eb}.client-profile-kpis article:nth-child(4)>svg{color:#9b651e;background:#f7ecd9}.client-profile-grid{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(18rem,.85fr);gap:.6rem}.client-profile-grid>.card{min-width:0;padding:0}.client-profile-grid article>header,.client-profile-panel>.section-heading{display:flex;align-items:center;justify-content:space-between;min-height:2.45rem;padding:.5rem .65rem;border-bottom:1px solid #dce3e9}.client-profile-grid article>header h2{margin:0;font-size:.71rem}.client-profile-grid article>header>svg{width:.8rem;color:#718293}.client-profile-grid article>header .link-button{font-size:.58rem}.client-information-grid{display:grid;grid-template-columns:1fr 1fr}.client-information-grid dl{margin:0;padding:.55rem .65rem}.client-information-grid dl+dl{border-left:1px solid #e1e6ea}.client-information-grid dl>div{display:grid;grid-template-columns:6.3rem minmax(0,1fr);gap:.45rem;padding:.23rem 0}.client-information-grid dt{color:#708193;font-size:.57rem}.client-information-grid dd{margin:0;overflow-wrap:anywhere;color:#263c4f;font-size:.6rem;font-weight:550}.client-information-card footer{padding:.5rem .65rem;border-top:1px solid #e1e6ea;background:#fafbfd}.client-information-card footer strong{font-size:.58rem}.client-information-card footer p{margin:.15rem 0;color:#607385;font-size:.57rem}.client-relationship-score{display:grid;grid-template-columns:6.2rem 1fr;align-items:center;gap:.75rem;padding:.8rem}.score-ring{display:flex;align-items:baseline;justify-content:center;width:5.5rem;height:5.5rem;padding-top:1.85rem;border-radius:50%;background:radial-gradient(circle 2.1rem,#fff 97%,transparent 100%),conic-gradient(#2c8064 calc(var(--score)*1%),#e3e9ed 0);color:#2c8064}.score-ring strong{font-size:1.25rem}.score-ring span{font-size:.55rem;color:#718293}.client-relationship-score>div:last-child p{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:.4rem;margin:.35rem 0;color:#566d80;font-size:.56rem}.client-relationship-score p>i{width:.4rem;height:.4rem;border-radius:50%;background:#718293}.client-relationship-score p>.tone-green{background:#2c8064}.client-relationship-score p>.tone-blue{background:#1769aa}.client-relationship-score p>.tone-amber{background:#c28529}.client-portfolio-card{grid-column:1}.client-sites-card{grid-column:2}.compact-client-table{min-width:44rem;font-size:.58rem}.compact-client-table th{padding:.35rem .45rem;background:#f0f4f6;font-size:.52rem;text-transform:uppercase;white-space:nowrap}.compact-client-table td{height:2.35rem;padding:.32rem .45rem;vertical-align:middle}.compact-client-table td>a{text-decoration:none}.compact-client-table td small{display:block;margin-top:.1rem;color:#748493;font-size:.5rem}.client-site-list>a{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:.5rem;padding:.52rem .65rem;border-bottom:1px solid #e4e9ed;color:inherit;text-decoration:none}.client-site-list>a:hover{background:#f6f9fb}.client-site-list>a>svg{width:.85rem;color:#1769aa}.client-site-list a span:nth-child(2){display:grid;min-width:0}.client-site-list strong{overflow:hidden;font-size:.6rem;text-overflow:ellipsis;white-space:nowrap}.client-site-list small{color:#748493;font-size:.52rem}.compact-empty{display:grid;place-items:center;min-height:5rem;color:#718293;text-align:center}.compact-empty svg{width:1rem}.compact-empty p{margin:.25rem 0;font-size:.58rem}.client-profile-panel{padding:0}.client-profile-panel>.section-heading{margin:0}.client-profile-panel>.section-heading h2{margin:.04rem 0;font-size:.78rem}.client-profile-panel>.section-heading .eyebrow{font-size:.5rem}.client-profile-panel>.inline-form,.client-profile-panel>form{margin:.65rem}.client-contact-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.5rem;padding:.65rem}.client-contact-grid article{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:.55rem;padding:.6rem;border:1px solid #dde4e9;border-radius:.25rem}.client-contact-avatar{display:grid;place-items:center;width:2rem;height:2rem;border-radius:50%;color:#fff;background:#315c78;font-size:.65rem;font-weight:700}.client-contact-grid article>div:nth-child(2){display:grid;min-width:0}.client-contact-grid strong{overflow:hidden;font-size:.62rem;text-overflow:ellipsis;white-space:nowrap}.client-contact-grid strong span{margin-left:.3rem;padding:.1rem .3rem;border-radius:1rem;color:#286651;background:#e2f0ea;font-size:.48rem}.client-contact-grid small{color:#708193;font-size:.52rem}.client-contact-grid p{overflow:hidden;margin:.15rem 0 0;color:#536a7d;font-size:.52rem;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:78rem){.client-profile-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.client-profile-grid{grid-template-columns:1fr}.client-portfolio-card,.client-sites-card{grid-column:auto}.client-contact-grid{grid-template-columns:1fr 1fr}}
@media(max-width:54rem){.client-profile-hero{align-items:flex-start;flex-direction:column}.client-profile-hero .page-actions{width:100%;justify-content:flex-start}.client-profile-kpis{grid-template-columns:1fr 1fr}.client-information-grid{grid-template-columns:1fr}.client-information-grid dl+dl{border-top:1px solid #e1e6ea;border-left:0}.client-contact-grid{grid-template-columns:1fr}}
@media(max-width:34rem){.client-profile-avatar{width:3rem;height:3rem}.client-profile-title{align-items:flex-start;flex-direction:column;gap:.2rem}.client-profile-title h1{font-size:1.15rem}.client-profile-kpis{grid-template-columns:1fr}.client-profile-hero .button{flex:1}.client-relationship-score{grid-template-columns:1fr;justify-items:center}}
.client-form-drawer{width:min(38rem,96vw)}.client-form-drawer .drawer-header h2{margin:.08rem 0;font-size:1rem}.client-form-drawer .drawer-body{padding:.85rem}.client-form-drawer .form-grid{grid-template-columns:1fr 1fr;gap:.65rem}.client-form-drawer .field{display:grid;gap:.25rem}.client-form-drawer .field>span{color:#4f6578;font-size:.62rem;font-weight:650}.client-form-drawer input,.client-form-drawer select,.client-form-drawer textarea{width:100%;min-width:0}.client-form-drawer .check-row{margin:.25rem 0 .65rem}.client-confirm-modal{width:min(34rem,94vw)!important;padding:1.1rem!important}.client-confirm-modal .swal2-title{color:#20384b;font-size:1.05rem}.client-confirm-modal .swal2-html-container{margin:.65rem 0 0}.client-confirm-modal .ajax-confirm-lead{margin:0 0 .55rem;color:#64788a;font-size:.68rem}.client-confirm-modal .ajax-confirm-table{width:100%;border-collapse:collapse;text-align:left}.client-confirm-modal .ajax-confirm-table th,.client-confirm-modal .ajax-confirm-table td{padding:.38rem .45rem;border-bottom:1px solid #e2e7eb;font-size:.63rem}.client-confirm-modal .ajax-confirm-table th{width:38%;color:#66798a;font-weight:600}.client-confirm-modal .ajax-confirm-table td{color:#233b4e;font-weight:650}.client-confirm-modal .ajax-error-list{text-align:left;color:#a84949;font-size:.65rem}.client-contact-grid .table-actions form,.compact-client-table .table-actions form{margin:0}
@media(max-width:36rem){.client-form-drawer{width:100vw}.client-form-drawer .form-grid{grid-template-columns:1fr}.client-form-drawer .field-span-2{grid-column:auto}}
.site-zone-panel{padding:0}.site-zone-panel>.section-heading{margin:0;padding:.65rem;border-bottom:1px solid #dce3e9}.site-zone-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.6rem;padding:.65rem}.site-zone-grid>.card{min-width:0;padding:.7rem}.site-zone-card-head{display:flex;align-items:center;justify-content:space-between;gap:.5rem}.site-zone-card-head .table-actions form{margin:0}.site-zone-grid h3{margin:.55rem 0 .25rem;color:#263d50;font-size:.72rem}.site-zone-grid p{min-height:2.4rem;margin:0 0 .55rem;color:#617486;font-size:.58rem;line-height:1.45}.site-zone-grid small{display:flex;align-items:flex-start;gap:.35rem;padding-top:.5rem;border-top:1px solid #e3e8ec;color:#526a7d;font-size:.54rem}.site-zone-grid small svg{flex:none;width:.72rem}.site-zone-grid .status-pill{font-size:.5rem}.risk-controlled{color:#176098;background:#e1eef8}.risk-high{color:#855514;background:#f8ead3}.risk-critical{color:#983f3f;background:#f6dfdf}.zone-form-drawer{width:min(32rem,96vw)}.zone-form-drawer .drawer-header small{color:#708193;font-size:.58rem}
.site-zone-grid .zone-site-label{margin-top:.45rem;padding-top:0;border-top:0;color:#1769aa;font-weight:650}.drawer-context{display:grid;grid-template-columns:auto auto 1fr;align-items:center;gap:.4rem;margin-bottom:.7rem;padding:.55rem;border-radius:.25rem;background:#eef4f8;color:#607486;font-size:.6rem}.drawer-context svg{width:.8rem;color:#1769aa}.drawer-context strong{color:#294459}
.equipment-form-drawer{width:min(44rem,97vw)}.equipment-form-drawer .drawer-header small{color:#708193;font-size:.58rem}.equipment-form-drawer .drawer-body{padding-bottom:1.2rem}.equipment-form-drawer textarea{resize:vertical}
.equipment-detail-drawer{width:min(48rem,97vw)}.equipment-detail-drawer .drawer-header small{color:#708193;font-size:.58rem}.equipment-detail-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.45rem;margin-bottom:.7rem}.equipment-detail-summary>div{display:grid;gap:.12rem;padding:.5rem;border:1px solid #dce4e9;border-radius:.25rem;background:#fafbfd}.equipment-detail-summary span{color:#708193;font-size:.52rem}.equipment-detail-summary strong{font-size:.62rem}.equipment-media-section,.equipment-history-section{margin-bottom:.7rem;border:1px solid #dce4e9;border-radius:.25rem;background:#fff}.equipment-media-section .compact-card-header h3,.equipment-history-section .compact-card-header h3{font-size:.68rem}.equipment-photo-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.45rem;padding:.55rem}.equipment-photo-grid>a{display:grid;overflow:hidden;border:1px solid #dce4e9;border-radius:.25rem;color:#40576a;text-decoration:none}.equipment-photo-grid img{width:100%;height:7rem;object-fit:cover;background:#edf2f5}.equipment-photo-grid span{overflow:hidden;padding:.35rem;font-size:.52rem;text-overflow:ellipsis;white-space:nowrap}.equipment-document-list>a{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:.5rem;padding:.5rem .65rem;border-top:1px solid #e4e9ed;color:inherit;text-decoration:none}.equipment-document-list>a:hover{background:#f6f9fb}.equipment-document-list>a>svg{width:.8rem;color:#1769aa}.equipment-document-list a span{display:grid}.equipment-document-list strong{font-size:.58rem}.equipment-document-list small{color:#718293;font-size:.5rem}.equipment-media-form{display:grid;grid-template-columns:minmax(10rem,1fr) minmax(10rem,1fr) auto;align-items:end;gap:.45rem;padding:.55rem;border-top:1px solid #dce4e9;background:#fafbfd}.equipment-media-form .field{display:grid;gap:.2rem}.equipment-media-form .field>span{color:#5a7083;font-size:.54rem}.equipment-media-form input{min-width:0;width:100%;font-size:.56rem}.equipment-history-list{max-height:18rem;overflow-y:auto}.equipment-history-list article{display:grid;grid-template-columns:auto 1fr;gap:.5rem;padding:.5rem .65rem;border-top:1px solid #e4e9ed}.equipment-history-list article>svg{width:.8rem;color:#1769aa}.equipment-history-list strong{font-size:.58rem}.equipment-history-list p{margin:.12rem 0;color:#536a7d;font-size:.54rem}.equipment-history-list small{color:#7b8b99;font-size:.49rem}
@media(max-width:40rem){.equipment-detail-summary{grid-template-columns:1fr 1fr}.equipment-photo-grid{grid-template-columns:1fr 1fr}.equipment-media-form{grid-template-columns:1fr}.equipment-detail-drawer{width:100vw}}
@media(max-width:68rem){.site-zone-grid{grid-template-columns:1fr 1fr}}@media(max-width:38rem){.site-zone-grid{grid-template-columns:1fr}}

/* Formulaires de planification explicites */
#phase-drawer{width:min(40rem,97vw)}#phase-drawer .drawer-header small{color:#708193;font-size:.58rem}#phase-drawer .field>span{display:flex;align-items:baseline;gap:.25rem;color:#40586b;font-size:.65rem;font-weight:700}#phase-drawer .field>span small{color:#7a8996;font-size:.52rem;font-weight:500}#phase-drawer .field>small{color:#718293;font-size:.53rem;font-weight:450;line-height:1.45}.manual-estimate-box{padding:.65rem;border:1px solid #cbdbe7;border-radius:.3rem;background:#f5f9fc}.manual-estimate-box .check-field{display:grid!important;grid-template-columns:auto 1fr;align-items:flex-start;gap:.55rem!important}.manual-estimate-box .check-field input{margin-top:.15rem}.manual-estimate-box .check-field span{display:grid;gap:.12rem}.manual-estimate-box .check-field strong{color:#29475e;font-size:.63rem}.manual-estimate-box .check-field small{color:#657b8d;font-size:.53rem;font-weight:450;line-height:1.4}.manual-estimate-box [data-manual-hours-fields]{display:grid;gap:.65rem;margin-top:.65rem;padding-top:.65rem;border-top:1px solid #d8e4ec}.manual-estimate-box [data-manual-hours-fields][hidden]{display:none}
.schedule-phase-modal{width:min(38rem,calc(100vw - 2rem))!important;padding:1rem!important;border-radius:.45rem!important}.schedule-phase-modal .swal2-title{padding:0 2rem;color:#173852;font-size:1.05rem!important;line-height:1.35}.schedule-phase-modal .swal2-html-container{margin:.7rem 0 0!important}.schedule-phase-detail{text-align:left}.schedule-phase-status{display:flex;align-items:center;justify-content:space-between;margin-bottom:.35rem}.schedule-phase-status span{padding:.18rem .45rem;border-radius:1rem;color:#245a7d;background:#e4eff7;font-size:.58rem;font-weight:700}.schedule-phase-status strong{color:#174e76;font-size:.75rem}.schedule-phase-progress{height:.38rem;margin-bottom:.8rem;overflow:hidden;border-radius:1rem;background:#e1e7ec}.schedule-phase-progress i{display:block;height:100%;border-radius:inherit;background:#1769aa}.schedule-phase-detail dl{display:grid;grid-template-columns:1fr 1fr;margin:0;border:1px solid #dce4ea;border-radius:.3rem;overflow:hidden}.schedule-phase-detail dl>div{display:grid;grid-template-columns:7rem minmax(0,1fr);gap:.4rem;padding:.45rem .55rem;border-bottom:1px solid #e4e9ed}.schedule-phase-detail dl>div:nth-child(odd){border-right:1px solid #e4e9ed}.schedule-phase-detail dl>.detail-span{grid-column:1/-1;border-right:0}.schedule-phase-detail dt{color:#6a7d8d;font-size:.57rem}.schedule-phase-detail dd{margin:0;color:#263d50;font-size:.59rem;font-weight:650}.schedule-phase-description{margin-top:.65rem;padding:.6rem;border:1px solid #dce4ea;border-radius:.3rem;background:#f8fafb}.schedule-phase-description strong{color:#324d61;font-size:.6rem}.schedule-phase-description p{margin:.25rem 0 0;color:#5d7182;font-size:.58rem;line-height:1.5;white-space:pre-wrap}@media(max-width:36rem){.schedule-phase-detail dl{grid-template-columns:1fr}.schedule-phase-detail dl>div,.schedule-phase-detail dl>div:nth-child(odd){border-right:0}.schedule-phase-detail dl>.detail-span{grid-column:auto}}
#task-drawer{width:min(42rem,97vw)}#task-drawer .drawer-header small{color:#708193;font-size:.57rem}#task-drawer .drawer-body{gap:.65rem!important;padding:.8rem}#task-drawer .field>span{display:flex;align-items:baseline;gap:.25rem;color:#40586b;font-size:.64rem;font-weight:700}#task-drawer .field>span small{color:#7a8996;font-size:.51rem;font-weight:500}#task-drawer .field>small{color:#718293;font-size:.52rem;font-weight:450;line-height:1.45}.task-form-notice{display:grid;grid-template-columns:auto 1fr;gap:.5rem;padding:.58rem .65rem;border:1px solid #cfe0ec;border-radius:.3rem;background:#f1f7fb;color:#536d80}.task-form-notice>svg{width:.85rem;color:#1769aa}.task-form-notice p{margin:0;font-size:.55rem;line-height:1.5}.task-form-notice a{color:#1264a3;font-weight:700}.drawer-section-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:.5rem;margin:.2rem -.8rem 0;padding:.48rem .8rem;border-top:1px solid #dce4e9;border-bottom:1px solid #e4e9ed;background:#f8fafb}.drawer-section-heading strong{color:#29485f;font-size:.64rem}.drawer-section-heading small{color:#738493;font-size:.5rem;font-weight:450}#task-drawer .drawer-footer{display:flex;justify-content:space-between;gap:.5rem}#task-drawer .form-grid{grid-template-columns:1fr 1fr;gap:.6rem}@media(max-width:36rem){#task-drawer{width:100vw}#task-drawer .form-grid{grid-template-columns:1fr}.drawer-section-heading{align-items:flex-start;flex-direction:column}}
.dependency-manager-drawer{width:min(46rem,97vw);display:flex;flex-direction:column}.dependency-manager-drawer>.drawer-header{flex:none}.dependency-manager-drawer>.drawer-body{flex:1;min-height:0;overflow-y:auto;padding:.7rem}.dependency-edit-card{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(8rem,.8fr) minmax(7rem,.55fr) auto;align-items:end;gap:.5rem;margin-bottom:.55rem;padding:.6rem;border:1px solid #dce4e9;border-radius:.3rem;background:#fff}.dependency-edit-card>div{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:.35rem;align-self:center}.dependency-edit-card>div strong{overflow:hidden;color:#29465c;font-size:.56rem;text-overflow:ellipsis;white-space:nowrap}.dependency-edit-card>div svg{width:.7rem;color:#1769aa}.dependency-edit-card label{display:grid!important;gap:.2rem!important;font-size:.53rem!important}.dependency-edit-card select,.dependency-edit-card input{min-height:2rem!important;font-size:.56rem!important}@media(max-width:44rem){.dependency-edit-card{grid-template-columns:1fr 1fr}.dependency-edit-card>div{grid-column:1/-1}.dependency-edit-card button{grid-column:1/-1}}
