/* ══════════════════════════════════════
   Print Task Board v2 — app.css
   ══════════════════════════════════════ */

/* ── Full-page Kanban layout ── */
html, body {
  height: 100%;
  overflow: hidden; /* page itself never scrolls; board-wrap handles it */
}

#ptb-root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: #1d2939;
  background: #f0f2f5;

  /* Fill entire viewport and lay out as a column */
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: calc(100vh - 30px);
  overflow: hidden;
  position: fixed;
  top: 30px; left: 0;
  box-sizing: border-box;
  margin: 0; padding: 0;
  z-index: 1;
}
#ptb-root *, #ptb-root *::before, #ptb-root *::after { box-sizing: border-box; }

/* ── Header ─────────────────────────── */
.ptb-header {
  background: #1d2939;
  height: 50px;
  min-height: 50px;
  flex-shrink: 0;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ptb-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -.2px;
  flex-shrink: 0;
}

.ptb-logo-icon {
  width: 28px; height: 28px;
  background: #f97316;
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
}

.ptb-header-sep { width: 1px; height: 20px; background: #344054; }

.ptb-header-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.ptb-search {
  height: 30px;
  padding: 0 10px 0 28px;
  border: 1px solid #344054;
  border-radius: 6px;
  background: #253347 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2398a2b3' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E") no-repeat 8px center;
  color: #f0f2f5;
  font-size: 12px;
  width: 190px;
  outline: none;
  transition: border-color .15s;
}
.ptb-search::placeholder { color: #667085; }
.ptb-search:focus { border-color: #f97316; }

.ptb-hbtn {
  height: 30px; padding: 0 13px;
  border-radius: 6px; font-size: 12px; font-weight: 600;
  cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid; font-family: inherit; white-space: nowrap;
  transition: background .12s;
}
.ptb-hbtn-orange { background: #f97316; color: #fff; border-color: #ea6c0e; }
.ptb-hbtn-orange:hover { background: #ea6c0e; }
.ptb-hbtn-ghost  { background: rgba(255,255,255,.1); color: #d0d5dd; border-color: #344054; }
.ptb-hbtn-ghost:hover { background: rgba(255,255,255,.18); }

/* ═══════════════════════════════════════
   Board layout — explicit calc() heights
   so columns are always capped to viewport
   ═══════════════════════════════════════ */
:root {
  --ptb-header-h: 50px;  /* must match .ptb-header height */
  --ptb-board-pad: 12px; /* top padding */
  --ptb-col-h: calc(100vh - 30px - var(--ptb-header-h) - var(--ptb-board-pad) - 20px);
}

.ptb-board-wrap {
  overflow-x: auto;        /* horizontal scroll */
  overflow-y: hidden;
  padding: var(--ptb-board-pad) 14px 0;
  /* Explicit height — no flex magic */
  height: calc(100vh - 30px - var(--ptb-header-h));
  flex-shrink: 0;
  box-sizing: border-box;
}

/* Styled horizontal scrollbar */
.ptb-board-wrap::-webkit-scrollbar { height: 8px; }
.ptb-board-wrap::-webkit-scrollbar-track { background: #e4e7ec; border-radius: 4px; }
.ptb-board-wrap::-webkit-scrollbar-thumb { background: #98a2b3; border-radius: 4px; }
.ptb-board-wrap::-webkit-scrollbar-thumb:hover { background: #667085; }

.ptb-board {
  display: flex;
  flex-direction: row;
  gap: 10px;
  align-items: flex-start;
  min-width: max-content;
  height: 100%;
  padding-bottom: 12px;
  box-sizing: border-box;
}

/* ── Column ─────────────────────────── */
.ptb-col {
  width: 250px;
  flex-shrink: 0;
  /* Explicit height — never exceeds viewport regardless of card count */
  height: var(--ptb-col-h);
  max-height: var(--ptb-col-h);
  display: flex;
  flex-direction: column;
  overflow: hidden;   /* column box is fixed; only .ptb-cards scrolls */
  background: #e4e7ec;
  border-radius: 10px;
  box-sizing: border-box;
}
.ptb-col.drag-over { outline: 2px dashed #f97316; outline-offset: -2px; }

.ptb-col-header {
  padding: 10px 10px 8px;
  display: flex; align-items: center; gap: 7px;
}
.ptb-col-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.ptb-col-title { font-size: 12px; font-weight: 700; color: #344054; flex: 1; }
.ptb-col-count {
  font-size: 10px; background: rgba(0,0,0,.1);
  color: #475467; border-radius: 8px; padding: 1px 6px; font-weight: 600;
}
.ptb-col-addbtn {
  width: 22px; height: 22px; border-radius: 4px; border: none;
  background: transparent; cursor: pointer; display: flex;
  align-items: center; justify-content: center; color: #667085;
  transition: background .12s;
}
.ptb-col-addbtn:hover { background: rgba(0,0,0,.1); color: #1d2939; }

.ptb-cards {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  padding: 0 8px 8px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  align-items: stretch; /* cards fill column width but NOT height */
}
.ptb-cards::-webkit-scrollbar { width: 3px; }
.ptb-cards::-webkit-scrollbar-thumb { background: #c0c9d7; border-radius: 4px; }

/* ── Card ───────────────────────────── */
.ptb-card {
  background: #fff; border-radius: 7px;
  border: 1px solid #e4e7ec; padding: 0;
  cursor: pointer; user-select: none;
  transition: border-color .12s, box-shadow .12s;
  overflow: hidden;
  /* Static size — never stretches */
  flex-shrink: 0;
  flex-grow: 0;
  width: 100%;
}
.ptb-card:hover { border-color: #f97316; box-shadow: 0 2px 8px rgba(249,115,22,.1); }

.ptb-card-body {
  padding: 8px 10px;
}
.ptb-card.dragging { opacity: .4; }

.ptb-card-title {
  font-size: 12px; font-weight: 600; color: #1d2939;
  line-height: 1.35; margin-bottom: 3px;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
  word-break: break-word;
}

.ptb-card-desc {
  font-size: 11px; color: #667085; line-height: 1.4;
  margin-bottom: 0;
  display: -webkit-box; -webkit-line-clamp: 1;
  -webkit-box-orient: vertical; overflow: hidden;
  word-break: break-word;
  flex-shrink: 0;
}

/* .ptb-card-footer — defined below with full rules */

.ptb-chip {
  font-size: 10px; color: #667085;
  display: flex; align-items: center; gap: 3px;
}

.ptb-card-staff {
  font-size: 10px; background: #f0f2f5;
  border-radius: 20px; padding: 2px 8px; color: #475467;
  display: flex; align-items: center; gap: 4px;
}

.ptb-card-badges { display: flex; align-items: center; gap: 5px; margin-left: auto; }

.ptb-badge-count {
  font-size: 10px; color: #98a2b3;
  display: flex; align-items: center; gap: 3px;
}

/* ── Col add btn ──────────────────── */
.ptb-col-footer {
  margin: 4px 8px 8px;
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 500; color: #667085;
  background: transparent; border: none; border-radius: 6px;
  padding: 6px 8px; cursor: pointer; width: calc(100% - 16px);
  transition: background .12s, color .12s; font-family: inherit;
}
.ptb-col-footer:hover { background: rgba(0,0,0,.07); color: #1d2939; }

.ptb-col-empty {
  margin: 0 8px 6px; border: 1px dashed #c0c9d7;
  border-radius: 6px; padding: 18px 12px;
  text-align: center; font-size: 11px; color: #98a2b3;
}

/* ══════════════════════════════════════
   MODAL
   ══════════════════════════════════════ */
.ptb-overlay {
  position: fixed; inset: 0;
  background: rgba(16,24,40,.55);
  z-index: 100100;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}

.ptb-modal {
  background: #fff; border-radius: 12px;
  width: 580px; max-width: 100%; max-height: 92vh;
  overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(16,24,40,.25);
}

.ptb-modal-sm { width: 480px; }

.ptb-modal-head {
  padding: 16px 20px 14px;
  border-bottom: 1px solid #f2f4f7;
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 12px;
  flex-shrink: 0;
}

.ptb-modal-title { font-size: 16px; font-weight: 700; color: #1d2939; }
.ptb-modal-sub   { font-size: 11px; color: #98a2b3; margin-top: 2px; }

.ptb-modal-close {
  width: 28px; height: 28px; border-radius: 6px;
  border: none; background: transparent; cursor: pointer;
  color: #667085; font-size: 18px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: background .12s;
}
.ptb-modal-close:hover { background: #f2f4f7; color: #1d2939; }

/* ── Tabs ────────────────────────── */
.ptb-tabs {
  display: flex; gap: 0; flex-shrink: 0;
  border-bottom: 1px solid #e4e7ec;
  padding: 0 20px;
  background: #fafafa;
}
.ptb-tab {
  padding: 9px 14px; font-size: 12px; font-weight: 600;
  color: #667085; border: none; background: transparent;
  cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -1px; transition: color .12s, border-color .12s;
  font-family: inherit; display: flex; align-items: center; gap: 5px;
}
.ptb-tab.active  { color: #f97316; border-bottom-color: #f97316; }
.ptb-tab:hover:not(.active) { color: #344054; }

/* ── Modal body ────────────────────── */
.ptb-modal-body { padding: 16px 20px; overflow-y: auto; flex: 1; }

/* ── Detail pane ───────────────────── */
.ptb-detail-block {
  margin-bottom: 16px;
}
.ptb-detail-label {
  font-size: 10px; font-weight: 700; color: #98a2b3;
  text-transform: uppercase; letter-spacing: .4px; margin-bottom: 5px;
}
.ptb-detail-text {
  font-size: 13px; color: #344054; line-height: 1.65;
  white-space: pre-wrap; word-break: break-word;
}
.ptb-detail-text.empty { color: #c0c9d7; font-style: italic; }

/* paste zone inside detail panel gets a subtle dashed border hint */
.ptb-detail-text.ptb-paste-zone {
  min-height: 48px;
  border: 1px dashed transparent;
  border-radius: 5px;
  padding: 6px 8px;
  margin: -6px -8px;
  transition: border-color .15s, background .15s;
  cursor: text;
}
.ptb-detail-text.ptb-paste-zone:hover,
.ptb-detail-text.ptb-paste-zone:focus {
  border-color: #d0d5dd;
  background: #fafafa;
  outline: none;
}

.ptb-stage-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 12px; background: #f9fafb;
  border: 1px solid #e4e7ec; border-radius: 8px; margin-bottom: 16px;
}
.ptb-stage-label { font-size: 11px; color: #667085; flex-shrink: 0; }
.ptb-stage-dot   { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.ptb-stage-name  { font-size: 12px; font-weight: 700; color: #1d2939; }
.ptb-stage-btns  { margin-left: auto; display: flex; gap: 5px; flex-wrap: wrap; }
.ptb-stage-btn {
  font-size: 10px; font-weight: 600; padding: 4px 9px;
  background: #f0f2f5; color: #475467; border: 1px solid #e4e7ec;
  border-radius: 5px; cursor: pointer; display: flex; align-items: center; gap: 3px;
  transition: background .1s, color .1s; font-family: inherit;
}
.ptb-stage-btn:hover { background: #f97316; color: #fff; border-color: #f97316; }

/* ── Comments ──────────────────────── */
.ptb-comment-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }

.ptb-comment {
  display: flex; gap: 9px; align-items: flex-start;
}

.ptb-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: #e4e7ec; display: flex; align-items: center;
  justify-content: center; font-size: 11px; font-weight: 700;
  color: #667085; flex-shrink: 0;
}

.ptb-comment-bubble {
  flex: 1; background: #f9fafb; border: 1px solid #e4e7ec;
  border-radius: 0 8px 8px 8px; padding: 8px 10px;
}
.ptb-comment-meta { font-size: 10px; color: #98a2b3; margin-bottom: 3px; display: flex; align-items: center; gap: 6px; }
.ptb-comment-author { font-weight: 700; color: #475467; }
.ptb-comment-body { font-size: 12px; color: #344054; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.ptb-comment-del  { margin-left: auto; font-size: 10px; color: #d92d20; cursor: pointer; background: none; border: none; padding: 0; font-family: inherit; }
.ptb-comment-del:hover { text-decoration: underline; }

.ptb-comment-form { display: flex; gap: 8px; align-items: flex-start; }
.ptb-comment-input {
  flex: 1; border: 1px solid #d0d5dd; border-radius: 7px;
  padding: 8px 10px; font-size: 12px; font-family: inherit;
  resize: none; min-height: 38px; max-height: 120px; line-height: 1.5;
  color: #1d2939; background: #fff; outline: none;
  transition: border-color .12s;
}
.ptb-comment-input:focus { border-color: #f97316; }
.ptb-comment-send {
  height: 38px; padding: 0 14px; background: #f97316; color: #fff;
  border: none; border-radius: 7px; font-size: 12px; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: background .12s;
  flex-shrink: 0;
}
.ptb-comment-send:hover { background: #ea6c0e; }

/* ── Files ─────────────────────────── */
.ptb-file-list { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }

.ptb-file-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 11px; background: #f9fafb;
  border: 1px solid #e4e7ec; border-radius: 7px;
}

.ptb-file-icon {
  width: 30px; height: 30px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 10px; font-weight: 700; text-transform: uppercase;
}
.ptb-file-icon-img { background: #e0f2fe; color: #0284c7; }
.ptb-file-icon-pdf { background: #fef3f2; color: #d92d20; }
.ptb-file-icon-doc { background: #eff6ff; color: #2563eb; }
.ptb-file-icon-gen { background: #f9fafb; color: #667085; }

.ptb-file-info { flex: 1; min-width: 0; }
.ptb-file-name { font-size: 12px; font-weight: 600; color: #344054; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ptb-file-meta { font-size: 10px; color: #98a2b3; }

.ptb-file-actions { display: flex; gap: 6px; flex-shrink: 0; }
.ptb-file-link { font-size: 11px; color: #f97316; text-decoration: none; font-weight: 600; }
.ptb-file-link:hover { text-decoration: underline; }
.ptb-file-del { font-size: 11px; color: #d92d20; cursor: pointer; background: none; border: none; font-family: inherit; padding: 0; }
.ptb-file-del:hover { text-decoration: underline; }

.ptb-upload-zone {
  border: 2px dashed #d0d5dd; border-radius: 8px;
  padding: 18px; text-align: center; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.ptb-upload-zone:hover, .ptb-upload-zone.drag-over {
  border-color: #f97316; background: #fff8f5;
}
.ptb-upload-zone p { font-size: 12px; color: #667085; margin: 0 0 4px; }
.ptb-upload-zone span { font-size: 10px; color: #98a2b3; }
.ptb-upload-input { display: none; }
.ptb-upload-progress { font-size: 11px; color: #f97316; margin-top: 8px; }

/* ── Modal footer ──────────────────── */
.ptb-modal-foot {
  padding: 12px 20px 16px;
  border-top: 1px solid #f2f4f7;
  display: flex; align-items: center;
  justify-content: flex-end; gap: 8px; flex-wrap: wrap;
  flex-shrink: 0;
}

/* ── Form ───────────────────────────── */
.ptb-form-row   { margin-bottom: 12px; }
.ptb-form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.ptb-form-sec   {
  font-size: 10px; font-weight: 700; color: #98a2b3;
  text-transform: uppercase; letter-spacing: .5px;
  padding-top: 10px; border-top: 1px solid #f2f4f7;
  margin: 10px 0 10px; display: block;
}
.ptb-form-sec:first-child { padding-top: 0; border-top: none; margin-top: 0; }

.ptb-label { display: block; font-size: 11px; font-weight: 600; color: #344054; margin-bottom: 4px; }

.ptb-input, .ptb-select, .ptb-textarea {
  width: 100%; height: 34px; padding: 0 10px;
  border: 1px solid #d0d5dd; border-radius: 6px;
  font-size: 12px; color: #1d2939; background: #fff;
  outline: none; transition: border-color .12s, box-shadow .12s;
  font-family: inherit;
}
.ptb-input:focus, .ptb-select:focus, .ptb-textarea:focus {
  border-color: #f97316;
  box-shadow: 0 0 0 3px rgba(249,115,22,.1);
}
.ptb-textarea { height: auto; padding: 8px 10px; resize: vertical; min-height: 72px; line-height: 1.5; }

/* ── Buttons ────────────────────────── */
.ptb-btn {
  height: 32px; padding: 0 14px; border-radius: 7px;
  font-size: 12px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid transparent; transition: background .12s;
  white-space: nowrap; text-decoration: none; font-family: inherit;
}
.ptb-btn:disabled { opacity: .5; cursor: default; }

.ptb-btn-primary { background: #f97316; color: #fff; border-color: #ea6c0e; }
.ptb-btn-primary:hover:not(:disabled) { background: #ea6c0e; }

.ptb-btn-ghost { background: #fff; color: #344054; border-color: #d0d5dd; }
.ptb-btn-ghost:hover { background: #f9fafb; }

.ptb-btn-danger { background: #fef3f2; color: #d92d20; border-color: #fecdca; }
.ptb-btn-danger:hover { background: #fecdca; }

/* ── Loading / Toast ────────────────── */
.ptb-loading {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 80px 20px;
  color: #667085; gap: 14px; font-size: 13px;
}
.ptb-spinner {
  width: 32px; height: 32px; border: 3px solid #e4e7ec;
  border-top-color: #f97316; border-radius: 50%;
  animation: ptb-spin .7s linear infinite;
}
@keyframes ptb-spin { to { transform: rotate(360deg); } }

.ptb-toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: #1d2939; color: #fff; padding: 9px 18px; border-radius: 8px;
  font-size: 12px; font-weight: 500; z-index: 200000;
  box-shadow: 0 6px 20px rgba(16,24,40,.3); white-space: nowrap;
  animation: ptb-tin .2s ease;
}
.ptb-toast.ok  { background: #027a48; }
.ptb-toast.err { background: #d92d20; }
@keyframes ptb-tin { from { opacity:0; transform:translateX(-50%) translateY(8px); } }

/* ── WP admin overrides ─────────────── */
.wp-admin #wpcontent { padding-left: 0; }
.wp-admin #wpbody-content .wrap { margin: 0; padding: 0; }

/* ══════════════════════════════════════
   Movement History Timeline
   ══════════════════════════════════════ */
.ptb-timeline {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 2px dashed #e4e7ec;
}

.ptb-timeline-heading {
  font-size: 10px;
  font-weight: 700;
  color: #98a2b3;
  text-transform: uppercase;
  letter-spacing: .5px;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 14px;
}

.ptb-tl-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

/* vertical line */
.ptb-tl-list::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #e4e7ec;
}

.ptb-tl-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  position: relative;
  padding-bottom: 14px;
}
.ptb-tl-item:last-child { padding-bottom: 0; }

.ptb-tl-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 13px;
  position: relative;
  z-index: 1;
  background: #fff;
  border: 2px solid #e4e7ec;
}

/* colour the dot by event type */
.ptb-tl-created .ptb-tl-dot  { border-color: #22c55e; background: #f0fdf4; }
.ptb-tl-moved   .ptb-tl-dot  { border-color: #6366f1; background: #eef2ff; }
.ptb-tl-comment .ptb-tl-dot  { border-color: #f97316; background: #fff7ed; }
.ptb-tl-file    .ptb-tl-dot  { border-color: #0ea5e9; background: #f0f9ff; }

.ptb-tl-body { flex: 1; padding-top: 3px; }

.ptb-tl-note {
  font-size: 12px;
  color: #344054;
  font-weight: 500;
  line-height: 1.45;
  margin-bottom: 3px;
}

.ptb-tl-stages {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 3px;
  flex-wrap: wrap;
}

.ptb-tl-from {
  font-size: 11px;
  background: #f0f2f5;
  color: #475467;
  padding: 1px 7px;
  border-radius: 4px;
  font-weight: 500;
}

.ptb-tl-to {
  font-size: 11px;
  background: #eef2ff;
  color: #4338ca;
  padding: 1px 7px;
  border-radius: 4px;
  font-weight: 600;
}

.ptb-tl-arrow { font-size: 11px; color: #98a2b3; }

.ptb-tl-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 10px;
  color: #98a2b3;
  margin-top: 3px;
}
.ptb-tl-actor {
  color: #667085;
  font-weight: 600;
}
.ptb-tl-date {
  color: #98a2b3;
}
.ptb-tl-time {
  color: #667085;
  font-weight: 600;
}
.ptb-tl-sep {
  color: #d0d5dd;
}

/* ── Tab badges ── */
.ptb-tab-badge {
  background: #f97316;
  color: #fff;
  border-radius: 8px;
  padding: 0 5px;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.6;
  display: inline-block;
}
.ptb-tab-badge-purple { background: #6366f1; }

/* ── Smaller upload zone for create modal ── */
.ptb-upload-zone-sm {
  padding: 12px 14px;
}
.ptb-upload-zone-sm p   { font-size: 11px; margin: 4px 0 2px; }
.ptb-upload-zone-sm span { font-size: 10px; }
.ptb-upload-zone-sm svg  { width: 16px; height: 16px; }

/* ── Empty message ── */
.ptb-empty-msg {
  font-size: 12px;
  color: #98a2b3;
  margin: 0 0 14px;
  font-style: italic;
}

/* ══════════════════════════════════════
   Card cover image
   ══════════════════════════════════════ */
.ptb-card-cover {
  height: 80px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 6px 6px 0 0;
  flex-shrink: 0;
  width: 100%;
}

/* overflow:hidden is set on .ptb-card above */

/* ══════════════════════════════════════
   Modal cover banner
   ══════════════════════════════════════ */
.ptb-modal-cover {
  width: 100%;
  height: 140px;
  background-size: cover;
  background-position: center;
  border-radius: 12px 12px 0 0;
  flex-shrink: 0;
}

/* ══════════════════════════════════════
   File list — with thumbnail preview
   ══════════════════════════════════════ */
.ptb-file-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 9px 11px;
  background: #f9fafb;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  transition: border-color .12s;
}

.ptb-file-item.is-cover {
  border-color: #f97316;
  background: #fff8f5;
}

.ptb-file-preview {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f2f5;
}

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

.ptb-file-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  border-radius: 6px;
  flex-shrink: 0;
}

/* override existing smaller icon size for file list */
.ptb-file-list .ptb-file-icon { width: 52px; height: 52px; }

.ptb-file-info { flex: 1; min-width: 0; }
.ptb-file-name { font-size: 12px; font-weight: 600; color: #344054; word-break: break-word; margin-bottom: 2px; }
.ptb-file-meta { font-size: 10px; color: #98a2b3; margin-bottom: 5px; }
.ptb-file-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ptb-file-link { font-size: 11px; color: #f97316; text-decoration: none; font-weight: 600; }
.ptb-file-link:hover { text-decoration: underline; }
.ptb-file-del { font-size: 11px; color: #d92d20; cursor: pointer; background: none; border: none; font-family: inherit; padding: 0; }
.ptb-file-del:hover { text-decoration: underline; }

/* ── Cover buttons ── */
.ptb-cover-btn {
  font-size: 11px;
  font-weight: 600;
  background: #f0f2f5;
  color: #475467;
  border: 1px solid #e4e7ec;
  border-radius: 5px;
  padding: 3px 9px;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background .12s, color .12s, border-color .12s;
}
.ptb-cover-btn:hover { background: #f97316; color: #fff; border-color: #f97316; }

.ptb-cover-btn.ptb-cover-active {
  background: #fff3eb;
  color: #f97316;
  border-color: #f97316;
}
.ptb-cover-btn.ptb-cover-active:hover { background: #d92d20; color: #fff; border-color: #d92d20; }

.ptb-cover-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 9px;
  background: #f97316;
  color: #fff;
  border-radius: 4px;
  padding: 1px 6px;
  font-weight: 700;
  margin-left: 4px;
  vertical-align: middle;
}

/* ══════════════════════════════════════
   Staged files in create modal
   ══════════════════════════════════════ */
.ptb-staged-files {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 8px;
}

.ptb-staged-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  background: #f0f2f5;
  border: 1px solid #e4e7ec;
  border-radius: 6px;
  font-size: 11px;
}

.ptb-staged-icon {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  flex-shrink: 0;
}

.ptb-staged-name {
  flex: 1;
  color: #344054;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ptb-staged-remove {
  background: none;
  border: none;
  font-size: 16px;
  color: #98a2b3;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
  font-family: inherit;
}
.ptb-staged-remove:hover { color: #d92d20; }

/* ── Small spinner for upload progress ── */
.ptb-upload-progress {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #f97316;
  margin-top: 8px;
}

.ptb-spinner-sm {
  width: 14px; height: 14px;
  border: 2px solid #fde4c8;
  border-top-color: #f97316;
  border-radius: 50%;
  animation: ptb-spin .6s linear infinite;
  flex-shrink: 0;
}

/* ══════════════════════════════════════
   Description attach / paste area
   ══════════════════════════════════════ */
.ptb-detail-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}

.ptb-attach-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  color: #667085;
  background: #f0f2f5;
  border: 1px solid #e4e7ec;
  border-radius: 5px;
  padding: 3px 8px;
  cursor: pointer;
  transition: background .12s, color .12s;
  user-select: none;
}
.ptb-attach-btn:hover { background: #e4e7ec; color: #344054; }

.ptb-hidden-input { display: none; }

/* paste zone highlight on focus / drag */
.ptb-paste-zone:focus { outline: 2px dashed #f97316; outline-offset: 2px; }
.ptb-paste-zone.paste-highlight { outline: 2px dashed #f97316; outline-offset: 2px; background: rgba(249,115,22,.04); }

/* Inline images under description */
.ptb-inline-files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.ptb-inline-img-wrap {
  position: relative;
  display: inline-block;
}

.ptb-inline-img {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #e4e7ec;
  display: block;
}

.ptb-inline-file {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  background: #f0f2f5;
  border: 1px solid #e4e7ec;
  border-radius: 5px;
  padding: 4px 8px;
  color: #344054;
}
.ptb-inline-file a { color: #f97316; text-decoration: none; }
.ptb-inline-file a:hover { text-decoration: underline; }

.ptb-inline-del {
  position: absolute;
  top: -5px; right: -5px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #d92d20; color: #fff;
  border: none; cursor: pointer;
  font-size: 12px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  font-family: inherit; padding: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.ptb-inline-del:hover { background: #b42018; }
.ptb-inline-file .ptb-inline-del { position: static; border-radius: 4px; background: transparent; color: #d92d20; font-size: 14px; width: auto; height: auto; box-shadow: none; }
.ptb-inline-file .ptb-inline-del:hover { background: #fef3f2; }

/* ══════════════════════════════════════
   Comment compose box
   ══════════════════════════════════════ */
.ptb-comment-compose {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin-top: 10px;
}

.ptb-compose-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ptb-compose-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Comment image previews */
.ptb-comment-images {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.ptb-comment-img-wrap { position: relative; display: inline-block; }

.ptb-comment-img {
  width: 80px; height: 80px;
  object-fit: cover; border-radius: 5px;
  border: 1px solid #e4e7ec; display: block;
  cursor: pointer;
}
.ptb-comment-img:hover { opacity: .85; }

.ptb-comment-img-del {
  position: absolute; top: -4px; right: -4px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #d92d20; color: #fff; border: none;
  cursor: pointer; font-size: 11px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  font-family: inherit; padding: 0;
}

.ptb-comment-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.ptb-comment-file {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: #f97316;
  text-decoration: none;
  background: #fff8f5;
  border: 1px solid #fed7aa;
  border-radius: 4px;
  padding: 2px 7px;
}
.ptb-comment-file:hover { text-decoration: underline; }

/* Pending comment files */
.ptb-pending-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  flex: 1;
}

.ptb-pending-file {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  background: #eef2ff;
  color: #4338ca;
  border: 1px solid #c7d2fe;
  border-radius: 4px;
  padding: 2px 7px;
}

.ptb-pending-remove {
  background: none; border: none; cursor: pointer;
  color: #6366f1; font-size: 13px; padding: 0; line-height: 1; font-family: inherit;
}
.ptb-pending-remove:hover { color: #d92d20; }

/* ══════════════════════════════════════
   URL paste row
   ══════════════════════════════════════ */
.ptb-url-paste-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  align-items: center;
}

.ptb-url-paste-input {
  flex: 1;
  height: 32px;
  padding: 0 10px;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  font-size: 12px;
  color: #344054;
  outline: none;
  transition: border-color .12s;
  font-family: inherit;
}
.ptb-url-paste-input:focus { border-color: #f97316; }
.ptb-url-paste-input::placeholder { color: #98a2b3; }

/* ══════════════════════════════════════
   Pasted badge
   ══════════════════════════════════════ */
.ptb-pasted-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 9px;
  background: #eef2ff;
  color: #4338ca;
  border-radius: 4px;
  padding: 1px 5px;
  font-weight: 600;
  margin-left: 4px;
  vertical-align: middle;
}

/* ══════════════════════════════════════
   Add Job — description image strip
   ══════════════════════════════════════ */
.ptb-desc-image-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  padding: 8px;
  background: #f9fafb;
  border: 1px solid #e4e7ec;
  border-radius: 7px;
}

.ptb-desc-thumb-wrap {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
}

.ptb-desc-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 5px;
  border: 1px solid #e4e7ec;
  display: block;
}

.ptb-desc-thumb-del {
  /* reuse .ptb-inline-del styles — just override position to absolute */
  position: absolute !important;
  top: -5px !important;
  right: -5px !important;
}

/* Paste hint shown inside the textarea label row */
.ptb-paste-hint {
  font-size: 10px;
  color: #98a2b3;
  font-weight: 400;
  margin-left: 4px;
}

/* ══════════════════════════════════════
   Rich description area (contenteditable)
   ══════════════════════════════════════ */
.ptb-richarea {
  min-height: 80px;
  max-height: 420px;
  overflow-y: auto;
  padding: 9px 11px;
  border: 1px solid #d0d5dd;
  border-radius: 7px;
  background: #fff;
  font-size: 13px;
  color: #1d2939;
  line-height: 1.65;
  word-break: break-word;
  outline: none;
  cursor: text;
  transition: border-color .12s, box-shadow .12s;
}
.ptb-richarea:focus {
  border-color: #f97316;
  box-shadow: 0 0 0 3px rgba(249,115,22,.1);
}
.ptb-richarea.drag-over {
  border-color: #f97316;
  background: #fff8f5;
}

/* Placeholder text */
.ptb-richarea.ptb-richarea-empty::before {
  content: attr(data-placeholder);
  color: #98a2b3;
  pointer-events: none;
  font-style: italic;
  font-size: 12px;
}

/* Inline images inside the rich area */
.ptb-richarea img,
.ptb-richarea-img {
  max-width: 100%;
  height: auto;
  border-radius: 5px;
  display: block;
  margin: 6px 0;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color .15s;
}
.ptb-richarea img:hover,
.ptb-richarea-img:hover { border-color: #f97316; }

/* Uploading state */
.ptb-richarea img[data-uploading] {
  opacity: .55;
  border: 2px dashed #f97316;
}

/* View-only mode in detail panel (still editable, auto-saves on blur) */
.ptb-richarea-view {
  border-color: transparent;
  background: transparent;
  padding: 4px 6px;
  margin: -4px -6px;
}
.ptb-richarea-view:hover {
  border-color: #e4e7ec;
  background: #fafafa;
}
.ptb-richarea-view:focus {
  border-color: #f97316;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(249,115,22,.1);
}

/* ══════════════════════════════════════
   Members panel
   ══════════════════════════════════════ */
.ptb-member-count {
  background: rgba(255,255,255,.25);
  border-radius: 8px;
  padding: 0 6px;
  font-size: 10px;
  font-weight: 700;
}

.ptb-members-panel {
  position: absolute;
  top: 50px;
  right: 0;
  width: 100%;
  max-width: 100%;
  background: #fff;
  border-bottom: 2px solid #e4e7ec;
  box-shadow: 0 8px 24px rgba(16,24,40,.1);
  z-index: 500;
}

.ptb-members-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 16px 20px 20px;
}

.ptb-members-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.ptb-members-title {
  font-size: 15px;
  font-weight: 700;
  color: #1d2939;
  display: flex;
  align-items: center;
  gap: 7px;
}

.ptb-roles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.ptb-role-group {
  background: #f9fafb;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  padding: 10px;
}

.ptb-role-header {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ptb-role-count {
  background: rgba(0,0,0,.08);
  border-radius: 8px;
  padding: 0 6px;
  font-size: 10px;
  color: #667085;
}

.ptb-role-empty {
  font-size: 11px;
  color: #c0c9d7;
  font-style: italic;
  padding: 4px 0;
}

.ptb-mcard {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid #f0f2f5;
}
.ptb-mcard:last-child { border-bottom: none; }

.ptb-mavatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; flex-shrink: 0;
}

.ptb-minfo { flex: 1; min-width: 0; }
.ptb-mname  { font-size: 12px; font-weight: 600; color: #344054; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ptb-memail { font-size: 10px; color: #98a2b3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ptb-mbtn-icon {
  width: 24px; height: 24px;
  border-radius: 4px; border: none; background: transparent;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: #667085; transition: background .12s;
  flex-shrink: 0;
}
.ptb-mbtn-icon:hover { background: #f0f2f5; }

/* Add member form */
.ptb-member-add-form {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  padding: 12px 14px;
}

.ptb-member-add-title {
  font-size: 12px;
  font-weight: 700;
  color: #0284c7;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.ptb-mform-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.ptb-input-sm {
  height: 30px !important;
  font-size: 12px !important;
}

/* ── Job member picker ── */
.ptb-member-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.ptb-member-picker-sm .ptb-mpick-btn {
  padding: 4px 8px;
}

.ptb-mpick-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1.5px solid #e4e7ec;
  border-radius: 20px;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
  font-size: 12px;
}
.ptb-mpick-btn:hover { border-color: #f97316; background: #fff8f5; }

.ptb-mpick-avatar {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; flex-shrink: 0;
}

.ptb-mpick-name  { font-size: 12px; font-weight: 600; color: inherit; }
.ptb-mpick-role  { font-size: 10px; opacity: .8; }
.ptb-mpick-check { font-size: 11px; margin-left: 2px; }

/* ── Card member avatars ── */
.ptb-card-members {
  display: flex;
  align-items: center;
  gap: -4px;
}

.ptb-card-avatar {
  width: 20px; height: 20px;
  border-radius: 50%;
  font-size: 8px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid #fff;
  margin-left: -4px;
  flex-shrink: 0;
}
.ptb-card-members .ptb-card-avatar:first-child { margin-left: 0; }

/* panel needs relative parent */
.ptb-header { position: relative; }

/* ── Designer badge in header ── */
.ptb-designer-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: #d0d5dd;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 6px;
  padding: 4px 12px;
  letter-spacing: .2px;
}

/* ── Read-only description for designers ── */
.ptb-richarea-readonly {
  cursor: default !important;
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  padding: 4px 0 !important;
  margin: 0 !important;
  min-height: 0;
  pointer-events: none;
}
.ptb-richarea-readonly:hover,
.ptb-richarea-readonly:focus {
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* ══════════════════════════════════════
   Card enhancements — priority, deadline, avatar
   ══════════════════════════════════════ */

/* Top row: priority badge + deadline */
.ptb-card-top-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
  flex-wrap: nowrap;
  overflow: hidden;
  flex-shrink: 0;
}

/* Priority badge — compact */
.ptb-priority {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 9px;
  font-weight: 700;
  border-radius: 3px;
  padding: 1px 5px;
  letter-spacing: .1px;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Deadline badge — compact */
.ptb-deadline {
  font-size: 9px;
  font-weight: 600;
  border-radius: 3px;
  padding: 1px 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ptb-deadline-ok      { color: #344054; background: #f0f2f5; }
.ptb-deadline-soon    { color: #92400e; background: #fef3c7; }
.ptb-deadline-overdue { color: #b91c1c; background: #fee2e2; }

/* Staff avatar — small initials circle */
.ptb-staff-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .3px;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0,0,0,.15);
}

/* Card footer: avatar left, counts right — no wrapping */
.ptb-card-footer {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;
  margin-top: 6px;
  padding-top: 0;
}

.ptb-card-counts {
  display: flex;
  gap: 5px;
  margin-left: auto;
  flex-shrink: 0;
}

/* Detail panel — 3-column row for priority/deadline/staff */
.ptb-detail-row-3 {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.ptb-detail-row-3 .ptb-detail-block {
  flex: 1;
  min-width: 100px;
}

/* ══════════════════════════════════════
   Column management — rename + add
   ══════════════════════════════════════ */

/* Editable column title hint */
.ptb-col-title-editable {
  cursor: text;
  border-bottom: 1px dashed transparent;
  transition: border-color .15s;
}
.ptb-col-title-editable:hover {
  border-bottom-color: currentColor;
}

/* Inline rename input */
.ptb-col-rename {
  font-size: 12px;
  font-weight: 700;
  border: none;
  border-bottom: 2px solid #f97316;
  background: transparent;
  padding: 0 2px;
  width: 120px;
  outline: none;
  font-family: inherit;
  letter-spacing: .2px;
}

/* Add Column ghost column */
.ptb-col-add {
  width: 200px;
  flex-shrink: 0;
  height: var(--ptb-col-h);
  max-height: var(--ptb-col-h);
  background: transparent;
  border: 2px dashed #e4e7ec;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.ptb-add-col-btn {
  background: none;
  border: none;
  color: #98a2b3;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  transition: color .12s;
}
.ptb-add-col-btn:hover { color: #f97316; }

/* Add column expanded form */
.ptb-add-col-form {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.ptb-add-col-title {
  font-size: 12px;
  font-weight: 700;
  color: #344054;
  margin-bottom: 2px;
}

.ptb-add-col-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.ptb-col-color-swatch {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  transition: transform .12s, border-color .12s;
}
.ptb-col-color-swatch:hover {
  transform: scale(1.2);
  border-color: #fff;
  box-shadow: 0 0 0 2px #667085;
}

.ptb-add-col-btns {
  display: flex;
  gap: 6px;
}

.ptb-btn-sm {
  font-size: 11px !important;
  padding: 4px 10px !important;
  height: auto !important;
}

/* ══════════════════════════════════════
   Column drag-and-drop reordering
   ══════════════════════════════════════ */

/* Drag handle — shown on hover in column header */
.ptb-col-drag-handle {
  color: transparent;  /* hidden until hover */
  font-size: 14px;
  cursor: default;
  padding: 0 2px;
  line-height: 1;
  flex-shrink: 0;
  transition: color .12s;
  user-select: none;
}
/* Only the active (manager) handle shows and is grabbable */
.ptb-col-drag-handle-active {
  cursor: grab;
}
.ptb-col:hover .ptb-col-drag-handle-active {
  color: #c0c9d7;
}
.ptb-col-drag-handle-active:hover {
  color: #667085 !important;
}
.ptb-col-drag-handle-active:active { cursor: grabbing; }

/* Column being dragged */
.ptb-col.col-dragging {
  opacity: .4;
  transform: rotate(1deg);
}

/* Column drop target indicator */
.ptb-col.col-drop-target {
  border-left: 3px solid #f97316;
  box-shadow: inset 3px 0 0 rgba(249,115,22,.15);
}

/* Smooth column transitions */
/* .ptb-col transitions handled per-state below */

/* ══════════════════════════════════════
   Comment/file count badges — real numbers
   ══════════════════════════════════════ */
.ptb-badge-count {
  font-size: 10px;
  color: #98a2b3;
  display: flex;
  align-items: center;
  gap: 3px;
  font-weight: 500;
}
.ptb-badge-count.ptb-badge-active {
  color: #475467;
  font-weight: 700;
}

/* Customer changes warning badge on card */
.ptb-changes-badge {
  font-size: 9px;
  font-weight: 700;
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 3px;
  padding: 1px 5px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ══════════════════════════════════════
   Customer Changes Alert Modal
   ══════════════════════════════════════ */
.ptb-changes-modal {
  background: #fff;
  border-radius: 14px;
  padding: 28px 26px 24px;
  max-width: 460px;
  width: 92%;
  box-shadow: 0 24px 64px rgba(0,0,0,.22);
  text-align: center;
  animation: ptb-pop .2s ease;
  border-top: 5px solid #ef4444;
}

@keyframes ptb-pop {
  from { transform: scale(.9) translateY(-10px); opacity:0; }
  to   { transform: scale(1)  translateY(0);     opacity:1; }
}

.ptb-changes-icon {
  font-size: 44px;
  margin-bottom: 10px;
  line-height: 1;
}

.ptb-changes-title {
  font-size: 17px;
  font-weight: 800;
  color: #b91c1c;
  margin-bottom: 8px;
  letter-spacing: -.2px;
}

.ptb-changes-badge-row {
  margin-bottom: 14px;
}

.ptb-changes-col-badge {
  display: inline-block;
  background: #fef3c7;
  color: #92400e;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid #fcd34d;
  border-radius: 20px;
  padding: 3px 12px;
}

.ptb-changes-body {
  font-size: 13px;
  color: #374151;
  line-height: 1.7;
  margin-bottom: 16px;
  text-align: left;
}

.ptb-changes-warning {
  display: block;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 7px;
  padding: 10px 12px;
  margin-top: 10px;
  color: #991b1b;
  font-size: 12px;
  line-height: 1.6;
}

.ptb-changes-checklist {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 7px;
  padding: 10px 14px;
  margin-bottom: 18px;
  text-align: left;
}

.ptb-changes-check {
  font-size: 12px;
  color: #166534;
  font-weight: 600;
  padding: 3px 0;
}

.ptb-changes-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Danger button variant for the alert */
.ptb-btn-danger {
  background: #ef4444;
  color: #fff;
  border-color: #dc2626;
  height: 38px;
  font-size: 13px;
  font-weight: 700;
}
.ptb-btn-danger:hover { background: #dc2626; }

/* ══════════════════════════════════════
   Column collapse / expand
   ══════════════════════════════════════ */

/* Collapsed column — narrow strip */
.ptb-col.ptb-col-collapsed {
  width: 48px !important;
  min-width: 48px !important;
  flex-shrink: 0;
  cursor: default;
}

/* Collapsed header — stack vertically */
.ptb-col.ptb-col-collapsed .ptb-col-header {
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 10px 0;
  gap: 6px;
  height: 100%;
  overflow: hidden;
}

/* Hide drag handle when collapsed */
.ptb-col.ptb-col-collapsed .ptb-col-drag-handle { display: none; }

/* Vertical title text */
.ptb-col-title-v {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 160px;
  flex: 1;
  line-height: 1;
}

/* Dot still shows */
.ptb-col.ptb-col-collapsed .ptb-col-dot {
  width: 8px; height: 8px; flex-shrink: 0;
}

/* Count badge — small */
.ptb-col.ptb-col-collapsed .ptb-col-count {
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}

/* Collapse/expand toggle button */
.ptb-col-collapse-btn {
  background: none;
  border: none;
  color: #c0c9d7;
  font-size: 9px;
  cursor: pointer;
  padding: 2px 3px;
  border-radius: 3px;
  line-height: 1;
  flex-shrink: 0;
  transition: color .12s, background .12s;
  margin-left: auto;
}
.ptb-col-collapse-btn:hover {
  color: #667085;
  background: rgba(0,0,0,.06);
}
.ptb-col.ptb-col-collapsed .ptb-col-collapse-btn {
  margin-left: 0;
  margin-top: auto;
}

/* ══════════════════════════════════════
   Structured card title — 5 sections
   ══════════════════════════════════════ */

/* 1. Order number — prominent, monospace */
.ptb-card-order {
  font-size: 11px;
  font-weight: 700;
  font-family: 'SFMono-Regular', Consolas, monospace;
  color: #1d2939;
  letter-spacing: .3px;
  line-height: 1.3;
  margin-bottom: 2px;
  word-break: break-all;
}

/* 2. Customer name */
.ptb-card-customer {
  font-size: 12px;
  font-weight: 600;
  color: #344054;
  line-height: 1.3;
  margin-bottom: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 3+4. Size + Phone on one row */
.ptb-card-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  margin-bottom: 2px;
  overflow: hidden;
}
.ptb-card-size {
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  background: #6366f1;
  border-radius: 3px;
  padding: 1px 5px;
  white-space: nowrap;
  flex-shrink: 0;
}
.ptb-card-phone {
  font-size: 10px;
  color: #667085;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 5. Special instructions */
.ptb-card-notes {
  font-size: 10px;
  color: #92400e;
  background: #fef3c7;
  border-radius: 3px;
  padding: 1px 5px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Detail modal header ── */
.ptb-modal-order {
  font-size: 13px;
  font-weight: 700;
  font-family: 'SFMono-Regular', Consolas, monospace;
  color: #1d2939;
  letter-spacing: .3px;
  margin-bottom: 2px;
}
.ptb-modal-customer {
  font-size: 15px;
  font-weight: 700;
  color: #1d2939;
  margin-bottom: 4px;
}
.ptb-modal-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.ptb-modal-size {
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: #6366f1;
  border-radius: 4px;
  padding: 2px 7px;
}
.ptb-modal-phone {
  font-size: 12px;
  color: #475467;
  font-weight: 500;
}
.ptb-modal-jobid {
  font-size: 11px;
  color: #98a2b3;
}
.ptb-modal-instructions {
  font-size: 12px;
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 5px;
  padding: 4px 9px;
  margin-top: 2px;
  display: inline-block;
}

/* Label hint */
.ptb-label-hint {
  font-size: 10px;
  font-weight: 400;
  color: #98a2b3;
  margin-left: 4px;
}
