* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --brand: #0f766e;
  --brand-dark: #0a5a54;
  --brand-soft: #e7f2ee;
  --brand-faint: #f2f8f5;
  --ink: #17312e;
  --ink-soft: #526762;
  --muted: #8c9995;
  --canvas: #f3f5f1;
  --surface: #ffffff;
  --surface-soft: #f9faf7;
  --line: #e4e9e2;
  --line-strong: #d5ddd5;
  --amber: #d88a35;
  --amber-soft: #fdf3e5;
  --coral: #cd684d;
  --coral-soft: #faeee9;
  --blue: #447c9e;
  --blue-soft: #eaf2f6;
  --green: #23845e;
  --green-soft: #e8f5ef;
  --danger: #c7544d;
  --danger-soft: #fcedeb;
  --shadow: 0 1px 2px rgba(25, 49, 43, .04), 0 8px 24px rgba(25, 49, 43, .035);
  --sidebar-width: 238px;
  --topbar-height: 82px;
}
html { height: 100%; }
body {
  min-height: 100%;
  font-family: "Microsoft YaHei UI", "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--canvas);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
svg { display: block; }
button, input, select, textarea { font: inherit; outline: none; }
button { cursor: pointer; border: 0; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }
::selection { background: #cde7df; color: var(--ink); }

/* Login */
.login-view {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(460px, 1.06fr) minmax(420px, .94fr);
  background: #f5f4ef;
}
.login-visual {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background-image: url("assets/images/scene-1.jpg");
  background-size: cover;
  background-position: 42% center;
  color: #fff;
}
.login-visual-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 45, 40, .66);
}
.login-brand {
  position: absolute;
  z-index: 1;
  top: 30px;
  left: 38px;
  display: flex;
  align-items: center;
  padding: 8px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 16px 36px rgba(7, 34, 29, .22);
}
.login-brand-logo {
  display: block;
  width: auto;
  height: 92px;
}
.login-story {
  position: absolute;
  z-index: 1;
  left: 8%;
  right: 10%;
  bottom: 21%;
  max-width: 590px;
}
.login-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 11px;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  color: #f7e3c5;
  font-size: 12px;
  font-weight: 600;
}
.login-story h1 {
  margin-top: 20px;
  font-size: clamp(32px, 4.1vw, 56px);
  line-height: 1.24;
  font-weight: 700;
  max-width: 620px;
}
.login-story p {
  max-width: 490px;
  margin-top: 18px;
  color: rgba(255,255,255,.8);
  font-size: 15px;
  line-height: 1.8;
}
.login-visual-foot {
  position: absolute;
  z-index: 1;
  left: 46px;
  bottom: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,.74);
  font-size: 12px;
}
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7ed6ad;
  box-shadow: 0 0 0 5px rgba(126, 214, 173, .13);
}
.login-panel {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 54px 8vw;
  background: #f7f6f1;
}
.login-form-wrap { width: 100%; max-width: 388px; }
.login-mobile-brand { display: none; }
.login-mobile-logo {
  display: block;
  width: auto;
  height: 82px;
}
.eyebrow {
  display: block;
  color: var(--brand);
  font-size: 11px;
  font-weight: 700;
}
.login-heading h2 {
  margin-top: 8px;
  font-size: 30px;
  line-height: 1.25;
  font-weight: 700;
  color: #16342f;
}
.login-heading p {
  margin-top: 9px;
  color: var(--muted);
  font-size: 13px;
}
.login-form-wrap form { margin-top: 34px; }
.login-label {
  display: block;
  margin: 0 0 7px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
}
.login-label:not(:first-child) { margin-top: 20px; }
.login-input { position: relative; }
.login-input .input {
  height: 48px;
  padding-left: 43px;
  padding-right: 44px;
  border-color: #dfe5dd;
  border-radius: 8px;
  background: #fff;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.login-input .input:hover { border-color: #c9d4ca; }
.login-input .input:focus {
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, .09);
}
.field-icon {
  position: absolute;
  z-index: 1;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #83928c;
  pointer-events: none;
}
.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: #899792;
}
.password-toggle:hover { background: #f1f5f1; color: var(--brand); }
.login-options {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.remember-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 12px;
  cursor: pointer;
  user-select: none;
}
.remember-row input {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 1px solid #cbd5cd;
  border-radius: 4px;
  background: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: .15s;
}
.remember-row input::after {
  content: "";
  width: 8px;
  height: 4px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
  opacity: 0;
}
.remember-row input:checked { background: var(--brand); border-color: var(--brand); }
.remember-row input:checked::after { opacity: 1; }
.secure-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #87958f;
  font-size: 11px;
}
.secure-label svg { width: 13px; height: 13px; }
.login-error {
  min-height: 22px;
  margin-top: 8px;
  color: var(--danger);
  font-size: 12px;
}
.login-submit {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(15, 118, 110, .17);
}
.login-submit:disabled { opacity: .7; cursor: wait; }
.submit-arrow { display: grid; place-items: center; }
.login-footnote {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #e4e7e0;
  color: #9ba49f;
  font-size: 11px;
  line-height: 1.7;
}

