/* =============================================================
   孝思堂 Portal — shared design system (authenticated shell + auth + components)
   Reuses the Bold Gradient home/auth tokens, fonts, buttons, cards.
   ============================================================= */
:root {
  --paper: #FFFFFF;
  --cream: #FBF6EE;
  --cream-2: #F4EAD9;
  --ink: #241712;
  --ink-2: #5C4D40;
  --ink-3: #8C7B6A;
  --line: #ECE3D6;
  --line-2: #E2D9D0;
  --crimson: #9E2B22;
  --crimson-deep: #7C1E17;
  --plum: #6B2418;
  --gold: #B0822F;
  --gold-deep: #8A6320;
  --amber: #D9A648;
  --gold-tint: #F3EAD4;
  --ok: #2F7A4D;
  --ok-tint: #E6F0E8;
  --info: #2B6E8F;
  --info-tint: #E2EEF2;
  --warn: #9A6B16;
  --warn-tint: #F6ECD6;
  --danger: #9B3A2A;
  --danger-tint: #F7E7E2;
  --grad: linear-gradient(105deg, #7C1E17 0%, #A8341F 46%, #D4A84A 100%);
  --grad-soft: linear-gradient(105deg, #F7E7DD 0%, #F6E6D2 50%, #FBEFD8 100%);
  --f-disp: 'Urbanist', sans-serif;
  --f-cn: 'Noto Serif SC', serif;
  --f-cn-sans: 'Noto Sans SC', sans-serif;
  --f-body: 'Noto Sans SC', 'Urbanist', sans-serif;
  --sh-sm: 0 4px 16px rgba(80, 50, 25, 0.08);
  --sh-md: 0 18px 44px -18px rgba(80, 45, 25, 0.24);

  --sh-lg: 0 40px 90px -36px rgba(80, 40, 20, 0.40);
  --topbar-h: 74px;
  --side-w: 266px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--f-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
}

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

::selection {
  background: var(--crimson);
  color: #fff;
}

/* The `hidden` attribute must win over any component's own display value —
   `.sumrow{display:flex}` would otherwise keep a hidden row on screen. */
[hidden] {
  display: none !important;
}

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--f-disp);
  font-weight: 800;
  font-size: 14.5px;
  padding: .7rem 1.3rem;
  border-radius: 999px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all .2s ease;
  white-space: nowrap;
}

.btn .arw {
  transition: transform .2s;
}

.btn:hover .arw {
  transform: translateX(3px);
}

.btn .cn {
  font-family: var(--f-cn-sans);
  font-weight: 600;
}

.btn-sm {
  padding: .5rem 1rem;
  font-size: 13px;
}

.btn-grad {
  background: linear-gradient(100deg, #8C2417 0%, #A8341F 55%, #B5512A 100%);
  color: #fff;
  box-shadow: 0 12px 28px -14px rgba(150, 55, 25, .5);
}

.btn-grad:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px -16px rgba(150, 55, 25, .55);
}

.btn-solid {
  background: var(--ink);
  color: #fff;
}

.btn-solid:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh-md);
}

.btn-outline {
  background: #fff;
  color: var(--ink);
  border-color: var(--line-2);
}

.btn-outline:hover {
  border-color: var(--crimson);
  color: var(--crimson);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-2);
}

.btn-ghost:hover {
  color: var(--crimson);
  background: var(--cream);
}

.btn[disabled],
.btn.is-disabled {
  opacity: .5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn.loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.btn.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, .5);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

.qsched,
.doc-card .qsigned,
.sigpad,
.doc-card .banner.banner-info,
.doc-card .banner.banner-warn,
.acceptblock {
  margin: clamp(1.4rem, 3vw, 2rem);
}

div[data-xst-sig-pane="type"] .sigpad {
  margin: 0;
}

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

/* ---------------- eyebrow ---------------- */
.eyebrow {
  font-family: var(--f-disp);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--crimson);
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.eyebrow::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--gold);
}

/* ============================================================
   AUTHENTICATED SHELL — topbar + sidebar + main
   ============================================================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--topbar-h);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 clamp(1.2rem, 2.5vw, 2rem);
}

.topbar .brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar .brand img {
  height: 52px;
  width: auto;
}

.topbar .brand .bn {
  font-family: var(--f-cn);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 1px;
  line-height: 1.1;
  color: var(--ink);
}

.topbar .brand .bn small {
  display: block;
  font-family: var(--f-disp);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 2px;
}

.tb-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.tb-icon {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  display: grid;
  place-items: center;
  color: var(--ink-2);
  cursor: pointer;
  transition: all .2s;
}

.tb-icon:hover {
  border-color: var(--crimson);
  color: var(--crimson);
}

.tb-icon svg {
  width: 20px;
  height: 20px;
}

.tb-icon .dot {
  position: absolute;
  top: 8px;
  right: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--crimson);
  border: 2px solid #fff;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 5px 6px 5px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  transition: all .2s;
}

.user-chip:hover {
  border-color: var(--line-2);
  box-shadow: var(--sh-sm);
}

.user-chip .uinfo {
  text-align: right;
  line-height: 1.2;
}

.user-chip .uinfo b {
  font-family: var(--f-cn-sans);
  font-weight: 600;
  font-size: 13.5px;
  color: var(--ink);
  display: block;
}

.user-chip .uinfo span {
  font-family: var(--f-disp);
  font-weight: 600;
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex: none;
  background: var(--grad);
  display: grid;
  place-items: center;
  color: #fff;
  font-family: var(--f-cn);
  font-weight: 700;
  font-size: 16px;
  overflow: hidden;
}

.avatar {
  position: relative;
}

/* Same reasoning as .photo-prev: a centred grid item will not resolve
   100% against the box, so the photo is positioned instead. */
.avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.body-row {
  display: flex;
  align-items: flex-start;
}

.sidebar {
  position: sticky;
  top: var(--topbar-h);
  width: var(--side-w);
  flex: none;
  height: calc(100vh - var(--topbar-h));
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 1.6rem 1rem;
  display: flex;
  flex-direction: column;
}

.snav-group {
  font-family: var(--f-disp);
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 0 .9rem;
  margin: 1.4rem 0 .5rem;
}

.snav-group:first-child {
  margin-top: 0;
}

.snav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.snav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: .72rem .9rem;
  border-radius: 12px;
  font-family: var(--f-cn-sans);
  font-weight: 500;
  font-size: 14.5px;
  color: var(--ink-2);
  transition: all .18s;
}

.snav a svg {
  width: 19px;
  height: 19px;
  flex: none;
  color: var(--ink-3);
  transition: color .18s;
}

.snav a:hover {
  background: var(--cream);
  color: var(--ink);
}

.snav a.active {
  background: var(--gold-tint);
  color: var(--crimson);
  font-weight: 700;
}

.snav a.active svg {
  color: var(--crimson);
}

.snav a.active::before {
  content: '';
  position: absolute;
  left: -1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 22px;
  border-radius: 0 4px 4px 0;
  background: var(--crimson);
}

.snav a .en {
  font-family: var(--f-disp);
  font-weight: 600;
  font-size: 10.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-left: auto;
}

.snav a.active .en {
  color: var(--crimson);
  opacity: .7;
}

.side-foot {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.side-foot a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: .72rem .9rem;
  border-radius: 12px;
  font-family: var(--f-cn-sans);
  font-weight: 500;
  font-size: 14.5px;
  color: var(--ink-2);
  transition: all .18s;
}

.side-foot a svg {
  width: 19px;
  height: 19px;
  color: var(--ink-3);
}

.side-foot a:hover {
  background: var(--danger-tint);
  color: var(--danger);
}

.side-foot a:hover svg {
  color: var(--danger);
}

.main {
  flex: 1;
  min-width: 0;
  padding: clamp(1.6rem, 3vw, 2.6rem) clamp(1.4rem, 3vw, 2.8rem) 4rem;
}

.main-wrap {
  max-width: 74rem;
  margin: 0 auto;
}

/* page header */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.8rem;
}

.page-head .ph-l .crumb {
  font-family: var(--f-disp);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: .5rem;
}

.page-head h1 {
  font-family: var(--f-cn);
  font-weight: 700;
  font-size: clamp(26px, 3vw, 36px);
  margin: 0;
  letter-spacing: .5px;
}

.page-head h1 em {
  font-style: normal;
  font-family: var(--f-disp);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .04em;
  color: var(--ink-3);
  margin-left: .6rem;
}

.page-head p {
  color: var(--ink-2);
  font-size: 14.5px;
  margin: .45rem 0 0;
}

.page-head .ph-r {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* ---------------- cards ---------------- */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--sh-sm);
}

.card-pad {
  padding: clamp(1.2rem, 2vw, 1.7rem);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid var(--line);
}

.card-head h3 {
  font-family: var(--f-cn);
  font-weight: 700;
  font-size: 18px;
  margin: 0;
  letter-spacing: .5px;
}

.card-head h3 em {
  font-style: normal;
  font-family: var(--f-disp);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-left: .5rem;
}

.card-head a.more {
  font-family: var(--f-disp);
  font-weight: 700;
  font-size: 13px;
  color: var(--crimson);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* stat cards */
.stat-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}

.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.4rem 1.5rem;
  box-shadow: var(--sh-sm);
  position: relative;
  overflow: hidden;
}

.stat-card .ic {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--grad-soft);
  border: 1px solid #EFDEC9;
  display: grid;
  place-items: center;
  color: var(--plum);
  font-family: var(--f-cn);
  font-weight: 700;
  font-size: 19px;
  margin-bottom: 1rem;
}

.stat-card .lbl {
  font-family: var(--f-cn-sans);
  font-weight: 500;
  font-size: 13px;
  color: var(--ink-3);
}

.stat-card .lbl .en {
  display: block;
  font-family: var(--f-disp);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-top: 1px;
}

.stat-card .val {
  font-family: var(--f-disp);
  font-weight: 900;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.05;
  color: var(--ink);
  margin-top: .5rem;
}

.stat-card .val.c {
  color: var(--crimson);
}

