/* Shared PGEO palette. Brand pixels, map layers and 3D renderers stay intact. */
:root{--pgeo-blue:#4D7691;--pgeo-sage:#95A48F;--pgeo-sand:#D9C6AF;--pgeo-stone:#999998}
:root,html[data-pgeo-theme="light"]{color-scheme:light;--pgeo-background:#EDF1F3;--pgeo-surface:#FFFFFF;--pgeo-surface-alt:#F4F6F7;--pgeo-text:#193443;--pgeo-muted:#546875;--pgeo-line:#CBD5DA;--pgeo-soft:#E5EDF2;--pgeo-input:#FFFFFF;--pgeo-error:#9E3636;--pgeo-shadow:0 8px 28px #19344309;--pgeo-page-background:linear-gradient(140deg,#F6F8F9,#E9EFF2)}
html[data-pgeo-theme="dark"]{--pgeo-background:#10212B;--pgeo-surface:#172D39;--pgeo-surface-alt:#1B3441;--pgeo-text:#F0F4F3;--pgeo-muted:#B5C3C8;--pgeo-line:#36525F;--pgeo-soft:#243F4F;--pgeo-input:#102733;--pgeo-error:#FFB6B4;--pgeo-shadow:0 10px 34px #00000018;--pgeo-page-background:linear-gradient(140deg,#10212B,#0D1C24)}
html[data-pgeo-theme="nature"]{--pgeo-background:#F0ECE4;--pgeo-surface:#FBFAF7;--pgeo-surface-alt:#F1F0E8;--pgeo-text:#263C36;--pgeo-muted:#58635B;--pgeo-line:#C9CEC3;--pgeo-soft:#E5EBE0;--pgeo-input:#FFFFFF;--pgeo-error:#9B3A35;--pgeo-shadow:0 8px 28px #4F5B4210;--pgeo-page-background:linear-gradient(135deg,#F6F3ED,#EBEEE6)}
html[data-pgeo-theme] body{--bg:var(--pgeo-background);--card:var(--pgeo-surface);--text:var(--pgeo-text);--muted:var(--pgeo-muted);--line:var(--pgeo-line);--accent:var(--pgeo-blue);--accent-soft:var(--pgeo-soft);--reference-bg:var(--pgeo-background);--reference-panel:var(--pgeo-surface);--reference-line:var(--pgeo-line);--reference-text:var(--pgeo-text);--reference-muted:var(--pgeo-muted);--reference-blue:var(--pgeo-blue);background:var(--pgeo-page-background)!important;color:var(--pgeo-text)!important}
html[data-pgeo-theme] body.v17-theme:before{background:var(--pgeo-page-background)!important;filter:none!important}
html[data-pgeo-theme] body.v17-theme:after{background:none!important}
html[data-pgeo-theme="dark"] body.v17-theme:before{background-image:linear-gradient(#10212BEF,#10212BF4),var(--pgeo-bg)!important;background-size:cover!important}
html[data-pgeo-theme] body.v17-theme main{background:transparent!important;color:var(--pgeo-text)!important}
html[data-pgeo-theme] body.v17-theme :is(.app-sidebar,.mobile-topbar){background:var(--pgeo-surface)!important;color:var(--pgeo-text)!important;border-color:var(--pgeo-line)!important;box-shadow:var(--pgeo-shadow)!important}
html[data-pgeo-theme] body.v17-theme .app-sidebar :is(.nav,.sidebar-profile b,.sidebar-profile small,.sidebar-legal a,.sidebar-mobile-apps a,.brand-v17 strong,.brand-v17 small){color:var(--pgeo-text)!important}
html[data-pgeo-theme] body.v17-theme .app-sidebar :is(.sidebar-profile small,.sidebar-legal a,.sidebar-mobile-apps a){color:var(--pgeo-muted)!important}
html[data-pgeo-theme] body.v17-theme .app-sidebar .nav{background:transparent!important}
html[data-pgeo-theme] body.v17-theme .app-sidebar .nav:hover{background:var(--pgeo-surface-alt)!important}
html[data-pgeo-theme] body.v17-theme .app-sidebar .nav.active{background:var(--pgeo-soft)!important;color:var(--pgeo-text)!important;box-shadow:inset 3px 0 var(--pgeo-blue)!important}
html[data-pgeo-theme] body.v17-theme .app-sidebar .sidebar-profile{border-color:var(--pgeo-line)!important}
html[data-pgeo-theme] body.v17-theme .sidebar-avatar{background:var(--pgeo-blue)!important;color:white!important}
html[data-pgeo-theme] body.v17-theme .sidebar-profile .sidebar-logout-text{color:var(--pgeo-muted)!important;border-color:var(--pgeo-line)!important}
html[data-pgeo-theme] body.v17-theme .sidebar-profile .sidebar-logout-text:hover{color:var(--pgeo-text)!important;background:var(--pgeo-soft)!important}
html[data-pgeo-theme] body :is(.pgeo-logo-title,.pgeo-login-title){color:var(--pgeo-text)!important;font-style:normal!important}
html[data-pgeo-theme] body:is(.v17-theme,.pgeo-reference-login) :is(.brand-master,.brand-v17) :is(.pgeo-logo-title,.pgeo-login-title,.pgeo-wordmark){font-style:normal!important;text-shadow:none!important;letter-spacing:.06em!important;font-weight:750!important;color:var(--pgeo-text)!important}
html[data-pgeo-theme] body .pgeo-blue-e{color:var(--pgeo-text)!important}
html[data-pgeo-theme] body :is(.pgeo-brand-picture,.brand-master) img{filter:none!important}
/* High specificity is intentional: historical module styles use fixed !important colours. */
html[data-pgeo-theme] body.v17-theme :is(main>.view,#annuaire,#administration) :is(.panel,.entity-card,.tutorial-card,.download-card,.metric-group,.comment-row,.standby-zone,.task-templates,.backup-settings,.backup-status,.telemetry-dashboard,.telemetry-grid article,.telemetry-policy,.security-panel,.admin-inline-panel,.admin-table-wrapper,.gp-planning-card,.rh-details-panel){background:var(--pgeo-surface)!important;color:var(--pgeo-text)!important;border-color:var(--pgeo-line)!important;box-shadow:var(--pgeo-shadow)!important}
html[data-pgeo-theme] body.v17-theme :is(main>.view,#annuaire,#administration) :is(.panel h2,.panel h3,.panel h4,.panel label,.section-head h2,.section-head h3,.entity-card b,.tutorial-card h3,.download-card h3,.telemetry-dashboard h3,.standby-head strong){color:var(--pgeo-text)!important}
html[data-pgeo-theme] body.v17-theme :is(main>.view,#annuaire,#administration) :is(.panel > small,.hint,.entity-card small,.metric-group small,.download-card small,.backup-grid small,.backup-status span){color:var(--pgeo-muted)!important}
html[data-pgeo-theme] body.v17-theme :is(main>.view,#annuaire,#administration) :is(.admin-table,.study-table,.table-wrap){background:var(--pgeo-surface)!important;color:var(--pgeo-text)!important;border-color:var(--pgeo-line)!important}
html[data-pgeo-theme] body.v17-theme :is(main>.view,#annuaire,#administration) :is(.admin-table,.study-table) td{background:var(--pgeo-surface)!important;color:var(--pgeo-text)!important;border-color:var(--pgeo-line)!important}
html[data-pgeo-theme] body.v17-theme :is(main>.view,#annuaire,#administration) :is(.admin-table,.study-table) tr:nth-child(even) td{background:var(--pgeo-surface-alt)!important}
html[data-pgeo-theme] body.v17-theme :is(main>.view,#annuaire,#administration) :is(.admin-table,.study-table) th{background:var(--pgeo-soft)!important;color:var(--pgeo-text)!important;border-color:var(--pgeo-line)!important}
html[data-pgeo-theme] body.v17-theme :is(main>.view,#annuaire,#administration) :is(.admin-table,.study-table) td :is(b,small){color:inherit!important;background:transparent!important}
html[data-pgeo-theme] body.v17-theme :is(button,.primary):not(:where([class*="pc-"],.pointcloud-workspace button,.pointcloud-tools button,.map-volume-stack button,.project-map-icons button,.trigram-badge,.profile-theme-choice,.gp-task,.study-task,.task-template,.danger-soft,.danger,.approve-absence,.reject-absence)){background:var(--pgeo-surface)!important;color:var(--pgeo-text)!important;border-color:var(--pgeo-line)!important;box-shadow:none!important}
html[data-pgeo-theme] body.v17-theme button:hover:not(:disabled):not(:where(.pointcloud-workspace button,.pointcloud-tools button,.profile-theme-choice,.gp-task,.study-task,.task-template,.danger-soft,.danger,.approve-absence,.reject-absence)){background:var(--pgeo-soft)!important}
html[data-pgeo-theme] body.v17-theme :is(button.primary,.primary):not(:where(.pointcloud-workspace button,.pointcloud-tools button)){background:var(--pgeo-blue)!important;color:#FFFFFF!important;border-color:var(--pgeo-blue)!important}
html[data-pgeo-theme] body.v17-theme :is(input,select,textarea):not(.pointcloud-workspace input):not(.pointcloud-workspace select):not(.pointcloud-workspace textarea){background:var(--pgeo-input)!important;color:var(--pgeo-text)!important;border-color:var(--pgeo-line)!important}
html[data-pgeo-theme] body.v17-theme :is(input,textarea)::placeholder{color:var(--pgeo-muted)!important}
html[data-pgeo-theme] body.v17-theme select option{background:var(--pgeo-input);color:var(--pgeo-text)}
html[data-pgeo-theme] body.v17-theme :is(input,select,textarea):focus{border-color:var(--pgeo-blue)!important;box-shadow:0 0 0 3px color-mix(in srgb,var(--pgeo-blue) 18%,transparent)!important}
html[data-pgeo-theme] body :is(button,a,input,select,textarea,[role=button]):focus-visible{outline:2px solid var(--pgeo-blue)!important;outline-offset:3px}
html[data-pgeo-theme] body.v17-theme :is(dialog,.gp-dialog){background:var(--pgeo-surface)!important;color:var(--pgeo-text)!important;border-color:var(--pgeo-line)!important}
html[data-pgeo-theme] body.v17-theme :is(dialog,.gp-dialog) .dialog-head{background:var(--pgeo-surface)!important;color:var(--pgeo-text)!important}
html[data-pgeo-theme] body.v17-theme :is(dialog,.gp-dialog) :is(h2,h3,label,small){color:var(--pgeo-text)!important}
html[data-pgeo-theme] body.v17-theme :is(dialog,.gp-dialog) :is(input,select,textarea){background:var(--pgeo-input)!important;color:var(--pgeo-text)!important;border-color:var(--pgeo-line)!important}
html[data-pgeo-theme] body.v17-theme :is(.reference-planning-heading h1,.reference-day-title,.reference-days button strong){color:var(--pgeo-text)!important}
html[data-pgeo-theme] body.v17-theme :is(.reference-week,.reference-days button,.reference-modes,.planner-scroll,.left-rail,.bucket-zone,.reference-empty){background:var(--pgeo-surface)!important;border-color:var(--pgeo-line)!important;color:var(--pgeo-muted)!important}
html[data-pgeo-theme] body.v17-theme .reference-modes button{color:var(--pgeo-muted)!important}
html[data-pgeo-theme] body.v17-theme :is(.reference-modes button.active,.reference-days button.active){background:var(--pgeo-blue)!important;color:white!important;border-color:var(--pgeo-blue)!important}
html[data-pgeo-theme] body.v17-theme .reference-days button.active strong{color:white!important}
html[data-pgeo-theme] body.v17-theme :is(#planning,#generic-planning) :is(#planningTable,.company-planning-table) :is(th,td){background:var(--pgeo-surface)!important;color:var(--pgeo-text)!important;border-color:var(--pgeo-line)!important}
html[data-pgeo-theme] body.v17-theme :is(#planning,#generic-planning) :is(#planningTable,.company-planning-table) tbody tr:nth-child(odd)>:is(td,th){background:var(--pgeo-surface)!important}
html[data-pgeo-theme] body.v17-theme :is(#planning,#generic-planning) :is(#planningTable,.company-planning-table) tbody tr:nth-child(even)>:is(td,th){background:var(--pgeo-surface-alt)!important}
html[data-pgeo-theme] body.v17-theme :is(#planning,#generic-planning) :is(#planningTable,.company-planning-table) thead th{background:var(--pgeo-soft)!important}
html[data-pgeo-theme] body.v17-theme :is(#planning,#generic-planning) :is(#planningTable,.company-planning-table) :is(.day-name,.day-num){color:inherit!important}
html[data-pgeo-theme] body.v17-theme :is(#planning,#generic-planning) :is(#planningTable,.company-planning-table) .today-head{background:var(--pgeo-blue)!important;color:white!important;box-shadow:inset 0 -3px var(--pgeo-sage)!important}
html[data-pgeo-theme] body.v17-theme :is(#planning,#generic-planning) :is(#planningTable,.company-planning-table) .today-cell{box-shadow:inset 1px 0 var(--pgeo-blue),inset -1px 0 var(--pgeo-blue)!important}
html[data-pgeo-theme] body.v17-theme :is(#planning,#generic-planning) :is(#planningTable,.company-planning-table) .week-separator{border-left-color:var(--pgeo-blue)!important}
html[data-pgeo-theme] body.v17-theme :is(#planning,#generic-planning) :is(#planningTable,.company-planning-table) tr:nth-child(n)>.week-alternate{background-image:linear-gradient(color-mix(in srgb,var(--pgeo-blue) 5%,transparent),color-mix(in srgb,var(--pgeo-blue) 5%,transparent))!important}
html[data-pgeo-theme="dark"] body.v17-theme :is(#planning,#generic-planning) :is(#planningTable,.company-planning-table) tr:nth-child(n)>.week-alternate{background-image:linear-gradient(#ffffff0e,#ffffff0e)!important}
html[data-pgeo-theme] body.v17-theme #generic-planning #gpTemplates{background:var(--pgeo-surface)!important}
html[data-pgeo-theme] body.v17-theme #generic-planning :is(.task-template-title,.day-total,#gpNotice){color:var(--pgeo-muted)!important}
html[data-pgeo-theme] body.v17-theme #generic-planning .gp-toolbar button.primary,
html[data-pgeo-theme] body.v17-theme #generic-planning .gp-toolbar button.primary:hover:not(:disabled){background:var(--pgeo-blue)!important;color:#FFFFFF!important;border-color:var(--pgeo-blue)!important}
html[data-pgeo-theme] body.v17-theme .admin-section-nav{background:var(--pgeo-surface)!important;color:var(--pgeo-text)!important;border-color:var(--pgeo-line)!important}
html[data-pgeo-theme] body.v17-theme .admin-section-nav button{background:var(--pgeo-surface-alt)!important;color:var(--pgeo-text)!important;border-color:var(--pgeo-line)!important}
html[data-pgeo-theme] body.v17-theme .admin-section-nav button:hover{background:var(--pgeo-soft)!important;border-color:var(--pgeo-blue)!important}
html[data-pgeo-theme] body.v17-theme .admin-section-nav button.active{background:var(--pgeo-soft)!important;color:var(--pgeo-text)!important;border-color:var(--pgeo-blue)!important;box-shadow:inset 0 -3px var(--pgeo-blue)!important}
html[data-pgeo-theme] body.v17-theme #stocks .map-ledger-side{background:var(--pgeo-surface)!important;color:var(--pgeo-text)!important;border-color:var(--pgeo-line)!important}
html[data-pgeo-theme] body.v17-theme #stocks .map-ledger-side :is(h3,h4,label){color:var(--pgeo-text)!important}
html[data-pgeo-theme] body.v17-theme #stocks .stock-panel-actions{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:0 0 10px}
/* Task/assignment colours still carry their existing business meaning. */
html[data-pgeo-theme] body.v17-theme #planning.reference-day-view :is(#planningTable,.company-planning-table) :is(td,.geo-col){background:transparent!important}
html[data-pgeo-theme] body.v17-theme .task.task-selected{outline-color:var(--pgeo-blue)!important}
html[data-pgeo-theme] body.v17-theme .security-panel{--security-bg:var(--pgeo-surface);--security-table:var(--pgeo-surface);--security-head:var(--pgeo-soft);--security-line:var(--pgeo-line);--security-text:var(--pgeo-text);--security-muted:var(--pgeo-muted)}
html[data-pgeo-theme] body.v17-theme *{scrollbar-color:var(--pgeo-stone) var(--pgeo-background)}
html[data-pgeo-theme] body.v17-theme *::-webkit-scrollbar-track{background:var(--pgeo-background)}html[data-pgeo-theme] body.v17-theme *::-webkit-scrollbar-thumb{background:var(--pgeo-stone);border-color:var(--pgeo-background)}
/* Connection, registration and password recovery share the same public palette. */
html[data-pgeo-theme] body.pgeo-reference-login{background:var(--pgeo-page-background)!important;color:var(--pgeo-text)!important}
html[data-pgeo-theme] body.pgeo-reference-login:before,html[data-pgeo-theme] body.pgeo-reference-login:after{background:none!important}
html[data-pgeo-theme] body.pgeo-reference-login .login-shell{background:transparent!important;color:var(--pgeo-text)!important}
html[data-pgeo-theme] body.pgeo-reference-login :is(.field>span,.secondary-title,.token-info,.field-hint,.message,.login-windows-download){color:var(--pgeo-muted)!important}
html[data-pgeo-theme] body.pgeo-reference-login :is(.field input,.eye){background:var(--pgeo-input)!important;color:var(--pgeo-text)!important;border-color:var(--pgeo-line)!important}
html[data-pgeo-theme] body.pgeo-reference-login .primary{background:var(--pgeo-blue)!important;color:#fff!important;border-color:var(--pgeo-blue)!important}
html[data-pgeo-theme] body.pgeo-reference-login :is(.subtle-actions button,.subtle-actions a,.back){color:var(--pgeo-text)!important}
html[data-pgeo-theme] body.pgeo-reference-login .message.error{color:var(--pgeo-error)!important}
html[data-pgeo-theme] body.pgeo-reference-login .login-windows-download{background:var(--pgeo-surface)!important;border-color:var(--pgeo-line)!important}
@media(max-width:600px){html[data-pgeo-theme] body.v17-theme .app-sidebar .nav.active{box-shadow:inset 0 2px var(--pgeo-blue)!important}}
/* Calendar hatching stays legible in all themes, without changing task colors. */
html[data-pgeo-theme] body.v17-theme :is(#planning,#generic-planning,#study-planning) :is(#planningTable,.company-planning-table,.study-table) tr:nth-child(n)>:is(.holiday-column,.planning-leave-day){background:repeating-linear-gradient(45deg,#d2d5d8 0 20px,#fff 20px 40px)!important;color:#27343e!important}
html[data-pgeo-theme] body.v17-theme :is(#planning,#generic-planning,#study-planning) :is(#planningTable,.company-planning-table,.study-table) :is(.holiday-column,.planning-leave-day)>.day-total{color:#27343e!important}
