:root {
  --bg: #eef1f6;
  --card: #ffffff;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(15, 23, 42, .08);
  --brand: #0071e3;
  --brand-2: #147ce5;
  --orange: #ff9f0a;
  --ok: #30b566;
  --danger: #ff3b30;
  --radius: 20px;
  --shadow: 0 18px 50px rgba(28, 36, 52, .08);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  height: 100%;
  color: var(--ink);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }

.page-auth,
.page-portal {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px 64px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 520px at 8% -10%, rgba(91, 108, 255, .18), transparent 52%),
    radial-gradient(720px 460px at 100% 8%, rgba(224, 138, 60, .16), transparent 46%),
    radial-gradient(680px 420px at 78% 110%, rgba(26, 168, 138, .14), transparent 50%),
    linear-gradient(180deg, #f7f8fb 0%, #eef1f6 100%);
}

.page-portal { flex-direction: column; padding: 0; overflow: hidden; }
.page-auth { overflow: visible; }
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  pointer-events: none;
  opacity: .55;
}
.orb-a { width: 280px; height: 280px; left: -60px; top: 80px; background: #c9d2ff; }
.orb-b { width: 320px; height: 320px; right: -80px; top: 40px; background: #f6d3b4; }
.orb-c { width: 260px; height: 260px; right: 18%; bottom: -70px; background: #b8ece0; }

.portal-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  width: 100%;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .62);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  border-bottom: 1px solid rgba(255, 255, 255, .5);
}
.portal-logo {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: .04em;
}

.auth-card {
  width: 100%;
  max-width: 900px;
  position: relative;
  background: var(--card);
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, .7);
}
.auth-card.wide { max-width: 920px; grid-template-columns: 1fr; }
.auth-side {
  padding: 52px 44px;
  background:
    linear-gradient(165deg, rgba(255,255,255,.4), transparent 40%),
    linear-gradient(135deg, #f4f6ff 0%, #eef6f3 55%, #fff6ee 100%);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  min-height: 540px;
}
.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(145deg, #2b2d33, #111216);
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 36px;
  box-shadow: 0 10px 24px rgba(17, 18, 22, .2);
}
.scope-admin .brand-mark { background: linear-gradient(145deg, #7b88ff, #4b58e6); }
.scope-property .brand-mark { background: linear-gradient(145deg, #3ad0b0, #168f76); }
.scope-resident .brand-mark { background: linear-gradient(145deg, #f0b06a, #d97a2f); }
.brand-kicker {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: .22em;
  color: var(--muted);
  text-transform: uppercase;
}
.auth-side h1 {
  margin: 0 0 14px;
  font-size: 34px;
  font-weight: 650;
  letter-spacing: -.035em;
  line-height: 1.18;
}
.brand-lead {
  margin: 0;
  line-height: 1.7;
  color: var(--muted);
  max-width: 16em;
  font-size: 15px;
}
.brand-points {
  list-style: none;
  margin: auto 0 0;
  padding: 28px 0 0;
  border-top: 1px solid rgba(15, 23, 42, .08);
  color: #51545c;
  font-size: 14px;
  line-height: 2.05;
}
.auth-form { padding: 52px 44px; background: #fff; }
.auth-form h2 {
  margin: 0 0 8px;
  font-size: 30px;
  font-weight: 650;
  letter-spacing: -.03em;
}
.form-lead { margin: 0 0 28px; color: var(--muted); font-size: 15px; }
.auth-form h3 {
  margin: 8px 0 14px;
  font-size: 13px;
  font-weight: 650;
  color: var(--ink);
}
.field { margin-bottom: 16px; position: relative; }
.field-pop-msg {
  display: none;
  margin: 8px 0 0;
  padding: 8px 12px;
  font-size: 12px;
  color: #6e6e73;
  background: #f3f4f7;
  border-radius: 10px;
  line-height: 1.55;
}
.field:focus-within .field-pop-msg,
.field.is-warn .field-pop-msg { display: block; }
.field.is-warn input { box-shadow: 0 0 0 4px rgba(255, 59, 48, .12); }
.field.is-warn .field-pop-msg { color: var(--danger); background: #fff2f1; }
.field label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 7px;
}
.field input, .field select, .field textarea {
  width: 100%;
  border: 0;
  background: #f3f4f7;
  padding: 13px 14px;
  font-size: 15px;
  outline: none;
  border-radius: 14px;
  color: var(--ink);
  transition: box-shadow .16s, background .16s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  background: #fff;
  box-shadow: 0 0 0 4px rgba(0, 113, 227, .16);
}
.field input[readonly], .field input.locked, .field textarea[readonly] {
  background: #eef0f4;
  color: #8a8d96;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.btn {
  border: 0;
  cursor: pointer;
  padding: 9px 16px;
  font-size: 14px;
  border-radius: 980px;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, opacity .16s;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { transform: none; opacity: .45; cursor: not-allowed; }
.btn-brand {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 8px 18px rgba(0, 113, 227, .22);
}
.btn-brand:hover { background: var(--brand-2); }
.btn-block { width: 100%; padding: 14px 18px; margin-top: 8px; font-size: 16px; }
.code-row { display: grid; grid-template-columns: 1fr 122px; gap: 10px; align-items: stretch; }
.code-row .btn { margin: 0; border-radius: 14px; }
.btn-ghost {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  box-shadow: none;
}
.btn-ghost:hover { background: #f6f7fa; }
.btn-orange { background: var(--ink); color: #fff; box-shadow: 0 8px 18px rgba(29, 29, 31, .16); }
.btn-orange[disabled], .btn-disabled { background: #d5d7de; color: #fff; cursor: not-allowed; box-shadow: none; }
.btn-row { display: flex; gap: 10px; margin-top: 8px; }
.link { color: var(--brand); cursor: pointer; }
.link:hover { text-decoration: underline; }
.auth-foot { margin: 22px 0 0; text-align: center; color: var(--muted); font-size: 13px; }
.hint { color: var(--muted); font-size: 13px; margin: 0 0 18px; line-height: 1.7; }
.err { color: var(--danger); font-size: 13px; margin: 4px 0 10px; min-height: 18px; }

.shell {
  min-height: 100vh;
  background:
    radial-gradient(800px 360px at 0% 0%, rgba(91, 108, 255, .08), transparent 50%),
    var(--bg);
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 28px;
  height: 58px;
  border-bottom: 1px solid rgba(255, 255, 255, .55);
  box-shadow: 0 1px 0 rgba(15, 23, 42, .04);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 168px; }
.brand-mark.sm {
  width: 30px;
  height: 30px;
  margin: 0;
  font-size: 12px;
  border-radius: 9px;
  flex-shrink: 0;
  box-shadow: 0 6px 14px rgba(17, 18, 22, .16);
}
.tone-admin .brand-mark { background: linear-gradient(145deg, #7b88ff, #4b58e6); }
.tone-property .brand-mark { background: linear-gradient(145deg, #3ad0b0, #168f76); }
.tone-resident .brand-mark { background: linear-gradient(145deg, #f0b06a, #d97a2f); }
.brand strong { font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.nav { display: flex; gap: 4px; flex: 1; justify-content: center; flex-wrap: wrap; }
.nav a {
  padding: 7px 13px;
  font-size: 13px;
  color: var(--ink);
  opacity: .62;
  border-radius: 980px;
}
.nav a:hover { opacity: 1; background: rgba(15, 23, 42, .05); }
.nav a.router-link-active {
  opacity: 1;
  background: #fff;
  box-shadow: 0 6px 16px rgba(15, 23, 42, .08);
  font-weight: 600;
}
.userbox {
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  min-width: 168px;
}
.role-chip {
  font-size: 11px;
  color: #4b4f58;
  background: #fff;
  padding: 4px 10px;
  border-radius: 99px;
  box-shadow: 0 1px 0 rgba(15, 23, 42, .06);
}
.user-name { color: var(--ink); font-weight: 550; }
.btn-logout {
  background: #fff;
  border: 0;
  color: var(--ink);
  padding: 6px 13px;
  border-radius: 980px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(15, 23, 42, .08);
}
.btn-logout:hover { background: #f6f7fa; }
.main { max-width: 1140px; margin: 0 auto; padding: 28px 22px 80px; }
.panel {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, .8);
  padding: 26px 28px;
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(28, 36, 52, .05);
}
.panel + .panel { margin-top: 16px; }
.panel h3 {
  margin: 0 0 18px;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -.02em;
}
.toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar input, .toolbar select {
  border: 0;
  padding: 9px 13px;
  border-radius: 980px;
  background: #f3f4f7;
}
.toolbar input:focus, .toolbar select:focus {
  outline: none;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(0, 113, 227, .16);
}
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td {
  border-bottom: 1px solid #eef0f4;
  text-align: left;
  padding: 14px 10px;
  vertical-align: middle;
}
.table th {
  color: var(--muted);
  font-weight: 600;
  background: #f8f9fc;
  font-size: 12px;
}
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: #fafbfe; }
.row-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #eef0f4;
  padding: 16px 18px;
  margin-bottom: 10px;
  background: #fff;
  cursor: default;
  border-radius: 16px;
}
.row-item.clickable { cursor: pointer; }
.row-item.clickable:hover { background: #f8f9fc; box-shadow: 0 8px 20px rgba(28, 36, 52, .05); }
.status {
  display: inline-flex;
  align-items: center;
  font-weight: 650;
  font-size: 12px;
  padding: 3px 9px;
  border-radius: 99px;
}
.status.wait { color: #b26a00; background: #fff4df; }
.status.ok { color: #1c7a45; background: #e6f7ec; }
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(16, 20, 28, .38);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 40;
  backdrop-filter: blur(10px);
}
.modal {
  background: var(--card);
  width: min(640px, 100%);
  padding: 28px;
  border-radius: 24px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .2);
}
.modal img { max-width: 100%; display: block; margin-top: 12px; border-radius: 14px; }
.thumb { max-width: 160px; max-height: 120px; display: block; margin-top: 8px; object-fit: cover; border-radius: 12px; }
.post {
  border: 1px solid #eef0f4;
  padding: 18px;
  margin-bottom: 12px;
  border-radius: 16px;
  background: #fff;
}
.post.is-new { background: #f4f8ff; border-color: #d7e6fb; }
.post .meta { color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.comment { padding: 8px 0; border-top: 1px dashed #e8eaef; font-size: 13px; }
.empty { color: var(--muted); padding: 36px 0; text-align: center; }
.dash-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}
.dash-kpi {
  background: #fff;
  border-radius: 18px;
  padding: 20px 22px;
  box-shadow: 0 10px 30px rgba(28, 36, 52, .05);
  position: relative;
  overflow: hidden;
}
.dash-kpi::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #5b6cff, #1aa88a);
}
.dash-kpi span { color: var(--muted); font-size: 12px; }
.dash-kpi b { display: block; margin-top: 8px; font-size: 30px; font-weight: 650; letter-spacing: -.04em; }
.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.chart-card {
  background: #fff;
  border-radius: 18px;
  padding: 20px 20px 12px;
  box-shadow: 0 10px 30px rgba(28, 36, 52, .05);
}
.chart-card h4 { margin: 0 0 12px; font-size: 16px; font-weight: 650; }
.chart-card canvas { width: 100%; max-height: 260px; }
.star-btn { margin-left: 4px; padding: 2px 8px; font-size: 12px; }

.portal {
  width: min(1080px, 100%);
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--ink);
  text-align: center;
  padding: 64px 24px 88px;
  position: relative;
  z-index: 1;
}
.portal-kicker {
  margin: 0 0 12px;
  font-size: 13px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--muted);
}
.portal h1 {
  margin: 0 0 44px;
  font-size: 58px;
  font-weight: 650;
  letter-spacing: -.045em;
  line-height: 1.06;
}
.portal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.portal-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  background: rgba(255, 255, 255, .78);
  backdrop-filter: blur(18px);
  color: var(--ink);
  border-radius: 26px;
  padding: 32px 28px 26px;
  min-height: 292px;
  border: 1px solid rgba(255, 255, 255, .85);
  box-shadow: 0 16px 40px rgba(28, 36, 52, .07);
  transition: transform .22s ease, box-shadow .22s ease;
}
.portal-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #fff;
  font-size: 20px;
  font-weight: 650;
  box-shadow: 0 12px 24px rgba(29, 29, 31, .16);
}
.tone-admin .portal-icon { background: linear-gradient(145deg, #8b95ff, #4d58e8); }
.tone-property .portal-icon { background: linear-gradient(145deg, #4ad4b4, #148f76); }
.tone-resident .portal-icon { background: linear-gradient(145deg, #f3b56f, #d97a2f); }
.portal-card h2 {
  margin: 28px 0 8px;
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -.03em;
}
.portal-card p { margin: 0; color: var(--muted); line-height: 1.65; font-size: 15px; }
.portal-go {
  margin-top: auto;
  padding-top: 28px;
  color: var(--brand);
  font-size: 15px;
  font-weight: 650;
}
.portal-go::after { content: " →"; }
.portal-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 56px rgba(28, 36, 52, .12);
}

@media (max-width: 860px) {
  .auth-card { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .auth-form { padding: 36px 24px; }
  .grid-2 { grid-template-columns: 1fr; }
  .topbar { height: auto; flex-wrap: wrap; padding: 12px 14px; gap: 8px; }
  .brand, .userbox { min-width: 0; }
  .nav { width: 100%; justify-content: flex-start; order: 3; }
  .dash-kpis, .chart-grid, .portal-grid { grid-template-columns: 1fr; }
  .portal h1 { font-size: 36px; margin-bottom: 28px; }
  .portal-card { min-height: 0; }
}

.page-portal,
.page-auth,
.shell {
  padding-bottom: 56px;
}
.site-beian {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 18px;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0 8px;
  padding: 0 20px;
  background: transparent;
  border: none;
  color: #8590a6;
  font-size: 12px;
  line-height: 20px;
  letter-spacing: 0;
}
.site-beian .beian-sep {
  color: #8590a6;
}
.site-beian a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #8590a6;
  text-decoration: none;
}
.site-beian img {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.site-beian a:hover { color: #444; }
:root { --business-stroke: #d9dfe4; --business-accent: #176b5b; }
.business-desk { max-width: 1320px; margin: 0 auto; }
.business-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:24px; }
.business-heading h2 { margin:4px 0 12px; font-size:26px; }
.business-scope { display:flex; flex-wrap:wrap; gap:24px; margin:20px 0; padding:16px 0; border-block:1px solid var(--business-stroke); }
.business-scope label { display:flex; align-items:center; gap:12px; }
.business-scope select { min-width:180px; }
.business-tabs { display:flex; flex-wrap:wrap; gap:4px; margin-bottom:24px; }
.business-tabs button { border:0; background:transparent; color:#46505b; padding:10px 14px; min-height:44px; cursor:pointer; border-bottom:2px solid transparent; }
.business-tabs button.active { color:var(--business-accent); border-color:var(--business-accent); font-weight:600; }
.business-tabs button:hover { background:#edf3f1; }
.business-form { padding:20px 0; margin-bottom:20px; border-bottom:1px solid var(--business-stroke); }
.business-form .field { display:flex; flex-direction:column; gap:8px; }
.business-desk input,.business-desk select,.business-desk textarea { border:1px solid var(--business-stroke); border-radius:6px; padding:10px; color:#26323c; background:#fff; min-height:44px; }
.business-desk input[type=checkbox] { min-height:20px; width:20px; }
.business-desk :focus-visible { outline:2px solid var(--business-accent); outline-offset:3px; }
.business-table { overflow-x:auto; background:#fff; }
.business-table td { max-width:300px; white-space:normal; overflow-wrap:anywhere; vertical-align:top; }
.business-actions { min-width:150px; }
.business-actions button { margin:3px; }
.business-pager { display:flex; align-items:center; justify-content:flex-end; gap:16px; padding:16px 0; }
.business-success { color:var(--business-accent); }
.business-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; padding:20px 0; }
.business-metrics dt { color:#536270; font-size:14px; }
.business-metrics dd { margin:8px 0; font-size:24px; font-weight:600; }
.business-desk dialog { max-width:640px; width:90%; max-height:80vh; overflow:auto; border:1px solid var(--business-stroke); border-radius:8px; padding:24px; }
@media(max-width:768px) { .business-heading { display:block; } .business-scope label { flex-wrap:wrap; } .business-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); } .business-desk .grid-2 { grid-template-columns:1fr; } .business-pager { justify-content:center; } }

.shell > .site-beian { position:static; width:auto; margin:20px 0 0; padding:16px; flex-wrap:wrap; }
