/* ==========================================
   物流计划部温湿度记录系统 - 全局样式
   ========================================== */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #07C160;
  --primary-dark: #06AD56;
  --success: #07C160;
  --danger: #FA5151;
  --warning: #FFC300;
  --bg: #F5F5F5;
  --card-bg: #FFFFFF;
  --text: #333333;
  --text-secondary: #888888;
  --border: #E5E5E5;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ==================== 容器 ==================== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
}

/* 录入页面容器 */
.entry-page {
  background: linear-gradient(135deg, #07C160 0%, #06AD56 100%);
  min-height: 100vh;
}

.entry-container {
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  padding: 24px 18px;
  margin: 12px;
}

/* ==================== 头部 ==================== */
.header {
  text-align: center;
  padding: 30px 0 20px;
}

.header h1 {
  font-size: 28px;
  color: var(--text);
  margin-bottom: 6px;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 14px;
}

/* 录入页头部 */
.entry-header {
  text-align: center;
  margin-bottom: 24px;
}

.entry-icon {
  font-size: 48px;
  margin-bottom: 8px;
}

.entry-header h1 {
  font-size: 22px;
  color: var(--text);
}

.entry-subtitle {
  color: var(--text-secondary);
  font-size: 13px;
  margin-top: 4px;
}

/* ==================== 公网地址状态栏 ==================== */
.public-url-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff3f3;
  border: 1px solid #ffcccc;
  border-radius: var(--radius);
  padding: 10px 16px;
  margin-bottom: 16px;
  font-size: 13px;
  flex-wrap: wrap;
}

.public-url-bar.online {
  background: #f0faf4;
  border-color: #c8e6d0;
}

.public-url-bar .pub-label {
  font-weight: 600;
  color: #666;
  white-space: nowrap;
}

.public-url-bar .pub-value {
  flex: 1;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  word-break: break-all;
  font-weight: 600;
}

.public-url-bar .btn-sm {
  padding: 4px 12px;
  font-size: 12px;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.public-url-bar .btn-sm:hover {
  background: var(--primary-dark);
}

.public-url-bar .btn-sm.btn-outline {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
}

.public-url-bar .btn-sm.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

/* ==================== 标签页 ==================== */
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 4px;
  box-shadow: var(--shadow);
}

.tab-btn {
  flex: 1;
  padding: 12px 16px;
  border: none;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-secondary);
  transition: all 0.3s;
  font-weight: 500;
}

