:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #1c2430;
  --muted: #667085;
  --line: #d9dee7;
  --brand: #176b87;
  --brand-dark: #0f4c5c;
  --red: #c62828;
  --orange: #d96c06;
  --yellow: #b68705;
  --green: #15803d;
  --shadow: 0 12px 30px rgba(22, 34, 51, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 28px clamp(18px, 4vw, 48px) 20px;
  background: #0f2832;
  color: #fff;
}

.eyebrow {
  margin: 0 0 6px;
  color: #9ed5e4;
  font-size: 13px;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 700;
}

h2 {
  font-size: 22px;
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tab,
button {
  border: 0;
  border-radius: 6px;
  padding: 10px 16px;
  color: #fff;
  background: var(--brand);
  cursor: pointer;
}

.tab {
  background: rgba(255, 255, 255, 0.12);
}

.tab.active {
  background: #fff;
  color: #0f2832;
}

main {
  padding: 28px clamp(16px, 4vw, 48px) 48px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.section-title p {
  margin-top: 6px;
  color: var(--muted);
}

.secondary-button {
  color: var(--brand-dark);
  background: #e7f2f5;
  border: 1px solid #b8dce5;
  transition: all 0.2s ease;
}

.secondary-button:hover {
  background: #d4e9ee;
  border-color: #9acbd7;
  transform: translateY(-1px);
}

.secondary-button:active {
  transform: translateY(0);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.kpi {
  min-height: 116px;
  padding: 18px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.kpi span {
  color: var(--muted);
  font-size: 14px;
}

.kpi strong {
  display: block;
  margin-top: 10px;
  font-size: 34px;
}

.kpi.high strong {
  color: var(--red);
}

.risk-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(260px, 1fr));
  gap: 14px;
}

.risk-lane {
  min-height: 360px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.lane-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.5px;
}

.risk-major .lane-title {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.risk-high .lane-title {
  background: linear-gradient(135deg, #f97316 0%, #c2410c 100%);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.risk-normal .lane-title {
  background: linear-gradient(135deg, #eab308 0%, #a16207 100%);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.risk-low .lane-title {
  background: linear-gradient(135deg, #10b981 0%, #047857 100%);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.lane-count {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.lane-body {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.empty {
  color: var(--muted);
  padding: 16px 4px;
}

.plan-card {
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-left: 5px solid var(--risk-color, currentColor);
  border-radius: 12px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 16px rgba(22, 34, 51, 0.04);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  cursor: pointer;
}

.plan-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(22, 34, 51, 0.12), 0 8px 24px color-mix(in srgb, var(--risk-color, currentColor) 22%, transparent);
}

.card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.card-head strong {
  line-height: 1.35;
}

.card-head span,
.badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 3px 8px;
  background: #eef2f6;
  color: #334155;
  font-size: 12px;
}

dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

dl div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 8px;
}

dt {
  color: var(--muted);
}

dd {
  margin: 0;
}

.plan-form,
.filters,
.table-shell {
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.plan-form {
  padding: 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  color: #334155;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 9px 10px;
  background: #fff;
  color: var(--text);
}

textarea {
  min-height: 80px;
  resize: vertical;
}

.form-actions,
.filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.form-actions {
  margin-top: 16px;
}

#formMessage,
#userFormMessage {
  font-size: 14px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 4px;
  transition: all 0.3s ease;
  display: inline-block;
  opacity: 0;
  transform: translateY(5px);
}

#formMessage.loading,
#userFormMessage.loading {
  opacity: 1;
  transform: translateY(0);
  background: #e0f2fe;
  color: #0369a1;
}

#formMessage.success,
#userFormMessage.success {
  opacity: 1;
  transform: translateY(0);
  background: #dcfce7;
  color: #15803d;
  animation: pulseSuccess 1s ease infinite alternate;
}

#formMessage.error,
#userFormMessage.error {
  opacity: 1;
  transform: translateY(0);
  background: #fee2e2;
  color: #b91c1c;
}

@keyframes pulseSuccess {
  from { transform: scale(1); }
  to { transform: scale(1.03); }
}

.filters {
  padding: 14px;
}

.filters input,
.filters select {
  width: auto;
  min-width: 160px;
}

.filters #filterKeyword {
  min-width: 280px;
}

