:root {
  --bg: #1c1f24;
  --bar: #2a2f36;
  --bar2: #232730;
  --text: #e9edf2;
  --muted: #b7c0cc;
  --accent: #4c86ff;
  --shadow: 0 18px 45px rgba(0, 0, 0, .45);
}

/* Base */
html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: radial-gradient(1200px 600px at 50% 0%, rgba(76, 134, 255, .18), transparent 60%),
    radial-gradient(900px 500px at 10% 25%, rgba(255, 88, 88, .12), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  overflow-x: hidden;
}

/* Top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(180deg, var(--bar), var(--bar2));
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .35);
}

.topbar .inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Tabs */
.tabs {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}



/* Favorites header - same height as PM header */
.favTabsHeader {
  margin-bottom: 20px;
}
.favTabsHeader .d-flex {
  margin-bottom: 12px;
}

.tab {
  padding: 7px 16px;
  border: none;
  background: transparent;
  color: rgba(233,237,242,.55);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color .14s, border-color .14s;
}

.tab:hover {
  color: rgba(233,237,242,.85);
}

.tab.active {
  color: rgba(233,237,242,.95);
  border-bottom-color: var(--accent);
}

.tabPlus {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .09);
  color: rgba(233, 237, 242, .92);
  font-weight: 900;
  cursor: pointer;
}

.tabPlus:hover {
  filter: brightness(1.08);
}

/* ===== Dashboard Widgets ===== */
.widgetsRow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.widget {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform .12s ease, box-shadow .12s ease;
}
.widget:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
}

.theme-day .widget {
  background: rgba(255, 255, 255, .8);
  border-color: rgba(0, 0, 0, .08);
}

.widgetIcon {
  font-size: 32px;
  line-height: 1;
  opacity: .9;
}

.widgetContent {
  flex: 1;
  min-width: 0;
}

.widgetValue {
  font-size: 18px;
  font-weight: 700;
  color: rgba(233, 237, 242, .95);
  line-height: 1.2;
  margin-bottom: 2px;
}
.theme-day .widgetValue {
  color: rgba(10, 16, 25, .95);
}

.widgetLabel {
  font-size: 11px;
  color: rgba(233, 237, 242, .55);
  text-transform: uppercase;
  letter-spacing: .03em;
  font-weight: 600;
}
.theme-day .widgetLabel {
  color: rgba(10, 16, 25, .55);
}

.widgetBtn {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .12s;
}
.widgetBtn:hover {
  opacity: .85;
}
.widgetBtn:active {
  opacity: .7;
}

/* Responsive: stack on small screens */
@media (max-width: 768px) {
  .widgetsRow {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .widgetsRow {
    grid-template-columns: 1fr;
  }
}


/* Icon buttons */
.iconbar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.iconbtn {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .09);
  color: rgba(233, 237, 242, .92);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.iconbtn:hover {
  filter: brightness(1.08);
}

.iconbtn svg {
  width: 18px;
  height: 18px;
  opacity: .9
}

/* Hide topbar tabs container (tabs now in content area) */
.topbar .tabs {
  display: none;
}


/* Main */
.wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 26px 18px 42px;
}

/* Search pill */
.searchWrap {
  display: flex;
  justify-content: center;
  margin: 18px 0 28px;
}

.searchPill {
  width: min(900px, calc(100vw - 36px));
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 999px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
  backdrop-filter: blur(10px);
}

.searchPill .lens {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 9px;
  flex: 0 0 auto;
}

.searchPill input {
  width: 100%;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--text);
  font-size: 14px;
}

.searchPill input::placeholder {
  color: rgba(233, 237, 242, .62);
}

/* Tiles grid */
.grid {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.grid > * {
  flex: 0 0 calc((100% - 6 * 18px) / 7);
  max-width: calc((100% - 6 * 18px) / 7);
}

@media (max-width: 1280px) {
  .grid > * {
    flex: 0 0 calc((100% - 4 * 18px) / 5);
    max-width: calc((100% - 4 * 18px) / 5);
  }
}

@media (max-width: 980px) {
  .grid > * {
    flex: 0 0 calc((100% - 2 * 18px) / 3);
    max-width: calc((100% - 2 * 18px) / 3);
  }
}

@media (max-width: 680px) {
  .grid > * {
    flex: 0 0 calc((100% - 1 * 18px) / 2);
    max-width: calc((100% - 1 * 18px) / 2);
  }
}

.tile {
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .40);
  cursor: grab;
  user-select: none;
  transform: translateZ(0);
  transition: transform .06s ease, filter .06s ease;
}

.tile:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
}

.tile:active {
  cursor: grabbing;
  transform: translateY(-1px);
}

.thumb {
  aspect-ratio: 16 / 11;
  background: linear-gradient(135deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .02));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb .favicon {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: rgba(0, 0, 0, .32);
  border: 1px solid rgba(255, 255, 255, .18);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  backdrop-filter: blur(6px);
}

.thumb .favicon img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, .35));
}

/* Hover actions (Edit/Delete) */
.thumb .actions {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 8px;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity .12s ease, transform .12s ease;
  pointer-events: none;
}

.tile:hover .thumb .actions {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.actbtn {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  background: rgba(0, 0, 0, .32);
  border: 1px solid rgba(255, 255, 255, .18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  cursor: pointer;
  padding: 0;
}

.actbtn:hover {
  filter: brightness(1.12);
}

.actbtn svg {
  width: 16px;
  height: 16px;
  opacity: .92;
}

.labelBar {
  padding: 10px 12px;
  background: rgba(0, 0, 0, .35);
  border-top: 1px solid rgba(255, 255, 255, .10);
  display: flex;
  align-items: center;
  gap: 8px;
}

.labelBar .dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .14);
  flex: 0 0 auto;
}

.labelBar .title {
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .2px;
  color: rgba(233, 237, 242, .92);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1 1 auto;
}

/* DnD hints */
.drop-hint {
  outline: 2px dashed rgba(76, 134, 255, .75);
  outline-offset: 4px;
}

.tab-drop-active {
  outline: 2px solid rgba(76, 134, 255, .85);
  outline-offset: 2px;
  border-radius: 14px;
}

/* Bootstrap dark modals */
/* ─── Unified modal look ─────────────────────────────────────────────────
   All modals share the same dark-glass card style.
   The .pmProjDialog overrides only geometry (flex column, fixed height).
   ───────────────────────────────────────────────────────────────────────── */
.modal-content {
  background: var(--bar);            /* same dark panel as topbar */
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 20px;
  color: var(--text);
  box-shadow: 0 24px 64px rgba(0,0,0,.55);
  overflow: hidden;                  /* respects border-radius */
}

.modal-header {
  background: rgba(255,255,255,.04);
  border-bottom: 1px solid rgba(255,255,255,.07) !important;
  padding: 14px 20px;
}

.modal-footer {
  background: rgba(255,255,255,.02);
  border-top: 1px solid rgba(255,255,255,.07) !important;
  padding: 10px 20px;
}

.modal-title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.01em;
}

.modal-body {
  padding: 20px;
}

/* Light-mode overrides */
.theme-day .modal-content {
  background: #f4f6fb;
  border-color: rgba(0,0,0,.08);
  color: rgba(17,24,39,.92);
}
.theme-day .modal-header {
  background: rgba(0,0,0,.02);
  border-bottom-color: rgba(0,0,0,.07) !important;
}
.theme-day .modal-footer {
  background: transparent;
  border-top-color: rgba(0,0,0,.07) !important;
}