.stat-card .trend {
  font-family: var(--f-disp);
  font-weight: 700;
  font-size: 12px;
  margin-top: .5rem;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.stat-card .trend.up {
  color: var(--ok);
}

.stat-card .trend.flat {
  color: var(--ink-3);
}

/* ---------------- status badges ---------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--f-disp);
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: .02em;
  padding: 4px 11px;
  border-radius: 999px;
  white-space: nowrap;
}

.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge-ok {
  background: var(--ok-tint);
  color: var(--ok);
}

.badge-info {
  background: var(--info-tint);
  color: var(--info);
}

.badge-warn {
  background: var(--warn-tint);
  color: var(--warn);
}

.badge-danger {
  background: var(--danger-tint);
  color: var(--danger);
}

.badge-neutral {
  background: var(--cream-2);
  color: var(--ink-2);
}

/* ---------------- tables ---------------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--sh-sm);
}

table.dt {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

table.dt thead th {
  text-align: left;
  font-family: var(--f-disp);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: .9rem 1rem;
  border-bottom: 1.5px solid var(--line);
  background: var(--cream);
  white-space: nowrap;
  position: sticky;
  top: 0;
}

table.dt tbody td {
  padding: .95rem 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  vertical-align: middle;
  white-space: nowrap;
}

table.dt tbody tr:last-child td {
  border-bottom: none;
}

table.dt tbody tr:hover {
  background: #FCFAF5;
}

table.dt .t-strong {
  font-family: var(--f-cn-sans);
  font-weight: 600;
  color: var(--ink);
}

table.dt .t-num {
  font-family: var(--f-disp);
  font-weight: 600;
  color: var(--ink);
}

table.dt .t-muted {
  color: var(--ink-3);
}

.row-act {
  display: inline-flex;
  gap: 6px;
}

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #fff;
  display: grid;
  place-items: center;
  color: var(--ink-2);
  cursor: pointer;
  transition: all .18s;
}

.icon-btn:hover {
  border-color: var(--crimson);
  color: var(--crimson);
}

.icon-btn svg {
  width: 16px;
  height: 16px;
}

.link-act {
  font-family: var(--f-disp);
  font-weight: 700;
  font-size: 12.5px;
  color: var(--crimson);
  cursor: pointer;
}

/*
 * The same control as a <button>. Buttons do not inherit type, so these were
 * being written inline — and one of them carried `font: inherit`, which is a
 * shorthand: it reset family, weight AND size back to the parent's, quietly
 * undoing everything .link-act had just set. That is why 标为已读 rendered
 * larger than the 查看 View link beside it.
 */
button.link-act {
  background: none;
  border: 0;
  padding: 0;
  line-height: inherit;
}

.link-act:hover {
  text-decoration: underline;
}

/* ---------------- filters bar ---------------- */
.filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 1.1rem;
}

.filters .search {
  position: relative;
  flex: 1;
  min-width: 14rem;
}

.filters .search svg {
  position: absolute;
  left: .85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--ink-3);
}

.filters .search input {
  width: 100%;
  padding: .62rem .9rem .62rem 2.4rem;
  border: 1.5px solid var(--line-2);
  border-radius: 11px;
  background: #fff;
  font-family: var(--f-body);
  font-size: 14px;
  color: var(--ink);
}

.filters .search input:focus {
  outline: none;
  border-color: var(--crimson);
  box-shadow: 0 0 0 3px rgba(158, 43, 34, .12);
}

.fselect {
  position: relative;
}

.fselect select {
  appearance: none;
  padding: .62rem 2.2rem .62rem .9rem;
  border: 1.5px solid var(--line-2);
  border-radius: 11px;
  background: #fff;
  font-family: var(--f-body);
  font-size: 14px;
  color: var(--ink-2);
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%238C7B6A' stroke-width='2.4'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .8rem center;
}

.fselect select:focus {
  outline: none;
  border-color: var(--crimson);
}

/* ---------------- forms (shared with auth) ---------------- */
.field {
  margin-bottom: 1.1rem;
}

.field label {
  display: block;
  font-family: var(--f-cn-sans);
  font-weight: 500;
  font-size: 13.5px;
  color: var(--ink);
  margin-bottom: .42rem;
}

.field label .req {
  color: var(--crimson);
  margin-left: 2px;
}

.field label .en {
  color: var(--ink-3);
  font-weight: 400;
  font-family: var(--f-disp);
  font-size: 11.5px;
  letter-spacing: .03em;
  margin-left: .35rem;
}

.input {
  width: 100%;
  padding: .78rem .95rem;
  border: 1.5px solid var(--line-2);
  border-radius: 12px;
  background: #fff;
  font-family: var(--f-body);
  font-size: 14.5px;
  color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}

.input::placeholder {
  color: #B7AC9C;
}

.input:focus {
  outline: none;
  border-color: var(--crimson);
  box-shadow: 0 0 0 3px rgba(158, 43, 34, .13);
}

.input:disabled,
.input[readonly] {
  background: var(--cream);
  color: var(--ink-3);
  cursor: not-allowed;
}

select.input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238C7B6A' stroke-width='2.4'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .9rem center;
  padding-right: 2.4rem;
}

.field.bad .input {
  border-color: var(--danger);
}

.field .hint {
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: .35rem;
}

.field .err {
  display: none;
  font-size: 12px;
  color: var(--danger);
  margin-top: .35rem;
}

.field.bad .err {
  display: block;
}

.field.bad .hint {
  display: none;
}

.lock-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--f-disp);
  font-weight: 600;
  font-size: 10.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.3rem;
}

.grid-2 .col-2 {
  grid-column: 1/-1;
}

@media(max-width:680px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* checkbox / toggle */
.check {
  display: inline-flex;
  align-items: flex-start;
  gap: .6rem;
  font-family: var(--f-cn-sans);
  font-size: 13.5px;
  color: var(--ink-2);
  cursor: pointer;
  line-height: 1.55;
  /* Positioning context for the real input, which is overlaid on the box. */
  position: relative;
}

/*
 * Transparent but real, and sized to match .box beneath it.
 *
 * It used to be width:0;height:0, which makes the control unfocusable — and a
 * browser that cannot anchor a validation bubble to a `required` control it
 * cannot focus does not report the error, it **silently refuses to submit**.
 * Clicking 确认接受 with the box unticked therefore did nothing at all, with no
 * message and no reload. Giving it real dimensions restores the bubble.
 */
.check input {
  position: absolute;
  top: 0;
  left: 0;
  width: 19px;
  height: 19px;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.check input:focus-visible+.box {
  outline: 2px solid var(--crimson);
  outline-offset: 2px;
}

.check .box {
  width: 19px;
  height: 19px;
  border: 1.6px solid var(--line-2);
  border-radius: 6px;
  display: grid;
  place-items: center;
  transition: all .18s;
  flex: none;
  margin-top: 1px;
}

.check input:checked+.box {
  background: var(--crimson);
  border-color: var(--crimson);
}

.check .box::after {
  content: '';
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(42deg) scale(0);
  transition: transform .18s;
}

.check input:checked+.box::after {
  transform: rotate(42deg) scale(1);
}

.toggle {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: var(--line-2);
  transition: background .2s;
  flex: none;
  cursor: pointer;
}

.toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
}

.toggle.on {
  background: var(--crimson);
}

.toggle.on::after {
  transform: translateX(18px);
}

/* ---------------- tabs ---------------- */
.tabs {
  display: inline-flex;
  gap: 4px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
}

.tabs button {
  font-family: var(--f-cn-sans);
  font-weight: 600;
  font-size: 13.5px;
  color: var(--ink-2);
  padding: .5rem 1.1rem;
  border: none;
  background: transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: all .18s;
}

.tabs button.active {
  background: #fff;
  color: var(--crimson);
  box-shadow: var(--sh-sm);
}

/* ---------------- banner / toast ---------------- */
.banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  border-radius: 14px;
  padding: 1rem 1.3rem;
  margin-bottom: 1.5rem;
}

.banner .bic {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
}

.banner .bx {
  flex: 1;
}

.banner .bx b {
  font-family: var(--f-cn-sans);
  font-weight: 600;
  font-size: 14.5px;
  display: block;
}

.banner .bx span {
  font-size: 13px;
}

.banner-warn {
  background: var(--warn-tint);
  border: 1px solid #E9D6A8;
  color: var(--warn);
}

.banner-warn .bic {
  background: var(--warn);
  color: #fff;
}

.banner-info {
  background: var(--info-tint);
  border: 1px solid #C7DEE6;
  color: var(--info);
}

.banner-info .bic {
  background: var(--info);
  color: #fff;
}

.banner-ok {
  background: var(--ok-tint);
  border: 1px solid #BFDBC8;
  color: var(--ok);
}

.banner-ok .bic {
  background: var(--ok);
  color: #fff;
}

.banner-danger {
  background: var(--danger-tint);
  border: 1px solid #E8C4BD;
  color: var(--danger);
}

.banner-danger .bic {
  background: var(--danger);
  color: #fff;
}

.banner .bx b,
.banner .bx span {
  color: var(--ink);
}

.toast {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  background: var(--ok-tint);
  border: 1px solid #BFDBC8;
  color: var(--ok);
  border-radius: 12px;
  padding: .7rem 1.1rem;
  font-size: 13.5px;
  font-family: var(--f-cn-sans);
  font-weight: 500;
}

.toast .tk {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ok);
  display: grid;
  place-items: center;
}

.toast .tk::after {
  content: '';
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(42deg) translateY(-1px);
}

/* ---------------- empty state ---------------- */
.empty {
  text-align: center;
  padding: 3.5rem 1.5rem;
}

.empty .eic {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: var(--cream);
  border: 1px dashed var(--line-2);
  display: grid;
  place-items: center;
  margin: 0 auto 1.1rem;
  color: var(--ink-3);
}

.empty .eic svg {
  width: 28px;
  height: 28px;
}

.empty h4 {
  font-family: var(--f-cn);
  font-weight: 700;
  font-size: 18px;
  margin: 0 0 .4rem;
}

.empty p {
  color: var(--ink-3);
  font-size: 13.5px;
  margin: 0 auto;
  max-width: 22rem;
}

/* ---------------- modal ---------------- */
/* The overlay stays displayed and fades on opacity — display:none cannot be
   transitioned. visibility and pointer-events keep it inert while closed, so a
   hidden modal never swallows a click or takes keyboard focus. */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(40, 20, 12, .5);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 100;
  padding: 3rem 1.5rem;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .22s ease, visibility 0s linear .22s;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity .22s ease, visibility 0s;
}

.modal {
  background: #fff;
  border-radius: 22px;
  box-shadow: var(--sh-lg);
  width: 100%;
  max-width: 48rem;
  overflow: hidden;
  transform: translateY(-12px) scale(.98);
  transition: transform .22s cubic-bezier(.22, 1, .36, 1);
}

.modal-overlay.open .modal {
  transform: none;
}

@media (prefers-reduced-motion:reduce) {

  .modal-overlay,
  .modal-overlay.open,
  .modal,
  .modal-overlay.open .modal {
    transition: none;
  }

  .modal {
    transform: none;
  }
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.3rem 1.6rem;
  border-bottom: 1px solid var(--line);
}

.modal-head h3 {
  font-family: var(--f-cn);
  font-weight: 700;
  font-size: 20px;
  margin: 0;
}

.modal-head h3 em {
  font-style: normal;
  font-family: var(--f-disp);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-left: .5rem;
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--ink-2);
}

.modal-close:hover {
  border-color: var(--crimson);
  color: var(--crimson);
}

.modal-body {
  padding: 1.6rem;
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 1.2rem 1.6rem;
  border-top: 1px solid var(--line);
  background: var(--cream);
}

/* ---------------- announcement cards ---------------- */
.anc-grid {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
}

.anc {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--sh-sm);
  transition: transform .25s, box-shadow .25s;
  display: flex;
  flex-direction: column;
}

