/* 网页版外壳 / 基础样式（页面级样式见 pages.css） */

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

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #eceff3;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: #1f2430;
  font-size: 14px;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
}

input,
textarea {
  font-family: inherit;
  font-size: 14px;
  border: none;
  outline: none;
  background: transparent;
  color: #1f2430;
}

.hidden {
  display: none !important;
}

/* ---------- 应用容器（模拟手机宽度） ---------- */
#app {
  position: relative;
  width: 100%;
  max-width: 375px;
  min-height: 100vh;
  margin: 0 auto;
  background: #f5f6fa;
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.06);
  overflow-x: hidden;
}

.page-container {
  min-height: 100vh;
  padding-top: 48px;
  padding-bottom: 16px;
  box-sizing: border-box;
}

.page-container.has-tabbar {
  padding-bottom: 64px;
}

/* ---------- 顶部导航栏 ---------- */
.topbar {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 375px;
  height: 48px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  border-bottom: 1px solid #f0f1f5;
}

.topbar-title {
  font-size: 17px;
  font-weight: 600;
  color: #1f2430;
  max-width: 60%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.topbar-back {
  position: absolute;
  left: 6px;
  top: 0;
  height: 48px;
  padding: 0 12px;
  font-size: 26px;
  line-height: 48px;
  color: #333;
  display: flex;
  align-items: center;
}

.topbar-back.hidden {
  display: none !important;
}

/* ---------- 底部 tabbar ---------- */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 375px;
  height: 56px;
  background: #ffffff;
  display: flex;
  border-top: 1px solid #f0f1f5;
  z-index: 100;
}

.tabbar.hidden {
  display: none !important;
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 11px;
  color: #999999;
  position: relative;
  cursor: pointer;
}

.tab-item img {
  width: 22px;
  height: 22px;
}

.tab-item.active {
  color: #6fb1fc;
}

.tab-dot {
  position: absolute;
  top: 6px;
  right: 50%;
  margin-right: -22px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff4d4f;
  display: none;
}

.tab-dot.show {
  display: block;
}

/* ---------- toast ---------- */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 3000;
  max-width: 70%;
  text-align: center;
  pointer-events: none;
}

/* ---------- loading ---------- */
.loading-mask {
  position: fixed;
  inset: 0;
  z-index: 2900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  color: #fff;
  font-size: 14px;
  background: rgba(0, 0, 0, 0.12);
}

.loading-mask .box {
  background: rgba(0, 0, 0, 0.75);
  border-radius: 10px;
  padding: 18px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-width: 110px;
}

.spinner {
  width: 26px;
  height: 26px;
  border: 3px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ---------- 通用弹窗 ---------- */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-box {
  width: 100%;
  max-width: 300px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}

.modal-title {
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  padding: 20px 20px 8px;
}

.modal-content {
  font-size: 14px;
  color: #555;
  text-align: center;
  padding: 8px 20px 20px;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 40vh;
  overflow-y: auto;
}

.modal-input {
  width: 100%;
  border: 1px solid #e2e6ee;
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 4px;
  font-size: 14px;
}

.modal-input-wrap {
  padding: 0 20px 16px;
}

.modal-btns {
  display: flex;
  border-top: 1px solid #f0f1f5;
}

.modal-btns button {
  flex: 1;
  height: 46px;
  font-size: 16px;
  color: #333;
}

.modal-btns button + button {
  border-left: 1px solid #f0f1f5;
  color: #4a90e2;
  font-weight: 600;
}

/* ---------- 登录页 ---------- */
.login-page {
  min-height: 100vh;
  padding: 34px 28px 40px;
  display: flex;
  flex-direction: column;
}

.login-logo {
  font-size: 30px;
  font-weight: 700;
  color: #4a90e2;
  text-align: center;
  margin-top: 10px;
}

.login-sub {
  text-align: center;
  color: #9ca3af;
  font-size: 13px;
  margin: 8px 0 26px;
}

.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: 0 6px 20px rgba(74, 144, 226, 0.1);
}

.login-field {
  margin-bottom: 18px;
}

.login-field label {
  display: block;
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 8px;
}

.login-field input {
  width: 100%;
  background: #f5f6fa;
  border-radius: 10px;
  padding: 13px 14px;
  font-size: 15px;
}

.login-submit {
  width: 100%;
  height: 46px;
  border-radius: 10px;
  background: linear-gradient(135deg, #6fb1fc 0%, #4a90e2 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  margin-top: 8px;
}

.login-switch {
  text-align: center;
  color: #4a90e2;
  font-size: 14px;
  margin-top: 22px;
}

.login-create {
  text-align: center;
  color: #4a90e2;
  font-size: 14px;
  margin-top: 16px;
}

.login-error {
  color: #ef4444;
  font-size: 13px;
  min-height: 18px;
  margin-bottom: 6px;
  text-align: center;
}

/* ---------- 网页版对小程序样式的修正 ---------- */
/* app.wxss 的全局 .container（排行榜页用到），网页版原先缺失 */
.container {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 100px 0;
  box-sizing: border-box;
}

/* message 页自带自定义导航栏，去掉给微信胶囊按钮留的右边距 */
#page-message .nav-right {
  margin-right: 0;
}

