﻿/* The approved look of Projects Management System: the styles of the demo (docs/demo/pms-demo.html, v94),
   its base styles first, then its design layer (designTheme). Change the demo first, then copy them here again. */

/* Layout: the real WebForms screens (MasterPage nav + tabbed Task View), Bootstrap 5.3.8 (LTR / RTL) from the project's Source folder */
:root {
  --app-bg: #ffffff;
  --app-fg: #212529;
  --notice-bg: #fff4e0;
  --notice-fg: #5a3b06;
  --notice-line: #efcb8d;
  --panel-bg: #f1f3f6;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --app-bg: #212529;
    --app-fg: #dee2e6;
    --notice-bg: #3a2b12;
    --notice-fg: #f2d9a6;
    --notice-line: #6e5226;
    --panel-bg: #2b3035;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --app-bg: #212529;
  --app-fg: #dee2e6;
  --notice-bg: #3a2b12;
  --notice-fg: #f2d9a6;
  --notice-line: #6e5226;
  --panel-bg: #2b3035;
  color-scheme: dark;
}
:root[dir="rtl"] { --bs-body-font-family: "Noto Sans Arabic", "Geeza Pro", Tahoma, system-ui, sans-serif; }
body {
  background: var(--app-bg);
  color: var(--app-fg);
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 0 24px;
}

.demo-notice {
  background: var(--notice-bg);
  color: var(--notice-fg);
  border: 1px solid var(--notice-line);
  border-radius: .5rem;
  padding: .5rem .75rem;
  margin-block: .75rem;
  font-size: .9rem;
  display: flex;
  gap: .5rem;
  align-items: flex-start;
}
.demo-notice p { margin: 0; flex: 1; min-width: 0; }

/* ===== from Source/CSS/Custom.css, with logical sides so it also works right to left ===== */
@media (min-width: 992px) {
  .hover-nav .dropdown:hover > .dropdown-menu,
  .hover-nav .dropdown:focus-within > .dropdown-menu { display: block; top: 100%; inset-inline-start: 0; margin-top: 0; }
}
.user-menu .dropdown-menu { position: absolute; top: 100%; inset-inline-end: 0; inset-inline-start: auto; min-width: 260px; margin-top: .5rem; }
.user-menu .avatar-sm { width: 34px; height: 34px; }
.user-menu .avatar-lg { width: 64px; height: 64px; font-size: 1.5rem; }
@media (max-width: 991.98px) { .user-menu .dropdown-toggle::after { display: none; } }
.hover-nav .nav-link:hover,
.hover-nav .dropdown:hover > .nav-link,
.hover-nav .dropdown.show > .nav-link { background-color: var(--bs-secondary-bg); border-radius: .375rem; }
.nav-tabs .nav-link.active { background-color: var(--bs-info-bg-subtle); }
/* the menu stays on one line: an icon and its word never split, and between 992 and 1200 px the name by the avatar
   (it is in the avatar's menu) and some padding make room, in English as in Arabic */
.app-nav .navbar-nav .nav-link { white-space: nowrap; }
@media (min-width: 992px) {
  .app-nav .navbar-nav .nav-link { display: flex; align-items: center; }
  .app-nav .navbar-brand { white-space: nowrap; }
}
@media (min-width: 992px) and (max-width: 1199.98px) {
  #lblUserShort { display: none !important; }
  .app-nav .navbar-nav .nav-link { padding-inline: .4rem !important; }
  .app-nav .navbar-brand { margin-inline-end: .5rem; }
}