/* Form controls inside any modal */
.modal .form-label { color: rgba(233,237,242,.7); font-size: 12.5px; }
.modal .form-control,
.modal .form-select {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(233,237,242,.92);
  border-radius: 8px;
}
.modal .form-control::placeholder { color: rgba(233,237,242,.42); }
.modal .form-control:focus,
.modal .form-select:focus {
  background: rgba(255,255,255,.09);
  border-color: rgba(76,134,255,.5);
  box-shadow: 0 0 0 .2rem rgba(76,134,255,.15);
  color: rgba(233,237,242,.95);
}
.theme-day .modal .form-label { color: rgba(10,16,25,.75); }
.theme-day .modal .form-control,
.theme-day .modal .form-select {
  background: rgba(255,255,255,.72);
  border-color: rgba(0,0,0,.13);
  color: rgba(17,24,39,.92);
}
.theme-day .modal .form-control::placeholder { color: rgba(17,24,39,.4); }
.theme-day .modal .form-control:focus,
.theme-day .modal .form-select:focus {
  background: #fff;
  border-color: var(--accent);
}


.form-control,
.form-select {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
  color: var(--text);
}

.form-control::placeholder {
  color: rgba(233, 237, 242, .55);
}

.form-control:focus,
.form-select:focus {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(76, 134, 255, .5);
  box-shadow: 0 0 0 .25rem rgba(76, 134, 255, .15);
  color: var(--text);
}

.btn-outline-light {
  border-color: rgba(255, 255, 255, .18);
  color: rgba(233, 237, 242, .92);
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, .10);
  border-color: rgba(255, 255, 255, .22);
}

.hint {
  color: rgba(233, 237, 242, .65);
  font-size: .85rem;
}

.storageLine {
  margin-top: 18px;
  text-align: center;
  color: rgba(233, 237, 242, .55);
  font-size: .85rem;
}

/* Greeting + Weather row */
.greetingRow {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 14px;
  margin: 6px auto 10px;
  max-width: 1100px;
}

.greetingText {
  text-align: center;
  font-size: 28px;
  font-weight: 850;
  letter-spacing: .2px;
  line-height: 1.15;
  color: rgba(233, 237, 242, .92);
  flex: 1 1 auto;
  padding: 10px 6px 0;
}

.weatherCard {
  min-width: 240px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 18px;
  padding: 12px 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .30);
  backdrop-filter: blur(10px);
}

.weatherTop {
  display: flex;
  gap: 12px;
  align-items: center;
}

.weatherIcon {
  font-size: 28px;
}

.weatherTemp {
  font-size: 22px;
  font-weight: 850;
}

.weatherMeta {
  color: rgba(233, 237, 242, .65);
  font-size: .85rem;
  margin-top: -2px;
}

@media (max-width: 820px) {
  .greetingRow {
    flex-direction: column;
  }

  .weatherCard {
    min-width: unset;
  }

  .greetingText {
    font-size: 24px;
  }
}


/* Favorites star button styling */
.actbtn.starred {
  border-color: rgba(255, 215, 0, .45);
}

.actbtn.starred svg path,
.actbtn.starred svg polygon {
  fill: rgba(255, 215, 0, .9);
  stroke: rgba(255, 215, 0, .9);
}

/* Theme: Day mode overrides */
.theme-day {
  --bg: #eef2f7;
  --bar: #ffffff;
  --bar2: #f3f5f8;
  --text: #111827;
  --muted: #4b5563;
  --accent: #2563eb;
}

.theme-day body {
  background: radial-gradient(1200px 600px at 50% 0%, rgba(37, 99, 235, .12), transparent 60%),
    radial-gradient(900px 500px at 10% 25%, rgba(255, 88, 88, .08), transparent 55%),
    var(--bg);
  color: var(--text);
}

.theme-day .topbar {
  border-bottom: 1px solid rgba(0, 0, 0, .08);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .12);
}

.theme-day .tab { color: rgba(10,16,25,.45); }
.theme-day .tab:hover { color: rgba(10,16,25,.78); }
.theme-day .tab.active { color: rgba(10,16,25,.92); border-bottom-color: var(--accent); }

.theme-day .iconbtn {
  background: rgba(0, 0, 0, .04);
  border-color: rgba(0, 0, 0, .08);
  color: rgba(17, 24, 39, .85);
}

.theme-day .searchPill {
  background: rgba(255, 255, 255, .82);
  border-color: rgba(0, 0, 0, .08);
}

.theme-day .searchPill input {
  color: rgba(17, 24, 39, .92);
}

.theme-day .greetingText {
  color: rgba(17, 24, 39, .92);
}

.theme-day .weatherCard {
  background: rgba(255, 255, 255, .85);
  border-color: rgba(0, 0, 0, .08);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .10);
}

.theme-day .weatherMeta,
.theme-day .hint,
.theme-day .storageLine {
  color: rgba(17, 24, 39, .60);
}

.theme-day .tile {
  background: rgba(255, 255, 255, .75);
  border-color: rgba(0, 0, 0, .08);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .12);
}

.theme-day .labelBar {
  background: rgba(255, 255, 255, .72);
  border-top-color: rgba(0, 0, 0, .08);
}

.theme-day .labelBar .title {
  color: rgba(17, 24, 39, .90);
}

.theme-day .thumb .favicon,
.theme-day .actbtn {
  background: rgba(255, 255, 255, .72);
  border-color: rgba(0, 0, 0, .12);
}

/* Favorites tab section headers */
/* ── Engines manager list ────────────────────────────────────────────── */
.engineRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .10);
  margin-bottom: 8px;
}

.engineRow .meta {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.engineBadge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 12px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
}

.engineName {
  font-weight: 800;
}

.engineUrl {
  color: rgba(233, 237, 242, .55);
  font-size: .82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 420px;
}

.theme-day .engineRow {
  background: rgba(0, 0, 0, .03);
  border-color: rgba(0, 0, 0, .08);
}

.theme-day .engineBadge {
  background: rgba(0, 0, 0, .04);
  border-color: rgba(0, 0, 0, .08);
}

.theme-day .engineUrl {
  color: rgba(17, 24, 39, .55);
}

/* theme-day modal-content / header / footer → see unified modal block above */

.theme-day .btn-close.btn-close-white {
  filter: invert(1) grayscale(1);
}

.theme-day .form-control,
.theme-day .form-select {
  background: rgba(0, 0, 0, .02);
  border: 1px solid rgba(0, 0, 0, .14);
  color: rgba(17, 24, 39, .92);
}

.theme-day .form-control::placeholder {
  color: rgba(17, 24, 39, .45);
}

.theme-day .btn-outline-light {
  border-color: rgba(0, 0, 0, .16);
  color: rgba(17, 24, 39, .86);
}

.theme-day .btn-outline-light:hover {
  background: rgba(0, 0, 0, .04);
  border-color: rgba(0, 0, 0, .20);
}

.theme-day .hint {
  color: rgba(17, 24, 39, .60);
}

.theme-day .searchPill .lens {
  background: rgba(0, 0, 0, .04);
  border-color: rgba(0, 0, 0, .10);
}

.theme-day .iconbtn svg,
.theme-day .tabPlus {
  color: rgba(17, 24, 39, .86);
}

.theme-day .topbar .inner {
  color: rgba(17, 24, 39, .92);
}



.theme-day .thumb .favicon img {
  filter: none;
}

/* --- Contrast fixes (Day mode) --- */

/* Search input text & placeholder */
.theme-day .searchPill input {
  color: rgba(17, 24, 39, .92) !important;
}

.theme-day .searchPill input::placeholder {
  color: rgba(17, 24, 39, .55) !important;
}

.theme-day .searchPill .lens {
  color: rgba(17, 24, 39, .65);
}

/* Tile hover action buttons (icons + background) */
.theme-day .thumb .actions .actbtn {
  background: rgba(255, 255, 255, .85);
  border-color: rgba(0, 0, 0, .18);
}

.theme-day .thumb .actions .actbtn svg {
  stroke: rgba(17, 24, 39, .85);
}

.theme-day .thumb .actions .actbtn:hover {
  background: rgba(255, 255, 255, .95);
}

/* Favorite star (active) */
.theme-day .actbtn.starred {
  background: rgba(255, 215, 0, .25);
  border-color: rgba(255, 215, 0, .45);
}

.theme-day .actbtn.starred svg {
  stroke: rgba(120, 90, 0, .95);
}

