/* ===== PM Tool Layout ===== */
:root {
  --pm-navbar-height: 40px;
  --pm-portlet-header-height: 30px;
  --pm-border-color: #e0e0e0;
  --pm-header-bg: #f7f8f9;
  --pm-bg: #fff;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
}
/* ===== Navbar ===== */
.pm-navbar {
  height: var(--pm-navbar-height);
  padding: 0 12px;
  border-bottom: 1px solid var(--pm-border-color);
  background: var(--pm-bg);
  position: relative;
  /* Sit above Leaflet map panes (tiles=200, overlays=400, shadow=500, marker=600, tooltip=650, popup=700) */
  z-index: 1000;
}
.pm-navbar .navbar-brand {
  font-weight: 700;
  font-size: 14px;
}
.pm-user-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: #5755d9;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 8px;
  letter-spacing: 0.5px;
}
/* Access badge */
.pm-access-badge {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 3px;
  margin-left: 6px;
}
.pm-access-badge[data-role="viewer"] {
  background: #f39c12;
  color: #fff;
}
.pm-access-badge[data-role="editor"] {
  background: #27ae60;
  color: #fff;
}
.pm-access-badge[data-role="owner"] {
  display: none;
}
/* Project sidebar — fixed overlay */
.pm-sidebar-overlay {
  display: none;
  position: fixed;
  top: var(--pm-navbar-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.2);
  z-index: 100;
}
.pm-sidebar-overlay.active {
  display: block;
}
.pm-sidebar {
  position: fixed;
  top: var(--pm-navbar-height);
  left: 0;
  bottom: 0;
  width: 420px;
  max-width: 85vw;
  background: #fff;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
  z-index: 101;
  transform: translateX(-100%);
  transition: transform 0.15s ease;
  display: flex;
  flex-direction: column;
}
.pm-sidebar.open {
  transform: translateX(0);
}
.pm-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #e0e0e0;
}
.pm-sidebar-header h5 {
  margin: 0;
  font-size: 14px;
}
.pm-sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}
/* Sidebar section titles */
.pm-sidebar-section-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #999;
  padding: 10px 16px 4px;
}
/* Expand button */
.pm-sidebar-expand {
  flex-shrink: 0;
  opacity: 0.3;
  padding: 2px;
}
.pm-sidebar-expand:hover {
  opacity: 1;
}
/* Expandable details panel */
.pm-sidebar-details {
  padding: 8px 16px 12px;
  background: #fafafa;
  border-bottom: 1px solid #e0e0e0;
  font-size: 12px;
}
.pm-sidebar-detail-row {
  padding: 2px 0;
}
.pm-sidebar-detail-row .text-gray {
  color: #999;
}
.pm-sidebar-detail-actions {
  padding-top: 8px;
  display: flex;
  gap: 6px;
}
.pm-sidebar-detail-sharing {
  padding-top: 6px;
  border-top: 1px solid #eee;
  margin-top: 6px;
}
/* Sharing inside details */
.pm-sharing-link {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}
.pm-sharing-link .form-input {
  font-size: 10px;
  padding: 2px 6px;
}
.pm-sharing-user {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 0;
  border-bottom: 1px solid #f0f0f0;
}
.pm-sharing-user-email {
  flex: 1;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pm-sharing-role-select {
  width: 75px;
  font-size: 10px;
  padding: 1px 3px;
  height: 22px;
  flex-shrink: 0;
}
.pm-sharing-remove {
  flex-shrink: 0;
  padding: 1px 3px;
  opacity: 0.4;
}
.pm-sharing-remove:hover {
  opacity: 1;
}
/* Template picker */
.pm-template-card {
  cursor: pointer;
  margin-bottom: 12px;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
  border: 2px solid transparent;
}
.pm-template-card:hover {
  box-shadow: 0 2px 8px rgba(87, 85, 217, 0.15);
  border-color: #5755d9;
}
#pm-template-modal .modal-container {
  max-width: 640px;
}
#pm-template-modal .modal-body {
  min-height: 120px;
}
/* Spectre nav tree in sidebar */
.pm-sidebar-body .nav {
  padding: 0;
  margin: 0;
}
.pm-sidebar-body .nav .nav-item {
  padding: 0;
}
/* Folder items */
.pm-folder-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #666;
  cursor: pointer;
}
.pm-folder-toggle:hover {
  color: #5755d9;
  background: #f7f7ff;
}
.pm-folder-icon {
  font-size: 10px;
  transition: transform 0.15s;
}
.pm-folder-item > ul.nav {
  padding-left: 12px;
}
/* Project row inside nav */
.pm-nav-project {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
}
.pm-nav-project:hover {
  background: #f5f5ff;
}
.nav-item.active > .pm-nav-project {
  background: #ebebff;
  border-left: 3px solid #5755d9;
}
.pm-nav-project-link {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.pm-nav-project-link:hover {
  color: #5755d9;
}
.pm-nav-role {
  font-size: 9px;
  flex-shrink: 0;
}
.pm-nav-date {
  font-size: 10px;
  color: #999;
  flex-shrink: 0;
}
.pm-sidebar-item-tpl {
  font-size: 12px;
  color: #f39c12;
}
.pm-sidebar-expand {
  flex-shrink: 0;
  opacity: 0.3;
  padding: 2px;
}
.pm-sidebar-expand:hover {
  opacity: 1;
}
/* Sidebar footer */
.pm-sidebar-footer {
  border-top: 1px solid #e0e0e0;
  padding: 8px 12px;
  background: #f7f8f9;
}
.pm-sidebar-footer-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 6px;
}
.pm-sidebar-footer-user .pm-user-badge {
  font-size: 9px;
  padding: 2px 6px;
}
.pm-sidebar-footer-user .text-small {
  font-size: 11px;
  color: #666;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pm-sidebar-footer-actions {
  display: flex;
  gap: 2px;
}
.pm-sidebar-footer-actions .btn {
  font-size: 11px;
  padding: 2px 6px;
}
/* Sidebar header with New button */
.pm-sidebar-header #btn-new-sidebar {
  margin-left: auto;
  margin-right: 8px;
  font-size: 11px;
}
/* Welcome screen */
.pm-welcome-screen {
  position: fixed;
  top: var(--pm-navbar-height);
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  z-index: 50;
}
.pm-welcome-screen .empty {
  text-align: center;
  background: #fff;
  padding: 2.5rem 3rem;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
  min-width: 320px;
}
.pm-welcome-screen .empty-icon .icon {
  font-size: 48px;
  color: #5755d9;
}
.pm-welcome-screen .empty-action {
  margin-top: 1rem;
}
.pm-welcome-screen .empty-action .btn {
  margin: 0.25rem;
}
/* Presence — "me" avatar */
.pm-presence-me {
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
}
.pm-presence-idle {
  opacity: 0.35;
}
/* ===== Gridstack Container ===== */
.pm-grid-wrapper {
  height: calc(100vh - var(--pm-navbar-height));
  overflow: hidden;
}
.grid-stack {
  height: 100%;
}
/* ===== Portlets (grid items) ===== */
.pm-portlet {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: var(--pm-bg);
  border: 1px solid var(--pm-border-color);
  border-radius: 3px;
}
.pm-portlet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--pm-portlet-header-height);
  padding: 0 10px;
  background: var(--pm-header-bg);
  border-bottom: 1px solid var(--pm-border-color);
  flex-shrink: 0;
  cursor: move;
}
.pm-portlet-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: #667;
  letter-spacing: 0.5px;
}
.pm-portlet-body {
  flex: 1;
  overflow: auto;
  position: relative;
}
/* Preview scroll container */
.pm-preview-scroll {
  flex: 1;
  overflow: auto;
  position: relative;
}
/* ===== Ace Editor ===== */
.pm-editor-wrap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
}
.pm-editor-toolbar {
  flex: 0 0 auto;
  padding: 4px 6px;
  border-bottom: 1px solid #e5e5e5;
  background: #fafafa;
}
#editor {
  position: relative;
  flex: 1 1 auto;
  font-size: 14px;
}
/* ===== Preview ===== */
.pm-preview-content {
  padding: 16px 20px;
  line-height: 1.6;
}
.pm-preview-content h1 {
  font-size: 1.6em;
  margin: 0.5em 0 0.3em;
}
.pm-preview-content h2 {
  font-size: 1.3em;
  margin: 0.5em 0 0.3em;
}
.pm-preview-content h3 {
  font-size: 1.1em;
  margin: 0.5em 0 0.3em;
}
.pm-preview-content ul,
.pm-preview-content ol {
  padding-left: 1.5em;
}
/* ===== Issue Indicator ===== */
.pm-has-issues {
  border-top: 3px solid #e74c3c;
}
.pm-issue-indicator {
  position: relative;
}
.pm-issue-badge {
  display: inline-block;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  padding: 0 5px;
}
.pm-issue-badge-error {
  background: #e74c3c;
  animation: pm-pulse 2s infinite;
}
.pm-issue-badge-warning {
  background: #f39c12;
}
@keyframes pm-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}
.pm-issue-list {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 100;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 320px;
  max-height: 300px;
  overflow-y: auto;
}
.pm-issue-item {
  padding: 6px 10px;
  font-size: 12px;
  border-bottom: 1px solid #f0f0f0;
}
.pm-issue-item:last-child {
  border-bottom: none;
}
.pm-issue-item-error {
  color: #922b21;
}
.pm-issue-item-warning {
  color: #7d6608;
}
/* ===== Schedule Summary ===== */
.pm-schedule-summary {
  margin-bottom: 16px;
  border: 1px solid #d5dbdb;
  border-radius: 4px;
  background: #fafafa;
  overflow: hidden;
}
.pm-schedule-header {
  padding: 6px 12px;
  background: #eaecee;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #566573;
}
.pm-schedule-items {
  padding: 4px 0;
}
.pm-schedule-item {
  display: flex;
  align-items: center;
  padding: 3px 12px;
  font-size: 13px;
  gap: 12px;
}
.pm-schedule-item:hover {
  background: #eef2f5;
}
.pm-schedule-time {
  font-family: "SF Mono", "Consolas", monospace;
  font-size: 12px;
  color: #2c3e50;
  white-space: nowrap;
  min-width: 160px;
}
.pm-schedule-label {
  color: #34495e;
}
.pm-schedule-milestone .pm-schedule-label {
  color: #922b21;
  font-weight: 600;
}
.pm-schedule-todo .pm-schedule-label {
  color: #6c3483;
}
.pm-schedule-task .pm-schedule-label {
  color: #1b4f72;
  font-weight: 600;
}
/* Current line highlight in preview — shows which element corresponds to the editor cursor */
.pm-current-line {
  border-left: 3px solid #5755d9;
  padding-left: 8px;
  margin-left: -11px;
  background: rgba(87, 85, 217, 0.04);
  transition: border-color 0.15s, background 0.15s;
  border-radius: 2px;
}
/* F12 locate highlight — yellow flash that fades */
.pm-locate-highlight {
  outline: 3px solid #00e5ff !important;
  outline-offset: 2px;
  box-shadow: 0 0 0 6px rgba(0, 229, 255, 0.35), 0 0 14px rgba(0, 229, 255, 0.5) !important;
  animation: pm-locate-pulse 1s ease-in-out infinite;
  border-radius: 3px;
  z-index: 50 !important;
  position: relative;
}
@keyframes pm-locate-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 6px rgba(0, 229, 255, 0.35), 0 0 14px rgba(0, 229, 255, 0.5);
  }
  50% {
    box-shadow: 0 0 0 9px rgba(0, 229, 255, 0.55), 0 0 22px rgba(0, 229, 255, 0.7);
  }
}
/* Expression display in preview */
.pm-expr {
  display: inline-block;
  background: #e8f4fd;
  border: 1px solid #b3d9f2;
  border-radius: 3px;
  padding: 1px 6px;
  font-size: 13px;
  color: #1a5276;
  white-space: nowrap;
}
.pm-expr-label {
  font-weight: 600;
  margin-right: 4px;
}
.pm-expr-value {
  color: #2471a3;
}
.pm-expr-unresolved {
  background: #fdf2e9;
  border-color: #f0c27a;
  color: #935116;
}
/* {{groupId}} inline expansion: group label followed by member chips */
.pm-expr-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 1px 4px;
  background: #f4f6f8;
  border: 1px solid #dce0e4;
  border-radius: 4px;
  font-size: 0.9em;
}
.pm-expr-group-label {
  font-weight: 600;
  color: #333;
}
.pm-expr-group-items {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 3px;
}
.pm-expr-group-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 0 6px;
  border-radius: 10px;
  color: #fff;
  font-size: 0.9em;
  line-height: 1.4;
}
.pm-expr-group-empty {
  color: #888;
  font-style: italic;
}
/* Entity display in preview */
.pm-entity {
  display: inline-block;
  background: #eafaf1;
  border: 1px solid #a9dfbf;
  border-radius: 3px;
  padding: 1px 6px;
  font-size: 13px;
  color: #1e7e34;
  white-space: nowrap;
}
.pm-entity-type {
  font-size: 11px;
  text-transform: uppercase;
  opacity: 0.7;
  margin-right: 3px;
}
.pm-entity[data-type="task"] {
  background: #ebf5fb;
  border-color: #aed6f1;
  color: #1b4f72;
}
.pm-entity[data-type="resource"] {
  background: #f4ecf7;
  border-color: #d2b4de;
  color: #6c3483;
}
.pm-entity[data-type="milestone"] {
  background: #fdedec;
  border-color: #f5b7b1;
  color: #922b21;
}
.pm-entity[data-type="place"] {
  background: #eafaf1;
  border-color: #a9dfbf;
  color: #1e7e34;
}
.pm-entity[data-type="equip"] {
  background: #fef9e7;
  border-color: #f9e79f;
  color: #7d6608;
}
.pm-entity[data-type="material"] {
  background: #fef5e7;
  border-color: #f0c27a;
  color: #935116;
}
.pm-entity[data-type="todo"] {
  background: #f5f5f5;
  border-color: #ccc;
  color: #333;
}
.pm-entity[data-type="budget"] {
  background: #eafaf1;
  border-color: #82e0aa;
  color: #1e7e34;
}
.pm-entity[data-type="project"] {
  background: #ebf5fb;
  border-color: #5755d9;
  color: #2c3e50;
  font-weight: 600;
}
/* ===== Todo Checkboxes ===== */
.pm-todo {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 13px;
  border: 1px solid #d5dbdb;
  background: #fafafa;
}
.pm-todo-check {
  font-size: 16px;
  line-height: 1;
}
.pm-todo-label {
  color: #2c3e50;
}
/* Todo status styles */
.pm-todo-open .pm-todo-check {
  color: #95a5a6;
}
.pm-todo-done {
  background: #eafaf1;
  border-color: #a9dfbf;
}
.pm-todo-done .pm-todo-check {
  color: #27ae60;
}
.pm-todo-done .pm-todo-label {
  text-decoration: line-through;
  color: #7f8c8d;
}
.pm-todo-blocked {
  background: #fdedec;
  border-color: #f5b7b1;
}
.pm-todo-blocked .pm-todo-check {
  color: #e74c3c;
}
.pm-todo-wip {
  background: #ebf5fb;
  border-color: #aed6f1;
}
.pm-todo-wip .pm-todo-check {
  color: #2980b9;
}
.pm-todo-review {
  background: #fef9e7;
  border-color: #f9e79f;
}
.pm-todo-review .pm-todo-check {
  color: #f39c12;
}
/* Todo attribute badges */
.pm-todo-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 8px;
  margin-left: 3px;
  vertical-align: middle;
}
.pm-todo-badge-for {
  background: #d2b4de;
  color: #6c3483;
}
.pm-todo-badge-high {
  background: #e74c3c;
  color: #fff;
}
.pm-todo-badge-med {
  background: #f39c12;
  color: #fff;
}
.pm-todo-badge-low {
  background: #95a5a6;
  color: #fff;
}
.pm-todo-badge-due {
  background: #2c3e50;
  color: #fff;
}
.pm-todo-badge-task {
  background: #1b4f72;
  color: #fff;
}
/* ===== Entity Attribute Badges ===== */
.pm-attr-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 0 5px;
  border-radius: 8px;
  margin-left: 3px;
  vertical-align: middle;
  line-height: 16px;
}
/* Reference badges (res, place, equip, mat, owner) */
.pm-attr-ref {
  background: #d2b4de;
  color: #6c3483;
}
/* Role */
.pm-attr-role {
  background: #f5cba7;
  color: #784212;
}
/* Quantity */
.pm-attr-qty {
  background: #aed6f1;
  color: #1b4f72;
}
.pm-attr-qty-ok {
  background: #27ae60;
  color: #fff;
}
.pm-attr-qty-short {
  background: #e74c3c;
  color: #fff;
}
.pm-attr-qty-optional {
  background: #bdc3c7;
  color: #2c3e50;
}
/* Money / price / amount */
.pm-attr-money {
  background: #27ae60;
  color: #fff;
}
.pm-attr-spent {
  background: #e74c3c;
  color: #fff;
}
.pm-attr-cost {
  background: #e74c3c;
  color: #fff;
}
.pm-attr-revenue {
  background: #27ae60;
  color: #fff;
}
/* Inline budget values: {{bud:id.balance}} etc. */
.pm-budget-inline {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.pm-budget-inline.pm-budget-positive {
  color: #27ae60;
}
.pm-budget-inline.pm-budget-negative {
  color: #e74c3c;
}
.pm-attr-rate {
  background: #16a085;
  color: #fff;
}
/* Capacity */
.pm-attr-capacity {
  background: #85929e;
  color: #fff;
}
/* Datetime */
.pm-attr-date {
  background: #2c3e50;
  color: #fff;
}
/* Size / dimensions */
.pm-attr-size {
  background: #5dade2;
  color: #fff;
}
/* Status */
.pm-attr-status-open {
  background: #3498db;
  color: #fff;
}
.pm-attr-status-done {
  background: #27ae60;
  color: #fff;
}
.pm-attr-status-progress {
  background: #2980b9;
  color: #fff;
}
.pm-attr-status-cancelled {
  background: #95a5a6;
  color: #fff;
}
.pm-attr-status-confirmed {
  background: #27ae60;
  color: #fff;
}
.pm-attr-status-pending {
  background: #f39c12;
  color: #fff;
}
/* Priority */
.pm-attr-prio-high {
  background: #e74c3c;
  color: #fff;
}
.pm-attr-prio-med {
  background: #f39c12;
  color: #fff;
}
.pm-attr-prio-low {
  background: #95a5a6;
  color: #fff;
}
/* Tags */
.pm-attr-tag {
  background: #eee;
  color: #555;
}
/* Note */
.pm-attr-note {
  background: #f9e79f;
  color: #7d6608;
  cursor: help;
}
/* Contact */
.pm-attr-contact {
  background: #d5f5e3;
  color: #1e7e34;
}
/* Availability */
.pm-attr-available {
  background: #d6eaf8;
  color: #1b4f72;
}
/* Skills */
.pm-attr-skills {
  background: #fadbd8;
  color: #922b21;
}
/* Required / Optional */
.pm-attr-required {
  background: #e74c3c;
  color: #fff;
}
.pm-attr-optional {
  background: #bdc3c7;
  color: #2c3e50;
}
/* Link icon — styled as a small button */
.pm-link-icon {
  display: inline-block;
  font-size: 11px;
  line-height: 16px;
  padding: 0 5px;
  margin-left: 3px;
  border: 1px solid #ccc;
  border-radius: 3px;
  background: #f7f8f9;
  color: #555;
  text-decoration: none;
  cursor: pointer;
  vertical-align: middle;
}
.pm-link-icon:hover {
  background: #e8e8e8;
  border-color: #999;
  color: #333;
  text-decoration: none;
}
/* Dependency badge */
.pm-dep-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 0 5px;
  border-radius: 8px;
  margin-left: 3px;
  background: #2c3e50;
  color: #fff;
  vertical-align: middle;
}
/* Undefined reference inline warning */
.pm-ref-undefined {
  display: inline-block;
  background: #e74c3c;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 0 5px;
  border-radius: 8px;
  margin-left: 3px;
  cursor: help;
  vertical-align: middle;
}
/* Highlight modifier — yellow glow */
.pm-highlight {
  box-shadow: 0 0 0 2px #f1c40f;
}
/* Required modifier — red left border */
.pm-required {
  border-left: 3px solid #e74c3c;
}
/* Optional modifier — dashed border */
.pm-optional {
  border-style: dashed;
}
/* ===== Timeline inside portlet ===== */
#timeline {
  height: 100%;
}
#timeline .ec-resource {
  font-size: 12px;
  font-weight: 600;
}
#timeline .ec-toolbar {
  padding: 4px 8px;
  font-size: 12px;
}
#timeline .ec-button {
  font-size: 11px;
  padding: 2px 8px;
}
#timeline .ec-title {
  font-size: 13px;
}
/* Gridstack overrides */
.grid-stack-item-content {
  overflow: hidden;
}
/* ===== Panels Toggle Menu ===== */
.pm-panels-dropdown {
  position: relative;
  display: inline-block;
}
.pm-panels-menu {
  position: absolute;
  top: 100%;
  right: 0;
  /* Above Leaflet's map/tile/overlay panes (Leaflet uses up to z-index 700 for popups). */
  z-index: 1001;
  background: #fff;
  border: 1px solid var(--pm-border-color);
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  min-width: 160px;
}
.pm-panels-menu-item {
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.pm-panels-menu-item:hover {
  background: #f7f8f9;
}
.pm-panels-menu-check {
  font-size: 14px;
}
/* ===== Issues Panel ===== */
.pm-issue-count {
  display: inline-block;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  text-align: center;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  padding: 0 4px;
}
.pm-issue-count-error {
  background: #e74c3c;
}
.pm-issue-count-warning {
  background: #f39c12;
}
#panel-issues.pm-has-issues {
  border-color: #e74c3c;
}
#issues-content .pm-issue-item {
  padding: 5px 10px;
  font-size: 12px;
  border-bottom: 1px solid #f5f5f5;
}
#issues-content .pm-issue-item:last-child {
  border-bottom: none;
}
#issues-content .pm-issue-item-error {
  color: #922b21;
}
#issues-content .pm-issue-item-warning {
  color: #7d6608;
}
#issues-content .pm-issue-item-info {
  color: #1a5276;
}
/* Issue row: [icon] [message] [copy button, hidden until hover] */
#issues-content .pm-issue-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  position: relative;
}
#issues-content .pm-issue-glyph {
  flex: 0 0 auto;
  font-weight: 700;
  font-family: monospace;
  min-width: 12px;
}
#issues-content .pm-issue-msg {
  flex: 1 1 auto;
}
#issues-content .pm-issue-copy {
  flex: 0 0 auto;
  opacity: 0;
  transition: opacity 0.1s;
  background: transparent;
  border: 1px solid #ccc;
  border-radius: 3px;
  cursor: pointer;
  padding: 0 6px;
  font-size: 12px;
  line-height: 1.2;
  color: inherit;
}
#issues-content .pm-issue-item:hover .pm-issue-copy {
  opacity: 1;
}
#issues-content .pm-issue-copy:hover {
  background: rgba(0, 0, 0, 0.06);
}
/* ===== Schedule Panel ===== */
/* Golden Layout moves our template children directly into `.lm_content`.
   Make that container a flex column so the filter row stays pinned and only
   the main content scrolls (eliminating double scrollbars). */
