/* =========================================================
   TASK CLOUD — FOCUS HUB STYLE SCROLLBAR
   ========================================================= */

::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.28);
}

::-webkit-scrollbar-corner {
    background: transparent;
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

* {
  box-sizing: border-box;
}
html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: Inter, system-ui, sans-serif;
  background: #090b12;
  color: #eef2ff;
}
header {
  position: fixed;
  inset: 0 0 auto 0;
  height: 68px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  background: #111522;
  border-bottom: 1px solid #293047;
}
h1 {
  font-size: 18px;
  margin: 0 auto 0 0;
}
button, input, select {
  border: 1px solid #35405f;
  background: #171d2e;
  color: #fff;
  border-radius: 10px;
  padding: 9px 11px;
}
button {
  cursor: pointer;
}
#board {
  position: absolute;
  left: 0;
  top: 68px;
  width: 100vw;
  height: calc(100vh - 68px);
  overflow: hidden;
  cursor: grab;
  background-image: radial-gradient(#27304a 1px, transparent 1px);
  background-size: 24px 24px;
}
html.mobile-card-dragging,
html.mobile-card-dragging body {
  touch-action: none;
  overscroll-behavior: none;
}
#world {
  position: absolute;
  inset: 0;
  transform-origin: 0 0;
  will-change: transform;
}
svg {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
  overflow: visible;
  z-index: 0;
}
.node {
  position: absolute;
  z-index: 1;
  width: 165px;
  min-height: 68px;
  height: auto;
  padding: 11px 12px;
  border: 1px solid #455273;
  border-radius: 22px;
  background: #191f31;
  box-shadow: 0 12px 30px #0007;
  cursor: grab;
  user-select: none;
  transition: box-shadow 0.2s, border-color 0.2s, opacity 0.25s, transform 0.16s;
}
.node:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px #0009;
}
.node.dragging {
  transition: none;
  z-index: 20;
}
.node.done {
  opacity: 0.55;
}
.node.done .title {
  text-decoration: line-through;
}
.tone-blue {
  border-color: #4f9cff;
  background: linear-gradient(145deg, rgba(28, 65, 112, 0.97), rgba(25, 31, 49, 0.97));
}
.tone-purple {
  border-color: #9a7cff;
  background: linear-gradient(145deg, rgba(78, 57, 140, 0.97), rgba(25, 31, 49, 0.97));
}
.tone-yellow {
  border-color: #e7b84b;
  background: linear-gradient(145deg, rgba(111, 79, 22, 0.97), rgba(25, 31, 49, 0.97));
}
.tone-red {
  border-color: #e76565;
  background: linear-gradient(145deg, rgba(112, 39, 48, 0.97), rgba(25, 31, 49, 0.97));
}
.tone-green {
  border-color: #42c9a5;
  background: linear-gradient(145deg, rgba(25, 74, 68, 0.97), rgba(25, 31, 49, 0.97));
}
.tone-black {
  border-color: #596174;
  background: #050609;
  box-shadow: 0 12px 30px #000b;
}
.badge {
  display: inline-block;
  margin-bottom: 5px;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  background: #ffffff12;
  color: #cbd5ff;
}
.title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.18;
  margin-bottom: 4px;
}
.meta {
  font-size: 11px;
  color: #aeb8d5;
}
.note-zone {
  min-height: 12px;
  margin-top: 2px;
  padding: 2px;
  color: transparent;
  font-size: 11px;
  cursor: text;
}
.node:hover .note-zone {
  color: #7180a5;
}
.notes {
  width: 100%;
  min-height: 42px;
  margin-top: 6px;
  padding: 7px 2px;
  resize: none;
  overflow: hidden;
  border: none;
  background: transparent;
  color: #e9edff;
  border-radius: 0;
  font: 12px/1.45 Inter, system-ui;
  outline: none;
}
.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
  min-height: 28px;
}
.actions button {
  width: 28px;
  height: 28px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 10px;
  font-size: 13px;
  background: #151b2b;
  border: 1px solid #394461;
  transition: 0.15s;
}
.actions button:hover {
  transform: translateY(-2px);
  background: #222b43;
}
.color-picker {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 7px 0 2px;
}
.swatch {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #ffffff55;
  cursor: pointer;
}
.swatch.blue { background: #397bc5; }
.swatch.purple { background: #7562cf; }
.swatch.yellow { background: #d39b32; }
.swatch.red { background: #c84d59; }
.swatch.green { background: #359b85; }
.swatch.lime { background: #C6EB57; border-color: #E7FF9B; }
.swatch.black { background: #050609; border-color: #7c8497; }

.port {
  position: absolute;
  right: -7px;
  top: 50%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #9b8cff;
  border: 3px solid #151b2b;
  transform: translateY(-50%) scale(0);
  opacity: 0;
  cursor: pointer;
  transition: 0.18s;
  z-index: 20;
}
.node.show-port .port {
  transform: translateY(-50%) scale(1);
  opacity: 1;
}
.node.selected-connect {
  box-shadow: 0 0 0 4px #8b7cff55, 0 18px 38px #0009;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  background: #05070bb8;
  backdrop-filter: blur(7px);
}
.modal-backdrop.show {
  display: flex;
}
.modal {
  width: min(360px, calc(100vw - 32px));
  padding: 22px;
  border: 1px solid #3d4865;
  border-radius: 20px;
  background: linear-gradient(145deg, #171d2e, #101522);
  box-shadow: 0 24px 70px #000b;
}
.modal h2 {
  margin: 0 0 8px;
}
.modal p {
  margin: 0;
  color: #aeb8d5;
  line-height: 1.5;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 20px;
}
.danger {
  background: #8f3440;
  border-color: #c65764;
}
#branchToast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 10050;
  transform: translate(-50%, 12px);
  padding: 9px 14px;
  border-radius: 12px;
  color: #eef2ff;
  background: rgba(18, 22, 32, 0.80);
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  opacity: 0;
  visibility: hidden;
  transition: 0.18s ease;
  font-size: 12px;
  font-weight: 700;
  pointer-events: none;
}
#branchToast.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}
body.branch-group-dragging {
  cursor: grabbing !important;
  user-select: none;
}
.node.branch-group-member {
  outline: 1px solid rgba(160, 190, 255, 0.22);
  outline-offset: 3px;
}
#canvasContextMenu {
  position: fixed;
  z-index: 10021;
  min-width: 220px;
  padding: 7px;
  border-radius: 14px;
  background: rgba(18, 22, 32, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(24px) saturate(165%);
  -webkit-backdrop-filter: blur(24px) saturate(165%);
  opacity: 0;
  visibility: hidden;
  transform: scale(0.94) translateY(-4px);
  transform-origin: top left;
  transition: 0.14s ease;
}
#canvasContextMenu.show {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}
#canvasContextMenu[hidden] {
  display: none !important;
}
.node.is-resized .badge {
  align-self: flex-start !important;
  width: fit-content !important;
  max-width: max-content !important;
  flex: 0 0 auto !important;
}
header img {
  width: auto !important;
  display: block;
  transform: scale(2.8);
  transform-origin: left center;
}
header, header h1 {
  overflow: visible;
}
#branchContextMenu {
  position: fixed;
  z-index: 10020;
  min-width: 245px;
  padding: 7px;
  border-radius: 14px;
  background: rgba(18, 22, 33, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(24px) saturate(165%);
  -webkit-backdrop-filter: blur(24px) saturate(165%);
  opacity: 0;
  visibility: hidden;
  transform: scale(0.94) translateY(-4px);
  transform-origin: top left;
  transition: 0.14s ease;
}
#branchContextMenu.show {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}
.branch-menu-item {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 12px;
  border: 0;
  border-radius: 9px;
  color: #eef2ff;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: 0.14s ease;
}
.branch-menu-item:hover {
  background: rgba(255, 255, 255, 0.08);
}
.branch-menu-item.root-danger {
  color: #ffb4b4;
}
.branch-menu-item.root-danger:hover {
  background: rgba(170, 45, 55, 0.18);
  color: #ffd0d0;
}
.branch-menu-title {
  font-size: 13px;
  font-weight: 750;
}
.branch-menu-sub {
  font-size: 11px;
  color: rgba(210, 218, 236, 0.58);
}
.branch-menu-separator {
  height: 1px;
  margin: 4px 8px;
  background: rgba(255, 255, 255, 0.08);
}
#branchDeleteOverlay {
  position: fixed;
  inset: 0;
  z-index: 10030;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(3, 6, 12, 0.42);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  opacity: 0;
  visibility: hidden;
  transition: 0.18s ease;
}
#branchDeleteOverlay.show {
  opacity: 1;
  visibility: visible;
}
.branch-delete-dialog {
  width: min(430px, calc(100vw - 36px));
  padding: 24px;
  border-radius: 22px;
  background: rgba(20, 24, 34, 0.80);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(30px) saturate(170%);
  -webkit-backdrop-filter: blur(30px) saturate(170%);
  transform: scale(0.94) translateY(8px);
  transition: 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
#branchDeleteOverlay.show .branch-delete-dialog {
  transform: scale(1);
}
.branch-delete-dialog h3 {
  margin: 0 0 8px;
  color: #f5f7ff;
  font-size: 20px;
}
.branch-delete-dialog p {
  margin: 0;
  color: rgba(220, 226, 240, 0.70);
  font-size: 13px;
  line-height: 1.55;
}
.branch-delete-summary {
  margin: 16px 0 20px;
  padding: 13px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.075);
  color: #e9edfa;
  font-size: 13px;
}
.branch-delete-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}
.branch-delete-actions button {
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 10px;
  padding: 9px 13px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.14s ease;
}
#cancelBranchDelete {
  color: #dce2f2;
  background: rgba(255, 255, 255, 0.06);
}
#confirmBranchDelete {
  color: #ffd7d7;
  background: rgba(130, 34, 43, 0.45);
  border-color: rgba(255, 95, 105, 0.20);
}
#confirmBranchDelete:hover {
  background: rgba(190, 45, 55, 0.62);
  box-shadow: 0 0 24px rgba(255, 70, 80, 0.18);
  transform: translateY(-1px);
}
#exportFloatWrap {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 11000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.export-fab, .export-orb {
  border-radius: 50% !important;
  display: grid !important;
  place-items: center !important;
  padding: 0 !important;
  background: rgba(20, 25, 38, 0.72) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  color: #eef2ff !important;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: 0.2s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
}
.export-fab {
  width: 50px !important;
  height: 50px !important;
  font-size: 21px !important;
}
.export-fab:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.08);
  transition: 0.18s ease;
}
#exportOrbs {
  display: flex;
  flex-direction: column;
  gap: 9px;
  align-items: center;
  pointer-events: none;
}
.export-orb {
  width: 44px !important;
  height: 44px !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: 0.3px;
  opacity: 0;
  transform: translateY(18px) scale(0.65);
  pointer-events: none;
}
#exportFloatWrap.open #exportOrbs {
  pointer-events: auto;
}
#exportFloatWrap.open .export-orb {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
#exportFloatWrap.open .export-orb:nth-child(1) {
  transition-delay: 0.08s !important;
}
#exportFloatWrap.open .export-orb:nth-child(2) {
  transition-delay: 0.04s !important;
}
.export-orb:hover {
  transform: translateY(-2px) scale(1.06) !important;
  background: rgba(40, 48, 68, 0.88) !important;
}
#xlsxExportOverlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(3, 6, 12, 0.30);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  opacity: 0;
  visibility: hidden;
  transition: 0.18s ease;
}
#xlsxExportOverlay.show {
  opacity: 1;
  visibility: visible;
}
.xlsx-export-glass {
  width: min(390px, calc(100vw - 36px));
  padding: 24px;
  border-radius: 24px;
  background: rgba(20, 24, 35, 0.70);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(30px) saturate(175%);
  -webkit-backdrop-filter: blur(30px) saturate(175%);
  transform: scale(0.94) translateY(8px);
  transition: 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
#xlsxExportOverlay.show .xlsx-export-glass {
  transform: scale(1);
}
.xlsx-export-glass h3 {
  margin: 0 0 7px;
  font-size: 20px;
}
.xlsx-export-glass p {
  margin: 0;
  color: #aeb8d5;
  font-size: 13px;
  line-height: 1.55;
}
.xlsx-sheet-list {
  margin: 17px 0 20px;
  padding: 13px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.075);
  display: grid;
  gap: 9px;
  font-size: 13px;
}
.xlsx-export-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}
.xlsx-export-actions button {
  transition: 0.17s ease !important;
  background: rgba(255, 255, 255, 0.06);
}
#cancelXlsxExport:hover {
  background: rgba(155, 42, 53, 0.52) !important;
  border-color: rgba(255, 105, 115, 0.5) !important;
  box-shadow: 0 0 24px rgba(255, 70, 80, 0.16);
  transform: translateY(-1px) !important;
}
#confirmXlsxExport:hover {
  background: rgba(32, 130, 91, 0.56) !important;
  border-color: rgba(83, 220, 159, 0.5) !important;
  box-shadow: 0 0 24px rgba(70, 235, 160, 0.17);
  transform: translateY(-1px) !important;
}
.xlsx-mode {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: 0.16s ease;
  background: rgba(255, 255, 255, 0.025);
}
.xlsx-mode:hover {
  background: rgba(255, 255, 255, 0.065);
}
.xlsx-mode.selected {
  background: rgba(105, 132, 210, 0.13);
  border-color: rgba(145, 170, 245, 0.30);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.xlsx-mode input {
  margin: 3px 0 0;
  accent-color: #8faaff;
}
.xlsx-mode span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.xlsx-mode b {
  font-size: 13px;
}
.xlsx-mode small {
  font-size: 11px;
  color: #9eabc9;
  line-height: 1.35;
}
#imageExportOverlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(3, 6, 12, 0.30);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  opacity: 0;
  visibility: hidden;
  transition: 0.18s ease;
}
#imageExportOverlay.show {
  opacity: 1;
  visibility: visible;
}
.image-export-glass {
  width: min(410px, calc(100vw - 36px));
  padding: 24px;
  border-radius: 24px;
  background: rgba(20, 24, 35, 0.70);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(30px) saturate(175%);
  -webkit-backdrop-filter: blur(30px) saturate(175%);
  transform: scale(0.94) translateY(8px);
  transition: 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
#imageExportOverlay.show .image-export-glass {
  transform: scale(1);
}
.image-export-glass h3 {
  margin: 0 0 7px;
  font-size: 20px;
}
.image-export-glass p {
  margin: 0;
  color: #aeb8d5;
  font-size: 13px;
  line-height: 1.55;
}
.image-mode-list {
  margin: 17px 0 20px;
  display: grid;
  gap: 8px;
}
.image-mode {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: 0.16s ease;
  background: rgba(255, 255, 255, 0.025);
}
.image-mode:hover {
  background: rgba(255, 255, 255, 0.065);
}
.image-mode.selected {
  background: rgba(105, 132, 210, 0.13);
  border-color: rgba(145, 170, 245, 0.30);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.image-mode input {
  margin: 3px 0 0;
  accent-color: #8faaff;
}
.image-mode span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.image-mode b {
  font-size: 13px;
}
.image-mode small {
  font-size: 11px;
  color: #9eabc9;
  line-height: 1.35;
}
.image-export-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}
.image-export-actions button {
  transition: 0.17s ease !important;
  background: rgba(255, 255, 255, 0.06);
}
#cancelImageExport:hover {
  background: rgba(155, 42, 53, 0.52) !important;
  border-color: rgba(255, 105, 115, 0.5) !important;
  box-shadow: 0 0 24px rgba(255, 70, 80, 0.16);
  transform: translateY(-1px) !important;
}
#confirmImageExport:hover {
  background: rgba(32, 130, 91, 0.56) !important;
  border-color: rgba(83, 220, 159, 0.5) !important;
  box-shadow: 0 0 24px rgba(70, 235, 160, 0.17);
  transform: translateY(-1px) !important;
}
#progressOrb {
  position: fixed;
  left: 22px;
  bottom: 22px;
  z-index: 9500;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 0 28px rgba(180, 205, 255, 0.08);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  cursor: pointer;
  user-select: none;
  overflow: hidden;
  transition: width 0.34s cubic-bezier(0.2, 0.85, 0.2, 1), height 0.34s cubic-bezier(0.2, 0.85, 0.2, 1), border-radius 0.34s cubic-bezier(0.2, 0.85, 0.2, 1), background 0.22s ease, transform 0.18s ease;
}
#progressOrb:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}
#progressOrb.expanded {
  width: min(232px, calc(100vw - 28px));
  height: 112px;
  border-radius: 18px;
  align-items: stretch;
  justify-content: stretch;
}
.progress-orb-compact {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.16s ease;
}
#progressOrb.expanded .progress-orb-compact {
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
}
.progress-orb-percent {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: #f7f9ff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.32);
}
.progress-orb-panel {
  position: absolute;
  inset: 0;
  padding: 13px 14px;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: 0.18s ease 0.08s;
}
#progressOrb.expanded .progress-orb-panel {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.progress-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.progress-panel-value {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -1px;
  color: #fff;
}
.progress-panel-label {
  font-size: 12px;
  font-weight: 700;
  color: #d5dced;
}
.progress-track {
  height: 7px;
  margin-top: 8px;
  border-radius: 999px;
  background: rgba(3, 7, 15, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.11);
  overflow: hidden;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.25);
}
.progress-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(137, 174, 255, 0.95), rgba(119, 236, 183, 0.96));
  box-shadow: 0 0 18px rgba(119, 236, 183, 0.25);
  transition: width 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.progress-panel-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 9px;
  color: #c0c9dc;
  font-size: 9px;
}
.progress-panel-meta b {
  color: #f4f7ff;
  font-weight: 800;
}
#mobileViewOverlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(5, 7, 12, 0.55);
  backdrop-filter: blur(8px);
  z-index: 20000;
}
#mobileViewOverlay.show {
  display: flex;
}
.mobile-view-dialog {
  width: min(360px, calc(100vw - 32px));
  padding: 24px;
  border-radius: 24px;
  background: rgba(20, 24, 35, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.58);
  text-align: center;
  animation: mv 0.22s ease;
}
.mobile-view-dialog .cloud {
  font-size: 36px;
}
.mobile-view-dialog p {
  line-height: 1.6;
  color: #c8d0e5;
}
@keyframes mv {
  from { opacity: 0; transform: translateY(8px) scale(0.95); }
  to { opacity: 1; transform: none; }
}
#cloudMenuBtn {
  margin-left: auto;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 700;
  background: #171d2e;
  border: 1px solid #35405f;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1), background 0.2s;
}
#cloudMenuBtn.open {
  transform: rotate(90deg) scale(1.04);
}
#cloudDropdown {
  position: fixed;
  top: 76px;
  right: 18px;
  width: 260px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(20, 24, 35, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(22px) saturate(170%);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-18px) scale(0.94);
  transition: opacity 0.34s cubic-bezier(0.22, 1, 0.36, 1), transform 0.34s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.34s;
  z-index: 9999;
}
#cloudDropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.cloud-item, .home-item {
  padding: 11px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: 0.18s;
}
.cloud-item:hover, .home-item:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(4px);
}
.cloud-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  margin: 8px 4px;
}
@keyframes cloudItemIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
.cloud-item, .home-item {
  animation: cloudItemIn 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}