.anc:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-lg);
}

.anc .pic {
  aspect-ratio: 16/9;
  overflow: hidden;
}

.anc .pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.anc .body {
  padding: 1.2rem 1.3rem 1.4rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.anc .meta {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: .7rem;
}

.anc .tag {
  font-family: var(--f-disp);
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #fff;
  background: var(--grad);
  padding: 4px 10px;
  border-radius: 999px;
}

.anc .date {
  font-size: 12px;
  color: var(--ink-3);
}

.anc h4 {
  font-family: var(--f-cn);
  font-weight: 700;
  font-size: 17px;
  margin: 0 0 .5rem;
  line-height: 1.4;
}

.anc p {
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.65;
  margin: 0;
}

.anc.pinned {
  border-color: #E8D6BE;
  box-shadow: 0 0 0 1px #EAD9BD, var(--sh-md);
}

.anc .pin {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--f-disp);
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: .6rem;
}

/* quick links */
.quick-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
}

.quick {
  display: flex;
  align-items: center;
  gap: 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.1rem 1.2rem;
  box-shadow: var(--sh-sm);
  transition: all .22s;
  cursor: pointer;
}

.quick:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-md);
  border-color: var(--line-2);
}

.quick .qic {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--grad-soft);
  border: 1px solid #EFDEC9;
  display: grid;
  place-items: center;
  color: var(--plum);
  flex: none;
}

.quick .qic svg {
  width: 21px;
  height: 21px;
}

.quick b {
  font-family: var(--f-cn-sans);
  font-weight: 600;
  font-size: 14.5px;
  color: var(--ink);
  display: block;
}

.quick span {
  font-family: var(--f-disp);
  font-weight: 600;
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.quick.disabled {
  opacity: .6;
  cursor: not-allowed;
}

.quick.disabled:hover {
  transform: none;
  box-shadow: var(--sh-sm);
}

.quick .soon {
  margin-left: auto;
  font-family: var(--f-disp);
  font-weight: 700;
  font-size: 9.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--warn);
  background: var(--warn-tint);
  padding: 3px 8px;
  border-radius: 999px;
}

/* activity feed */
.feed {
  display: flex;
  flex-direction: column;
}

.feed-item {
  display: flex;
  gap: 13px;
  padding: .95rem 0;
  border-bottom: 1px solid var(--line);
}

.feed-item:last-child {
  border-bottom: none;
}

.feed-item .fic {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--cream);
  color: var(--crimson);
}

.feed-item .fic svg {
  width: 17px;
  height: 17px;
}

.feed-item .ftx {
  flex: 1;
  font-size: 13.5px;
  color: var(--ink-2);
}

.feed-item .ftx b {
  color: var(--ink);
  font-family: var(--f-cn-sans);
  font-weight: 600;
}

.feed-item .ft {
  font-family: var(--f-disp);
  font-weight: 600;
  font-size: 11.5px;
  color: var(--ink-3);
  white-space: nowrap;
}

/* section title within page */
.sec-title {
  font-family: var(--f-cn);
  font-weight: 700;
  font-size: 19px;
  margin: 2.2rem 0 1rem;
  letter-spacing: .5px;
  display: flex;
  align-items: center;
  gap: .6rem;
}

.sec-title em {
  font-style: normal;
  font-family: var(--f-disp);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.muted {
  color: var(--ink-3);
}

.strong {
  color: var(--ink);
  font-weight: 600;
}

.spacer {
  flex: 1;
}

.grid-cols {
  display: grid;
  gap: 1.3rem;
}

@media(min-width:900px) {
  .cols-2-1 {
    grid-template-columns: 1.6fr 1fr;
  }
}

/* ============================================================
   AUTH PAGES (centred card) — shared with login/register
   ============================================================ */
.atop {
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.atop-wrap {
  max-width: 78rem;
  margin: 0 auto;
  padding: .6rem clamp(1.2rem, 4vw, 2.6rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.atop .brand img {
  height: 60px;
  width: auto;
  display: block;
}

.atop .help {
  font-family: var(--f-cn-sans);
  font-weight: 500;
  font-size: 14.5px;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.atop .help span {
  transition: transform .2s;
}

.atop .help:hover {
  color: var(--crimson);
}

.atop .help:hover span {
  transform: translateX(3px);
}

.awrap {
  position: relative;
  min-height: calc(100vh - 74px);
  display: grid;
  place-items: center;
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1rem, 4vw, 3rem);
  overflow: hidden;
}

.ablob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .5;
  pointer-events: none;
  z-index: 0;
}

.ablob.b1 {
  width: 34rem;
  height: 34rem;
  background: radial-gradient(circle, #F3D7BE, transparent 70%);
  top: -13rem;
  right: -8rem;
}

.ablob.b2 {
  width: 30rem;
  height: 30rem;
  background: radial-gradient(circle, #FBE0BD, transparent 70%);
  bottom: -12rem;
  left: -8rem;
}

.acard {
  position: relative;
  z-index: 1;
  width: 100%;
  background: #fff;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--sh-lg);
  border: 1px solid var(--line);
}

.abrand {
  position: relative;
  color: #fff;
  padding: clamp(2.2rem, 3.4vw, 3.2rem);
  isolation: isolate;
}

.abrand .bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.abrand .bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}

.abrand::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(150deg, rgba(70, 12, 8, .92) 0%, rgba(108, 28, 16, .82) 50%, rgba(150, 80, 30, .55) 100%);
}

.abrand .wm {
  position: absolute;
  right: -1.2rem;
  bottom: -3rem;
  z-index: -1;
  font-family: var(--f-cn);
  font-weight: 900;
  font-size: 15rem;
  line-height: 1;
  color: rgba(255, 255, 255, .08);
}

.abrand .ae {
  font-family: var(--f-disp);
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--amber);
}

.abrand h1 {
  font-family: var(--f-cn);
  font-weight: 900;
  font-size: clamp(26px, 3vw, 40px);
  margin: .9rem 0 0;
  letter-spacing: 1px;
}

.abrand h1 .latin {
  display: block;
  font-family: var(--f-disp);
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .7);
  margin-top: .5rem;
}

.abrand .lede {
  color: rgba(255, 255, 255, .85);
  font-size: 14.5px;
  line-height: 1.8;
  margin: 1.1rem 0 0;
  max-width: 26rem;
}

.atrust {
  list-style: none;
  margin: 1.6rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .8rem;
}

.atrust li {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  font-size: 14px;
  color: rgba(255, 255, 255, .92);
  font-family: var(--f-cn-sans);
}

.atrust li .tk {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  display: grid;
  place-items: center;
  margin-top: 1px;
}

.atrust li .tk::before {
  content: '';
  width: 6px;
  height: 10px;
  border: solid var(--amber);
  border-width: 0 2px 2px 0;
  transform: rotate(42deg) translateY(-1px);
}

.abody {
  padding: clamp(2rem, 3.4vw, 3rem);
}

.aform-head h2 {
  font-family: var(--f-cn);
  font-weight: 700;
  font-size: 25px;
  margin: 0;
  letter-spacing: .5px;
}

.aform-head h2 em {
  font-style: normal;
  font-family: var(--f-disp);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .06em;
  color: var(--ink-3);
  margin-left: .5rem;
}

.aform-head p {
  color: var(--ink-2);
  font-size: 14px;
  margin: .4rem 0 0;
}

.adiv {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.6rem 0 1.2rem;
  color: var(--ink-3);
  font-size: 12.5px;
  font-family: var(--f-cn-sans);
}

.adiv::before,
.adiv::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  border-radius: 13px;
  padding: .85rem 1rem;
  font-size: 14px;
  line-height: 1.5;
}

.alert .ai {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--f-disp);
  font-weight: 900;
  font-size: 13px;
  margin-top: 1px;
}

.alert-error {
  background: var(--danger-tint);
  color: var(--danger);
  border: 1px solid #E9C6BC;
}

.alert-error .ai {
  background: var(--danger);
  color: #fff;
}

.alert-ok {
  background: var(--ok-tint);
  color: var(--ok);
  border: 1px solid #BFDBC8;
}

.alert-ok .ai {
  background: var(--ok);
  color: #fff;
}

.amini-foot {
  text-align: center;
  padding: 1.4rem;
  font-size: 12.5px;
  color: var(--ink-3);
  border-top: 1px solid var(--line);
  background: var(--cream);
}

.pw {
  position: relative;
}

.pw .input {
  padding-right: 3rem;
}

.eye {
  position: absolute;
  right: .4rem;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  cursor: pointer;
  width: 2.3rem;
  height: 2.3rem;
  display: grid;
  place-items: center;
  color: var(--ink-3);
  border-radius: 8px;
}

.eye:hover {
  color: var(--crimson);
  background: var(--cream);
}

.eye svg {
  width: 19px;
  height: 19px;
}

.pstrength .pbar {
  display: flex;
  gap: 6px;
  margin-bottom: .45rem;
}

.pstrength .pbar i {
  height: 5px;
  flex: 1;
  border-radius: 3px;
  background: var(--line);
  transition: background .25s;
}

.pstrength.lv2 .pbar i:nth-child(-n+2) {
  background: var(--amber);
}

.pstrength.lv3 .pbar i:nth-child(-n+3) {
  background: var(--gold-deep);
}

.pstrength.lv4 .pbar i {
  background: var(--ok);
}

.pstrength .preq {
  font-size: 11.5px;
  color: var(--ink-3);
}

.fsec {
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--line);
}

.fsec:first-child {
  padding-top: .3rem;
}

.fsec:last-of-type {
  border-bottom: none;
}

.fsec-head {
  display: flex;
  align-items: center;
  gap: .85rem;
  margin-bottom: 1.3rem;
}

.fsec-head .no {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--grad-soft);
  border: 1px solid #EFDEC9;
  display: grid;
  place-items: center;
  font-family: var(--f-disp);
  font-weight: 800;
  font-size: 14px;
  color: var(--plum);
}

.fsec-head h3 {
  font-family: var(--f-cn);
  font-weight: 700;
  font-size: 19px;
  margin: 0;
  letter-spacing: .5px;
}

.fsec-head h3 em {
  font-style: normal;
  font-family: var(--f-disp);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-left: .5rem;
}

.consent {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 1rem 1.1rem;
}

/* ============================================================
   PHASE 2 — booking funnel, seat-map, payment
   ============================================================ */
/* step indicator */
.steps {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-wrap: wrap;
  margin-bottom: 1.8rem;
}

.steps .stp {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .5rem .9rem;
  border-radius: 999px;
  font-family: var(--f-cn-sans);
  font-weight: 600;
  font-size: 13px;
  color: var(--ink-3);
  background: #fff;
  border: 1px solid var(--line);
}

.steps .stp .n {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--cream-2);
  color: var(--ink-3);
  display: grid;
  place-items: center;
  font-family: var(--f-disp);
  font-weight: 800;
  font-size: 11px;
}

.steps .stp.active {
  background: var(--gold-tint);
  border-color: #E8D6BE;
  color: var(--crimson);
}

