/* app.wxss - 全局样式 */

body {
  --color-primary: #007AFF;
  --color-primary-light: #E8F2FF;
  --color-primary-dark: #0056B3;
  --color-success: #34C759;
  --color-success-light: #EAF9EE;
  --color-warning: #FF9500;
  --color-warning-light: #FFF5E6;
  --color-danger: #FF3B30;
  --color-danger-light: #FFECEB;
  --color-text: #1C1C1E;
  --color-text-secondary: #8E8E93;
  --color-bg: #F5F6FA;
  --color-card: #FFFFFF;
  --color-border: #E5E5EA;
  --shadow-card: 0 0.04rem 0.2rem rgba(0, 0, 0, 0.06);
  --shadow-btn: 0 0.06rem 0.24rem rgba(0, 122, 255, 0.25);
  --radius-sm: 0.08rem;
  --radius-md: 0.16rem;
  --radius-lg: 0.24rem;
  --radius-pill: 1rem;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', sans-serif;
  font-size: 0.28rem;
  color: var(--color-text);
  background-color: var(--color-bg);
}

/* ===== Card ===== */
.card {
  background: var(--color-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 0.32rem;
  margin: 0.2rem 0.24rem;
}

.card-title {
  font-size: 0.3rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.2rem;
}

/* ===== Buttons ===== */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 0.88rem;
  border-radius: var(--radius-pill);
  font-size: 0.3rem;
  font-weight: 600;
  padding: 0 0.48rem;
  border: none;
  transition: opacity 0.2s;
}

.btn::after {
  border: none;
}

.btn:active {
  opacity: 0.75;
}

.btn-primary {
  background: var(--color-primary);
  color: #FFFFFF;
  box-shadow: var(--shadow-btn);
}

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

.btn-warning {
  background: var(--color-warning);
  color: #FFFFFF;
}

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

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 0.02rem solid var(--color-primary);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  height: 0.64rem;
  font-size: 0.26rem;
  padding: 0 0.32rem;
}

.btn-disabled {
  opacity: 0.45;
  pointer-events: none;
}

/* ===== Pill Buttons (tank selector, etc.) ===== */
.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.16rem;
  padding: 0 0.24rem;
  margin-bottom: 0.2rem;
}

.pill {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 0.6rem;
  padding: 0 0.28rem;
  border-radius: var(--radius-pill);
  font-size: 0.26rem;
  background: #F0F0F5;
  color: var(--color-text-secondary);
  border: 0.02rem solid transparent;
  transition: all 0.2s;
}

.pill.active {
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-color: var(--color-primary);
  font-weight: 600;
}

/* ===== Form ===== */
.form-group {
  margin-bottom: 0.24rem;
}

.form-label {
  font-size: 0.26rem;
  color: var(--color-text-secondary);
  margin-bottom: 0.12rem;
  display: block;
}

.form-input {
  width: 100%;
  height: 0.8rem;
  border: 0.02rem solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0 0.24rem;
  font-size: 0.28rem;
  color: var(--color-text);
  background: #FAFBFD;
  box-sizing: border-box;
}

.form-input-focus {
  border-color: var(--color-primary);
  background: #FFFFFF;
}

/* ===== Status Colors ===== */
.status-green {
  color: var(--color-success);
}

.status-yellow {
  color: var(--color-warning);
}

.status-red {
  color: var(--color-danger);
}

.status-normal {
  color: var(--color-text-secondary);
}

.bg-green {
  background-color: var(--color-success-light);
}

.bg-yellow {
  background-color: var(--color-warning-light);
}

.bg-red {
  background-color: var(--color-danger-light);
}

.bg-normal {
  background-color: #F2F2F7;
}

/* ===== Layout ===== */
.container {
  padding: 0.2rem 0;
  min-height: 100vh;
  box-sizing: border-box;
}

