/* 大明油管家 · 纯 CSS、字面色、无框架算色 */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  background: #f2f4f7; color: #1a1a1a; font-size: 17px; line-height: 1.5;
  padding-bottom: 84px;
}
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: #1f4e79; color: #ffffff;
  padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.topbar-title { font-size: 20px; font-weight: 700; }
.sync-status { font-size: 13px; color: #d7e6f5; text-align: right; }
main { max-width: 720px; margin: 0 auto; padding: 12px; }
.view { display: none; }
.view.active { display: block; }
.card {
  background: #ffffff; border: 1px solid #d9dee5; border-radius: 12px;
  padding: 16px; margin-bottom: 14px;
}
.card-title { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.tank-name { font-size: 16px; color: #555f6b; }
.tank-stock { font-size: 44px; font-weight: 800; color: #1f4e79; line-height: 1.15; }
.tank-stock .unit { font-size: 20px; color: #555f6b; }
.tank-bar { height: 14px; background: #e4e9ef; border-radius: 7px; overflow: hidden; margin: 8px 0 12px; }
.tank-bar-fill { height: 100%; background: #1f4e79; width: 0; transition: width .3s; }
.warn-red {
  background: #c0392b; color: #ffffff; border: 2px solid #922b21;
  border-radius: 8px; padding: 14px 12px; font-weight: 800; font-size: 19px; line-height: 1.45; margin-bottom: 10px;
}
.check { width: 22px; height: 22px; accent-color: #1f4e79; flex: none; }
.backup-log {
  background: #f7f9fb; border: 1px solid #d9dee5; border-radius: 8px;
  padding: 10px 12px; font-size: 13px; color: #333c47; white-space: pre-wrap; word-break: break-all;
  max-height: 180px; overflow-y: auto; margin-bottom: 6px;
}
.note-box {
  background: #fff7e0; color: #7a5b00; border: 1px solid #ecd27a;
  border-radius: 8px; padding: 10px 12px; margin-bottom: 10px;
}
.warn-yellow {
  background: #fff7e0; color: #7a5b00; border: 1px solid #ecd27a;
  border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; font-weight: 600;
}
.warn-inline { color: #b26a00; font-size: 14px; margin-top: 4px; }
.hidden { display: none !important; }
.row { display: flex; align-items: center; }
.gap { gap: 10px; margin-bottom: 10px; }
.grow { flex: 1; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 10px 14px;
  font-size: 17px; font-weight: 600; color: #1f4e79;
  background: #ffffff; border: 2px solid #1f4e79; border-radius: 10px;
  cursor: pointer; text-align: center;
}
.btn:active { background: #e8f0f8; }
.btn-primary { background: #1f4e79; color: #ffffff; }
.btn-primary:active { background: #173c5e; }
.btn-danger { background: #c0392b; border-color: #c0392b; color: #ffffff; }
.btn-small { min-height: 40px; font-size: 15px; padding: 6px 10px; }
.file-btn { cursor: pointer; }
.view-head { margin: 4px 0 12px; }
.view-title { font-size: 21px; font-weight: 800; }
.list { display: flex; flex-direction: column; gap: 10px; }
.item {
  background: #ffffff; border: 1px solid #d9dee5; border-radius: 10px; padding: 12px 14px;
}
#view-home .item { border: none; padding: 8px 0; border-bottom: 1px solid #eef1f5; border-radius: 0; }
#view-home .item:last-child { border-bottom: none; }
.item.clickable { cursor: pointer; }
.item.clickable:active { background: #f0f4f9; }
.item-title { font-size: 17px; font-weight: 700; }
.item-sub { font-size: 14px; color: #555f6b; margin-top: 2px; word-break: break-all; }
.empty { color: #8a94a1; text-align: center; padding: 18px 0; }
.input {
  width: 100%; min-height: 52px; padding: 10px 12px; margin: 4px 0 12px;
  font-size: 17px; color: #1a1a1a; background: #ffffff;
  border: 2px solid #b9c4d1; border-radius: 10px; appearance: none;
}
.input:focus { border-color: #1f4e79; outline: none; }
.label { display: block; font-size: 15px; font-weight: 600; color: #333c47; }
.small-text { font-size: 14px; color: #555f6b; margin-top: 6px; word-break: break-all; }
.overlay {
  position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.45);
  overflow-y: auto; padding: 18px 10px 30px;
}
.sheet {
  max-width: 720px; margin: 0 auto; background: #ffffff; border-radius: 14px; padding: 16px;
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sheet-title { font-size: 20px; font-weight: 800; }
.sheet-actions { margin-top: 6px; }
.form .label { margin-top: 2px; }
.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%);
  z-index: 60; max-width: 92%;
  background: #1a1a1a; color: #ffffff; font-size: 16px;
  padding: 12px 18px; border-radius: 10px; text-align: center;
}
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; background: #ffffff; border-top: 1px solid #d9dee5;
  padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  flex: 1; background: none; border: none; cursor: pointer;
  font-size: 20px; color: #555f6b; padding: 8px 0 6px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.tab span { font-size: 13px; font-weight: 600; }
.tab.active { color: #1f4e79; }
/* 自绘下拉（设备名/车牌单字提示）：字面色、大点击区、移动端友好 */
.suggest-wrap { position: relative; }
.suggest {
  position: absolute; left: 0; right: 0; top: calc(100% - 10px); z-index: 80;
  background: #ffffff; border: 2px solid #1f4e79; border-radius: 10px;
  max-height: 330px; overflow-y: auto;
  box-shadow: 0 10px 26px rgba(0,0,0,.20);
}
.suggest-item {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: #ffffff; border: none; border-bottom: 1px solid #e4e9ef;
  min-height: 58px; padding: 12px 14px; font-family: inherit;
}
.suggest-item:last-child { border-bottom: none; }
.suggest-item:active { background: #e8f0f8; }
.suggest-title { font-size: 17px; font-weight: 700; color: #1a1a1a; }
.suggest-sub { font-size: 14px; color: #555f6b; margin-top: 2px; word-break: break-all; }
.suggest-empty { padding: 14px; font-size: 15px; color: #8a94a1; }