/* Tile label text */
.theme-day .labelBar .title {
  color: rgba(17, 24, 39, .92);
}

/* Day mode: strong contrast for tile action icons */
.theme-day .thumb .actions .actbtn {
  background: rgba(255, 255, 255, .95) !important;
  border-color: rgba(0, 0, 0, .28) !important;
}

.theme-day .thumb .actions .actbtn svg path {
  stroke: rgba(0, 0, 0, .95) !important;
}

/* Add-tile card */
.add-tile .thumb {
  background: rgba(255, 255, 255, .08);
  border: 2px dashed rgba(255, 255, 255, .25);
}

.theme-day .add-tile .thumb {
  background: rgba(0, 0, 0, .03);
  border-color: rgba(0, 0, 0, .25);
}

.add-tile svg {
  opacity: .9;
}

/* Day mode: action icon contrast (hover buttons) */
.theme-day .thumb .actions .actbtn {
  color: rgba(17, 24, 39, .88);
}

.theme-day .thumb .actions .actbtn svg * {
  stroke: currentColor !important;
  fill: none !important;
}

.theme-day .thumb .actions .actbtn.starred svg * {
  fill: rgba(255, 215, 0, .95) !important;
  stroke: rgba(255, 215, 0, .95) !important;
}

/* Plus tile */
.addTileTile .addThumb {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .05);
}

.addTileTile .addIconWrap {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .06);
  border: 1px dashed rgba(255, 255, 255, .18);
}

.addTileTile svg {
  width: 30px;
  height: 30px;
  color: rgba(233, 237, 242, .78);
}

.addTileTile:hover .addIconWrap {
  background: rgba(255, 255, 255, .09);
  border-color: rgba(255, 255, 255, .28);
}

.theme-day .addTileTile .addThumb {
  background: rgba(0, 0, 0, .02);
}

.theme-day .addTileTile .addIconWrap {
  background: rgba(255, 255, 255, .92);
  border-color: rgba(0, 0, 0, .16);
}

.theme-day .addTileTile svg {
  color: rgba(17, 24, 39, .82);
}

/* Fix settings icon alignment */
.iconbtn svg {
  display: block;
  margin: auto;
}

/* Day mode: make hover action icons darker */
.theme-day .thumb .actions .actbtn {
  color: rgba(0, 0, 0, .88);
}

.theme-day .thumb .actions .actbtn svg * {
  stroke: rgba(0, 0, 0, .88) !important;
}

/* Header icon alignment tweaks */
.iconbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.iconbtn svg {
  display: block;
  width: 20px;
  height: 20px;
}

#btnSettings svg {
  transform: translateY(0.5px);
}

/* Title bar: favicon next to title */
.labelBar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.labelBar .dot {
  display: none;
}

.titleFavicon {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  display: block;
  flex: 0 0 auto;
  opacity: .95;
}

/* Corner delete button (minus) */
.cornerDel {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .16);
  color: rgba(233, 237, 242, .85);
  cursor: pointer;
}

.cornerDel svg {
  width: 18px;
  height: 18px;
}

.tile:hover .cornerDel {
  background: rgba(255, 255, 255, .16);
  border-color: rgba(255, 255, 255, .22);
}

.theme-day .cornerDel {
  background: rgba(255, 255, 255, .98);
  border-color: rgba(0, 0, 0, .16);
  color: rgba(0, 0, 0, .85);
}

.theme-day .tile:hover .cornerDel {
  background: rgba(255, 255, 255, .98);
  border-color: rgba(0, 0, 0, .20);
}

/* Top-left edit + favorite buttons */
.editFavWrap {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 6px;
  z-index: 3;
}

.editFavWrap .actbtn {
  width: 30px;
  height: 30px;
  border-radius: 10px;
}

/* Favorite star filled */
.editFavWrap .favBtn.starred svg path {
  fill: gold;
  stroke: gold;
}

