/*! MP Tool · 布局：登录页 / 应用外壳 / 侧边栏 */

/* ================= 登录页 ================= */
.auth {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background:
    radial-gradient(900px 520px at 50% -10%, #f1f6e6 0%, rgba(241, 246, 230, 0) 62%),
    var(--bg);
}
.auth__card {
  width: 404px;
  max-width: 100%;
  padding: 38px 34px 34px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 10px 34px rgba(24, 30, 12, .07);
}
.auth__brand { display: flex; flex-direction: column; align-items: center; gap: 3px; margin-bottom: 26px; }
.auth__title { font-size: 27px; font-weight: 800; letter-spacing: -.4px; margin-top: 13px; }
.auth__subtitle { font-size: 13px; color: var(--muted); }
.auth__form { margin-top: 22px; }
.auth__form .field { margin-bottom: 15px; }
.auth__form .btn { margin-top: 6px; }
.auth__tip { min-height: 17px; margin-top: 11px; font-size: 12.5px; color: var(--muted); text-align: center; }
.auth__tip.is-error { color: #b8442f; }

.scan-box { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 6px 0 2px; }
.scan-box__frame {
  display: inline-flex;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}
.scan-box__img { width: 180px; height: 180px; display: block; border-radius: 4px; }
.scan-box__hint {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--muted);
}
.scan-box--modal .scan-box__img { width: 200px; height: 200px; }

/* ================= 应用外壳 ================= */
.shell { display: flex; min-height: 100vh; align-items: flex-start; }

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  width: 236px;
  height: 100vh;
  flex-shrink: 0;
  padding: 18px 14px 14px;
  background: var(--sidebar);
  border-right: 1px solid #ebebe2;
}

.sidebar__brand { display: flex; align-items: center; gap: 10px; padding: 2px 6px 20px; }
.sidebar__brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.sidebar__brand-text strong { font-size: 15px; font-weight: 800; letter-spacing: -.2px; }
.sidebar__brand-text small { font-size: 11px; color: var(--muted); white-space: nowrap; }

.nav { display: flex; flex-direction: column; gap: 3px; }
.nav__item {
  display: flex;
  align-items: center;
  gap: 11px;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: #5d6156;
  transition: background .15s, color .15s;
}
.nav__item:hover { background: #eef1e4; color: var(--text); }
.nav__item.is-active { background: var(--brand-100); color: var(--brand-700); }
.nav__icon { display: flex; color: currentColor; opacity: .85; }

.sidebar__user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 9px 10px;
  border-radius: 11px;
  transition: background .15s;
}
.sidebar__user:hover { background: #eef1e4; }
.sidebar__user-avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(140deg, #7c9c38, #4a6614);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  flex-shrink: 0;
}
.sidebar__user-dot {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 10px;
  height: 10px;
  border: 2px solid var(--sidebar);
  border-radius: 50%;
  background: #78a22c;
}
.sidebar__user-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.sidebar__user-text strong { font-size: 13px; }
.sidebar__user-text small { font-size: 11px; color: var(--muted); }

/* ================= 主内容 ================= */
.main { flex: 1; min-width: 0; }
.page { width: 100%; max-width: 1180px; margin: 0 auto; padding: 30px 38px 56px; }

.page__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.page__heading { min-width: 0; }
.page__title { font-size: 23px; font-weight: 800; letter-spacing: -.4px; }
.page__title--sm { font-size: 16px; font-weight: 700; letter-spacing: -.1px; }
.page__subtitle { margin-top: 3px; font-size: 13px; color: var(--muted); }

.page__head--detail { align-items: center; justify-content: flex-start; gap: 13px; margin-bottom: 18px; }
.page__avatar { display: flex; }

/* ================= 响应式 ================= */
@media (max-width: 900px) {
  .sidebar { width: 68px; padding: 16px 10px; }
  .sidebar__brand-text, .nav__label, .sidebar__user-text { display: none; }
  .sidebar__brand { justify-content: center; padding: 2px 0 18px; }
  .nav__item { justify-content: center; padding: 0; }
  .sidebar__user { justify-content: center; padding: 8px 0; }
  .page { padding: 22px 18px 44px; }
}

@media (max-width: 640px) {
  .auth__card { padding: 30px 22px 26px; }
  .segmented__item { font-size: 12.5px; padding: 0 6px; }
  .page__title { font-size: 20px; }
  .toolbar { gap: 8px; }
  .search { max-width: none; }
}