.steps .stp.active .n {
  background: var(--crimson);
  color: #fff;
}

.steps .stp.done {
  color: var(--ink-2);
}

.steps .stp.done .n {
  background: var(--ok);
  color: #fff;
}

/* A completed step is a link back to itself. Only those are interactive —
   an <a> here always means "you can go there", so the cursor and hover are
   the honest signal. */
a.stp {
  cursor: pointer;
  transition: border-color .18s, background .18s, transform .18s;
}

a.stp:hover {
  border-color: var(--crimson);
  background: var(--cream);
  transform: translateY(-1px);
}

a.stp:focus-visible {
  outline: 2px solid var(--crimson);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {

  a.stp,
  a.stp:hover {
    transition: none;
    transform: none;
  }
}

.steps .sep {
  width: 18px;
  height: 1.5px;
  background: var(--line-2);
  flex: none;
}

/* funnel cards (hall / zone) */
.pick-grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
}

a.pick,
button.pick {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.4rem 1.5rem;
  box-shadow: var(--sh-sm);
  cursor: pointer;
  transition: all .22s;
  text-align: left;
}

a.pick:hover,
button.pick:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-lg);
  border-color: #E8D6BE;
}

a.pick .floor,
button.pick .floor {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--f-disp);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold-deep);
  background: var(--gold-tint);
  padding: 4px 11px;
  border-radius: 999px;
  margin-bottom: 1rem;
}

a.pick h3,
button.pick h3 {
  font-family: var(--f-cn);
  font-weight: 700;
  font-size: 24px;
  margin: 0;
  letter-spacing: 1px;
}

a.pick .en,
button.pick .en {
  font-family: var(--f-disp);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: block;
  margin-top: 2px;
}

a.pick .availbar,
button.pick .availbar {
  height: 8px;
  border-radius: 999px;
  background: var(--cream-2);
  overflow: hidden;
  margin: 1.1rem 0 .5rem;
}

a.pick .availbar i,
button.pick .availbar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--amber));
  border-radius: 999px;
}

a.pick .availtx,
button.pick .availtx {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--ink-2);
}

a.pick .availtx b,
button.pick .availtx b {
  font-family: var(--f-disp);
  font-weight: 800;
  color: var(--ink);
}

a.pick .tiers,
button.pick .tiers {
  display: flex;
  gap: 8px;
  margin-top: 1rem;
}

a.pick .tiers span,
button.pick .tiers span {
  flex: 1;
  text-align: center;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .5rem;
  font-size: 12px;
  color: var(--ink-2);
}

a.pick .tiers span b,
button.pick .tiers span b {
  display: block;
  font-family: var(--f-disp);
  font-weight: 800;
  font-size: 15px;
  color: var(--ink);
}

a.pick .thumb,
button.pick .thumb {
  aspect-ratio: 16/8;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1rem;
}

a.pick .thumb img,
button.pick .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

a.pick .go,
button.pick .go {
  position: absolute;
  top: 1.4rem;
  right: 1.4rem;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--cream);
  display: grid;
  place-items: center;
  color: var(--crimson);
  transition: all .2s;
}

a.pick:hover .go,
button.pick:hover .go {
  background: var(--crimson);
  color: #fff;
  transform: translateX(2px);
}

/* breadcrumb path */
.fpath {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--f-cn-sans);
  font-size: 13.5px;
  color: var(--ink-3);
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
}

.fpath a {
  color: var(--crimson);
  font-weight: 600;
}

.fpath .cur {
  color: var(--ink);
  font-weight: 600;
}

.fpath .arr {
  color: var(--line-2);
}

/* level pyramid */
.pyramid {
  display: flex;
  flex-direction: column-reverse;
  gap: 5px;
}

.plevel {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .7rem 1.1rem;
  cursor: pointer;
  transition: all .18s;
}

.plevel:hover {
  border-color: var(--crimson);
  box-shadow: var(--sh-sm);
  transform: translateX(3px);
}

.plevel .lvn {
  font-family: var(--f-disp);
  font-weight: 800;
  font-size: 14px;
  color: var(--ink);
  width: 5.5rem;
  flex: none;
}

.plevel .lvn small {
  display: block;
  font-family: var(--f-cn-sans);
  font-weight: 500;
  font-size: 11px;
  color: var(--ink-3);
}

.plevel .pbar {
  flex: 1;
  height: 7px;
  border-radius: 999px;
  background: var(--cream-2);
  overflow: hidden;
}

.plevel .pbar i {
  display: block;
  height: 100%;
  border-radius: 999px;
}

.plevel .pcount {
  font-size: 12px;
  color: var(--ink-2);
  width: 7rem;
  text-align: right;
  flex: none;
}

.tier-band {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin: 1.2rem 0 .7rem;
  font-family: var(--f-disp);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.tier-band .pz {
  padding: 3px 11px;
  border-radius: 999px;
}

.tier-upper {
  color: var(--gold-deep);
}

.tier-upper .pz {
  background: var(--gold-tint);
}

.tier-lower {
  color: var(--info);
}

.tier-lower .pz {
  background: var(--info-tint);
}

/* seat map */
.seatmap {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.3rem;
  box-shadow: var(--sh-sm);
  overflow-x: auto;
}

.seatrow {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .6rem;
}

.seatrow .rl {
  width: 8rem;
  flex: none;
  font-family: var(--f-disp);
  font-weight: 700;
  font-size: 12px;
  color: var(--ink-2);
}

.seatrow .rl small {
  display: block;
  font-family: var(--f-cn-sans);
  font-weight: 500;
  font-size: 10.5px;
  color: var(--ink-3);
}

.seatrow .cells {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.seat {
  width: 44px;
  height: 38px;
  border-radius: 8px;
  border: 1.5px solid var(--line-2);
  background: #fff;
  display: grid;
  place-items: center;
  font-family: var(--f-disp);
  font-weight: 700;
  font-size: 10px;
  color: var(--ink-2);
  cursor: pointer;
  position: relative;
  transition: all .15s;
}

.seat:hover {
  border-color: var(--crimson);
}

.seat.pick {
  background: #C0281F;
  border-color: #C0281F;
  color: #fff;
}

.seat.hold {
  background: #FDF3CC;
  border-color: #E8C33D;
  color: #8A6E10;
  cursor: not-allowed;
}

.seat.sold {
  background: #DCEEE1;
  border-color: #2F7A4D;
  color: #1F6B3B;
  cursor: not-allowed;
}

.seat .ci {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fff;
  display: none;
  place-items: center;
}

.seat.pick .ci {
  display: grid;
}

.seat.pick .ci::after {
  content: '';
  width: 4px;
  height: 7px;
  border: solid #C0281F;
  border-width: 0 2px 2px 0;
  transform: rotate(42deg) translateY(-1px);
}

.seatlegend {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.seatlegend .lg {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--ink-2);
}

.seatlegend .sw {
  width: 20px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid var(--line-2);
}

.seatlegend .sw.pick {
  background: #C0281F;
  border-color: #C0281F;
}

.seatlegend .sw.hold {
  background: #FDF3CC;
  border-color: #E8C33D;
}

.seatlegend .sw.sold {
  background: #DCEEE1;
  border-color: #2F7A4D;
}

/* ④ Position lays out a whole zone, so its rows scroll sideways instead of
   wrapping and its seats widen to fit a four-digit position number. */
.funnel-grid {
  display: grid;
  gap: 1.5rem;
}

@media(min-width:1080px) {
  .funnel-grid.with-panel {
    grid-template-columns: 1fr 21rem;
    align-items: start;
  }
}

.funnel-grid.with-panel>div:first-child {
  min-width: 0;
  max-width: 100%;
}

/* Anchor targets have to reserve room for the sticky topbar, or the browser
   parks them underneath it. --topbar-h shrinks on small screens, so the offset
   follows automatically. */
.seatrow[id],
#xst-main {
  scroll-margin-top: calc(var(--topbar-h) + 1.2rem);
}


.xst-screen-book .seatmap {
  width: 100%;
  overflow-x: visible;
}

.xst-screen-book .seatrow {
  align-items: flex-start;
  flex-wrap: nowrap;
  min-width: 0;
}

.xst-screen-book .seatrow .rl {
  flex: none;
  width: 9rem;
}

.xst-screen-book .seatrow .cells {
  padding-top: 10px;
  flex: 1;
  min-width: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
}

.xst-screen-book .seat {
  width: auto;
  min-width: 64px;
  padding: 0 1rem;
  font-size: 10.5px;
  letter-spacing: .02em;
  scroll-snap-align: start;
}

.xst-screen-book .seat small {
  font-size: inherit;
  letter-spacing: -.5px;
}

.seatband {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .5rem 0;
  font-family: var(--f-disp);
  font-weight: 700;
  font-size: 12px;
  color: var(--ink-3);
}

.seatband~.seatband {
  margin-top: 1rem;
}

.seatband .pz {
  font-weight: 800;
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
}

.seatband.upper .pz {
  background: var(--gold-tint);
  color: var(--gold-deep);
}

.seatband.lower .pz {
  background: var(--info-tint);
  color: var(--info);
}

/* selection panel */
.selpanel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--sh-sm);
  position: sticky;
  top: calc(var(--topbar-h) + 1rem);
}

.selpanel .sp-head {
  padding: 1.1rem 1.3rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--f-cn);
  font-weight: 700;
  font-size: 17px;
}

.selpanel .sp-body {
  padding: 1.1rem 1.3rem;
  max-height: 20rem;
  overflow-y: auto;
}

.sel-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .7rem;
  padding: .6rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.sel-item:last-child {
  border-bottom: none;
}

.sel-item .si-id {
  font-family: var(--f-disp);
  font-weight: 700;
  color: var(--ink);
}

.sel-item .si-x {
  color: var(--ink-3);
  cursor: pointer;
}

.sel-item .si-x:hover {
  color: var(--danger);
}

.selpanel .sp-foot {
  padding: 1.1rem 1.3rem;
  border-top: 1px solid var(--line);
  background: var(--cream);
  border-radius: 0 0 16px 16px;
}

.sumrow {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  color: var(--ink-2);
  padding: .32rem 0;
}

.sumrow.discount {
  color: var(--ok);
}

.sumrow.total {
  font-family: var(--f-disp);
  font-weight: 800;
  font-size: 18px;
  color: var(--ink);
  border-top: 1px solid var(--line-2);
  margin-top: .4rem;
  padding-top: .6rem;
}

.sumrow .amt {
  font-family: var(--f-disp);
  font-weight: 700;
  color: var(--ink);
}

.disc-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--ok-tint);
  color: var(--ok);
  border-radius: 8px;
  padding: .4rem .7rem;
  font-size: 12px;
  font-family: var(--f-cn-sans);
  font-weight: 600;
  margin: .5rem 0;
}

/* payment stages */
.stage {
  display: flex;
  gap: 1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.3rem 1.4rem;
  box-shadow: var(--sh-sm);
  margin-bottom: 1rem;
}