/* Tile controls always visible (top-left) */
.thumb .actions {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.actions.editFavWrap {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.theme-day .editFavWrap .actbtn {
  color: rgba(0, 0, 0, .90);
  border-color: rgba(0, 0, 0, .18);
  background: rgba(255, 255, 255, .88);
}

.theme-day .editFavWrap .actbtn svg * {
  stroke: currentColor !important;
  fill: none !important;
}

/* Tile action icons: only visible on hover */
.thumb .actions {
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
}

.tile:hover .thumb .actions {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Consistent icon style */
.thumb .actions .actbtn svg {
  width: 18px;
  height: 18px;
}

/* Delete button uses same visibility rules as other tile actions */
.thumb .actions .actbtn.delete {
  opacity: inherit;
}

/* Ensure NO action buttons are visible without hover */
.thumb .actions,
.thumb .actions .actbtn {
  opacity: 0;
  pointer-events: none;
}

.tile:hover .thumb .actions,
.tile:hover .thumb .actions .actbtn {
  opacity: 1;
  pointer-events: auto;
}

/* Normalize all action buttons appearance */
.thumb .actions .actbtn {
  background: rgba(255, 255, 255, .75);
  border: 1px solid rgba(0, 0, 0, .18);
  border-radius: 10px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-day .thumb .actions .actbtn {
  background: rgba(255, 255, 255, .9);
}

/* Delete button (top-right) matches other action buttons and only shows on hover */
.thumb .cornerDel {
  position: absolute;
  top: 10px;
  right: 10px;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
}

.tile:hover .thumb .cornerDel {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Ensure delete icon uses same style */
.cornerDel svg {
  width: 18px;
  height: 18px;
  display: block;
}

.cornerDel svg * {
  stroke: currentColor !important;
  fill: none !important;
}

/* Normalize ALL action buttons (star, edit, delete) */
.thumb .actions .actbtn,
.thumb .cornerDel.actbtn {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .30);
  border: 1px solid rgba(255, 255, 255, .35);
  backdrop-filter: blur(6px);
}

/* Hover */
.thumb .actions .actbtn:hover,
.thumb .cornerDel.actbtn:hover {
  background: rgba(255, 255, 255, .45);
}

/* Icons identical */
.thumb .actions .actbtn svg,
.thumb .cornerDel.actbtn svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* Unified dark action buttons (edit, favorite, delete) in both themes */
.thumb .actions .actbtn,
.thumb .cornerDel.actbtn {
  background: rgba(0, 0, 0, .65) !important;
  border: 1px solid rgba(255, 255, 255, .25) !important;
  color: #fff !important;
}

.thumb .actions .actbtn svg *,
.thumb .cornerDel.actbtn svg * {
  stroke: #fff !important;
  fill: none !important;
}

/* Hover emphasis */
.tile:hover .thumb .actions .actbtn,
.tile:hover .thumb .cornerDel.actbtn {
  background: rgba(0, 0, 0, .8) !important;
}

/* Smaller action buttons: 24x24px, white icons in all modes */
.thumb .actions .actbtn,
.thumb .cornerDel.actbtn {
  width: 24px !important;
  height: 24px !important;
  min-width: 24px;
  min-height: 24px;
  border-radius: 8px !important;
  padding: 0 !important;

  background: rgba(0, 0, 0, .7) !important;
  border: 1px solid rgba(255, 255, 255, .25) !important;
  color: #fff !important;
}

.thumb .actions .actbtn svg,
.thumb .cornerDel.actbtn svg {
  width: 14px;
  height: 14px;
}

.thumb .actions .actbtn svg *,
.thumb .cornerDel.actbtn svg * {
  stroke: #fff !important;
  fill: none !important;
}

/* Hover */
.tile:hover .thumb .actions .actbtn,
.tile:hover .thumb .cornerDel.actbtn {
  background: rgba(0, 0, 0, .85) !important;
}

/* Favorite star: always yellow when active (day + night) */
.thumb .actions .actbtn.starred {
  background: rgba(0, 0, 0, .7) !important;
}

.thumb .actions .actbtn.starred svg *,
.theme-day .thumb .actions .actbtn.starred svg * {
  stroke: #facc15 !important;
  fill: #facc15 !important;
}

/* Force edit + favorite icons to white in day mode */
.theme-day .thumb .actions .actbtn svg *,
.theme-day .thumb .cornerDel.actbtn svg * {
  stroke: #fff !important;
  fill: none !important;
}

/* Action buttons: opacity and hover */
.thumb .actions .actbtn,
.thumb .cornerDel.actbtn {
  opacity: .8 !important;
}

.tile:hover .thumb .actions .actbtn,
.tile:hover .thumb .cornerDel.actbtn {
  opacity: 1 !important;
}

/* FORCE white icons in DAY mode (strong specificity) */
.theme-day .tile .thumb .actions .actbtn,
.theme-day .tile .thumb .cornerDel.actbtn {
  color: #fff !important;
}

.theme-day .tile .thumb .actions .actbtn svg,
.theme-day .tile .thumb .cornerDel.actbtn svg {
  color: #fff !important;
}

.theme-day .tile .thumb .actions .actbtn svg *,
.theme-day .tile .thumb .cornerDel.actbtn svg * {
  stroke: #fff !important;
  fill: none !important;
}

/* Keep starred favorite yellow in both modes (overrides white) */
.theme-day .tile .thumb .actions .actbtn.starred,
.tile .thumb .actions .actbtn.starred {
  color: #ffd54a !important;
}

.theme-day .tile .thumb .actions .actbtn.starred svg *,
.tile .thumb .actions .actbtn.starred svg * {
  stroke: #ffd54a !important;
  fill: #ffd54a !important;
}

/* Action buttons visibility logic */
/* Default: hidden */
.thumb .actions .actbtn,
.thumb .cornerDel.actbtn {
  opacity: 0 !important;
  pointer-events: none;
}

/* Hover tile: show buttons with opacity 0.8 */
.tile:hover .thumb .actions .actbtn,
.tile:hover .thumb .cornerDel.actbtn {
  opacity: .8 !important;
  pointer-events: auto;
}

/* Hover button: full opacity */
.thumb .actions .actbtn:hover,
.thumb .cornerDel.actbtn:hover {
  opacity: 1 !important;
}

/* Tabs in modal */
.modal .settingsTabs {
  border-bottom: 1px solid rgba(255, 255, 255, .10);
}

.theme-day .modal .settingsTabs {
  border-bottom-color: rgba(0, 0, 0, .10);
}

.modal .settingsTabs .nav-link {
  border: 0;
  border-bottom: 2px solid transparent;
  font-weight: 800;
  color: rgba(233, 237, 242, .70);
  background: transparent;
  padding-left: 0;
  padding-right: 0;
  margin-right: 18px;
}

.modal .settingsTabs .nav-link.active {
  color: rgba(233, 237, 242, .95);
  border-bottom-color: var(--accent);
}

.theme-day .modal .settingsTabs .nav-link {
  color: rgba(17, 24, 39, .65);
}

.theme-day .modal .settingsTabs .nav-link.active {
  color: rgba(17, 24, 39, .92);
}

.modal .list-group-item {
  background: rgba(255, 255, 255, .04);
  border-color: rgba(255, 255, 255, .10);
  color: rgba(233, 237, 242, .90);
}

.theme-day .modal .list-group-item {
  background: rgba(0, 0, 0, .02);
  border-color: rgba(0, 0, 0, .10);
  color: rgba(17, 24, 39, .92);
}

/* Settings Tabs */
.modal .settingsTabs {
  border-bottom: 1px solid rgba(255, 255, 255, .10);
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.theme-day .modal .settingsTabs {
  border-bottom-color: rgba(0, 0, 0, .10);
}

.modal .settingsTabs .nav-link {
  border: 0 !important;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent !important;
  font-weight: 800;
  color: rgba(233, 237, 242, .70);
  padding: 8px 0;
}

.modal .settingsTabs .nav-link.active {
  color: rgba(233, 237, 242, .95);
  border-bottom-color: var(--accent);
}

.theme-day .modal .settingsTabs .nav-link {
  color: rgba(17, 24, 39, .65);
}

.theme-day .modal .settingsTabs .nav-link.active {
  color: rgba(17, 24, 39, .92);
}

/* Groups inline manager */
#groupsListInline .grp-handle {
  cursor: grab;
  user-select: none;
  opacity: .85;
}

#groupsListInline .list-group-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#groupsListInline .grp-name {
  font-weight: 800;
}

/* v50 Settings split view */
.settingsSplit {
  display: flex;
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
}

.settingsSide {
  width: 180px;
  flex: 0 0 180px;
  padding: 14px 10px;
  border-right: 1px solid rgba(255,255,255,.07);
  background: rgba(0,0,0,.12);
  overflow-y: auto;
}

.theme-day .settingsSide {
  border-right-color: rgba(0,0,0,.07);
  background: rgba(0,0,0,.03);
}

.settingsNavBtn {
  display: flex;
  align-items: center;
  width: 100%;
  text-align: left;
  border: none;
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 2px;
  font-size: 12.5px;
  font-weight: 600;
  background: transparent;
  color: rgba(233,237,242,.6);
  cursor: pointer;
  transition: background .12s, color .12s;
}

.settingsNavBtn:hover {
  background: rgba(255,255,255,.07);
  color: rgba(233,237,242,.9);
}

.settingsNavBtn.active {
  background: rgba(255,255,255,.1);
  color: rgba(233,237,242,.97);
}

.theme-day .settingsNavBtn { color: rgba(10,16,25,.5); }
.theme-day .settingsNavBtn:hover { background: rgba(0,0,0,.05); color: rgba(10,16,25,.8); }
.theme-day .settingsNavBtn.active { background: rgba(76,134,255,.12); color: var(--accent); }

.settingsMain {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  padding: 20px 24px;
  overflow-y: auto;
}

.settingsPaneTitle {
  font-size: 14px;
  font-weight: 800;
  opacity: .9;
  margin-bottom: 16px;
  letter-spacing: -.01em;
}

@media (max-width: 768px) {
  .settingsSplit {
    flex-direction: column;
    min-height: auto;
  }

  .settingsSide {
    width: 100%;
    flex: 0 0 auto;
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,.07);
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 10px;
  }

  .settingsNavBtn {
    width: auto;
    flex: 0 0 auto;
    margin-bottom: 0;
  }

  .theme-day .settingsSide {
    border-bottom-color: rgba(0,0,0,.07);
  }
}

/* Settings modal sizing — consistent with project dialog */
#settingsModal .modal-dialog {
  max-width: 1100px;
}
#settingsModal .modal-content {
  max-height: min(88vh, 780px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#settingsModal .modal-body {
  flex: 1 1 0;
  min-height: 600px;
  padding: 0;
  display: flex;
  flex-direction: row;   /* settingsSplit is a row (side + main) */
}

/* ── settingsSection visibility ───────────────────────────────────────── */
.settingsSection { display: block; }
.settingsSection.d-none { display: none !important; }

/* ── settingsTitle / settingsHr (used in settings panes) ─────────────── */
.settingsTitle {
  font-size: 14px;
  font-weight: 800;
  opacity: .9;
  margin-bottom: 6px;
  letter-spacing: -.01em;
}
.settingsHr {
  border-color: rgba(255,255,255,.08);
  margin: 18px 0;
}
.theme-day .settingsHr { border-color: rgba(0,0,0,.08); }

/* inline group edit */
.grp-edit-input {
  width: 100%;
  max-width: 360px;
}

/* v57: make inline lists visible in settings modal */
#settingsModal #groupsListInline .list-group-item,
#settingsModal #enginesList .list-group-item {
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .10);
  color: rgba(233, 237, 242, .92);
  border-radius: 14px;
  margin-bottom: 10px;
  padding: 10px;
}

.theme-day #settingsModal #groupsListInline .list-group-item,
.theme-day #settingsModal #enginesList .list-group-item {
  background: rgba(0, 0, 0, .03);
  border-color: rgba(0, 0, 0, .10);
  color: rgba(17, 24, 39, .92);
}

