/* ========================================
   计量工具箱 - 网站版 全局样式
   转自小程序 app.wxss + 通用工具样式
   换算基准：750rpx = 375px（1rpx = 0.5px）
   ======================================== */
:root {
  --primary: #07c160;
  --primary-dark: #06ad56;
  --primary-deep: #059669;
  --danger: #e74c3c;
  --warning: #ffc107;
  --text-main: #1f2937;
  --text-sub: #6b7280;
  --text-light: #9ca3af;
  --text-faint: #d1d5db;
  --bg-page: #f5f5f5;
  --card-bg: #ffffff;
  --border-light: #f0f0f0;
  --radius-sm: 8rpx;
  --radius-md: 12rpx;
  --radius-lg: 16rpx;
  --radius-xl: 22rpx;
  --shadow-card: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 4rpx 16rpx rgba(7, 193, 96, 0.08);
}

/* rpx 处理：用 CSS 变量做基准，1rpx = 0.5px（375px 基准） */
html {
  font-size: 0.5px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

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

/* 页面容器：限宽居中，桌面端还原移动端观感 */
.page {
  background: transparent;
  min-height: 100vh;
  padding-bottom: 120rpx;
  overflow: visible;
  max-width: 750px;
  margin: 0 auto;
}

/* ===== 通用容器 ===== */
.container {
  padding: 20rpx;
  min-height: 100vh;
  box-sizing: border-box;
}

/* ===== 卡片 ===== */
.card {
  background: #fff;
  border-radius: 16rpx;
  padding: 30rpx;
  margin-bottom: 20rpx;
  box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
  box-sizing: border-box;
}

/* ===== 按钮 ===== */
.btn-primary {
  background: #07c160;
  color: #fff;
  border: none;
  border-radius: 12rpx;
  font-size: 30rpx;
  font-weight: bold;
  height: 88rpx;
  line-height: 88rpx;
  text-align: center;
  cursor: pointer;
  display: block;
  width: 100%;
  transition: background 0.2s;
}

.btn-primary:hover { background: #06ad56; }

.btn-outline {
  background: #fff;
  color: #07c160;
  border: 2rpx solid #07c160;
  border-radius: 12rpx;
  font-size: 30rpx;
  font-weight: bold;
  height: 88rpx;
  line-height: 84rpx;
  text-align: center;
  cursor: pointer;
  display: block;
  width: 100%;
}

/* ===== 输入框 ===== */
.input-box {
  padding: 15rpx 20rpx;
  background: #fff;
  border: 2rpx solid #e0e0e0;
  border-radius: 8rpx;
  font-size: 28rpx;
  box-sizing: border-box;
  width: 100%;
}

.input-box:focus {
  border-color: #07c160;
  outline: none;
}

input, select, textarea {
  font-family: inherit;
}

/* ===== 标题 ===== */
.title {
  font-size: 32rpx;
  font-weight: bold;
  color: #333;
  margin-bottom: 20rpx;
}

/* ===== 提示 ===== */
.tip-text {
  margin-top: 15rpx;
  padding: 15rpx;
  background: #fff8e1;
  border-left: 6rpx solid #ffc107;
  font-size: 24rpx;
  color: #856404;
  border-radius: 4rpx;
  line-height: 1.6;
}

/* ===== 工具类 ===== */
.text-center { text-align: center; }
.text-bold { font-weight: bold; }
.text-primary { color: #07c160; }
.text-danger { color: #e74c3c; }
.mt-20 { margin-top: 20rpx; }
.mb-20 { margin-bottom: 20rpx; }
.hide { display: none !important; }

/* ===== Toast ===== */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 20rpx 32rpx;
  border-radius: 12rpx;
  font-size: 28rpx;
  max-width: 80%;
  text-align: center;
  z-index: 99999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}

.toast.show { opacity: 1; }

/* ===== Loading ===== */
.loading-mask {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99990;
}

.loading-mask .spinner {
  width: 60rpx;
  height: 60rpx;
  border: 6rpx solid #e5e7eb;
  border-top-color: #07c160;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ===== 返回按钮 ===== */
.back-bar {
  display: flex;
  align-items: center;
  padding: 20rpx 24rpx;
  background: #fff;
  border-bottom: 1rpx solid var(--border-light);
}

.back-btn {
  display: inline-flex;
  align-items: center;
  font-size: 30rpx;
  color: #07c160;
  cursor: pointer;
  background: none;
  border: none;
  font-weight: 500;
}

.back-btn:hover { opacity: 0.7; }

.back-bar-title {
  font-size: 30rpx;
  font-weight: 600;
  color: #1f2937;
  margin-left: 20rpx;
}

/* ===== 底部导航 ===== */
.btm {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  display: flex;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-top: 1rpx solid #e5e7eb;
  padding: 8rpx 0 8rpx;
  z-index: 999;
  max-width: 750px;
  margin: 0 auto;
}

.btm-i {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4rpx 0;
  cursor: pointer;
  background: none;
  border: none;
}

.btm-i:hover { opacity: 0.8; }

.btm-ic { font-size: 34rpx; line-height: 1; margin-bottom: 2rpx; opacity: 0.3; }
.btm-ic-a { opacity: 1; }

.btm-t { font-size: 18rpx; color: #bbb; font-weight: 500; }
.btm-t-a { color: #07c160; font-weight: 600; }