.stage .sn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  flex: none;
  display: grid;
  place-items: center;
  font-family: var(--f-disp);
  font-weight: 800;
  font-size: 16px;
}

.stage.done .sn {
  background: var(--ok-tint);
  color: var(--ok);
}

.stage.active .sn {
  background: var(--crimson);
  color: #fff;
}

.stage.todo .sn {
  background: var(--cream-2);
  color: var(--ink-3);
}

.stage .sx {
  flex: 1;
}

.stage .sx h4 {
  font-family: var(--f-cn);
  font-weight: 700;
  font-size: 17px;
  margin: 0 0 .3rem;
}

.stage .sx h4 em {
  font-style: normal;
  font-family: var(--f-disp);
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-left: .4rem;
}

.stage .sx p {
  font-size: 13px;
  color: var(--ink-2);
  margin: .2rem 0 0;
  line-height: 1.6;
}

.stage .samt {
  text-align: right;
  flex: none;
}

.stage .samt .a {
  font-family: var(--f-disp);
  font-weight: 900;
  font-size: 20px;
  color: var(--ink);
}

.stage .samt .s {
  font-size: 11px;
  color: var(--ink-3);
}

.pay-line {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  color: var(--ink-2);
  padding: .34rem 0;
}

.pay-line.gst {
  color: var(--gold-deep);
  font-weight: 600;
}

.pay-line.total {
  font-family: var(--f-disp);
  font-weight: 800;
  font-size: 17px;
  color: var(--ink);
  border-top: 1px solid var(--line-2);
  margin-top: .4rem;
  padding-top: .6rem;
}

.pay-line .amt {
  font-family: var(--f-disp);
  font-weight: 700;
  color: var(--ink);
}

/* signature pad */
.sigpad {
  border: 1.5px dashed var(--line-2);
  border-radius: 13px;
  height: 9rem;
  background: var(--cream);
  display: grid;
  place-items: center;
  color: var(--ink-3);
  position: relative;
  cursor: crosshair;
}

.sig-script {
  font-family: 'Cormorant Garamond', 'Noto Serif SC', serif;
}

.sigtabs {
  display: inline-flex;
  gap: 4px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 1rem;
}

.sigtabs button {
  font-family: var(--f-cn-sans);
  font-weight: 600;
  font-size: 13px;
  color: var(--ink-2);
  padding: .45rem 1rem;
  border: none;
  background: transparent;
  border-radius: 999px;
  cursor: pointer;
}

.sigtabs button.active {
  background: #fff;
  color: var(--crimson);
  box-shadow: var(--sh-sm);
}

/* doc / standalone customer header */
.doc-top {
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.doc-top-wrap {
  max-width: 60rem;
  margin: 0 auto;
  padding: 1rem clamp(1.2rem, 4vw, 2rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.doc-top img {
  height: 56px;
}

/*
 * The right-hand side of the document header: the hold countdown and, for a
 * signed-in viewer, a way back to the listing they came from. Grouped so the
 * wrapper's space-between still puts the logo and this pair at the two ends.
 */
.doc-top-r {
  display: flex;
  align-items: center;
  gap: .7rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.doc-back {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem .9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.doc-back:hover,
.doc-back:focus-visible {
  background: var(--cream);
  border-color: var(--crimson);
  color: var(--crimson);
}

/* Under 560px the label and the countdown cannot share a line. */
@media (max-width: 560px) {
  .doc-top-wrap {
    flex-wrap: wrap;
    gap: .8rem;
  }

  .doc-top-r {
    width: 100%;
    justify-content: flex-start;
  }
}

.doc-wrap {
  max-width: 60rem;
  margin: 0 auto;
  padding: clamp(1.6rem, 4vw, 2.6rem) clamp(1.2rem, 4vw, 2rem) 4rem;
}

.doc-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--sh-md);
  overflow: hidden;
}

/* countdown chip */
.countdown {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--f-disp);
  font-weight: 800;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--info-tint);
  color: var(--info);
}

.countdown.soon {
  background: var(--warn-tint);
  color: var(--warn);
}

.countdown svg {
  width: 13px;
  height: 13px;
}

tr.expiring td {
  background: var(--warn-tint) !important;
}

/* ============================================================
   SCREEN MODIFIERS — ported from the per-page inline <style>
   blocks in the confirmed mockups so every auth screen shares
   one stylesheet. Visual output is unchanged.
   ============================================================ */
body.xst-auth {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body.xst-auth .awrap {
  flex: 1;
  min-height: 0;
}

/* split card: brand panel + form (login, forgot, reset) */
.acard.acard-split {
  display: grid;
  grid-template-columns: .82fr 1fr;
}

.acard.acard-split .abrand {
  display: flex;
  flex-direction: column;
}

.acard.acard-split .abrand .lede {
  margin-bottom: auto;
}

/* stacked card: hero band above a wide form (registration) */
.acard.acard-stacked {
  max-width: 62rem;
  margin: 0 auto;
}

.acard.acard-stacked .abrand {
  padding: clamp(2rem, 3.2vw, 2.8rem) clamp(2rem, 4vw, 3.2rem);
}

.acard.acard-stacked .abrand h1 {
  font-size: clamp(24px, 2.8vw, 36px);
}

.acard.acard-stacked .abody {
  padding: clamp(1.6rem, 3.2vw, 2.8rem);
}

/* narrow card: single-column, no brand panel (OTP verify) */
.acard.acard-narrow {
  max-width: 32rem;
}

/* Per-screen card widths — each reproduces that mockup's own max-width,
   which the design shipped in per-page <style> blocks. */
.xst-screen-login .acard {
  max-width: 64rem;
}

.xst-screen-forgot .acard,
.xst-screen-reset .acard {
  max-width: 60rem;
}

.xst-screen-register .acard,
.xst-screen-register-agent .acard {
  max-width: 62rem;
}

/* Login/forgot/reset/verify shipped slightly larger form metrics than the
   registration pages. Scoped so each screen matches its own mockup. */
.xst-screen-login .abody,
.xst-screen-forgot .abody,
.xst-screen-reset .abody,
.xst-screen-verify .abody {
  padding: clamp(2.2rem, 3.4vw, 3.4rem);
  display: flex;
  flex-direction: column;
}

.xst-screen-login .field,
.xst-screen-forgot .field,
.xst-screen-reset .field,
.xst-screen-verify .field {
  margin-bottom: 1.15rem;
}

.xst-screen-login .field label,
.xst-screen-forgot .field label,
.xst-screen-reset .field label,
.xst-screen-verify .field label {
  margin-bottom: .45rem;
}

.xst-screen-login .field label .en,
.xst-screen-forgot .field label .en,
.xst-screen-reset .field label .en,
.xst-screen-verify .field label .en {
  font-size: 12px;
  letter-spacing: .04em;
  margin-left: .4rem;
}

.xst-screen-login .input,
.xst-screen-forgot .input,
.xst-screen-reset .input,
.xst-screen-verify .input {
  padding: .82rem 1rem;
  font-size: 15px;
}

.xst-screen-login .pw .input,
.xst-screen-forgot .pw .input,
.xst-screen-reset .pw .input,
.xst-screen-verify .pw .input {
  padding-right: 3.2rem;
}

.xst-screen-login .eye,
.xst-screen-forgot .eye,
.xst-screen-reset .eye,
.xst-screen-verify .eye {
  right: .5rem;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 9px;
}

.xst-screen-login .eye svg,
.xst-screen-forgot .eye svg,
.xst-screen-reset .eye svg,
.xst-screen-verify .eye svg {
  width: 20px;
  height: 20px;
}

.xst-screen-login .btn,
.xst-screen-forgot .btn,
.xst-screen-reset .btn,
.xst-screen-verify .btn {
  padding: .95rem 1.6rem;
  font-size: 15px;
}

.xst-screen-login .aform-head h2,
.xst-screen-forgot .aform-head h2,
.xst-screen-reset .aform-head h2,
.xst-screen-verify .aform-head h2 {
  font-size: 27px;
}

.xst-screen-login .aform-head h2 em,
.xst-screen-forgot .aform-head h2 em,
.xst-screen-reset .aform-head h2 em,
.xst-screen-verify .aform-head h2 em {
  font-size: 14px;
  margin-left: .55rem;
}

.xst-screen-login .aform-head p,
.xst-screen-forgot .aform-head p,
.xst-screen-reset .aform-head p,
.xst-screen-verify .aform-head p {
  font-size: 14.5px;
}

.xst-screen-login .row-between {
  margin: .2rem 0 1.5rem;
}

.xst-screen-login .check,
.xst-screen-login .link {
  font-size: 13.5px;
}

/* Reset any stray UA/theme chrome on our own controls. The portal renders a
   standalone document, but belt-and-braces keeps buttons flat if a stylesheet
   ever slips through. */
.xst-portal button {
  font-family: inherit;
}

.xst-portal .eye,
.xst-portal .eye:hover,
.xst-portal .eye:focus {
  border: 0;
  outline: 0;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
}

.xst-portal .eye:focus-visible {
  box-shadow: 0 0 0 3px rgba(158, 43, 34, .2);
}

.xst-portal .btn {
  -webkit-appearance: none;
  appearance: none;
  text-decoration: none;
}

.xst-portal .input {
  -webkit-appearance: none;
  appearance: none;
  box-shadow: none;
}

.xst-portal .input:focus {
  box-shadow: 0 0 0 3px rgba(158, 43, 34, .13);
}

.field .hint {
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: .35rem;
}

.field .err {
  display: none;
  font-size: 12px;
  color: var(--danger);
  margin-top: .35rem;
}

.field.bad .input {
  border-color: var(--danger);
}

.field.bad .err {
  display: block;
}

.field.bad .hint {
  display: none;
}

.field label .req {
  color: var(--crimson);
  margin-left: 2px;
}

.field label .en {
  color: var(--ink-3);
  font-weight: 400;
  font-family: var(--f-disp);
  font-size: 11.5px;
  letter-spacing: .03em;
  margin-left: .35rem;
}

.field.col-2 {
  grid-column: 1 / -1;
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: .2rem 0 1.4rem;
  flex-wrap: wrap;
}

.link {
  font-family: var(--f-cn-sans);
  font-size: 13.5px;
  color: var(--crimson);
  font-weight: 500;
}

.link:hover {
  text-decoration: underline;
}

.btn.full {
  width: 100%;
}

.reg-links {
  display: flex;
  flex-direction: column;
  gap: .7rem;
}

.locked-note {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  margin-top: 1rem;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-3);
  background: var(--cream);
  border: 1px dashed var(--line-2);
  border-radius: 11px;
  padding: .7rem .9rem;
}

.locked-note b {
  color: var(--ink-2);
  font-weight: 600;
}

.form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.4rem;
  padding-top: 1.6rem;
  flex-wrap: wrap;
}

.form-foot .signin {
  font-family: var(--f-cn-sans);
  font-size: 13.5px;
  color: var(--ink-2);
}

