/* ==========================================================================
   排班调整 v2（notice.css）
   独立模块；纯色、细边框、无投影、无渐变、无背景模糊。
   ========================================================================== */

.notice-page {
  box-sizing: border-box;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  color: var(--text);
}

/* ---------- 工具栏 ---------- */
.nt-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: #fff;
}

.nt-toolbar-main {
  min-width: 0;
}

.nt-title {
  margin: 0;
  font-size: var(--fs-xl);
  font-weight: 750;
  line-height: 1.25;
}

.nt-sub {
  margin-top: 4px;
  color: var(--text-light);
  font-size: var(--fs-xs);
}

.nt-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nt-dept-select {
  min-height: 38px;
  max-width: 150px;
  padding: 0 8px;
  border: 1px solid var(--slate-300);
  border-radius: var(--r-sm, 10px);
  background: #fff;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
}

.nt-switch-row {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  height: 38px;
  border: 1px solid var(--slate-300);
  border-radius: var(--r-sm, 10px);
  background: #fff;
  cursor: pointer;
  user-select: none;
}

.nt-switch-label {
  color: var(--slate-700);
  font-size: 12.5px;
}

.nt-switch {
  appearance: none;
  -webkit-appearance: none;
  width: 36px;
  height: 21px;
  margin: 0;
  border: 1px solid var(--slate-300);
  border-radius: 999px;
  background: var(--slate-200);
  position: relative;
  cursor: pointer;
  transition: background var(--dur-2), border-color var(--dur-2);
}

.nt-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fff;
  transition: transform var(--dur-2) var(--ease-out, ease);
}

.nt-switch:checked {
  border-color: var(--brand-600);
  background: var(--brand-600);
}

.nt-switch:checked::after {
  transform: translateX(15px);
}

/* ---------- 按钮 ---------- */
.nt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: var(--r-sm, 10px);
  font-family: inherit;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--dur-2), border-color var(--dur-2), color var(--dur-2),
              transform var(--dur-1);
}

.nt-btn svg {
  width: 15px;
  height: 15px;
}

.nt-btn:active {
  transform: scale(0.97);
}

.nt-btn.primary {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.nt-btn.primary:hover {
  border-color: var(--brand-600);
  background: var(--brand-600);
}

.nt-btn.ghost {
  border-color: var(--slate-300);
  background: #fff;
  color: var(--slate-700);
}

.nt-btn.danger {
  border-color: var(--danger);
  background: var(--danger);
  color: #fff;
}

.nt-btn:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  transform: none;
}

/* ---------- 统计卡 ---------- */
.nt-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.nt-stat-card {
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: #fff;
}

.nt-stat-card .num {
  color: var(--text);
  font-family: var(--font-num, inherit);
  font-size: 22px;
  font-weight: 750;
  line-height: 1.2;
}

.nt-stat-card .lbl {
  margin-top: 3px;
  color: var(--text-light);
  font-size: 11.5px;
}

.nt-stat-card.warn .num {
  color: var(--warning);
}

.nt-stat-card.warn {
  border-color: #fde68a;
  background: #fffbeb;
}

/* ---------- 列表 ---------- */
.nt-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nt-empty {
  min-height: 200px;
  border: 1px dashed var(--slate-300);
  border-radius: var(--r-md, 14px);
  background: var(--slate-50);
  color: var(--text-light);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.nt-empty svg {
  width: 40px;
  height: 40px;
  opacity: 0.55;
}

.nt-empty p {
  margin: 0;
}

/* ---------- 通知卡片 ---------- */
.nt-card {
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-left-width: 3px;
  border-radius: var(--r-md);
  background: #fff;
}

.nt-card.unhandled {
  border-left-color: var(--brand);
}

.nt-card.handled {
  border-left-color: var(--slate-300);
}

/* 紧急轮休请求：待审批红色左边框（复刻旧版视觉） */
.nt-card.urgent.unhandled {
  border-left-color: #ef4444;
}

.nt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.nt-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 650;
}

.nt-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.nt-badge.pending {
  background: var(--brand-100);
  color: var(--brand-600);
}