.lm_content:has(> #schedule-filters),
.lm_content:has(> #timeline-filters),
.lm_content:has(> #preview-filters),
.lm_content:has(> #panel-issues) {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
#schedule-filters,
#timeline-filters,
#preview-filters,
#issues-filters {
  flex: 0 0 auto;
}
#panel-issues {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
}
#issues-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}
#timeline,
#panel-preview {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
.pm-schedule-panel-content {
  padding: 4px 0;
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;
}
.pm-schedule-panel-content .pm-schedule-item {
  padding: 4px 10px;
}
/* ===== Checklist Panel ===== */
/* Full-height checklist panel: pin filter row, single scroll on the content.
   GL moves template children directly into `.lm_content`, so style that wrapper
   via :has() selector on the hosted filter element. */
.lm_content:has(> #checklist-filters) {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
#checklist-filters {
  flex: 0 0 auto;
}
.pm-checklist-content {
  padding: 4px 0;
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;
}
.pm-checklist-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  font-size: 13px;
  border-bottom: 1px solid #f5f5f5;
  cursor: default;
}
.pm-checklist-item:last-child {
  border-bottom: none;
}
.pm-checklist-item:hover {
  background: #f7f8f9;
}
.pm-checklist-check {
  font-size: 16px;
  flex-shrink: 0;
}
.pm-checklist-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pm-checklist-type {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
  background: #7f8c8d;
  padding: 0 4px;
  border-radius: 2px;
  margin-right: 2px;
}
.pm-checklist-required .pm-checklist-check {
  color: #e74c3c;
}
.pm-checklist-optional {
  opacity: 0.6;
}
.pm-checklist-optional .pm-checklist-check {
  color: #bdc3c7;
}
.pm-checklist-optional .pm-checklist-label {
  font-style: italic;
}
.pm-checklist-done .pm-checklist-check {
  color: #27ae60;
}
.pm-checklist-done .pm-checklist-label {
  text-decoration: line-through;
  color: #7f8c8d;
}
.pm-checklist-open .pm-checklist-check {
  color: #95a5a6;
}
.pm-checklist-blocked .pm-checklist-check {
  color: #e74c3c;
}
.pm-checklist-wip .pm-checklist-check {
  color: #2980b9;
}
.pm-checklist-review .pm-checklist-check {
  color: #f39c12;
}
/* ===== Mermaid Diagrams ===== */
.pm-mermaid {
  margin: 12px 0;
  padding: 8px;
  background: #fafafa;
  border: 1px solid var(--pm-border-color);
  border-radius: 4px;
  overflow-x: auto;
}
.pm-mermaid svg {
  max-width: 100%;
  height: auto;
}
.pm-mermaid-loading {
  padding: 16px;
  text-align: center;
  color: #999;
  font-size: 12px;
}
.pm-mermaid-error {
  padding: 8px 12px;
  background: #fdedec;
  color: #922b21;
  border-radius: 3px;
  font-size: 12px;
}
/* ===== Click to source ===== */
.pm-clickable {
  cursor: pointer;
}
.pm-clickable:hover {
  opacity: 0.8;
  box-shadow: 0 0 0 2px rgba(87, 85, 217, 0.3);
  border-radius: 3px;
}
/* ===== Presence / Remote Cursors ===== */
.pm-presence-bar {
  display: flex;
  gap: 4px;
  align-items: center;
}
.pm-presence-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  cursor: default;
  line-height: 1;
}
/* Remote cursor label floating in the editor */
.pm-remote-cursor-label {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 2px;
  pointer-events: none;
  white-space: nowrap;
  line-height: 14px;
  opacity: 0.9;
}
/* ===== Kanban Board ===== */
.pm-kanban {
  height: 100%;
  overflow: hidden;
}
.pm-kanban-board {
  display: flex;
  gap: 6px;
  height: 100%;
  padding: 6px;
  overflow-x: auto;
}
.pm-kanban-column {
  flex: 1;
  min-width: 140px;
  display: flex;
  flex-direction: column;
  background: #f7f8f9;
  border-radius: 4px;
  overflow: hidden;
}
.pm-kanban-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-top: 3px solid #ccc;
  background: #eee;
  flex-shrink: 0;
}
.pm-kanban-col-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #555;
  letter-spacing: 0.3px;
}
.pm-kanban-col-count {
  font-size: 10px;
  font-weight: 700;
  color: #999;
  background: #ddd;
  border-radius: 8px;
  padding: 0 5px;
  line-height: 16px;
}
.pm-kanban-col-body {
  flex: 1;
  overflow-y: auto;
  padding: 4px;
  min-height: 40px;
}
/* Cards */
.pm-kanban-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 6px 8px;
  margin-bottom: 4px;
  cursor: grab;
  font-size: 12px;
  transition: box-shadow 0.1s;
}
.pm-kanban-card:hover {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}
.pm-kanban-card-type {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
  background: #7f8c8d;
  padding: 0 4px;
  border-radius: 2px;
  margin-right: 4px;
  vertical-align: middle;
}
.pm-kanban-card-task .pm-kanban-card-type {
  background: #1b4f72;
}
.pm-kanban-card-todo .pm-kanban-card-type {
  background: #6c3483;
}
.pm-kanban-card-title {
  font-weight: 600;
  color: #2c3e50;
}
.pm-kanban-card-meta {
  margin-top: 4px;
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
}
.pm-kanban-meta-badge {
  font-size: 9px;
  font-weight: 600;
  padding: 0 4px;
  border-radius: 6px;
  line-height: 14px;
}
.pm-kanban-meta-assignee {
  background: #d2b4de;
  color: #6c3483;
}
.pm-kanban-meta-high {
  background: #e74c3c;
  color: #fff;
}
.pm-kanban-meta-med {
  background: #f39c12;
  color: #fff;
}
.pm-kanban-meta-low {
  background: #95a5a6;
  color: #fff;
}
.pm-kanban-meta-dep {
  background: #2c3e50;
  color: #fff;
}
/* Priority indicator on card */
.pm-kanban-prio-high {
  border-left: 3px solid #e74c3c;
}
.pm-kanban-prio-low {
  border-left: 3px solid #95a5a6;
}
/* Drag states */
.pm-kanban-ghost {
  opacity: 0.4;
  background: #ebf5fb;
}
.pm-kanban-chosen {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.pm-kanban-drag {
  opacity: 0.9;
}
/* ===== Properties Panel ===== */
.pm-properties-content {
  padding: 0;
}
/* ===== Properties Panel ===== */
.pm-props-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: #f7f8f9;
  border-bottom: 1px solid #e0e0e0;
}
.pm-props-type {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
  background: #5755d9;
  padding: 1px 6px;
  border-radius: 3px;
}
.pm-props-id-input {
  font-size: 12px;
  font-weight: 600;
  color: #2c3e50;
  font-family: "SF Mono", Consolas, monospace;
  flex: 1;
  border: 1px solid transparent;
  background: transparent;
  padding: 1px 4px;
  border-radius: 3px;
  min-width: 0;
}
.pm-props-id-input:not([readonly]) {
  border-color: #5755d9;
  background: #fff;
}
.pm-props-id-unlock,
.pm-props-copy-id {
  font-size: 11px;
  padding: 1px 5px;
  cursor: pointer;
  opacity: 0.5;
  flex-shrink: 0;
}
.pm-props-id-unlock:hover,
.pm-props-copy-id:hover {
  opacity: 1;
}
.pm-props-section {
  border-bottom: 1px solid #eee;
  padding: 4px 0;
}
.pm-props-section-title {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #aaa;
  padding: 4px 10px 2px;
}
.pm-props-field {
  display: flex;
  align-items: flex-start;
  padding: 3px 10px;
  gap: 6px;
}
.pm-props-label {
  font-size: 11px;
  color: #7f8c8d;
  min-width: 80px;
  padding-top: 4px;
  flex-shrink: 0;
}
.pm-props-input {
  flex: 1;
  font-size: 12px;
  padding: 3px 6px;
  border: 1px solid #ddd;
  border-radius: 3px;
  background: #fff;
  font-family: inherit;
  min-width: 0;
}
.pm-props-input:focus {
  border-color: #5755d9;
  outline: none;
  box-shadow: 0 0 0 2px rgba(87, 85, 217, 0.15);
}
select.pm-props-input {
  padding: 2px 4px;
}
textarea.pm-props-input {
  resize: vertical;
  min-height: 36px;
}
/* Checkbox */
.pm-props-checkbox {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 3px;
}
/* Color picker */
.pm-props-color-wrap {
  display: flex;
  gap: 4px;
  flex: 1;
}
.pm-props-color-input {
  width: 32px;
  height: 26px;
  padding: 1px;
  border: 1px solid #ddd;
  border-radius: 3px;
  cursor: pointer;
  flex: none;
}
.pm-props-color-text {
  flex: 1;
  font-family: "SF Mono", Consolas, monospace;
  font-size: 11px;
}
/* Datetime with Now button */
.pm-props-datetime-wrap,
.pm-props-link-wrap {
  display: flex;
  gap: 4px;
  flex: 1;
}
.pm-props-datetime-wrap .pm-props-input,
.pm-props-link-wrap .pm-props-input {
  flex: 1;
}
.pm-props-btn-now,
.pm-props-btn-open-link {
  padding: 2px 6px;
  font-size: 12px;
  cursor: pointer;
  flex: none;
}
/* Multiselect dropdown */
.pm-msd {
  position: relative;
  width: 100%;
}
.pm-msd.disabled {
  opacity: 0.4;
  pointer-events: none;
}
.pm-msd-display {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px;
  min-height: 26px;
  padding: 2px 6px;
  border: 1px solid #e0e0e0;
  border-radius: 3px;
  cursor: pointer;
  background: #fff;
  font-size: 11px;
}
.pm-msd-display:hover {
  border-color: #5755d9;
}
.pm-msd-tag {
  display: inline-block;
  background: #e8e7fc;
  color: #5755d9;
  padding: 1px 6px;
  border-radius: 2px;
  font-size: 10px;
  font-weight: 500;
}
.pm-msd-placeholder {
  color: #bbb;
  font-size: 11px;
}
.pm-msd-arrow {
  margin-left: auto;
  font-size: 10px;
  color: #999;
}
.pm-msd-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 180px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-top: none;
  border-radius: 0 0 3px 3px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  z-index: 10;
}
.pm-msd-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
}
.pm-msd-item:hover {
  background: #f5f5ff;
}
.pm-msd-item input[type="checkbox"] {
  margin: 0;
  flex-shrink: 0;
}
.pm-msd-empty {
  padding: 6px 8px;
  font-size: 11px;
  color: #999;
}
/* Add expression button */
.pm-props-add-wrap {
  padding: 8px 10px;
  border-top: 1px solid #e0e0e0;
}
.pm-props-add-btn {
  justify-content: center;
  color: #5755d9;
  font-weight: 500;
}
.pm-props-add-btn:hover {
  background: #f5f5ff;
}
/* Computed / readonly values */
.pm-props-computed {
  font-size: 11px;
  color: #666;
  padding: 3px 0;
  font-style: italic;
}
.pm-props-resolved {
  color: #27ae60;
  font-weight: 500;
  font-style: normal;
}
.pm-props-resolved-err {
  color: #e74c3c;
}
.pm-props-cost {
  color: #e74c3c;
  font-weight: 500;
  font-size: 11px;
}
.pm-props-revenue {
  color: #27ae60;
  font-weight: 500;
  font-size: 11px;
}
/* Scoped attributes list */
.pm-props-scoped-list {
  flex: 1;
}
.pm-props-scoped-row {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-bottom: 3px;
}
.pm-props-scoped-type {
  width: 70px;
  font-size: 11px;
  padding: 2px 3px;
  flex: none;
}
.pm-props-scoped-at,
.pm-props-scoped-eq {
  font-size: 11px;
  color: #999;
  flex: none;
}
.pm-props-scoped-target {
  width: 80px;
  font-size: 11px;
  padding: 2px 4px;
  flex: none;
}
.pm-props-scoped-value {
  flex: 1;
  font-size: 11px;
  padding: 2px 4px;
  min-width: 60px;
}
.pm-props-scoped-remove {
  padding: 1px 5px;
  font-size: 12px;
  color: #e74c3c;
  cursor: pointer;
  flex: none;
}
.pm-props-scoped-add {
  font-size: 10px;
  margin-top: 2px;
}
/* ===== Block Lock Labels ===== */
.pm-lock-label {
  position: absolute;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  padding: 1px 4px;
  border-radius: 2px;
  pointer-events: none;
  z-index: 50;
  line-height: 14px;
}
/* ===== Conflict Modal ===== */
.pm-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pm-modal {
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  max-width: 900px;
  width: 90%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}