.form-foot .signin a {
  color: var(--crimson);
  font-weight: 600;
}

.form-foot .signin a:hover {
  text-decoration: underline;
}

.approve-note {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-3);
  margin-top: 1rem;
}

.code-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--cream);
  border: 1px dashed var(--line-2);
  border-radius: 11px;
  padding: .7rem .9rem;
  font-size: 12.5px;
  color: var(--ink-3);
}

.code-pill b {
  font-family: var(--f-disp);
  font-weight: 800;
  color: var(--ink-2);
  letter-spacing: .04em;
}

.back-login {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--f-cn-sans);
  font-size: 13.5px;
  color: var(--crimson);
  font-weight: 600;
  margin-top: 1.4rem;
}

.succ-ic {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--ok-tint);
  display: grid;
  place-items: center;
  margin-bottom: 1.1rem;
}

.succ-ic svg {
  width: 28px;
  height: 28px;
  color: var(--ok);
}

/* OTP code entry */
.otp-input {
  font-family: var(--f-disp);
  font-weight: 800;
  font-size: 26px;
  letter-spacing: .55em;
  text-align: center;
  padding: .9rem 1rem .9rem 1.55rem;
}

/* skip link — keyboard users land here first */
.xst-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--crimson);
  color: #fff;
  padding: .7rem 1.2rem;
  border-radius: 0 0 10px 0;
}

.xst-skip:focus {
  left: 0;
}

@media(max-width:820px) {
  .acard.acard-split {
    grid-template-columns: 1fr;
    max-width: 30rem;
  }

  .acard.acard-split .abrand {
    display: none;
  }
}

@media(max-width:680px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* sidebar: screens that arrive in a later phase, shown inert */
.snav .is-soon {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: .72rem .9rem;
  border-radius: 12px;
  font-family: var(--f-cn-sans);
  font-weight: 500;
  font-size: 14.5px;
  color: var(--ink-3);
  opacity: .55;
  cursor: not-allowed;
}

.snav .is-soon svg {
  width: 19px;
  height: 19px;
  flex: none;
  color: var(--ink-3);
}

.snav .is-soon .en {
  font-family: var(--f-disp);
  font-weight: 600;
  font-size: 10.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-left: auto;
}

.side-foot-en {
  margin-left: auto;
  font-family: var(--f-disp);
  font-size: 10.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ============================================================
   DATE PICKER — calendar popover replacing the native date input.
   Same interaction model as the reference (month header, ‹ ›,
   weekday row, day grid, Cancel / Set), themed to the portal's
   crimson-and-gold palette rather than the reference's blue.
   ============================================================ */
.xst-dp-field {
  position: relative;
}

.xst-dp-input {
  cursor: pointer;
  padding-right: 2.8rem !important;
}

.xst-dp-input::-webkit-calendar-picker-indicator {
  display: none;
}

.xst-dp-icon {
  position: absolute;
  right: .9rem;
  top: 50%;
  transform: translateY(-50%);
  width: 19px;
  height: 19px;
  color: var(--ink-3);
  pointer-events: none;
  transition: color .2s;
}

.xst-dp-field:focus-within .xst-dp-icon {
  color: var(--crimson);
}

.xst-dp {
  position: absolute;
  z-index: 120;
  top: calc(100% + 12px);
  left: 0;
  width: 20.5rem;
  max-width: calc(100vw - 2rem);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--sh-lg);
  padding: 1.1rem 1.1rem .9rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}

.xst-dp.open {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.xst-dp.drop-up {
  top: auto;
  bottom: calc(100% + 12px);
}

.xst-dp.align-right {
  left: auto;
  right: 0;
}

/* pointer caret */
.xst-dp::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 2.2rem;
  width: 16px;
  height: 16px;
  background: #fff;
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  transform: rotate(45deg);
  border-radius: 3px 0 0 0;
}

.xst-dp.drop-up::before {
  top: auto;
  bottom: -8px;
  transform: rotate(225deg);
}

.xst-dp.align-right::before {
  left: auto;
  right: 2.2rem;
}

.xst-dp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .9rem;
}

.xst-dp-title {
  display: inline-flex;
  align-items: baseline;
  gap: .45rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: var(--f-cn);
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
  padding: .25rem .5rem;
  border-radius: 10px;
  transition: background .18s;
}

.xst-dp-title:hover {
  background: var(--cream);
}

.xst-dp-title .yr {
  font-family: var(--f-disp);
  font-weight: 700;
  color: var(--ink-2);
}

.xst-dp-title .cv {
  width: 14px;
  height: 14px;
  color: var(--ink-3);
  transition: transform .2s;
}

.xst-dp.panes .xst-dp-title .cv {
  transform: rotate(180deg);
}

.xst-dp-nav {
  display: flex;
  gap: 2px;
}

.xst-dp-nav button {
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--crimson);
  transition: background .18s;
}

.xst-dp-nav button:hover {
  background: var(--gold-tint);
}

.xst-dp-nav button:disabled {
  color: var(--line-2);
  cursor: not-allowed;
  background: transparent;
}

.xst-dp-nav svg {
  width: 19px;
  height: 19px;
}

.xst-dp-dows {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: .25rem;
}

.xst-dp-dows span {
  text-align: center;
  font-family: var(--f-disp);
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: .35rem 0;
}

.xst-dp-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.xst-dp-day {
  position: relative;
  aspect-ratio: 1;
  border: 0;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  font-family: var(--f-disp);
  font-weight: 600;
  font-size: 14.5px;
  color: var(--ink);
  transition: background .16s, color .16s;
}

.xst-dp-day:hover:not(:disabled) {
  background: var(--cream);
}

.xst-dp-day.out {
  color: var(--ink-3);
  opacity: .55;
}

.xst-dp-day.today:not(.sel) {
  color: var(--crimson);
  box-shadow: inset 0 0 0 1.5px var(--line-2);
}

.xst-dp-day.sel {
  background: var(--crimson);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 6px 16px -6px rgba(158, 43, 34, .6);
}

.xst-dp-day:disabled {
  color: var(--line-2);
  cursor: not-allowed;
  opacity: 1;
}

.xst-dp-day:focus-visible {
  outline: 2px solid var(--crimson);
  outline-offset: 2px;
}

/* month / year panes, reached by clicking the title — essential when the
   field is a date of birth decades in the past */
.xst-dp-pane {
  display: none;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: .2rem 0 .1rem;
}

.xst-dp.panes .xst-dp-pane {
  display: grid;
}

.xst-dp.panes .xst-dp-dows,
.xst-dp.panes .xst-dp-grid {
  display: none;
}

.xst-dp-pane button {
  border: 0;
  background: var(--cream);
  border-radius: 11px;
  cursor: pointer;
  padding: .6rem .2rem;
  font-family: var(--f-disp);
  font-weight: 600;
  font-size: 13px;
  color: var(--ink-2);
  transition: all .16s;
}

.xst-dp-pane button:hover {
  background: var(--gold-tint);
  color: var(--crimson);
}

.xst-dp-pane button.sel {
  background: var(--crimson);
  color: #fff;
}

.xst-dp-years {
  max-height: 13.5rem;
  overflow-y: auto;
}

.xst-dp-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  margin-top: .9rem;
  padding-top: .85rem;
  border-top: 1px solid var(--line);
}

.xst-dp-foot .btn {
  padding: .6rem 1.5rem;
  font-size: 14px;
}

.xst-dp-clear {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: var(--f-cn-sans);
  font-size: 12.5px;
  color: var(--ink-3);
  padding: .4rem .2rem;
}

.xst-dp-clear:hover {
  color: var(--crimson);
  text-decoration: underline;
}

@media(max-width:420px) {
  .xst-dp {
    width: calc(100vw - 2.5rem);
  }
}

@media(prefers-reduced-motion:reduce) {
  .xst-dp {
    transition: none;
  }
}

/* ============================================================
   PROFILE — photo row, file input, consent switch
   ============================================================ */
.photo-row {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  grid-column: 1/-1;
  margin-bottom: 1.1rem;
}

/* The avatar is a fixed 74px box that may hold either an initial or a photo.
   The image is positioned rather than laid out as a grid item: with
   `place-items:center` a grid item is sized to its own content, so an
   intrinsically larger photo does not reliably resolve width/height:100%
   against the box. Absolute inset removes that dependency entirely. */
.photo-prev {
  position: relative;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  flex: none;
  overflow: hidden;
  background: var(--grad);
  display: grid;
  place-items: center;
  color: #fff;
  font-family: var(--f-cn);
  font-weight: 700;
  font-size: 26px;
}

.photo-prev img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-prev .photo-initial {
  position: relative;
  z-index: 1;
}

.photo-row .xst-photo-remove {
  display: flex;
  font-size: 13px;
}

/* Dim the avatar while a removal is pending, so the pending state is visible
   before the form is saved. */
.photo-row.will-remove .photo-prev {
  opacity: .35;
  filter: grayscale(1);
}

.photo-row.bad .photo-prev {
  box-shadow: 0 0 0 2px var(--danger);
}

/* The native control is hidden but still reachable: the visible trigger is a
   <label for>, so click and keyboard both work without JS. */