#mobileDockHint {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 88px);
  transform: translateX(-50%) translateY(8px);
  padding: 10px 16px;
  border-radius: 14px;
  background: rgba(20, 24, 35, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(20px) saturate(170%);
  -webkit-backdrop-filter: blur(20px) saturate(170%);
  color: #eef2ff;
  font-size: 12px;
  font-weight: 700;
  opacity: 0;
  visibility: hidden;
  transition: 0.18s ease;
  z-index: 15001;
}
#mobileDockHint.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
#mobileActionDock button.active {
  background: rgba(139, 124, 255, 0.16) !important;
  border-color: rgba(139, 124, 255, 0.45) !important;
  box-shadow: 0 0 16px rgba(139, 124, 255, 0.22);
}
#mobileCreateOverlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(5, 7, 12, 0.45);
  backdrop-filter: blur(8px);
  z-index: 16000;
}
#mobileCreateOverlay.show {
  display: flex;
}
.mobileCreateCard {
  width: min(360px, calc(100vw - 30px));
  padding: 22px;
  border-radius: 22px;
  background: rgba(20, 24, 35, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.mobileCreateCard h3 {
  margin: 0 0 12px;
}
#mobileTaskName {
  width: 100%;
  margin: 8px 0 16px;
}
.mobileCreateActions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Responsive / Device Scaling Override Parameters */
@media (max-width: 1024px), (max-width: 1366px) and (hover: none) and (pointer: coarse) {
  #addBtn, #task, #taskType, #undoBtn, #resetBtn, #exportFloatWrap,
  #branchContextMenu, #canvasContextMenu {
    display: none !important;
  }
  #cloudMenuBtn {
    display: grid !important;
  }
  #mobileActionDock {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    position: fixed;
    left: 50%;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
    transform: translateX(-50%);
    width: min(360px, calc(100vw - 24px));
    padding: 10px;
    border-radius: 24px;
    background: rgba(20, 24, 35, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(22px) saturate(170%);
    -webkit-backdrop-filter: blur(22px) saturate(170%);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
    z-index: 15000;
    animation: dockIn 0.18s ease;
  }
  #mobileActionDock button {
    flex: 1;
    height: 48px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.10);
  }
  #mobileActionDock button:active {
    transform: scale(0.96);
  }
  
  /* MOBILE PROGRESS ORB OVERRIDES — Centered at the extreme top-left below header */
  #progressOrb {
    left: calc(env(safe-area-inset-left, 0px) + 20px) !important;
    bottom: auto !important;
    top: calc(env(safe-area-inset-top, 0px) + 84px) !important; /* Spacing below the fixed 68px header */
    transform: none !important;
  }
  #progressOrb:hover {
    transform: translateY(-2px) !important;
  }
  #progressOrb.expanded {
    left: calc(env(safe-area-inset-left, 0px) + 20px) !important;
    bottom: auto !important;
    top: calc(env(safe-area-inset-top, 0px) + 84px) !important;
    transform: none !important;
  }
}