.flex {
  display: flex;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.flex-row {
  display: flex;
  flex-direction: row;
}

.flex-wrap {
  flex-wrap: wrap;
}

.flex-1 {
  flex: 1;
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.items-end {
  align-items: flex-end;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-end {
  justify-content: flex-end;
}

.gap-sm {
  gap: 0.12rem;
}

.gap-md {
  gap: 0.2rem;
}

.gap-lg {
  gap: 0.32rem;
}

/* ===== Spacing ===== */
.p-sm { padding: 0.12rem; }
.p-md { padding: 0.24rem; }
.p-lg { padding: 0.32rem; }

.px-sm { padding-left: 0.12rem; padding-right: 0.12rem; }
.px-md { padding-left: 0.24rem; padding-right: 0.24rem; }
.px-lg { padding-left: 0.32rem; padding-right: 0.32rem; }

.py-sm { padding-top: 0.12rem; padding-bottom: 0.12rem; }
.py-md { padding-top: 0.24rem; padding-bottom: 0.24rem; }

.m-sm { margin: 0.12rem; }
.m-md { margin: 0.24rem; }
.m-lg { margin: 0.32rem; }

.mx-sm { margin-left: 0.12rem; margin-right: 0.12rem; }
.mx-md { margin-left: 0.24rem; margin-right: 0.24rem; }
.mx-lg { margin-left: 0.32rem; margin-right: 0.32rem; }

.my-sm { margin-top: 0.12rem; margin-bottom: 0.12rem; }
.my-md { margin-top: 0.24rem; margin-bottom: 0.24rem; }

.mt-sm { margin-top: 0.12rem; }
.mt-md { margin-top: 0.24rem; }
.mt-lg { margin-top: 0.32rem; }

.mb-sm { margin-bottom: 0.12rem; }
.mb-md { margin-bottom: 0.24rem; }
.mb-lg { margin-bottom: 0.32rem; }

/* ===== Typography ===== */
.text-xs { font-size: 0.22rem; }
.text-sm { font-size: 0.26rem; }
.text-base { font-size: 0.28rem; }
.text-md { font-size: 0.3rem; }
.text-lg { font-size: 0.34rem; }
.text-xl { font-size: 0.4rem; }
.text-2xl { font-size: 0.52rem; }
.text-3xl { font-size: 0.64rem; }

.text-bold { font-weight: 600; }
.text-center { text-align: center; }
.text-right { text-align: right; }

.text-primary { color: var(--color-primary); }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.text-danger { color: var(--color-danger); }
.text-secondary { color: var(--color-text-secondary); }
.text-white { color: #FFFFFF; }

/* ===== Divider ===== */
.divider {
  height: 0.02rem;
  background: var(--color-border);
  margin: 0.2rem 0;
}

/* ===== Loading / Empty ===== */
.loading-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 0;
}

.loading-text {
  font-size: 0.26rem;
  color: var(--color-text-secondary);
  margin-top: 0.16rem;
}

.empty-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem 0;
}

.empty-text {
  font-size: 0.28rem;
  color: var(--color-text-secondary);
  margin-top: 0.2rem;
}

.empty-icon {
  font-size: 0.8rem;
  color: #CCCCCC;
}

.empty-hint {
  font-size: 0.24rem;
  color: #999;
  margin-top: 0.12rem;
}

/* ===== Badge ===== */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0.4rem;
  height: 0.4rem;
  padding: 0 0.12rem;
  border-radius: var(--radius-pill);
  font-size: 0.22rem;
  font-weight: 600;
  color: #FFFFFF;
  background: var(--color-danger);
}

/* ===== List Row ===== */
.list-row {
  display: flex;
  align-items: center;
  padding: 0.28rem 0.32rem;
  background: var(--color-card);
  border-bottom: 0.02rem solid var(--color-border);
}

.list-row:last-child {
  border-bottom: none;
}

.list-row-content {
  flex: 1;
}

.list-row-arrow {
  color: var(--color-text-secondary);
  font-size: 0.28rem;
  margin-left: 0.16rem;
}

/* ===== Section ===== */
.section {
  margin: 0.24rem;
}

.section-title {
  font-size: 0.28rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.16rem;
  padding-left: 0.08rem;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  display: none;
}