/* PM section max-width wrapper */
.pmWrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 18px 52px;
}

/* Project grid – mirrors the speed-dial .grid cadence */
#pmProjectsList {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: start;   /* cards don't stretch to fill tallest sibling */
}

@media (max-width: 1100px) {
  #pmProjectsList { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  #pmProjectsList { grid-template-columns: 1fr; }
}

/* Project card base — no list-group-item quirks */
.pmProjectCard {
  position: relative;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 18px !important;
  padding: 16px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, .38);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform .08s ease, box-shadow .08s ease;
}
.pmProjectCard:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .48);
}
.theme-day .pmProjectCard {
  background: rgba(255, 255, 255, .95);
  border-color: rgba(0, 0, 0, .12);
  color: rgba(10, 16, 25, .95) !important;
  box-shadow: 0 6px 22px rgba(0, 0, 0, .12);
}
.theme-day .pmProjectCard * {
  color: inherit;
}
.theme-day .pmProjectCard:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, .16);
}

/* ── Card hover icon buttons (edit / delete) ─────────────────────── */
/* (position: relative merged into main .pmProjectCard above) */
.pmCardHoverActions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 5px;
  opacity: 0;
  transition: opacity .12s ease;
  z-index: 2;
}
.pmProjectCard:hover .pmCardHoverActions { opacity: 1; }

.pmCardIconBtn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(20,24,33,.72);
  color: rgba(233,237,242,.80);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .1s, color .1s, border-color .1s;
  backdrop-filter: blur(6px);
}
.pmCardIconBtn:hover {
  background: rgba(76,134,255,.25);
  border-color: rgba(76,134,255,.4);
  color: #fff;
}
.pmCardIconBtnDanger:hover {
  background: rgba(239,68,68,.22);
  border-color: rgba(239,68,68,.4);
  color: #fca5a5;
}
.theme-day .pmCardIconBtn {
  background: rgba(255,255,255,.88);
  border-color: rgba(0,0,0,.12);
  color: rgba(17,24,39,.7);
}
.theme-day .pmCardIconBtn:hover {
  background: rgba(76,134,255,.12);
  border-color: rgba(76,134,255,.3);
  color: var(--accent);
}
.theme-day .pmCardIconBtnDanger:hover {
  background: rgba(239,68,68,.10);
  border-color: rgba(239,68,68,.3);
  color: #dc2626;
}

/* Budget PT badge */
.pmBudgetPT {
  font-size: 11px;
  opacity: .65;
  background: rgba(255,255,255,.07);
  border-radius: 5px;
  padding: 1px 6px;
  white-space: nowrap;
}
.theme-day .pmBudgetPT {
  background: rgba(0,0,0,.05);
}
.pmBudgetRow { display:flex; align-items:center; gap:5px; flex-wrap:wrap; }



#settingsModal #groupsListInline .grp-name {
  color: inherit;
}

/* v60: ensure groups list has spacing even when empty */
#settingsModal #groupsListInline {
  margin-top: 12px;
}

/* Inline engine edit */
.eng-edit-input {
  width: 100%;
}

#settingsModal #enginesList .list-group-item {
  border-radius: 14px;
  margin-bottom: 10px;
}

/* v67: semantic helpers for settings panes */
.settingsHint {
  opacity: .78;
  font-size: .92rem;
  margin-bottom: .75rem;
}

.settingsSubTitle {
  font-weight: 800;
  margin-top: 1rem;
  margin-bottom: .5rem;
}

.settingsActions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .5rem;
}

.settingsRow {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.settingsRow.align-items-end {
  align-items: flex-end;
  margin-bottom: 10px;
}


/* Tile fallback (initials + color) */
.tile-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-weight: 700;
  font-size: 1.25rem;
  color: #fff;
  border-radius: 12px;
  text-transform: uppercase;
  user-select: none;
}

/* Tile fallback badge (when no thumbnail) */
.thumbFallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px;
  line-height: 1.12;
  word-break: break-word;
  white-space: normal;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: #fff;
  border-radius: 16px;
  user-select: none;
}
/* Tile badge fallback (when no thumbnail) */
.tile-badge{
  width: 100%;
  height: 100%;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius: 14px;
  font-weight: 700;
  color: #fff;
  padding: 10px;
  text-align:center;
  line-height: 1.1;
  word-break: break-word;
  overflow: hidden;
}
.tile-badge-empty{ opacity: .45; }

.tile-thumb{
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
}

/* Prevent bootstrap row negative margins from eating modal padding */
#tileModal .modal-body .row{
  margin-left: 0;
  margin-right: 0;
}

.tileCoverCard{
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  border-radius: 14px;
  padding: 14px;
}

.tileCoverPreviewWrap{
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 12px;
}

.tileCoverPreview{
  height: 110px;
  border-radius: 14px;
  overflow: hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .02em;
  text-align:center;
  padding: 12px;
  line-height: 1.12;
  color: #fff;
  border: 1px dashed rgba(255,255,255,.18);
}
.tileCoverPreview img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display:block;
}

#locationPickModal .list-group-item{
  background: rgba(255,255,255,.03);
  border-color: rgba(255,255,255,.08);
  color: inherit;
}
#locationPickModal .list-group-item.active{
  background: rgba(13,110,253,.35);
  border-color: rgba(13,110,253,.55);
}

/* PM */
.pmTitle{ font-weight: 800; font-size: 1.1rem; }
.pmSubTabs{ margin-top: 6px; }
.pmPaneWrap{
  border: 1px solid rgba(255,255,255,.08);
  border-top: 0;
  border-radius: 0 0 14px 14px;
  padding: 14px;
  background: rgba(0,0,0,.10);
}
.pmTable th{ font-size: .85rem; opacity: .85; }
.pmEmpty{ padding: 20px 0; }
.pmEmptyCard{
  border: 1px dashed rgba(255,255,255,.18);
  border-radius: 14px;
  padding: 16px;
  max-width: 520px;
}
.pmActionBtn{ padding: .15rem .45rem; }

/* Main switcher (Schnellwahl / Projekte) */
.topbar .mainTabs{
  display:flex;
  gap:8px;
  align-items:center;
  margin-right:12px;
}
.topbar .mainTabBtn{
  appearance:none;
  border:1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
  color: inherit;
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
}
.topbar .mainTabBtn:hover{
  background: rgba(255,255,255,.10);
}
.topbar .mainTabBtn.active{
  background: rgba(255,255,255,.16);
  border-color: rgba(255,255,255,.28);
}
.theme-day .topbar .mainTabBtn{
  border-color: rgba(0,0,0,.16);
  background: rgba(0,0,0,.04);
}
.theme-day .topbar .mainTabBtn:hover{
  background: rgba(0,0,0,.07);
}
.theme-day .topbar .mainTabBtn.active{
  background: rgba(0,0,0,.12);
  border-color: rgba(0,0,0,.22);
}

.pmTabs{ margin-bottom: 12px; }

#pmTeamList .list-group-item{
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .10);
  color: rgba(233, 237, 242, .92);
  border-radius: 14px;
  margin-bottom: 10px;
  padding: 10px;
}
.theme-day #pmTeamList .list-group-item{
  background: rgba(0,0,0,.03);
  border-color: rgba(0,0,0,.08);
  color: rgba(10,16,25,.92);
}
.pmTeamCap{
  min-width: 120px;
  text-align: right;
}

/* PM Team inline editing */
#pmTeamList .form-label.small{opacity:.8}
#pmTeamList .form-control-sm{border-radius:10px}

/* PM month list (increment 3 restart) */
#pmMonthBody tr.pmDayRow{ cursor:pointer; }
#pmMonthBody tr.pmDayRow:hover{ background: rgba(255,255,255,.04); }
.theme-day #pmMonthBody tr.pmDayRow:hover{ background: rgba(0,0,0,.03); }

