/* 班级管理手机版 - 奶油色浅色主题 */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #FFF9F0; color: #4A3F35;
  font-size: 14px;
  max-width: 480px; margin: 0 auto;
  display: flex; flex-direction: column; height: 100%;
  overflow: hidden;
}

/* 顶部栏 */
.topbar {
  background: linear-gradient(135deg, #FFE8CC, #FFD9A8);
  padding: 12px 16px;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid #F0D9B8;
  flex-shrink: 0;
}
.topbar .title { font-size: 17px; font-weight: 700; color: #8A5A1E; flex: 1; }
.topbar .sub { font-size: 12px; color: #B08A50; }
.topbar .logout-btn {
  background: #fff; border: 1px solid #E8C9A0; color: #A06A20;
  border-radius: 16px; padding: 4px 12px; font-size: 12px; cursor: pointer;
}

/* 内容区 */
.content { flex: 1; overflow-y: auto; padding: 12px; -webkit-overflow-scrolling: touch; }

/* 底部 tab 栏 */
.tabbar {
  display: flex; background: #fff; border-top: 1px solid #F0E4D2;
  flex-shrink: 0; padding-bottom: env(safe-area-inset-bottom);
}
.tabbar .tab {
  flex: 1; text-align: center; padding: 8px 0 6px;
  font-size: 11px; color: #B09B80; cursor: pointer;
  border: none; background: none;
}
.tabbar .tab .ico { font-size: 19px; display: block; margin-bottom: 2px; }
.tabbar .tab.active { color: #D98A2B; font-weight: 600; }
.tabbar .tab.active .ico { transform: translateY(-1px); }

/* 卡片 */
.card {
  background: #fff; border-radius: 14px; padding: 14px;
  box-shadow: 0 2px 10px rgba(180, 140, 80, 0.08);
  border: 1px solid #F3E6CF;
  margin-bottom: 12px;
}
.card-title { font-size: 15px; font-weight: 700; color: #8A5A1E; margin-bottom: 10px; }

/* 按钮 */
.btn {
  display: inline-block; border: none; border-radius: 10px;
  padding: 11px 16px; font-size: 14px; cursor: pointer; text-align: center;
  background: #F2E3C8; color: #7A5A2A;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: linear-gradient(135deg, #F5A623, #ED8936); color: #fff; font-weight: 600; width: 100%; }
.btn-green { background: linear-gradient(135deg, #38B2AC, #2C9A92); color: #fff; font-weight: 600; }
.btn-danger { background: #FDECEC; color: #D64541; border: 1px solid #F2C9C7; }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 8px; }
.btn-block { display: block; width: 100%; }
.btn-row { display: flex; gap: 8px; margin-top: 10px; }
.btn-row .btn { flex: 1; }

/* 输入框 */
.input {
  width: 100%; padding: 11px 12px; border: 1px solid #EAD9BC;
  border-radius: 10px; font-size: 14px; background: #FFFDF8; color: #4A3F35;
  margin-bottom: 8px;
}
.input:focus { outline: none; border-color: #ED8936; box-shadow: 0 0 0 3px rgba(237, 137, 54, 0.15); }
.label { font-size: 12px; color: #A08A60; margin: 8px 0 4px; display: block; }

/* 统计卡 */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.stat-card { background: #FFF8EC; border: 1px solid #F3E3C4; border-radius: 12px; padding: 10px 4px; text-align: center; }
.stat-num { font-size: 18px; font-weight: 700; color: #ED8936; }
.stat-label { font-size: 11px; color: #B08A50; margin-top: 2px; }

/* 列表 */
.list-item {
  display: flex; align-items: center; justify-content: space-between;
  background: #fff; border: 1px solid #F3E6CF; border-radius: 12px;
  padding: 12px 14px; margin-bottom: 8px;
}
.list-item .name { font-size: 15px; font-weight: 600; color: #4A3F35; flex: 1; }
.list-item .sub { font-size: 12px; color: #B09B80; margin-top: 2px; }
.list-item .tag { font-size: 11px; background: #FFF3E0; color: #D98A2B; border-radius: 10px; padding: 2px 8px; }

/* 教室卡片 */
.room-card { background: #fff; border: 1px solid #F3E6CF; border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; }
.room-card.offline { background: #FFF6F4; border-color: #F2CFC9; }
.room-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.room-name { font-size: 15px; font-weight: 700; color: #4A3F35; flex: 1; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot.on { background: #2ECC71; }
.dot.off { background: #E74C3C; }
.room-status { font-size: 11px; color: #B09B80; }
.room-card.offline .room-status { color: #E74C3C; }
.room-sub { font-size: 11px; color: #B9A88C; margin-bottom: 6px; }
.room-stats { font-size: 12px; color: #6B5B48; line-height: 1.7; }
.room-err { font-size: 11px; color: #E74C3C; background: #FDECEC; border-radius: 6px; padding: 4px 8px; margin: 6px 0; }
.room-btns { display: flex; gap: 8px; margin-top: 8px; }
.room-btns .btn { flex: 1; }

/* 表格 */
.table-wrap { overflow-x: auto; border: 1px solid #F0E4D2; border-radius: 10px; margin-bottom: 10px; background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { background: #FFF3E0; color: #8A5A1E; padding: 8px 5px; font-weight: 600; position: sticky; top: 0; }
td { padding: 7px 5px; text-align: center; border-bottom: 1px solid #FAF3E8; }
tr:nth-child(even) { background: #FFFDF8; }
tr.clickable:active { background: #FFF3E0; }

/* 弹窗 */
.mask {
  position: fixed; inset: 0; background: rgba(80, 60, 30, 0.5);
  display: flex; align-items: center; justify-content: center; z-index: 100;
  max-width: 480px; margin: 0 auto;
}
.mask .box {
  background: #fff; border-radius: 16px; padding: 18px; width: 88%;
  max-height: 82%; overflow-y: auto;
}
.box-title { font-size: 16px; font-weight: 700; color: #4A3F35; margin-bottom: 12px; }
.box-sub { font-size: 12px; color: #B09B80; margin-bottom: 10px; }
.box-tip { font-size: 11px; color: #C0AB88; margin: 4px 0 8px; }

/* 提示条 */
.toast {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%);
  background: rgba(60, 45, 25, 0.92); color: #fff;
  padding: 10px 18px; border-radius: 20px; font-size: 13px; z-index: 200;
  max-width: 85%; text-align: center;
}

/* 登录页 */
.login-wrap { display: flex; flex-direction: column; justify-content: center; height: 100%; padding: 30px; }
.login-logo { text-align: center; margin-bottom: 26px; }
.login-logo .t1 { font-size: 24px; font-weight: 800; color: #D98A2B; }
.login-logo .t2 { font-size: 13px; color: #B09B80; margin-top: 6px; }
.login-tip { font-size: 12px; color: #B09B80; text-align: center; margin-top: 14px; line-height: 1.7; }

/* 空状态 */
.empty { text-align: center; color: #C0AB88; padding: 36px 20px; font-size: 13px; line-height: 1.8; }

/* 通用 */
.flex { display: flex; align-items: center; gap: 8px; }
.flex-1 { flex: 1; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; }
.green { color: #2ECC71; } .red { color: #E74C3C; } .orange { color: #ED8936; }
.hidden { display: none !important; }
.checkbox-lg { width: 20px; height: 20px; accent-color: #ED8936; }
