
/* Approved light palette and shared charcoal dark theme. */
html.ap-design-active {
  --primary:#174BFF; --primary-hover:#0635DA; --blue:#347BFA; --green:#05B98D; --red:#EF334D; --amber:#E9A400; --purple:#7F42E9;
  --bg:#101827; --surface:#172237; --bg-elev:#172237; --surface-2:#1F2D46; --text:#EDF3FF; --muted:#A9B8D2; --border:#30415C; --pill-bg:#24334E;
  --bg-primary-light:#21355C; --bg-success-light:#173D36; --bg-warning-light:#44371D; --bg-danger-light:#482636;
  --tb-grad-start:var(--surface); --tb-grad-end:var(--surface); --tb-fg:var(--text); --tb-muted:var(--muted); --tb-field-bg:var(--surface); --tb-field-bd:var(--border);
  --ap-panel-shadow:0 2px 5px rgb(0 0 0 / .05); --ap-ink-on-fill:#FFFFFF; --ap-nav-bg:var(--surface);
}
html.ap-design-active.light-mode {
  --bg:#F7F9FD; --surface:#FFFFFF; --bg-elev:#FFFFFF; --surface-2:#F1F5FB; --text:#101B3F; --muted:#52658B; --border:#E1E8F3; --pill-bg:#EAF0F8;
  --bg-primary-light:#EBF2FF; --bg-success-light:#E7F8EF; --bg-warning-light:#FFF4D9; --bg-danger-light:#FFF0F3;
  --ap-panel-shadow:0 2px 5px rgb(40 66 110 / .025); --ap-nav-bg:#FFFFFF;
}
html:not(.light-mode), html.ap-design-active:not(.light-mode) {
  --bg:#121212; --surface:#1B1B1B; --bg-elev:#1B1B1B; --surface-2:#252525;
  --text:#E0E0E0; --muted:#B0B0B0; --border:#444444; --pill-bg:#292929;
  --primary:#888888; --primary-hover:#AAAAAA; --on-primary:#121212;
  --blue:#5C95FF; --green:#05C9A1; --red:#FF6B70; --amber:#F4BB40;
  --bg-primary-light:#2B2B2B; --bg-info-light:#1F2D45;
  --bg-success-light:#143A30; --bg-warning-light:#3B3018; --bg-danger-light:#3D2326;
  --tb-grad-start:#171717; --tb-grad-end:#171717; --tb-fg:var(--text); --tb-muted:var(--muted);
  --tb-field-bg:#252525; --tb-field-bd:#444444; --tb-divider:#444444;
  --bg-card:#202020; --bg-card-2:#252525;
  --ap-panel-shadow:0 2px 6px rgb(0 0 0 / .12);
}
html:not(.light-mode) :is(#addBtn,.btn-primary,.btn-add-pill,.cal-view-btn.is-active,.proj-view-btn.active,.todo-quickadd button,.md-add-row button,.pf-submit),
html.ap-design-active:not(.light-mode) :is(#addBtn,.btn-primary,.cal-view-btn.is-active),
html.ap-design-active:not(.light-mode) .ap-week-date.is-today strong {
  background:var(--primary); color:var(--on-primary); border-color:var(--primary);
}
.ap-icon { width:20px; height:20px; display:inline-block; flex:0 0 20px; vertical-align:middle; }
[data-ap-icon] { display:inline-flex; align-items:center; justify-content:center; flex-shrink:0; }
.ap-section-title { display:flex; align-items:center; gap:10px; }
.ap-section-title > .ap-icon, .ap-section-title [data-ap-icon] { color:var(--primary); }
.ap-overview-side > .card:first-child .ap-section-title [data-ap-icon] { color:var(--red); }
.ap-design-active body { font-family:Inter,"Noto Sans Thai","Leelawadee UI",system-ui,sans-serif; font-size:14px; }
/* Branding and navigation are shared by every menu; page palettes stay scoped. */
html[data-nav-variant=b] .variant-sidebar {
  --primary:#888888; --surface:#171717; --surface-2:#252525;
  --text:#E0E0E0; --muted:#B0B0B0; --border:#444444; --bg-primary-light:#2B2B2B;
  background:var(--surface); border-color:var(--border); padding:12px;
}
html[data-nav-variant=b].light-mode .variant-sidebar {
  --primary:#174BFF; --surface:#FFFFFF; --surface-2:#F1F5FB;
  --text:#101B3F; --muted:#52658B; --border:#E1E8F3; --bg-primary-light:#EBF2FF;
}
html[data-nav-variant=b] .variant-sidebar-head { height:44px; margin-bottom:14px; }
html[data-nav-variant=b] .variant-sidebar-brand { font-size:22px; font-weight:750; letter-spacing:-.025em; padding:0 10px; gap:10px; color:var(--text); }
html[data-nav-variant=b] .variant-sidebar-brand > img.nav-brand-symbol { width:30px; flex-basis:30px; }
html[data-nav-variant=b] .nav-brand-label small { display:none; }
html[data-nav-variant=b] .variant-nav-caption { text-transform:uppercase; font-size:11px; font-weight:500; margin:16px 10px 10px; color:var(--muted); }
html[data-nav-variant=b] .variant-tenant { padding:0 10px; margin:0 0 18px; }
html[data-nav-variant=b] .variant-tenant .variant-nav-caption { margin:0 0 8px; }
html[data-nav-variant=b] .tenant-switcher-btn { height:40px; background:var(--surface); border:1px solid var(--border); color:var(--text); gap:10px; font-size:13px; padding:0 10px; }
.ap-tenant-symbol { display:none; }
html[data-nav-variant=b] .tenant-switcher-mark { font-size:0; }
html[data-nav-variant=b] .ap-tenant-symbol { display:block; width:18px; height:18px; object-fit:contain; }
html[data-nav-variant=b] .ap-tenant-role { display:none; }
html[data-nav-variant=b] .tenant-switcher-btn::after { content:""; width:6px; height:6px; border-right:1.5px solid var(--muted); border-bottom:1.5px solid var(--muted); transform:rotate(45deg); margin:0 2px 3px auto; }
html[data-nav-variant=b] .variant-sidebar .subtabs { gap:4px; }
html[data-nav-variant=b] .variant-sidebar .subtab { font-size:13px; font-weight:400; height:44px; padding:10px 12px; color:var(--muted); gap:12px; border-radius:6px; }
html[data-nav-variant=b] .variant-sidebar .subtab.active { color:var(--primary); font-weight:600; background:var(--bg-primary-light); box-shadow:inset 3px 0 var(--primary); }
html[data-nav-variant=b] .nav-menu-icon { width:19px; height:19px; flex-basis:19px; stroke-width:1.7; }
html[data-nav-variant=b] .variant-sidebar-footer { border-top:0; padding-top:8px; }
.ap-sidebar-account { display:none; }
html[data-nav-variant=b] .ap-sidebar-account { display:flex; flex-direction:column; gap:12px; }
html[data-nav-variant=b] .variant-nav-toggle { min-height:28px; width:28px; padding:4px; margin:6px 0 0 auto; background:none; color:var(--muted); border-color:transparent; }
html[data-nav-variant=b] .variant-nav-toggle .nav-toggle-label { display:none; }
.ap-settings-link,.ap-account-link { display:flex; align-items:center; gap:12px; border:0; background:none; color:var(--muted); text-align:left; padding:6px 12px; cursor:pointer; font:inherit; min-height:40px; }
.ap-account-link > .ap-icon { width:14px; height:14px; flex-basis:14px; margin-left:auto; }
.ap-account-avatar { width:32px; height:32px; border-radius:50%; display:inline-flex; justify-content:center; align-items:center; color:white; font-weight:600; flex:0 0 32px; background:linear-gradient(135deg,#7743ED,#A922C6); }
html[data-nav-variant=b] .ap-sidebar-menu { position:fixed; top:auto; bottom:92px; left:20px; right:auto; width:200px; z-index:60; }
html.ap-design-active .variant-workspace > .topbar { width:100%; min-height:64px; margin:0; padding:10px 24px; border:0; border-bottom:1px solid var(--border); border-radius:0; background:var(--surface); box-shadow:none; flex-wrap:nowrap; }
.ap-workspace-title { font-size:16px; font-weight:700; color:var(--text); white-space:nowrap; flex:0 0 auto; }
html.ap-design-active .variant-workspace .header-controls { width:auto; flex:1 1 auto; min-width:0; gap:10px; justify-content:flex-end; font-size:13px; flex-wrap:nowrap; }
html.ap-design-active .search-wrap { width:340px; flex:0 1 340px; max-width:400px; min-width:140px; height:40px; background:var(--surface); border:1px solid var(--border); padding:0 12px; border-radius:6px; }
html.ap-design-active .search-wrap input { font-size:13px; color:var(--text); }
html.ap-design-active .search-wrap input::placeholder { color:var(--muted); }
html.ap-design-active .filter-select { height:40px; background-color:var(--surface); border:1px solid var(--border); border-radius:6px; color:var(--text); padding:8px 12px; font-size:13px; }
html.ap-design-active .btn-refresh-pill,html.ap-design-active .btn-theme-pill { height:40px; min-width:104px; padding:8px 12px; display:inline-flex; gap:8px; justify-content:center; align-items:center; border:1px solid var(--border); border-radius:6px; background:var(--surface); color:var(--text); font-size:13px; }
html.ap-design-active .btn-theme-pill { width:auto; min-width:116px; }
html.ap-design-active #addBtn { height:40px; min-width:136px; border-radius:6px; padding:8px 18px; gap:6px; background:var(--primary); color:white; font-size:13px; box-shadow:none; }
.ap-add-task-label,.ap-theme-label { display:none; }
html.ap-design-active .ap-add-task-label { display:inline; margin-left:0; }
html.ap-design-active .btn-theme-pill[data-mode=light] .ap-dark-label,html.ap-design-active .btn-theme-pill[data-mode=dark] .ap-light-label { display:inline; white-space:nowrap; }
html.ap-design-active .user-trigger { border:0; padding:0; background:none; }
html.ap-design-active .user-trigger .user-name,html.ap-design-active .user-trigger > svg { display:none; }
html.ap-design-active .user-avatar { width:36px; height:36px; background:linear-gradient(135deg,#7743ED,#A922C6); box-shadow:none; font-size:15px; }
html.ap-design-active .variant-workspace > .main { width:calc(100% - 48px); margin-top:12px; }
html.ap-design-active .variant-workspace #view-ot,html.ap-design-active .variant-workspace #view-masterdata { max-width:none; }
html.ap-design-active button { transition:background-color .16s ease,border-color .16s ease,box-shadow .16s ease; }
html.ap-design-active .btn-primary { background:var(--primary); color:white; border:1px solid var(--primary); border-radius:6px; box-shadow:none; padding:10px 14px; font-weight:500; }
html.ap-design-active .btn-primary:hover,html.ap-design-active #addBtn:hover { background:var(--primary-hover); }
html.ap-design-active .ap-secondary:hover,html.ap-design-active .btn-refresh-pill:hover { background:var(--bg-primary-light); border-color:var(--primary); }
html[data-nav-variant=b] .ap-settings-link:hover,html[data-nav-variant=b] .ap-account-link:hover { color:var(--primary); }
html[data-nav-variant=b] .nav-is-collapsed .ap-sidebar-account { display:none; }
html[data-nav-variant=b].nav-is-collapsed .ap-sidebar-account span:not(.ap-account-avatar),html[data-nav-variant=b].nav-is-collapsed .ap-account-link > .ap-icon { display:none; }
html[data-nav-variant=b].nav-is-collapsed .ap-settings-link,html[data-nav-variant=b].nav-is-collapsed .ap-account-link { padding:4px; justify-content:center; }
html[data-nav-variant=b].nav-is-collapsed .ap-settings-link .ap-icon { display:block; }
html[data-nav-variant=b].nav-is-collapsed .variant-sidebar .subtab { padding-inline:0; }

/* Approved mockup visual system. Scoped to the four selected menus. */
.ap-page-head { margin-bottom: 8px; }
.ap-page-head h2 { margin: 0 0 4px; font-size: 32px; font-weight: 700; line-height: 1.2; letter-spacing: -.035em; }
.ap-page-head p { margin: 0; color: var(--muted); }
.ap-panel { min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--ap-panel-shadow); }
.ap-panel h3, #view-overview .card h3 { margin: 0 0 8px; font-size: 16px; font-weight: 650; letter-spacing: -.015em; }
.ap-empty { padding: 24px 16px; text-align: center; }
.ap-done { background: var(--green); }
.ap-progress { background: var(--blue); }
.ap-pending { background: var(--amber); }
.ap-danger { background: var(--red); }
.ap-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 11px; color: var(--muted); margin: 8px 0 12px; }
.ap-legend span { display: inline-flex; align-items: center; gap: 5px; }
.ap-legend i, .ap-status-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: 0 0 9px; }
.ap-avatar { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; justify-content: center; align-items: center; flex-shrink: 0; color: var(--text); background: var(--bg-primary-light); font-size: 11px; font-weight: 650; }
.ap-overview-main { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(300px, 1fr); gap: 12px; margin: 12px 0; }
.ap-chart-pair { min-height: 340px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; min-width: 0; }
#view-overview .card { padding: 16px 20px; border-radius: 8px; box-shadow: var(--ap-panel-shadow); }
#view-overview .ap-chart-pair > .card > p { margin: 0; font-size: 12px; }
.ap-overview-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ap-overview-side > .card:last-child { margin-top: 0; }
.ap-load-list, .ap-client-panel .bar-list { display: flex; flex-direction: column; gap: 10px; }
.ap-client-panel .bar-list { margin-top: 28px; }
.ap-load-row { display: grid; grid-template-columns: minmax(42px, 60px) minmax(0, 1fr) 28px; gap: 8px; align-items: center; font-size: 13px; }
.ap-load-row > span { overflow: hidden; text-overflow: ellipsis; }
.ap-load-row strong { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.ap-load-track { display: flex; height: 15px; background: var(--pill-bg); border-radius: 3px; overflow: hidden; }
.ap-load-track i { display: block; height: 100%; }
#view-overview .ap-client-panel .bar-row { grid-template-columns: minmax(40px, 68px) minmax(0, 1fr) 28px; font-size: 12px; }
#view-overview .ap-client-panel .bar-fill { background: var(--primary) !important; }
#view-overview .ap-client-panel .bar-track { height: 14px; }
#view-overview .ap-client-panel .bar-list { max-height: 300px; overflow: auto; }
#view-overview .kpi-tile { border: 1px solid var(--border); border-radius: 7px; box-shadow: none; padding: 12px 16px; display: flex; gap: 16px; align-items: center; min-height: 96px; }
#view-overview .kpi-head { text-transform: none; letter-spacing: 0; }
#view-overview .kpi-value { font-size: 26px; margin: 0 0 3px; color: var(--text); line-height: 1.15; }
.ap-overview-bottom { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(300px, 1fr); gap: 12px; margin-bottom: 12px; }
.ap-overview-bottom > .card { min-width: 0; min-height: 266px; }
.ap-overview-bottom .recent-task-row { padding-block: 9px; }
.ap-overview-bottom .ap-my-tasks td { padding: 4px 10px; font-size: 12px; vertical-align: middle; }
.ap-overview-bottom .ap-my-tasks th { padding: 10px; }
.ap-overview-bottom .ap-my-tasks td:first-child { width: 45%; }
.ap-overview-bottom .recent-row { padding-block: 10px; }
.ap-overview-leave { margin-bottom: 12px; }
.ap-side-head { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 6px; }
.ap-side-head h3 { margin-right: auto !important; }
.ap-overview-leave .leave-log { max-height: 190px; overflow: auto; }
.ap-legacy-charts { color: var(--muted); margin-block: 16px; }
.ap-legacy-charts summary { cursor: pointer; padding-block: 8px; }
.ap-status-track { display: flex; height: 27px; overflow: hidden; border-radius: 4px; background: var(--pill-bg); margin-top: 14px; }
.ap-status-track span { display: flex; justify-content: center; align-items: center; color: var(--bg); font-size: 12px; font-weight: 600; min-width: 0; }
html.light-mode .ap-status-track span { color: var(--text); }
.ap-status-legend { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 11px; margin-top: 10px; }
.ap-status-legend > span { display: grid; grid-template-columns: 9px 1fr; align-items: center; gap: 3px 5px; }
.ap-status-legend strong { grid-column: 2; font-weight: 500; color: var(--muted); }
.ap-tabs { display: flex; flex-wrap: wrap; gap: 12px; padding-inline: 16px; border-bottom: 1px solid var(--border); }
.ap-tabs button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 13px 4px; cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 600; }
.ap-tabs button[aria-pressed=true] { border-bottom-color: var(--primary); color: var(--primary); }
.ap-tabs button span { display: inline-block; margin-left: 6px; padding: 0 6px; background: var(--pill-bg); border-radius: 10px; }
.ap-attention-list { max-height: 116px; overflow: auto; }
.ap-attention-task { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; border: 0; border-left: 3px solid var(--red); position: relative; background: none; color: var(--text); cursor: pointer; padding: 2px 28px 2px 10px; margin-top: 6px; font-size: 13px; }
.ap-attention-task span { color: var(--muted); font-size: 12px; line-height:16px; }
.ap-text-button { border: 0; background: none; color: var(--text); text-decoration: none; cursor: pointer; padding: 6px 0 0; font-size: 12px; line-height:18px; }
.ap-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 6px; padding: 8px 12px; cursor: pointer; min-height: 38px; }
.ap-metric-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: 12px; background: var(--surface); margin-bottom: 20px; }
.ap-metric-strip > div { display: flex; align-items: center; gap: 20px; padding: 20px 26px; }
.ap-metric-strip > div + div { border-left: 1px solid var(--border); }
.ap-metric-strip strong { font-size: 28px; line-height: 1.2; }
.ap-metric-strip small { color: var(--muted); }
.ap-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.ap-table-scroll { position: relative; overflow: auto; }
.ap-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ap-table th { text-align: left; padding: 14px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--border); font-weight: 600; }
.ap-table td { padding: 16px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.ap-table small { display: block; color: var(--muted); margin-top: 5px; font-size: 11px; }
.ap-selected { background: var(--bg-primary-light); }
.ap-row-open { all: unset; display: block; color: var(--text); font-weight: 600; cursor: pointer; overflow-wrap: anywhere; }
.ap-person { display: inline-flex; gap: 6px; align-items: center; padding: 2px 0; font-size: 12px; white-space: nowrap; }
.ap-person + .ap-person { margin-left: 5px; }
.ap-nowrap { white-space: nowrap; }
.ap-detail, .ap-agenda { padding: 20px; }
.ap-detail h4 { font-size: 16px; line-height: 1.5; margin-block: 20px; }
.ap-status-note { display: block; border-radius: 6px; padding: 12px; background: var(--surface-2); color: var(--text); }
.ap-detail dl { display: grid; grid-template-columns: 90px minmax(0, 1fr); font-size: 13px; margin: 0; }
.ap-detail dt, .ap-detail dd { padding: 12px 0; margin: 0; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.ap-detail dt { color: var(--muted); }
.ap-detail-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
#view-masterdata .md-head { align-items: baseline; flex-direction: row; gap: 12px; }
.ap-master-layout { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 16px; }
.ap-master-nav { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; }
.ap-master-nav button { display: flex; gap: 8px; justify-content: space-between; padding: 12px; background: none; border: 1px solid transparent; border-radius: 6px; color: var(--muted); text-align: left; cursor: pointer; font-weight: 600; }
.ap-master-nav button[aria-pressed=true] { background: var(--bg-primary-light); color: var(--primary); border-color: transparent; }
.ap-master-nav p { font-size: 12px; padding: 0 12px; }
#view-masterdata .md-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr); gap: 16px; }
#view-masterdata[data-md-active=work_types] .md-grid { grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr); }

#view-masterdata .md-card { min-width: 0; padding: 20px; border-radius: 8px; box-shadow: var(--ap-panel-shadow); }
.ap-master-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.ap-master-tools input { min-width: 100px; flex: 1; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 10px; }
#view-masterdata .md-list { max-height: 620px; overflow: auto; }
#view-masterdata .md-row { border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: none; padding: 7px 4px; min-height: 44px; }
#view-masterdata .md-row[hidden], #view-masterdata [data-md-create-wrap][hidden], #view-masterdata button[hidden] { display: none !important; }
#view-calendar .cal-head { align-items: flex-start; gap: 16px; }
#view-calendar .ap-page-head { margin-bottom: 0; }
.ap-week-toolbar { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.ap-week-toolbar > div:first-child { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.ap-week-toolbar strong { margin-left: 8px; font-size: 14px; }
.ap-week-toolbar .ap-legend { margin: 0; }
.ap-calendar-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; align-items: start; }
.ap-week-scroll { overflow: auto; max-height: 680px; }
.ap-week-grid { display: grid; grid-template-columns: 145px repeat(7, minmax(94px, 1fr)); min-width: 803px; }
.ap-week-corner { padding: 18px 12px; color: var(--muted); font-size: 12px; }
.ap-week-date { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 0; border-left: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 14px 6px; cursor: pointer; }
.ap-week-date[aria-pressed=true] { box-shadow: inset 0 -3px var(--primary); }
.ap-week-date.is-today, .ap-week-cell.is-today { background: var(--bg-primary-light); }
.ap-week-date span, .ap-week-date small { color: var(--muted); font-size: 11px; }
.ap-week-date strong { font-size: 12px; }
.ap-week-owner { display: flex; align-items: center; gap: 8px; padding: 14px 10px; border-top: 1px solid var(--border); font-size: 12px; overflow-wrap: anywhere; }
.ap-week-owner small { display: block; margin-top: 3px; color: var(--muted); }
.ap-week-cell { border-left: 1px solid var(--border); border-top: 1px solid var(--border); min-height: 95px; padding: 5px; }
.ap-week-task { display: block; width: 100%; background: var(--bg-primary-light); color: var(--text); border: 0; border-left: 3px solid var(--blue); border-radius: 4px; padding: 7px; text-align: left; cursor: pointer; margin-bottom: 5px; overflow-wrap: anywhere; }
.ap-week-task strong { font-size: 11px; line-height: 1.5; font-weight: 500; }
.ap-week-task small { display: block; color: var(--muted); font-size: 10px; line-height: 1.5; margin-top: 4px; }
.ap-week-overdue { border-left-color: var(--red); background: var(--bg-danger-light); }
.ap-week-pending { border-left-color: var(--amber); background: var(--bg-warning-light); }
.ap-week-done { border-left-color: var(--green); background: var(--bg-success-light); }
.ap-agenda h4 { font-size: 13px; margin: 18px 0 8px; }
.ap-agenda .ap-week-task { padding: 10px; }
.ap-agenda .ap-week-task strong { font-size: 13px; }
.ap-agenda .ap-week-task small { font-size: 11px; }
.ap-row-open:focus-visible, .ap-master-nav button:focus-visible, .ap-week-task:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
@media(max-width:1440px) {
  .ap-overview-main, .ap-overview-bottom { grid-template-columns: minmax(0, 1.8fr) minmax(270px, 1fr); }
  .ap-detail-grid { grid-template-columns: minmax(0, 1fr) 310px; }
  .ap-calendar-grid { grid-template-columns: minmax(0, 1fr) 290px; }
  .ap-master-layout { grid-template-columns: 140px minmax(0, 1fr); }
  #view-masterdata .md-grid { grid-template-columns: minmax(0, 1fr) minmax(230px, .8fr); }
}
@media(max-width:1100px) {
  .variant-workspace > .topbar { flex-wrap:wrap; }
  html.ap-design-active .variant-workspace > .topbar { flex-wrap:wrap; }
  .ap-overview-main, .ap-overview-bottom, .ap-calendar-grid, .ap-detail-grid { grid-template-columns: minmax(0, 1fr); }
  .ap-overview-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ap-overview-side > .card:last-child { margin-top: 0; }
  .ap-master-layout { grid-template-columns: minmax(0, 1fr); }
  .ap-master-nav { flex-direction: row; flex-wrap: wrap; }
  .ap-master-nav p { display: none; }
}
@media(max-width:760px) {
  .ap-workspace-title { flex-basis:100%; font-size:15px; }
  html.ap-design-active .variant-workspace .header-controls { flex-basis:100%; }
  .ap-chart-pair, .ap-overview-side, #view-masterdata .md-grid, #view-masterdata[data-md-active=work_types] .md-grid { grid-template-columns: minmax(0, 1fr); }
  .ap-metric-strip > div { padding: 14px; }
  .ap-table { min-width: 650px; }
  .ap-detail, .ap-agenda, #view-overview .card { padding: 16px; }
  .ap-week-toolbar strong { margin: 8px 0 0; flex-basis: 100%; }
  .ap-page-head h2 { font-size: 24px; }
}

#view-overview .ap-overview-bottom .card-title { justify-content: flex-start; gap: 8px; }
#view-overview .ap-overview-bottom .recent-tasks-view-all { margin-left: auto; }
.ap-ot-pending { background: var(--bg-warning-light); color: var(--text); }
.ap-ot-approved { background: var(--bg-success-light); color: var(--text); }
.ap-week-grid .ap-week-task strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ap-week-grid .ap-week-task small { white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.ap-week-more { border: 0; background: none; color: var(--text); text-decoration: underline; cursor: pointer; padding: 6px; font-size: 11px; }


.ap-overview-heading { display:flex; justify-content:space-between; gap:16px; align-items:flex-start; }
.ap-sync-status { display:inline-flex; align-items:center; gap:8px; color:var(--muted); font-size:12px; white-space:nowrap; padding-top:8px; }
.ap-sync-status::before { content:""; width:8px; height:8px; background:var(--green); border:3px solid var(--bg-success-light); border-radius:50%; box-sizing:content-box; }
#view-overview .kpi-row { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:8px; margin:0; }
#view-overview .kpi-head { font-size:13px; font-weight:500; color:var(--text); padding:0; }
#view-overview .kpi-foot { font-size:10.5px; line-height:16px; white-space:nowrap; color:var(--muted); margin-top:4px; }
#view-overview .kpi-tile:nth-child(2) .kpi-foot { color:var(--red); }
#view-overview .kpi-tile:nth-child(3) .kpi-foot { color:var(--amber); }
.ap-kpi-symbol { display:flex; align-items:center; justify-content:center; width:48px; height:48px; flex:0 0 48px; border-radius:50%; color:var(--primary); background:var(--bg-primary-light); }
.ap-kpi-symbol > .ap-icon { width:23px; height:23px; }
.ap-kpi-red .ap-kpi-symbol { color:var(--red); background:var(--bg-danger-light); }
.ap-kpi-amber .ap-kpi-symbol { color:var(--amber); background:var(--bg-warning-light); }
.ap-kpi-green .ap-kpi-symbol { color:var(--green); background:var(--bg-success-light); }
.ap-kpi-copy { min-width:0; }
.ap-kpi-copy > .kpi-value { font-weight:700; }
#view-overview .card h3 { font-size:17px; font-weight:650; }
.ap-overview-side .card { padding:14px 18px !important; }
.ap-overview-side .ap-tabs { padding-inline:0; gap:18px; }
.ap-overview-side .ap-tabs button { padding:5px 4px; font-size:12px; line-height:18px; }
.ap-overview-side [data-attention=overdue][aria-pressed=true] { color:var(--red); border-color:var(--red); }
.ap-attention-task strong { font-weight:500; line-height:18px; }
.ap-attention-task > .ap-icon { position:absolute; right:0; top:12px; width:16px; height:16px; color:var(--muted); }
.ap-status-track { margin-top:10px; }
.ap-status-track .ap-done,.ap-status-track .ap-progress { color:white; }
.ap-status-track .ap-pending { color:var(--text); }
.ap-status-legend { font-size:11px; }
.ap-overview-bottom .card-title > .ct-icon { color:var(--primary); }
#view-overview .ap-my-tasks { min-width:570px; }
.ap-my-tasks thead { background:var(--surface-2); }
.ap-my-tasks th { color:var(--muted); font-weight:500; }
.ap-my-tasks .ap-avatar { width:24px; height:24px; background:var(--bg-primary-light); color:var(--primary); font-size:11px; }
.ap-my-tasks .ap-row-open { font-weight:500; font-size:13px; }
.ap-my-tasks .ap-person { font-size:12px; color:var(--muted); }
.ap-task-link { position:relative; padding-left:16px; }
.ap-task-link::before { content:""; position:absolute; left:0; top:0; bottom:0; width:3px; border-radius:2px; background:var(--blue); }
.ap-task-overdue::before { background:var(--red); }
.ap-task-pending::before { background:var(--amber); }
.ap-overdue-date { color:var(--red); }
.ap-activity-row { display:flex; gap:10px; padding:6px 0; border-bottom:1px solid var(--border); cursor:pointer; align-items:flex-start; }
.ap-activity-row:last-child { border-bottom:0; }
.ap-activity-row > div { flex:1; min-width:0; }
.ap-activity-row strong { display:block; color:var(--text); font-size:12px; line-height:16px; font-weight:500; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ap-activity-row small { display:block; color:var(--muted); font-size:11px; line-height:14px; margin-top:1px; }
.ap-activity-row time { font-size:11px; color:var(--muted); white-space:nowrap; }
.ap-activity-dot { flex:0 0 10px; height:10px; margin-top:4px; border-radius:50%; background:var(--green); }
.ap-activity-row:nth-child(2n) .ap-activity-dot { background:var(--blue); }
.ap-activity-row:nth-child(3n) .ap-activity-dot { background:var(--amber); }
.ap-activity-row:hover { background:var(--surface-2); }
#view-overview .ap-overview-leave { padding:10px 18px; }
.ap-overview-leave .ap-side-head { margin:0; padding-bottom:6px; }
.ap-overview-leave .ap-side-head h3 { font-size:14px !important; margin:0 !important; margin-right:auto !important; }
.ap-overview-leave .ap-side-head [data-ap-icon] { width:18px; }
.ap-overview-leave .ap-text-button { color:var(--primary); padding:0; font-size:12px; }
.ap-leave-strip { display:flex; overflow:auto; }
.ap-leave-strip > button { flex:1 0 130px; display:flex; flex-direction:column; text-align:left; border:0; border-right:1px solid var(--border); background:none; padding:6px 12px; cursor:pointer; color:var(--text); font-size:12px; }
.ap-leave-strip > button:last-child { border-right:0; }
.ap-leave-strip span { color:var(--muted); margin-top:3px; font-size:12px; }
.ap-icon-button { background:none; border:0; border-radius:4px; min-width:28px; height:28px; color:var(--primary); cursor:pointer; font-size:20px; }
.ap-metric-symbol { display:flex; justify-content:center; align-items:center; width:64px; height:64px; flex:0 0 64px; border-radius:50%; color:var(--primary); background:var(--bg-primary-light); }
.ap-metric-symbol .ap-icon { width:28px; height:28px; }
.ap-metric-symbol.ap-amber { color:var(--amber); background:var(--bg-warning-light); }
.ap-metric-symbol.ap-green { color:var(--green); background:var(--bg-success-light); }
.ap-metric-copy { display:flex; flex-direction:column; gap:4px; }
.ap-metric-copy > span { font-size:14px; font-weight:500; }
.ap-metric-copy strong { color:var(--text); font-size:30px; }
.ap-metric-copy small { font-size:12px; }
#view-ot .ot-head { align-items:center; flex-wrap:wrap; gap:4px 16px; margin-bottom:20px; }
#view-ot .ot-head h2 { font-size:32px; margin:0; line-height:1.2; }
#view-ot .ot-head > .spacer { display:none; }
#view-ot #otAddBtn { margin-left:auto; background:var(--primary); border-radius:6px; padding:10px 18px; min-height:40px; }
.ap-detail-grid { gap:16px; }
.ap-table thead { background:var(--surface-2); }
.ap-table .pill { border-radius:4px; padding:4px 9px; }
.ap-person .ap-avatar { color:var(--primary); }
.ap-status-note { display:flex; gap:10px; align-items:center; font-weight:500; }
.ap-status-note .ap-icon { width:26px; height:26px; flex-basis:26px; color:var(--amber); }
.ap-detail-actions .btn-primary { flex:1; }
.ap-master-nav button { justify-content:flex-start; align-items:center; font-size:13px; }
.ap-master-nav button [data-md-total] { margin-left:auto; padding:1px 8px; background:var(--surface); border-radius:10px; }
.ap-master-nav p { display:none; }
#view-masterdata .md-head { margin:0 0 20px; }
#view-masterdata .md-head h2 { font-size:30px; margin:0; }
#view-masterdata .md-card-head h3 { font-size:18px; font-weight:650; }
#view-masterdata .md-card-head .muted { font-size:13px; }
#view-masterdata .todo-icon { min-height:28px; height:28px; width:32px; padding:4px; display:inline-flex; align-items:center; justify-content:center; color:var(--muted); }
.ap-master-note { display:flex; gap:12px; margin-top:16px; background:var(--bg-primary-light); padding:14px; border-radius:6px; }
.ap-master-note > [data-ap-icon] { align-self:flex-start; color:var(--primary); }
.ap-master-note strong { font-size:12px; }
.ap-master-note p { font-size:12px; color:var(--muted); margin:5px 0 0; }
.ap-previous { transform:rotate(180deg); }
.ap-count-pill { background:var(--bg-primary-light); color:var(--primary); padding:4px 10px; border-radius:20px; font-size:12px; font-weight:600; white-space:nowrap; }
.ap-agenda-heading { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px; padding-bottom:16px; border-bottom:1px solid var(--border); }
.ap-agenda-heading h3 { font-size:15px; margin:0; }
.ap-agenda section h4 { display:flex; align-items:center; gap:8px; font-size:12px; background:var(--surface-2); padding:6px; border-radius:4px; }
.ap-agenda section h4 .muted { font-size:11px; margin-left:auto; }
.ap-agenda .ap-week-task { position:relative; padding-right:76px; border-left-width:0; border-bottom:1px solid var(--border); background:var(--surface); border-radius:0; }
.ap-week-status { position:absolute; top:12px; right:0; padding:3px 6px; border-radius:4px; font-size:10px; background:var(--bg-primary-light); color:var(--primary); }
.ap-week-status-overdue { background:var(--bg-danger-light); color:var(--red); }
.ap-week-status-pending { background:var(--bg-warning-light); color:var(--text); }
.ap-week-status-done { background:var(--bg-success-light); color:var(--text); }
.ap-week-date.is-today strong { background:var(--primary); border-radius:20px; padding:3px 7px; color:white; }
#view-calendar .cal-view-toggle { border-color:var(--border); background:var(--surface); }
#view-calendar .cal-view-btn { padding:8px 16px; color:var(--muted); font-size:12px; background:none; }
#view-calendar .cal-view-btn.is-active { background:var(--primary); color:white; border-radius:5px; }
#view-calendar #calWeekHost { border:0; background:none; padding:0; box-shadow:none; }
#view-calendar .cal-filter-summary { background:none; border:0; padding-right:10px; font-size:11px; }
@media(max-width:1440px) {
  #view-overview .kpi-tile { gap:10px; padding:12px; }
  .ap-kpi-symbol { width:40px; height:40px; flex-basis:40px; }
  #view-overview .kpi-foot { font-size:10px; overflow:hidden; text-overflow:ellipsis; }
}
@media(max-width:1100px) {
  #view-overview .kpi-row { grid-template-columns:repeat(3,minmax(0,1fr)); }
  html.ap-design-active .variant-workspace .header-controls { flex-wrap:wrap; }
  html.ap-design-active .search-wrap { max-width:none; flex:1 1 240px; }
}
@media(max-width:760px) {
  html.ap-design-active .variant-sidebar { padding:12px 8px; }
  html.ap-design-active .variant-workspace > .topbar { padding:12px; }
  html.ap-design-active .variant-workspace > .main { width:calc(100% - 24px); margin-top:18px; padding:0; }
  html.ap-design-active .variant-workspace .header-controls { gap:8px; }
  html.ap-design-active .search-wrap { width:100%; flex-basis:100%; min-width:0; }
  html.ap-design-active .filter-select { min-width:0; flex:1 1 40%; }
  html.ap-design-active #themeTopbarBtn { min-width:40px; width:40px; padding:8px; }
  html.ap-design-active .ap-theme-label { display:none !important; }
  html.ap-design-active #userMenuBtn { display:none; }
  html.ap-design-active .header-controls > .user-menu { display:contents; }
  html.ap-design-active #addBtn { min-width:115px; padding:8px 12px; }
  html.ap-design-active .btn-refresh-pill { min-width:96px; }
  html.ap-design-active .variant-sidebar-brand { padding:0; justify-content:center; }
  html.ap-design-active .variant-nav-caption { margin-inline:4px; }
  html.ap-design-active .variant-tenant { padding-inline:4px; }
  #view-overview .kpi-row { grid-template-columns:repeat(2,minmax(0,1fr)); }
  #view-overview .kpi-tile { gap:8px; padding:12px 8px; }
  .ap-kpi-symbol { width:30px; height:30px; flex-basis:30px; }
  .ap-kpi-symbol .ap-icon { width:18px; height:18px; }
  #view-overview .kpi-head { font-size:11px; }
  #view-overview .kpi-foot { font-size:10px; white-space:normal; line-height:14px; }
  .ap-overview-heading { flex-direction:column; gap:6px; }
  .ap-sync-status { padding:0; }
  .ap-chart-pair { min-height:0; }
  .ap-overview-bottom > .card { min-height:0; }
  .ap-metric-symbol { width:40px; height:40px; flex-basis:40px; }
  .ap-metric-strip > div { gap:10px; padding:16px 12px; }
  .ap-metric-copy > span { font-size:12px; }
  #view-ot #otAddBtn { margin-top:8px; }
  .ap-agenda .ap-week-task { padding-right:65px; }
  #view-masterdata .todo-icon { min-width:40px; min-height:40px; }
}

.ap-overview-main .card,.ap-overview-bottom .card { margin:0; }
#view-overview .ap-chart-pair h3,#view-overview .ap-overview-side h3 { line-height:22px; margin-bottom:4px; }
.ap-design-active .ap-table .pill { font-size:11px; font-weight:500; line-height:16px; padding:3px 7px; }

/* Compact page titles; subtitles sit beside them and wrap on small screens. */
.ap-title-line { display:flex; align-items:baseline; flex-wrap:wrap; gap:4px 12px; min-width:0; }
.ap-title-line h2 { margin:0; }
.ap-title-line > :is(p,.muted) { margin:0; font-size:14px; font-weight:400; color:var(--muted); }
#view-projects .projects-head { justify-content:flex-end; }
/* Keep the shared header flush to the viewport on every menu. */
html[data-nav-variant=b] .variant-workspace > .topbar { margin-top:0; width:100%; max-width:none; border-radius:0; border:0; border-bottom:1px solid var(--border); }

/* Month and Timeline use Week's panel, control, date and task treatments. */
#view-calendar:has(#calWeekHost:not(.hidden)) .ap-calendar-status-key { display:none; }
#view-calendar .ap-calendar-status-key { justify-content:flex-end; margin:0 0 12px; }
#view-calendar :is(#calMonthHost,#calTimelineHost) { padding:0; border:0; border-radius:0; background:none; box-shadow:none; min-width:0; }
#view-calendar #calMonthHost.fc {
  --fc-border-color:var(--border); --fc-page-bg-color:var(--surface);
  --fc-today-bg-color:var(--bg-primary-light); --fc-neutral-bg-color:var(--surface-2);
  --fc-button-bg-color:var(--surface); --fc-button-hover-bg-color:var(--bg-primary-light);
  --fc-button-text-color:var(--text); --fc-button-border-color:var(--border);
  --fc-button-hover-border-color:var(--primary);
  --fc-button-active-bg-color:#174BFF; --fc-button-active-border-color:#174BFF;
}
#view-calendar #calMonthHost .fc-toolbar { gap:12px; flex-wrap:wrap; margin:0 0 16px; }
#view-calendar #calMonthHost .fc-toolbar-title { font-size:15px; font-weight:650; }
#view-calendar #calMonthHost .fc-button { border:1px solid var(--border); border-radius:6px; padding:8px 12px; min-height:38px; font-size:13px; box-shadow:none; }
#view-calendar #calMonthHost .fc-button-group { gap:6px; }
#view-calendar #calMonthHost .fc-button:not(:disabled):hover { border-color:var(--primary); }
#view-calendar #calMonthHost .fc-button-active { color:#FFFFFF; }
#view-calendar #calMonthHost .fc-scrollgrid { border:1px solid var(--border); border-radius:8px; overflow:hidden; background:var(--surface); box-shadow:var(--ap-panel-shadow); }
.ap-month-viewport { min-width:0; overflow-x:auto; }
#view-calendar #calMonthHost .fc-col-header-cell { background:var(--surface); padding:10px 0; }
#view-calendar #calMonthHost .fc-col-header-cell-cushion { color:var(--muted); font-weight:500; }
#view-calendar #calMonthHost .fc-daygrid-day-top { padding:5px; }
#view-calendar #calMonthHost .fc-daygrid-day-number { color:var(--text); font-size:12px; padding:4px 8px; font-weight:500; }
#view-calendar #calMonthHost .fc-day-today .fc-daygrid-day-number { color:#FFFFFF; background:#174BFF; border-radius:20px; font-weight:650; }
#view-calendar #calMonthHost .fc-daygrid-day-events { margin:2px 4px 6px; }
#view-calendar :is(.fc-event,.tl-bar) { --ap-task-fill:var(--bg-primary-light); --ap-task-stripe:var(--blue); }
#view-calendar :is(.fc-evt-pending,.tl-pending) { --ap-task-fill:var(--bg-warning-light); --ap-task-stripe:var(--amber); }
#view-calendar :is(.fc-evt-done,.tl-done) { --ap-task-fill:var(--bg-success-light); --ap-task-stripe:var(--green); }
#view-calendar :is(.fc-evt-overdue,.fc-evt-blocked,.tl-overdue,.tl-blocked) { --ap-task-fill:var(--bg-danger-light); --ap-task-stripe:var(--red); }
#view-calendar #calMonthHost .fc-event,
#view-calendar #calTimelineHost .tl-bar { background:var(--ap-task-fill); color:var(--text); border:0; border-left:3px solid var(--ap-task-stripe); border-radius:4px; box-shadow:none; opacity:1; font-size:11px; font-weight:500; }
#view-calendar #calMonthHost .fc-event { padding:6px; margin-bottom:4px; }
#view-calendar #calMonthHost .fc-event .fc-event-main { background:transparent; border:0; color:var(--text); opacity:1; font-weight:500; }
#view-calendar #calMonthHost .fc-event .fc-evt-eng,
#view-calendar #calTimelineHost .tl-bar-eng { background:var(--surface); color:var(--muted); border-radius:4px; font-size:10px; font-weight:600; padding:1px 4px; }
#view-calendar #calMonthHost .fc-event .fc-evt-title { color:var(--text); max-width:calc(100% - 46px); }
#view-calendar #calMonthHost .fc-more-link { color:var(--primary); font-size:11px; padding:4px; }
#view-calendar #calMonthHost .fc-popover { background:var(--surface); border:1px solid var(--border); border-radius:8px; box-shadow:var(--ap-panel-shadow); }
#view-calendar #calMonthHost .fc-list { border:1px solid var(--border); border-radius:8px; overflow:hidden; }
#view-calendar #calTimelineHost .tl-toolbar { flex-wrap:wrap; gap:12px; margin:0 0 16px; min-height:38px; }
#view-calendar #calTimelineHost .tl-toolbar-label { font-size:13px; font-weight:500; }
#view-calendar #tlGridHost { background:var(--surface); border:1px solid var(--border); border-radius:8px; box-shadow:var(--ap-panel-shadow); }
#view-calendar #calTimelineHost .tl-grid { align-content:start; }
#view-calendar #calTimelineHost .tl-axis { min-height:64px; background:var(--surface); border-bottom:1px solid var(--border); color:var(--muted); }
#view-calendar #calTimelineHost .tl-owner-axis { grid-row:1; grid-column:1; display:flex; align-items:center; padding:12px; font-size:12px; font-weight:500; border-right:1px solid var(--border); position:sticky; left:0; z-index:6; }
#view-calendar #calTimelineHost .tl-day-axis span { display:flex; flex-direction:column; justify-content:center; align-items:center; font-size:12px; }
#view-calendar #calTimelineHost .tl-day-axis span.is-today { background:var(--bg-primary-light); color:var(--primary); font-weight:700; box-shadow:inset 0 -3px var(--primary); }
#view-calendar #calTimelineHost .tl-eng { background:var(--surface); padding:12px 8px; border-right:1px solid var(--border); position:sticky; left:0; z-index:5; gap:6px; font-weight:600; }
#view-calendar #calTimelineHost .tl-eng .ap-avatar { flex:0 0 26px; width:26px; height:26px; background:var(--bg-primary-light); color:var(--text); }
#view-calendar #calTimelineHost .tl-eng-dot { width:5px; height:5px; }
#view-calendar #calTimelineHost .tl-track { background:repeating-linear-gradient(to right,transparent 0,transparent calc(100% / var(--tl-days,14) - 1px),var(--border) calc(100% / var(--tl-days,14) - 1px),var(--border) calc(100% / var(--tl-days,14))); }
#view-calendar #calTimelineHost .tl-bar { height:26px; }
#view-calendar #calTimelineHost .tl-bar:hover,
#view-calendar #calMonthHost .fc-event:hover { outline:1px solid var(--ap-task-stripe); outline-offset:1px; }
#view-calendar #calTimelineHost .tl-more-btn { background:var(--surface); color:var(--primary); border:1px solid var(--border); border-radius:4px; }
#view-calendar #calTimelineHost .tl-today-line { background:var(--primary); opacity:.3; }
@media(max-width:760px) {
  #view-calendar .ap-calendar-status-key { justify-content:flex-start; }
  #view-calendar #calMonthHost.fc { min-width:0; }
  #view-calendar #calMonthHost .fc-view-harness { min-width:560px; }
}

/* Neutral dark chrome, with semantic status colors retained. Light mode is unchanged. */
html:not(.light-mode) { --color-primary:var(--primary); }
html:not(.light-mode) .variant-sidebar .subtab.active { color:var(--text); }
html:not(.light-mode) .ap-status-track > span { color:#121212; }
html:not(.light-mode) :is(.pill.status-overdue,.todo-due.overdue) { background:var(--bg-danger-light); color:var(--red); }
html:not(.light-mode) .pill.status-in-progress { background:var(--bg-info-light); color:var(--blue); }
html:not(.light-mode) .pill.status-pending { background:var(--bg-warning-light); color:var(--amber); }
html:not(.light-mode) .pill.status-done { background:var(--bg-success-light); color:var(--green); }
html:not(.light-mode) .variant-workspace > .topbar { background:#171717; }
html:not(.light-mode) :is(.btn-add-pill,.btn-primary,.todo-quickadd button,.md-add-row button,.pf-submit):hover { background:var(--primary-hover); }
html:not(.light-mode):not(.ap-design-active) .btn-refresh-pill { color:var(--on-primary); }
html:not(.light-mode) .dl-tab[aria-pressed=true] { color:var(--text); }
html:not(.light-mode) :is(.dl-view-btn[aria-pressed=true],.proj-view-btn.active) { color:var(--on-primary); }
html.ap-design-active:not(.light-mode) #view-overview .kpi-tile:nth-child(5) .ap-kpi-symbol { color:var(--blue); background:var(--bg-info-light); }
html:not(.light-mode) #view-calendar :is(.ap-week-task,.ap-week-status) { background:var(--bg-info-light); }
html:not(.light-mode) #view-calendar .ap-week-overdue { background:var(--bg-danger-light); }
html:not(.light-mode) #view-calendar .ap-week-pending { background:var(--bg-warning-light); }
html:not(.light-mode) #view-calendar .ap-week-done { background:var(--bg-success-light); }
html:not(.light-mode) #view-calendar .ap-week-status-overdue { background:var(--bg-danger-light); }
html:not(.light-mode) #view-calendar .ap-week-status-pending { background:var(--bg-warning-light); }
html:not(.light-mode) #view-calendar .ap-week-status-done { background:var(--bg-success-light); }
html:not(.light-mode) #view-calendar .ap-agenda .ap-week-task { background:var(--surface); }
html:not(.light-mode) #view-calendar :is(.fc-event,.tl-bar) { --ap-task-fill:var(--bg-info-light); }
html:not(.light-mode) #view-calendar :is(.fc-evt-pending,.tl-pending) { --ap-task-fill:var(--bg-warning-light); }
html:not(.light-mode) #view-calendar :is(.fc-evt-done,.tl-done) { --ap-task-fill:var(--bg-success-light); }
html:not(.light-mode) #view-calendar :is(.fc-evt-overdue,.fc-evt-blocked,.tl-overdue,.tl-blocked) { --ap-task-fill:var(--bg-danger-light); }
html:not(.light-mode) #view-calendar #calMonthHost.fc { --fc-button-active-bg-color:#888888; --fc-button-active-border-color:#888888; }
html:not(.light-mode) #view-calendar :is(.cal-view-btn.is-active,.ap-week-date.is-today strong),
html:not(.light-mode) #view-calendar #calMonthHost :is(.fc-button-active,.fc-day-today .fc-daygrid-day-number) { background:var(--primary); color:var(--on-primary); }