.pm-modal-header {
  padding: 12px 16px;
  border-bottom: 1px solid #e0e0e0;
  background: #f7f8f9;
  border-radius: 6px 6px 0 0;
}
.pm-modal-title {
  font-size: 14px;
  font-weight: 700;
  color: #e74c3c;
}
.pm-modal-body {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
}
.pm-modal-body p {
  margin: 0 0 12px;
  font-size: 13px;
  color: #555;
}
.pm-modal-footer {
  padding: 12px 16px;
  border-top: 1px solid #e0e0e0;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.pm-conflict-columns {
  display: flex;
  gap: 12px;
}
.pm-conflict-col {
  flex: 1;
  min-width: 0;
}
.pm-conflict-col-header {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 3px 3px 0 0;
  color: #fff;
}
.pm-conflict-mine {
  background: #2980b9;
}
.pm-conflict-theirs {
  background: #e67e22;
}
.pm-conflict-editor {
  display: inline-block;
  width: 22px;
  height: 22px;
  line-height: 22px;
  text-align: center;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  margin-right: 6px;
  vertical-align: middle;
}
.pm-conflict-pre {
  font-size: 11px;
  background: #f9f9f9;
  border: 1px solid #ddd;
  padding: 8px;
  max-height: 300px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
  border-radius: 0 0 3px 3px;
  margin: 0;
}
/* ===== Empty state ===== */
/* Reusable per-panel filter chip row (Spectre chip + active state) */
.pm-panel-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px 8px;
  border-bottom: 1px solid #eef0f2;
  background: #fafbfc;
}
.pm-filter-chip {
  cursor: pointer;
  user-select: none;
  background: #e7e9ed !important;
  color: #555;
  font-size: 11px;
}
.pm-filter-chip:hover {
  background: #dde0e4 !important;
}
.pm-filter-chip-on {
  background: #5755d9 !important;
  color: #fff !important;
}
.pm-filter-icon {
  margin-right: 3px;
}
/* Movement (derived from place@TIME=) — distinct from tasks/todos */
.pm-movement-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-bottom: 1px solid #f0f1f3;
  font-size: 12px;
  cursor: pointer;
}
.pm-movement-row:hover {
  background: #f4f5f7;
}
.pm-movement-row .pm-movement-time {
  font-weight: 600;
  color: #333;
  min-width: 110px;
}
.pm-movement-row .pm-movement-label {
  flex: 1;
}
.pm-movement-row .pm-movement-arrow {
  color: #9b59b6;
  font-weight: 700;
}
.pm-movement-row .pm-movement-from,
.pm-movement-row .pm-movement-to {
  font-weight: 600;
}
.pm-movement-row .pm-movement-owner {
  background: #eaeaf7;
  color: #5755d9;
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 10px;
}
/* Log quick-insert modal (subject picker) */
.pm-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pm-modal {
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  width: 480px;
  height: 60vh;
  max-height: 560px;
  display: flex;
  flex-direction: column;
}
.pm-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid #eee;
  font-weight: 600;
}
.pm-modal-body {
  padding: 10px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.pm-modal-body .pm-log-filter {
  width: 100%;
  margin-bottom: 8px;
  flex: 0 0 auto;
}
.pm-modal-body .pm-log-options {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}
.pm-modal-body .pm-log-option {
  padding: 5px 8px;
  border-radius: 4px;
  cursor: pointer;
}
.pm-modal-body .pm-log-option:hover {
  background: #f0f0fb;
}
.pm-modal-body .pm-log-option .pm-log-option-meta {
  color: #888;
  font-size: 11px;
  margin-left: 6px;
}
.pm-modal-body .pm-log-option-hidden {
  display: none;
}
.pm-modal-body .pm-log-option-active {
  background: #5755d9;
  color: #fff;
}
.pm-modal-body .pm-log-option-active .pm-log-option-meta {
  color: #dcd9f2;
}
.pm-modal-body .pm-log-option-checked {
  background: #eef3ff;
}
.pm-modal-body .pm-log-option-checked.pm-log-option-active {
  background: #5755d9;
}
.pm-modal-body .pm-log-option-checked .pm-log-option-check {
  color: #2471a3;
  font-weight: 700;
}
.pm-modal-body .pm-log-option-check {
  display: inline-block;
  width: 14px;
  color: #999;
  font-family: monospace;
}
.pm-modal-body .pm-log-option-project {
  font-style: italic;
  border-bottom: 1px solid #eee;
  margin-bottom: 4px;
  padding-bottom: 6px;
}
.pm-modal-close {
  padding: 0 6px;
  font-size: 14px;
  line-height: 1;
}
.pm-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px 14px;
  border-top: 1px solid #eee;
  background: #fafbfc;
}
.pm-log-count {
  margin-right: auto;
  font-size: 11px;
  color: #666;
}
.pm-log-hint {
  font-size: 10px;
  color: #888;
  padding: 2px 0 6px;
  font-style: italic;
}
.pm-props-log-title {
  flex: 1;
  font-weight: 600;
  color: #5e3a8e;
  padding: 0 6px;
}
/* Block-member highlight — purple outline/pulse (distinct from single-entity yellow flash) */
.pm-block-highlight {
  outline: 2px solid #9b59b6 !important;
  outline-offset: 2px;
  animation: pm-block-highlight-kf 0.8s ease-out;
}
@keyframes pm-block-highlight-kf {
  0% {
    background: #e0cbf3;
  }
  100% {
    background: inherit;
  }
}
/* Log entity rendering in Preview */
.pm-entity-log {
  background: #f4e8ff;
  border-color: #b794d4;
  color: #5e3a8e;
}
.pm-entity-log .pm-entity-log-time {
  font-family: monospace;
  font-weight: 600;
  margin-right: 4px;
}
/* ===== Data Portlet (DataTables + type chips + global search) ===== */
.pm-data-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
.pm-data-chips-wrap {
  flex: 0 0 auto;
  padding: 6px 8px;
  border-bottom: 1px solid #eef0f2;
  background: #fafbfc;
}
.pm-data-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.pm-data-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 12px;
  background: #eef0f2;
  color: #444;
  cursor: pointer;
  font-size: 12px;
  user-select: none;
  border: 1px solid transparent;
  outline: none;
}
.pm-data-chip i {
  color: var(--pm-type-color, #666);
  font-size: 14px;
  line-height: 1;
}
.pm-data-chip:hover {
  background: #e4e7eb;
}
.pm-data-chip:focus {
  border-color: var(--pm-type-color, #5755d9);
}
.pm-data-chip-active {
  background: var(--pm-type-color, #5755d9) !important;
  color: #fff !important;
}
.pm-data-chip-active i {
  color: #fff !important;
}
.pm-data-chip-count {
  background: rgba(0, 0, 0, 0.1);
  padding: 0 5px;
  border-radius: 8px;
  font-size: 10px;
  min-width: 18px;
  text-align: center;
}
.pm-data-chip-active .pm-data-chip-count {
  background: rgba(255, 255, 255, 0.25);
}
.pm-data-search-wrap {
  position: relative;
  padding: 6px 8px;
  flex: 0 0 auto;
  border-bottom: 1px solid #eef0f2;
}
.pm-data-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  pointer-events: none;
}
.pm-data-search {
  padding-left: 26px !important;
}
.pm-data-search-results {
  position: absolute;
  left: 8px;
  right: 8px;
  top: 100%;
  background: #fff;
  border: 1px solid #ccc;
  border-top: none;
  border-radius: 0 0 4px 4px;
  max-height: 40vh;
  overflow-y: auto;
  z-index: 1001;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: none;
}
.pm-data-search-item {
  padding: 6px 10px;
  cursor: pointer;
  font-size: 12px;
}
.pm-data-search-item:hover {
  background: #f0f0fb;
}
.pm-data-search-item .pm-data-search-meta {
  color: #888;
  font-size: 11px;
  margin-left: 6px;
}
.pm-data-search-active {
  background: #5755d9 !important;
  color: #fff !important;
}
.pm-data-search-active .pm-data-search-meta {
  color: #dcd9f2 !important;
}
.pm-data-search-empty {
  padding: 8px 10px;
  color: #888;
  font-style: italic;
}
.pm-data-table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 4px 8px;
}
.pm-data-table-wrap #data-table {
  width: 100%;
  font-size: 12px;
}
.pm-data-table-wrap tbody tr {
  cursor: pointer;
}
.pm-data-table-wrap tbody tr:hover {
  background: #f4f5f7;
}
.pm-data-table-wrap tbody tr.pm-data-row-highlight {
  background: #fff7d6 !important;
  animation: pm-data-row-flash 1.8s ease-out;
}
.pm-data-table-wrap tbody tr.pm-data-block-highlight {
  outline: 2px solid #9b59b6;
  outline-offset: -2px;
  background: #f5ecff !important;
}
.pm-data-table-wrap td.pm-data-resolved {
  color: #666;
  font-size: 11px;
  font-style: italic;
}
@keyframes pm-data-row-flash {
  0% {
    background: #ffd54f;
  }
  100% {
    background: #fff7d6;
  }
}
.pm-empty {
  padding: 20px;
  text-align: center;
  color: #aaa;
  font-size: 12px;
}
/* ===== Save Indicator ===== */
.pm-save-indicator {
  font-size: 11px;
  margin-left: 8px;
  padding: 1px 6px;
  border-radius: 3px;
}
.pm-unsaved {
  background: #fdf2e9;
  color: #935116;
}
.pm-saved {
  background: #eafaf1;
  color: #1e7e34;
}
/* ===== Toast Notifications ===== */
.pm-toast-container {
  position: fixed;
  top: 50px;
  right: 12px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}
