.profile-thumbnail {
    position: absolute;
}
.profile-header {
    min-height: 260px;
    margin-left: 280px;
}
div.post-tabs {
    margin-top: 16px;
}
ul.posts {
    list-style-type: none;
    padding: 0px;
    margin: 16px 0px 0px 0px;
    border-top: 1px solid #e0e0e0;
}
div.post-tabs ul.posts {
    margin: 0px;
    border-top: none;
}
ul.posts li.post {
    padding: 8px;
    border-bottom: 1px solid #e0e0e0;
}
ul.posts li.post:hover {
    background-color: #f0f0f0;
}
div.post-date {
    float: right;
}
div.post-author {
    font-weight: bold;
}
div.post-thumbnail {
    position: absolute;
}
div.post-content {
    margin-left: 48px;
    min-height: 48px;
}
div.post-footer {
    text-align: right;
}
ul.comments {
    list-style-type: none;
    padding: 0px;
    margin: 16px 0px 0px 0px;
}
ul.comments li.comment {
    margin-left: 32px;
    padding: 8px;
    border-bottom: 1px solid #e0e0e0;
}
ul.comments li.comment:nth-child(1) {
    border-top: 1px solid #e0e0e0;
}
ul.comments li.comment:hover {
    background-color: #f0f0f0;
}
div.comment-date {
    float: right;
}
div.comment-author {
    font-weight: bold;
}
div.comment-thumbnail {
    position: absolute;
}
div.comment-content {
    margin-left: 48px;
    min-height: 48px;
}
div.comment-form {
    margin: 16px 0px 16px 32px;
}
div.pagination {
    width: 100%;
    text-align: right;
    padding: 0px;
    margin: 0px;
}
div.flask-pagedown-preview {
    margin: 10px 0px 10px 0px;
    border: 1px solid #e0e0e0;
    padding: 4px;
}
div.flask-pagedown-preview h1 {
    font-size: 140%;
}
div.flask-pagedown-preview h2 {
    font-size: 130%;
}
div.flask-pagedown-preview h3 {
    font-size: 120%;
}
.post-body h1 {
    font-size: 140%;
}
.post-body h2 {
    font-size: 130%;
}
.post-body h3 {
    font-size: 120%;
}
.table.followers tr {
    border-bottom: 1px solid #e0e0e0;
}