/* complementary rule for desktop: hide mobile menus on hover-capable laptops and desktop monitors */
@media (min-width: 1025px) and (hover: hover), (min-width: 1367px) {
  #cloudMenuBtn, #cloudDropdown {
    display: none !important;
  }
}

@keyframes dockIn {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

#undoBtn {
  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
  padding: 10px 14px !important;
  font-size: 18px !important;
  line-height: 1 !important;
  align-self: stretch !important;
}
.delete-btn .trash-icon {
  display: block !important;
  width: 20px !important;
  height: 20px !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  translate: none !important;
  flex: 0 0 20px !important;
  overflow: visible !important;
  color: #dce4ff !important;
  stroke: #dce4ff !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: none !important;
}
.delete-btn .trash-icon path {
  stroke: #dce4ff !important;
  fill: none !important;
  opacity: 1 !important;
  visibility: visible !important;
}
.node > .delete-btn {
  display: none !important;
}
.node .actions {
  display: flex !important;
  align-items: center !important;
}
.node .actions .delete-btn {
  position: relative !important;
  inset: auto !important;
  transform: none !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  line-height: 0 !important;
}
.tone-lime {
  border-color: #C6EB57 !important;
  background: linear-gradient(145deg, #293617, #3A4A1D) !important;
  box-shadow: 0 10px 28px rgba(198, 235, 87, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}
.swatch.copper {
  background: #9A5D3F !important;
  border-color: #C9825D !important;
}
.tone-copper {
  border-color: #C9825D !important;
  background: linear-gradient(145deg, #4A2A1D, #6A3D29) !important;
  box-shadow: 0 10px 28px rgba(154, 93, 63, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}
#resetBtn {
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease !important;
}
#resetBtn:hover {
  background: #7a2630 !important;
  border-color: #e76565 !important;
  color: #fff !important;
  box-shadow: 0 0 0 1px rgba(231, 101, 101, 0.16), 0 8px 22px rgba(200, 77, 89, 0.18) !important;
  transform: translateY(-1px) !important;
}
#confirmReset.danger-confirm {
  background: #7a2630 !important;
  border-color: #e76565 !important;
  color: #fff !important;
}
#confirmReset.danger-confirm:hover {
  background: #9a303d !important;
  border-color: #ff7b85 !important;
}
.node {
  box-sizing: border-box !important;
}
.resize-handle {
  position: absolute !important;
  right: 8px !important;
  bottom: 7px !important;
  width: 25px !important;
  height: 25px !important;
  cursor: nwse-resize !important;
  opacity: 0.16 !important;
  transition: opacity 0.16s ease, transform 0.16s ease !important;
  z-index: 20 !important;
  touch-action: none !important;
  background: none !important;
}
.resize-handle::before {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  background:
    linear-gradient(135deg, transparent 45%, #dce4ff 46%, #dce4ff 52%, transparent 53%) 13px 13px/12px 12px no-repeat,
    linear-gradient(135deg, transparent 45%, #dce4ff 46%, #dce4ff 52%, transparent 53%) 7px 7px/18px 18px no-repeat,
    linear-gradient(135deg, transparent 45%, #dce4ff 46%, #dce4ff 52%, transparent 53%) 1px 1px/24px 24px no-repeat !important;
  border: 0 !important;
  width: 25px !important;
  height: 25px !important;
  right: auto !important;
  bottom: auto !important;
}
.resize-handle::after {
  display: none !important;
}
.node:hover .resize-handle {
  opacity: 0.58 !important;
}
.resize-handle:hover {
  opacity: 1 !important;
  transform: scale(1.08) !important;
}
.node.is-resized {
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
  --card-scale: 1;
}
.node.is-resized .title {
  font-size: calc(26px * var(--card-scale)) !important;
  max-width: calc(100% - 58px) !important;
  overflow-wrap: anywhere !important;
}
.node.is-resized .badge {
  font-size: calc(14px * var(--card-scale)) !important;
  padding: calc(5px * var(--card-scale)) calc(10px * var(--card-scale)) !important;
}
.node.is-resized .status {
  font-size: calc(16px * var(--card-scale)) !important;
  max-width: calc(100% - 58px) !important;
}
.node.is-resized .notes {
  font-size: calc(16px * var(--card-scale)) !important;
  line-height: 1.45 !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  max-width: calc(100% - 12px) !important;
  overflow: auto !important;
  margin-bottom: 10px !important;
}
.node.is-resized .actions {
  margin-top: auto !important;
  flex: 0 0 auto !important;
  align-self: flex-start !important;
  gap: calc(8px * var(--card-scale)) !important;
}
.node .title {
  overflow-wrap: anywhere !important;
  word-break: break-word;
  min-width: 0;
}
.node.is-resized .title {
  width: calc(100% - 58px) !important;
  max-width: calc(100% - 58px) !important;
}

/* Complete reset for the trash icon styles to guarantee clean 18px rendering */
.node .actions .delete-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  line-height: 0 !important;
  background: #151b2b !important;
  border: 1px solid #394461 !important;
}
.node .actions .delete-btn .trash-icon {
  position: static !important;
  display: block !important;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  color: #dce4ff !important;
  stroke: #dce4ff !important;
  stroke-width: 1.8 !important;
  fill: none !important;
  opacity: 1 !important;
  filter: none !important; /* Removes any unwanted parent filters/glows */
  overflow: visible !important;
}
.node .actions .delete-btn .trash-icon path {
  stroke: #dce4ff !important;
  stroke-width: 1.8 !important;
  fill: none !important;
  opacity: 1 !important;
}

/* ATLAS UPDATE 1.1 — TIMER SYSTEM */
.task-cloud-timer-window {
  position: fixed;
  z-index: 12500;
  width: 280px;
  padding: 16px;
  background: rgba(18, 22, 33, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 18px;
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: #eef2ff;
  font-family: Inter, system-ui, sans-serif;
  user-select: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.94) translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.task-cloud-timer-window.show {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1) translateY(0);
}

.timer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: grab;
  padding-bottom: 4px;
}

.timer-header:active {
  cursor: grabbing;
}

.timer-task-title {
  font-size: 13px;
  font-weight: 750;
  color: rgba(220, 226, 240, 0.85);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timer-close-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  font-size: 20px;
  line-height: 1;
  padding: 0 4px;
  cursor: pointer;
  transition: color 0.16s ease;
}

.timer-close-btn:hover {
  color: #eef2ff;
}

.timer-modes {
  display: flex;
  background: rgba(0, 0, 0, 0.22);
  border-radius: 10px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.timer-mode-btn {
  flex: 1;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: rgba(220, 226, 240, 0.6);
  font-size: 11px;
  font-weight: 700;
  padding: 7px 0;
  cursor: pointer;
  transition: all 0.18s ease;
}

.timer-mode-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.timer-mode-btn.active {
  background: rgba(139, 124, 255, 0.16);
  color: #9b8cff;
  border: 1px solid rgba(139, 124, 255, 0.28);
}

.timer-display-area {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.timer-display {
  font-size: 38px;
  font-weight: 850;
  text-align: center;
  font-family: monospace, monospace;
  color: #fff;
  letter-spacing: -0.5px;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
  padding: 4px 0;
}

.wheel-picker {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  gap: 12px;
  padding: 10px 110px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  width: 100%;
}

.wheel-picker::-webkit-scrollbar {
  display: none;
}

.wheel-picker-track {
  display: flex;
  gap: 12px;
}

.wheel-option {
  flex: 0 0 32px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: rgba(220, 226, 240, 0.35);
  scroll-snap-align: center;
  cursor: pointer;
  transition: color 0.18s ease, transform 0.18s ease;
}

.wheel-option.selected {
  color: #9b8cff;
  transform: scale(1.22);
}

.timer-controls {
  display: flex;
  gap: 10px;
}

.timer-ctrl-btn {
  flex: 1;
  padding: 9px 0;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  border: 1px solid transparent;
}

.timer-ctrl-btn.started {
  background: rgba(139, 124, 255, 0.16);
  color: #9b8cff;
  border-color: rgba(139, 124, 255, 0.28);
}

.timer-ctrl-btn.started:hover {
  background: rgba(139, 124, 255, 0.24);
}

.timer-ctrl-btn.paused {
  background: rgba(231, 101, 101, 0.16);
  color: #e76565;
  border-color: rgba(231, 101, 101, 0.28);
}

.timer-ctrl-btn.paused:hover {
  background: rgba(231, 101, 101, 0.24);
}

.timer-ctrl-btn.reset {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(220, 226, 240, 0.85);
}

.timer-ctrl-btn.reset:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Completion Screen Layouts */
.timer-completion-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  text-align: center;
}

.timer-completion-badge {
  font-size: 11px;
  font-weight: 800;
  color: #e76565;
  background: rgba(231, 101, 101, 0.12);
  padding: 4px 10px;
  border-radius: 99px;
  letter-spacing: 0.3px;
  border: 1px solid rgba(231, 101, 101, 0.25);
}

.timer-completion-message {
  font-size: 22px;
  font-weight: 850;
  color: #fff;
  letter-spacing: -0.5px;
}

.timer-completion-extensions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.timer-ext-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #eef2ff;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.timer-ext-btn:hover {
  background: rgba(139, 124, 255, 0.12);
  color: #9b8cff;
  border-color: rgba(139, 124, 255, 0.28);
}

.timer-finish-btn {
  width: 100%;
  background: rgba(66, 201, 165, 0.14);
  border: 1px solid rgba(66, 201, 165, 0.25);
  color: #42c9a5;
  font-size: 12px;
  font-weight: 700;
  padding: 9px 0;
  border-radius: 10px;
  cursor: pointer;
  margin-top: 4px;
  transition: all 0.16s ease;
}

.timer-finish-btn:hover {
  background: rgba(66, 201, 165, 0.22);
}

/* Draggable Task Card Top Tools Setup */
.node .card-top-tools {
  position: absolute !important;
  top: 8px !important;
  right: 9px !important;
  left: auto !important;
  bottom: auto !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 5px !important;
  width: 25px !important;
  margin: 0 !important;
  z-index: 100 !important;
}

.node .card-top-tools .rename-btn,
.node .card-top-tools .color-btn,
.node .card-top-tools .timer-btn {
  position: static !important;
  width: 25px !important;
  height: 25px !important;
  min-width: 25px !important;
  flex: 0 0 25px !important;
  padding: 0 !important;
  margin: 0 !important;
  display: grid !important;
  place-items: center !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Resized card rules */
.node.is-resized .actions button,
.node.is-resized .rename-btn,
.node.is-resized .color-btn,
.node.is-resized .timer-btn {
  width: calc(42px * var(--card-scale)) !important;
  height: calc(42px * var(--card-scale)) !important;
  font-size: calc(20px * var(--card-scale)) !important;
}

.node.is-resized .rename-btn,
.node.is-resized .color-btn,
.node.is-resized .timer-btn {
  right: calc(14px * var(--card-scale)) !important;
}

.node.is-resized .rename-btn {
  top: calc(14px * var(--card-scale)) !important;
}

.node.is-resized .color-btn {
  top: calc(60px * var(--card-scale)) !important;
}
/* FINAL EDIT ICON FIX */
.node .card-top-tools .rename-btn {
    display: grid !important;
    place-items: center !important;
    position: relative !important;
    padding: 0 !important;
}

.node .card-top-tools .rename-btn svg {
    position: static !important;
    inset: auto !important;
    left: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;

    display: block !important;
    width: 14px !important;
    height: 14px !important;

    margin: 0 !important;
    padding: 0 !important;

    transform: none !important;
    translate: none !important;

    align-self: center !important;
    justify-self: center !important;

    pointer-events: none !important;
}
/* Focus highlighting slow breathing styles */
.node.active-focus-task {
  transform: translateY(-4px) !important;
  box-shadow: 0 16px 36px var(--glow-color, rgba(139, 124, 255, 0.35)) !important;
  animation: breathingGlow 3s ease-in-out infinite alternate !important;
}

.node.active-focus-task.tone-blue { --glow-color: rgba(79, 156, 255, 0.42); border-color: #4f9cff !important; }
.node.active-focus-task.tone-purple { --glow-color: rgba(154, 124, 255, 0.42); border-color: #9a7cff !important; }
.node.active-focus-task.tone-yellow { --glow-color: rgba(231, 184, 75, 0.42); border-color: #e7b84b !important; }
.node.active-focus-task.tone-red { --glow-color: rgba(231, 101, 101, 0.42); border-color: #e76565 !important; }
.node.active-focus-task.tone-green { --glow-color: rgba(66, 201, 165, 0.42); border-color: #42c9a5 !important; }
.node.active-focus-task.tone-lime { --glow-color: rgba(198, 235, 87, 0.35); border-color: #C6EB57 !important; }
.node.active-focus-task.tone-copper { --glow-color: rgba(201, 130, 93, 0.35); border-color: #C9825D !important; }
.node.active-focus-task.tone-black { --glow-color: rgba(89, 97, 116, 0.35); border-color: #596174 !important; }

@keyframes breathingGlow {
  from {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 4px var(--glow-color);
  }
  to {
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.5), 0 0 18px var(--glow-color);
  }
}

/* Completed card locking */
.node.done .actions button:not(.done-btn),
.node.done .fontBtn,
.node.done .colorBtn,
.node.done .timer-btn,
.node.done .resizeHandle,
.node.done .title,
.node.done .notes {
  pointer-events: none !important;
}

.node.done .actions button:not(.done-btn),
.node.done .fontBtn,
.node.done .colorBtn,
.node.done .timer-btn,
.node.done .resizeHandle {
  opacity: .42 !important;
}

/* ======================================================
   ATLAS UPDATE 1.2 — LEFT SIDEBAR & WORKSPACE STYLES
   ====================================================== */

#leftSidebar {
  position: fixed;
  left: 20px;
  top: 50%;
  transform: translateY(-50%); /* Perfectly centered vertically */
  width: 54px;
  height: auto; /* Shrinks the height to exactly fit the contents */
  background: rgba(18, 22, 33, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 20px;
  backdrop-filter: blur(24px) saturate(165%);
  -webkit-backdrop-filter: blur(24px) saturate(165%);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 0;
  gap: 12px;
  z-index: 15000 !important; /* Enforces absolute viewport stacking superiority */
  pointer-events: auto !important;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sidebar-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(220, 226, 240, 0.65);
  font-size: 16px;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  transition: all 0.18s ease;
}

.sidebar-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.08);
}

.sidebar-divider {
  width: 24px;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 4px 0;
}

/* Tooltip Layouts */
.sidebar-tooltip {
  position: fixed;
  z-index: 15100 !important; /* Forces tooltip to render above any active modal workspace window */
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(20, 24, 35, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  color: #eef2ff;
  font-size: 11px;
  font-weight: 700;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-4px) scale(0.96);
  transition: opacity 0.16s ease, transform 0.16s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.sidebar-tooltip.show {
  opacity: 1;
  transform: translateX(0) scale(1);
}

/* Workspace Draggable Window overrides */
.workspace-panel-window {
  width: 290px;
  gap: 16px;
}

.workspace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: grab;
  padding-bottom: 2px;
}

.workspace-header:active {
  cursor: grabbing;
}

.workspace-title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: #fff;
}

.panel-close-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  font-size: 20px;
  line-height: 1;
  padding: 0 4px;
  cursor: pointer;
  transition: color 0.16s ease;
}

.panel-close-btn:hover {
  color: #eef2ff;
}

.workspace-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.workspace-section-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(220, 226, 240, 0.45);
}

.workspace-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: all 0.18s ease;
}

.workspace-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
}

.workspace-item.active {
  background: rgba(139, 124, 255, 0.08);
  border-color: rgba(139, 124, 255, 0.22);
  cursor: default;
}

.workspace-icon {
  font-size: 15px;
}

.workspace-name {
  font-size: 13px;
  font-weight: 750;
  color: #eef2ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.workspace-badge-current {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  color: #9b8cff;
  background: rgba(139, 124, 255, 0.15);
  padding: 2px 7px;
  border-radius: 6px;
  letter-spacing: 0.3px;
}

.workspace-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 160px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.workspace-empty-list {
  font-size: 11px;
  color: rgba(220, 226, 240, 0.35);
  text-align: center;
  padding: 12px 0;
}

/* Form and Creation limits */
.workspace-create-btn {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #eef2ff;
  font-size: 12px;
  font-weight: 700;
  padding: 9px 0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.workspace-create-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.workspace-limit-warning {
  padding: 12px;
  border-radius: 12px;
  background: rgba(231, 101, 101, 0.08);
  border: 1px solid rgba(231, 101, 101, 0.18);
  font-size: 11px;
  line-height: 1.45;
}

.workspace-limit-warning strong {
  display: block;
  color: #e76565;
  margin-bottom: 2px;
}

.workspace-limit-warning p {
  margin: 0;
  color: rgba(220, 226, 240, 0.6);
}

.workspace-inline-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.workspace-inline-form input {
  width: 100%;
  font-size: 12px;
  padding: 8px 10px;
}

.workspace-form-actions {
  display: flex;
  gap: 6px;
}

.workspace-form-actions button {
  flex: 1;
  padding: 6px 0;
  font-size: 11px;
  font-weight: 700;
  border-radius: 8px;
}

#workspaceSaveFormBtn {
  background: rgba(66, 201, 165, 0.12);
  border-color: rgba(66, 201, 165, 0.22);
  color: #42c9a5;
}

#workspaceSaveFormBtn:hover {
  background: rgba(66, 201, 165, 0.20);
}

.workspace-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 12px;
  margin-top: 4px;
}