/* 报单页项目列表：小程序为 scroll-view，网页需自带上滚动 */
#page-form .project-scroll {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* 设置弹窗 */
.settings-list {
  padding: 4px 0;
}

.settings-item {
  display: block;
  width: 100%;
  text-align: center;
  padding: 15px 20px;
  font-size: 15px;
  color: #333333;
}

.settings-item.danger {
  color: #ef4444;
}

/* 角色标签 */
.role-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 400;
  line-height: 16px;
  border-radius: 3px;
  padding: 0 6px;
  margin-left: 6px;
  vertical-align: middle;
}
.role-super {
  color: #b45309;
  background: #fef3c7;
}
.role-admin {
  color: #4338ca;
  background: #e0e7ff;
}
.role-controller {
  color: #4a90e2;
  background: #e8f2fd;
}
.role-member {
  color: #6b7280;
  background: #f0f1f3;
}

/* 底部动作面板 */
.action-sheet-mask {
  padding: 0;
  align-items: flex-end;
}
.action-sheet {
  width: 100%;
  max-width: 480px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
}
.action-sheet-title {
  text-align: center;
  font-size: 13px;
  color: #9ca3af;
  padding: 10px 0;
  background: #fff;
  border-radius: 12px;
  margin-bottom: 8px;
}
.action-sheet-list {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 8px;
}
.action-sheet-item {
  display: block;
  width: 100%;
  padding: 15px 20px;
  font-size: 15px;
  color: #333;
  background: #fff;
  border: none;
  border-bottom: 0.5px solid #f0f4f9;
  text-align: center;
}
.action-sheet-item:last-child {
  border-bottom: none;
}
.action-sheet-item.danger {
  color: #ef4444;
}
.action-sheet-cancel {
  display: block;
  width: 100%;
  padding: 15px 20px;
  font-size: 15px;
  font-weight: 600;
  color: #333;
  background: #fff;
  border: none;
  border-radius: 12px;
}

/* 邀请码页 */
.invite-card {
  margin: 24px 16px;
  background: #fff;
  border-radius: 14px;
  padding: 28px 20px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(74, 144, 226, 0.08);
}
.invite-club {
  font-size: 16px;
  font-weight: 700;
  color: #1f2430;
}
.invite-label {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 18px;
}
.invite-code {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 6px;
  color: #4a90e2;
  margin: 8px 0 20px;
}
.invite-copy {
  display: inline-block;
  padding: 10px 26px;
  border: none;
  border-radius: 22px;
  background: linear-gradient(135deg, #6fb1fc, #4a90e2);
  color: #fff;
  font-size: 15px;
}
.invite-tip {
  font-size: 12px;
  color: #c0c4cc;
  margin-top: 16px;
}

/* 报备审核：时间筛选 + 待审核 */
#page-review .filter-bar {
  background: #fff;
  border-radius: 10px;
  padding: 12px 14px;
  margin: 12px 12px 0;
  box-shadow: 0 2px 8px rgba(74, 144, 226, 0.08);
}
#page-review .chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}
#page-review .chip {
  font-size: 13px;
  color: #6b7280;
  padding: 6px 14px;
  border-radius: 15px;
  background: #eef4fb;
  margin-right: 8px;
  margin-bottom: 4px;
}
#page-review .chip.active {
  color: #fff;
  background: linear-gradient(135deg, #6fb1fc 0%, #4a90e2 100%);
}
#page-review .chip-wrap {
  position: relative;
  margin-right: 8px;
  margin-bottom: 4px;
}
#page-review .chip-wrap .chip {
  margin-right: 0;
  margin-bottom: 0;
}
#page-review .dropdown {
  position: absolute;
  top: 35px;
  left: 0;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  z-index: 10;
  min-width: 75px;
  overflow: hidden;
}
#page-review .dd-item {
  padding: 11px 18px;
  font-size: 13px;
  color: #333;
}
#page-review .dd-item:active {
  background: #eef4fb;
}
#page-review .list-head-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
#page-review .pending-toggle {
  border: 1px solid #4a90e2;
  background: #fff;
  color: #4a90e2;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 16px;
  border-radius: 16px;
}
#page-review .pending-toggle.active {
  background: linear-gradient(135deg, #6fb1fc, #4a90e2);
  color: #fff;
  border-color: transparent;
}

/* 筛选：开始/结束时间两行（仿报备表单） */
.range-panel {
  flex-basis: 100%;
  width: 100%;
  margin-top: 8px;
  border-top: 1px solid #eef1f6;
}
.range-row {
  display: flex;
  align-items: center;
  padding: 12px 2px;
  font-size: 14px;
  border-bottom: 1px solid #f4f6fa;
}
.range-row:last-child {
  border-bottom: none;
}
.range-label {
  color: #6b7280;
  margin-right: auto;
}
.range-value {
  color: #1f2430;
}
.range-value.placeholder {
  color: #c0c4cc;
}
.range-arrow {
  color: #c0c4cc;
  margin-left: 8px;
}

/* 列表加载更多 */
.load-more {
  text-align: center;
  color: #4a90e2;
  font-size: 14px;
  padding: 14px 0;
}

/* 日期范围选择弹窗 */
.date-range {
  padding: 6px 20px 16px;
}
.date-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 14px;
  color: #333;
}
.date-input {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
  background: #f5f6fa;
  color: #333;
}