.pm-toast {
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 13px;
  color: #fff;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: auto;
}
.pm-toast-visible {
  opacity: 1;
  transform: translateX(0);
}
.pm-toast-success {
  background: #27ae60;
}
.pm-toast-error {
  background: #e74c3c;
}
.pm-toast-warning {
  background: #f39c12;
}
.pm-toast-info {
  background: #2980b9;
}
/* ===== Project List Dropdown ===== */
.pm-projects-dropdown {
  position: relative;
  display: inline-block;
}
.pm-project-list {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 100;
  background: #fff;
  border: 1px solid var(--pm-border-color);
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  min-width: 280px;
  max-height: 400px;
  overflow-y: auto;
}
.pm-project-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  text-decoration: none;
  color: #333;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.1s;
}
.pm-project-item:hover {
  background: #f7f8f9;
  text-decoration: none;
  color: #333;
}
.pm-project-item-active {
  background: #ebf5fb;
  font-weight: 600;
}
.pm-project-item-title {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 180px;
}
.pm-project-item-date {
  font-size: 11px;
  color: #999;
  white-space: nowrap;
}
.pm-project-list-loading,
.pm-project-list-empty {
  padding: 12px;
  text-align: center;
  color: #999;
  font-size: 13px;
}
/* ===== Error Display in Preview ===== */
.pm-errors {
  margin-top: 20px;
  border: 1px solid #f5b7b1;
  border-radius: 4px;
  background: #fdedec;
  overflow: hidden;
}
.pm-errors-header {
  padding: 6px 12px;
  background: #f5b7b1;
  color: #922b21;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.pm-error-item {
  padding: 5px 12px;
  font-size: 13px;
  border-bottom: 1px solid #f5c6c0;
}
.pm-error-item:last-child {
  border-bottom: none;
}
.pm-error-error {
  color: #922b21;
}
.pm-error-warning {
  color: #7d6608;
}
.pm-error-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  line-height: 16px;
  text-align: center;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
}
.pm-error-error .pm-error-icon {
  background: #e74c3c;
  color: #fff;
}
.pm-error-warning .pm-error-icon {
  background: #f39c12;
  color: #fff;
}
.lm_tab.lm_active {
  border-bottom: none !important;
  border-top: 2px solid #5755d9 !important;
}
/* ===== Budget Table ===== */
.pm-budget-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.pm-budget-table th,
.pm-budget-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--pm-border-color);
  white-space: nowrap;
}
.pm-budget-table thead th {
  background: var(--pm-header-bg);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.3px;
  color: #666;
  position: sticky;
  top: 0;
  z-index: 1;
}
.pm-budget-table .pm-budget-name {
  text-align: left;
  min-width: 140px;
}
.pm-budget-table .pm-budget-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  min-width: 90px;
}
.pm-budget-table .pm-budget-negative {
  color: #e74c3c;
  font-weight: 600;
}
.pm-budget-table .pm-budget-positive {
  color: #27ae60;
  font-weight: 600;
}
.pm-budget-table .pm-budget-row:hover {
  background: #f5f5ff;
}
.pm-budget-table .pm-budget-sub-item td {
  color: #666;
  font-size: 11px;
}
.pm-budget-table .pm-budget-sub-item:hover {
  background: #f9f9ff;
}
.pm-budget-table .pm-budget-sub-icon {
  color: #999;
  font-size: 10px;
}
.pm-budget-table .pm-budget-sub-label {
  font-weight: 400;
}
.pm-budget-table .pm-budget-sub-type {
  font-size: 9px;
  color: #aaa;
  margin-left: 4px;
  text-transform: uppercase;
}
.pm-budget-table .pm-budget-sub-calc {
  font-size: 10px;
  color: #999;
  font-style: italic;
}
.pm-budget-table .pm-budget-paid-full {
  font-size: 9px;
  color: #27ae60;
  font-weight: 600;
  margin-left: 6px;
}
.pm-budget-table .pm-budget-paid-partial {
  font-size: 9px;
  color: #f39c12;
  font-weight: 600;
  margin-left: 6px;
}
.pm-budget-table .pm-budget-toggle {
  font-size: 8px;
  color: #999;
  cursor: pointer;
  user-select: none;
}
.pm-budget-table .pm-budget-toggle:hover {
  color: #5755d9;
}
.pm-budget-table .pm-budget-label {
  font-weight: 500;
}
.pm-budget-table .pm-budget-depth-0 .pm-budget-label {
  font-weight: 600;
}
.pm-budget-table .pm-budget-type-badge {
  display: inline-block;
  font-size: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 4px;
  vertical-align: middle;
  color: #fff;
}
.pm-budget-table .pm-budget-note {
  font-size: 10px;
  color: #999;
  cursor: help;
}
.pm-budget-table .pm-budget-note:hover {
  color: #5755d9;
}
.pm-budget-table .pm-budget-type-purchase {
  background: #2980b9;
}
.pm-budget-table .pm-budget-type-fixed {
  background: #8e44ad;
}
.pm-budget-table .pm-budget-type-income {
  background: #27ae60;
}
.pm-budget-table .pm-budget-bar-cell {
  min-width: 120px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pm-budget-table .pm-budget-bar-bg {
  flex: 1;
  height: 8px;
  background: #eee;
  border-radius: 4px;
  overflow: hidden;
}
.pm-budget-table .pm-budget-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}
.pm-budget-table .pm-budget-ok {
  background: #27ae60;
}
.pm-budget-table .pm-budget-warn {
  background: #f39c12;
}
.pm-budget-table .pm-budget-over {
  background: #e74c3c;
}
.pm-budget-table .pm-budget-pct {
  font-size: 10px;
  color: #888;
  min-width: 30px;
  text-align: right;
}
.pm-budget-table tfoot td {
  border-top: 2px solid #333;
  background: var(--pm-header-bg);
}
.pm-budget-table .pm-budget-total .pm-budget-bar-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}
.pm-budget-currency-warn {
  padding: 8px 12px;
  margin: 8px;
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 4px;
  font-size: 12px;
  color: #856404;
}
/* ===== Mindmap ===== */
.pm-mindmap-svg {
  display: block;
}
.pm-mindmap-node:hover rect {
  filter: brightness(0.92);
}
.pm-mindmap-node:hover text {
  font-weight: 600;
}
input::placeholder {
  color: #ccc;
  font-weight: lighter;
}
/* ===== Map Portlet ===== */
.pm-map-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}
#map-container {
  flex: 1;
  min-height: 200px;
}
.pm-map-slider-wrap {
  border-top: 1px solid #e0e0e0;
  background: #f7f8f9;
}
.pm-map-slider {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
}
.pm-map-slider .btn-group {
  gap: 0;
  margin-right: 4px;
}
.pm-map-slider .btn-group .btn {
  border-color: #e0e0e0;
  background: #fff;
}
.pm-map-slider .btn-group .btn + .btn {
  border-left-color: transparent;
}
.pm-map-range {
  flex: 1;
  height: 4px;
  cursor: pointer;
}
.pm-map-time-label {
  font-size: 11px;
  font-weight: 600;
  color: #333;
  min-width: 110px;
  text-align: center;
}
.pm-map-speed {
  width: 55px;
  font-size: 10px;
  height: 22px;
  padding: 1px 3px;
}
.pm-map-repeat-on {
  background: #5755d9;
  color: #fff;
  border-color: #5755d9;
}
/* "Arriving from nowhere" stacked cards left of a place pin */
.pm-map-arriving-card-icon {
  background: none !important;
  border: none !important;
}
.pm-map-arriving-card {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 12px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
  line-height: 1.3;
}
.pm-map-arriving-card i {
  font-size: 14px;
  color: #fff;
  flex: 0 0 auto;
}
.pm-map-arriving-label {
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90px;
}
/* Chip dropped on an inbound/outbound arrow near the target end.
   Inbound (arriving) = solid filled pill (item color bg, white text/icon).
   Outbound (leaving) = outlined pill (white bg, colored border + icon). */