.workspace-home-btn {
  width: 100%;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(220, 226, 240, 0.8);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.workspace-home-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

/* ======================================================
   ATLAS UPDATE 1.2 — FOCUS HUB EXTRAS
   ====================================================== */

.focus-hub-window {
  width: 320px;
  height: 520px;
}

.focus-hub-scroll-area {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  padding-right: 2px;
}

.focus-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.focus-stat-card {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.focus-stat-card small {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: rgba(220, 226, 240, 0.4);
}

.focus-stat-card strong {
  font-size: 18px;
  font-weight: 850;
  color: #fff;
}

.focus-breakdown-list, .focus-timeline-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.focus-breakdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.breakdown-task-name {
  font-size: 12px;
  font-weight: 700;
  color: rgba(220, 226, 240, 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.breakdown-task-time {
  font-size: 11px;
  font-weight: 800;
  color: #9b8cff;
}

.focus-timeline-item {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  padding-left: 4px;
}

.timeline-time {
  font-size: 10px;
  font-weight: 800;
  color: rgba(220, 226, 240, 0.4);
  width: 36px;
}

.timeline-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9b8cff;
  box-shadow: 0 0 8px #9b8cff;
  flex-shrink: 0;
}

.timeline-desc {
  font-size: 11px;
  font-weight: 700;
  color: rgba(220, 226, 240, 0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.focus-weekly-summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(0, 0, 0, 0.15);
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.summary-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}

.summary-stat span {
  color: rgba(220, 226, 240, 0.5);
  font-weight: 700;
}

.summary-stat b {
  color: #fff;
  font-weight: 850;
}

/* Pulse Dual Wheel Sizing Settings */
.dual-wheel-container {
  display: flex;
  gap: 12px;
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 6px;
  height: 98px;
  overflow: hidden;
}

.wheel-picker-vertical {
  flex: 1;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.wheel-picker-vertical::-webkit-scrollbar {
  display: none;
}

.wheel-scroller-padding {
  height: 32px;
  flex-shrink: 0;
}

.wheel-option-vertical {
  height: 32px;
  line-height: 32px;
  font-size: 13px;
  font-weight: 700;
  color: rgba(220, 226, 240, 0.35);
  scroll-snap-align: center;
  text-align: center;
  width: 100%;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}

.wheel-option-vertical.selected {
  color: #9b8cff;
  transform: scale(1.18);
  font-weight: 850;
}
/* =========================================================
   TASK CLOUD ATLAS — EDIT POPUP STYLES
   ========================================================= */
.task-edit-panel {
  position: fixed;
  z-index: 13000;
  width: 200px;
  padding: 12px;
  background: rgba(18, 22, 33, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  backdrop-filter: blur(24px) saturate(165%);
  -webkit-backdrop-filter: blur(24px) saturate(165%);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: #eef2ff;
  font-family: Inter, system-ui, sans-serif;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: auto;
  user-select: none;
}

.task-edit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.task-edit-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: rgba(220, 226, 240, 0.85);
}

.task-edit-close {
  background: transparent !important;
  border: none !important;
  color: rgba(255, 255, 255, 0.4) !important;
  font-size: 18px !important;
  line-height: 1 !important;
  padding: 0 !important;
  width: auto !important;
  height: auto !important;
  cursor: pointer;
  transition: color 0.16s ease;
}

.task-edit-close:hover {
  color: #eef2ff !important;
}

.task-edit-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.task-edit-option {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 8px 10px !important;
  border: 1px solid transparent !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, 0.03) !important;
  color: rgba(220, 226, 240, 0.9) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  text-align: left !important;
  cursor: pointer;
  transition: all 0.15s ease !important;
}

.task-edit-option:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  transform: translateX(2px);
}

.task-edit-option .option-icon {
  font-size: 13px;
  display: inline-block;
  width: 16px;
  text-align: center;
}
/*TASK-CLOUD HISTORY PANEL */

/* =========================================================
   TASK CLOUD ATLAS — FOCUS HISTORY WINDOW STYLES
   ========================================================= */
.focus-history-window {
  width: 320px;
  height: 520px;
}

.focus-history-scroll-area {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  padding-right: 2px;
}

.focus-history-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.22);
  border-radius: 10px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.focus-history-nav .nav-arrow {
  background: transparent !important;
  border: none !important;
  color: rgba(220, 226, 240, 0.6) !important;
  font-size: 18px !important;
  line-height: 1 !important;
  padding: 0 8px !important;
  cursor: pointer;
  width: auto !important;
  height: auto !important;
  transition: color 0.16s ease !important;
}

.focus-history-nav .nav-arrow:hover {
  color: #fff !important;
}

.focus-history-month-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #fff;
}

.calendar-week-labels {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  text-align: center;
  font-size: 9px;
  font-weight: 800;
  color: rgba(220, 226, 240, 0.4);
}

.focus-history-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.focus-history-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 5px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.focus-history-day:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.08);
}