/* Application shell */
.app-shell { min-height: 100vh; display: flex; background: var(--canvas); }
.sidebar {
  width: var(--sidebar-width);
  flex: 0 0 var(--sidebar-width);
  min-height: 100vh;
  position: sticky;
  top: 0;
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  background: #103b36;
  color: #dfeae5;
  padding: 22px 16px 18px;
  transition: width .22s ease, flex-basis .22s ease, transform .22s ease;
  z-index: 30;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  padding: 0 8px;
}
.brand-logo {
  width: 52px;
  height: 38px;
  flex: 0 0 52px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.brand-text { min-width: 0; }
.brand-text strong {
  display: block;
  color: #fff;
  font-size: 14px;
  white-space: nowrap;
}
.brand-text span {
  display: block;
  margin-top: 1px;
  color: #91b2aa;
  font-size: 10px;
  white-space: nowrap;
}
.nav-caption {
  margin: 31px 10px 10px;
  color: #769a91;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  position: relative;
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #acc4bd;
  font-size: 12px;
  text-align: left;
  transition: .16s;
}
.nav-item svg { flex: 0 0 18px; opacity: .9; }
.nav-item:hover { background: rgba(255,255,255,.055); color: #fff; }
.nav-item.active {
  background: #f0f6f2;
  color: #16443d;
  font-weight: 700;
}
.nav-item.active::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #e1a052;
}
.sidebar-foot { margin-top: auto; }
.connection-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 12px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  background: rgba(255,255,255,.035);
}
.connection-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  margin-top: 5px;
  border-radius: 50%;
  background: #75d2a6;
  box-shadow: 0 0 0 4px rgba(117, 210, 166, .1);
}
.connection-card strong { display: block; color: #e3eee9; font-size: 11px; }
.connection-card span { display: block; color: #7fa198; font-size: 9px; white-space: nowrap; }
.sidebar-version {
  padding: 17px 10px 0;
  color: #63867d;
  font-size: 9px;
  white-space: nowrap;
}
.main-shell { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.topbar {
  min-height: var(--topbar-height);
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 28px;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.topbar-left, .topbar-right { display: flex; align-items: center; }
.topbar-left { gap: 12px; min-width: 0; }
.topbar-right { gap: 10px; }
.menu-toggle { flex: 0 0 38px; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 8px; }
.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #62766f;
  transition: .15s;
}
.icon-btn:hover { background: #f2f5f1; color: var(--brand); }
.page-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--brand);
  background: var(--brand-soft);
}
.page-heading { min-width: 0; }
.page-kicker { display: block; color: #8a9792; font-size: 9px; font-weight: 600; }
.page-title-row { display: flex; align-items: baseline; gap: 11px; min-width: 0; }
.page-title-row h1 {
  color: #18332f;
  font-size: 19px;
  line-height: 1.4;
  white-space: nowrap;
}
.page-sub {
  color: #96a19d;
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.date-chip {
  margin-right: 4px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #7b8984;
  background: var(--surface-soft);
  font-size: 10px;
  white-space: nowrap;
}
.bell { position: relative; border: 1px solid var(--line); }
.badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border: 2px solid #fff;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--coral);
  color: #fff;
  font-size: 8px;
  line-height: 1;
  pointer-events: none;
}
.admin-wrap { position: relative; }
.admin {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 4px 8px 4px 5px;
  border-radius: 8px;
  text-align: left;
}
.admin:hover { background: #f4f6f2; }
.admin-avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #0d7466;
  color: #fff;
  box-shadow: 0 4px 12px rgba(13, 91, 79, .18);
}
.admin-avatar svg { display: block; }
.admin-avatar.large {
  width: 48px;
  height: 48px;
  flex-basis: 48px;
  border-radius: 12px;
}
.admin-copy strong, .admin-copy small { display: block; }
.admin-copy strong { color: #314b45; font-size: 11px; }
.admin-copy small { color: #99a49f; font-size: 9px; }
.caret { color: #9aa6a1; }
.admin-popover {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  width: 220px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(25, 49, 43, .14);
}
.admin-popover-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 10px 15px;
  border-bottom: 1px solid var(--line);
}
.admin-popover-head > div { min-width: 0; }
.admin-popover-head strong, .admin-popover-head span { display: block; }
.admin-popover-head strong { font-size: 12px; }
.admin-popover-head div span { color: var(--muted); font-size: 10px; }
.popover-action {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 6px;
  padding: 9px 8px;
  border-radius: 6px;
  color: var(--danger);
  font-size: 11px;
  text-align: left;
}
.popover-action:hover { background: var(--danger-soft); }
.content {
  flex: 1;
  padding: 24px 28px 38px;
  overflow: auto;
}
.content > * { max-width: 1500px; margin-left: auto; margin-right: auto; }

/* Common controls */
.card {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 16px; }
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
.card-title {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #223d38;
  font-size: 14px;
  font-weight: 700;
}
.card-title::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--amber);
}
.card-extra { color: var(--brand); font-size: 11px; font-weight: 600; }
.card-extra:hover { color: var(--brand-dark); }
.muted { color: var(--muted); }
.input, .textarea, .select {
  width: 100%;
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid #dfe5de;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  transition: border-color .15s, box-shadow .15s;
}
.textarea { resize: vertical; }
.input::placeholder, .textarea::placeholder { color: #a5afaa; }
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, .09);
}
.select { width: auto; padding-right: 28px; cursor: pointer; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 7px 14px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  transition: .16s;
}
.btn.primary { background: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(15, 118, 110, .14); }
.btn.primary:hover { background: var(--brand-dark); }
.btn.ghost { border-color: var(--line-strong); background: #fff; color: #596c65; }
.btn.ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn.sm { min-height: 32px; padding: 5px 10px; font-size: 10px; }
.link {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin: 1px 2px;
  padding: 3px 7px;
  border-radius: 5px;
  color: var(--brand);
  font-size: 10px;
  font-weight: 600;
}
.link:hover { background: var(--brand-soft); }
.link.danger { color: var(--danger); }
.link.danger:hover { background: var(--danger-soft); }
.block { width: 100%; }

/* Dashboard */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.stat-card {
  min-height: 152px;
  padding: 18px 19px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.stat-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.stat-label { color: #87948f; font-size: 11px; font-weight: 600; }
.stat-value {
  margin-top: 8px;
  color: #193732;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}
.stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex: 0 0 36px;
}
.stat-icon.blue { background: var(--blue-soft); color: var(--blue); }
.stat-icon.green { background: var(--green-soft); color: var(--green); }
.stat-icon.orange { background: var(--amber-soft); color: var(--amber); }
.stat-card-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.stat-growth {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 3px;
  padding: 3px 6px;
  border-radius: 5px;
  background: var(--green-soft);
  color: #23845e;
  font-size: 9px;
  font-weight: 700;
  vertical-align: 5px;
}
.stat-growth.down { background: var(--danger-soft); color: var(--danger); }
.stat-chart { width: 88px; height: 38px; flex: 0 0 88px; opacity: .95; }
.bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
  gap: 16px;
  margin-top: 16px;
}
.recent-list-head {
  display: grid;
  grid-template-columns: 1.25fr .9fr .9fr .65fr .72fr;
  gap: 10px;
  padding: 0 8px 9px;
  border-bottom: 1px solid var(--line);
  color: #9aa5a0;
  font-size: 9px;
  font-weight: 600;
}
.recent-row {
  display: grid;
  grid-template-columns: 1.25fr .9fr .9fr .65fr .72fr;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 7px 8px;
  border-bottom: 1px solid #eff2ed;
  font-size: 10px;
}
.recent-row:last-child { border-bottom: 0; }
.recent-row:hover { background: #fafbf8; border-radius: 6px; }
.recent-row .col { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-order-no { color: #34534c; font-weight: 600; }
.recent-row .amount { color: var(--coral); font-weight: 700; }
.chart-box { width: 100%; height: 205px; overflow: visible; }

/* Tables and toolbars */
.toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.search-wrap { position: relative; flex: 1 1 240px; max-width: 320px; }
.search-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #9eaba5;
}
.search-wrap .input { padding-left: 35px; }
.table-wrap {
  width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #cbd7cf transparent;
}
.table-wrap::-webkit-scrollbar { height: 6px; }
.table-wrap::-webkit-scrollbar-track { background: transparent; }
.table-wrap::-webkit-scrollbar-thumb { border-radius: 6px; background: #cbd7cf; }
.table { width: 100%; border-collapse: collapse; }
.table th {
  padding: 10px 9px;
  border-bottom: 1px solid var(--line);
  color: #929e99;
  font-size: 9px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
  background: #fbfcfa;
}
.table td {
  padding: 12px 9px;
  border-bottom: 1px solid #eff2ed;
  color: #41564f;
  font-size: 11px;
  vertical-align: middle;
}
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: #fafbf9; }
.companion-row { cursor: pointer; }
.companion-row:hover { background: #f5faf7 !important; }
.avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #dcebe5;
  color: var(--brand);
  font-size: 11px;
  font-weight: 700;
}
.avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.star { color: var(--amber); }
.chip {
  display: inline-block;
  margin: 1px 3px 1px 0;
  padding: 3px 7px;
  border-radius: 5px;
  background: #f1f5f1;
  color: #5a7069;
  font-size: 9px;
  white-space: nowrap;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 9px;
  font-weight: 600;
  white-space: nowrap;
}
.tag::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .8; }
.tag.green { background: var(--green-soft); color: #23845e; }
.tag.gray { background: #f0f2ef; color: #858f8a; }
.tag.orange { background: var(--amber-soft); color: #b87220; }
.tag.blue { background: var(--blue-soft); color: #3d7797; }
.tag.red { background: var(--danger-soft); color: var(--danger); }
.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 16px;
  color: #8d9994;
  font-size: 9px;
}
.pagination > span:first-child { margin-right: auto; }
.page-btn {
  min-width: 29px;
  height: 29px;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: #fff;
  color: #71817a;
  font-size: 10px;
}
.page-btn:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.page-btn.active { border-color: var(--brand); background: var(--brand); color: #fff; }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }
.empty { padding: 42px 12px; text-align: center; color: #98a49f; font-size: 11px; }

/* Companion profile modal */
body.profile-modal-open { overflow: hidden; }
.profile-modal-mask {
  position: fixed;
  inset: 0;
  z-index: 68;
  background: rgba(14, 37, 32, .38);
  backdrop-filter: blur(3px);
}
.profile-modal {
  position: fixed;
  z-index: 70;
  left: 50%;
  top: 50%;
  width: min(780px, calc(100vw - 32px));
  max-height: 86vh;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(14, 43, 35, .24);
  animation: profile-modal-in .18s ease-out;
}
@keyframes profile-modal-in {
  from { opacity: 0; transform: translate(-50%, -47%) scale(.985); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.profile-modal-head {
  min-height: 72px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.profile-modal-head h2 {
  margin-top: 2px;
  color: #1d3b34;
  font-size: 20px;
  line-height: 1.35;
}
.profile-modal-kicker {
  color: var(--brand);
  font-size: 11px;
  font-weight: 700;
}
.profile-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 22px 24px;
}
.profile-summary {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 18px;
  border: 1px solid #e2ebe5;
  border-radius: 8px;
  background: linear-gradient(125deg, #f2faf6 0%, #fbfdfb 100%);
}
.profile-photo {
  width: 116px;
  height: 116px;
  flex: 0 0 116px;
  overflow: hidden;
  border: 3px solid #fff;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #dcebe5;
  color: var(--brand);
  box-shadow: 0 8px 22px rgba(23, 76, 62, .12);
}
.profile-photo img { width: 100%; height: 100%; object-fit: cover; }
.profile-summary-main { flex: 1; min-width: 0; }
.profile-badges { display: flex; flex-wrap: wrap; gap: 7px; }
.profile-summary-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 20px;
}
.profile-summary-grid div { min-width: 0; }
.profile-summary-grid span {
  display: block;
  color: #8b9994;
  font-size: 11px;
}
.profile-summary-grid strong {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: #29473f;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-section {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid #edf1ed;
}
.profile-section-title {
  margin-bottom: 11px;
  color: #304e46;
  font-size: 13px;
  font-weight: 700;
}
.profile-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.profile-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.profile-info-item {
  padding: 13px 14px;
  border-radius: 7px;
  background: #f7faf8;
}
.profile-info-item > span {
  color: #84938d;
  font-size: 11px;
}
.profile-info-item p {
  margin-top: 5px;
  color: #3e5850;
  font-size: 13px;
  line-height: 1.65;
}
.upload-preview-sm {
  height: 108px;
  margin-top: 6px;
  border: 1px solid #e1e9e4;
  border-radius: 8px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #f4f8f5;
  color: #91a39c;
}
.upload-preview-sm img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.application-doc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.profile-intro {
  color: #465f58;
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-wrap;
}
.openid-binding {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #e3ebe5;
  border-radius: 8px;
  background: #f8faf8;
}
.openid-binding code {
  flex: 1;
  min-width: 0;
  color: #36564d;
  font-family: Consolas, monospace;
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.openid-binding .btn { flex: none; }
.profile-prices {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.profile-price {
  padding: 10px 8px;
  border: 1px solid #e3eae5;
  border-radius: 7px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fbfcfa;
}
.profile-price span { color: #84938d; font-size: 10px; }
.profile-price strong { margin-top: 3px; color: var(--brand); font-size: 13px; }
.profile-modal-foot {
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  background: #fbfcfa;
}
.profile-modal-foot .btn { min-width: 94px; }

/* Forms and drawers */
.drawer-mask {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(14, 37, 32, .3);
  backdrop-filter: blur(2px);
}
.drawer {
  position: fixed;
  z-index: 60;
  top: 0;
  right: 0;
  bottom: 0;
  width: 448px;
  max-width: 100vw;
  display: flex;
  flex-direction: column;
  background: #fff;
  box-shadow: -18px 0 52px rgba(18, 43, 36, .15);
  animation: drawer-in .2s ease-out;
}
@keyframes drawer-in { from { transform: translateX(24px); opacity: .6; } to { transform: translateX(0); opacity: 1; } }
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  color: #233d38;
  font-size: 15px;
  font-weight: 700;
}
.drawer-body { flex: 1; overflow-y: auto; padding: 4px 22px 24px; }
.drawer-foot {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  background: #fbfcfa;
}
.drawer-foot .btn { min-width: 94px; }
.section { margin-top: 22px; }
.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #2d4842;
  font-size: 12px;
  font-weight: 700;
}
.section-title::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--amber); }
.basic-row { display: flex; gap: 18px; align-items: flex-start; }
.avatar-upload { width: 82px; flex: 0 0 82px; text-align: center; }
.avatar-preview {
  width: 82px;
  height: 82px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--brand-soft);
  color: var(--brand);
}
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.upload-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  color: var(--brand);
  font-size: 10px;
}
.form-grid { flex: 1; min-width: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-item { min-width: 0; }
.form-item.full { grid-column: 1 / -1; }
.form-label { display: block; margin-bottom: 6px; color: #667770; font-size: 10px; font-weight: 600; }
.required { color: var(--danger); }
.form-hint { margin-top: 4px; color: #a1aaa6; font-size: 9px; text-align: right; }
.chip-select { display: flex; flex-wrap: wrap; gap: 7px; }
.chip-option {
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid #dde4dd;
  border-radius: 6px;
  background: #fff;
  color: #63766f;
  font-size: 10px;
}
.chip-option:hover { border-color: #b8cbc2; }
.chip-option.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
.chip-option .x { margin-left: 4px; color: #7e958c; }
.price-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.price-item { text-align: center; }
.price-item .input { margin-top: 4px; padding: 7px 4px; text-align: center; }
.price-cell { width: 88px; min-width: 76px; padding: 7px 8px; text-align: center; }
.price-person { display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.price-person .chip { margin-left: 1px; }
.price-row-focus {
  background: #eef8f4;
  box-shadow: inset 4px 0 0 #0f766e;
}
.price-row-focus .price-cell {
  border-color: #8fc5b8;
  background: #ffffff;
}
.upload-box {
  min-height: 116px;
  padding: 20px 14px;
  border: 1px dashed #cfd8d0;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: #fbfcfa;
  color: #94a19b;
  font-size: 10px;
  text-align: center;
  cursor: pointer;
  transition: .15s;
}
.upload-box:hover { border-color: var(--brand); background: var(--brand-faint); }
.upload-box img { max-width: 100px; max-height: 70px; object-fit: contain; }
.switch-row { display: flex; align-items: center; gap: 9px; color: #60736c; font-size: 11px; }
.switch {
  width: 38px;
  height: 22px;
  flex: 0 0 38px;
  display: inline-block;
  vertical-align: middle;
  position: relative;
  border-radius: 12px;
  background: #d5ddd7;
  cursor: pointer;
  transition: .18s;
}
.switch.on { background: var(--brand); }
.switch::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.14);
  transition: .18s;
}
.switch.on::after { left: 19px; }

/* Other views */
.page-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.form-card { max-width: 720px; }
.setting-row { display: flex; align-items: center; gap: 16px; margin-bottom: 17px; }
.setting-row label { width: 126px; flex: 0 0 126px; color: #647770; font-size: 11px; text-align: right; }
.schedule-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.schedule-row .input { flex: 1; width: auto; min-width: 0; }
.schedule-row .icon-btn { flex: 0 0 auto; }
.schedule-empty { padding: 7px 0; color: var(--muted); font-size: 12px; }
.hospital-item {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  margin-bottom: 8px;
  background: #fff;
}
.hospital-item:hover { border-color: #cbd7cf; background: #fbfcfa; }
.hospital-add { display: flex; gap: 9px; margin-bottom: 15px; }
.table .companion-name-cell { white-space: nowrap; }
.table .companion-rating-cell { white-space: nowrap; }
.toast {
  position: fixed;
  z-index: 100;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  padding: 11px 18px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  background: #193d37;
  color: #fff;
  font-size: 11px;
  box-shadow: 0 12px 32px rgba(20, 45, 37, .22);
}
.toast.error { background: #9e403b; }

/* Responsive */
.app-shell.sidebar-collapsed .sidebar { width: 76px; flex-basis: 76px; padding-left: 10px; padding-right: 10px; }
.app-shell.sidebar-collapsed .brand { justify-content: center; padding: 0; }
.app-shell.sidebar-collapsed .brand-text,
.app-shell.sidebar-collapsed .nav-caption,
.app-shell.sidebar-collapsed .nav-item span,
.app-shell.sidebar-collapsed .connection-card div,
.app-shell.sidebar-collapsed .sidebar-version { display: none; }
.app-shell.sidebar-collapsed .nav-item { justify-content: center; padding: 11px; }
.app-shell.sidebar-collapsed .nav-item.active::before { left: -10px; }
.app-shell.sidebar-collapsed .connection-card { justify-content: center; padding: 15px 10px; }
.app-shell.sidebar-collapsed .connection-dot { margin-top: 0; }
.sidebar-mask { display: none; }

@media (max-width: 1180px) {
  .content { padding: 20px 22px 32px; }
  .topbar { padding: 0 22px; }
  .page-sub, .date-chip { display: none; }
  .bottom-grid { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .login-view { grid-template-columns: minmax(380px, .9fr) minmax(400px, 1.1fr); }
  .login-story h1 { font-size: 38px; }
  .stats-row { grid-template-columns: 1fr; }
  .stat-card { min-height: 132px; }
  .stat-chart { width: 120px; }
}
@media (max-width: 820px) {
  .login-view { display: block; background: #f7f6f1; }
  .login-visual { display: none; }
  .login-panel { min-height: 100vh; padding: 34px 24px; align-items: center; }
  .login-form-wrap { max-width: 400px; }
  .login-mobile-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 42px;
    color: #23423b;
    font-size: 14px;
    font-weight: 700;
  }
  .app-shell { display: block; }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 246px;
    flex-basis: 246px;
    transform: translateX(-102%);
    box-shadow: 18px 0 48px rgba(16, 59, 54, .18);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-mask {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 25;
    background: rgba(14, 37, 32, .3);
  }
  .app-shell.sidebar-collapsed .sidebar {
    width: 246px;
    flex-basis: 246px;
    padding: 22px 16px 18px;
  }
  .app-shell.sidebar-collapsed .brand { justify-content: flex-start; padding: 0 8px; }
  .app-shell.sidebar-collapsed .brand-text,
  .app-shell.sidebar-collapsed .nav-caption,
  .app-shell.sidebar-collapsed .nav-item span,
  .app-shell.sidebar-collapsed .connection-card div,
  .app-shell.sidebar-collapsed .sidebar-version { display: block; }
  .app-shell.sidebar-collapsed .nav-item { justify-content: flex-start; padding: 10px 12px; }
  .app-shell.sidebar-collapsed .connection-card { justify-content: flex-start; padding: 13px 12px; }
  .app-shell.sidebar-collapsed .connection-dot { margin-top: 5px; }
  .topbar { min-height: 70px; padding: 0 16px; }
  .page-icon { display: none; }
  .admin-copy, .caret { display: none; }
  .admin { padding: 4px; }
  .content { padding: 18px 16px 28px; }
  .card { padding: 16px; }
  .table { min-width: 720px; }
  .recent-list-head, .recent-row { min-width: 660px; }
  .drawer { width: 100vw; }
}
@media (max-width: 560px) {
  .login-panel { padding: 26px 20px; align-items: flex-start; }
  .login-form-wrap { padding-top: 12px; }
  .login-mobile-brand { margin-bottom: 34px; }
  .login-heading h2 { font-size: 27px; }
  .login-options { align-items: flex-start; }
  .secure-label { display: none; }
  .page-title-row h1 { font-size: 17px; }
  .page-kicker { display: none; }
  .topbar-right { gap: 5px; }
  .bell { display: none; }
  .stats-row { gap: 12px; }
  .stat-card { min-height: 124px; }
  .stat-value { font-size: 27px; }
  .card-head { align-items: flex-start; }
  .toolbar { align-items: stretch; }
  .search-wrap { max-width: none; flex-basis: 100%; }
  .toolbar .select { flex: 1; }
  .price-grid { grid-template-columns: repeat(2, 1fr); }
  .basic-row { display: block; }
  .avatar-upload { width: 100%; margin-bottom: 18px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-item.full { grid-column: auto; }
  .drawer-head, .drawer-body, .drawer-foot { padding-left: 16px; padding-right: 16px; }
  .setting-row { display: block; }
  .setting-row label { display: block; width: auto; margin-bottom: 7px; text-align: left; }
  .hospital-add { flex-direction: column; }
  .login-footnote { margin-top: 18px; }
}

/* Readability scale */
:root {
  --sidebar-width: 260px;
  --topbar-height: 90px;
}
body { font-size: 15px; line-height: 1.6; }
.login-brand { font-size: 17px; }
.login-brand-logo { height: 96px; }
.login-mobile-logo { height: 86px; }
.login-kicker { min-height: 32px; padding: 5px 13px; font-size: 14px; }
.login-story p { font-size: 17px; }
.login-visual-foot { font-size: 14px; }
.login-panel { padding: 58px 7vw; }
.login-form-wrap { max-width: 430px; }
.eyebrow { font-size: 13px; }
.login-heading h2 { font-size: 36px; }
.login-heading p { margin-top: 12px; font-size: 15px; }
.login-form-wrap form { margin-top: 38px; }
.login-label { margin-bottom: 8px; font-size: 14px; }
.login-label:not(:first-child) { margin-top: 24px; }
.login-input .input { height: 54px; font-size: 15px; }
.remember-row { font-size: 14px; }
.remember-row input { width: 18px; height: 18px; }
.secure-label { font-size: 13px; }
.secure-label svg { width: 15px; height: 15px; }
.login-error { font-size: 14px; }
.login-submit { min-height: 52px; font-size: 15px; }
.login-footnote { font-size: 13px; }

.sidebar { padding: 24px 18px 20px; }
.brand { gap: 12px; min-height: 48px; padding: 0 8px; }
.brand-logo { width: 54px; height: 40px; flex-basis: 54px; }
.brand-text strong { font-size: 16px; }
.brand-text span { margin-top: 2px; font-size: 12px; }
.nav-caption { margin: 34px 10px 12px; font-size: 12px; }
.nav { gap: 5px; }
.nav-item { min-height: 48px; gap: 12px; padding: 11px 13px; font-size: 15px; }
.connection-card { gap: 11px; padding: 15px 13px; }
.connection-card strong { font-size: 13px; }
.connection-card span { font-size: 11px; }
.sidebar-version { font-size: 10px; }

.topbar { padding: 0 32px; }
.topbar-left { gap: 14px; }
.menu-toggle,
.icon-btn,
.page-icon { width: 42px; height: 42px; }
.menu-toggle { flex-basis: 42px; }
.page-icon { flex-basis: 42px; }
.page-kicker { font-size: 11px; }
.page-title-row h1 { font-size: 22px; }
.page-sub { font-size: 12px; }
.date-chip { padding: 8px 12px; font-size: 12px; }
.admin { min-height: 48px; gap: 10px; padding: 4px 10px 4px 6px; }
.admin-avatar { width: 38px; height: 38px; flex-basis: 38px; }
.admin-avatar.large { width: 48px; height: 48px; flex-basis: 48px; }
.admin-copy strong { font-size: 13px; }
.admin-copy small { font-size: 11px; }
.admin-popover { width: 250px; padding: 10px; }
.admin-popover-head { padding: 10px 9px 13px; }
.admin-popover-head strong { font-size: 14px; }
.admin-popover-head div span { font-size: 12px; }
.popover-action { padding: 11px 9px; font-size: 13px; }
.content { padding: 28px 32px 44px; }

.card { padding: 22px; }
.card-head { margin-bottom: 20px; }
.card-title { font-size: 16px; }
.card-extra { font-size: 13px; }
.input,
.textarea,
.select { min-height: 43px; padding: 9px 12px; font-size: 14px; }
.btn { min-height: 40px; padding: 8px 16px; font-size: 13px; }
.btn.sm { min-height: 36px; padding: 6px 12px; font-size: 12px; }
.link { min-height: 30px; padding: 4px 8px; font-size: 12px; }

.stats-row { gap: 18px; margin-bottom: 18px; }
.stat-card { min-height: 174px; padding: 20px 22px 17px; }
.stat-label { font-size: 14px; }
.stat-value { margin-top: 9px; font-size: 36px; }
.stat-icon { width: 40px; height: 40px; flex-basis: 40px; }
.stat-growth { padding: 3px 7px; font-size: 11px; }
.stat-chart { width: 104px; height: 44px; flex-basis: 104px; }
.recent-list-head { padding: 0 10px 11px; font-size: 11px; }
.recent-row { min-height: 56px; padding: 9px 10px; font-size: 13px; }
.chart-box { height: 230px; }

.search-wrap { max-width: 360px; }
.table th { padding: 12px 10px; font-size: 12px; }
.table td { padding: 14px 10px; font-size: 14px; }
.avatar { width: 40px; height: 40px; flex-basis: 40px; font-size: 14px; }
.chip { padding: 4px 8px; font-size: 11px; }
.tag { padding: 4px 9px; font-size: 11px; }
.pagination { margin-top: 18px; font-size: 11px; }
.page-btn { min-width: 32px; height: 32px; font-size: 12px; }
.empty { padding: 46px 14px; font-size: 14px; }

.drawer { width: 500px; }
.drawer-head { min-height: 74px; font-size: 18px; }
.drawer-body { padding: 6px 24px 26px; }
.drawer-foot { padding: 16px 24px; }
.section-title { font-size: 14px; }
.avatar-upload { width: 92px; flex-basis: 92px; }
.avatar-preview { width: 92px; height: 92px; }
.upload-link { font-size: 13px; }
.form-grid { gap: 14px; }
.form-label { margin-bottom: 7px; font-size: 13px; }
.form-hint { font-size: 11px; }
.chip-option { min-height: 34px; padding: 6px 11px; font-size: 13px; }
.price-cell { width: 100px; min-width: 88px; }
.upload-box { min-height: 126px; padding: 22px 16px; font-size: 12px; }
.switch-row { font-size: 13px; }
.switch { width: 42px; height: 24px; flex-basis: 42px; }
.switch::after { width: 18px; height: 18px; }
.switch.on::after { left: 21px; }

.form-card { max-width: 800px; }
.setting-row { gap: 18px; margin-bottom: 20px; }
.setting-row label { width: 145px; flex-basis: 145px; font-size: 14px; }
.hospital-item { min-height: 58px; padding: 11px 14px; }
.toast { padding: 12px 20px; font-size: 13px; }

.app-shell.sidebar-collapsed .sidebar {
  width: 88px;
  flex-basis: 88px;
  padding-left: 11px;
  padding-right: 11px;
}
.app-shell.sidebar-collapsed .nav-item { padding: 12px; }

@media (max-width: 1180px) {
  .login-view { grid-template-columns: minmax(430px, .9fr) minmax(440px, 1.1fr); }
  .content { padding: 24px 24px 38px; }
  .topbar { padding: 0 24px; }
}
@media (max-width: 820px) {
  .login-form-wrap { max-width: 430px; }
  .login-mobile-brand { font-size: 16px; }
  .login-heading h2 { font-size: 34px; }
  .sidebar,
  .app-shell.sidebar-collapsed .sidebar {
    width: 270px;
    flex-basis: 270px;
    padding: 24px 18px 20px;
  }
  .topbar { min-height: 76px; padding: 0 18px; }
  .page-title-row h1 { font-size: 21px; }
  .content { padding: 22px 18px 34px; }
  .card { padding: 20px; }
  .table { min-width: 820px; }
  .recent-list-head,
  .recent-row { min-width: 740px; }
}
@media (max-width: 560px) {
  .login-mobile-brand { margin-bottom: 38px; }
  .login-mobile-logo { height: 76px; }
  .login-heading h2 { font-size: 32px; }
  .page-title-row h1 { font-size: 21px; }
  .content { padding: 20px 16px 32px; }
  .card { padding: 18px; }
  .stat-card { min-height: 146px; padding: 20px; }
  .stat-value { font-size: 33px; }
  .drawer-head,
  .drawer-body,
  .drawer-foot { padding-left: 18px; padding-right: 18px; }
}

@media (max-width: 680px) {
  .profile-modal {
    width: calc(100vw - 20px);
    max-height: 92vh;
  }
  .profile-modal-head { padding: 14px 16px; }
  .profile-modal-body { padding: 16px; }
  .profile-summary { flex-direction: column; }
  .profile-photo {
    width: 96px;
    height: 96px;
    flex-basis: 96px;
  }
  .profile-summary-grid,
  .profile-info-grid { grid-template-columns: 1fr; }
  .application-doc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-prices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-modal-foot { padding: 12px 16px; }
  .openid-binding { flex-direction: column; align-items: stretch; }
  .openid-binding .btn { width: 100%; }
}

/* Layout refinement */
:root {
  --sidebar-width: 244px;
  --topbar-height: 84px;
  --canvas: #f2f5f1;
  --line: #e1e8e0;
  --line-strong: #d4ddd5;
  --shadow: 0 1px 2px rgba(25, 49, 43, .035), 0 10px 28px rgba(25, 49, 43, .04);
}

body { font-size: 15px; }

.sidebar {
  padding-top: 20px;
  border-right: 1px solid rgba(255, 255, 255, .055);
  background: linear-gradient(180deg, #103b36 0%, #0d352f 100%);
}
.brand { padding: 0 9px 4px; }
.nav-caption { margin-top: 28px; }
.nav-item {
  min-height: 46px;
  padding: 10px 13px;
  border-radius: 7px;
}
.nav-item.active {
  background: #f6faf7;
  box-shadow: 0 3px 12px rgba(4, 30, 24, .12);
}
.nav-item.active::before {
  top: 8px;
  bottom: 8px;
}
.connection-card { border-radius: 7px; }

.topbar {
  padding: 0 30px;
  background: rgba(255, 255, 255, .96);
}
.topbar-left { gap: 13px; }
.page-icon {
  width: 40px;
  height: 40px;
  flex-basis: 40px;
  border: 1px solid #dbe9e2;
  border-radius: 8px;
}
.page-title-row h1 { font-size: 21px; }
.page-kicker { color: #7c918a; }
.page-sub { max-width: 430px; }
.date-chip { border-radius: 7px; }

.content {
  padding: 28px 32px 46px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .38), transparent 130px),
    var(--canvas);
}
.content > * { max-width: 1460px; }

.card {
  padding: 24px;
  border-color: var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 18px; }
.card-head {
  min-height: 44px;
  margin-bottom: 18px;
  padding-bottom: 15px;
  border-bottom: 1px solid #edf1ec;
}
.card-title { font-size: 16px; }
.card-title::before {
  width: 5px;
  height: 18px;
  border-radius: 4px;
}

.toolbar {
  gap: 10px;
  margin-bottom: 18px;
  padding: 12px;
  border: 1px solid #e7ece5;
  border-radius: 8px;
  background: #f8faf7;
}
.toolbar .input,
.toolbar .select { min-height: 40px; }
.search-wrap { max-width: 390px; }
.search-wrap .input { background: #fff; }

.table-wrap {
  border: 1px solid #e5ebe4;
  border-radius: 8px;
  background: #fff;
}
.table { min-width: 900px; }
.table th {
  padding: 13px 12px;
  background: #f7f9f6;
  color: #7e8e88;
  font-size: 12px;
  letter-spacing: .1px;
}
.table td {
  padding: 15px 12px;
  color: #364b45;
  font-size: 14px;
  line-height: 1.55;
}
.table tbody tr:nth-child(even) { background: #fcfdfb; }
.table tbody tr:hover { background: #f4f9f6; }
.table th:first-child,
.table td:first-child { padding-left: 16px; }
.table th:last-child,
.table td:last-child { padding-right: 16px; }
.orders-table { min-width: 1120px; }
.orders-table td { vertical-align: top; }
.cell-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.cell-strong { color: #253d36; font-weight: 650; }
.cell-sub { color: #7e9089; font-size: 12px; line-height: 1.45; }
.addon-line { color: #f46b2c; font-weight: 600; }
.cell-money { color: #173f36; font-size: 15px; font-weight: 750; }
.order-note { max-width: 190px; color: #5f746d !important; line-height: 1.55; }
.order-actions { display: flex; flex-wrap: wrap; gap: 4px; }

.payment-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #e7ece5;
  border-radius: 8px;
  background: #fafbf9;
}
.payment-status-grid > div {
  min-width: 0;
  padding: 14px 16px;
  border-right: 1px solid #e7ece5;
}
.payment-status-grid > div:last-child { border-right: 0; }
.payment-status-grid span,
.payment-callback > span,
.payment-missing > span {
  display: block;
  margin-bottom: 7px;
  color: #87958f;
  font-size: 12px;
}
.payment-status-grid strong { color: #2d453e; font-size: 13px; }
.payment-callback,
.payment-missing {
  margin-top: 14px;
  padding: 13px 15px;
  border: 1px solid #edf1ec;
  border-radius: 8px;
  background: #fff;
}
.payment-callback code {
  color: #456159;
  font-family: Consolas, monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.payment-missing .chip { margin-bottom: 2px; }

.avatar {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
  border: 1px solid #e1e9e3;
  border-radius: 7px;
}
.chip {
  margin: 2px 4px 2px 0;
  padding: 4px 8px;
  border-radius: 5px;
  background: #f0f4f1;
}
.tag { padding: 4px 9px; }
.link {
  min-height: 30px;
  margin-right: 2px;
  padding: 5px 8px;
  border-radius: 6px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 600;
}
.link:hover { background: var(--brand-soft); }
.link.danger { color: var(--danger); }
.link.danger:hover { background: var(--danger-soft); }

.pagination {
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid #edf1ec;
}
.page-btn { border-radius: 6px; background: #fff; }

.drawer { width: 520px; }
.drawer-head {
  min-height: 72px;
  padding: 0 24px;
  background: #fbfcfa;
}
.drawer-body { padding: 8px 24px 28px; }
.section { margin-top: 24px; }
.section-title { margin-bottom: 13px; }
.form-grid { gap: 14px; }
.drawer-foot { background: #f8faf7; }

.profile-modal-head { background: #fbfcfa; }
.profile-modal-body { padding: 22px 24px 26px; }
.profile-modal-foot {
  padding: 14px 24px;
  background: #f8faf7;
}

@media (max-width: 1180px) {
  .content { padding: 24px 24px 38px; }
  .topbar { padding: 0 24px; }
}
@media (max-width: 820px) {
  .topbar { min-height: 72px; padding: 0 16px; }
  .content { padding: 20px 16px 32px; }
  .card { padding: 18px; }
  .toolbar { padding: 10px; }
  .table { min-width: 820px; }
  .drawer { width: 100vw; }
  .payment-status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .payment-status-grid > div:nth-child(2) { border-right: 0; }
  .payment-status-grid > div:nth-child(-n+2) { border-bottom: 1px solid #e7ece5; }
}
@media (max-width: 560px) {
  .content { padding: 16px 12px 28px; }
  .card { padding: 16px; }
  .card-head { align-items: flex-start; }
  .toolbar .search-wrap { flex-basis: 100%; max-width: none; }
  .page-title-row h1 { font-size: 19px; }
  .payment-status-grid { grid-template-columns: 1fr; }
  .payment-status-grid > div {
    border-right: 0;
    border-bottom: 1px solid #e7ece5;
  }
  .payment-status-grid > div:last-child { border-bottom: 0; }
}

/* AUTO_STAFF_ACCOUNT_V1：员工账号与密码展示 */
.staff-password {
  margin: 2px 0 4px;
  font-size: 12px;
  color: #8a9a95;
  letter-spacing: 0.5px;
}
.staff-account-line {
  display: flex;
  align-items: center;
  gap: 8px;
}
.staff-account-line code {
  padding: 2px 6px;
  border-radius: 4px;
  background: #f1f5f2;
  font-size: 13px;
  color: #2f3d39;
  letter-spacing: 1px;
}
.staff-account-note {
  margin: 0 0 12px;
  color: #6b7a75;
  font-size: 13px;
  line-height: 1.6;
}
.service-order-summary {
  padding: 4px 2px 10px;
  font-size: 12px;
}
.service-order-cell {
  white-space: nowrap;
}
.service-order-cell .cell-sub {
  display: block;
  color: #6b7a75;
}