.pm-map-arrow-chip-icon {
  background: none !important;
  border: none !important;
}
.pm-map-arrow-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  border: 2px solid currentColor;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  white-space: nowrap;
  cursor: pointer;
}
.pm-map-arrow-chip i {
  font-size: 12px;
  flex: 0 0 auto;
}
.pm-map-arrow-chip:hover {
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}
.pm-map-arrow-chip-in {
  color: #fff;
  border-color: transparent;
}
.pm-map-arrow-chip-in i {
  color: #fff;
}
.pm-map-arrow-chip-in .pm-map-arrow-chip-label {
  color: #fff;
}
.pm-map-arrow-chip-out {
  background: #fff;
}
.pm-map-arrow-chip-out i {
  color: inherit;
}
.pm-map-arrow-chip-out .pm-map-arrow-chip-label {
  color: #222;
}
.pm-map-arrow-chip-label {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90px;
}
.pm-map-arrow-tt {
  background: rgba(255, 255, 255, 0.96) !important;
  border: 1px solid #999 !important;
  color: #222 !important;
  font-size: 11px;
  padding: 4px 8px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.pm-map-arrow-tt:before {
  display: none !important;
}
/* Per-item marker drawn along an F12'd trajectory (offset from the place pin) */
.pm-map-item-pin {
  background: none !important;
  border: none !important;
}
.pm-map-item-pin span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #fff;
  font-size: 14px;
  border: 2px solid #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}
/* Group marker tooltip on the map: member list with click-to-source */
.pm-map-grp-tt-wrap {
  background: rgba(255, 255, 255, 0.96) !important;
  border: 1px solid #bbb !important;
  color: #222 !important;
  padding: 4px 6px !important;
  font-size: 11px !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25) !important;
  white-space: nowrap;
}
.pm-map-grp-tt-wrap:before {
  display: none !important;
}
.pm-map-grp-tt-wrap .pm-map-grp-members {
  margin-top: 4px;
  border-top: 1px solid #ddd;
  padding-top: 4px;
}
.pm-map-grp-tt-wrap .pm-map-grp-member {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 2px 4px;
  border-radius: 3px;
  cursor: pointer;
}
.pm-map-grp-tt-wrap .pm-map-grp-member:hover {
  background: #eef;
}
.pm-map-grp-tt-wrap .pm-map-grp-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  color: #fff;
  font-size: 10px;
}
.pm-map-item-row-hl,
.pm-map-list-row.pm-map-item-row-hl {
  background: #ffe98a !important;
  font-weight: 700;
}
/* Place marker: SVG pin + optional item-count badge */
.pm-map-place-marker-badged {
  background: none !important;
  border: none !important;
  position: relative;
}
.pm-map-place-marker-badged .pm-map-pin-svg {
  display: block;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}