/* Depth banding for TreeTable rows */
.p-treetable .p-treetable-tbody > tr.depth-0 > td { background: #fafafa; }
.p-treetable .p-treetable-tbody > tr.depth-1 > td { background: #ffffff; }
.p-treetable .p-treetable-tbody > tr.depth-2 > td { background: #f2f8ff; }
.p-treetable .p-treetable-tbody > tr.depth-3 > td { background: #fff7e8; }
.p-treetable .p-treetable-tbody > tr.depth-4 > td { background: #f3fff3; }
.p-treetable .p-treetable-tbody > tr.depth-5 > td { background: #fff0f6; }
.p-treetable .p-treetable-tbody > tr.depth-6 > td { background: #f3f0ff; }
.p-treetable .p-treetable-tbody > tr.depth-7 > td { background: #eef7f7; }

/* subtle “branch” accent: coloured left stripe by depth */
.p-treetable .p-treetable-tbody > tr[class^="depth-"] > td:first-child {
  box-shadow: inset 4px 0 0 rgba(0,0,0,0.06);
}
.p-treetable .p-treetable-tbody > tr.depth-2 > td:first-child { box-shadow: inset 4px 0 0 #b3d9ff; }
.p-treetable .p-treetable-tbody > tr.depth-3 > td:first-child { box-shadow: inset 4px 0 0 #ffd38a; }
.p-treetable .p-treetable-tbody > tr.depth-4 > td:first-child { box-shadow: inset 4px 0 0 #a6e3a6; }
.p-treetable .p-treetable-tbody > tr.depth-5 > td:first-child { box-shadow: inset 4px 0 0 #ffb3cc; }
.p-treetable .p-treetable-tbody > tr.depth-6 > td:first-child { box-shadow: inset 4px 0 0 #c7b8ff; }


/* subtle colored bands by depth */
.tt-depth-0 { background: rgba(0, 0, 0, 0.00); }
.tt-depth-1 { background: rgba(0, 128, 255, 0.04); }
.tt-depth-2 { background: rgba(0, 200, 83, 0.05); }
.tt-depth-3 { background: rgba(255, 193, 7, 0.06); }
.tt-depth-4 { background: rgba(156, 39, 176, 0.06); }

/* keep PrimeReact gridlines but lighten them a touch */
.p-treetable .p-treetable-tbody > tr > td {
  border-color: rgba(0,0,0,.08);
}

/* leaf dot (for nodes without children) */
.tt-pncell {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.tt-leaf-dot {
  width: .4rem;
  height: .4rem;
  border-radius: 999px;
  background: rgba(0,0,0,.45);
  display: inline-block;
}


/* Make the tree a bit more compact */
.pd-tt.p-treetable {
  font-size: 0.92rem;
}

/* Prefer horizontal lines; mute verticals */
.pd-tt .p-treetable-thead > tr > th,
.pd-tt .p-treetable-tbody > tr > td {
  border-width: 0 0 1px 0;
  border-color: rgba(0,0,0,.08);
}

/* Slightly smaller cell padding */
.pd-tt .p-treetable-tbody > tr > td,
.pd-tt .p-treetable-thead > tr > th {
  padding: .35rem .5rem;
}

/* PN cell/link alignment */
.tt-pncell .tt-pnlink {
  display: inline-block;
  text-align: left;
  line-height: 1.1;
}

/* Level + thumbnail cell */
.tt-thumbcell {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
}

.tt-level {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  opacity: .6;
  min-width: 12px;       /* keeps column from jittering when empty */
}

/* Preview image size */
.tt-thumb {
  max-height: 32px;
  max-width: 48px;
  object-fit: contain;
  display: block;
}

/* Tiny leaf dot (shown only in the level/preview column) */
.tt-leaf-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(0,0,0,.35);
  display: inline-block;
}

/* (keeps your depth-row striping/colors) */
.tt-depth-0 td { background-image: linear-gradient(to right, rgba(0,0,0,.02), rgba(0,0,0,0)); }
.tt-depth-1 td { background-image: linear-gradient(to right, rgba(0,0,0,.03), rgba(0,0,0,0)); }
.tt-depth-2 td { background-image: linear-gradient(to right, rgba(0,0,0,.04), rgba(0,0,0,0)); }
.tt-depth-3 td { background-image: linear-gradient(to right, rgba(0,0,0,.05), rgba(0,0,0,0)); }
.tt-depth-4 td { background-image: linear-gradient(to right, rgba(0,0,0,.06), rgba(0,0,0,0)); }



/* Smaller text and tight rows */
.pd-tt .p-treetable-tbody > tr > td {
  font-size: 0.92rem;
  vertical-align: middle;
}

/* Thumbnail (image-only column) */
.tt-thumb {
  max-height: 32px;
  max-width: 48px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

/* PN cell */
.tt-pncell .tt-pnlink {
  text-decoration: none;
}

/* Level guides column */
.tt-levelcell {
  --tt-indent: 16px;
  --tt-guide: rgba(0,0,0,.25);
  display: flex;
  align-items: center;
  height: 100%;
  /* width set inline from TS (depth * indent) */
}

.tt-levelcell .tt-lvl {
  position: relative;
  width: var(--tt-indent);
  height: 28px; /* roughly matches small row size */
  flex: 0 0 var(--tt-indent);
}

/* vertical guide for ancestor levels */
.tt-levelcell .tt-lvl.keep::before {
  content: "";
  position: absolute;
  left: calc(50% - 0.5px);
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--tt-guide);
  opacity: 0.8;
}

/* current level cap: ├ or └ drawn with borders */
.tt-levelcell .tt-lvl.cap::after {
  content: "";
  position: absolute;
  left: calc(50% - 0.5px);
  right: 2px;             /* short of the next column */
  top: 50%;
  height: 1px;
  background: var(--tt-guide);
  opacity: 0.9;
}

/* vertical part of the cap */
.tt-levelcell .tt-lvl.cap::before {
  content: "";
  position: absolute;
  left: calc(50% - 0.5px);
  width: 1px;
  background: var(--tt-guide);
  opacity: 0.9;
}

/* ├ (has next sibling): full vertical through the row */
.tt-levelcell .tt-lvl.cap.mid::before {
  top: 0;
  bottom: 0;
}

/* └ (last sibling): from top to mid only */
.tt-levelcell .tt-lvl.cap.last::before {
  top: 0;
  bottom: 50%;
}


/* Expander column: lock width and remove any built-in indent */
.p-treetable .pd-tt td.tt-expander {
  width: 28px !important;
  min-width: 28px !important;
  max-width: 28px !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  overflow: visible;              /* avoid clipping on small columns */
}

/* PrimeReact adds left margin to the toggler for depth; kill it */
.p-treetable .pd-tt td.tt-expander .p-treetable-toggler {
  margin-left: 0 !important;
}

/* Make sure the toggler is visible and left-aligned */
.p-treetable .pd-tt td.tt-expander .p-treetable-toggler,
.p-treetable .pd-tt td.tt-expander .p-link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
}

/* Optional: slightly smaller chevron to reduce visual jitter */
.p-treetable .pd-tt td.tt-expander .p-icon,
.p-treetable .pd-tt td.tt-expander .pi {
  font-size: 0.9rem;
  line-height: 1;
}

/* Status and priority badges */
.badge-status,
.badge-priority {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}

.badge-status.status-draft,
.badge-status.status-inactive {
  background: #e9ecef;
  color: #495057;
}
.badge-status.status-released,
.badge-status.status-confirmed {
  background: #dbeafe;
  color: #1e40af;
}
.badge-status.status-in_progress,
.badge-status.status-in_production {
  background: #e0f2fe;
  color: #0369a1;
}
.badge-status.status-on_hold,
.badge-status.status-pending {
  background: #fef3c7;
  color: #92400e;
}
.badge-status.status-completed,
.badge-status.status-delivered,
.badge-status.status-active {
  background: #dcfce7;
  color: #166534;
}
.badge-status.status-cancelled,
.badge-status.status-blacklisted {
  background: #fee2e2;
  color: #991b1b;
}
.badge-status.status-submitted,
.badge-status.status-ready_to_ship,
.badge-status.status-shipped,
.badge-status.status-prospect {
  background: #ede9fe;
  color: #5b21b6;
}

.badge-priority.priority-low {
  background: #e9ecef;
  color: #495057;
}
.badge-priority.priority-normal {
  background: #e0f2fe;
  color: #0369a1;
}
.badge-priority.priority-high {
  background: #fef3c7;
  color: #92400e;
}
.badge-priority.priority-urgent {
  background: #fee2e2;
  color: #991b1b;
}

/* Compact pick-mode UI for parts selector */
body.pick-mode nav.navbar {
  display: none;
}

body.pick-mode main.container {
  max-width: 100%;
  padding: 0.75rem;
}

body.pick-mode .pick-header {
  background: #f8f9fa;
  border-radius: 0.5rem;
}

body.pick-mode .pick-row td {
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
}

/* Part number + description column sizing */
.table .col-part-number {
  min-width: 12ch;
  width: 12ch;
}

.table .col-description {
  min-width: 32ch;
  width: 45%;
}