.tab-btn.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(7,193,96,0.3);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* ==================== 二维码区域 ==================== */
.qr-section {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.qr-card {
  flex: 0 0 320px;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  text-align: center;
}

.qr-card h2 {
  font-size: 18px;
  margin-bottom: 6px;
}

.qr-hint {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.qr-wrapper {
  position: relative;
  width: 240px;
  height: 240px;
  margin: 0 auto 16px;
  border: 2px dashed var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.qr-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qr-loading {
  color: var(--text-secondary);
  font-size: 14px;
}

.qr-url {
  font-size: 12px;
  color: var(--primary);
  word-break: break-all;
  margin-bottom: 12px;
  white-space: pre-line;
  line-height: 1.8;
}

.qr-instruction {
  flex: 1;
  min-width: 280px;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.qr-instruction h3 {
  font-size: 16px;
  margin-bottom: 10px;
  color: var(--text);
}

.qr-instruction ol {
  padding-left: 20px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 2;
}

.warehouse-list {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.tag-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.tag {
  display: inline-block;
  padding: 4px 14px;
  background: #E8F8EF;
  color: var(--primary);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}

/* ==================== 筛选栏 ==================== */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  background: var(--card-bg);
  padding: 16px 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-group label {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.filter-group select,
.filter-group input[type="date"] {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.3s;
}

.filter-group select:focus,
.filter-group input[type="date"]:focus {
  border-color: var(--primary);
}

.records-summary {
  text-align: center;
  padding: 8px;
  color: var(--text-secondary);
  font-size: 13px;
}

/* ==================== 表格 ==================== */
.table-wrapper {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table thead {
  background: #FAFAFA;
}

.data-table th {
  padding: 14px 12px;
  text-align: left;
  font-weight: 600;
  color: var(--text);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 12px;
  border-bottom: 1px solid #F0F0F0;
  color: var(--text);
}

.data-table tbody tr:hover {
  background: #F9FFF9;
}

.empty-cell {
  text-align: center;
  color: var(--text-secondary);
  padding: 40px !important;
}

.temp-high { color: #FA5151; font-weight: 600; }
.temp-normal { color: #333; }
.temp-low { color: #10AEFF; font-weight: 600; }

/* 超范围告警行 */
.row-alert {
  background: #FFF5F5 !important;
}
.row-alert:hover {
  background: #FFECEC !important;
}
.temp-out {
  color: #FA5151;
  font-weight: 700;
  background: #FFE8E8;
  border-radius: 4px;
  padding: 2px 6px;
}
.hum-out {
  color: #FA5151;
  font-weight: 700;
  background: #FFE8E8;
  border-radius: 4px;
  padding: 2px 6px;
}

/* 录入页成功提示 - 异常标记 */
.success-warning {
  background: #FFF8E1;
  border: 2px solid #FFC300;
  border-radius: 8px;
  padding: 10px 14px;
  margin: 12px 0;
  font-size: 13px;
  color: #F57F17;
  font-weight: 600;
  text-align: center;
  animation: shake 0.5s ease;
}

/* 报警框 - 超范围但可提交的样式 */
.alarm-box.warning-mode {
  background: #FFF8E1;
  border-color: #FFC300;
}
.alarm-box.warning-mode .alarm-text {
  color: #F57F17;
}

/* ==================== 按钮 ==================== */
.btn {
  display: inline-block;
  padding: 10px 24px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s;
  text-align: center;
  text-decoration: none;
}

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

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

.btn-success {
  background: var(--success);
  color: #fff;
  font-size: 16px;
  padding: 14px 24px;
}

.btn-outline {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-login {
  display: block;
  width: 100%;
  margin-top: 10px;
  font-size: 16px;
  padding: 12px 24px;
  background: var(--primary);
  color: #fff;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  transition: background 0.2s;
}

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

/* ========== 当前登录人信息栏 ========== */
.current-user-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #f0f7ff;
  border: 1px solid #d0e3ff;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 14px;
}

.user-label {
  color: #666;
  font-weight: 500;
}

.user-name {
  font-weight: 700;
  color: var(--primary);
  font-size: 15px;
}

.role-badge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 6px;
  font-weight: 500;
  vertical-align: middle;
}

.role-admin {
  background: #ffeaa7;
  color: #d63031;
  border: 1px solid #fdcb6e;
}

.role-manager {
  background: #dfe6e9;
  color: #2d3436;
  border: 1px solid #b2bec3;
}

.role-staff {
  background: #e8f5e9;
  color: #388e3c;
  border: 1px solid #c8e6c9;
}

/* ========== 星级装饰 ========== */
.star-deco {
  display: inline-block;
  margin-left: 4px;
  vertical-align: middle;
  letter-spacing: 2px;
}

/* 超级管理员暗紫色 3 星 */
.star-superadmin {
  color: #6a0dad;
  font-size: 18px;
  text-shadow: 0 1px 3px rgba(106,13,173,0.5);
}

/* 管理员金色 2 星 */
.star-admin {
  color: #ffd700;
  font-size: 18px;
  text-shadow: 0 1px 3px rgba(255,215,0,0.4);
}

/* 班组负责人橙色 1 星 */
.star-manager {
  color: #ff9800;
  font-size: 16px;
  text-shadow: 0 1px 3px rgba(255,152,0,0.3);
}

/* 超级管理员身份标签 */
.role-superadmin {
  background: linear-gradient(135deg, #6a0dad, #9b30ff);
  color: #fff;
}

.btn-switch {
  margin-left: auto;
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 4px 12px;
  font-size: 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

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

.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

.btn-danger {
  background: #fff;
  color: var(--danger);
  border: 1px solid var(--danger);
  padding: 4px 12px;
  font-size: 12px;
  border-radius: 6px;
}

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

/* 修改按钮样式 */
.btn-edit {
  background: #fff;
  color: #1989fa;
  border: 1px solid #1989fa;
  padding: 4px 12px;
  font-size: 12px;
  border-radius: 6px;
  cursor: pointer;
}
.btn-edit:hover { background: #1989fa; color: #fff; }

/* 表格内按钮间距 */
.btn-sm { cursor: pointer; }

.btn-block {
  display: block;
  width: 100%;
}

/* ==================== 录入页表单 ==================== */
.entry-step {
  animation: fadeIn 0.4s ease;
}

.entry-step.hidden {
  display: none;
}

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

.step-badge {
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 12px;
}

.entry-step h2 {
  font-size: 18px;
  margin-bottom: 4px;
}

.step-hint {
  color: var(--text-secondary);
  font-size: 12px;
  margin-bottom: 16px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text);
}

.required {
  color: var(--danger);
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.3s;
  background: #FAFAFA;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(7,193,96,0.1);
}

.form-group small {
  display: block;
  color: var(--text-secondary);
  font-size: 11px;
  margin-top: 4px;
}

.select-warehouse {
  font-size: 16px !important;
  padding: 14px !important;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-half {
  flex: 1;
}

/* 身份卡片 */
.identity-card {
  background: #F5FFF5;
  border: 1px solid #D5F0DD;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.identity-item {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 13px;
}

.identity-label {
  color: var(--text-secondary);
}

.identity-value {
  font-weight: 600;
}

/* 日期显示 */
.date-display {
  background: linear-gradient(135deg, #07C160, #06AD56);
  color: #fff;
  border-radius: 12px;
  padding: 16px 20px;
  text-align: center;
  margin-bottom: 20px;
}

.date-big {
  font-size: 22px;
  font-weight: 700;
}

.weekday-big {
  font-size: 16px;
  margin-top: 2px;
  opacity: 0.9;
}

/* 登录备注 */
.login-note {
  text-align: left;
  margin-top: 10px;
  color: var(--text-secondary);
  font-size: 12px;
}

/* 分隔文字 */
.divider-text {
  display: flex;
  align-items: center;
  margin: 16px 0;
  color: #B0B0B0;
  font-size: 13px;
}
.divider-text::before,
.divider-text::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #E0E0E0;
}
.divider-text span {
  padding: 0 14px;
}

/* 查看统计按钮 */
.btn-stats {
  background: #576B95;
  color: #fff;
}
.btn-stats:hover {
  background: #4A5D85;
}

/* 验证码区域 */
.verify-section {
  margin: 12px 0;
}

.verify-hint {
  display: block;
  margin-top: 4px;
  color: #e17055;
  font-size: 12px;
  font-weight: 500;
}

/* 验证码输入框：用CSS类控制禁用外观，避免disabled属性导致的浏览器差异 */
/* 使用 .form-group .verify-input-disabled 提高优先级覆盖 .form-group input */
.form-group .verify-input-disabled {
  background: #f0f0f0;
  color: #aaa;
  border-color: #ddd;
  cursor: not-allowed;
  -webkit-text-fill-color: #aaa;
}

/* 验证码输入框 + 眼睛图标容器 */
.verify-input-wrap {
  position: relative;
  display: block;
}

.verify-input-wrap input {
  padding-right: 44px !important;  /* 给眼睛图标留空间 */
}

.verify-eye {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  user-select: none;
  border-radius: 6px;
  transition: background 0.2s;
  z-index: 2;
}

.verify-eye:hover {
  background: rgba(0,0,0,0.06);
}

.verify-eye:active {
  background: rgba(0,0,0,0.12);
}

.no-verify-tip {
  padding: 10px 14px;
  background: #f0fff4;
  border: 1px solid #c6f6d5;
  border-radius: 8px;
  color: #276749;
  font-size: 13px;
  text-align: center;
}

/* 成功页面 */
.success-icon {
  font-size: 56px;
  text-align: center;
  margin-bottom: 12px;
}

.success-detail {
  background: #F5FFF5;
  border-radius: 10px;
  padding: 14px 18px;
  margin: 16px 0;
}

.success-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 14px;
}

.success-row span {
  color: var(--text-secondary);
}

/* ==================== 统计分析 ==================== */
.stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary);
}

.stat-card h3 {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 13px;
}

.stat-row span:first-child {
  color: var(--text-secondary);
}

.stat-row span:last-child {
  font-weight: 600;
}

/* ==================== Toast ==================== */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  padding: 12px 28px;
  border-radius: 24px;
  font-size: 14px;
  color: #fff;
  z-index: 9999;
  transition: transform 0.3s;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-info { background: #10AEFF; }

/* ==================== 范围提示与报警 ==================== */
.range-info {
  background: #FFF8E1;
  border: 1px solid #FFE082;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  color: #F57F17;
  margin-top: 8px;
}

.range-info.hidden {
  display: none;
}

.form-group input.input-alarm,
.form-group input.input-alarm:focus {
  border-color: #FA5151;
  background: #FFF5F5;
  box-shadow: 0 0 0 3px rgba(250,81,81,0.15);
  color: #FA5151;
  font-weight: 600;
}

.alarm-box {
  background: #FFF5F5;
  border: 2px solid #FA5151;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
  animation: shake 0.5s ease;
}

.alarm-box.hidden {
  display: none;
}

.alarm-icon {
  font-size: 20px;
  margin-bottom: 4px;
}

.alarm-text {
  font-size: 13px;
  color: #FA5151;
  font-weight: 600;
  line-height: 1.8;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  50% { transform: translateX(6px); }
  75% { transform: translateX(-4px); }
}

/* ==================== 图表页面 ==================== */
.stats-page {
  background: var(--bg);
  min-height: 100vh;
}

.stats-header {
  background: linear-gradient(135deg, #07C160, #06AD56);
  color: #fff;
  padding: 20px 24px;
  text-align: center;
}

.stats-header h1 {
  font-size: 22px;
  margin-bottom: 4px;
}

.stats-header .stats-subtitle {
  font-size: 13px;
  opacity: 0.85;
}

.stats-controls {
  background: var(--card-bg);
  padding: 16px 20px;
  margin: 16px auto;
  max-width: 900px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.stats-controls .form-group {
  margin-bottom: 0;
}

.stats-controls select,
.stats-controls input[type="date"] {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  min-width: 160px;
}

.stats-controls select:focus,
.stats-controls input[type="date"]:focus {
  border-color: var(--primary);
}

.range-hint {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 4px 0 0 0;
}

.charts-container {
  max-width: 900px;
  margin: 0 auto 30px;
  padding: 0 16px;
}

.chart-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 20px;
}

.chart-card h2 {
  font-size: 17px;
  margin-bottom: 16px;
  color: var(--text);
  border-left: 4px solid var(--primary);
  padding-left: 12px;
}

.chart-wrapper {
  position: relative;
  width: 100%;
  height: 380px;
}

.chart-wrapper canvas {
  width: 100% !important;
  height: 100% !important;
}

.chart-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
  font-size: 15px;
}

.chart-empty .empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.back-link {
  display: inline-block;
  padding: 10px 20px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

.back-link:hover {
  text-decoration: underline;
}

/* ==================== 响应式 ==================== */
@media (max-width: 768px) {
  .qr-section { flex-direction: column; }
  .qr-card { flex: none; width: 100%; }
  .container { padding: 12px; }
  .header h1 { font-size: 22px; }
  .form-row { flex-direction: column; gap: 0; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .data-table { font-size: 12px; }
  .data-table th, .data-table td { padding: 8px 6px; }

  /* 手机端录入页优化 */
  .entry-container { margin: 8px; padding: 18px 14px; border-radius: 12px; }
  .entry-header { margin-bottom: 16px; padding-bottom: 10px; }
  .entry-header h1 { font-size: 20px; }
  .entry-icon { font-size: 36px; }
  .entry-subtitle { font-size: 13px; }
  .step-badge { width: 28px; height: 28px; font-size: 14px; }
  .entry-step h2 { font-size: 17px; margin-bottom: 6px; }
  .step-hint { margin-bottom: 14px; }
  .form-group { margin-bottom: 12px; }
  .form-group label { font-size: 13px; }
  .form-group input, .form-group select { font-size: 15px; padding: 9px 10px; }
  .identity-card { padding: 10px 12px; gap: 4px; }
  .date-display { padding: 8px 0; margin-bottom: 12px; }
  .btn-block { padding: 11px 0; font-size: 15px; }
  .login-note { margin-top: 10px; }
  .divider-text { margin: 12px 0; }
}

/* 微信内置浏览器额外优化 */
@media (max-width: 480px) and (max-height: 800px) {
  .entry-container { margin: 4px; padding: 14px 12px; }
  .entry-header { margin-bottom: 12px; }
  .entry-icon { display: none; }  /* 小屏隐藏大图标节省空间 */
  .entry-step { margin-bottom: 0; }
}

/* 弹窗通用样式（扫码记录等） */
.modal-overlay {
  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: 10000;
}
.modal-content {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  width: 90%;
  max-width: 900px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid #eee; padding-bottom: 12px; margin-bottom: 16px;
}
.modal-header h3 { margin: 0; font-size: 18px; }
.modal-close {
  background: none; border: none; font-size: 24px;
  cursor: pointer; color: #999; line-height: 1;
}
.modal-close:hover { color: #333; }

/* 按钮颜色：警告色（扫码记录） */
.btn-warning {
  background: #f59e0b !important;
  color: #fff !important;
  border-color: #f59e0b !important;
}
.btn-warning:hover {
  background: #d97706 !important;
}

/* ========== 备注列样式 ========== */
.note-cell {
  cursor: pointer;
  transition: background 0.2s;
  min-width: 100px;
  max-width: 160px;
  font-size: 13px;
  padding: 6px 8px;
  word-break: break-all;
}
.note-cell:hover {
  background: #f0fff4;
}

.note-edit-input {
  font-size: 13px;
  outline: none;
}
.note-edit-input:focus {
  border-color: #07c160;
  box-shadow: 0 0 0 2px rgba(7,193,96,0.2);
}

/* ========== 农历/节假日信息 ========== */
.lunar-info {
  font-size: 13px;
  color: #666;
  margin-top: 4px;
  padding: 4px 8px;
  background: #f8f8f8;
  border-radius: 6px;
  line-height: 1.6;
}
.lunar-info span {
  color: #FA5151;
  font-weight: 700;
}

/* ========== 自定义日历 ========== */
.datepicker-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
  background: #fff;
  cursor: pointer;
  box-sizing: border-box;
  color: #333;
}
.datepicker-input:focus {
  outline: none;
  border-color: #07c160;
  box-shadow: 0 0 0 2px rgba(7,193,96,0.15);
}
.datepicker-input::placeholder {
  color: #bbb;
}

/* 日历遮罩 */
.calendar-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.4);
  z-index: 10000;
  align-items: center;
  justify-content: center;
}

/* 日历面板 */
.calendar-panel {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.2);
  padding: 16px 14px 14px;
  width: 340px;
  max-width: 94vw;
  user-select: none;
}

/* 导航栏 */
.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0 4px;
}
.cal-nav-btn {
  width: 36px; height: 36px;
  border: none;
  background: #f5f5f5;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.cal-nav-btn:hover {
  background: #e8e8e8;
}
.cal-nav-title {
  font-size: 18px;
  font-weight: 700;
  color: #333;
}

/* 星期头 */
.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  margin-bottom: 4px;
}
.cal-wd {
  font-size: 13px;
  color: #888;
  padding: 6px 0;
  font-weight: 600;
}
.cal-wd-weekend {
  color: #FA5151;
}

/* 日期格子网格 */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

/* 日期单元格 */
.cal-cell {
  position: relative;
  text-align: center;
  padding: 4px 2px 6px;
  cursor: pointer;
  border-radius: 8px;
  min-height: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  transition: background 0.15s;
}
.cal-cell:hover {
  background: #f0faf5;
}

/* 非本月日期 */
.cal-cell-other {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

/* 今日 */
.cal-today {
  background: #e8f8ef;
}
.cal-today .cal-solar {
  color: #07c160;
  font-weight: 800;
}

/* 周末红字 */
.cal-weekend .cal-solar {
  color: #FA5151;
  font-weight: 600;
}

/* 节假日红底 */
.cal-holiday {
  background: #fff0f0;
  border: 1px solid #ffcccc;
}
.cal-holiday .cal-solar {
  color: #FA5151;
  font-weight: 700;
}

/* 阳历数字 */
.cal-solar {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 2px;
}

/* "休"标签 */
.cal-holiday-label {
  display: inline-block;
  font-size: 10px;
  background: #FA5151;
  color: #fff;
  padding: 0 3px;
  border-radius: 3px;
  line-height: 1.5;
  vertical-align: middle;
  font-weight: 600;
}

/* 农历小字 */
.cal-lunar {
  font-size: 11px;
  color: #999;
  line-height: 1.3;
  margin-top: 1px;
}

/* 节气标注 */
.cal-term {
  font-size: 10px;
  color: #07c160;
  font-weight: 600;
  line-height: 1.3;
  margin-top: 1px;
}

/* ========== 回收站按钮 ========== */
.btn-recycle {
  background: #fa5151 !important;
  color: #fff !important;
  border: none !important;
  margin-left: 12px;
  font-size: 13px;
  padding: 4px 14px !important;
  border-radius: 4px;
  vertical-align: middle;
}
.btn-recycle:hover {
  background: #e04848 !important;
}

/* ========== 回收站弹窗 ========== */
.recycle-modal {
  max-width: 1100px !important;
  width: 95% !important;
}
.recycle-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.recycle-table th {
  background: #f8f8f8;
  padding: 8px 6px;
  border-bottom: 2px solid #e0e0e0;
  font-weight: 600;
  white-space: nowrap;
}
.recycle-table td {
  padding: 7px 6px;
  border-bottom: 1px solid #f0f0f0;
  text-align: center;
}
.recycle-table tr:hover td {
  background: #fff8f0;
}
.btn-restore {
  background: #07c160 !important;
  color: #fff !important;
  border: none !important;
  padding: 3px 12px !important;
  font-size: 12px;
  border-radius: 3px;
  cursor: pointer;
}
.btn-restore:hover {
  background: #06ad56 !important;
}
.btn-restore:disabled {
  background: #ccc !important;
  cursor: not-allowed;
}

/* ==================== 实时天气栏 ==================== */
.weather-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 20px;
  margin: 0 0 16px 0;
  background: linear-gradient(135deg, #e8f5e9 0%, #e3f2fd 100%);
  border-radius: var(--radius);
  border: 1px solid #c8e6c9;
  font-size: 14px;
  flex-wrap: wrap;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

/* 日期时间区块 */
.weather-datetime {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-width: 160px;
}

.weather-date {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.weather-lunar {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.weather-clock {
  font-size: 22px;
  font-weight: 700;
  color: #e65100;
  font-variant-numeric: tabular-nums;
  font-family: 'Courier New', 'Consolas', monospace;
  letter-spacing: 1px;
}

.weather-divider {
  color: #ccc;
  font-size: 18px;
  font-weight: 100;
  margin: 0 4px;
}

/* 录入页天气栏适配 */
.weather-bar-entry {
  margin: 0 0 16px 0;
  padding: 8px 12px;
  font-size: 13px;
  gap: 8px;
  background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
  border-color: #ffe082;
  border-radius: 10px;
}

/* 统计页天气栏适配 */
.weather-bar-stats {
  max-width: 700px;
  margin: 0 auto 16px auto;
}

.weather-icon {
  font-size: 32px;
  line-height: 1;
  animation: weatherPulse 2s ease-in-out infinite;
}

.weather-bar-entry .weather-icon {
  font-size: 26px;
}

@keyframes weatherPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.weather-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-start;
}

.weather-location {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

.weather-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.weather-temp {
  font-size: 22px;
  font-weight: 700;
  color: #e65100;
  line-height: 1;
}

.weather-bar-entry .weather-temp {
  font-size: 18px;
}

.weather-desc {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}

.weather-detail {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.weather-item {
  white-space: nowrap;
  color: var(--text-secondary);
  font-size: 13px;
}

.weather-item span {
  color: var(--text);
  font-weight: 600;
}

.weather-update {
  font-size: 11px;
  color: #aaa;
  white-space: nowrap;
}

.weather-bar-entry .weather-date {
  font-size: 12px;
}
.weather-bar-entry .weather-lunar {
  font-size: 11px;
}
.weather-bar-entry .weather-clock {
  font-size: 18px;
}
.weather-bar-entry .weather-divider {
  margin: 0 2px;
}

@media (max-width: 600px) {
  .weather-bar {
    gap: 8px;
    padding: 8px 12px;
  }
  .weather-temp {
    font-size: 18px;
  }
  .weather-detail {
    gap: 10px;
  }
  .weather-icon {
    font-size: 26px;
  }
  .weather-datetime {
    min-width: auto;
  }
  .weather-date {
    font-size: 12px;
  }
  .weather-clock {
    font-size: 18px;
  }
  .weather-divider {
    display: none;
  }
}
