/* Hide number input spinners globally */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }

/* Context menu */
.context-menu {
  position: absolute;
  z-index: 300;
  min-width: 180px;
  padding: 4px 0;
  font-size: 12px;
}

.ctx-item {
  padding: 6px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  position: relative;
  white-space: nowrap;
}
.ctx-item:hover { background: rgba(255,255,255,0.08); }
.ctx-item:focus-visible {
  outline: 1px solid rgba(255,255,255,0.4);
  outline-offset: -1px;
  background: rgba(255,255,255,0.12);
}
.ctx-item.current { color: var(--status-in-progress); }
.ctx-item .check { font-size: 11px; width: 14px; }
.ctx-separator { height: 1px; background: var(--border); margin: 3px 0; }

/* Submenu */
.ctx-submenu-wrap { position: relative; }
.ctx-submenu-wrap > .ctx-item::after { content: '>'; margin-left: auto; opacity: 0.5; }
.ctx-submenu {
  display: none;
  position: absolute;
  left: 100%;
  top: 0;
  min-width: 160px;
  padding: 4px 0;
}
.ctx-submenu-wrap:hover > .ctx-submenu { display: block; }

/* Node edit overlay */
.node-edit-overlay {
  position: absolute;
  z-index: 35;
  padding: 10px 14px;
  min-width: 200px;
}

.node-edit-overlay .ne-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.node-edit-overlay .ne-name {
  flex: 1;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 4px 8px;
  font-size: 12px;
  font-family: inherit;
}

/* Kanban modal */
.kanban-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kanban-modal {
  width: min(900px, 90vw);
  max-height: 80vh;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.kanban-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
}

.kanban-title {
  font-size: 14px;
  font-weight: 600;
}

.kanban-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}
.kanban-close:hover { color: #e53e3e; background: rgba(229,62,62,0.1); }

.kanban-columns {
  display: flex;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

.kanban-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  min-height: 200px;
}
.kanban-col .kanban-col-body { min-height: 120px; }
.kanban-col:last-child { border-right: none; }

.kanban-col-header {
  padding: 8px 12px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.kanban-col-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}
.kanban-col-body::-webkit-scrollbar { width: 3px; }
.kanban-col-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); }

.kanban-card {
  padding: 8px 10px;
  margin-bottom: 6px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  cursor: default;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.kanban-card:hover { border-color: rgba(255,255,255,0.15); }
.kanban-card.draggable { cursor: grab; }
.kanban-card.dragging { cursor: grabbing; opacity: 0.6; }

.kanban-card-id {
  font-size: 9px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.kanban-card-name {
  font-size: 12px;
  margin: 2px 0;
}

.kanban-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 4px;
}

.kanban-hours {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  color: var(--text-muted);
}

/* Kanban add row */
.kanban-add-row {
  display: flex;
  gap: 4px;
  padding: 8px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.kanban-add-row input {
  flex: 1;
  min-width: 0;
}
.kanban-add-row .hours-input {
  width: 40px;
  flex: none;
}

/* Kanban card name -- double-click hint */
.kanban-card-name {
  cursor: default;
}
.kanban-card-name:hover {
  text-decoration: underline dotted rgba(255,255,255,0.2);
}

/* Kanban Esc hint */
.kanban-esc-hint {
  font-size: 10px;
  color: var(--text-muted);
  opacity: 0.5;
}

/* Kanban hours max label */
.kanban-hours-label {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  flex: none;
}

/* Kanban empty column state */
.kanban-empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 60px;
  color: var(--text-muted);
  font-size: 11px;
  opacity: 0.4;
  font-style: italic;
  user-select: none;
}

/* Kanban card flash animation */
@keyframes kanban-flash {
  0%   { background: rgba(56,161,105,0.25); }
  100% { background: rgba(255,255,255,0.04); }
}
.kanban-card.flash {
  animation: kanban-flash 0.6s ease-out;
}

/* Kanban drag-and-drop */
.drag-over {
  background: rgba(255,255,255,0.06);
  border: 1px dashed rgba(255,255,255,0.2);
}

/* Kanban card description */
.kanban-card-desc {
  font-size: 10px;
  color: #94a3b8;
  cursor: pointer;
  min-height: 14px;
  margin: 2px 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.kanban-card-desc.empty {
  font-style: italic;
}

/* Node-edit deadline mismatch warning */
.ne-mismatch-warning {
  font-size: 10px;
  color: #ecc94b;
  padding: 3px 0 2px;
  line-height: 1.3;
  display: none;
}
