*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
               'Helvetica Neue', Arial, sans-serif;
  background: #f0f2f8;
  min-height: 100vh;
  color: #1a1d2e;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }

/* ── LOGIN ───────────────────────────────────────────────── */
.login-wrapper {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: #f0f2f8;
}
.login-box {
  background: #fff; border-radius: 16px;
  padding: 36px 32px; width: 340px;
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.login-logo {
  width: 48px; height: 48px; background: #E07B39;
  border-radius: 12px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 10px rgba(224,123,57,.4); margin-bottom: 4px;
}
.login-title { font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.login-subtitle { font-size: 12px; color: #9aa0b8; font-weight: 500; margin-bottom: 8px; }
.login-form { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.login-form input {
  width: 100%; padding: 9px 12px; border: 1.5px solid #e2e6f0; border-radius: 8px;
  font-size: 13px; color: #1a1d2e; outline: none; font-family: inherit;
  transition: border-color .15s;
}
.login-form input:focus { border-color: #E07B39; }
.login-btn {
  width: 100%; padding: 10px; background: #E07B39; color: #fff;
  border: none; border-radius: 8px; font-size: 13px; font-weight: 700;
  cursor: pointer; font-family: inherit; transition: background .15s;
}
.login-btn:hover { background: #c9692a; }
.login-error {
  font-size: 12px; color: #c62828; text-align: center;
  background: #fce8e8; border-radius: 6px; padding: 6px 12px;
}

/* ── APP HEADER ─────────────────────────────────────────── */
.app-header {
  background: #fff;
  padding: 11px 20px;
  border-bottom: 1px solid #e2e6f0;
  display: flex; align-items: center; gap: 14px;
  box-shadow: 0 1px 6px rgba(0,0,0,.07);
  position: sticky; top: 0; z-index: 100;
}
.app-logo {
  width: 36px; height: 36px; background: #E07B39;
  border-radius: 9px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; box-shadow: 0 2px 6px rgba(224,123,57,.4);
}
.app-title   { font-size: 15px; font-weight: 800; letter-spacing: -.02em; }
.app-subtitle{ font-size: 11.5px; color: #9aa0b8; font-weight: 500; }
.header-right{ margin-left: auto; display: flex; align-items: center; gap: 10px; }
.header-meta { font-size: 12px; color: #9aa0b8; font-weight: 500; }

/* Presence bar */
.presence-bar { display: flex; gap: 4px; align-items: center; }
.presence-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: #fff;
  border: 2px solid #fff; cursor: default; flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,.15);
  position: relative;
}
.presence-avatar.is-editing {
  animation: presence-pulse 1.5s ease-in-out infinite;
}
@keyframes presence-pulse {
  0%,100% { box-shadow: 0 0 0 2px #E07B39; }
  50%      { box-shadow: 0 0 0 4px rgba(224,123,57,.35); }
}
.presence-avatar[title]:hover::after {
  content: attr(title);
  /* Open below the avatar, anchored to its right edge → never clips off-screen */
  position: absolute; top: calc(100% + 6px); right: 0;
  left: auto; transform: none;
  background: #1a1d2e; color: #fff; font-size: 11px; font-weight: 500;
  padding: 4px 8px; border-radius: 6px; white-space: nowrap;
  pointer-events: none; z-index: 200;
}

.pdf-btn {
  background: none; border: 1.5px solid #e2e6f0; border-radius: 20px;
  padding: 4px 12px; font-size: 11.5px; font-weight: 700; color: #9aa0b8;
  cursor: pointer; font-family: inherit; transition: all .15s; letter-spacing: .04em;
}
.pdf-btn:hover { border-color: #1565C0; color: #1565C0; }
.pdf-btn:disabled { opacity: .5; cursor: default; }

.logout-btn {
  background: none; border: 1.5px solid #e2e6f0; border-radius: 20px;
  padding: 4px 12px; font-size: 11.5px; font-weight: 600; color: #9aa0b8;
  cursor: pointer; font-family: inherit; transition: all .15s;
}
.logout-btn:hover { border-color: #c62828; color: #c62828; }

.add-global-btn {
  width: 32px; height: 32px; background: #E07B39;
  border: none; border-radius: 50%; color: #fff; font-size: 22px; font-weight: 300;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(224,123,57,.4); line-height: 1; flex-shrink: 0;
  transition: background .15s, box-shadow .15s;
}
.add-global-btn:hover { background: #c9692a; box-shadow: 0 3px 12px rgba(224,123,57,.5); }

/* ── BOARD ──────────────────────────────────────────────── */
.board-wrapper {
  overflow-x: auto;
  padding: 20px 0 36px;
  min-height: calc(100vh - 59px);
  /* Center columns; safe = fall back to start when overflowing */
  display: flex;
  justify-content: safe center;
}
.board {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 0 18px;
  flex-shrink: 0;   /* never compress columns */
}

/* ── COLUMN ─────────────────────────────────────────────── */
.column {
  flex: 1; min-width: 290px; max-width: 330px;
  border-radius: 14px; padding-bottom: 10px;
  flex-shrink: 0; background: #e8ebf5; transition: background .15s;
  position: relative;
}
.column.drag-over {
  background: #dde3f5; outline: 2px dashed rgba(0,0,0,.15); outline-offset: -2px;
}

/* Column header */
.column-header {
  padding: 13px 15px 12px; border-radius: 14px 14px 0 0;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
}
.header-left { flex: 1; min-width: 0; }
.curator-name { font-size: 14px; font-weight: 800; color: #fff; letter-spacing: -.02em; margin-bottom: 4px; }

/* Territory with pencil edit */
.curator-territory-wrap { display: flex; align-items: center; gap: 4px; }
.curator-territory {
  font-size: 10.5px; color: rgba(255,255,255,.8);
  font-weight: 500; font-style: italic; line-height: 1.4; flex: 1;
}
.territory-pencil-btn {
  opacity: 0; background: none; border: none;
  width: 16px; height: 16px; cursor: pointer;
  color: rgba(255,255,255,.6);
  display: flex; align-items: center; justify-content: center;
  border-radius: 3px; flex-shrink: 0;
  transition: opacity .15s, background .15s, color .15s;
}
.curator-territory-wrap:hover .territory-pencil-btn { opacity: 1; }
.territory-pencil-btn:hover { background: rgba(255,255,255,.2); color: #fff; }

.header-right-stats {
  display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex-shrink: 0;
}
.header-stat-proj { font-size: 13px; font-weight: 800; color: #fff; white-space: nowrap; }
.header-stat-rp   { font-size: 10px; font-weight: 600; color: rgba(255,255,255,.7); white-space: nowrap; }

/* Curator settings button */
.curator-settings-btn {
  opacity: 0; background: rgba(255,255,255,.15); border: none; border-radius: 6px;
  cursor: pointer; color: rgba(255,255,255,.85); padding: 3px 6px; font-size: 13px;
  line-height: 1; transition: opacity .15s, background .15s; flex-shrink: 0;
}
.column-header:hover .curator-settings-btn { opacity: 1; }
.curator-settings-btn:hover { background: rgba(255,255,255,.3); color: #fff; }

/* Cards area */
.cards-area { padding: 9px 9px 3px; min-height: 70px; display: flex; flex-direction: column; gap: 8px; }

/* Add RP button at bottom of column */
.col-add-rp-btn {
  display: flex; align-items: center; justify-content: center;
  margin: 4px 9px 6px; padding: 5px;
  border: 1.5px dashed #c8cedd; border-radius: 9px;
  background: none; color: #aab0c8; font-size: 13px;
  cursor: pointer; font-family: inherit; gap: 4px; font-weight: 600;
  transition: border-color .12s, color .12s, background .12s;
}
.col-add-rp-btn:hover { border-color: #4361ee; color: #4361ee; background: #eef0fd; }

/* ── CARD (РП) ──────────────────────────────────────────── */
.card {
  background: #fff; border-radius: 11px;
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 1px 3px rgba(0,0,0,.07), 0 2px 8px rgba(0,0,0,.04);
  cursor: grab; user-select: none;
  transition: transform .15s, box-shadow .15s;
  overflow: visible; position: relative;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(0,0,0,.11); }

/* Card action buttons */
.card-btns {
  position: absolute; top: 6px; right: 6px;
  display: flex; gap: 3px; z-index: 10;
  opacity: 0; pointer-events: none; transition: opacity .18s;
}
.card:hover .card-btns { opacity: 1; pointer-events: all; }
.card-btns .action-btn.add-btn { background: #edf0f7; color: #8a90a8; }
.card-btns .action-btn.add-btn:hover { background: #dde3f5; color: #4361ee; }
.card-btns .action-btn.del-btn { background: #edf0f7; color: #8a90a8; }
.card-btns .action-btn.del-btn:hover { background: #fce8e8; color: #c62828; }

/* Card edit button */
.card-btns .action-btn.edit-btn { background: #edf0f7; color: #8a90a8; font-size: 11px; }
.card-btns .action-btn.edit-btn:hover { background: #dde3f5; color: #4361ee; }

/* Accent bar */
.card-accent-bar { height: 3px; border-radius: 11px 11px 0 0; }

.card-body { padding: 10px 12px 11px; }

/* PM header */
.pm-header {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 6px;
  margin-bottom: 5px; padding-right: 60px;
}
.pm-name { font-size: 13px; font-weight: 700; line-height: 1.3; flex: 1; }
.project-badge {
  font-size: 9.5px; font-weight: 700; border-radius: 20px; padding: 2px 7px;
  white-space: nowrap; flex-shrink: 0;
}

/* Cities row with pencil edit */
.cities-row { display: flex; align-items: flex-start; gap: 4px; margin-bottom: 9px; }
.cities-icon { flex-shrink: 0; margin-top: 1px; opacity: .5; }
.cities-edit-wrap { display: flex; align-items: center; gap: 3px; flex: 1; min-width: 0; }
.cities-text { font-size: 10.5px; color: #6b7494; font-weight: 500; line-height: 1.4; flex: 1; }
.cities-pencil-btn {
  opacity: 0; background: none; border: none;
  width: 15px; height: 15px; cursor: pointer;
  color: #b0b8d0; display: flex; align-items: center; justify-content: center;
  border-radius: 3px; flex-shrink: 0;
  transition: opacity .15s, background .15s, color .15s;
}
.cities-row:hover .cities-pencil-btn { opacity: 1; }
.cities-pencil-btn:hover { background: #edf0f7; color: #4361ee; }

/* Inline edit input */
.inline-edit-input {
  flex: 1; border: 1.5px solid #E07B39; border-radius: 5px;
  padding: 2px 6px; font-size: 10.5px; font-family: inherit;
  color: #1a1d2e; outline: none; background: #fff; min-width: 0;
}
.curator-territory-wrap .inline-edit-input {
  background: rgba(255,255,255,.92); color: #1a1d2e; font-style: normal;
}

/* Divider */
.card-divider { border: none; border-top: 1px solid #edf0f7; margin: 0 -12px 9px; }

/* Coord section header */
.coord-section-header { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.coord-section-label {
  font-size: 9.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em;
  color: #aab0c8; flex: 1;
}

/* Collapse button */
.collapse-btn {
  background: none; border: none; width: 18px; height: 18px;
  cursor: pointer; font-size: 12px; color: #aab0c8;
  display: flex; align-items: center; justify-content: center;
  border-radius: 4px; padding: 0; line-height: 1; flex-shrink: 0;
}
.collapse-btn:hover { background: #edf0f7; color: #6b7494; }

/* ── COORDINATOR ────────────────────────────────────────── */
.coordinator {
  background: #f6f8fd; border: 1px solid #e8ecf5;
  border-radius: 8px; padding: 5px 8px;
  margin-bottom: 4px; display: flex; align-items: center; gap: 6px;
  cursor: grab; position: relative;
}
.coordinator:last-child { margin-bottom: 0; }
.coordinator:active { cursor: grabbing; }

.coord-left { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.coord-avatar {
  width: 21px; height: 21px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 7.5px; font-weight: 800; color: #fff; flex-shrink: 0;
  transition: background .18s; position: relative; overflow: hidden;
  cursor: pointer;
}
.avatar-text { transition: opacity .15s; }
.coordinator:hover .coord-avatar .avatar-text { opacity: 0; }
.coordinator:hover .coord-avatar::after {
  content: '×';
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; color: #fff;
  background: rgba(180, 30, 30, 0.82);
  border-radius: 50%;
}

.coord-name { font-size: 11px; color: #3a4060; font-weight: 600; white-space: nowrap; }

/* Color picker for coordinator avatar */
.coord-color-wrap { position: relative; }
.coord-color-input {
  position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none;
}

/* Projects area */
.coord-projects-right {
  display: flex; flex-wrap: wrap; gap: 3px;
  justify-content: flex-end; flex: 1;
  min-height: 22px; align-items: center;
}
.coord-projects-right.drop-active {
  background: rgba(80,120,220,.07); border-radius: 5px;
  outline: 1.5px dashed #b0bce8; outline-offset: 3px;
}

/* + button for adding project */
.proj-add-btn {
  display: none;
  align-items: center; justify-content: center;
  width: 17px; height: 17px;
  background: none; border: 1.5px dashed #c8cedd; border-radius: 4px;
  color: #aab0c8; font-size: 13px; font-weight: 600;
  cursor: pointer; flex-shrink: 0; line-height: 1;
  transition: border-color .12s, color .12s, background .12s;
}
.coord-projects-right:hover .proj-add-btn { display: flex; }
.proj-add-btn:hover { border-color: #4361ee; color: #4361ee; background: #eef0fd; }

/* ── PROJECT TAG ────────────────────────────────────────── */
.project-tag {
  display: inline-flex; align-items: center;
  font-size: 10px; font-weight: 600;
  color: #5a6282; background: #eaecf5;
  border-radius: 5px; padding: 2px 7px;
  line-height: 1.4; cursor: grab; position: relative;
}
.project-tag:active { cursor: grabbing; }
.project-tag:hover { background: #e0e3f0; }
.tag-text {}

/* ── SHARED ACTION BUTTONS ──────────────────────────────── */
.action-btn {
  width: 17px; height: 17px; border: none; border-radius: 4px;
  cursor: pointer; font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  line-height: 1; padding: 0; flex-shrink: 0;
  transition: background .12s, color .12s;
}
.action-btn.add-btn { background: #e8f4ec; color: #2e7d32; }
.action-btn.add-btn:hover { background: #2e7d32; color: #fff; }
.action-btn.del-btn { background: #fce8e8; color: #c62828; }
.action-btn.del-btn:hover { background: #c62828; color: #fff; }

/* ── DRAG STATES ────────────────────────────────────────── */
.is-dragging { display: none !important; }
.drag-placeholder {
  background: #dde3f5; border: 2px dashed #b0bce8;
  border-radius: 11px; min-height: 64px; flex-shrink: 0;
  animation: ph-pulse 1.2s ease-in-out infinite;
}
.coord-placeholder {
  background: #e0e5f5; border: 2px dashed #b0bce8;
  border-radius: 8px; height: 32px; margin-bottom: 4px;
  animation: ph-pulse 1.2s ease-in-out infinite;
}
.proj-placeholder {
  display: inline-flex; background: #dde3f5; border: 2px dashed #b0bce8;
  border-radius: 5px; width: 52px; height: 22px;
  animation: ph-pulse 1.2s ease-in-out infinite;
}
.coord-list.drop-active {
  background: rgba(80,120,220,.05); border-radius: 6px;
  outline: 1.5px dashed #b0bce8; outline-offset: 2px;
}
@keyframes ph-pulse { 0%,100%{opacity:.5} 50%{opacity:1} }

/* ── INLINE ADD FORM ────────────────────────────────────── */
.inline-add-form {
  display: flex; align-items: center; gap: 3px; padding: 3px 0; width: 100%;
}
.inline-add-form.proj-inline { width: auto; }
.inline-input {
  flex: 1; min-width: 80px; border: 1.5px solid #E07B39; border-radius: 5px;
  padding: 3px 7px; font-size: 11px; outline: none; font-family: inherit; color: #1a1d2e;
}
.inline-confirm, .inline-cancel {
  width: 20px; height: 20px; border: none; border-radius: 4px; cursor: pointer;
  font-size: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.inline-confirm { background: #e8f4ec; color: #2e7d32; }
.inline-confirm:hover { background: #2e7d32; color: #fff; }
.inline-cancel  { background: #fce8e8; color: #c62828; }
.inline-cancel:hover { background: #c62828; color: #fff; }

/* ── MODAL ──────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  z-index: 500; display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(3px);
}
.modal-overlay.hidden { display: none; }
.modal {
  background: #fff; border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.22);
  width: 460px; max-width: 92vw; overflow: hidden;
}
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 0; }
.modal-title  { font-size: 15px; font-weight: 800; color: #1a1d2e; }
.modal-close-btn { background: none; border: none; font-size: 22px; cursor: pointer; color: #9aa0b8; padding: 0; line-height: 1; }
.modal-close-btn:hover { color: #1a1d2e; }
.modal-tabs { display: flex; padding: 14px 20px 0; gap: 2px; border-bottom: 1px solid #edf0f7; }
.tab-btn {
  background: none; border: none; padding: 7px 14px; font-size: 12.5px; font-weight: 600;
  color: #9aa0b8; cursor: pointer; border-radius: 8px 8px 0 0; position: relative; font-family: inherit;
}
.tab-btn.active { color: #1a1d2e; background: #f5f6fa; }
.tab-btn.active::after {
  content: ''; position: absolute; bottom: -1px; left: 0; right: 0;
  height: 2.5px; background: #E07B39;
}
.modal-body { padding: 18px 20px 20px; }
.tab-pane { display: flex; flex-direction: column; gap: 12px; }
.tab-pane.hidden { display: none; }
.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #9aa0b8; }
.form-input, .form-select {
  width: 100%; padding: 8px 11px; border: 1.5px solid #e2e6f0; border-radius: 8px;
  font-size: 13px; color: #1a1d2e; outline: none; transition: border-color .15s;
  font-family: inherit; background: #fff;
}
.form-input:focus, .form-select:focus { border-color: #E07B39; }

/* Color input row */
.form-color-row { display: flex; align-items: center; gap: 8px; }
.form-color-input {
  width: 40px; height: 36px; border: 1.5px solid #e2e6f0; border-radius: 8px;
  padding: 2px; cursor: pointer; background: #fff; flex-shrink: 0;
}
.form-color-preview {
  flex: 1; height: 36px; border-radius: 8px;
  background: linear-gradient(135deg, #C8960C, #9B6E08);
  transition: background .2s;
}

.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.btn-cancel {
  background: #f5f6fa; border: none; border-radius: 8px; padding: 8px 16px;
  font-size: 12.5px; font-weight: 600; color: #6b7494; cursor: pointer; font-family: inherit;
}
.btn-cancel:hover { background: #e8ebf5; }
.btn-submit {
  background: #E07B39; border: none; border-radius: 8px; padding: 8px 18px;
  font-size: 12.5px; font-weight: 700; color: #fff; cursor: pointer; font-family: inherit;
}
.btn-submit:hover { background: #c9692a; }

/* ── CONFIRM DIALOG ─────────────────────────────────────── */
.confirm-modal { width: 360px; }
.confirm-modal .modal-body { padding: 24px 24px 20px; display: flex; flex-direction: column; gap: 16px; }
.confirm-message { font-size: 13.5px; color: #1a1d2e; line-height: 1.5; }
.btn-delete {
  background: #c62828; border: none; border-radius: 8px; padding: 8px 18px;
  font-size: 12.5px; font-weight: 700; color: #fff; cursor: pointer; font-family: inherit;
}
.btn-delete:hover { background: #a31515; }

/* ── SUMMARY SECTION ────────────────────────────────────── */
.summary-section {
  background: #edf0f9; border-top: 2px solid #e2e6f0;
  padding: 28px 22px 56px;
}
.summary-inner { max-width: 1280px; margin: 0 auto; }

.summary-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 20px; flex-wrap: wrap;
}
.summary-title { font-size: 15px; font-weight: 800; color: #1a1d2e; }

/* Filter buttons */
.summary-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-btn {
  padding: 5px 15px; border-radius: 20px;
  border: 1.5px solid #d4d9eb; background: #fff;
  font-size: 11.5px; font-weight: 600; color: #6b7494;
  cursor: pointer; font-family: inherit; transition: all .15s;
}
.filter-btn:hover { border-color: #9aa0b8; color: #3a4060; }
.filter-btn[data-filter="curators"].active { background: linear-gradient(135deg,#C8960C,#9B6E08); border-color: #9B6E08; color: #fff; }
.filter-btn[data-filter="rps"].active      { background: linear-gradient(135deg,#1565C0,#0D47A1); border-color: #0D47A1; color: #fff; }
.filter-btn[data-filter="coords"].active   { background: linear-gradient(135deg,#E65100,#BF360C); border-color: #BF360C; color: #fff; }

/* Summary panels */
.summary-panels { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.summary-panel {
  flex: 1; min-width: 260px; background: #fff; border-radius: 14px;
  overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,.07);
  border: 1px solid rgba(0,0,0,.05); transition: all .2s;
}
.summary-panel.hidden { display: none; }

.summary-panel-header {
  padding: 11px 16px; display: flex; align-items: center; justify-content: space-between;
}
.summary-panel-header.curators { background: linear-gradient(135deg,#C8960C,#9B6E08); }
.summary-panel-header.rps      { background: linear-gradient(135deg,#1565C0,#0D47A1); }
.summary-panel-header.coords   { background: linear-gradient(135deg,#E65100,#BF360C); }
.summary-panel-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: rgba(255,255,255,.85); }
.summary-panel-count {
  font-size: 18px; font-weight: 800; color: #fff;
  background: rgba(0,0,0,.18); border-radius: 8px;
  padding: 1px 9px; min-width: 32px; text-align: center;
}

.summary-panel-body { max-height: 400px; overflow-y: auto; }
.summary-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.summary-table thead th {
  text-align: left; color: #9aa0b8; font-weight: 600;
  padding: 8px 12px 7px; border-bottom: 1.5px solid #edf0f7;
  font-size: 10px; text-transform: uppercase; letter-spacing: .05em;
  position: sticky; top: 0; background: #fff;
  cursor: pointer; user-select: none;
  white-space: nowrap;
}
.summary-table thead th:hover { color: #4361ee; }
.summary-table thead th.sort-active { color: #4361ee; }
.sort-arrow { margin-left: 3px; font-size: 9px; }
.summary-table td {
  padding: 7px 12px; border-bottom: 1px solid #f5f6fa;
  color: #3a4060; vertical-align: middle;
}
.summary-table tr:last-child td { border-bottom: none; }
.summary-table tbody tr:hover td { background: #f8f9fd; }
.sum-name  { font-weight: 600; color: #1a1d2e; white-space: nowrap; }
.sum-meta  { color: #9aa0b8; font-size: 10.5px; }
.sum-num   { font-weight: 700; color: #4361ee; text-align: right; white-space: nowrap; }
.sum-projs { color: #6b7494; font-size: 10.5px; line-height: 1.5; }
.sum-dot {
  display: inline-block; width: 8px; height: 8px;
  border-radius: 50%; margin-right: 6px; flex-shrink: 0; vertical-align: middle;
}

/* ── EDITING INDICATORS ─────────────────────────────────── */

/* Injected badge showing who is editing */
.edit-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: #E07B39; color: #fff;
  font-size: 10px; font-weight: 700; white-space: nowrap;
  padding: 2px 7px 2px 4px;
  border-radius: 10px; pointer-events: none;
  box-shadow: 0 2px 8px rgba(224,123,57,.45);
  animation: badge-pop .15s ease;
  position: absolute; z-index: 40;
}
.edit-badge-avatar {
  width: 15px; height: 15px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 7px; font-weight: 800; color: #fff;
  background: rgba(0,0,0,.25); flex-shrink: 0;
}
@keyframes badge-pop {
  from { opacity: 0; transform: scale(.7); }
  to   { opacity: 1; transform: scale(1); }
}

/* Card being edited: left orange border + warm shadow */
.card.being-edited {
  border-left: 3px solid #E07B39 !important;
  box-shadow: 0 0 0 2px rgba(224,123,57,.2), 0 4px 14px rgba(0,0,0,.1);
}
.card.being-edited .edit-badge { top: 6px; left: 10px; }

/* Column being edited: glowing header ring */
.column.being-edited .column-header {
  outline: 2px solid rgba(255,255,255,.55);
  outline-offset: -3px;
  animation: col-edit-pulse 2s ease-in-out infinite;
}
.column.being-edited .edit-badge { top: 10px; left: 10px; }
@keyframes col-edit-pulse {
  0%,100% { outline-color: rgba(255,255,255,.45); }
  50%      { outline-color: rgba(255,255,255,.9); }
}

/* Coordinator being edited: warm tint + left accent */
.coordinator.being-edited {
  background: #fff7f0 !important;
  border-color: #f0a070 !important;
  border-left: 3px solid #E07B39 !important;
}
.coordinator.being-edited .edit-badge {
  top: 50%; right: 6px; left: auto;
  transform: translateY(-50%);
}

/* Project tag being edited */
.project-tag.being-edited {
  background: #ffe5d0 !important;
  color: #8c3800 !important;
  outline: 1.5px solid #E07B39;
  outline-offset: 1px;
}

/* Locked element — blocked from editing by another user */
.edit-locked {
  opacity: .65;
  cursor: not-allowed !important;
}
.edit-locked * { pointer-events: none !important; }

/* ── TOAST ───────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: #1a1d2e; color: #fff;
  padding: 10px 16px; border-radius: 10px;
  font-size: 12.5px; font-weight: 500;
  z-index: 600; opacity: 0;
  transform: translateY(8px);
  transition: opacity .2s, transform .2s;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
  max-width: 300px;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* ── MOBILE ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .app-header { padding: 10px 14px; gap: 10px; }
  .app-subtitle { display: none; }
  .header-meta { display: none; }
  .logout-btn { display: none; }

  .board-wrapper { padding: 14px 10px 24px; }
  .board { gap: 10px; }
  .column { min-width: 260px; max-width: 290px; }

  .summary-section { padding: 20px 14px 40px; }
  .summary-panels { flex-direction: column; }
  .summary-panel { min-width: unset; width: 100%; }

  .modal { width: 95vw; }
  .login-box { width: 92vw; padding: 28px 20px; }
}