.pmDayDetails{
  background: rgba(255,255,255,.03);
  border-top: 1px solid rgba(255,255,255,.08);
}
.theme-day .pmDayDetails{
  background: rgba(0,0,0,.02);
  border-top-color: rgba(0,0,0,.08);
}

.pmEntryRow{
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  border-radius:12px;
  padding:10px;
}
.theme-day .pmEntryRow{
  background: rgba(255,255,255,.85);
  border-color: rgba(0,0,0,.08);
}

/* ===== PM Project Card: inner layout + inline charts ===== */

.pmProjectCardTop {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}
/* Buttons stack on narrow cards */
.pmProjectCardTop > .d-flex {
  flex-wrap: wrap;
  row-gap: 5px;
}
.pmProjectCardMeta { flex: 1 1 150px; min-width: 0; }

.pmCardChartsWrap {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.07);
  flex: 1 1 auto;          /* fills remaining card height */
}
.theme-day .pmCardChartsWrap { border-top-color: rgba(0,0,0,.07); }

.pmCardChartsLoading{
  height:8px;
  border-radius:4px;
  background:linear-gradient(90deg, rgba(255,255,255,.06) 25%, rgba(255,255,255,.12) 50%, rgba(255,255,255,.06) 75%);
  background-size:200% 100%;
  animation:pmShimmer 1.4s infinite;
}
@keyframes pmShimmer{ to{ background-position:-200% 0; } }

.pmCardChartsEmpty{
  font-size:12px;
  opacity:.45;
  padding:4px 0;
}
.pmCardChartsEmptyBtn{
  background:none;
  border:none;
  padding:0;
  color:var(--accent);
  font-size:12px;
  cursor:pointer;
  text-decoration:underline;
}

/* Three-column layout */
.pmCardCharts{
  display:flex;
  gap:16px;
  flex-wrap:wrap;
  align-items:flex-start;
  justify-content:center;
}
.pmCardChartCol{ display:flex; flex-direction:column; gap:8px; align-items:center; }

/* Donut columns — fixed width, centred */
.pmCardChartDonut{
  flex:0 0 130px;
  width:130px;
  text-align:center;
}
.pmCardChartLbl{
  font-size:10px;
  font-weight:700;
  letter-spacing:.04em;
  text-transform:uppercase;
  opacity:.5;
  text-align:center;
  width:100%;
  white-space:normal;
  word-break:break-word;
  line-height:1.3;
}

/* Mini legend below donut */
.pmCardMiniLegend{
  display:flex;
  flex-direction:column;
  gap:3px;
}
.pmCardMiniLegendItem{
  display:flex;
  align-items:center;
  gap:5px;
  font-size:11px;
  opacity:.75;
  white-space:nowrap;
}
.pmCardMiniLegendEmpty{ font-size:11px; opacity:.4; }

/* Bar column */
.pmCardChartBars{
  flex:1 1 220px;
  min-width:180px;
}
.pmBarsWrap{ display:flex; flex-direction:column; gap:7px; width:100%; }

.pmBar{ display:flex; flex-direction:column; gap:3px; }
.pmBarLabel{
  display:flex;
  align-items:center;
  gap:5px;
  font-size:11px;
}
.pmBarName{ flex:1 1 0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; opacity:.8; }
.pmBarPct { font-size:10px; opacity:.6; white-space:nowrap; font-variant-numeric:tabular-nums; }
.theme-day .pmBarPct { color: rgba(10,16,25,.75); }