.nt-badge.admin {
  background: #f5edff;
  color: var(--purple, #9333ea);
}

.nt-badge.urgent {
  background: #fef2f2;
  color: #b91c1c;
}

.nt-badge.urgent .dot {
  background: #ef4444;
}

.nt-time {
  color: var(--text-light);
  font-size: 11.5px;
}

.nt-body {
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin-top: 11px;
  padding: 10px 0;
  border-top: 1px solid var(--slate-100);
}

.nt-col {
  flex: 1;
  min-width: 0;
}

.col-title {
  color: var(--text-light);
  font-size: 11px;
}

.col-name {
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 700;
}

.col-erp {
  margin-left: 6px;
  color: var(--text-light);
  font-size: 11px;
  font-weight: 400;
}

.nt-dates {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.nt-date {
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 650;
}

.nt-date.old {
  background: var(--slate-100);
  color: var(--slate-500);
  text-decoration: line-through;
}

.nt-date.new {
  background: var(--brand-100);
  color: var(--brand-600);
}

.nt-arrow {
  flex: 0 0 auto;
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--brand);
}

.nt-arrow svg {
  width: 18px;
  height: 18px;
}

.nt-arrow span {
  font-size: 10.5px;
  font-weight: 650;
}

.nt-arrow.admin {
  color: var(--purple, #9333ea);
}

.nt-arrow.urgent {
  color: #ef4444;
}

.nt-date.urgent-date {
  background: #fef2f2;
  color: #dc2626;
}

.nt-note {
  margin-bottom: 9px;
  padding: 7px 11px;
  border-radius: 8px;
  background: var(--slate-50);
  color: var(--slate-700);
  font-size: 12.5px;
  line-height: 1.6;
}

.nt-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nt-chip {
  padding: 3px 9px;
  border: 1px solid var(--slate-200);
  border-radius: 999px;
  color: var(--text-light);
  font-size: 11px;
}

.nt-chip b {
  color: var(--slate-700);
  font-weight: 650;
}

.nt-chip.admin {
  border-color: #e9d5ff;
  background: #f5edff;
  color: var(--purple, #9333ea);
}

.nt-actions {
  margin-top: 11px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* 紧急审批：通过（红色渐变主按钮）/ 已拒绝留痕 */
.nt-btn.urgent {
  border-color: #ef4444;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
}

.nt-btn.urgent:hover {
  filter: brightness(0.96);
}

.nt-btn.reject-done {
  border-color: #fecaca;
  background: #fef2f2;
  color: #ef4444;
}

/* ---------- 确认弹窗 ---------- */
.notice-mask {
  position: fixed;
  inset: 0;
  z-index: 1002;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.notice-mask.is-open {
  opacity: 1;
  pointer-events: auto;
}

.nt-modal {
  width: 100%;
  max-width: 380px;
  border-radius: var(--r-md, 14px);
  background: #fff;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.22s var(--ease-out, ease);
}

.notice-mask.is-open .nt-modal {
  transform: translateY(0) scale(1);
}

.nt-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 0;
}

.nt-modal-title {
  font-size: 15px;
  font-weight: 750;
}

.nt-close {
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-light);
  cursor: pointer;
}

.nt-close:hover {
  background: var(--slate-100);
  color: var(--text);
}

.nt-close svg {
  width: 16px;
  height: 16px;
  display: block;
}

.nt-modal-body {
  padding: 11px 16px 4px;
  color: var(--slate-700);
  font-size: 13px;
  line-height: 1.7;
}

.nt-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding: 12px 16px 16px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 767px) {
  .nt-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 11px;
    padding: 14px;
  }

  .nt-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .nt-toolbar-actions {
    width: 100%;
  }

  .nt-dept-select {
    flex: 1 1 auto;
    max-width: none;
  }

  .nt-switch-row {
    margin-left: auto;
  }

  .nt-toolbar-actions .nt-btn.primary {
    margin-left: 0;
  }

  .nt-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .nt-stat-card {
    padding: 10px 12px;
  }

  .nt-stat-card .num {
    font-size: 18px;
  }

  .nt-body {
    flex-direction: column;
    gap: 9px;
  }

  .nt-arrow {
    flex-direction: row;
    gap: 6px;
    transform: rotate(90deg);
  }

  .col-name {
    white-space: normal;
  }
}