.table-shell {
  overflow: auto;
}

table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

th,
td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: #475569;
  background: #f8fafc;
  font-size: 13px;
}

td select {
  min-width: 108px;
}

.row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  align-items: center;
  white-space: nowrap;
}

.row-actions button {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 5px;
}

.danger-button {
  color: #8a1c1c;
  background: #fdecec;
  border: 1px solid #f4b6b6;
}

@media (max-width: 1180px) {
  .risk-grid {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
  }
}

@media (max-width: 820px) {
  .app-header,
  .section-title {
    align-items: stretch;
    flex-direction: column;
  }

  .kpi-grid,
  .risk-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .filters input,
  .filters select,
  .filters #filterKeyword {
    width: 100%;
    min-width: 0;
  }
}

/* ==================== 登录页样式 (Login View) ==================== */
.login-view {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #1b3d4b 0%, #081216 100%);
  z-index: 9999;
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: rgba(15, 40, 50, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  padding: 40px 32px 32px;
  color: #fff;
  transition: all 0.3s ease;
  animation: loginCardAppear 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes loginCardAppear {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-header h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 10px 0 6px;
  color: #fff;
  letter-spacing: 0.5px;
}

.login-header .subtitle {
  color: #9ed5e4;
  font-size: 14px;
  opacity: 0.8;
}

.login-form {
  display: grid;
  gap: 20px;
}

.form-group {
  display: grid;
  gap: 8px;
}

.form-group label {
  color: #9ed5e4;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
}

.form-group input {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: 8px;
  padding: 12px 14px;
  transition: all 0.25s ease;
}

.form-group input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.form-group input:focus {
  outline: none;
  border-color: #9ed5e4;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 3px rgba(158, 213, 228, 0.2);
}

.login-btn {
  background: linear-gradient(135deg, #176b87 0%, #0f4c5c 100%);
  color: #fff;
  border: none;
  font-weight: 700;
  font-size: 16px;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(23, 107, 135, 0.3);
}

.login-btn:hover {
  background: linear-gradient(135deg, #1d82a3 0%, #135f73 100%);
  box-shadow: 0 6px 20px rgba(23, 107, 135, 0.4);
  transform: translateY(-1px);
}

.login-btn:active {
  transform: translateY(0);
}

.login-message {
  color: #f87171;
  font-size: 13px;
  text-align: center;
  min-height: 18px;
}

.login-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 16px;
  line-height: 1.5;
}

/* ==================== 系统头部用户信息栏 ==================== */
.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.08);
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.user-info {
  color: #9ed5e4;
  font-weight: 600;
}

.logout-btn {
  background: none;
  border: none;
  color: #fca5a5;
  cursor: pointer;
  padding: 2px 6px;
  font-size: 12px;
  border-radius: 4px;
  transition: all 0.2s;
}

.logout-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

.profile-btn {
  background: none;
  border: none;
  color: #93c5fd;
  cursor: pointer;
  padding: 2px 6px;
  font-size: 12px;
  border-radius: 4px;
  transition: all 0.2s;
}

.profile-btn:hover {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

/* ==================== 账号管理与内联编辑样式 ==================== */
.users-table {
  table-layout: fixed;
  min-width: 1290px;
}

.users-layout {
  display: grid;
  gap: 20px;
}

.user-form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 768px) {
  .user-form-grid {
    grid-template-columns: 1fr;
  }
}

.cell-inline-edit {
  display: flex;
  gap: 6px;
  align-items: center;
}

.cell-inline-edit input {
  padding: 4px 8px;
  min-height: 32px;
  font-size: 13px;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
}

.cell-inline-edit select {
  padding: 4px 8px;
  min-height: 32px;
  font-size: 13px;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  width: auto;
}

.cell-inline-edit button {
  padding: 4px 10px;
  font-size: 12px;
  white-space: nowrap;
}

/* 角色标签样式 */
.role-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.role-admin {
  background: #fee2e2;
  color: #ef4444;
}

.role-approver {
  background: #fef3c7;
  color: #d97706;
}

.role-planner {
  background: #e0f2fe;
  color: #0284c7;
}

/* 移动端适配头部 */
@media (max-width: 820px) {
  .header-right {
    align-items: stretch;
    margin-top: 14px;
  }
  .user-profile {
    justify-content: space-between;
  }
}

/* ==================== 提示弹窗 (Toast Notification) ==================== */
.toast-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 16px;
  pointer-events: none;
  align-items: center;
}

.toast {
  pointer-events: auto;
  min-width: 360px;
  max-width: 500px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text);
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-left: 6px solid var(--brand);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 16px;
  font-weight: 600;
  opacity: 0;
  transform: scale(0.9) translateY(20px);
  transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.toast.success {
  border-left-color: var(--green);
}

.toast.error {
  border-left-color: var(--red);
}

.toast.info {
  border-left-color: var(--brand);
}

.toast-icon {
  font-size: 26px;
  flex-shrink: 0;
}

.toast.success .toast-icon {
  color: var(--green);
}

.toast.error .toast-icon {
  color: var(--red);
}

.toast.info .toast-icon {
  color: var(--brand);
}

.toast-content {
  flex-grow: 1;
  line-height: 1.4;
}

/* ==================== 流程查看与处理弹窗 (Process Modal & Timeline) ==================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  background: var(--surface);
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 780px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  animation: modalSlide 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlide {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}

.close-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.close-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  max-height: 80vh;
}

.modal-plan-info {
  background: #f1f5f9;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 24px;
  border-left: 4px solid var(--brand);
}

.modal-plan-info h4 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.modal-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  font-size: 13px;
}

.modal-info-grid div span:first-child {
  color: var(--muted);
}

.modal-info-grid div span:last-child {
  font-weight: 600;
}

/* 时间线结构 */
.timeline {
  position: relative;
  margin: 10px 0 24px 20px;
  padding-left: 24px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: var(--line);
}

.timeline-item {
  position: relative;
  margin-bottom: 24px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-badge {
  position: absolute;
  left: -24px;
  transform: translateX(-50%);
  top: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 2px #cbd5e1;
  transition: all 0.3s;
}

.timeline-content {
  padding-top: 1px;
}

.timeline-content h4 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.timeline-desc {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.timeline-time {
  display: inline-block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--brand);
  background: #e0f2fe;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

/* 状态高亮 */
.timeline-item.success .timeline-badge {
  background: var(--green);
  color: #fff;
  box-shadow: 0 0 0 2px var(--green);
}

.timeline-item.success .timeline-content h4 {
  color: var(--green);
}

.timeline-item.active .timeline-badge {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 0 0 2px var(--brand);
  animation: badgePulse 1.5s infinite alternate;
}

.timeline-item.active .timeline-content h4 {
  color: var(--brand);
}

.timeline-item.danger .timeline-badge {
  background: var(--red);
  color: #fff;
  box-shadow: 0 0 0 2px var(--red);
}

.timeline-item.danger .timeline-content h4 {
  color: var(--red);
}

@keyframes badgePulse {
  from { transform: translateX(-50%) scale(1); }
  to { transform: translateX(-50%) scale(1.15); }
}

/* 退回原因框 */
.reject-reason-box {
  background: #fef2f2;
  border: 1px solid #fee2e2;
  border-left: 4px solid var(--red);
  padding: 10px 14px;
  border-radius: 6px;
  margin-top: 8px;
  color: #991b1b;
  font-size: 13px;
  line-height: 1.5;
}

/* 弹窗审批操作区域 */
.modal-actions-box {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  margin-top: 20px;
}

.modal-actions-box h4 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.modal-actions-box p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 14px;
}

.approval-form label {
  font-size: 12px;
  color: #475569;
  font-weight: 600;
  margin-bottom: 6px;
}

.approval-form textarea {
  min-height: 60px;
  font-size: 13px;
  margin-bottom: 12px;
}

.approval-buttons {
  display: flex;
  gap: 10px;
}

.approval-buttons button {
  flex: 1;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 14px;
}

.success-btn {
  background: var(--green);
  color: #fff;
}

.success-btn:hover {
  background: #166534;
}

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

.danger-btn:hover {
  background: #991b1b;
}

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

.primary-btn:hover {
  background: var(--brand-dark);
}

/* 按钮禁用状态样式 */
button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ==================== 状态标识与选择框样式 (Status Badges & Selects) ==================== */
.status-badge,
.status-select {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  text-align: center;
  transition: all 0.2s ease;
  line-height: 1.2;
}

.status-badge {
  border: 1px solid transparent;
}

.status-select {
  cursor: pointer;
  border: 1px solid currentColor;
  background-position: right 8px center;
  background-repeat: no-repeat;
  background-size: 10px;
  padding-right: 22px;
  min-height: 28px;
  width: auto;
  min-width: 90px;
  appearance: none;
  -webkit-appearance: none;
}

/* 针对不同状态的精细化配色设计 */
.status-pending {
  background-color: #fffbeb;
  color: #d97706;
  border-color: #fcd34d;
}
.status-approved {
  background-color: #f0f9ff;
  color: #0284c7;
  border-color: #bae6fd;
}
.status-returned {
  background-color: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}
.status-running {
  background-color: #faf5ff;
  color: #7c3aed;
  border: 1.5px dashed #c084fc;
}
.status-finished {
  background-color: #f0fdf4;
  color: #16a34a;
  border-color: #bbf7d0;
}
.status-cancelled {
  background-color: #f8fafc;
  color: #64748b;
  border-color: #cbd5e1;
}

.status-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23475569'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
}

.status-select.status-pending {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23d97706'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
}
.status-select.status-approved {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%230284c7'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
}
.status-select.status-returned {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23dc2626'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
}
.status-select.status-running {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%237c3aed'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
}
.status-select.status-finished {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2316a34a'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
}
.status-select.status-cancelled {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
}

.status-select:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(23, 107, 135, 0.2);
}