.xst-file {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.xst-file:focus-visible+.btn {
  box-shadow: 0 0 0 3px rgba(158, 43, 34, .2);
}

.xst-switch {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.xst-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.xst-switch input:checked+.toggle {
  background: var(--crimson);
}

.xst-switch input:checked+.toggle::after {
  transform: translateX(18px);
}

.xst-switch input:focus-visible+.toggle {
  box-shadow: 0 0 0 3px rgba(158, 43, 34, .2);
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media(max-width:520px) {
  .photo-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* topbar chip is a link to the profile — keep the anchor visually identical */
a.user-chip {
  text-decoration: none;
  color: inherit;
}

a.user-chip:hover {
  border-color: var(--crimson);
}

a.user-chip:focus-visible {
  outline: 2px solid var(--crimson);
  outline-offset: 2px;
}

/* ============================================================
   HINTS AND INLINE ERRORS — unscoped
   These were styled only as `.field .hint` / `.field .err`, but the photo
   row is a `.photo-row`, not a `.field`. Its hint therefore rendered at body
   size and its error in body colour, so "照片超过 2MB" was easy to miss.
   Base appearance is now unscoped; the show/hide toggling stays on `.field`.
   ============================================================ */
.hint {
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--ink-3);
  margin-top: .35rem;
}

.err {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--danger);
  font-weight: 600;
}

/* Outside a .field there is no `.bad` toggle, so an error shows whenever the
   server rendered one. */
.photo-row .err,
.check+.err {
  display: block;
  margin-top: .45rem;
}

.photo-row .hint {
  font-size: 10.5px;
  color: var(--ink-3);
}

/* Make a rejected upload unmistakable: red ring on the avatar, red text. */
.photo-row.bad .photo-prev {
  box-shadow: 0 0 0 2px var(--danger);
}

.photo-row.bad .err {
  display: inline-flex;
  align-items: flex-start;
  gap: .4rem;
  background: var(--danger-tint);
  border: 1px solid #E9C6BC;
  border-radius: 9px;
  padding: .45rem .7rem;
  margin-top: .5rem;
}

/* ============================================================
   最新公告 What's New — pinned feature card, tabs as links,
   pager and article body
   ============================================================ */
.feature {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
  background: #fff;
  border: 1px solid #E8D6BE;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--sh-md);
  margin-bottom: 1.8rem;
}

.feature .pic {
  position: relative;
  min-height: 18rem;
}

.feature .pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.feature .fx {
  padding: clamp(1.6rem, 3vw, 2.4rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.feature .pin {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--f-disp);
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: .8rem;
}

.feature .pin svg {
  width: 13px;
  height: 13px;
}

.feature h2 {
  font-family: var(--f-cn);
  font-weight: 700;
  font-size: clamp(22px, 2.6vw, 30px);
  margin: 0 0 .7rem;
  letter-spacing: .5px;
  line-height: 1.3;
}

.feature p {
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.75;
  margin: 0 0 1.2rem;
}

.feature .meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1rem;
}

.feature .tag {
  font-family: var(--f-disp);
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #fff;
  background: var(--grad);
  padding: 4px 10px;
  border-radius: 999px;
}

.feature .date {
  font-size: 12px;
  color: var(--ink-3);
}

/* Tabs are links so a filter is bookmarkable and works without JS. */
.tabs a {
  font-family: var(--f-cn-sans);
  font-weight: 600;
  font-size: 13.5px;
  color: var(--ink-2);
  padding: .5rem 1.1rem;
  border-radius: 999px;
  transition: all .18s;
  white-space: nowrap;
}

.tabs a:hover {
  color: var(--crimson);
}

.tabs a.active {
  background: #fff;
  color: var(--crimson);
  box-shadow: var(--sh-sm);
}

.anc h4 a {
  color: inherit;
}

.anc h4 a:hover {
  color: var(--crimson);
}

.anc .pic {
  display: block;
}

.xst-pager {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 1.8rem;
  flex-wrap: wrap;
}

.xst-pager a {
  min-width: 38px;
  height: 38px;
  padding: 0 .7rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-disp);
  font-weight: 700;
  font-size: 13.5px;
  color: var(--ink-2);
  transition: all .18s;
}

.xst-pager a:hover {
  border-color: var(--crimson);
  color: var(--crimson);
}

.xst-pager a.current {
  background: var(--crimson);
  border-color: var(--crimson);
  color: #fff;
}

.xst-article {
  max-width: 52rem;
}

.xst-article-hero {
  width: 100%;
  border-radius: 14px;
  margin-bottom: 1.6rem;
}

.xst-article h2,
.xst-article h3 {
  font-family: var(--f-cn);
  font-weight: 700;
  margin: 1.6rem 0 .6rem;
}

.xst-article p {
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.85;
  margin: 0 0 1rem;
}

.xst-article ul,
.xst-article ol {
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.85;
  padding-left: 1.3rem;
}

.xst-article img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

.xst-article a {
  color: var(--crimson);
  text-decoration: underline;
}

@media(max-width:760px) {
  .feature {
    grid-template-columns: 1fr;
  }

  .feature .pic {
    min-height: 12rem;
  }
}

/* ── ⑤ 报价单 Quotation builder ─────────────────────────────────────── */
.qb-grid {
  display: grid;
  gap: 1.5rem;
}

@media(min-width:1080px) {
  .qb-grid {
    grid-template-columns: 1fr 22rem;
    align-items: start;
  }
}

.qb-grid>div:first-child {
  min-width: 0;
}

.cust-card {
  display: flex;
  align-items: center;
  gap: 13px;
  background: var(--gold-tint);
  border: 1px solid #E8D6BE;
  border-radius: 13px;
  padding: .9rem 1.1rem;
}

.cust-card b {
  font-family: var(--f-cn-sans);
  font-weight: 600;
}

.cust-card .cd {
  font-size: 12.5px;
  color: var(--ink-3);
}

.cust-hit {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  text-align: left;
  padding: .65rem .8rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  cursor: pointer;
  margin-bottom: .5rem;
}

.cust-hit:hover {
  border-color: var(--crimson);
}

/* customer autocomplete */
.cust-search {
  position: relative;
}

.cust-ac {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: var(--sh-md);
  overflow: hidden;
  max-height: 19rem;
  overflow-y: auto;
}

.cust-ac .opt {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  text-align: left;
  padding: .6rem .8rem;
  border: none;
  border-bottom: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font: inherit;
}

.cust-ac .opt:last-child {
  border-bottom: none;
}

.cust-ac .opt:hover,
.cust-ac .opt.on {
  background: var(--gold-tint);
}

.cust-ac .opt .avatar {
  width: 32px;
  height: 32px;
  font-size: 13px;
}

.cust-ac .opt b {
  display: block;
  font-family: var(--f-cn-sans);
  font-weight: 600;
  font-size: 13.5px;
  color: var(--ink);
}

.cust-ac .opt span {
  display: block;
  font-size: 11.5px;
  color: var(--ink-3);
}

.cust-ac .none {
  padding: .85rem .9rem;
  font-size: 12.5px;
  color: var(--ink-3);
}

.intent {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.intent input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.intent label {
  display: inline-flex;
  align-items: center;
  padding: .6rem 1.1rem;
  border: 1.5px solid var(--line-2);
  border-radius: 12px;
  font-family: var(--f-cn-sans);
  font-weight: 600;
  font-size: 13.5px;
  color: var(--ink-2);
  cursor: pointer;
}

.intent input:checked+label {
  border-color: var(--crimson);
  color: var(--crimson);
  background: #FCF3F1;
}

.intent input:focus-visible+label {
  outline: 2px solid var(--crimson);
  outline-offset: 2px;
}

.confirm-box {
  border-color: #BFDBC8;
  background: var(--ok-tint);
}

.confirm-box .ci {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--ok);
  display: grid;
  place-items: center;
  flex: none;
}

.confirm-box .ci svg {
  width: 24px;
  height: 24px;
  color: #fff;
}

.confirm-box h3 {
  font-family: var(--f-cn);
  font-weight: 700;
  font-size: 19px;
  margin: 0 0 .3rem;
  color: var(--ink);
}

.confirm-box p {
  font-size: 14px;
  color: var(--ink-2);
  margin: 0;
}

/* status filter chips, shared by the pipeline board */
.chiprow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 1.1rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: .42rem .9rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: #fff;
  font-size: 12.5px;
  color: var(--ink-2);
  cursor: pointer;
  text-decoration: none;
}

.chip:hover {
  border-color: var(--crimson);
  color: var(--crimson);
}

.chip.active {
  background: var(--crimson);
  border-color: var(--crimson);
  color: #fff;
}

/* ── 报价单 Customer document ───────────────────────────────────────── */
.qhead {
  background: var(--grad);
  color: #fff;
  padding: clamp(1.6rem, 3vw, 2.2rem);
  position: relative;
}

/*
 * Outcome banner above the quotation card.
 *
 * Sits on the page background rather than in a card of its own: it is a status
 * about the document below, not another document.
 */
.doc-outcome {
  text-align: center;
  padding: .5rem 0 1.8rem;
}

.doc-outcome .ic {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: var(--ok-tint);
  display: grid;
  place-items: center;
  margin: 0 auto 1.1rem;
}

.doc-outcome .ic svg {
  width: 30px;
  height: 30px;
  color: var(--ok);
}

.doc-outcome h2 {
  font-family: var(--f-cn);
  font-weight: 700;
  font-size: 22px;
  margin: 0;
  color: var(--ink);
}

.doc-outcome p {
  font-size: 14px;
  color: var(--ink-3);
  margin: .5rem auto 0;
  max-width: 30rem;
  line-height: 1.6;
}

/*
 * 接受与电子签名 Accept & E-Sign, the block a customer signs in.
 *
 * The design carried these declarations inline under `id="acceptblock"`; they
 * live here now so the block has a name worth targeting rather than a class
 * that hooks nothing.
 *
 * The design's `margin-top: 1.8rem` is deliberately NOT repeated here. The rule
 * further up gives .acceptblock the same margin as the schedule, signature and
 * banner panels it sits among; setting a top margin here would override one
 * side of that and leave this block out of step with its neighbours. What stays
 * is the separator — the rule and the space beneath it.
 */
.acceptblock {
  border-top: 1px solid var(--line);
  padding-top: 1.6rem;
}

/* 赠品 Free-gift note — a promotion, so it reads as an aside, not a charge. */
.giftnote {
  background: var(--gold-tint);
  border: 1px solid #E8D6BE;
  border-radius: 12px;
  padding: .7rem .85rem;
  margin: 0 0 .8rem;
}

.giftnote .gt {
  display: flex;
  gap: .5rem;
  align-items: flex-start;
  font-family: var(--f-cn-sans);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink);
}

.giftnote .ic {
  flex: none;
  font-size: 14px;
  line-height: 1.35;
}

.giftnote .gp {
  margin-top: .35rem;
  padding-left: 1.5rem;
  font-size: 11px;
  color: var(--ink-3);
}

/* Accept and Decline share a row, Decline to the right. */
.sign-actions {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin-top: 1.4rem;
  flex-wrap: wrap;
}

.qhead .qn {
  font-family: var(--f-disp);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  opacity: .85;
}

.qhead h1 {
  font-family: var(--f-cn);
  font-weight: 700;
  font-size: clamp(24px, 3vw, 32px);
  margin: .4rem 0 0;
}

.qmeta {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 1.2rem;
}

.qmeta .m .k {
  font-family: var(--f-disp);
  font-weight: 600;
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  opacity: .75;
}

.qmeta .m .v {
  font-family: var(--f-cn-sans);
  font-weight: 600;
  font-size: 14.5px;
  margin-top: 2px;
}

/*
 * Matches the confirmed design exactly: `padding:clamp(1.4rem,3vw,2rem)` on the
 * body against `clamp(1.6rem,3vw,2.2rem)` on the header above it. The two are
 * deliberately different — do not "align" them, that was tried on 2026-07-28
 * and reverted the same day.
 */
.qbody {
  padding: clamp(1.4rem, 3vw, 2rem);
}

.qtotals {
  max-width: 24rem;
  margin-left: auto;
  margin-top: 1.4rem;
}

.qsched {
  margin-top: 1.6rem;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.3rem 1.4rem;
}

.qsched h3 {
  font-family: var(--f-cn);
  font-weight: 700;
  font-size: 17px;
  margin: 0 0 1rem;
}

.qsched h3 em {
  font-style: normal;
  font-family: var(--f-disp);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-left: .5rem;
}

.qsched .sl {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: .5rem 0;
}

.qsched .sl .n {
  font-family: var(--f-cn-sans);
  font-weight: 600;
  font-size: 14px;
}

.qsched .sl .a {
  font-family: var(--f-disp);
  font-weight: 800;
  font-size: 16px;
}

.qsched .sl.gst .n,
.qsched .sl.gst .a {
  color: var(--gold-deep);
}

