/* Pracoda PMS — loaded after admin.css */
.pm-auth-app { margin: -14px 0 18px; font-family: "Red Hat Mono", monospace; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pm-main { max-width: none; }
.pm-trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pm-hide-sm { }
@media (max-width: 700px) { .pm-hide-sm { display: none; } .pm-topsearch { display: none; } }
.pm-topsearch { flex: 1 1 320px; max-width: 420px; }
.pm-topsearch .a-input { width: 100%; }
.pm-navcount { margin-left: auto; min-width: 22px; padding: 0 7px; border-radius: 11px; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; text-align: center; }
.pm-bell { position: relative; }
.pm-bell__n { position: absolute; top: -6px; right: -8px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.pm-mention { color: var(--blue-dark); background: var(--blue-tint); border-radius: 4px; padding: 0 3px; font-weight: 600; }

/* Colours (identity only; always paired with a name) */
.pm-c-blue { --c: #006CB5; } .pm-c-red { --c: #C4262B; } .pm-c-plum { --c: #8E3F73; }
.pm-c-orange { --c: #B35A12; } .pm-c-green { --c: #1E7B4C; } .pm-c-ink { --c: #1C3147; }
.pm-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--blue)); }
.pm-avatar { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--c, var(--blue)); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .02em; }
.pm-avatar--lg { width: 40px; height: 40px; font-size: 14px; }
.pm-avatars { display: inline-flex; align-items: center; }
.pm-avatars .pm-avatar { width: 26px; height: 26px; font-size: 10px; box-shadow: 0 0 0 2px #fff; }
.pm-avatars .pm-avatar + .pm-avatar { margin-left: -6px; }
.pm-colourbar { height: 4px; border-radius: 4px 4px 0 0; background: var(--c, var(--blue)); margin: -18px -18px 14px; }

/* Badges */
.pm-pri { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 10px; font-size: 12px; font-weight: 700; }
.pm-pri--low { background: var(--mist); color: var(--muted); }
.pm-pri--normal { background: var(--blue-tint); color: var(--blue-dark); }
.pm-pri--high { background: var(--amber-tint); color: var(--amber); }
.pm-pri--urgent { background: var(--red-tint); color: #8F181C; }
.pm-label { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; font-weight: 600; color: var(--c, var(--blue)); background: #fff; border: 1px solid currentColor; }
.pm-due { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.pm-due--late { color: #8F181C; }
.pm-type { font-family: "Red Hat Mono", monospace; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.pm-ref { font-family: "Red Hat Mono", monospace; font-size: 12px; color: var(--muted); white-space: nowrap; }

/* Progress bar: one hue, 4px rounded ends */
.pm-progress { display: flex; align-items: center; gap: 10px; }
.pm-progress__track { flex: 1 1 auto; height: 8px; background: var(--mist); border-radius: 4px; overflow: hidden; }
.pm-progress__fill { height: 100%; background: var(--blue); border-radius: 4px; }
.pm-progress__n { font-size: 13px; font-weight: 700; color: var(--ink); min-width: 38px; text-align: right; }

/* Widths for bars without inline styles (strict CSP). */
.pm-w-0 { width: 0; } .pm-w-5 { width: 5%; } .pm-w-10 { width: 10%; } .pm-w-15 { width: 15%; } .pm-w-20 { width: 20%; }
.pm-w-25 { width: 25%; } .pm-w-30 { width: 30%; } .pm-w-35 { width: 35%; } .pm-w-40 { width: 40%; } .pm-w-45 { width: 45%; }
.pm-w-50 { width: 50%; } .pm-w-55 { width: 55%; } .pm-w-60 { width: 60%; } .pm-w-65 { width: 65%; } .pm-w-70 { width: 70%; }
.pm-w-75 { width: 75%; } .pm-w-80 { width: 80%; } .pm-w-85 { width: 85%; } .pm-w-90 { width: 90%; } .pm-w-95 { width: 95%; } .pm-w-100 { width: 100%; }

/* Dashboard */
.pm-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.pm-tile { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); text-decoration: none; }
.pm-tile:hover { border-color: var(--blue); }
.pm-tile__n { font-family: "Red Hat Display", sans-serif; font-size: 28px; font-weight: 800; line-height: 1.1; }
.pm-tile__l { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 600; }
.pm-tile--alert .pm-tile__n { color: #8F181C; }
.pm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 18px; align-items: start; }
.pm-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.pm-bars li { display: grid; grid-template-columns: minmax(90px, 140px) 1fr 44px; align-items: center; gap: 10px; }
.pm-bars__label { font-size: 14px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-bars__track { height: 12px; background: var(--mist); border-radius: 4px; }
.pm-bars__fill { height: 100%; min-width: 4px; background: var(--blue); border-radius: 4px; }
.pm-bars__fill.pm-w-0 { min-width: 0; }
.pm-bars__n { font-weight: 700; text-align: right; color: var(--ink); }
.pm-bars li:hover .pm-bars__fill { background: var(--blue-dark); }

/* Lists of tasks */
.pm-tasklist { list-style: none; margin: 0; padding: 0; }
.pm-tasklist li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 10px 0; border-bottom: 1px solid var(--mist); }
.pm-tasklist li:last-child { border-bottom: 0; }
.pm-tasklist a.pm-tasklink { flex: 1 1 260px; min-width: 0; color: var(--ink); text-decoration: none; font-weight: 600; }
.pm-tasklist a.pm-tasklink:hover { color: var(--blue); }
.pm-feed { list-style: none; margin: 0; padding: 0; }
.pm-feed li { padding: 9px 0; border-bottom: 1px solid var(--mist); font-size: 14px; }
.pm-feed li:last-child { border-bottom: 0; }
.pm-feed time { display: block; color: var(--muted); font-size: 12px; }

/* Project cards */
.pm-projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 14px; }
.pm-project { display: flex; flex-direction: column; gap: 10px; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.pm-project__title { margin: 0; font-family: "Red Hat Display", sans-serif; font-size: 18px; font-weight: 800; }
.pm-project__title a { color: var(--ink); text-decoration: none; }
.pm-project__title a:hover { color: var(--blue); }
.pm-project__meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 13px; color: var(--muted); }
.pm-project__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }

/* Project header + tabs */
.pm-phead { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 24px; margin-bottom: 14px; }
.pm-phead__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-top: 6px; color: var(--muted); font-size: 14px; }
.pm-phead .pm-progress { min-width: 220px; }
.pm-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.pm-tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; color: var(--text); text-decoration: none; font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.pm-tabs a[aria-current="page"] { color: var(--blue); border-bottom-color: var(--blue); }
.pm-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.pm-filters .a-input { width: auto; min-width: 140px; }

/* Kanban */
.pm-board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; min-height: 60vh; }
.pm-col { flex: 0 0 300px; display: flex; flex-direction: column; max-height: calc(100vh - 230px); background: var(--mist); border-radius: 10px; }
.pm-col__head { display: flex; align-items: center; gap: 8px; padding: 10px 12px 6px; font-weight: 800; color: var(--ink); }
.pm-col__head .a-count { background: #fff; }
.pm-col__wip { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--muted); }
.pm-col.is-over .pm-col__wip { color: #8F181C; }
.pm-col.is-over { box-shadow: inset 0 3px 0 #C4262B; }
.pm-col__cards { flex: 1 1 auto; display: flex; flex-direction: column; gap: 8px; padding: 6px 10px 10px; overflow-y: auto; min-height: 60px; }
.pm-col.is-drop .pm-col__cards { background: var(--blue-tint); border-radius: 8px; }
.pm-col__add { padding: 0 10px 10px; }
.pm-col__add summary { cursor: pointer; padding: 6px 4px; color: var(--muted); font-weight: 600; list-style: none; }
.pm-col__add summary::-webkit-details-marker { display: none; }
.pm-col__add summary:hover { color: var(--blue); }
.pm-col__add form { display: flex; flex-direction: column; gap: 6px; }
.pm-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 1px 2px rgba(11, 27, 43, .06); }
.pm-card[draggable="true"] { cursor: grab; }
.pm-card.is-dragging { opacity: .45; }
.pm-card:focus-within { border-color: var(--blue); }
.pm-card__title { color: var(--ink); text-decoration: none; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.pm-card__title::after { content: ""; position: absolute; inset: 0; }
.pm-card__title:hover { color: var(--blue); }
.pm-card__row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.pm-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pm-card__icons { display: inline-flex; gap: 10px; color: var(--muted); font-size: 12px; font-weight: 600; }
.pm-card__icons span { display: inline-flex; align-items: center; gap: 3px; }
.pm-card__move { position: relative; z-index: 1; }
.pm-card__move select { font-size: 12px; padding: 2px 4px; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--text); max-width: 130px; }
.pm-card.is-done .pm-card__title { color: var(--muted); text-decoration: line-through; }
.pm-placeholder { height: 48px; border: 2px dashed var(--blue); border-radius: 8px; background: #fff; }
@media (max-width: 700px) { .pm-col { flex-basis: 84vw; max-height: none; } }

/* List view */
.pm-table td.pm-table__title { min-width: 240px; }
.pm-table .pm-check { width: 34px; }
.pm-bulk { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; background: #fff; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; }

/* Ticket */
.pm-ticket { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
@media (max-width: 1100px) { .pm-ticket { grid-template-columns: 1fr; } }
.pm-ticket__title { width: 100%; font-family: "Red Hat Display", sans-serif; font-size: 22px; font-weight: 800; }
.pm-desc { line-height: 1.6; overflow-wrap: anywhere; }
.pm-desc p { margin: 0 0 10px; }
.pm-desc ul { margin: 0 0 10px; padding-left: 20px; }
.pm-desc pre { background: var(--ink); color: #E6EEF6; padding: 12px; border-radius: 8px; overflow-x: auto; }
.pm-desc pre code { background: none; color: inherit; padding: 0; }
.pm-comment { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--mist); scroll-margin-top: 80px; }
.pm-comment:last-child { border-bottom: 0; }
.pm-comment__body { flex: 1 1 auto; min-width: 0; }
.pm-comment__head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-bottom: 4px; font-size: 14px; }
.pm-comment--internal { background: #FFF9F0; margin: 0 -18px; padding: 14px 18px; }
.pm-tag-internal { padding: 1px 8px; border-radius: 10px; background: var(--amber-tint); color: var(--amber); font-size: 12px; font-weight: 700; }
.pm-tag-client { padding: 1px 8px; border-radius: 10px; background: #F3E6EE; color: #6E2F58; font-size: 12px; font-weight: 700; }
.pm-files { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pm-files a { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border: 1px solid var(--line); border-radius: 14px; font-size: 13px; text-decoration: none; }
.pm-checklist { list-style: none; margin: 0 0 10px; padding: 0; }
.pm-checklist li { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--mist); }
.pm-checklist li form { margin: 0; }
.pm-checklist .is-done span { color: var(--muted); text-decoration: line-through; }
.pm-checkbtn { width: 22px; height: 22px; padding: 0; border: 2px solid var(--slate); border-radius: 5px; background: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.pm-checkbtn[aria-pressed="true"] { background: var(--green); border-color: var(--green); }
.pm-people { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pm-people li { display: flex; align-items: center; gap: 10px; }
.pm-people li form { margin-left: auto; }
.pm-side-dl { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px 12px; margin: 0; align-items: center; font-size: 14px; }
.pm-side-dl dt { color: var(--muted); font-weight: 600; }
.pm-side-dl dd { margin: 0; }
.pm-inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.pm-inline .a-field { margin: 0; flex: 1 1 140px; }
.pm-conflict { margin-bottom: 14px; }
.pm-kbd { font-family: "Red Hat Mono", monospace; font-size: 12px; color: var(--muted); }

/* Knowledge base (PMS side) */
.pm-kb { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 900px) { .pm-kb { grid-template-columns: 1fr; } }
.pm-kb__nav { position: sticky; top: 70px; }
.pm-kb__nav ul { list-style: none; margin: 0 0 12px; padding: 0; }
.pm-kb__nav a { display: block; padding: 4px 0; text-decoration: none; color: var(--text); }
.pm-kb__nav a[aria-current="page"] { color: var(--blue); font-weight: 700; }
.pm-article { line-height: 1.7; font-size: 16px; max-width: 820px; overflow-wrap: anywhere; }
.pm-article h2 { font-family: "Red Hat Display", sans-serif; font-size: 22px; margin: 28px 0 10px; }
.pm-article h3 { font-family: "Red Hat Display", sans-serif; font-size: 18px; margin: 22px 0 8px; }
.pm-article pre { background: var(--ink); color: #E6EEF6; padding: 14px; border-radius: 8px; overflow-x: auto; }
.pm-article pre code { background: none; color: inherit; padding: 0; }
.pm-article img { border-radius: 8px; height: auto; }
.pm-article .table-wrap { overflow-x: auto; }
.pm-article table { border-collapse: collapse; width: 100%; }
.pm-article th, .pm-article td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.pm-progress--sm { width: 150px; flex: none; }
.pm-progress__track, .pm-progress__fill, .pm-bars__track, .pm-bars__fill { display: block; }
.pm-col__head { margin: 0; font-size: 15px; font-family: "Red Hat Display", sans-serif; }

/* ---------- Dark mode: [data-theme=dark], or the device setting unless the user chose light ---------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #E6EDF3; --ink-2: #1C2935; --text: #C5D1DC; --muted: #9DAEBF; --slate: #3A4B5B; --line: #2A3947;
  --surface: #0E151D; --mist: #1E2B37; --panel: #16212C; --panel-2: #1B2733;
  --blue: #5AAEE6; --blue-dark: #9CCBEC; --blue-tint: #14324A; --red: #F0676B; --red-tint: #3A1D21;
  --green: #4CC38A; --green-tint: #15352A; --amber: #F2B36B; --amber-tint: #3A2A15; --plum: #D58BBE; --orange: #F7A766;
}
:root[data-theme="dark"] body { background: var(--surface); color: var(--ink); }
:root[data-theme="dark"] .a-side { background: #0A1118; border-right: 1px solid var(--line); }
:root[data-theme="dark"] .a-nav__link:hover { background: var(--panel-2); }
:root[data-theme="dark"] .a-nav__link[aria-current="page"], :root[data-theme="dark"] .a-btn--primary, :root[data-theme="dark"] .a-badge--new { background: #1F6FB0; border-color: #1F6FB0; color: #fff; }
:root[data-theme="dark"] .a-btn--primary:hover { background: #2A80C6; border-color: #2A80C6; }
:root[data-theme="dark"] .a-top, :root[data-theme="dark"] .a-card, :root[data-theme="dark"] .a-table-wrap, :root[data-theme="dark"] .a-stat, :root[data-theme="dark"] .a-empty, :root[data-theme="dark"] .a-section, :root[data-theme="dark"] .a-mediaitem, :root[data-theme="dark"] .a-modal__box, :root[data-theme="dark"] .a-iconbtn, :root[data-theme="dark"] .a-gallery__add, :root[data-theme="dark"] .pm-card, :root[data-theme="dark"] .pm-project, :root[data-theme="dark"] .pm-tile, :root[data-theme="dark"] .pm-bulk, :root[data-theme="dark"] .pm-placeholder, :root[data-theme="dark"] .pm-checkbtn, :root[data-theme="dark"] .pm-label, :root[data-theme="dark"] .pm-col__head .a-count { background: var(--panel); }
:root[data-theme="dark"] .a-btn { background: var(--panel-2); color: var(--ink); border-color: var(--slate); }
:root[data-theme="dark"] .a-btn:hover { border-color: var(--muted); }
:root[data-theme="dark"] .a-btn--ghost { background: transparent; }
:root[data-theme="dark"] .a-btn--danger { background: transparent; color: var(--red); border-color: var(--red); }
:root[data-theme="dark"] .a-btn--danger:hover { background: var(--red); color: #10161D; }
:root[data-theme="dark"] .a-input, :root[data-theme="dark"] .pm-card__move select { background: #101820; color: var(--ink); border-color: #4A5D70; }
:root[data-theme="dark"] .a-input::placeholder { color: #7F92A5; }
:root[data-theme="dark"] .a-input:disabled { background: var(--panel-2); color: var(--muted); }
:root[data-theme="dark"] .a-table th { background: var(--panel-2); }
:root[data-theme="dark"] .a-table td { border-bottom-color: var(--line); }
:root[data-theme="dark"] .a-table tr:hover td { background: var(--panel-2); }
:root[data-theme="dark"] .a-count { background: var(--mist); color: var(--text); }
:root[data-theme="dark"] .a-notice--success, :root[data-theme="dark"] .a-badge--ok { background: var(--green-tint); color: #8FE3B9; }
:root[data-theme="dark"] .a-notice--error { background: var(--red-tint); color: #FFB3B5; }
:root[data-theme="dark"] .a-notice--info, :root[data-theme="dark"] .a-badge--info { background: var(--blue-tint); color: #A9D3F2; }
:root[data-theme="dark"] .a-badge--warn { background: var(--amber-tint); color: #F7C990; }
:root[data-theme="dark"] .a-badge--muted { background: var(--mist); color: var(--text); }
:root[data-theme="dark"] .a-env { background: var(--amber-tint); color: #F7C990; }
:root[data-theme="dark"] .a-error { color: #FF9A9D; }
:root[data-theme="dark"] code { background: var(--mist); color: var(--ink); }
:root[data-theme="dark"] .pm-col { background: #131D27; }
:root[data-theme="dark"] .pm-col.is-drop .pm-col__cards { background: var(--blue-tint); }
:root[data-theme="dark"] .pm-card { border-color: var(--line); box-shadow: none; }
:root[data-theme="dark"] .pm-avatars .pm-avatar { box-shadow: 0 0 0 2px var(--panel); }
:root[data-theme="dark"] .pm-pri--low { background: var(--mist); color: var(--text); }
:root[data-theme="dark"] .pm-pri--normal { background: var(--blue-tint); color: #A9D3F2; }
:root[data-theme="dark"] .pm-pri--high { background: var(--amber-tint); color: #F7C990; }
:root[data-theme="dark"] .pm-pri--urgent { background: var(--red-tint); color: #FFB3B5; }
:root[data-theme="dark"] .pm-tag-internal { background: var(--amber-tint); color: #F7C990; }
:root[data-theme="dark"] .pm-tag-client { background: #3A2033; color: #F0B8DD; }
:root[data-theme="dark"] .pm-due--late, :root[data-theme="dark"] .pm-tile--alert .pm-tile__n, :root[data-theme="dark"] .pm-col.is-over .pm-col__wip { color: #FF9A9D; }
:root[data-theme="dark"] .pm-col.is-over { box-shadow: inset 0 3px 0 #F0676B; }
:root[data-theme="dark"] .pm-mention { background: var(--blue-tint); color: #A9D3F2; }
:root[data-theme="dark"] .pm-comment--internal { background: #231E14; }
:root[data-theme="dark"] .pm-progress__track, :root[data-theme="dark"] .pm-bars__track { background: var(--mist); }
:root[data-theme="dark"] .pm-progress__fill, :root[data-theme="dark"] .pm-bars__fill { background: #4DA3E0; }
:root[data-theme="dark"] .pm-bars li:hover .pm-bars__fill { background: #8CC4EE; }
:root[data-theme="dark"] .pm-label { color: var(--ink); border-color: var(--c, #5AAEE6); }
:root[data-theme="dark"] .pm-desc pre, :root[data-theme="dark"] .pm-article pre { background: #0A1118; border: 1px solid var(--line); }
:root[data-theme="dark"] .pm-article th, :root[data-theme="dark"] .pm-article td { border-color: var(--line); }
:root[data-theme="dark"] .a-qr { background: var(--panel-2); }
:root[data-theme="dark"] .a-link { color: var(--blue); }
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) {
  color-scheme: dark;
  --ink: #E6EDF3; --ink-2: #1C2935; --text: #C5D1DC; --muted: #9DAEBF; --slate: #3A4B5B; --line: #2A3947;
  --surface: #0E151D; --mist: #1E2B37; --panel: #16212C; --panel-2: #1B2733;
  --blue: #5AAEE6; --blue-dark: #9CCBEC; --blue-tint: #14324A; --red: #F0676B; --red-tint: #3A1D21;
  --green: #4CC38A; --green-tint: #15352A; --amber: #F2B36B; --amber-tint: #3A2A15; --plum: #D58BBE; --orange: #F7A766;
}
:root:not([data-theme="light"]) body { background: var(--surface); color: var(--ink); }
:root:not([data-theme="light"]) .a-side { background: #0A1118; border-right: 1px solid var(--line); }
:root:not([data-theme="light"]) .a-nav__link:hover { background: var(--panel-2); }
:root:not([data-theme="light"]) .a-nav__link[aria-current="page"], :root:not([data-theme="light"]) .a-btn--primary, :root:not([data-theme="light"]) .a-badge--new { background: #1F6FB0; border-color: #1F6FB0; color: #fff; }
:root:not([data-theme="light"]) .a-btn--primary:hover { background: #2A80C6; border-color: #2A80C6; }
:root:not([data-theme="light"]) .a-top, :root:not([data-theme="light"]) .a-card, :root:not([data-theme="light"]) .a-table-wrap, :root:not([data-theme="light"]) .a-stat, :root:not([data-theme="light"]) .a-empty, :root:not([data-theme="light"]) .a-section, :root:not([data-theme="light"]) .a-mediaitem, :root:not([data-theme="light"]) .a-modal__box, :root:not([data-theme="light"]) .a-iconbtn, :root:not([data-theme="light"]) .a-gallery__add, :root:not([data-theme="light"]) .pm-card, :root:not([data-theme="light"]) .pm-project, :root:not([data-theme="light"]) .pm-tile, :root:not([data-theme="light"]) .pm-bulk, :root:not([data-theme="light"]) .pm-placeholder, :root:not([data-theme="light"]) .pm-checkbtn, :root:not([data-theme="light"]) .pm-label, :root:not([data-theme="light"]) .pm-col__head .a-count { background: var(--panel); }
:root:not([data-theme="light"]) .a-btn { background: var(--panel-2); color: var(--ink); border-color: var(--slate); }
:root:not([data-theme="light"]) .a-btn:hover { border-color: var(--muted); }
:root:not([data-theme="light"]) .a-btn--ghost { background: transparent; }
:root:not([data-theme="light"]) .a-btn--danger { background: transparent; color: var(--red); border-color: var(--red); }
:root:not([data-theme="light"]) .a-btn--danger:hover { background: var(--red); color: #10161D; }
:root:not([data-theme="light"]) .a-input, :root:not([data-theme="light"]) .pm-card__move select { background: #101820; color: var(--ink); border-color: #4A5D70; }
:root:not([data-theme="light"]) .a-input::placeholder { color: #7F92A5; }
:root:not([data-theme="light"]) .a-input:disabled { background: var(--panel-2); color: var(--muted); }
:root:not([data-theme="light"]) .a-table th { background: var(--panel-2); }
:root:not([data-theme="light"]) .a-table td { border-bottom-color: var(--line); }
:root:not([data-theme="light"]) .a-table tr:hover td { background: var(--panel-2); }
:root:not([data-theme="light"]) .a-count { background: var(--mist); color: var(--text); }
:root:not([data-theme="light"]) .a-notice--success, :root:not([data-theme="light"]) .a-badge--ok { background: var(--green-tint); color: #8FE3B9; }
:root:not([data-theme="light"]) .a-notice--error { background: var(--red-tint); color: #FFB3B5; }
:root:not([data-theme="light"]) .a-notice--info, :root:not([data-theme="light"]) .a-badge--info { background: var(--blue-tint); color: #A9D3F2; }
:root:not([data-theme="light"]) .a-badge--warn { background: var(--amber-tint); color: #F7C990; }
:root:not([data-theme="light"]) .a-badge--muted { background: var(--mist); color: var(--text); }
:root:not([data-theme="light"]) .a-env { background: var(--amber-tint); color: #F7C990; }
:root:not([data-theme="light"]) .a-error { color: #FF9A9D; }
:root:not([data-theme="light"]) code { background: var(--mist); color: var(--ink); }
:root:not([data-theme="light"]) .pm-col { background: #131D27; }
:root:not([data-theme="light"]) .pm-col.is-drop .pm-col__cards { background: var(--blue-tint); }
:root:not([data-theme="light"]) .pm-card { border-color: var(--line); box-shadow: none; }
:root:not([data-theme="light"]) .pm-avatars .pm-avatar { box-shadow: 0 0 0 2px var(--panel); }
:root:not([data-theme="light"]) .pm-pri--low { background: var(--mist); color: var(--text); }
:root:not([data-theme="light"]) .pm-pri--normal { background: var(--blue-tint); color: #A9D3F2; }
:root:not([data-theme="light"]) .pm-pri--high { background: var(--amber-tint); color: #F7C990; }
:root:not([data-theme="light"]) .pm-pri--urgent { background: var(--red-tint); color: #FFB3B5; }
:root:not([data-theme="light"]) .pm-tag-internal { background: var(--amber-tint); color: #F7C990; }
:root:not([data-theme="light"]) .pm-tag-client { background: #3A2033; color: #F0B8DD; }
:root:not([data-theme="light"]) .pm-due--late, :root:not([data-theme="light"]) .pm-tile--alert .pm-tile__n, :root:not([data-theme="light"]) .pm-col.is-over .pm-col__wip { color: #FF9A9D; }
:root:not([data-theme="light"]) .pm-col.is-over { box-shadow: inset 0 3px 0 #F0676B; }
:root:not([data-theme="light"]) .pm-mention { background: var(--blue-tint); color: #A9D3F2; }
:root:not([data-theme="light"]) .pm-comment--internal { background: #231E14; }
:root:not([data-theme="light"]) .pm-progress__track, :root:not([data-theme="light"]) .pm-bars__track { background: var(--mist); }
:root:not([data-theme="light"]) .pm-progress__fill, :root:not([data-theme="light"]) .pm-bars__fill { background: #4DA3E0; }
:root:not([data-theme="light"]) .pm-bars li:hover .pm-bars__fill { background: #8CC4EE; }
:root:not([data-theme="light"]) .pm-label { color: var(--ink); border-color: var(--c, #5AAEE6); }
:root:not([data-theme="light"]) .pm-desc pre, :root:not([data-theme="light"]) .pm-article pre { background: #0A1118; border: 1px solid var(--line); }
:root:not([data-theme="light"]) .pm-article th, :root:not([data-theme="light"]) .pm-article td { border-color: var(--line); }
:root:not([data-theme="light"]) .a-qr { background: var(--panel-2); }
:root:not([data-theme="light"]) .a-link { color: var(--blue); }
}

/* Theme toggle */
.pm-theme { margin: 0; }
.pm-theme button { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--ink); cursor: pointer; }
.pm-theme button:hover { border-color: var(--muted); }
.pm-theme .pm-ic-sun { display: none; }
:root[data-theme="dark"] .pm-theme .pm-ic-sun { display: inline; }
:root[data-theme="dark"] .pm-theme .pm-ic-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pm-theme .pm-ic-sun { display: inline; }
  :root:not([data-theme="light"]) .pm-theme .pm-ic-moon { display: none; }
}

/* App switcher (Projects | HR) */
.pm-apps { display: flex; gap: 4px; margin: 0 4px 14px; padding: 4px; background: rgba(255, 255, 255, .06); border-radius: 8px; }
.pm-apps a { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 6px 4px; border-radius: 6px; color: #D7E0EA; text-decoration: none; font-weight: 600; font-size: 14px; }
.pm-apps a[aria-current="true"] { background: #fff; color: #0B1B2B; }
/* HR portal */
.hr-clock { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.hr-clock__time { font-family: "Red Hat Display", sans-serif; font-size: 34px; font-weight: 800; line-height: 1; }
.hr-clock__meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: 14px; }
.hr-clock form { margin: 0; }
.hr-clock .a-btn { min-height: 48px; padding: 0 26px; font-size: 16px; }
.hr-cal { width: 100%; }
.hr-day--weekly_off td, .hr-day--holiday td, .hr-day--outside td { color: var(--muted); background: var(--surface); }
.hr-day--absent td:first-child { box-shadow: inset 3px 0 0 #C4262B; }
.hr-day--leave td:first-child { box-shadow: inset 3px 0 0 #8E3F73; }
.hr-tag { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; font-weight: 700; background: var(--mist); color: var(--text); }
.hr-tag--present { background: var(--green-tint); color: #145233; }
.hr-tag--absent { background: var(--red-tint); color: #8F181C; }
.hr-tag--leave { background: #F3E6EE; color: #6E2F58; }
.hr-tag--late { background: var(--amber-tint); color: var(--amber); }
.hr-balances { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.hr-balance { padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.hr-balance__n { font-family: "Red Hat Display", sans-serif; font-size: 26px; font-weight: 800; }
.hr-balance__l { color: var(--muted); font-size: 13px; font-weight: 600; }
.hr-amount { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
:root[data-theme="dark"] .hr-balance { background: var(--panel); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hr-balance { background: var(--panel); } }
:root[data-theme="dark"] .hr-tag--present { background: var(--green-tint); color: #8FE3B9; }
:root[data-theme="dark"] .hr-tag--absent { background: var(--red-tint); color: #FFB3B5; }
:root[data-theme="dark"] .hr-tag--leave { background: #3A2033; color: #F0B8DD; }
:root[data-theme="dark"] .hr-tag--late { background: var(--amber-tint); color: #F7C990; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hr-tag--present { background: var(--green-tint); color: #8FE3B9; }
  :root:not([data-theme="light"]) .hr-tag--absent { background: var(--red-tint); color: #FFB3B5; }
  :root:not([data-theme="light"]) .hr-tag--leave { background: #3A2033; color: #F0B8DD; }
  :root:not([data-theme="light"]) .hr-tag--late { background: var(--amber-tint); color: #F7C990; }
}

/* Planning: blocked tasks, milestones, sprints, budget */
.pm-tag-blocked { padding: 1px 8px; border-radius: 10px; background: var(--red-tint); color: var(--red); font-size: 12px; font-weight: 700; }
:root[data-theme="dark"] .pm-tag-blocked { color: #FFB3B5; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pm-tag-blocked { color: #FFB3B5; } }
.pm-plan-list { list-style: none; margin: 0; padding: 0; }
.pm-plan-list > li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.pm-plan-list > li:last-child { border-bottom: 0; }
.pm-plan-list details { margin-top: 8px; }
.pm-meter { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; margin-bottom: 12px; }
.pm-meter .pm-progress { grid-column: 1 / -1; }
/* Timesheet grid */
.ts-grid td { vertical-align: middle; }
.ts-grid select { min-width: 220px; }
.ts-cell { width: 4.2em; text-align: right; padding-left: 4px; padding-right: 6px; }
/* Count badges on the lighter dark-mode red need dark text for contrast. */
:root[data-theme="dark"] .pm-bell__n, :root[data-theme="dark"] .pm-navcount { color: #1B0A0B; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pm-bell__n, :root:not([data-theme="light"]) .pm-navcount { color: #1B0A0B; } }
