@layer business {
/* ============================================================================
   Handover Panel - 交接面板样式
   ============================================================================ */

#handover-panel {
  position: absolute;
  left: var(--navbar-width);
  top: 0;
  width: var(--sidebar-width);
  height: 100%;
  background: var(--bg-panel);
  display: flex;
  flex-direction: column;
  z-index: 100;
  border-right: 1px solid var(--border-color-default);
  overflow: hidden;
  box-shadow: 4px 0 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.25s ease, opacity 0.2s ease;
}

#handover-panel.collapsed {
  transform: translateX(-100%);
  opacity: 0;
  pointer-events: none;
}

/* Panel Content */
.handover-panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Empty State */
.handover-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-style: italic;
}

/* Handover Request Card */
.handover-request {
  background: var(--bg-card);
  border: 1px solid var(--border-color-default);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
}

.handover-request-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.handover-request-session {
  font-size: 0.75rem;
  color: var(--color-primary);
  cursor: pointer;
  font-family: var(--font-mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.handover-request-session:hover {
  text-decoration: underline;
}

.handover-request-time {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.handover-request-summary {
  font-size: 0.8rem;
  color: var(--text-main);
  line-height: 1.4;
  white-space: pre-wrap;
}

/* Task List */
.handover-task-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Task Card */
.handover-task {
  padding: 8px 10px;
  border-radius: 4px;
  border: 1px solid rgba(0,0,0,0.06);
  background: rgba(0,0,0,0.02);
}

.handover-task-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.handover-task-title {
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--text-main);
  flex: 1;
}

.handover-task-tag {
  font-size: 0.6rem;
  padding: 1px 5px;
  border-radius: 3px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  flex-shrink: 0;
}

.handover-task-tag.tag-confirm {
  background: rgba(39, 174, 96, 0.1);
  color: var(--color-success);
}

.handover-task-tag.tag-text {
  background: rgba(43, 94, 167, 0.1);
  color: var(--color-primary);
}

.handover-task-tag.tag-file {
  background: rgba(230, 126, 34, 0.1);
  color: var(--color-warning);
}

.handover-task-tag.tag-required {
  background: rgba(192, 57, 43, 0.08);
  color: var(--color-secondary);
  font-weight: 600;
}

.handover-task-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  line-height: 1.3;
}

.handover-task-status {
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* Task Actions */
.handover-task-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.handover-task-btns {
  display: flex;
  gap: 6px;
}

.handover-text-input,
.handover-reject-reason {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--border-color-default);
  border-radius: 4px;
  font-size: 0.8rem;
  font-family: var(--font-main);
  resize: vertical;
  min-height: 32px;
  background: var(--bg-panel);
  color: var(--text-main);
}

.handover-file-input {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.handover-reject-form {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}

/* Completed / Rejected Task */
.handover-task.status-delivered {
  opacity: 0.6;
  border-color: rgba(39, 174, 96, 0.2);
}

.handover-task.status-rejected {
  opacity: 0.6;
  border-color: rgba(192, 57, 43, 0.2);
}

.handover-task-reject-reason {
  font-size: 0.7rem;
  color: var(--color-secondary);
  font-style: italic;
  margin-top: 2px;
}

/* Badge */
.nav-handover-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--color-primary);
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Mobile */
@media (max-width: 768px) {
  #handover-panel:not(.collapsed) {
    box-shadow: 4px 0 12px rgba(0, 0, 0, 0.15);
  }
}

}