.qsched .sl.rule {
  border-bottom: 1px solid var(--line);
}

.qsched .sl.sum {
  padding: .7rem 0;
  border-bottom: 1px solid var(--line);
}

.qsched .sl.sum .n {
  font-weight: 700;
  font-size: 15px;
}

.qsched .sl.sum .a {
  font-weight: 900;
  font-size: 18px;
}

.qsched .grand {
  display: flex;
  justify-content: space-between;
  border-top: 1.5px solid var(--line-2);
  margin-top: .5rem;
  padding-top: .7rem;
}

.qsched .grand .n {
  font-family: var(--f-disp);
  font-weight: 800;
  font-size: 16px;
}

.qsched .grand .a {
  font-family: var(--f-disp);
  font-weight: 900;
  font-size: 18px;
  color: var(--crimson);
}

.qsigned {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 1.1rem 1.3rem;
  margin: 1.2rem 0;
}

.qsigned .pay-line {
  border: none;
  padding: .25rem 0;
}

.qsigned .strong {
  font-family: var(--f-cn-sans);
  font-weight: 600;
  color: var(--ink);
}

/* ============================================================
   COLLAPSIBLE SIDEBAR + RESPONSIVE SHELL
   ============================================================ */

/* The burger is hidden on wide screens only until JS decides what it does;
   without JS the sidebar stays open and usable, so it is never shown. */
.tb-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.tb-left .brand {
  min-width: 0;
}

.tb-burger {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  flex: none;
  padding: 0 11px;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  transition: all .2s;
}

.tb-burger:hover {
  border-color: var(--crimson);
}

.tb-burger .bar {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--ink-2);
  transition: all .2s;
}

.tb-burger:hover .bar {
  background: var(--crimson);
}

.xst-has-js .tb-burger {
  display: flex;
}

.side-scrim {
  display: none;
}

/* ── collapsed: icons only ─────────────────────────────────── */
.sidebar {
  transition: width .2s ease;
}

.xst-nav-collapsed .sidebar {
  width: 5rem;
  padding-left: .6rem;
  padding-right: .6rem;
}

.xst-nav-collapsed .snav-group {
  opacity: 0;
  height: 0;
  margin: 0 0 .5rem;
  overflow: hidden;
}

.xst-nav-collapsed .snav a,
.xst-nav-collapsed .snav .is-soon,
.xst-nav-collapsed .side-foot a {
  justify-content: center;
  gap: 0;
  padding-left: 0;
  padding-right: 0;
}

.xst-nav-collapsed .snav .lbl,
.xst-nav-collapsed .snav .en,
.xst-nav-collapsed .side-foot .lbl,
.xst-nav-collapsed .side-foot .side-foot-en {
  display: none;
}

/* The active marker sits on the panel edge; the collapsed panel is narrower,
   so it has to move with it. */
.xst-nav-collapsed .snav a.active::before {
  left: -.6rem;
}

/* ── tablet and below: sidebar becomes a drawer ────────────── */
@media(max-width:1024px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: var(--topbar-h);
    z-index: 60;
    width: var(--side-w);
    max-width: 82vw;
    height: calc(100vh - var(--topbar-h));
    transform: translateX(-100%);
    transition: transform .24s ease;
    overflow-y: auto;
    box-shadow: var(--sh-lg);
  }

  /* Collapsing is meaningless once it is a drawer — it is either open or not. */
  .xst-nav-collapsed .sidebar {
    width: var(--side-w);
    padding: 1.6rem 1rem;
  }

  .xst-nav-collapsed .snav-group {
    opacity: 1;
    height: auto;
    margin: 1.4rem 0 .5rem;
  }

  .xst-nav-collapsed .snav-group:first-child {
    margin-top: 0;
  }

  .xst-nav-collapsed .snav a,
  .xst-nav-collapsed .snav .is-soon,
  .xst-nav-collapsed .side-foot a {
    justify-content: flex-start;
    gap: 12px;
    padding: .72rem .9rem;
  }

  .xst-nav-collapsed .snav .lbl,
  .xst-nav-collapsed .snav .en,
  .xst-nav-collapsed .side-foot .lbl,
  .xst-nav-collapsed .side-foot .side-foot-en {
    display: inline;
  }

  .xst-nav-collapsed .snav a.active::before {
    left: -1rem;
  }

  .xst-nav-open .sidebar {
    transform: none;
  }

  .xst-has-js .side-scrim {
    display: block;
    position: fixed;
    inset: var(--topbar-h) 0 0;
    z-index: 55;
    background: rgba(40, 20, 12, .45);
    opacity: 0;
    visibility: hidden;
    transition: opacity .24s ease, visibility 0s linear .24s;
  }

  .xst-nav-open .side-scrim {
    opacity: 1;
    visibility: visible;
    transition: opacity .24s ease, visibility 0s;
  }

  /* The drawer must not scroll the page behind it. */
  .xst-nav-open body {
    overflow: hidden;
  }
}

/* Without JavaScript the drawer can never be opened, so it stays in flow. */
@media(max-width:1024px) {
  html:not(.xst-has-js) .sidebar {
    position: sticky;
    transform: none;
    box-shadow: none;
    max-width: none;
  }
}

@media(max-width:860px) {
  .topbar {
    gap: 12px;
  }

  .topbar .brand img {
    height: 42px;
  }

  .topbar .brand .bn {
    display: none;
  }

  .user-chip .uinfo {
    display: none;
  }

  .user-chip {
    padding: 5px;
  }
}

@media(max-width:600px) {
  :root {
    --topbar-h: 64px;
  }

  .tb-icon {
    width: 38px;
    height: 38px;
  }

  .tb-burger {
    width: 38px;
    height: 38px;
  }

  .main {
    padding: 1.2rem 1rem 3rem;
  }

  .page-head {
    flex-direction: column;
    align-items: flex-start;
    gap: .9rem;
  }

  .page-head .ph-r {
    width: 100%;
  }

  .page-head .ph-r .btn {
    width: 100%;
  }

  .banner {
    flex-wrap: wrap;
  }

  .banner .btn {
    width: 100%;
  }

  .stat-grid {
    grid-template-columns: 1fr;
  }

  .quick-grid {
    grid-template-columns: 1fr;
  }

  .steps {
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .filters {
    flex-wrap: wrap;
  }

  .filters .search {
    width: 100%;
  }

  .modal-overlay {
    padding: 1.2rem .8rem;
  }

  .modal-foot {
    flex-wrap: wrap;
  }

  .modal-foot .btn {
    flex: 1;
  }

  .selpanel {
    position: static;
  }

  .qtotals {
    max-width: none;
  }

  .seatrow .rl {
    width: 7rem;
  }
}

/* ── 通知 Notifications ─────────────────────────────────────── */
/* The bell's dot grows into a count once there is something to count. */
.tb-icon .dot.count {
  width: auto;
  min-width: 17px;
  height: 17px;
  top: 5px;
  right: 4px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  font-family: var(--f-disp);
  font-weight: 800;
  font-size: 9.5px;
  line-height: 1;
  color: #fff;
  border-radius: 999px;
}

.tb-icon.is-active {
  border-color: var(--crimson);
  color: var(--crimson);
}

.alert-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 1.05rem 1.3rem;
  border-bottom: 1px solid var(--line);
}

.alert-row:last-child {
  border-bottom: none;
}

/* Unread carries a crimson spine rather than a tinted row: a full-width tint
   on every unread item makes a busy inbox unreadable. */
.alert-row.is-unread {
  background: var(--cream);
  box-shadow: inset 3px 0 0 var(--crimson);
}

.alert-row .aic {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
}

.alert-row .aic svg {
  width: 18px;
  height: 18px;
}

.alert-row .aic.info {
  background: var(--info-tint);
  color: var(--info);
}

.alert-row .aic.ok {
  background: var(--ok-tint);
  color: var(--ok);
}

.alert-row .aic.warn {
  background: var(--warn-tint);
  color: var(--warn);
}

.alert-row .aic.danger {
  background: var(--danger-tint);
  color: var(--danger);
}

.alert-row .atx {
  flex: 1;
  min-width: 0;
}

.alert-row .atx b {
  display: block;
  font-family: var(--f-cn-sans);
  font-weight: 600;
  font-size: 14.5px;
  color: var(--ink);
}

.alert-row .atx span {
  display: block;
  font-size: 13px;
  color: var(--ink-2);
  margin-top: .15rem;
}

.alert-row .atx time {
  display: block;
  font-family: var(--f-disp);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--ink-3);
  margin-top: .35rem;
}

.alert-row .aact {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .4rem;
  text-align: right;
}

@media(max-width:600px) {
  .alert-row {
    flex-wrap: wrap;
    padding: .9rem 1rem;
  }

  .alert-row .aact {
    width: 100%;
    flex-direction: row;
    justify-content: flex-start;
    gap: 1rem;
    padding-left: 52px;
  }
}

/* ============================================================
   佣金记录 Commission
   Ported from the confirmed design's own <style> block
   (Bold Gradient - Agent Commission.html).
   ============================================================ */

.period-row td {
  background: var(--cream) !important;
  font-family: var(--f-disp);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding: .6rem 1rem !important;
}

.type-tag {
  display: inline-block;
  font-family: var(--f-disp);
  font-weight: 700;
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 6px;
  white-space: nowrap;
}

.type-personal {
  background: var(--gold-tint);
  color: var(--gold-deep);
}

.type-override {
  background: var(--info-tint);
  color: var(--info);
}

/* Not in the design — the spin-off is a third type the engine pays.
   Tinted green so it reads as its own thing beside the other two. */
.type-spinoff {
  background: var(--ok-tint);
  color: var(--ok);
}

.rank-card {
  background: linear-gradient(150deg, #fff, #FBF4E6);
}

.rate-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: .6rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}

.rate-row:last-child {
  border-bottom: none;
}

.rate-row b {
  font-family: var(--f-disp);
  font-weight: 800;
  color: var(--crimson);
  font-size: 16px;
}

/* A negative line — a reversal's mirror, or a refund. */
.t-neg {
  color: var(--danger);
}

.rank-badge {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--grad);
  display: grid;
  place-items: center;
  color: #fff;
  font-family: var(--f-disp);
  font-weight: 900;
  font-size: 18px;
  flex: none;
}

.rank-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 1.2rem;
}

.rank-head .rn {
  font-family: var(--f-cn);
  font-weight: 700;
  font-size: 19px;
}

.rank-head .rc {
  font-family: var(--f-disp);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.rank-note {
  background: var(--cream);
  border: 1px dashed var(--line-2);
  border-radius: 11px;
  padding: .8rem .9rem;
  margin-top: 1.1rem;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-3);
}

.comm-grid {
  display: grid;
  grid-template-columns: 18rem 1fr;
  gap: 1.4rem;
  align-items: start;
  margin-bottom: 1.8rem;
}

@media(max-width:900px) {
  .comm-grid {
    grid-template-columns: 1fr;
  }
}