.app-nav { top: env(safe-area-inset-top, 0px); }
.avatar { border-radius: 50%; background: var(--bs-secondary-bg); color: var(--bs-secondary-color); display: inline-grid; place-items: center; font-weight: 600; }
.filter-panel { background: var(--panel-bg); }
.tab-nav-scroll { overflow-x: auto; overflow-y: hidden; }
.tab-nav-scroll .nav-tabs { flex-wrap: nowrap; white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
thead.app-head th { background: var(--bs-tertiary-bg); text-align: center; vertical-align: middle; }
.btn-lang { min-width: 4.5rem; white-space: nowrap; }

/* ===== Project tab table (from Task_View.html) ===== */
/* the table fits the screen: Operations takes what is left (at least 8rem; its boxes scroll inside it), the other columns keep their width:
   the section path and the object name take up to two lines (the path breaks after a "\", the name after a "_"), each column the narrowest
   that holds the longest one shown in two lines (--w-sec, --w-obj, set after drawing); the rest fixed at the least that reads well (19.25rem together) */
#tblProject { table-layout: fixed; width: 100%; min-width: calc(var(--w-sec, 12rem) + var(--w-obj, 12rem) + 27.25rem); margin: 0; }
#tblProject > thead > tr > th { white-space: nowrap; overflow-wrap: normal; padding-inline: .3rem; }   /* a column name on one line */
#tblProject > * > tr > * { overflow-wrap: anywhere; vertical-align: middle; }
#tblProject > tbody > tr > * { padding: .6rem .5rem; }
#tblProject > tbody > tr:hover > * { --bs-table-bg-state: var(--bs-tertiary-bg); }
/* the fixed columns are narrow so Operations gets the rest of the width */
#tblProject > thead > tr > :nth-child(1) { width: 2rem; }
#tblProject > thead > tr > :nth-child(2) { width: 3.75rem; }
#tblProject > thead > tr > :nth-child(3) { width: var(--w-sec, 12rem); }
#tblProject > thead > tr > :nth-child(4) { width: var(--w-obj, 12rem); }
#tblProject > thead > tr > :nth-child(6) { width: 4.25rem; }
#tblProject > thead > tr > :nth-child(7) { width: 4.5rem; }
#tblProject > thead > tr > :nth-child(8) { width: 4.75rem; }
#tblProject > tbody > tr > th { text-align: center; color: var(--bs-secondary-color); font-weight: 500; }
.obj-name { font-weight: 600; line-height: 1.3; font-size: .8rem; overflow-wrap: break-word; }
.sec-path { font-size: .78rem; color: var(--bs-secondary-color); line-height: 1.35; }
#tblProject > tbody > tr > td.sec-path { overflow-wrap: break-word; }   /* breaks at the spaces around "\", a word only if it is longer than the column */
.mini-bar { display: block; width: 100%; max-width: 4.5rem; height: 4px; border-radius: 2px; background: var(--bs-secondary-bg); overflow: hidden; }
.mini-bar i { display: block; height: 100%; background: var(--bs-primary); }
.mini-bar.over-bar i { background: var(--bs-warning); }
/* the header stays visible while the table scrolls */
.project-scroll { max-height: calc(100vh - 8rem); overflow: auto; position: relative; }
#tblProject > thead > tr > th { position: sticky; top: 0; z-index: 3; background: var(--bs-tertiary-bg); box-shadow: inset 0 -1px 0 var(--bs-border-color); }
.stack { display: flex; flex-direction: column; align-items: center; gap: .25rem; text-align: center; }
/* the file status in the project table: what runs now under it, the Approve button, the approved badge that cancels on click */
.fs-run { font-size: .68rem; line-height: 1.2; color: var(--bs-secondary-color); }
.fs-btn { font-size: .72rem; padding: .05rem .45rem; }
.badge.fs-ok { cursor: pointer; }
.stack .badge { white-space: normal; }
.stack .of { font-size: .75rem; color: var(--bs-secondary-color); }
/* priority: a coloured circle with the number, and an arrow under it that opens the choices */
.prio-btn { display: inline-flex; flex-direction: column; align-items: center; gap: .1rem; background: none; border: 0; padding: .2rem .4rem; border-radius: .375rem; color: inherit; }
.prio-btn:hover:not(:disabled), .prio-btn[aria-expanded="true"] { background: var(--bs-tertiary-bg); }
.prio-btn:disabled { cursor: default; }
.prio-btn:disabled .prio-caret { visibility: hidden; }
.prio-caret { font-size: .7rem; line-height: 1; color: var(--bs-secondary-color); }
.prio-circle { display: inline-grid; place-items: center; flex: none; width: 1.9rem; height: 1.9rem; border-radius: 50%; font-weight: 700; font-size: .9rem; color: #fff; }
.prio-circle.sm { width: 1.45rem; height: 1.45rem; font-size: .75rem; }
.prio-c-0 { background: transparent; border: 1.5px dashed var(--bs-border-color); color: var(--bs-secondary-color); }
.prio-menu { min-width: 17rem; }
.swatch { width: 2rem; height: 2rem; border-radius: 50%; border: 2px solid var(--bs-body-bg); box-shadow: 0 0 0 1px var(--bs-border-color); padding: 0; }
.swatch.active { box-shadow: 0 0 0 3px var(--bs-body-color); }
.list-scroll { max-height: 22rem; overflow-y: auto; }
.prio-menu .dropdown-item { white-space: normal; }
.ops-scroll { overflow-x: auto; overflow-y: hidden; position: relative; }   /* relative: what is placed inside stays inside its scroll */
.ops-scroll { content-visibility: auto; contain-intrinsic-size: auto 18rem; }   /* a file row's boxes are laid out only near the screen: hundreds of files stay fast */
.row > .ops-col { flex: 0 0 auto; width: 90%; min-width: 26rem; }
.ops-card { width: 100%; }
.ops-card .card-header { display: flex; align-items: center; gap: .4rem; padding: .45rem .6rem; }
.ops-card .card-header strong { flex: 1; min-width: 0; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
tr.click-row { cursor: pointer; }
.dot { font-size: .6rem; vertical-align: middle; }

/* progress circle (from Task_View.html) */
.progress-circle { width: var(--size, 50px); height: var(--size, 50px); border-radius: 50%; display: inline-grid; place-items: center; position: relative;
  background: conic-gradient(var(--pc-color) calc(var(--value) * 1%), var(--bs-secondary-bg) 0); }
.progress-circle::before { content: ''; position: absolute; inset: 12%; background: var(--bs-body-bg); border-radius: 50%; }
.progress-circle > * { position: relative; z-index: 1; font-size: .8rem; }
.pc-danger { --pc-color: var(--bs-danger); }
.pc-warning { --pc-color: var(--bs-warning); }
.pc-info { --pc-color: var(--bs-info); }
.pc-success { --pc-color: var(--bs-success); }

/* Tasks tab: one card per day */
.day-card .card-header { display: flex; flex-wrap: wrap; gap: .25rem .75rem; align-items: baseline; }
.day-card .card-header .day-name { font-weight: 600; }
.task-line { display: grid; grid-template-columns: 7.5rem 3.5rem minmax(0, 1fr) auto; gap: .25rem .75rem; align-items: center; padding: .5rem .75rem; border-top: 1px solid var(--bs-border-color); cursor: pointer; }
.task-line:first-child { border-top: 0; }
.task-line:hover, .task-line:focus-visible { background: var(--bs-tertiary-bg); outline: none; }
.task-line .what { min-width: 0; }
.task-line .what .path { font-size: .8rem; color: var(--bs-secondary-color); overflow-wrap: anywhere; }
@media (max-width: 575.98px) {
  .task-line { grid-template-columns: 1fr auto; }
  .task-line .when { grid-column: 1; }
  .task-line .dur { grid-column: 2; grid-row: 1; text-align: end; }
  .task-line .what { grid-column: 1 / -1; }
  .task-line .state { grid-column: 1 / -1; }
}

/* Overview */
:root { --bs-darkred: #8b0000; }
.ov-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.avatar-md { width: 2.5rem; height: 2.5rem; font-size: 1rem; }
.avatar-xs { width: 1.75rem; height: 1.75rem; font-size: .7rem; }
.ov-sec .card-header { background: var(--bs-tertiary-bg); }
.ov-sec .table > :not(caption) > * > * { padding-inline: .6rem; }
.kpi .card-body { padding: .75rem 1rem; }
.kpi { position: relative; }
.help-btn { border: 0; background: none; padding: 0 .15rem; line-height: 1; color: var(--bs-secondary-color); font-size: .9rem; }
.help-btn:hover, .help-btn:focus-visible { color: var(--bs-primary); }
.kpi > .help-btn { position: absolute; top: .45rem; inset-inline-end: .45rem; z-index: 1; }
.help-pop { --bs-popover-max-width: 22rem; --bs-popover-font-size: .82rem; }
.help-pop .popover-body { line-height: 1.6; }
.help-pop .hp-l + .hp-l { margin-top: .4rem; }
.help-pop .hp-f { background: var(--bs-tertiary-bg); border-radius: .35rem; padding: .3rem .5rem; font-weight: 600; }
.help-pop .hp-x { color: var(--bs-secondary-color); }
.kpi .label { font-size: .75rem; letter-spacing: .04em; text-transform: uppercase; color: var(--bs-secondary-color); }
:root[dir="rtl"] .kpi .label { letter-spacing: 0; font-size: .8rem; }
.kpi .value { font-size: 1.6rem; font-weight: 600; line-height: 1.2; }
.kpi .sub { font-size: .8rem; color: var(--bs-secondary-color); }
/* light colour: each project, the office and other tasks and each action have a colour of their own (--pc), and each card's icon its meaning (--tone) */
.ov-sec.tint { border-inline-start: 4px solid var(--pc); }
.ov-sec.tint > .card-header { background: color-mix(in srgb, var(--pc) 7%, transparent); }
.ov-sec.tint > .card-header > .bi:first-child { background: color-mix(in srgb, var(--pc) 16%, transparent) !important; color: var(--pc) !important; }
.ov-sec.tint > .card-header > strong { color: var(--pc); }
.ops-card.tint { border-top: 3px solid var(--pc); }
.ops-card.tint > .card-header { background: color-mix(in srgb, var(--pc) 7%, transparent); }
.ops-card.tint > .card-header strong { color: var(--pc) !important; }
#divProjectScroll.tint { border-top: 3px solid var(--pc) !important; }   /* the id: the design layer sets every border colour of the page's boxes */
.task-line.tint { border-inline-start: 3px solid var(--pc); }
.kpi.tint-top { border-top: 3px solid var(--pc); }
.kpi .label > .bi.tone { background: color-mix(in srgb, var(--tone) 15%, transparent); color: var(--tone); }
/* a report or list section: a soft header and its icon in the section's colour */
.ov-sec.tint-soft > .card-header { background: color-mix(in srgb, var(--pc) 6%, transparent); }
.ov-sec.tint-soft > .card-header > .bi:first-child { background: color-mix(in srgb, var(--pc) 16%, transparent) !important; color: var(--pc) !important; }
/* the filter boxes: a light blue ground, the labels in the same blue (the id: the design layer sets these with !important) */
#appShell .filter-panel { background: color-mix(in srgb, var(--bs-primary) 5%, var(--bs-body-bg)) !important; border-color: color-mix(in srgb, var(--bs-primary) 22%, var(--bs-border-color)) !important; }
#appShell .filter-panel .form-label, #appShell .filter-panel label { color: color-mix(in srgb, var(--bs-primary) 60%, var(--bs-secondary-color)); }
/* the Overview header: the person's box from blue to violet, the initials in a full circle */
#appShell .ov-head.filter-panel { background: linear-gradient(110deg, color-mix(in srgb, var(--bs-primary) 14%, var(--bs-body-bg)), color-mix(in srgb, #7c3aed 11%, var(--bs-body-bg))) !important; border-color: color-mix(in srgb, var(--bs-primary) 30%, var(--bs-border-color)) !important; }
#appShell .ov-head .avatar-md { background: linear-gradient(135deg, var(--bs-primary), #7c3aed); color: #fff; box-shadow: 0 0 0 3px color-mix(in srgb, var(--bs-primary) 18%, transparent); }
/* Tasks: each day a soft header, today in blue */
.day-card > .card-header { background: color-mix(in srgb, var(--bs-primary) 4%, transparent); }
.day-card.is-today { border-color: color-mix(in srgb, var(--bs-primary) 45%, var(--bs-border-color)); }
.day-card.is-today > .card-header { background: color-mix(in srgb, var(--bs-primary) 11%, transparent); }
/* Team performance: the overall strip on a soft ground */
.perf-overall { background: linear-gradient(110deg, color-mix(in srgb, var(--bs-primary) 7%, var(--bs-body-bg)), color-mix(in srgb, #16a34a 6%, var(--bs-body-bg))); }
/* Settings: each tab has a colour, on its icon, its active tab and the table headers of its page */
#liSet_general, #set-general-pane { --tc: #2563eb; }
#liSet_users, #set-users-pane { --tc: #16a34a; }
#liSet_roles, #set-roles-pane { --tc: #4f46e5; }
#liSet_objects, #set-objects-pane { --tc: #7c3aed; }
#liSet_lists, #set-lists-pane { --tc: #d97706; }
#liSet_template, #set-template-pane { --tc: #059669; }
#liSet_translate, #set-translate-pane { --tc: #0891b2; }
#liSet_category, #set-category-pane { --tc: #0d9488; }
#liSet_notes, #set-notes-pane { --tc: #ea580c; }
#viewSettings .nav-tabs .nav-link > .bi { color: var(--tc); }
#viewSettings .nav-tabs .nav-link.active, #viewSettings .nav-tabs .nav-link.active:hover { color: var(--tc); border-bottom-color: var(--tc); background: color-mix(in srgb, var(--tc) 8%, transparent); }
#viewSettings .tab-pane thead.app-head th { background: color-mix(in srgb, var(--tc) 8%, var(--bs-body-bg)) !important; }
#set-general-pane .form-label.fw-semibold, #set-category-pane .tree > li > details > summary strong { color: var(--tc); }
/* the four lists: a colour each */
.list-card { border-top: 3px solid var(--pc); }
.list-card > .card-header { background: color-mix(in srgb, var(--pc) 6%, transparent); }
.list-card > .card-header strong { color: var(--pc); }
/* roles and people: a colour each */
.role-badge { background: color-mix(in srgb, var(--rc) 13%, transparent); color: var(--rc); border: 1px solid color-mix(in srgb, var(--rc) 30%, transparent); font-weight: 600; }
.avatar.tinted, .mini-av.tinted { background: color-mix(in srgb, var(--uc) 16%, transparent); color: var(--uc); }
/* Project Statistics: the project's colour on its heading icons */
#rep-stats-pane h3 > .bi { color: var(--pc, inherit); }
/* the Overview sections: six cards in two rows of three, the completion beside the title */
.ov-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.kpi.kpi-md .card-body { padding: .65rem .85rem; gap: .15rem; }
.kpi.kpi-md .label { font-size: .82rem; padding-inline-end: 1rem; }
.kpi.kpi-md .label > .bi { width: 1.7rem; height: 1.7rem; font-size: .9rem; }
.kpi.kpi-md .value { font-size: 1.45rem; line-height: 1.25; }
.kpi.kpi-md .over-clock { font-size: .9rem; font-weight: 600; white-space: nowrap; }
.sec-bar { display: inline-flex; align-items: center; gap: .4rem; }
.sec-bar .progress { width: 7rem; height: 6px; }
@media (max-width: 575.98px) {
  .ov-cards { gap: .4rem; }
  .kpi.kpi-md .card-body { padding: .5rem .55rem; }
  .kpi.kpi-md .label { font-size: .72rem; }
  .kpi.kpi-md .label > .bi { display: none !important; }
  .kpi.kpi-md .value { font-size: 1.1rem; }
  .sec-bar .progress { width: 4rem; }
}
/* Next up: the person's order box, a letter for the type of the task */
.next-list { max-height: 21rem; overflow-y: auto; }
.ord-in { width: 3rem; flex: none; padding: .1rem .2rem; text-align: center; -moz-appearance: textfield; }
.ord-in::-webkit-outer-spin-button, .ord-in::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ord-pill { display: inline-grid; place-items: center; min-width: 1.35rem; height: 1.35rem; padding: 0 .3rem; border-radius: .45rem; background: var(--bs-primary-bg-subtle); color: var(--bs-primary-text-emphasis); font-size: .72rem; font-weight: 600; }
.ty-chip { display: inline-grid; place-items: center; flex: none; width: 1.4rem; height: 1.4rem; border-radius: 50%; color: #fff; font-size: .7rem; font-weight: 700; line-height: 1; }
.ty-project { background: var(--bs-primary); }
.ty-office { background: var(--bs-orange); }
.ty-other { background: var(--bs-teal); }

/* trees */
.tree, .tree ul { list-style: none; margin: 0; padding-inline-start: 1.1rem; }
.tree { padding-inline-start: 0; }
.tree li { padding-block: .15rem; }
.tree summary { cursor: pointer; }
.tree .meta { font-size: .8rem; color: var(--bs-secondary-color); }
/* the description's translation box and its language tabs */
.tr-head { display: flex; align-items: flex-end; justify-content: space-between; gap: .5rem; margin-bottom: .3rem; flex-wrap: wrap; }
.tr-tabs { display: inline-flex; align-items: center; gap: .15rem; background: var(--bs-tertiary-bg); border: 1px solid var(--bs-border-color); border-radius: .5rem; padding: .12rem; }
.tr-tab { border: 0; background: none; font-size: .78rem; padding: .12rem .6rem; border-radius: .38rem; color: var(--bs-secondary-color); }
.tr-tab:hover { color: var(--bs-body-color); }
.tr-tab.active { background: var(--bs-body-bg); color: var(--bs-primary); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.tr-tabs.busy { opacity: .6; pointer-events: none; }
.tr-out { background: var(--bs-tertiary-bg); }
.obj-acts { display: inline-flex; gap: .35rem; margin-inline-start: .35rem; vertical-align: middle; }
.obj-acts .btn { line-height: 1; color: var(--bs-secondary-color); }
.obj-acts .btn:hover, .obj-acts .btn:focus-visible { color: var(--bs-primary); }
.obj-acts .btn.del:hover, .obj-acts .btn.del:focus-visible { color: var(--bs-danger); }
.tree .is-off > strong { color: var(--bs-secondary-color); text-decoration: line-through; }

.login-wrap { min-height: 80vh; display: grid; place-items: center; padding-block: 1rem; }
.login-card { width: 100%; max-width: 380px; }
.toast-wrap { padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px)) !important; padding-inline-end: max(1rem, env(safe-area-inset-right, 0px)) !important; }

.ops-list { max-height: 230px; min-height: 48px; overflow-y: auto; overflow-x: hidden; }
.ms-btn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-menu { min-width: 15rem; max-height: 18rem; overflow-y: auto; }
.ops-card .card-header { flex-wrap: wrap; }
.act-line { flex-basis: 100%; display: flex; align-items: center; gap: .4rem; font-size: .75rem; color: var(--bs-secondary-color); }
.act-line .bar { flex: 1; min-width: 2rem; height: 4px; border-radius: 2px; background: var(--bs-secondary-bg); overflow: hidden; }
.act-line .bar i { display: block; height: 100%; background: var(--bs-success); }
.over { color: var(--bs-warning-text-emphasis) !important; border-color: var(--bs-warning) !important; }
.est-col { color: var(--bs-secondary-color); text-align: center; }
.box-table { margin: 0; font-size: .8rem; table-layout: fixed; width: 100%; }
.box-table th { font-weight: 600; font-size: .72rem; color: var(--bs-secondary-color); padding: .35rem .45rem; white-space: nowrap; background: var(--bs-body-bg); position: sticky; top: 0; z-index: 1; }
.box-table td { padding: .35rem .45rem; vertical-align: middle; }
/* the action box: narrow columns, the date above the time in Start and End */
.box-table col.c-who { width: 4.5rem; }
.box-table col.c-est { width: 3rem; }
.box-table col.c-act { width: 3.25rem; }
.box-table col.c-st { width: 6.5rem; }
.box-table col.c-del { width: 1.6rem; }
.row > .ops-col:has(col.c-del) { min-width: 27.6rem; }   /* the bin column adds its width: the task name keeps its room */
.box-table td.del { padding-inline: 0; text-align: center; }
.del-btn { color: var(--bs-secondary-color); line-height: 1; }
.del-btn:hover, .del-btn:focus-visible { color: var(--bs-danger); }
.box-table td.num .d { display: block; font-size: .7rem; line-height: 1.15; }
.box-table td.st { white-space: nowrap; }
/* the status in the box: a button with the dot and the name that opens the list of statuses */
.st-btn, .st-ro { display: inline-flex; align-items: center; gap: .3rem; max-width: 100%; padding: .1rem .35rem; border-radius: .375rem; white-space: nowrap; }
.st-btn { background: none; border: 1px solid transparent; color: inherit; font-size: inherit; }
.st-btn:hover, .st-btn[aria-expanded="true"] { background: var(--bs-tertiary-bg); border-color: var(--bs-border-color); }
.st-btn .st-name, .st-ro .st-name { overflow: hidden; text-overflow: ellipsis; }
.st-caret { font-size: .65rem; color: var(--bs-secondary-color); }
.st-menu { min-width: 11rem; font-size: .85rem; }
.box-table .d { color: var(--bs-secondary-color); }
.dot-live { animation: livePulse 2.4s ease-in-out infinite; }
@keyframes livePulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .dot-live { animation: none; } }
.box-table tr.is-done .tn { color: var(--bs-secondary-color); }
.mini-av { display: inline-grid; place-items: center; width: 1.35rem; height: 1.35rem; border-radius: 50%; background: var(--bs-secondary-bg); color: var(--bs-secondary-color); font-size: .62rem; font-weight: 600; margin-inline-end: .3rem; vertical-align: middle; }
.box-table td.tn .tn-wrap { display: flex; align-items: center; gap: .3rem; min-width: 0; }   /* one line: a long name ends in "..." */
.box-table td.tn .tn-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.box-table td.tn .tn-wrap > i { flex: none; }
.box-table td.who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.box-table td.num { white-space: nowrap; }
.run-dot { font-size: .5rem; color: var(--bs-primary); vertical-align: middle; animation: runPulse 1.6s ease-in-out infinite; }
@keyframes runPulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .run-dot { animation: none; } }
.times-panel { background: var(--panel-bg); }
/* Team performance: the charts keep their height, the long lists scroll under a fixed header */
.perf-chart { position: relative; height: 260px; }
/* the overall rating strip */
.perf-overall { position: relative; }
.perf-overall > .help-btn { position: absolute; top: .5rem; inset-inline-end: .5rem; z-index: 1; }
.po-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.po-score { display: flex; flex-direction: column; align-items: center; gap: .25rem; min-width: 7.5rem; }
.po-label { font-size: .85rem; font-weight: 600; color: var(--bs-secondary-color); }
.po-value { font-size: 2.6rem; font-weight: 700; line-height: 1; }
.po-main { flex: 1 1 16rem; min-width: 0; }
.po-bar { position: relative; }
.po-bar .progress { height: .8rem; border-radius: 999px; }
.po-tick { position: absolute; top: -.2rem; bottom: -.2rem; width: 2px; background: var(--bs-body-color); opacity: .25; }
.po-parts { display: flex; flex-wrap: wrap; gap: .35rem 1.25rem; font-size: .85rem; margin-top: .6rem; }
.po-trend { min-width: 7rem; }
.perf-list { max-height: 26rem; overflow-y: auto; }
.perf-list > table > thead th { position: sticky; top: 0; z-index: 2; box-shadow: inset 0 -1px 0 var(--bs-border-color); }
.note-menu { width: min(22rem, 92vw); max-height: 26rem; overflow-y: auto; }
.note-item.unread { background: var(--bs-primary-bg-subtle); }
.note-ic { width: 2rem; height: 2rem; border-radius: 50%; display: inline-grid; place-items: center; flex: none; }
:focus-visible { outline: 2px solid var(--bs-primary); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .fade, .modal.fade .modal-dialog { transition: none !important; } }

/* ---------- design layer ---------- */
/* The PMS design (approved by Ibrahim 2026-10-25): a visual layer on top of Bootstrap and the page's own styles.
   Layout: a navy app bar over calm slate surfaces, white cards with soft edges, one blue accent for actions,
   soft tinted badges, icon chips on the number cards, underlined tabs, one family (IBM Plex Sans Arabic / IBM Plex Sans). */
:root {
  --ink: #16233b;            /* navy: the app bar and headings */
  --accent: #2463d6;         /* buttons, links, the active tab */
  --accent-strong: #1b4fb0;
  --accent-soft: #e7effc;
  --surface: #f3f5f9;        /* page ground */
  --card: #ffffff;
  --line: #e0e6ef;
  --muted: #5f6c85;
  --nav-bg: #16233b;
  --nav-menu: #1e2e4b;
  --shadow: 0 1px 2px rgba(22, 35, 59, .05), 0 1px 3px rgba(22, 35, 59, .04);

  --app-bg: var(--surface);
  --app-fg: #1c2638;
  --panel-bg: var(--card);
  --notice-bg: var(--accent-soft);
  --notice-fg: #1d3a6e;
  --notice-line: #cddcf6;

  --bs-body-bg: var(--card);
  --bs-body-color: #1c2638;
  --bs-emphasis-color: var(--ink);
  --bs-secondary-color: var(--muted);
  --bs-tertiary-bg: #f6f8fb;
  --bs-secondary-bg: #ebeff5;
  --bs-border-color: var(--line);
  --bs-border-radius: .55rem;
  --bs-border-radius-lg: .8rem;
  --bs-primary: #2463d6;
  --bs-primary-rgb: 36, 99, 214;
  --bs-primary-bg-subtle: #e7effc;
  --bs-primary-border-subtle: #b9cdf3;
  --bs-primary-text-emphasis: #1a4597;
  --bs-link-color: #2463d6;
  --bs-link-color-rgb: 36, 99, 214;
  --bs-link-hover-color: #1b4fb0;
  --bs-link-hover-color-rgb: 27, 79, 176;
  --bs-body-font-size: .95rem;
  --bs-body-font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #e6ecf6;
    --accent: #5b8ef0;
    --accent-strong: #7aa4f3;
    --accent-soft: #1a2a48;
    --surface: #0d1420;
    --card: #141e2f;
    --line: #26344d;
    --muted: #97a4bb;
    --nav-bg: #0a111c;
    --nav-menu: #15213a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    --app-bg: var(--surface);
    --app-fg: #dbe2ee;
    --panel-bg: var(--card);
    --notice-bg: var(--accent-soft);
    --notice-fg: #c9d9f7;
    --notice-line: #2b3f66;
    --bs-body-bg: var(--card);
    --bs-body-color: #dbe2ee;
    --bs-tertiary-bg: #182437;
    --bs-secondary-bg: #1f2d45;
    --bs-primary: #5b8ef0;
    --bs-primary-rgb: 91, 142, 240;
    --bs-primary-bg-subtle: #1a2a48;
    --bs-primary-border-subtle: #2e4a80;
    --bs-primary-text-emphasis: #a9c4f8;
    --bs-link-color: #7aa4f3;
    --bs-link-color-rgb: 122, 164, 243;
    --bs-link-hover-color: #a9c4f8;
    --bs-link-hover-color-rgb: 169, 196, 248;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #e6ecf6;
  --accent: #5b8ef0;
  --accent-strong: #7aa4f3;
  --accent-soft: #1a2a48;
  --surface: #0d1420;
  --card: #141e2f;
  --line: #26344d;
  --muted: #97a4bb;
  --nav-bg: #0a111c;
  --nav-menu: #15213a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  --app-bg: var(--surface);
  --app-fg: #dbe2ee;
  --panel-bg: var(--card);
  --notice-bg: var(--accent-soft);
  --notice-fg: #c9d9f7;
  --notice-line: #2b3f66;
  --bs-body-bg: var(--card);
  --bs-body-color: #dbe2ee;
  --bs-tertiary-bg: #182437;
  --bs-secondary-bg: #1f2d45;
  --bs-primary: #5b8ef0;
  --bs-primary-rgb: 91, 142, 240;
  --bs-primary-bg-subtle: #1a2a48;
  --bs-primary-border-subtle: #2e4a80;
  --bs-primary-text-emphasis: #a9c4f8;
  --bs-link-color: #7aa4f3;
  --bs-link-color-rgb: 122, 164, 243;
  --bs-link-hover-color: #a9c4f8;
  --bs-link-hover-color-rgb: 169, 196, 248;
  color-scheme: dark;
}
:root[dir="rtl"] { --bs-body-font-family: "IBM Plex Sans Arabic", "IBM Plex Sans", "Geeza Pro", Tahoma, system-ui, sans-serif; }
body { background: var(--app-bg); color: var(--app-fg); }
h1, h2, h3, .fs-5 { color: var(--ink); font-weight: 700; text-wrap: balance; }
.num, .value, td.num { font-variant-numeric: tabular-nums; }

/* ---------- the notice: quiet, one line ---------- */
.demo-notice { border-radius: .7rem; font-size: .85rem; padding: .45rem .8rem; }

/* ---------- app bar: navy, white text, a brand mark ---------- */
.app-nav { background: var(--nav-bg) !important; border-radius: 0 0 .9rem .9rem; box-shadow: 0 8px 24px rgba(13, 22, 38, .16); padding-block: .2rem;
  --bs-navbar-color: rgba(255, 255, 255, .78); --bs-navbar-hover-color: #fff; --bs-navbar-active-color: #fff; }
.app-nav .navbar-brand { color: #fff !important; font-weight: 700; border-color: rgba(255, 255, 255, .14) !important; display: inline-flex; align-items: center; gap: .5rem; }
.app-nav .navbar-brand::before { content: "\f44c"; font-family: "bootstrap-icons"; display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: .55rem;
  background: var(--accent); color: #fff; font-size: 1rem; font-weight: 400; }
.app-nav .nav-link { font-weight: 500; padding-inline: .7rem !important; border-radius: .55rem; transition: background-color .15s ease, color .15s ease; }
.app-nav .nav-link .bi { opacity: .9; }
.hover-nav .nav-link:hover, .hover-nav .dropdown:hover > .nav-link, .hover-nav .dropdown.show > .nav-link,
.app-nav .user-menu .nav-link:hover { background-color: rgba(255, 255, 255, .09) !important; color: #fff; }
.app-nav .dropdown-menu { --bs-dropdown-bg: var(--nav-menu); --bs-dropdown-border-color: rgba(255, 255, 255, .08); --bs-dropdown-link-hover-bg: rgba(255, 255, 255, .08);
  --bs-dropdown-link-active-bg: var(--accent); border-radius: .8rem; box-shadow: 0 16px 40px rgba(5, 10, 20, .35); padding: .4rem; }
.app-nav .dropdown-item { border-radius: .5rem; padding-block: .45rem; }
.app-nav .btn-outline-secondary { --bs-btn-color: #e3e9f4; --bs-btn-border-color: rgba(255, 255, 255, .22); --bs-btn-hover-bg: rgba(255, 255, 255, .1);
  --bs-btn-hover-border-color: rgba(255, 255, 255, .32); --bs-btn-hover-color: #fff; --bs-btn-active-bg: rgba(255, 255, 255, .16); --bs-btn-active-color: #fff; border-radius: .55rem; }
.app-nav .avatar { background: var(--accent); color: #fff; }
#Btn_Bell .badge { background: #e5484d !important; color: #fff !important; }

/* ---------- tabs: underlined; pills: soft ---------- */
.nav-tabs { --bs-nav-tabs-border-color: var(--line); gap: .15rem; }
.nav-tabs .nav-link { border: 0; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 500; padding: .6rem .85rem; border-radius: .55rem .55rem 0 0;
  transition: color .15s ease, background-color .15s ease, border-color .15s ease; }
.nav-tabs .nav-link:hover { color: var(--ink); background: var(--bs-tertiary-bg); border-bottom-color: var(--line); }
.nav-tabs .nav-link.active, .nav-tabs .nav-link.active:hover { color: var(--accent); background: transparent; border-bottom-color: var(--accent); font-weight: 600; }
.nav-pills { --bs-nav-pills-link-active-bg: var(--bs-primary-bg-subtle); --bs-nav-pills-link-active-color: var(--bs-primary-text-emphasis); --bs-nav-link-color: var(--muted); --bs-nav-link-hover-color: var(--ink); }
.nav-pills .nav-link { border-radius: 999px; font-weight: 500; }

/* ---------- buttons and form controls ---------- */
.btn { border-radius: .6rem; font-weight: 500; transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease; }
.btn-primary { --bs-btn-bg: var(--bs-primary); --bs-btn-border-color: var(--bs-primary); --bs-btn-hover-bg: var(--accent-strong); --bs-btn-hover-border-color: var(--accent-strong);
  --bs-btn-active-bg: var(--accent-strong); --bs-btn-active-border-color: var(--accent-strong); --bs-btn-disabled-bg: var(--bs-primary); --bs-btn-disabled-border-color: var(--bs-primary);
  --bs-btn-focus-shadow-rgb: var(--bs-primary-rgb); box-shadow: 0 1px 2px rgba(22, 35, 59, .12); }
.btn-outline-primary { --bs-btn-color: var(--bs-primary); --bs-btn-border-color: var(--bs-primary-border-subtle); --bs-btn-hover-bg: var(--bs-primary-bg-subtle); --bs-btn-hover-color: var(--bs-primary-text-emphasis);
  --bs-btn-hover-border-color: var(--bs-primary-border-subtle); --bs-btn-active-bg: var(--bs-primary); --bs-btn-active-border-color: var(--bs-primary); --bs-btn-focus-shadow-rgb: var(--bs-primary-rgb); }
.btn-outline-secondary { --bs-btn-color: var(--muted); --bs-btn-border-color: var(--line); --bs-btn-hover-bg: var(--bs-tertiary-bg); --bs-btn-hover-color: var(--ink); --bs-btn-hover-border-color: var(--line); }
.form-control, .form-select { border-color: var(--line); border-radius: .6rem; min-height: 2.4rem; }
.form-control-sm, .form-select-sm { min-height: 2rem; border-radius: .5rem; }
.form-control:focus, .form-select:focus, .ms-btn:focus { border-color: var(--bs-primary-border-subtle); box-shadow: 0 0 0 .2rem rgba(var(--bs-primary-rgb), .16); }
.form-check-input:checked { background-color: var(--bs-primary); border-color: var(--bs-primary); }
.form-check-input:focus { border-color: var(--bs-primary-border-subtle); box-shadow: 0 0 0 .2rem rgba(var(--bs-primary-rgb), .16); }
.form-label, .ov-head label { font-size: .82rem; font-weight: 500; color: var(--muted); margin-bottom: .3rem; }
.progress, .progress-stacked { --bs-progress-bar-bg: var(--bs-primary); --bs-progress-bg: var(--bs-secondary-bg); border-radius: 999px; }
.dropdown-menu { --bs-dropdown-border-color: var(--line); --bs-dropdown-link-active-bg: var(--bs-primary); border-radius: .75rem; box-shadow: 0 12px 32px rgba(22, 35, 59, .12); }

/* ---------- surfaces: filter bars and cards ---------- */
.filter-panel { background: var(--card) !important; border-color: var(--line) !important; border-radius: .9rem !important; box-shadow: var(--shadow); padding: .75rem !important; }
.card { --bs-card-border-color: var(--line); --bs-card-border-radius: .9rem; --bs-card-inner-border-radius: calc(.9rem - 1px); --bs-card-cap-bg: transparent; box-shadow: var(--shadow); }
.card-header { font-weight: 600; }
.ov-sec .card-header { background: transparent; padding-block: .7rem; }
.ov-sec .card-header > .bi:first-child { display: inline-grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: .5rem;
  background: var(--accent-soft); color: var(--accent) !important; font-size: .9rem; }
section.border { border-color: var(--line) !important; border-radius: 1rem !important; background: var(--card); box-shadow: var(--shadow); padding: 1rem !important; }
.tab-pane > .border.rounded, .project-scroll, .table-responsive.border { border-color: var(--line) !important; border-radius: .8rem !important; }

/* number cards: an icon chip, a larger value */
.kpi .card-body { padding: .9rem 1rem; }
.kpi .label { display: flex; align-items: center; gap: .5rem; font-weight: 500; color: var(--muted); }
.kpi .label > .bi { display: inline-grid; place-items: center; flex: none; width: 2rem; height: 2rem; border-radius: .6rem; margin: 0 !important;
  background: var(--accent-soft); color: var(--accent); font-size: 1rem; }
.kpi .value { font-size: 1.75rem; font-weight: 700; color: var(--ink); letter-spacing: -.01em; }
.kpi .sub { font-size: .8rem; }
.help-btn { color: var(--muted); opacity: .75; transition: opacity .15s ease, color .15s ease; }
.help-btn:hover, .help-btn:focus-visible { opacity: 1; color: var(--accent); }

/* ---------- tables ---------- */
.table { --bs-table-border-color: var(--line); }
thead.app-head th, .box-table th { background: var(--bs-tertiary-bg) !important; color: var(--muted); font-weight: 600; font-size: .8rem; }
.table-hover > tbody > tr:hover > * { --bs-table-bg-state: var(--accent-soft); }
#tblProject > tbody > tr:hover > * { --bs-table-bg-state: var(--bs-tertiary-bg); }
.ops-card { border-radius: .75rem; }
.ops-card .card-header strong { color: var(--accent) !important; }
.task-line:hover, .task-line:focus-visible { background: var(--accent-soft); }

/* ---------- badges: soft tints instead of solid blocks (the priority circles stay solid) ---------- */
.badge { font-weight: 600; border-radius: .45rem; padding: .32em .55em; }
.badge.rounded-pill { border-radius: 999px; }
.badge.text-bg-primary { background-color: var(--bs-primary-bg-subtle) !important; color: var(--bs-primary-text-emphasis) !important; }
.badge.text-bg-success { background-color: var(--bs-success-bg-subtle) !important; color: var(--bs-success-text-emphasis) !important; }
.badge.text-bg-warning { background-color: var(--bs-warning-bg-subtle) !important; color: var(--bs-warning-text-emphasis) !important; }
.badge.text-bg-danger { background-color: var(--bs-danger-bg-subtle) !important; color: var(--bs-danger-text-emphasis) !important; }
.badge.text-bg-info { background-color: var(--bs-info-bg-subtle) !important; color: var(--bs-info-text-emphasis) !important; }
.badge.text-bg-secondary { background-color: var(--bs-secondary-bg) !important; color: var(--bs-secondary-color) !important; }
.badge.text-bg-light { background-color: var(--bs-tertiary-bg) !important; color: var(--muted) !important; border-color: var(--line) !important; }
.prio-circle { box-shadow: 0 0 0 2px var(--card); }

/* ---------- people ---------- */
.avatar { background: var(--accent-soft); color: var(--bs-primary-text-emphasis); }

/* ---------- windows ---------- */
.modal-content { border: 0; border-radius: 1rem; box-shadow: 0 24px 60px rgba(13, 22, 38, .22); }
.modal-header, .modal-footer { border-color: var(--line); }
.modal-header .modal-title { font-weight: 700; color: var(--ink); }
.popover { border-color: var(--line); border-radius: .75rem; box-shadow: 0 12px 32px rgba(22, 35, 59, .14); }
.toast { border-radius: .8rem; }

/* ---------- sign in ---------- */
.login-card { border: 0; border-radius: 1.1rem; box-shadow: 0 18px 50px rgba(22, 35, 59, .12); }

/* ---------- trees ---------- */
.tree li { padding-block: .22rem; }
.tree summary { border-radius: .45rem; padding-inline: .2rem; }
.tree summary:hover { background: var(--bs-tertiary-bg); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .btn, .nav-link, .help-btn, .nav-tabs .nav-link { transition: none; } }
/* ---------- Settings > Roles: the MatjarLink "User Access" layout, the roles on one side and the chosen role's grid on the other ---------- */
.min-w-0 { min-width: 0; }
.rp-roles > .card-header { display: flex; align-items: center; gap: .5rem; padding: .75rem .9rem; background: color-mix(in srgb, var(--tc) 7%, transparent); }
.rp-roles > .card-header > .bi { color: var(--tc); }
.rp-role { display: flex; align-items: center; gap: .65rem; padding: .7rem .85rem; border-inline-start: 3px solid transparent !important; text-align: start; }
.rp-role.rp-on { background: color-mix(in srgb, var(--rc) 9%, var(--card)); border-inline-start-color: var(--rc) !important; }
.rp-dot { width: .7rem; height: .7rem; border-radius: 50%; background: var(--rc); flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--rc) 18%, transparent); }
.rp-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .25rem; }
.rp-name { font-weight: 600; color: color-mix(in srgb, var(--rc) 78%, var(--ink)); overflow-wrap: anywhere; }
.rp-sub { font-size: .78rem; color: var(--muted); }
.rp-bar { display: block; height: 4px; border-radius: 2px; background: var(--bs-secondary-bg); overflow: hidden; }
.rp-bar i { display: block; height: 100%; background: var(--rc); }
.rp-unsaved { display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; background: #f59e0b; margin-inline-start: .4rem; vertical-align: middle; }
.rp-head { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; padding: .85rem 1rem; background: color-mix(in srgb, var(--rc) 7%, transparent); border-bottom: 1px solid var(--line); }
.rp-head h3 { color: color-mix(in srgb, var(--rc) 70%, var(--ink)); }
.rp-ic { width: 2.4rem; height: 2.4rem; border-radius: .7rem; display: inline-grid; place-items: center; background: color-mix(in srgb, var(--rc) 16%, transparent); color: var(--rc); font-size: 1.15rem; flex: none; }
.rp-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; margin-bottom: 1rem; }
@media (max-width: 767.98px) { .rp-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rp-tile { border: 1px solid var(--line); border-radius: .75rem; padding: .55rem .75rem; background: var(--bs-tertiary-bg); min-width: 0; }
.rp-tile .lbl { display: flex; align-items: center; gap: .4rem; font-size: .8rem; color: var(--muted); }
.rp-tile .lbl .bi { color: var(--tc); }
.rp-tile .val { font-size: 1.3rem; font-weight: 700; color: var(--ink); line-height: 1.3; }
.rp-tile .val small { font-size: .8rem; font-weight: 500; color: var(--muted); }
.rp-tile .sub { font-size: .72rem; color: var(--muted); }
.rp-search { position: relative; flex: 1 1 14rem; min-width: 0; }
.rp-search > .bi { position: absolute; inset-inline-start: .7rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.rp-search input { padding-inline-start: 2.1rem; }
.rp-wrap { border: 1px solid var(--line); border-radius: .8rem; overflow: auto; max-height: 34rem; position: relative; }
.rp-grid, .rp-fields, .rp-cmp { margin: 0; --bs-table-border-color: var(--line); }
.rp-grid { min-width: 780px; }
.rp-fields { min-width: 520px; }
.rp-cmp { min-width: 640px; }
.rp-grid thead th, .rp-fields thead th, .rp-cmp thead th { position: sticky; top: 0; z-index: 2; background: color-mix(in srgb, var(--tc) 8%, var(--card)); color: var(--muted); font-weight: 600; font-size: .8rem; text-align: center; vertical-align: bottom; box-shadow: inset 0 -1px 0 var(--line); border-bottom: 0; }
.rp-grid thead th.rp-c-page, .rp-fields thead th:first-child, .rp-cmp thead th:first-child { text-align: start; }
.rp-hd { display: inline-flex; flex-direction: column; align-items: center; gap: .3rem; cursor: pointer; margin: 0; }
.rp-grid .rp-c-num { width: 2.6rem; text-align: center; color: var(--muted); font-weight: 500; }
.rp-grid .rp-c-act { width: 4.8rem; }
.rp-grid .rp-c-row { width: 4.2rem; }
.rp-grid .rp-c-extra { width: 15.5rem; }
.rp-grid td, .rp-grid th { vertical-align: middle; }
.rp-grid .form-check-input, .rp-fields .form-check-input { width: 1.15rem; height: 1.15rem; margin: 0; cursor: pointer; }
.rp-grid .form-check-input:disabled, .rp-fields .form-check-input:disabled { cursor: default; opacity: .6; }
.rp-grp > th { background: color-mix(in srgb, var(--gc) 6%, var(--card)) !important; padding: .45rem .6rem !important; }
.rp-gline { display: flex; align-items: center; gap: .55rem; }
.rp-toggle { border: 0; background: none; padding: .15rem .3rem; border-radius: .4rem; color: var(--muted); line-height: 1; }
.rp-toggle:hover { background: var(--bs-secondary-bg); }
.rp-toggle .bi { display: inline-block; transition: transform .15s ease; }
.rp-toggle[aria-expanded="false"] .bi { transform: rotate(90deg); }
:root[dir="rtl"] .rp-toggle[aria-expanded="false"] .bi { transform: rotate(-90deg); }
.rp-gic { width: 1.6rem; height: 1.6rem; display: inline-grid; place-items: center; border-radius: .45rem; background: color-mix(in srgb, var(--gc) 16%, transparent); color: var(--gc); flex: none; }
.rp-gname { font-weight: 700; color: var(--ink); }
.rp-item:hover > * { --bs-table-bg-state: var(--bs-tertiary-bg); }
.rp-pg { font-weight: 600; display: flex; align-items: center; gap: .45rem; color: var(--ink); }
.rp-pg .bi { color: var(--muted); }
.rp-desc { font-size: .78rem; color: var(--muted); line-height: 1.5; margin-top: .1rem; }
td.rp-na, .rp-na-txt { color: color-mix(in srgb, var(--muted) 50%, transparent); }
.rp-lock { font-size: .75rem; color: var(--muted); white-space: nowrap; }
.rp-xs { display: flex; flex-wrap: wrap; gap: .35rem; }
.rp-chip { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid var(--line); border-radius: 999px; padding: .2rem .6rem; font-size: .78rem; cursor: pointer; background: var(--card); margin: 0; }
.rp-chip:has(input:checked) { background: var(--accent-soft); border-color: var(--bs-primary-border-subtle); color: var(--bs-primary-text-emphasis); }
.rp-chip .form-check-input { width: 1rem; height: 1rem; margin: 0; }
.rp-nomatch { padding: 1.25rem; text-align: center; color: var(--muted); }
.rp-setall { font-size: .75rem; text-decoration: none; }
.rp-people { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .6rem; }
.rp-people li { display: flex; align-items: center; gap: .6rem; border: 1px solid var(--line); border-radius: .75rem; padding: .55rem .7rem; min-width: 0; }
.rp-cmp-role { border: 0; background: none; font-weight: 600; color: color-mix(in srgb, var(--rc) 78%, var(--ink)); display: inline-flex; align-items: center; gap: .4rem; padding: .25rem .5rem; border-radius: .45rem; white-space: nowrap; }
.rp-cmp-role:hover { background: color-mix(in srgb, var(--rc) 12%, transparent); }
.rp-yes { color: var(--rc); font-size: 1.05rem; }
.rp-no { color: color-mix(in srgb, var(--muted) 50%, transparent); }
.rp-lv { font-size: .72rem; font-weight: 600; border-radius: 999px; padding: .15rem .5rem; white-space: nowrap; }
.rp-lv-edit { background: color-mix(in srgb, #16a34a 14%, transparent); color: color-mix(in srgb, #16a34a 75%, var(--ink)); }
.rp-lv-once { background: color-mix(in srgb, #d97706 14%, transparent); color: color-mix(in srgb, #d97706 75%, var(--ink)); }
.rp-lv-view { background: var(--bs-secondary-bg); color: var(--muted); }
.rp-save { position: sticky; bottom: 0; z-index: 1010; margin-top: 1rem; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem;
  padding: .65rem 1rem calc(.65rem + env(safe-area-inset-bottom, 0px)); background: var(--card); border: 1px solid var(--line); border-bottom: 0;
  border-radius: .9rem .9rem 0 0; box-shadow: 0 -6px 20px rgba(22, 35, 59, .08); }
.rp-save.rp-dirty { border-color: color-mix(in srgb, #f59e0b 55%, var(--line)); background: color-mix(in srgb, #f59e0b 7%, var(--card)); }
.rp-save .rp-state { flex: 1 1 16rem; min-width: 0; font-size: .88rem; }
@media (prefers-reduced-motion: reduce) { .rp-toggle .bi { transition: none; } }
/* ---------- Management Dashboard > Project Statistics: the project's tasks by status, a line each (no table) ---------- */
.pt-search { position: relative; flex: 1 1 14rem; min-width: 0; max-width: 22rem; }
.pt-search > .bi { position: absolute; inset-inline-start: .7rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.pt-search input { padding-inline-start: 2.1rem; }
.pt-grp { border: 1px solid var(--line); border-radius: .8rem; background: var(--card); box-shadow: var(--shadow); overflow: hidden; }
.pt-grp > summary { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .75rem; padding: .6rem .85rem; cursor: pointer; list-style: none; background: var(--bs-tertiary-bg); }
.pt-grp > summary::-webkit-details-marker { display: none; }
.pt-grp > summary::before { content: "\f282"; font-family: "bootstrap-icons"; font-size: .8rem; color: var(--muted); transition: transform .15s ease; }
.pt-grp:not([open]) > summary::before { transform: rotate(90deg); }
:root[dir="rtl"] .pt-grp:not([open]) > summary::before { transform: rotate(-90deg); }
.pt-grp > summary strong { color: var(--ink); }
.pt-grp > summary .pt-sum { margin-inline-start: auto; font-size: .8rem; color: var(--muted); }
.pt-line { display: grid; grid-template-columns: minmax(0, 1fr) 11rem 8.5rem 7.5rem; gap: .35rem 1rem; align-items: center; padding: .55rem .85rem; border-top: 1px solid var(--line); border-inline-start: 3px solid var(--pc); cursor: pointer; }
.pt-line:hover, .pt-line:focus-visible { background: var(--accent-soft); outline: none; }
.pt-name { display: flex; align-items: center; gap: .4rem; min-width: 0; font-weight: 600; color: var(--ink); }
.pt-name .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-name .act { font-weight: 500; color: var(--muted); white-space: nowrap; }
.pt-path { font-size: .78rem; color: var(--muted); overflow-wrap: anywhere; margin-top: .1rem; }
.pt-who { display: flex; align-items: center; gap: .4rem; min-width: 0; font-size: .85rem; }
.pt-who span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-time { font-size: .82rem; }
.pt-time .bar { display: block; height: 4px; border-radius: 2px; background: var(--bs-secondary-bg); overflow: hidden; margin-top: .25rem; }
.pt-time .bar i { display: block; height: 100%; background: #16a34a; }
.pt-time.over { color: var(--bs-danger-text-emphasis); }
.pt-time.over .bar i { background: #dc2626; }
.pt-due { text-align: end; }
@media (max-width: 767.98px) {
  .pt-line { grid-template-columns: minmax(0, 1fr) auto; }
  .pt-line .pt-main { grid-column: 1 / -1; }
  .pt-due { text-align: start; }
}
@media (prefers-reduced-motion: reduce) { .pt-grp > summary::before { transition: none; } }
/* ---------- every number card the same way: the label (with its notes) on the start side, the number or time large on the end side (left in Arabic) ---------- */
.kpi .card-body { display: grid !important; grid-template-columns: minmax(0, 1fr) auto; column-gap: .9rem !important; row-gap: .2rem !important; align-items: center; align-content: start; }
.kpi:has(> .help-btn) .card-body { padding-inline-end: 1.7rem; }   /* the help mark keeps its corner */
.kpi .card-body > * { grid-column: 1; min-width: 0; }
.kpi .card-body > .value { grid-column: 2; grid-row: 1 / span 2; align-self: center; justify-self: end; text-align: end; font-size: 2.1rem; font-weight: 700; line-height: 1.1; letter-spacing: -.01em; }
.kpi .card-body > .value .num, .kpi .card-body > .value bdi { white-space: nowrap; }
.kpi .card-body > .progress { grid-column: 1 / -1; margin-top: .35rem !important; }
.kpi.kpi-md .card-body > .value { font-size: 1.8rem; }
.kpi .label { margin-bottom: 0; }
.rp-tile { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: .75rem; align-items: center; }
.rp-tile > * { grid-column: 1; min-width: 0; }
.rp-tile .val { grid-column: 2; grid-row: 1 / span 2; justify-self: end; text-align: end; font-size: 1.75rem; line-height: 1.1; white-space: nowrap; }
@media (max-width: 575.98px) {
  /* narrow phones: the number under the label, still on the end side */
  .kpi.kpi-md .card-body { grid-template-columns: minmax(0, 1fr); }
  .kpi.kpi-md .card-body > .value { grid-column: 1; grid-row: auto; font-size: 1.35rem; }
}
/* ---------- Overview: bigger cards, the label clear and large, the number larger still ---------- */
#overview-pane .ov-cards { gap: .8rem; }
#overview-pane .kpi.kpi-md .card-body { padding: 1rem 1.15rem; padding-inline-end: 2rem; min-height: 6.25rem; row-gap: .35rem !important; }
#overview-pane .kpi.kpi-md .label { font-size: 1.05rem; font-weight: 600; color: var(--ink); gap: .65rem; padding-inline-end: 0; }
#overview-pane .kpi.kpi-md .label > .bi { width: 2.5rem; height: 2.5rem; font-size: 1.25rem; border-radius: .7rem; }
#overview-pane .kpi.kpi-md .card-body > .value { font-size: 2.6rem; }
#overview-pane .kpi.kpi-md .over-clock { font-size: 1.05rem; }
#overview-pane .kpi > .help-btn { font-size: 1rem; top: .55rem; inset-inline-end: .55rem; }
@media (max-width: 991.98px) {
  #overview-pane .kpi.kpi-md .card-body > .value { font-size: 2.2rem; }
}
@media (max-width: 575.98px) {
  /* phones: two cards a row so the words stay large, the number under the label on the end side */
  #overview-pane .ov-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
  #overview-pane .kpi.kpi-md .card-body { padding: .75rem .8rem; padding-inline-end: 2rem; min-height: 0; }   /* the help mark keeps its corner */
  #overview-pane .kpi.kpi-md .label { font-size: .95rem; gap: .5rem; }
  #overview-pane .kpi.kpi-md .label > .bi { display: inline-grid !important; width: 2rem; height: 2rem; font-size: 1rem; }
  #overview-pane .kpi.kpi-md .card-body > .value { font-size: 1.9rem; }
}
/* ---------- Tasks > Tasks table ---------- */
.tt-views { display: flex; flex-wrap: wrap; gap: .4rem; }
.tt-pill { display: inline-flex; align-items: center; gap: .45rem; border: 1px solid var(--line); background: var(--card); color: var(--muted); border-radius: 999px; padding: .35rem .85rem; font-weight: 500; font-size: .9rem; }
.tt-pill .n { background: var(--bs-secondary-bg); color: var(--ink); border-radius: 999px; padding: 0 .45rem; font-size: .78rem; font-weight: 700; }
.tt-pill:hover { color: var(--ink); border-color: var(--bs-primary-border-subtle); }
.tt-pill.on { background: var(--accent-soft); color: var(--bs-primary-text-emphasis); border-color: var(--bs-primary-border-subtle); }
.tt-pill.on .n { background: var(--bs-primary); color: #fff; }
.tt-pill.late .n { background: color-mix(in srgb, var(--bs-danger) 15%, transparent); color: var(--bs-danger-text-emphasis); }
.tt-pill.late.on .n { background: var(--bs-danger); color: #fff; }
.tt-search { position: relative; }
.tt-search > .bi { position: absolute; inset-inline-start: .7rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.tt-search input { padding-inline-start: 2.1rem; }
.tt-sum { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; align-items: center; font-size: .9rem; color: var(--muted); }
.tt-sum b { color: var(--ink); font-weight: 700; }
.tt-sum .late b { color: var(--bs-danger-text-emphasis); }
.tt-wrap { border: 1px solid var(--line); border-radius: .9rem; background: var(--card); box-shadow: var(--shadow); overflow: auto; max-height: calc(100vh - 7rem); position: relative; }
.tt { margin: 0; min-width: 1150px; --bs-table-border-color: var(--line); --bs-table-bg: var(--card); }
.tt thead th { position: sticky; top: 0; z-index: 3; background: color-mix(in srgb, var(--bs-primary) 6%, var(--card)) !important; color: var(--muted); font-size: .78rem; font-weight: 600; white-space: nowrap; vertical-align: middle; box-shadow: inset 0 -1px 0 var(--line); border-bottom: 0; padding-block: .55rem; }
.tt-sort { border: 0; background: none; color: inherit; font: inherit; padding: 0; display: inline-flex; align-items: center; gap: .25rem; }
.tt-sort:hover { color: var(--ink); }
.tt-sort .bi { font-size: .7rem; opacity: .35; }
.tt th[aria-sort] .tt-sort { color: var(--bs-primary-text-emphasis); }
.tt th[aria-sort] .tt-sort .bi { opacity: 1; }
.tt td { vertical-align: middle; padding-block: .5rem; }
.tt.dense td { padding-block: .25rem; }
.tt.dense .tt-sub { display: none; }
.tt tbody tr.tt-row { cursor: pointer; }
.tt tbody tr.tt-row > td:first-child { box-shadow: inset 3px 0 0 var(--pc); }
:root[dir="rtl"] .tt tbody tr.tt-row > td:first-child { box-shadow: inset -3px 0 0 var(--pc); }
.tt tbody tr.tt-row:hover > * { --bs-table-bg-state: var(--accent-soft); }
.tt tbody tr.is-late > * { --bs-table-bg-state: color-mix(in srgb, var(--bs-danger) 6%, var(--card)); }
.tt tbody tr.is-run > * { --bs-table-bg-state: color-mix(in srgb, var(--bs-primary) 6%, var(--card)); }
.tt tbody tr.is-sel > * { --bs-table-bg-state: color-mix(in srgb, var(--bs-primary) 12%, var(--card)); }
.tt-c-sel { width: 2.4rem; text-align: center; }
.tt-c-id { width: 3.4rem; color: var(--muted); }
.tt-c-task { min-width: 15rem; }
.tt-c-sec { min-width: 12rem; }
.tt-c-obj { min-width: 14rem; }
.tt-c-tools { width: 6.5rem; white-space: nowrap; text-align: end; }
.tt-name { display: flex; align-items: center; gap: .45rem; font-weight: 600; color: var(--ink); }
.tt-name .nm { overflow-wrap: anywhere; }
.tt-sub { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .5rem; margin-top: .2rem; font-size: .76rem; }
.tt-act { display: inline-flex; align-items: center; border-radius: 999px; padding: .05rem .5rem; font-weight: 600; font-size: .76rem; background: color-mix(in srgb, var(--ac) 13%, transparent); color: color-mix(in srgb, var(--ac) 75%, var(--ink)); white-space: nowrap; }
.tt-proj { display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; color: color-mix(in srgb, var(--pc) 75%, var(--ink)); white-space: nowrap; }
.tt-proj::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: var(--pc); }
.tt-path { font-size: .8rem; color: var(--muted); overflow-wrap: anywhere; }
.tt-obj { display: inline-flex; align-items: center; gap: .35rem; font-size: .82rem; font-weight: 600; color: var(--ink); white-space: nowrap; }
.tt-obj .bi { color: var(--muted); flex: none; }
.tt-who { display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; }
.tt-st .st-btn, .tt-st .st-ro { border: 1px solid color-mix(in srgb, var(--sc) 35%, transparent); background: color-mix(in srgb, var(--sc) 12%, transparent); color: color-mix(in srgb, var(--sc) 75%, var(--ink)); border-radius: 999px; padding: .15rem .6rem; font-size: .8rem; font-weight: 600; }
.tt-st .st-btn:hover, .tt-st .st-btn[aria-expanded="true"] { background: color-mix(in srgb, var(--sc) 20%, transparent); }
.tt-due { white-space: nowrap; }
.tt-rel { display: inline-block; margin-inline-start: .35rem; font-size: .7rem; font-weight: 700; border-radius: .35rem; padding: .05rem .35rem; }
.tt-rel.late { background: color-mix(in srgb, var(--bs-danger) 14%, transparent); color: var(--bs-danger-text-emphasis); }
.tt-rel.today { background: color-mix(in srgb, #d97706 16%, transparent); color: color-mix(in srgb, #d97706 80%, var(--ink)); }
.tt-rel.soon { background: var(--accent-soft); color: var(--bs-primary-text-emphasis); }
.tt-time { min-width: 6.5rem; }
.tt-time .bar { display: block; height: 4px; border-radius: 2px; background: var(--bs-secondary-bg); overflow: hidden; margin-top: .25rem; }
.tt-time .bar i { display: block; height: 100%; background: var(--bs-success); }
.tt-time.over { color: var(--bs-danger-text-emphasis); font-weight: 600; }
.tt-time.over .bar i { background: var(--bs-danger); }
.tt-q { border: 1px solid var(--line); background: var(--card); color: var(--muted); width: 1.9rem; height: 1.9rem; border-radius: .5rem; display: inline-grid; place-items: center; padding: 0; }
.tt-q:hover { color: var(--ink); border-color: var(--bs-primary-border-subtle); }
.tt-q.go { color: var(--bs-primary); }
.tt-q.done { color: var(--bs-success); }
.tt-grp > td { background: color-mix(in srgb, var(--gc) 7%, var(--card)) !important; font-weight: 700; color: var(--ink); padding-block: .45rem !important; }
.tt-gt { border: 0; background: none; padding: 0; display: inline-flex; align-items: center; gap: .45rem; font: inherit; color: inherit; }
.tt-gt > .bi { transition: transform .15s ease; font-size: .75rem; color: var(--muted); }
.tt-gt[aria-expanded="false"] > .bi { transform: rotate(90deg); }
:root[dir="rtl"] .tt-gt[aria-expanded="false"] > .bi { transform: rotate(-90deg); }
.tt-dot { width: .6rem; height: .6rem; border-radius: 50%; background: var(--gc); flex: none; }
.tt-gs { font-weight: 500; font-size: .8rem; color: var(--muted); margin-inline-start: .75rem; }
.tt-empty { padding: 2.5rem 1rem; text-align: center; color: var(--muted); }
.tt-bulk { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 4rem); z-index: 1020; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .5rem .75rem; border-radius: .8rem; background: var(--ink); color: var(--card); box-shadow: 0 10px 28px rgba(13, 22, 38, .22); }
.tt-bulk .form-select { width: auto; min-width: 10rem; }
.tt-pager { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: .85rem; color: var(--muted); }
#ttPanel { --bs-offcanvas-width: min(30rem, 100vw); --bs-offcanvas-bg: var(--card); }
.tt-dl { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: .45rem .75rem; margin: 0; font-size: .9rem; }
.tt-dl dt { color: var(--muted); font-weight: 500; }
.tt-dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.tt-tl { list-style: none; margin: 0; padding: 0; border-inline-start: 2px solid var(--line); }
.tt-tl li { position: relative; padding: 0 1rem .8rem; }
.tt-tl li::before { content: ""; position: absolute; inset-inline-start: -.42rem; top: .3rem; width: .7rem; height: .7rem; border-radius: 50%; background: var(--sc); box-shadow: 0 0 0 3px var(--card); }
.tt-tl .meta { font-size: .8rem; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .tt-gt > .bi { transition: none; } }
/* ---------- every card: the words clear and large (the number stays the largest, on the end side) ---------- */
.kpi .card-body { padding-block: .95rem !important; padding-inline-start: 1.1rem; }
.kpi .label, :root[dir="rtl"] .kpi .label { font-size: 1rem; font-weight: 600; color: var(--ink); gap: .6rem; letter-spacing: 0; text-transform: none; }
.kpi .label > .bi { width: 2.3rem; height: 2.3rem; font-size: 1.15rem; }
.kpi .card-body > .value { font-size: 2.4rem; }
.kpi .card-body > .fw-semibold { font-size: 1rem; }
.kpi .sub { font-size: .9rem; line-height: 1.5; color: color-mix(in srgb, var(--ink) 62%, var(--muted)); }
.rp-tile { padding: .75rem .9rem; }
.rp-tile .lbl { font-size: .95rem; font-weight: 600; color: var(--ink); }
.rp-tile .sub { font-size: .8rem; }
@media (max-width: 575.98px) {
  /* phones: two cards a row, so the number goes under the label, still on the end side */
  .kpi .card-body { grid-template-columns: minmax(0, 1fr); }
  .kpi .card-body > .value { grid-column: 1; grid-row: auto; font-size: 1.9rem; }
  .kpi .label, :root[dir="rtl"] .kpi .label { font-size: .95rem; }
  .kpi .sub { font-size: .82rem; }
}
/* the number beside the label, the notes and bars under both at full width; a narrow card puts the number under the label (still on the end side) */
.kpi { container-type: inline-size; }
.kpi .card-body > .value { grid-row: 1; }
.kpi .card-body > :not(.label):not(.value) { grid-column: 1 / -1; }
@container (max-width: 15.5rem) {
  .kpi .card-body { grid-template-columns: minmax(0, 1fr); }
  .kpi .card-body > .value { grid-column: 1; grid-row: auto; font-size: 2rem; }
}
.rp-tile .val { grid-row: 1; }
.rp-tile .sub { grid-column: 1 / -1; }
/* ---------- Tasks table: one table for the office and other tasks, then one for each project ---------- */
.tt-sec { border: 1px solid var(--line); border-top: 3px solid var(--pc); border-radius: .9rem; background: var(--card); box-shadow: var(--shadow); overflow: hidden; }
.tt-sec-head { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .75rem; padding: .65rem .9rem; background: color-mix(in srgb, var(--pc) 7%, var(--card)); }
.tt-sec-toggle { border: 0; background: none; padding: .1rem .25rem; border-radius: .4rem; color: var(--muted); line-height: 1; }
.tt-sec-toggle:hover { background: var(--bs-secondary-bg); }
.tt-sec-toggle .bi { display: inline-block; transition: transform .15s ease; }
.tt-sec-toggle[aria-expanded="false"] .bi { transform: rotate(90deg); }
:root[dir="rtl"] .tt-sec-toggle[aria-expanded="false"] .bi { transform: rotate(-90deg); }
.tt-sec-ic { width: 2rem; height: 2rem; border-radius: .6rem; display: inline-grid; place-items: center; background: color-mix(in srgb, var(--pc) 16%, transparent); color: var(--pc); flex: none; }
.tt-sec-name { font-size: 1.05rem; font-weight: 700; color: color-mix(in srgb, var(--pc) 75%, var(--ink)); }
.tt-sec-sum { margin-inline-start: auto; display: flex; flex-wrap: wrap; gap: .25rem .9rem; font-size: .85rem; color: var(--muted); }
.tt-sec-sum b { color: var(--ink); }
.tt-sec-sum .late b { color: var(--bs-danger-text-emphasis); }
.tt-sec .tt-wrap { border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; max-height: calc(100vh - 9rem); }
.tt-sec .tt-empty { padding: 1rem; border-top: 1px solid var(--line); }
.tt.tt-p { min-width: 1400px; }   /* a project table has the section path and the object name */
.tt-more { padding: .45rem .9rem; border-top: 1px solid var(--line); text-align: center; }
@media (prefers-reduced-motion: reduce) { .tt-sec-toggle .bi { transition: none; } }
/* ---------- Overview > My day > Next up: the project beside the name, the section path and the object name under them ---------- */
.nx-line { display: flex; flex-wrap: wrap; align-items: center; gap: .15rem .6rem; }
.nx-name { font-weight: 600; overflow-wrap: anywhere; }
.nx-proj { font-size: .78rem; }
.nx-path { display: flex; flex-wrap: wrap; align-items: center; gap: .1rem .6rem; margin-top: .15rem; font-size: .78rem; color: var(--muted); }
.nx-path .nx-proj { margin-inline-end: .3rem; }   /* a small gap after the project */
.nx-sec { overflow-wrap: anywhere; }
.nx-obj { display: inline-flex; align-items: center; gap: .3rem; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.nx-obj .bi { color: var(--muted); }
/* ---------- number cards, the final layout (2026-10-27): a wrapping row, so the number can never cover the words.
   The label sits on the start side and the number on the end side while both fit; when they do not, the number moves under
   the label (still on the end side). Notes, bars and trends take a full line under them. ---------- */
.kpi .card-body { display: flex !important; flex-direction: row !important; flex-wrap: wrap; align-items: center; align-content: flex-start; column-gap: .9rem !important; row-gap: .3rem !important; }
.kpi .card-body > * { flex: 0 0 100%; }
.kpi .card-body > .label { flex: 1 1 6.5rem; min-width: auto; }
.kpi .card-body > .value { flex: 0 0 auto; margin-inline-start: auto; text-align: end; }
.rp-tile { display: flex; flex-wrap: wrap; align-items: center; column-gap: .75rem; }
.rp-tile > * { flex: 0 0 100%; }
.rp-tile .lbl { flex: 1 1 5.5rem; }
.rp-tile .val { flex: 0 0 auto; margin-inline-start: auto; }
/* ---------- windows: a colour for each kind (--mc), its icon in the header, clear labels, a mark on required fields,
   sections in the task window, the save button in the window's colour ---------- */
.mdl { --mc: var(--accent); overflow: hidden; }
#frmUser { --mc: #16a34a; }
#frmRole { --mc: #4f46e5; }
#frmItem { --mc: #d97706; }
#frmObject { --mc: #7c3aed; }
#frmPw { --mc: #0891b2; }
.mdl.mdl-danger { --mc: #dc2626; }
.mdl > .modal-header { gap: .7rem; padding: .9rem 1.15rem; background: linear-gradient(180deg, color-mix(in srgb, var(--mc) 13%, var(--card)), color-mix(in srgb, var(--mc) 4%, var(--card)));
  border-bottom: 1px solid color-mix(in srgb, var(--mc) 22%, var(--line)); box-shadow: inset 0 4px 0 var(--mc); }
.mdl > .modal-header .modal-title { color: color-mix(in srgb, var(--mc) 50%, var(--ink)); }
.mdl-ic { width: 2.4rem; height: 2.4rem; border-radius: .75rem; display: inline-grid; place-items: center; flex: none; background: color-mix(in srgb, var(--mc) 16%, transparent); color: var(--mc); font-size: 1.2rem; }
.mdl > .modal-body { background: color-mix(in srgb, var(--mc) 2.5%, var(--card)); padding: 1.15rem; }
.mdl .form-label { font-size: .86rem; font-weight: 600; color: var(--ink); }
.mdl .form-label.req::after { content: " *"; color: var(--bs-danger); font-weight: 700; }
.mdl .form-control, .mdl .form-select { background-color: var(--card); }
.mdl .form-control[readonly] { background-color: var(--bs-tertiary-bg); color: var(--muted); }
.mdl .form-control:focus, .mdl .form-select:focus { border-color: color-mix(in srgb, var(--mc) 55%, var(--line)); box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--mc) 18%, transparent); }
.mdl .form-check-input:checked { background-color: var(--mc); border-color: var(--mc); }
.mdl .form-text { color: var(--muted); }
.mdl-sep { display: flex; align-items: center; gap: .5rem; margin: .4rem 0 -.25rem; font-size: .82rem; font-weight: 700; color: color-mix(in srgb, var(--mc) 65%, var(--ink)); }
.mdl-sep::after { content: ""; flex: 1; height: 1px; background: color-mix(in srgb, var(--mc) 25%, var(--line)); }
.mdl-sep .bi { color: var(--mc); }
h4.mdl-sep { margin-top: .25rem; }
.mdl .nav-tabs .nav-link.active, .mdl .nav-tabs .nav-link.active:hover { color: var(--mc); border-bottom-color: var(--mc); }
.mdl .times-panel { background: color-mix(in srgb, var(--mc) 6%, var(--card)); border-color: color-mix(in srgb, var(--mc) 22%, var(--line)) !important; }
.mdl thead.app-head th { background: color-mix(in srgb, var(--mc) 8%, var(--card)) !important; }
.mdl > .modal-footer { background: var(--bs-tertiary-bg); padding: .75rem 1.15rem; gap: .5rem; }
.mdl > .modal-footer .btn { min-width: 6.5rem; }
.mdl > .modal-footer .btn-primary { --bs-btn-bg: var(--mc); --bs-btn-border-color: var(--mc); --bs-btn-hover-bg: color-mix(in srgb, var(--mc) 85%, #000); --bs-btn-hover-border-color: color-mix(in srgb, var(--mc) 85%, #000);
  --bs-btn-active-bg: color-mix(in srgb, var(--mc) 78%, #000); --bs-btn-active-border-color: color-mix(in srgb, var(--mc) 78%, #000); --bs-btn-disabled-bg: var(--mc); --bs-btn-disabled-border-color: var(--mc); }
.mdl > .modal-footer .btn-primary::before, .mdl > .modal-footer .btn-success::before { content: "\f272"; font-family: "bootstrap-icons"; margin-inline-end: .35rem; vertical-align: -.125em; }
.mdl > .modal-footer .btn-danger::before { content: "\f5de"; font-family: "bootstrap-icons"; margin-inline-end: .35rem; vertical-align: -.125em; }
.mdl.mdl-danger > .modal-body { font-size: .95rem; line-height: 1.6; }
#objModal .modal-body #grpObjParent { background: color-mix(in srgb, var(--mc) 7%, var(--card)); border: 1px dashed color-mix(in srgb, var(--mc) 30%, var(--line)); border-radius: .6rem; padding: .45rem .65rem; }