/* ==================== 看板卡片网格与细节样式 ==================== */
.card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
  margin-top: 12px;
}

.grid-item {
  display: flex;
  align-items: center;
  font-size: 13px;
  line-height: 1.4;
}

.grid-item.full-width {
  grid-column: span 2;
}

.grid-icon {
  margin-right: 6px;
  font-size: 14px;
  flex-shrink: 0;
}

.grid-label {
  color: var(--muted);
  font-weight: 500;
  margin-right: 2px;
  flex-shrink: 0;
}

.grid-val {
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.grid-item.full-width .grid-val {
  white-space: normal;
  word-break: break-all;
}



/* 详情折叠/软包块 */
.card-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
  border-top: 1px dashed rgba(0, 0, 0, 0.08);
  padding-top: 12px;
}

.detail-block {
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.03);
  border-radius: 8px;
  padding: 10px 12px;
}

.detail-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}

.detail-content {
  font-size: 12px;
  color: #334155;
  line-height: 1.5;
  word-break: break-all;
}

/* ==================== 批量操作栏与多选行样式 (Batch Actions & Selectable Rows) ==================== */
.batch-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: rgba(254, 243, 199, 0.85); /* 柔和温暖的琥珀金色背景，契合警告/确认色 */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(251, 191, 36, 0.4);
  border-radius: 10px;
  margin-bottom: 16px;
  box-shadow: 0 10px 25px -5px rgba(217, 119, 6, 0.1), 0 8px 10px -6px rgba(217, 119, 6, 0.05);
  animation: batchBarSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes batchBarSlideIn {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.batch-actions-bar .selected-info {
  font-weight: 700;
  color: #92400e;
  font-size: 14px;
}

.batch-actions-bar .selected-info #selectedCount {
  font-size: 18px;
  color: #d97706;
  margin: 0 4px;
  text-shadow: 0 1px 2px rgba(217, 119, 6, 0.1);
}

.batch-actions-bar button {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.batch-actions-bar button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(138, 28, 28, 0.15);
}

.batch-actions-bar button:active {
  transform: translateY(0);
}

/* 选中行背景高亮与复选框垂直居中 */
tr.row-selected {
  background-color: #f1f5f9 !important; /* 优雅的灰蓝高亮色 */
}

tr.row-selected td {
  border-bottom-color: #cbd5e1;
}

.plan-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--brand); /* 统一的主题色 */
  transition: transform 0.15s ease;
  vertical-align: middle;
}

.plan-checkbox:hover {
  transform: scale(1.1);
}

#selectAllPlans {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--brand);
  vertical-align: middle;
}

#plansTable tr {
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#plansTable tr:hover {
  background-color: rgba(15, 107, 135, 0.05) !important;
}

tr.row-selected:hover {
  background-color: #e2e8f0 !important;
}
