/* =========================================================
   VenueKit · 场馆工具箱 — 应用层样式（Lead 维护）
   依赖 base.css / components.css 的设计变量
   ========================================================= */

/* ---------- 品牌 & 外壳微调 ---------- */
.sidebar__brand { padding: 18px 16px 12px; }
.logo-mark { font-size: 14px; letter-spacing: 0; }
.brand-name { font-size: 14.5px; }
.brand-sub { letter-spacing: 0.2px; }
.sidebar__nav { padding: 2px 10px 14px; }
.nav-item { padding: 9px 11px; }
.nav-item.is-active {
  background: linear-gradient(135deg, var(--brand), #0d9488);
  box-shadow: 0 10px 22px -14px rgba(13, 148, 136, 0.85);
}
.sidebar__foot { padding: 10px; }
.side-foot-hint {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 11.5px; color: var(--faint); padding: 4px 4px 2px;
}
.side-foot-hint a { color: var(--brand-2); }
.avatar--brand { background: linear-gradient(145deg, #99f6e4, #2dd4bf); color: #0b4f47; }

/* ---------- 顶栏 ---------- */
.topbar__title-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar__title-row h1 { font-size: 16px; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__crumb { color: var(--faint); font-size: 12px; }
.topbar__search {
  display: flex; align-items: center; gap: 8px; width: 280px; max-width: 34vw;
  border: 1px solid var(--line); background: var(--surface-2); border-radius: 999px; padding: 7px 13px;
}
.topbar__search input { border: 0; background: transparent; outline: 0; flex: 1; font-size: 12.5px; color: var(--ink); }
.topbar__search input::placeholder { color: var(--faint); }
.topbar__search kbd { font-size: 10.5px; }
.topbar__ghost-btn {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2); border-radius: 999px; padding: 7px 13px;
  font-size: 12.5px; white-space: nowrap;
}
.topbar__ghost-btn:hover { background: var(--surface-2); }
.guest-banner {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  border: 1px solid #f3e0be; background: #fff9ec; color: #8a5a12;
  border-radius: 12px; padding: 10px 14px; margin-bottom: 16px; font-size: 12.5px;
}
.guest-banner .btn { margin-left: auto; }

/* ---------- 登录页 ---------- */
.auth-page {
  min-height: 100vh; display: grid; grid-template-columns: 1.05fr 460px;
  background: radial-gradient(1200px 600px at 10% 0%, #eaf7f4 0%, var(--bg) 55%);
}
.auth-aside { padding: 56px 60px; display: flex; flex-direction: column; justify-content: space-between; max-width: 680px; }
.auth-brand { display: flex; align-items: center; gap: 12px; }
.auth-brand .logo-mark { width: 42px; height: 42px; border-radius: 13px; font-size: 17px; }
.auth-brand-name { font-size: 17px; font-weight: 800; letter-spacing: 0.2px; }
.auth-brand-sub { font-size: 11.5px; color: var(--faint); }
.auth-hero h2 { font-size: clamp(26px, 3vw, 38px); line-height: 1.25; letter-spacing: -0.5px; margin-top: 42px; }
.auth-hero h2 b { color: var(--brand-2); }
.auth-hero p { color: var(--muted); margin-top: 14px; max-width: 500px; font-size: 14px; }
.auth-points { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 30px; }
.auth-point {
  background: rgba(255, 255, 255, 0.72); border: 1px solid var(--line); border-radius: 14px;
  padding: 13px 14px; backdrop-filter: blur(4px);
}
.auth-point b { display: block; font-size: 13px; margin-bottom: 3px; }
.auth-point span { font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.auth-foot { font-size: 11.5px; color: var(--faint); }
.auth-panel {
  background: var(--surface); border-left: 1px solid var(--line);
  display: flex; flex-direction: column; justify-content: center; padding: 44px 46px;
}
.auth-card { width: 100%; max-width: 360px; margin: 0 auto; }
.auth-card h3 { font-size: 21px; letter-spacing: -0.2px; }
.auth-card > p { color: var(--muted); font-size: 12.5px; margin-top: 6px; margin-bottom: 20px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-3); border-radius: 11px; padding: 4px; margin-bottom: 18px; }
.auth-tab { border: 0; background: transparent; border-radius: 8px; padding: 8px 0; font-size: 13px; color: var(--muted); font-weight: 600; }
.auth-tab.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.auth-form { display: flex; flex-direction: column; gap: 13px; }
.auth-form .field { gap: 6px; }
.auth-submit { margin-top: 4px; }
.auth-switch { text-align: center; font-size: 12px; color: var(--muted); margin-top: 14px; }
.auth-switch button { border: 0; background: none; color: var(--brand-2); font-weight: 600; font-size: 12px; padding: 0 2px; }
.auth-demo {
  margin-top: 20px; border-top: 1px dashed var(--line); padding-top: 14px;
  font-size: 11.5px; color: var(--muted); line-height: 1.8;
}
.auth-demo code { background: var(--surface-3); padding: 1px 5px; border-radius: 5px; font-size: 11px; }

/* ---------- 首页 ---------- */
.home-hero {
  position: relative; overflow: hidden; border-radius: 22px; padding: 30px 32px;
  color: #fff; background:
    radial-gradient(900px 300px at 85% -20%, rgba(255,255,255,0.28), transparent 60%),
    linear-gradient(120deg, #0f766e 0%, #0d9488 55%, #14b8a6 100%);
  box-shadow: 0 24px 60px -40px rgba(15, 118, 110, 0.9);
}
.home-hero__eyebrow { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; letter-spacing: 0.4px; background: rgba(255,255,255,0.16); border: 1px solid rgba(255,255,255,0.25); border-radius: 999px; padding: 3px 10px; }
.home-hero h1 { font-size: clamp(22px, 2.4vw, 30px); letter-spacing: -0.4px; margin-top: 14px; }
.home-hero p { margin-top: 8px; color: rgba(255, 255, 255, 0.82); font-size: 13px; max-width: 620px; }
.home-hero__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.home-hero .btn--primary { background: #fff; color: var(--brand-2); border-color: #fff; box-shadow: 0 10px 24px -14px rgba(0,0,0,0.5); }
.home-hero .btn--primary:hover { background: #f2fffc; }
.home-hero .btn--ghost { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.35); color: #fff; }
.home-hero .btn--ghost:hover { background: rgba(255,255,255,0.2); }
.home-hero__stats { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 24px; }
.home-hero__stat b { display: block; font-size: 20px; letter-spacing: -0.3px; }
.home-hero__stat span { font-size: 11px; color: rgba(255,255,255,0.72); }
.home-section { margin-top: 22px; }
.home-section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.home-section__head h2 { font-size: 15.5px; font-weight: 750; }
.home-section__head p { font-size: 12px; color: var(--faint); margin-top: 2px; }
.home-section__head a, .home-section__head button { font-size: 12px; color: var(--brand-2); background: none; border: 0; font-weight: 600; }

/* ---------- 工具卡 ---------- */
.tool-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tool-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tool-card {
  position: relative; display: flex; flex-direction: column; gap: 9px; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 15px 15px 13px; transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s;
  min-height: 118px;
}
.tool-card:hover { transform: translateY(-2px); border-color: #bfe6e1; box-shadow: 0 16px 36px -26px rgba(15, 118, 110, 0.55); }
.tool-card__icon {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  font-size: 18px; background: var(--brand-soft); color: var(--brand-2); flex: 0 0 auto;
}
.tool-card__title { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; }
.tool-card__desc { font-size: 11.5px; color: var(--muted); line-height: 1.55; flex: 1; }
.tool-card__foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tool-card__arrow { position: absolute; right: 13px; top: 13px; color: var(--faint); font-size: 12px; }
.tool-card.is-soon { opacity: 0.72; }
.tool-card.is-soon:hover { transform: none; box-shadow: none; border-color: var(--line); }
.status-badge { font-size: 10px; border-radius: 999px; padding: 1px 7px; font-weight: 600; border: 1px solid transparent; }
.status-badge--ok { color: var(--ok); background: var(--ok-soft); }
.status-badge--beta { color: var(--warn); background: var(--warn-soft); }
.status-badge--soon { color: var(--muted); background: var(--surface-3); }
.status-badge--lock { color: var(--violet); background: var(--violet-soft); }

/* ---------- 工具页 ---------- */
.tools-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.tools-search { flex: 1; min-width: 220px; max-width: 420px; }
.cat-block { margin-bottom: 26px; }
.cat-block__head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 11px; }
.cat-block__head h2 { font-size: 14.5px; font-weight: 750; }
.cat-block__head span { font-size: 11.5px; color: var(--faint); }

/* ---------- 我的 ---------- */
.mine-grid { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 18px; align-items: start; }
.profile-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.profile-card__top { display: flex; align-items: center; gap: 13px; }
.profile-card__avatar { width: 52px; height: 52px; border-radius: 16px; font-size: 19px; }
.profile-card__name { font-size: 16px; font-weight: 750; }
.profile-card__meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.profile-lines { margin-top: 16px; display: grid; gap: 9px; }
.profile-line { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-2); }
.profile-line span:first-child { color: var(--faint); }
.permission-item {
  display: flex; align-items: center; gap: 10px; border: 1px solid var(--line-2);
  border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; background: var(--surface-2);
}
.permission-item__main { flex: 1; min-width: 0; }
.permission-item__title { font-size: 12.5px; font-weight: 650; }
.permission-item__sub { font-size: 11px; color: var(--faint); margin-top: 1px; }
.usage-row { display: grid; grid-template-columns: 86px 1fr 74px; gap: 10px; align-items: center; font-size: 12px; margin-top: 10px; }
.usage-bar { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.usage-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), #2dd4bf); }
.mine-section { margin-top: 16px; }
.mine-section__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.mine-section__head h3 { font-size: 14px; font-weight: 750; }

/* ---------- 骨架 / 占位 ---------- */
.soon-page { max-width: 760px; margin: 26px auto; text-align: center; padding: 44px 28px; }
.soon-page__icon { width: 74px; height: 74px; border-radius: 22px; background: var(--brand-soft); color: var(--brand-2); font-size: 32px; display: grid; place-items: center; margin: 0 auto 18px; }
.soon-page h1 { font-size: 23px; letter-spacing: -0.3px; }
.soon-page p { color: var(--muted); font-size: 13px; margin-top: 8px; }
.soon-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 22px 0; text-align: left; }
.soon-feature { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.soon-feature b { font-size: 12.5px; display: block; margin-bottom: 3px; }
.soon-feature span { font-size: 11.5px; color: var(--muted); }

/* ---------- 移动端 ---------- */
.mobile-nav { display: none; }
@media (max-width: 1080px) {
  .tool-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mine-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
  .sidebar { display: none; }
  .app-shell { display: block; }
  .topbar { padding: 0 14px; gap: 10px; }
  .topbar__search { display: none; }
  .topbar__credits { display: none; }
  .user-chip__meta { display: none; }
  .view { padding: 14px 14px 86px; }
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tool-card { min-height: 112px; padding: 13px; }
  .home-hero { padding: 22px 18px; border-radius: 18px; }
  .home-hero__stats { gap: 18px; }
  .home-section { margin-top: 18px; }
  .mobile-nav {
    display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); z-index: 60;
  }
  .mobile-nav__item {
    border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 5px 0; color: var(--faint); font-size: 10.5px; border-radius: 10px;
  }
  .mobile-nav__item i { font-style: normal; font-size: 17px; line-height: 1; }
  .mobile-nav__item.is-active { color: var(--brand-2); font-weight: 700; }
  .auth-page { grid-template-columns: 1fr; min-height: 100dvh; }
  .auth-aside { display: none; }
  .auth-panel { border-left: 0; padding: 34px 20px calc(34px + env(safe-area-inset-bottom)); }
  .soon-features { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 19px; }
}
@media (max-width: 420px) {
  .tool-grid { grid-template-columns: 1fr 1fr; }
  .home-hero__stats { display: none; }
}

/* ---------- 通用小组件 ---------- */
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 22px 0 12px; }
.section-title h2 { font-size: 15.5px; font-weight: 750; }
.section-title .muted { font-size: 12px; }
.pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 3px 10px; font-size: 11px; background: var(--surface-3); color: var(--ink-2); }
.pill--brand { background: var(--brand-soft); color: var(--brand-2); }
.pill--warn { background: var(--warn-soft); color: var(--warn); }
.divider { height: 1px; background: var(--line-2); margin: 14px 0; }
.mt-24 { margin-top: 24px; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.flex-1 { flex: 1; }
.row-gap-6 { gap: 6px; }
.nowrap { white-space: nowrap; }
.hide-sm { }
@media (max-width: 820px) { .hide-sm { display: none !important; } }

/* ---------- 登录态占位 ---------- */
body.auth-mode #app, body.auth-mode #mobile-nav { display: none !important; }
#auth-root:empty { display: none; }
body.auth-mode { background: var(--bg); }