.pmBarOver{ color:#f7c948 !important; opacity:1 !important; }

.pmBarTrack{
  display:flex;
  align-items:center;
  height:10px;
  border-radius:5px;
  background:rgba(255,255,255,.07);
  overflow:visible;
  position:relative;
}
.theme-day .pmBarTrack{ background:rgb(0 0 0 / 7%); }

/* Soll-bar (grey outline) */
.pmBarPlan{
  height:100%;
  border-radius:5px;
  background:rgba(255,255,255,.13);
  position:relative;
  overflow:hidden;
  min-width:2px;
  flex-shrink:0;
}
.theme-day .pmBarPlan{ background:rgb(0 0 0 / 13%); }

/* Ist-bar (coloured, inside Soll) */
.pmBarIst{
  position:absolute;
  left:0; top:0; bottom:0;
  border-radius:5px;
  transition:width .35s ease;
  min-width:0;
}

/* Overflow segment (Ist > Soll) */
.pmBarOverflow{
  height:100%;
  border-radius:0 5px 5px 0;
  flex-shrink:0;
}

/* ===== PM Analytics (kept for compatibility) ===== */
.pmAnalyticsPanel{
  margin-top:16px;
  border-top:1px solid rgba(255,255,255,.08);
  padding-top:16px;
}
.theme-day .pmAnalyticsPanel{ border-top-color:rgba(0,0,0,.08); }

/* Shared donut helpers */
.pmDonutWrap{
  position:relative;
  flex-shrink:0;
}
.pmDonutCenter{
  position:absolute;
  inset:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  pointer-events:none;
}
.pmDonutVal{
  font-size:15px;
  font-weight:800;
  line-height:1;
  letter-spacing:-.02em;
}
.pmDonutSub{
  font-size:10px;
  opacity:.5;
  margin-top:2px;
}

/* Shared member dot */
.pmMemberDot{
  display:inline-block;
  width:8px; height:8px;
  border-radius:50%;
  margin-right:4px;
  vertical-align:middle;
  flex-shrink:0;
}

/* ===== PM: Sub-tabs (Projekte / Persönlich) ===== */
.pmSubTabs {
  display: flex;
  gap: 2px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding-bottom: 0;
}
.theme-day .pmSubTabs {
  border-bottom-color: rgba(0,0,0,.12);
}

.pmSubTab {
  padding: 7px 16px;
  border: none;
  background: transparent;
  color: rgba(233,237,242,.55);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .14s, border-color .14s;
}
.pmSubTab:hover { color: rgba(233,237,242,.85); }
.pmSubTab.active {
  color: rgba(233,237,242,.95);
  border-bottom-color: var(--accent);
}
.theme-day .pmSubTab { color: rgba(10,16,25,.45); }
.theme-day .pmSubTab:hover { color: rgba(10,16,25,.78); }
.theme-day .pmSubTab.active { color: rgba(10,16,25,.92); border-bottom-color: var(--accent); }

.pmSubPane { /* content pane, toggle via d-none */ }

/* ===== PM: Unified Project Dialog (sidebar-nav layout) ===== */
/* .pmProjDialog only adds geometry — background/border/radius inherited from .modal-content */
.pmProjDialog {
  height: min(88vh, 780px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
/* Override Bootstrap's default modal-content flex behavior */
#pmProjectModal .modal-content {
  max-height: min(88vh, 780px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* pmProjDialogHeader extends .modal-header with flex-shrink */
.pmProjDialogHeader {
  flex-shrink: 0;
}

.pmProjDialogHeadLeft { display: flex; align-items: center; gap: 12px; min-width: 0; }

.pmProjDialogTitle {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}

/* Split body: sidebar + content */
.pmProjDialogBodySplit {
  display: flex;
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
}

/* Sidebar nav */
.pmProjNav {
  flex: 0 0 160px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 10px;
  border-right: 1px solid rgba(255,255,255,.07);
  background: rgba(0,0,0,.12);
  overflow-y: auto;
}
.theme-day .pmProjNav {
  border-right-color: rgba(0,0,0,.07);
  background: rgba(0,0,0,.03);
}

.pmProjNavItem {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: rgba(233,237,242,.6);
  font-size: 12.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background .12s, color .12s;
}
.pmProjNavItem:hover {
  background: rgba(255,255,255,.07);
  color: rgba(233,237,242,.9);
}
.pmProjNavItem.active {
  background: rgba(255,255,255,.1);
  color: rgba(233,237,242,.97);
}
.pmProjNavItem svg { flex-shrink: 0; opacity: .7; }
.pmProjNavItem.active svg { opacity: 1; }
.theme-day .pmProjNavItem { color: rgba(10,16,25,.5); }
.theme-day .pmProjNavItem:hover { background: rgba(0,0,0,.05); color: rgba(10,16,25,.8); }
.theme-day .pmProjNavItem.active { background: rgba(76,134,255,.12); color: var(--accent); }

/* Content sections */
.pmProjSection {
  flex: 1 1 0;
  overflow-y: auto;
  overflow-x: hidden;
}
.pmProjSectionInner {
  padding: 24px;
  max-width: 580px;
}
.pmProjSectionInnerWide {
  max-width: 100%;
  padding: 20px;
}
.pmProjSectionTitle {
  font-size: 14px;
  font-weight: 800;
  opacity: .9;
  margin-bottom: 18px;
  letter-spacing: -.01em;
}
.pmProjSectionActive { /* active content pane */ }

/* ===== PM: PL Icon in card ===== */
.pmPlIcon {
  flex-shrink: 0;
  vertical-align: middle;
}
.pmPlIconFilled { color: var(--accent); }
.pmPlIconOutline { opacity: .38; }

/* ===== PM: Personal view table ===== */
.pmPersonalHeader { margin-bottom: 4px; }
.pmPersonalTitle { font-size: 15px; font-weight: 800; }
.pmPersonalHint  { margin-top: 2px; }

.pmPersonalTable { font-size: 12px; min-width: 820px; }
.pmPersonalTable thead th {
  font-size: 11px; font-weight: 700; opacity: .6;
  padding: 5px 8px; white-space: nowrap;
}
.pmPersonalTable td { padding: 5px 8px; vertical-align: middle; border-color: rgba(255,255,255,.05); }
.theme-day .pmPersonalTable td { border-color: rgba(0,0,0,.05); }
.pmPersonalProjHead { min-width: 160px; }
.pmPersonalMonthHead { width: 52px; }
.pmPersonalCell { font-variant-numeric: tabular-nums; }
.pmPersonalProjCell {
  display: flex; align-items: center; gap: 6px;
  white-space: nowrap; min-width: 150px;
}
.pmPersonalPsp {
  font-size: 10px; opacity: .45;
  background: rgba(255,255,255,.06);
  border-radius: 4px;
  padding: 1px 5px;
}
.theme-day .pmPersonalPsp { background: rgba(0,0,0,.06); }

/* ===== Favorites: inline group separator ===== */
.favGroupSep {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 0 0;
  margin-top: 2px;
}
.favGroupSep:first-child { margin-top: 0; }
.favGroupSepLabel {
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.favGroupSepPill {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: rgba(233,237,242,.5);
  background: rgba(255,255,255,.06);
  border-radius: 6px;
  padding: 3px 9px;
}
.theme-day .favGroupSepPill { color: rgba(10,16,25,.45); background: rgba(0,0,0,.05); }
.favGroupSepCount {
  font-size: 11px;
  opacity: .35;
}
.favGroupSepLine {
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,.07);
  border-radius: 1px;
}
.theme-day .favGroupSepLine { background: rgba(0,0,0,.07); }




/* ===== CRITICAL Day Mode Text Fixes ===== */


.theme-day .pmCardChartLbl {
  color: rgba(10,16,25,.8) !important;
  opacity: 1 !important;
}

.theme-day .pmDonutVal {
  color: rgba(10,16,25,.98) !important;
}

.theme-day .pmDonutSub,
.theme-day .pmBarPct,
.theme-day .pmTgPct {
  color: rgba(10,16,25,.65) !important;
}

.theme-day .pmCardMiniLegendEmpty {
  color: rgba(10,16,25,.4) !important;
}

/* Table specific */


.theme-day .pmTgTable thead th {
  color: rgba(10,16,25,.75) !important;
  font-weight: 700 !important;
}

.theme-day .pmPersonalTable td,
.theme-day .pmPersonalTable th {
  color: rgba(10,16,25,.9) !important;
}

/* Percentage columns */
.theme-day .pmTgPct,
.theme-day .pmBarPct {
  font-weight: 600 !important;
}

/* ===== Favorites: Inline Group Headers ===== */
.tileWrapper {
  display: flex;
  flex-direction: column;
}
.tileGroupHeader {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  background: transparent;
  border-radius: 0;
}
.tileGroupHeader::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,.07);
}
.tileGroupName {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: rgba(233,237,242,.5);
  white-space: nowrap;
  background: rgba(255,255,255,.06);
  padding: 3px 9px;
  border-radius: 6px;
}
.tileGroupCount {
  font-size: 10px;
  opacity: .35;
  margin-left: 4px;
}
.theme-day .tileGroupHeader::after {
  background: rgba(0,0,0,.07);
}
.theme-day .tileGroupName {
  color: rgba(10,16,25,.45);
  background: rgba(0,0,0,.05);
}

/* Line-only header for non-first tiles */
.tileGroupHeaderLine {
  display: flex;
  align-items: center;
  padding: 4px 0;
  position: relative;
}
.tileGroupHeaderLine::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: rgba(255,255,255,.07);
}
/* Invisible spacer to match the height of tileGroupName pill */
.tileGroupHeaderLine::after {
  content: "";
  display: inline-block;
  height: calc(10px + 6px); /* font-size 10px + padding 3px top + 3px bottom */
  width: 0;
}
.theme-day .tileGroupHeaderLine::before {
  background: rgba(0,0,0,.07);
}



/* ===== Drag & Drop Visual Feedback ===== */
.tile-dragging {
  opacity: 0.4;
  transform: scale(0.95);
  cursor: grabbing !important;
}

.tile-drop-target {
  position: relative;
}

.tile-drop-target::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  z-index: 10;
  box-shadow: 0 0 8px rgba(76,134,255,.6);
}

.tile-drop-target::after {
  content: "";
  position: absolute;
  inset: -2px;
  border: 2px dashed var(--accent);
  border-radius: 18px;
  opacity: 0.3;
  pointer-events: none;
  z-index: 9;
}

/* ===== PM Time-Entry Grid ===== */
/* (panel wrapper no longer needed — grid lives inside modal) */
.pmTimeGrid{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.pmTgHeader{
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:10px;
}
.pmTgTitle{
  font-size:13px;
  font-weight:700;
  opacity:.85;
  display:flex;
  align-items:center;
  gap:6px;
}

.pmTgScrollWrap{
  overflow-x:auto;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.08);
}
.theme-day .pmTgScrollWrap{ border-color:rgba(0,0,0,.08); }

.pmTgTable{
  border-collapse:collapse;
  width:100%;
  min-width:480px;
  font-size:12px;

  table-layout: fixed;
  width: 100%;
}

/* Header cells */
.pmTgTable thead th{
  background:rgba(255,255,255,.05);
  padding:0;
  white-space:nowrap;
  border-bottom:1px solid rgba(255,255,255,.08);
  text-align:center;
  vertical-align:middle;
}
.theme-day .pmTgTable thead th{ background:rgba(0,0,0,.03); border-bottom-color:rgba(0,0,0,.08); }

.pmTgMemberHdr {
  min-width: 220px;
  max-width: 240px;
  width: 230px;
  text-align: left;
  padding: 8px 10px;
}


.pmTgTotalHdr {
  padding: 4px 6px;
  text-align: center;
  min-width: 50px;
  position: sticky;
  right: 0;
  background: inherit;
  z-index: 2;
}

.pmTgDayHdr {
  padding: 4px 3px;
  text-align: center;
  font-size: 11px;
  min-width: 28px;
  vertical-align: top;
}
.pmTgDayNum {
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}
.pmTgDayWd {
  font-size: 9px;
  opacity: 0.6;
  line-height: 1;
  margin-top: 2px;
}

/* Weekend + today highlight */
.pmTgWe{ background:rgba(255,255,255,.025) !important; }
.theme-day .pmTgWe{ background:rgba(0,0,0,.025) !important; }
.pmTgToday .pmTgDayNum {
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}
.pmTgToday{ box-shadow:inset 0 -2px 0 var(--accent); }