.pm-map-place-marker-badged .pm-map-place-badge {
  position: absolute;
  top: -6px;
  right: -10px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: #e74c3c;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  z-index: 1000;
}
/* Permanent place label (tooltip) above pin */
.pm-map-place-label {
  background: rgba(255, 255, 255, 0.9) !important;
  border: 1px solid #bbb !important;
  color: #222 !important;
  font-size: 11px !important;
  font-weight: 600;
  padding: 1px 6px !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15) !important;
}
.pm-map-place-label:before {
  display: none !important;
}
/* Item list below a place pin (shown at high zoom) */
.pm-map-list-tooltip {
  background: rgba(255, 255, 255, 0.96) !important;
  border: 1px solid #bbb !important;
  color: #222 !important;
  padding: 0 !important;
  font-size: 11px !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25) !important;
  white-space: nowrap;
}
.pm-map-list-tooltip:before {
  display: none !important;
}
.pm-map-list-tooltip .pm-map-list-header {
  font-weight: 700;
  padding: 3px 8px;
  background: #f2f3f5;
  border-bottom: 1px solid #ddd;
}
.pm-map-list-tooltip .pm-map-list-row {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  cursor: pointer;
}
.pm-map-list-tooltip .pm-map-list-row:hover {
  background: #eef;
}
.pm-map-list-tooltip .pm-map-list-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  color: #fff;
  font-size: 10px;
  flex: 0 0 auto;
}
.pm-map-list-tooltip .pm-map-list-label {
  font-weight: 500;
}
.pm-map-popup {
  font-size: 12px;
}
.pm-map-popup .pm-map-addr {
  color: #666;
  font-size: 11px;
}
.pm-map-popup .pm-map-item-row {
  padding: 2px 4px;
  cursor: pointer;
  border-radius: 3px;
}
.pm-map-popup .pm-map-item-row:hover {
  background: #eef;
}
.pm-map-popup .pm-map-item-icon {
  display: inline-block;
  width: 16px;
  text-align: center;
  color: #fff;
  border-radius: 3px;
}
.pm-map-popup .pm-map-item-icon.pm-map-item-resource {
  background: #3498db;
}
.pm-map-popup .pm-map-item-icon.pm-map-item-equip {
  background: #e67e22;
}
.pm-map-popup .pm-map-item-icon.pm-map-item-material {
  background: #27ae60;
}
/* Legacy item marker class kept for any stale references */
.pm-map-item-marker {
  background: none !important;
  border: none !important;
}
.pm-map-item-marker span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #fff;
  font-size: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