.focus-history-day .day-num {
  font-size: 10px;
  font-weight: 700;
  color: rgba(220, 226, 240, 0.85);
}

.focus-history-day .day-time {
  font-size: 8px;
  font-weight: 800;
  color: rgba(220, 226, 240, 0.4);
  text-align: right;
}

.focus-history-day.current-month {
  opacity: 1;
}

.focus-history-day.other-month {
  opacity: 0.35;
}

.focus-history-day.today {
  border-color: rgba(139, 124, 255, 0.45);
  background: rgba(139, 124, 255, 0.05);
}

.focus-history-day.today .day-num {
  color: #9b8cff;
}

.focus-history-day.selected {
  border-color: #9b8cff !important;
  background: rgba(139, 124, 255, 0.15) !important;
  box-shadow: 0 0 12px rgba(155, 140, 255, 0.15);
}

.focus-history-day.selected .day-num {
  color: #fff;
}

.focus-history-day.selected .day-time {
  color: #9b8cff;
}

.focus-history-details {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 12px;
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.details-section-header {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #fff;
  text-transform: uppercase;
}

.details-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.details-stat-cell {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.details-stat-cell small {
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: rgba(220, 226, 240, 0.4);
}

.details-stat-cell strong {
  font-size: 14px;
  font-weight: 850;
  color: #fff;
}

/* =========================================================
   TASK CLOUD ATLAS — SVG LAYOUT CORRECTIONS
   ========================================================= */

/* Overrides the global absolute/1px rule for Sidebar buttons */
.sidebar-btn svg {
  position: static !important;
  width: 18px !important;
  height: 18px !important;
  display: block !important;
  pointer-events: none !important;
  overflow: visible !important;
  margin: auto !important;
}

/* Overrides the global absolute/1px rule for Task-card Edit buttons */
.node .rename-btn svg {
  position: static !important;
  width: 14px !important;
  height: 14px !important;
  display: block !important;
  pointer-events: none !important;
  overflow: visible !important;
}

/* =========================================================
   TASK CLOUD ATLAS — FOCUS HISTORY CENTERING & POLISH
   ========================================================= */
.focus-history-window {
  transition: width 0.24s cubic-bezier(0.2, 0.8, 0.2, 1), height 0.24s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.22s ease, transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.focus-history-window.expanded {
  width: 480px;
  height: 720px;
}

.focus-history-window.compact {
  width: 420px;
  height: 450px;
}

.focus-history-window .workspace-title {
  font-size: 13px !important;
  font-weight: 850 !important;
  letter-spacing: 0.5px !important;
}

.panel-expand-btn {
  background: transparent !important;
  border: none !important;
  color: rgba(255, 255, 255, 0.4) !important;
  padding: 4px !important;
  cursor: pointer;
  display: flex !important;
  align-items: center;
  justify-content: center;
  transition: color 0.16s ease, transform 0.16s ease;
  width: auto !important;
  height: auto !important;
}

.panel-expand-btn:hover {
  color: #9b8cff !important;
  transform: scale(1.08);
}

.panel-expand-btn svg {
  position: static !important;
  width: 14px !important;
  height: 14px !important;
  display: block !important;
  pointer-events: none !important;
}

.focus-history-scroll-area {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  padding-right: 4px;
}

/* Wrap calendar and details in centered containers */
.calendar-wrapper, .details-section-wrapper {
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.focus-history-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 12px;
  padding: 6px 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  width: fit-content;
  margin: 4px auto;
}

.focus-history-nav .nav-arrow {
  background: transparent !important;
  border: none !important;
  color: rgba(220, 226, 240, 0.5) !important;
  font-size: 20px !important;
  line-height: 1 !important;
  padding: 0 4px !important;
  cursor: pointer;
  width: auto !important;
  height: auto !important;
  transition: color 0.16s ease, transform 0.16s ease !important;
}

.focus-history-nav .nav-arrow:hover {
  color: #9b8cff !important;
  transform: scale(1.15);
}

.focus-history-month-label {
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 1px;
  color: #fff;
}

.calendar-week-labels {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  text-align: center;
  font-size: 9px;
  font-weight: 800;
  color: rgba(220, 226, 240, 0.4);
  padding: 4px 0;
}

.calendar-week-labels div {
  display: flex;
  align-items: center;
  justify-content: center;
}

.focus-history-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.focus-history-day {
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 7px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.focus-history-day:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.focus-history-day .day-num {
  font-size: 11px;
  font-weight: 700;
  color: rgba(220, 226, 240, 0.85);
  align-self: flex-start;
}

.focus-history-day .day-time {
  font-size: 9px;
  font-weight: 800;
  color: rgba(220, 226, 240, 0.4);
  align-self: flex-end;
}

.focus-history-day.current-month {
  opacity: 1;
}

.focus-history-day.other-month {
  opacity: 0.35;
}

.focus-history-day.today {
  border-color: rgba(139, 124, 255, 0.45);
  background: rgba(139, 124, 255, 0.05);
}

.focus-history-day.today .day-num {
  color: #9b8cff;
}

.focus-history-day.selected {
  border-color: #9b8cff !important;
  background: rgba(139, 124, 255, 0.16) !important;
  box-shadow: 0 0 14px rgba(155, 140, 255, 0.2);
}

.focus-history-day.selected .day-num {
  color: #fff;
}

.focus-history-day.selected .day-time {
  color: #9b8cff;
}

.focus-history-details {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 16px;
  margin-top: 8px;
}

.focus-history-window.compact .focus-history-details {
  display: none !important;
}

.details-section-header {
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.8px;
  color: #fff;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 8px;
}

.details-divider {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #9b8cff, transparent);
  margin: 0 auto 16px;
}

.details-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.details-stat-cell {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 12px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
}

.details-stat-cell small {
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(220, 226, 240, 0.4);
}

.details-stat-cell strong {
  font-size: 15px;
  font-weight: 850;
  color: #fff;
}

/* Polish detail task breakdowns and logs */
.focus-history-window .focus-breakdown-item {
  padding: 10px 14px !important;
  border-radius: 12px !important;
}

.focus-history-window .workspace-section-label {
  font-size: 9px !important;
  font-weight: 850 !important;
  letter-spacing: 0.8px !important;
  margin-bottom: 8px !important;
}


/* =========================================================
   TASK CLOUD ATLAS — HEATMAP COLOR INTENSITY STYLES
   ========================================================= */

/* Level 0: 0m focus duration */
.focus-history-day.intensity-0 {
  background: rgba(255, 255, 255, 0.02);
}

/* Level 1: 1–29m focus duration (Very light purple) */
.focus-history-day.intensity-1 {
  background: rgba(155, 140, 255, 0.08);
  border-color: rgba(155, 140, 255, 0.12);
}

/* Level 2: 30–59m focus duration (Light/medium purple) */
.focus-history-day.intensity-2 {
  background: rgba(155, 140, 255, 0.18);
  border-color: rgba(155, 140, 255, 0.22);
}

/* Level 3: 1h–1h 59m focus duration (Medium purple) */
.focus-history-day.intensity-3 {
  background: rgba(155, 140, 255, 0.32);
  border-color: rgba(155, 140, 255, 0.36);
}
.focus-history-day.intensity-3 .day-time {
  color: rgba(220, 226, 240, 0.70);
}

/* Level 4: 2h–2h 59m focus duration (Darker/richer purple) */
.focus-history-day.intensity-4 {
  background: rgba(140, 115, 255, 0.48);
  border-color: rgba(140, 115, 255, 0.52);
}
.focus-history-day.intensity-4 .day-time {
  color: rgba(220, 226, 240, 0.80);
}

/* Level 5: 3h+ focus duration (Deep saturated purple) */
.focus-history-day.intensity-5 {
  background: rgba(125, 90, 255, 0.68);
  border-color: rgba(125, 90, 255, 0.72);
}
.focus-history-day.intensity-5 .day-time {
  color: rgba(255, 255, 255, 0.90);
}

/* Ensure Today's cell outline continues to render clearly on active tiles */
.focus-history-day.today {
  border: 1px dashed rgba(155, 140, 255, 0.8) !important;
  box-shadow: inset 0 0 4px rgba(155, 140, 255, 0.3);
}

/* Selected cells inherit high-priority visual overrides */
.focus-history-day.selected {
  border-color: #9b8cff !important;
  background: rgba(139, 124, 255, 0.22) !important;
  box-shadow: 0 0 14px rgba(155, 140, 255, 0.3) !important;
}

/* =========================================================
   TASK CLOUD ATLAS — TOP-RIGHT BUTTON OVERLAP CORRECTION
   ========================================================= */

/* Lock top-right buttons inside their native flex layout */
.node .card-top-tools button,
.node.is-resized .card-top-tools button {
  position: static !important;
  inset: auto !important;
  transform: none !important;
  margin: 0 !important;
}

/* Ensure the flex container scales dynamically on resized cards */
.node.is-resized .card-top-tools {
  top: calc(8px * var(--card-scale)) !important;
  right: calc(9px * var(--card-scale)) !important;
  gap: calc(5px * var(--card-scale)) !important;
  width: calc(25px * var(--card-scale)) !important;
}

/* Handle dimensions on resized card tool buttons uniformly */
.node.is-resized .card-top-tools button {
  width: calc(25px * var(--card-scale)) !important;
  height: calc(25px * var(--card-scale)) !important;
  min-width: calc(25px * var(--card-scale)) !important;
  min-height: calc(25px * var(--card-scale)) !important;
  flex: 0 0 calc(25px * var(--card-scale)) !important;
}

/* =========================================================
   TASK CLOUD ATLAS — TOP-RIGHT BUTTON CORNER CURVATURE
   ========================================================= */

/* Lock the button borders to be perfectly circular at any scale */
.node .card-top-tools button,
.node.is-resized .card-top-tools button {
  position: static !important;
  inset: auto !important;
  transform: none !important;
  margin: 0 !important;
  border-radius: 50% !important; /* Forces perfect circle geometry */
}

/* Ensure the flex container scales dynamically on resized cards */
.node.is-resized .card-top-tools {
  top: calc(8px * var(--card-scale)) !important;
  right: calc(9px * var(--card-scale)) !important;
  gap: calc(5px * var(--card-scale)) !important;
  width: calc(25px * var(--card-scale)) !important;
}

/* Handle dimensions on resized card tool buttons uniformly */
.node.is-resized .card-top-tools button {
  width: calc(25px * var(--card-scale)) !important;
  height: calc(25px * var(--card-scale)) !important;
  min-width: calc(25px * var(--card-scale)) !important;
  min-height: calc(25px * var(--card-scale)) !important;
  flex: 0 0 calc(25px * var(--card-scale)) !important;
}
/* =========================================================
   TASK CLOUD ATLAS — STATIC ORIGINAL (OG) BUTTON SIZES
   ========================================================= */

/* Lock top-right buttons (Edit, Color, Timer) strictly to their OG size (24px) */
.node .card-top-tools button,
.node.is-resized .card-top-tools button {
  position: static !important;
  inset: auto !important;
  transform: none !important;
  margin: 0 !important;
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
  flex: 0 0 24px !important;
  border-radius: 50% !important; /* Perfect round circles */
}

/* Lock the container itself to stay in its original top-right position */
.node.is-resized .card-top-tools {
  top: 8px !important;
  right: 9px !important;
  gap: 5px !important;
  width: 24px !important;
}

/* Lock bottom action buttons strictly to their OG size (28px) */
.node .actions button,
.node.is-resized .actions button {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  flex: 0 0 28px !important;
  border-radius: 10px !important; /* Preserves 10px rounded corners */
}