/* Body cells */
.pmTgTable tbody td{
  border:1px solid rgba(255,255,255,.05);
  padding:0;
  vertical-align:middle;
}
.theme-day .pmTgTable tbody td{ border-color:rgba(0,0,0,.05); }

.pmTgMemberCell {
  padding: 6px 10px;
  font-size: 12px;
  max-width: 240px;
  min-width: 220px;
  width: 230px;
  position: sticky;
  left: 0;
  background: inherit;
  z-index: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-sizing: border-box;
}


.pmTgMemberName {
  font-weight: 600;
  font-size: 12px;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
}

/* Number input cells */
.pmTgCell {
  padding: 2px 1px;
  text-align: center;
  vertical-align: middle;
  min-width: 28px;
  max-width: 32px;
}
.pmTgInput {
  width: 100%;
  max-width: 28px;
  padding: 1px 2px;
  font-size: 11px;
  text-align: center;
  background: transparent;
  border: 1px solid transparent;
  color: inherit;
  border-radius: 2px;
}
.pmTgInput::-webkit-inner-spin-button,
.pmTgInput::-webkit-outer-spin-button{ -webkit-appearance:none; }
.pmTgInput:focus{
  background:rgba(76,134,255,.18);
  border-radius:4px;
}
.theme-day .pmTgInput:focus{ background:rgba(76,134,255,.12); }
.pmTgInput:not(:placeholder-shown){ color:#43d9ad; font-weight:600; }

/* Totals column */
.pmTgTotal{
  text-align:right;
  padding:5px 10px !important;
  white-space:nowrap;
  font-variant-numeric:tabular-nums;
  color:#43d9ad;
  border-left:1px solid rgba(255,255,255,.08) !important;
  min-width:60px;
}
.theme-day .pmTgTotal{ border-left-color:rgba(0,0,0,.08) !important; }
.pmTgOver{ color:#f7c948 !important; }
.pmTgPct{ font-size:9px; opacity:.6; }

/* Sum row */
.pmTgSumRow td{
  background:rgba(255,255,255,.03) !important;
  border-top:1px solid rgba(255,255,255,.1) !important;
}
.theme-day .pmTgSumRow td{ background:rgba(0,0,0,.02) !important; border-top-color:rgba(0,0,0,.08) !important; }
.pmTgSumCell{
  text-align:center;
  padding:4px 2px !important;
  font-size:11px;
  opacity:.7;
  font-variant-numeric:tabular-nums;
}

/* Footer */
.pmTgFooter{
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  font-size:11px;
  opacity:.5;
}
.pmTgUnsaved{
  color:#f7c948 !important;
  opacity:1 !important;
  font-weight:600;
}
/* === Personal View - Day Status & Target Hours === */
/* === Personal View - Day Status Buttons === */
.pmDayStatusBtns {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
}

.pmDayStatusBtn {
  font-size: 9px;
  padding: 2px 4px;
  min-width: 18px;
  height: 16px;
  line-height: 12px;
  border: 1px solid rgba(255, 255, 255, .15);
  background: transparent;
  color: rgba(255, 255, 255, .4);
  cursor: pointer;
  transition: all .1s;
  font-weight: 600;
  border-radius: 3px;
}

.pmDayStatusBtn:hover {
  background: rgba(255, 255, 255, .1);
  color: rgba(255, 255, 255, .7);
  border-color: rgba(255, 255, 255, .25);
}

.pmDayStatusBtn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  font-weight: 700;
}

.theme-day .pmDayStatusBtn {
  border-color: rgba(0, 0, 0, .2);
  color: rgba(0, 0, 0, .4);
}

.theme-day .pmDayStatusBtn:hover {
  background: rgba(0, 0, 0, .05);
  color: rgba(0, 0, 0, .7);
  border-color: rgba(0, 0, 0, .3);
}

.theme-day .pmDayStatusBtn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.pmTgTargetRow .pmTgSumCell,
.pmTgTargetRow .pmTgTotal {
  font-size: 11px;
  opacity: .65;
  font-style: italic;
}

.pmTgDiffRow .pmTgSumCell,
.pmTgDiffRow .pmTgTotal {
  font-weight: 700;
}

.pmTgNegative {
  color: #ff6b6b !important;
}

.pmTgPositive {
  color: #43d9ad !important;
}

.theme-day .pmTgNegative {
  color: #d32f2f !important;
}

.theme-day .pmTgPositive {
  color: #2e7d32 !important;
}

/* === Personal View - Day Status & Target Hours === */
/* === Personal View - Day Status Buttons === */
.pmDayStatusBtns {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
}

.pmDayStatusBtn {
  font-size: 9px;
  padding: 2px 4px;
  min-width: 18px;
  height: 16px;
  line-height: 12px;
  border: 1px solid rgba(255, 255, 255, .15);
  background: transparent;
  color: rgba(255, 255, 255, .4);
  cursor: pointer;
  transition: all .1s;
  font-weight: 600;
  border-radius: 3px;
}

.pmDayStatusBtn:hover {
  background: rgba(255, 255, 255, .1);
  color: rgba(255, 255, 255, .7);
  border-color: rgba(255, 255, 255, .25);
}

.pmDayStatusBtn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  font-weight: 700;
}

.theme-day .pmDayStatusBtn {
  border-color: rgba(0, 0, 0, .2);
  color: rgba(0, 0, 0, .4);
}

.theme-day .pmDayStatusBtn:hover {
  background: rgba(0, 0, 0, .05);
  color: rgba(0, 0, 0, .7);
  border-color: rgba(0, 0, 0, .3);
}

.theme-day .pmDayStatusBtn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.pmTgTargetRow .pmTgSumCell,
.pmTgTargetRow .pmTgTotal {
  font-size: 11px;
  opacity: .65;
  font-style: italic;
}

.pmTgDiffRow .pmTgSumCell,
.pmTgDiffRow .pmTgTotal {
  font-weight: 700;
}

.pmTgNegative {
  color: #ff6b6b !important;
}

.pmTgPositive {
  color: #43d9ad !important;
}

.theme-day .pmTgNegative {
  color: #d32f2f !important;
}

.theme-day .pmTgPositive {
  color: #2e7d32 !important;
}

/* Column width control for personal view */
.pmTgTable colgroup col:first-child {
  width: 230px;
  max-width: 240px;
}

.pmTgTable colgroup col:last-child {
  width: 60px;
  max-width: 60px;
}





/* Fix: Prevent project names from overlapping into day columns */
.pmTgMemberCell * {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pmTgMemberCell > span,
.pmTgMemberCell > div {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Ensure table cells don't overflow */
.pmTgTable td {
  overflow: hidden;
  position: relative;
}

.pmTgTable .pmTgMemberCell {
  padding: 6px 10px;
  font-size: 12px;
  max-width: 240px;
  min-width: 220px;
  width: 230px;
  position: sticky;
  left: 0;
  background: inherit;
  z-index: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-sizing: border-box;
}


/* Theme Day - only color changes, NO width changes */
.theme-day .pmTgMemberCell {
  /* Inherits all widths from .pmTgMemberCell above */
  background: inherit;
}

/* === CRITICAL: Universal column widths (same in dark & light mode) === */
.pmTgTable,
.theme-day .pmTgTable {
  table-layout: fixed !important;
  width: 100% !important;
}

.pmTgMemberCell,
.theme-day .pmTgMemberCell,
body.theme-day .pmTgMemberCell {
  max-width: 240px !important;
  min-width: 220px !important;
  width: 230px !important;
  padding: 6px 10px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.pmTgMemberHdr,
.theme-day .pmTgMemberHdr,
body.theme-day .pmTgMemberHdr {
  max-width: 240px !important;
  min-width: 220px !important;
  width: 230px !important;
}

.pmTgMemberName,
.theme-day .pmTgMemberName {
  max-width: 215px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  display: block !important;
}
