/* 同店价签数字工单传递系统 - 公共样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #1D4ED8;
  --success: #52c41a;
  --warning: #faad14;
  --danger: #ff4d4f;
  --bg: #f0f2f5;
  --card: #ffffff;
  --text: #333;
  --text-light: #666;
  --border: #e8e8e8;
  --radius: 8px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}

/* 登录页 */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
}
.login-box {
  background: #fff;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  width: 380px;
}
.login-box h1 {
  text-align: center;
  margin-bottom: 8px;
  font-size: 22px;
  color: #333;
}
.login-box .subtitle {
  text-align: center;
  color: #999;
  margin-bottom: 30px;
  font-size: 13px;
}
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: #555;
}
.form-group input, .form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus {
  border-color: var(--primary);
}
.btn {
  display: inline-block;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: #40a9ff; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #73d13d; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-default { background: #fff; color: #555; border: 1px solid #ddd; }
.btn-default:hover { border-color: var(--primary); color: var(--primary); }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 24px; font-size: 16px; }

.role-tabs {
  display: flex;
  margin-bottom: 24px;
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
}
.role-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  cursor: pointer;
  background: #fafafa;
  font-size: 14px;
  transition: all 0.2s;
}
.role-tab.active {
  background: var(--primary);
  color: #fff;
}

/* 顶部导航 */
.header {
  background: #fff;
  padding: 12px 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header .logo {
  font-size: 18px;
  font-weight: 600;
  color: var(--primary);
}
.header .user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header .user-info span { color: #666; }

/* 主内容区 */
.main-content {
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

/* 卡片 */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* 统计卡片 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.stat-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.stat-card .num {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 6px;
}
.stat-card .label { color: #999; font-size: 13px; }
.stat-card.pending .num { color: var(--warning); }
.stat-card.processing .num { color: var(--primary); }
.stat-card.ready .num { color: var(--success); }
.stat-card.picked .num { color: #999; }

/* 工单列表 */
.order-list { display: flex; flex-direction: column; gap: 12px; }
.order-item {
  background: #fff;
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  border-left: 4px solid #ddd;
}
.order-item.pending { border-left-color: var(--warning); }
.order-item.processing { border-left-color: var(--primary); }
.order-item.ready { border-left-color: var(--success); }
.order-item.picked { border-left-color: #bbb; }
.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.order-no { font-weight: 600; font-size: 15px; }
.order-status {
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}
.status-draft { background: #f9f0ff; color: #722ed1; }
.status-pending { background: #fff7e6; color: #fa8c16; }
.status-processing { background: #e6f7ff; color: #1D4ED8; }
.status-ready { background: #f6ffed; color: #52c41a; }
.status-picked { background: #f5f5f5; color: #999; }
.order-meta {
  display: flex;
  gap: 16px;
  color: #888;
  font-size: 13px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.order-barcodes {
  background: #fafafa;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 13px;
  color: #555;
  margin-bottom: 10px;
}
.order-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* 标签页 */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  background: #fff;
  padding: 4px;
  border-radius: 8px;
}
.tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  cursor: pointer;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.2s;
  color: #666;
}
.tab.active {
  background: var(--primary);
  color: #fff;
}
.tab .badge {
  display: inline-block;
  background: var(--danger);
  color: #fff;
  border-radius: 10px;
  padding: 0 6px;
  font-size: 11px;
  margin-left: 4px;
}

/* 弹窗 */
.modal-mask {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
}
.modal-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
}
.modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

/* Toast 提示 */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.8);
  color: #fff;
  padding: 10px 24px;
  border-radius: 6px;
  z-index: 2000;
  font-size: 14px;
  animation: fadeInDown 0.3s;
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translate(-50%, -20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* 右下角弹窗提醒（信息员端） */
.notification-popup {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  padding: 16px 20px;
  width: 320px;
  z-index: 1500;
  border-left: 4px solid var(--danger);
  animation: slideInRight 0.3s;
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(100%); }
  to { opacity: 1; transform: translateX(0); }
}
.notification-popup .title {
  font-weight: 600;
  color: var(--danger);
  margin-bottom: 6px;
}
.notification-popup .content {
  color: #666;
  font-size: 13px;
  margin-bottom: 10px;
}
.notification-popup .actions {
  display: flex;
  gap: 8px;
}

/* 表格 */
table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
th {
  background: #fafafa;
  font-weight: 600;
  color: #555;
}
tr:hover { background: #f9f9f9; }

/* 空状态 */
.empty {
  text-align: center;
  padding: 40px;
  color: #999;
}

/* 适老化：大字体模式 */
.elder-mode {
  font-size: 16px;
}
.elder-mode .btn { padding: 14px 20px; font-size: 16px; }
.elder-mode .form-group input { padding: 14px; font-size: 16px; }

/* 底部备案信息 */
.site-footer {
  text-align: center;
  padding: 20px 16px;
  color: #999;
  font-size: 12px;
  line-height: 1.8;
  margin-top: 20px;
}
.site-footer a {
  color: #999;
  text-decoration: none;
}
.site-footer a:hover {
  color: #1D4ED8;
}
.footer-nonprofit {
  margin-bottom: 10px;
  color: #fa8c16;
  font-size: 12px;
  background: #fff7e6;
  padding: 8px 16px;
  border-radius: 4px;
  display: inline-block;
}
.footer-links {
  margin-bottom: 6px;
}
.footer-divider {
  margin: 0 8px;
  color: #ddd;
}
.footer-icp, .footer-police {
  margin-bottom: 4px;
}
.footer-police .police-icon {
  margin-right: 4px;
}
.footer-copyright {
  margin-top: 6px;
  color: #bbb;
}


/* ==================== 样式化确认弹窗（垂直居中） ==================== */
.confirm-mask {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
.confirm-box {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.18);
}
.confirm-msg {
  font-size: 15px;
  color: #1F2937;
  line-height: 1.6;
  white-space: pre-line;
  word-break: break-all;
}
.confirm-btns {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}
