:root {
  --bg: #f4f7fc;
  --surface: #ffffff;
  --surface-soft: #f7f9fd;
  --line: #e5eaf2;
  --text: #182235;
  --muted: #7a8496;
  --primary: #356df3;
  --primary-dark: #2456cc;
  --primary-soft: #edf3ff;
  --success: #25aa73;
  --warning: #ff9b42;
  --danger: #ec5c65;
  --shadow: 0 18px 50px rgba(30, 54, 104, 0.11);
  --radius: 22px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

.popup-announcement-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.popup-announcement-overlay.hidden {
  display: none;
}

.popup-announcement-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(3px);
}

.popup-announcement-card {
  position: relative;
  width: min(300px, 100%);
  overflow: hidden;
  padding: 0 16px 16px;
  border: 1px solid rgba(99, 102, 241, 0.16);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
  text-align: center;
}

.popup-announcement-card h3 {
  margin: 0 -16px;
  padding: 15px 18px 14px;
  border-bottom: 1px solid #dbe5ff;
  background: linear-gradient(135deg, #edf3ff, #f5f2ff);
  box-shadow: inset 0 3px 0 #356df3;
  color: #21499f;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.popup-announcement-card p {
  max-height: 38vh;
  margin: 10px 0 14px;
  overflow-y: auto;
  color: #28364c;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.65;
  text-align: left;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.popup-announcement-confirm {
  width: 100%;
  min-height: 40px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #4f46e5, #2563eb);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  background: var(--bg);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.icon {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 1.9;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 10%, rgba(79, 126, 255, 0.2), transparent 32%),
    radial-gradient(circle at 90% 86%, rgba(103, 86, 255, 0.14), transparent 30%),
    linear-gradient(160deg, #f8fbff 0%, #eef3ff 100%);
}

.login-card {
  width: min(430px, 100%);
  padding: 36px 30px 30px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.brand-mark {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(145deg, #4a81ff, #6f5cff);
  box-shadow: 0 13px 30px rgba(61, 103, 236, 0.3);
}

.brand-mark .icon {
  width: 31px;
  height: 31px;
}

.login-card h1 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.5px;
}

.auth-brand-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 2px 0 24px;
}

.auth-brand-row.compact {
  margin-bottom: 18px;
}

.auth-brand-row.compact .brand-mark {
  width: 54px;
  height: 54px;
  border-radius: 17px;
}

.auth-brand-row.compact h1 {
  font-size: 25px;
}

.login-subtitle {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
  text-align: center;
}

.field {
  margin-bottom: 17px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  color: #535f72;
  font-size: 14px;
  font-weight: 650;
}

.input-wrap {
  position: relative;
}

.input-wrap .icon {
  position: absolute;
  top: 50%;
  left: 16px;
  width: 19px;
  height: 19px;
  color: #9aa5b6;
  transform: translateY(-50%);
}

.input-wrap input {
  width: 100%;
  height: 52px;
  padding: 0 16px 0 48px;
  border: 1px solid var(--line);
  border-radius: 15px;
  outline: none;
  color: var(--text);
  background: #fafbfe;
  transition: 0.2s ease;
}

.input-wrap input:focus {
  border-color: #8caaff;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(53, 109, 243, 0.09);
}

.captcha-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 10px;
}

.captcha-code {
  height: 52px;
  border: 1px solid #d9e3f5;
  border-radius: 15px;
  color: #2f5cc8;
  background:
    repeating-linear-gradient(
      -24deg,
      rgba(82, 121, 220, 0.08) 0,
      rgba(82, 121, 220, 0.08) 2px,
      transparent 2px,
      transparent 9px
    ),
    #eef4ff;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 4px;
  line-height: 1;
}

.captcha-code:hover {
  border-color: #9cb6ee;
}

.primary-button {
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 15px;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, #3b75f5, #645df4);
  box-shadow: 0 12px 24px rgba(53, 109, 243, 0.24);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.primary-button:hover {
  filter: brightness(1.03);
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: -2px 2px 15px;
}

.remember-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #697589;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}

.remember-check input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--primary);
}

.demo-hint {
  margin: 18px 0 0;
  padding: 13px 15px;
  border-radius: 13px;
  color: #61708a;
  background: var(--primary-soft);
  font-size: 13px;
  line-height: 1.65;
}

.auth-switch {
  margin: 18px 0 0;
  color: #7b879a;
  text-align: center;
  font-size: 13px;
}

.auth-switch button {
  padding: 0;
  border: 0;
  color: var(--primary);
  background: transparent;
  font-weight: 700;
}

.registration-card {
  padding-top: 28px;
}

.registration-card .prototype-badge {
  margin-bottom: 13px;
}

.registration-card .login-subtitle {
  margin-bottom: 19px;
}

.registration-card .field {
  margin-bottom: 13px;
}

.registration-card .input-wrap input {
  height: 49px;
}

.registration-card .captcha-code {
  height: 49px;
}

.register-note {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  color: #69768a;
  background: #f3f6fb;
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
}

.form-error {
  margin: 0 0 12px;
  padding: 9px 12px;
  border-radius: 10px;
  color: #be3943;
  background: #fff0f1;
  font-size: 12px;
}

.success-card {
  text-align: center;
}

.success-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(145deg, #24b47c, #38cc91);
  box-shadow: 0 14px 28px rgba(38, 180, 124, 0.24);
}

.success-icon .icon {
  width: 36px;
  height: 36px;
  stroke-width: 2.4;
}

.success-card h1 {
  margin-bottom: 8px;
}

.status-steps {
  margin: 22px 0 25px;
  padding: 17px;
  border-radius: 17px;
  text-align: left;
  background: #f7f9fd;
}

.status-step {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  color: #98a3b3;
}

.status-step > span {
  width: 28px;
  height: 28px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #8e99aa;
  background: #e9edf4;
  font-size: 11px;
  font-weight: 800;
}

.status-step strong,
.status-step small {
  display: block;
}

.status-step strong {
  color: #6d788a;
  font-size: 13px;
}

.status-step small {
  margin-top: 3px;
  font-size: 10px;
}

.status-step.done > span {
  color: #fff;
  background: var(--success);
}

.status-step.active > span {
  color: #fff;
  background: var(--primary);
}

.status-step.active strong {
  color: var(--text);
}

.prototype-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #3563cf;
  background: var(--primary-soft);
  font-size: 12px;
  font-weight: 700;
}

/* Customer H5 */
.customer-stage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 70% 0%, rgba(74, 129, 255, 0.17), transparent 30%),
    #e9eef7;
}

.phone-shell {
  position: relative;
  width: min(430px, 100%);
  height: min(880px, calc(100vh - 48px));
  min-height: 680px;
  overflow: hidden;
  border: 7px solid #182235;
  border-radius: 38px;
  background: #f5f7fb;
  box-shadow: 0 30px 70px rgba(25, 39, 69, 0.24);
}

.phone-main {
  position: relative;
  height: 100%;
  overflow: hidden;
}

.customer-view {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.customer-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 19px 20px 16px;
  background: #fff;
}

.customer-header.benefit-header {
  min-height: 79px;
  justify-content: flex-end;
}

.customer-header.benefit-header > div:first-child {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.customer-header.benefit-header h2 {
  white-space: nowrap;
}

.customer-header h2 {
  margin: 0;
  font-size: 24px;
}

.customer-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.customer-header p:empty {
  display: none;
}

.avatar {
  position: relative;
  width: 44px;
  height: 44px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(145deg, #4a80f7, #6e61ee);
  font-size: 16px;
  font-weight: 750;
}

.avatar.staff {
  background: linear-gradient(145deg, #2968ec, #27a3e7);
}

.avatar.customer {
  background: linear-gradient(145deg, #496ff4, #795df4);
  box-shadow: 0 8px 18px rgba(71, 103, 231, 0.18);
}

.online-dot {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 12px;
  height: 12px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #2cc987;
}

.page-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 17px 16px 92px;
}

.section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 4px 10px;
  color: #8a95a7;
  font-size: 12px;
  font-weight: 700;
}

.section-label span:last-child {
  font-weight: 500;
}

.section-label.unread-summary-only {
  justify-content: flex-end;
}

.section-label.unread-summary-only:has(span:empty) {
  display: none;
}

.official-card {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 16px;
  border: 1px solid #dbe5ff;
  border-radius: 20px;
  text-align: left;
  background: linear-gradient(135deg, #fff, #f5f8ff);
  box-shadow: 0 9px 24px rgba(44, 78, 148, 0.08);
}

.conversation-copy {
  flex: 1;
  min-width: 0;
}

.conversation-title-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.conversation-title-row strong {
  font-size: 15px;
}

.verified-mark {
  width: 17px;
  height: 17px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--primary);
  font-size: 10px;
  font-weight: 800;
}

.official-tag {
  padding: 3px 7px;
  border-radius: 6px;
  color: #3563cf;
  background: #e9f0ff;
  font-size: 10px;
  font-weight: 700;
}

.conversation-preview {
  overflow: hidden;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-meta {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  color: #9ba5b5;
  font-size: 10px;
}

.unread {
  min-width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  color: #fff;
  background: #f05c66;
  font-size: 10px;
  font-weight: 700;
}

.notice-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 12px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.notice-card-copy {
  flex: 1;
  min-width: 0;
}

.notice-icon {
  width: 42px;
  height: 42px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 14px;
  color: #f28b38;
  background: #fff2e7;
}

.notice-icon.compact {
  width: 36px;
  height: 36px;
  border-radius: 12px;
}

.notice-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}

.notice-card p {
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notice-card-meta {
  align-self: stretch;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  color: #9ba5b5;
  font-size: 9px;
}

.benefits-entry-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 12px;
  padding: 15px 16px;
  border: 1px solid #dbe5ff;
  border-radius: 18px;
  color: inherit;
  background: linear-gradient(135deg, #ffffff 0%, #f3f6ff 100%);
  box-shadow: 0 8px 22px rgba(66, 92, 176, 0.07);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.benefits-entry-icon {
  width: 42px;
  height: 42px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 14px;
  color: #526df4;
  background: #eaf0ff;
}

.benefits-entry-copy {
  flex: 1;
  min-width: 0;
}

.benefits-entry-copy strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}

.benefits-entry-copy p {
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.benefits-entry-arrow {
  width: 30px;
  height: 30px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #4168e8;
  background: #e9efff;
  font-size: 24px;
  line-height: 1;
}

.welfare-notice-thread {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #f2f5fa;
}

.customer-chat-thread {
  position: absolute;
  z-index: 80;
  inset: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #f2f5fa;
}

.customer-chat-header {
  min-height: 64px;
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  padding: 9px 14px;
  border-bottom: 1px solid #e5eaf2;
  background: rgba(255, 255, 255, 0.98);
}

.customer-chat-header > button {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  color: #263348;
  background: transparent;
  font-size: 36px;
  line-height: 1;
}

.customer-chat-header > div {
  min-width: 0;
  text-align: center;
}

.customer-chat-header strong,
.customer-chat-header span {
  display: block;
}

.customer-chat-header strong {
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-chat-header div span {
  margin-top: 2px;
  color: #8590a3;
  font-size: 11px;
}

.customer-chat-scroll {
  min-height: 0;
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 14px 20px;
  -webkit-overflow-scrolling: touch;
}

.customer-chat-loading,
.customer-chat-error,
.customer-chat-empty {
  margin: 40px 12px;
  color: #8a95a8;
  font-size: 13px;
  text-align: center;
}

.customer-chat-error {
  color: #cf4c56;
}

.customer-chat-message-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.customer-chat-message {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.customer-chat-message.is-customer {
  align-items: flex-end;
}

.customer-chat-message time {
  align-self: center;
  margin: 2px 0 7px;
  color: #9aa4b5;
  font-size: 10px;
}

.customer-chat-bubble {
  max-width: min(78%, 310px);
  padding: 10px 13px;
  border-radius: 4px 17px 17px 17px;
  color: #263348;
  background: #fff;
  box-shadow: 0 3px 12px rgba(49, 66, 101, 0.08);
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.customer-chat-message.is-customer .customer-chat-bubble {
  border-radius: 17px 4px 17px 17px;
  color: #fff;
  background: linear-gradient(135deg, #3975f4, #635df2);
}

.customer-chat-attachment {
  display: block;
  max-width: min(72vw, 260px);
  max-height: 320px;
  margin-top: 6px;
  border-radius: 13px;
  object-fit: contain;
  background: #fff;
}

.customer-chat-composer {
  flex: 0 0 auto;
  padding: 8px 10px max(9px, env(safe-area-inset-bottom));
  border-top: 1px solid #e3e8f0;
  background: rgba(255, 255, 255, 0.98);
}

.customer-chat-compose-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.customer-chat-image-button {
  width: 38px;
  height: 38px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  color: #52627b;
  background: #f0f3f8;
}

.customer-chat-image-button .icon {
  width: 21px;
  height: 21px;
}

#customer-chat-input {
  min-width: 0;
  min-height: 38px;
  max-height: 108px;
  flex: 1 1 auto;
  resize: none;
  overflow-y: auto;
  padding: 9px 12px;
  border: 1px solid #dfe5ee;
  border-radius: 15px;
  outline: none;
  color: #263348;
  background: #f7f9fc;
  font: inherit;
  font-size: 14px;
  line-height: 20px;
}

#customer-chat-input:focus {
  border-color: #9bb4f3;
  background: #fff;
}

.customer-chat-send {
  height: 38px;
  flex: 0 0 auto;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: #356df3;
  font-weight: 700;
}

.customer-chat-send:disabled {
  opacity: 0.55;
}

.customer-chat-image-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 46px 7px;
  padding: 5px 8px 5px 10px;
  border-radius: 10px;
  color: #52627b;
  background: #eef3ff;
  font-size: 12px;
}

.customer-chat-image-name span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-chat-image-name button {
  border: 0;
  color: #74829a;
  background: transparent;
  font-size: 19px;
}

.notice-thread-header {
  min-height: 66px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid #e5eaf2;
  background: rgba(255, 255, 255, 0.98);
}

.notice-thread-header > button {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #506079;
  background: #f1f4f8;
  font-size: 30px;
  line-height: 1;
}

.notice-thread-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.notice-thread-heading > div:last-child {
  display: flex;
  flex-direction: column;
}

.notice-thread-heading strong {
  color: #1d2940;
  font-size: 15px;
}

.notice-thread-heading span {
  margin-top: 2px;
  color: #8b96a9;
  font-size: 10px;
}

.notice-thread-header-spacer {
  width: 36px;
}

.notice-thread-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 16px 30px;
}

.notice-thread-loading,
.notice-thread-error,
.notice-thread-empty {
  padding: 50px 12px;
  color: #8a95a8;
  font-size: 12px;
  text-align: center;
}

.notice-thread-error {
  color: #cf4858;
}

.notice-message-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.notice-message {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.notice-message-time {
  align-self: center;
  margin-bottom: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #9aa4b5;
  background: rgba(216, 222, 233, 0.72);
  font-size: 9px;
}

.notice-message-bubble {
  position: relative;
  width: min(88%, 350px);
  padding: 13px 15px;
  border: 1px solid #e3e8f0;
  border-radius: 6px 18px 18px 18px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(34, 50, 79, 0.06);
}

.notice-message-bubble::before {
  position: absolute;
  top: 0;
  left: -7px;
  width: 12px;
  height: 12px;
  background: #fff;
  clip-path: polygon(100% 0, 100% 100%, 0 0);
  content: "";
}

.notice-message-bubble strong {
  display: block;
  margin-bottom: 7px;
  color: #de7729;
  font-size: 13px;
}

.notice-message-bubble p {
  margin: 0;
  color: #334057;
  font-size: 12px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.bottom-nav {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 5;
  height: 77px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 8px 10px 10px;
  border-top: 1px solid rgba(222, 228, 239, 0.92);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid #e2e8f4;
  border-radius: 15px;
  color: #66748c;
  background: #f7f9fd;
  font-size: 11px;
  font-weight: 650;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.nav-item.active {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, #3775f2 0%, #695cf2 100%);
  box-shadow: 0 7px 16px rgba(69, 91, 225, 0.24);
  font-weight: 750;
}

.nav-item .icon {
  width: 23px;
  height: 23px;
}

.benefit-page {
  padding: 16px 14px 96px;
  background:
    radial-gradient(circle at 100% 0%, rgba(82, 112, 242, 0.08), transparent 30%),
    linear-gradient(180deg, #f3f6fc 0%, #f7f9fd 100%);
}

.benefit-hero {
  position: relative;
  overflow: hidden;
  padding: 20px;
  border-radius: 25px;
  color: #fff;
  background:
    radial-gradient(circle at 92% 14%, rgba(255, 255, 255, 0.16), transparent 26%),
    linear-gradient(135deg, #346ff0 0%, #5e65f2 60%, #7458ef 100%);
  box-shadow: 0 15px 34px rgba(68, 91, 220, 0.23);
}

.benefit-hero::before,
.benefit-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.benefit-hero::before {
  top: -62px;
  right: -40px;
  width: 178px;
  height: 178px;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.benefit-hero::after {
  right: 24px;
  bottom: -72px;
  width: 126px;
  height: 126px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
}

.benefit-activity-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
}

.benefit-activity-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
}

.activity-index {
  min-width: 52px;
  padding: 7px 9px;
  border-radius: 11px;
  color: #4c5ed5;
  background: rgba(255, 255, 255, 0.9);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.benefit-activity-item div {
  min-width: 0;
}

.benefit-activity-item strong {
  display: block;
  font-size: 15px;
  line-height: 1.2;
}

.benefit-activity-item p {
  overflow: hidden;
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.benefit-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 11px;
  border: 1px solid #e4e9f2;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 6px 18px rgba(45, 64, 108, 0.045);
}

.benefit-stat {
  position: relative;
  min-width: 0;
  padding: 12px 6px 11px;
  text-align: center;
}

.benefit-stat + .benefit-stat::before {
  content: "";
  position: absolute;
  top: 13px;
  bottom: 13px;
  left: 0;
  width: 1px;
  background: #e8ecf3;
}

.benefit-stats strong,
.benefit-stats span {
  display: block;
}

.benefit-stats strong {
  color: #25314a;
  font-size: 18px;
  line-height: 1;
}

.benefit-stats span {
  overflow: hidden;
  margin-top: 6px;
  color: #8a95a8;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.benefit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
  margin-top: 11px;
}

.benefit-card {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 118px;
  padding: 15px;
  border: 1px solid #e2e8f2;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  color: inherit;
  font: inherit;
  text-align: left;
  box-shadow: 0 7px 20px rgba(45, 64, 108, 0.055);
}

button.benefit-card {
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

button.benefit-card:hover {
  border-color: #c7d4fb;
  box-shadow: 0 10px 25px rgba(60, 91, 184, 0.11);
}

button.benefit-card:active {
  transform: scale(0.98);
}

.benefit-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 15px;
}

.benefit-card-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 40px;
}

.benefit-card .mini-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--primary);
  background: var(--primary-soft);
}

.benefit-card .mini-icon .icon {
  width: 20px;
  height: 20px;
}

.benefit-card .history-icon {
  color: #7458df;
  background: #f2edff;
}

.benefit-card .consumption-icon {
  color: #e58a2d;
  background: #fff2e5;
}

.benefit-card-arrow {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #8290a6;
  background: #f3f6fa;
  font-size: 15px;
  line-height: 1;
}

.benefit-status {
  padding: 4px 7px;
  border-radius: 999px;
  color: #b06c2c;
  background: #fff3e8;
  font-size: 8px;
  font-weight: 700;
}

.benefit-card strong {
  display: block;
  font-size: 14px;
  line-height: 1.2;
}

.benefit-card p {
  min-height: 32px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.benefit-card-primary {
  border-color: #dce5ff;
  background: linear-gradient(155deg, #ffffff 10%, #f5f8ff 100%);
}

.benefit-card-primary::after {
  content: "";
  position: absolute;
  right: -26px;
  bottom: -38px;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: rgba(73, 111, 244, 0.045);
  pointer-events: none;
}

.lottery-card .mini-icon {
  color: #7755e7;
  background: #f0ebff;
}

.download-center-entry {
  margin-top: 10px;
}

.download-center-icon,
.download-center-card .mini-icon {
  color: #16845d;
  background: #e8f8f0;
}

.download-center-card {
  grid-column: 1 / -1;
  min-height: 78px;
}

.benefit-action {
  display: inline-block;
  margin-top: 10px;
  color: #3569e7;
  font-size: 9px;
  font-weight: 750;
}

.lottery-card .benefit-action {
  color: #7054d7;
}

.benefit-card-compact {
  display: flex;
  min-height: 118px;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  border-color: #e1e7f1;
  text-align: center;
}

.benefit-card-compact .mini-icon {
  width: 38px;
  height: 38px;
}

.benefit-card-link {
  display: block;
  margin-top: 13px;
  color: #71809a;
  font-size: 10px;
  font-weight: 650;
  text-align: center;
}

.consumption-progress-overlay {
  position: absolute;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.consumption-progress-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: rgba(22, 30, 52, 0.42);
  backdrop-filter: blur(2px);
}

.consumption-progress-sheet {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 360px;
  padding: 18px;
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(26, 39, 76, 0.22);
  animation: progress-sheet-enter 0.2s ease-out;
}

@keyframes progress-sheet-enter {
  from {
    transform: translateY(10px) scale(0.98);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.progress-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
}

.progress-sheet-header h3 {
  margin: 0;
  color: #1e2a42;
  font-size: 20px;
  line-height: 1.2;
}

.progress-sheet-header p {
  margin: 5px 0 0;
  color: #919bad;
  font-size: 11px;
}

.progress-sheet-close {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #758198;
  background: #f1f4f8;
  font-size: 22px;
  line-height: 1;
}

.progress-sheet-loading,
.progress-sheet-error {
  margin: 0;
  padding: 20px 8px 8px;
  color: #8c96a8;
  font-size: 13px;
  text-align: center;
}

.progress-sheet-error {
  color: #cf4858;
}

.consumption-progress-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.consumption-progress-item {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 62px;
  padding: 8px 0 0;
  border-bottom: 0;
}

.consumption-progress-item:last-child {
  border-bottom: 0;
}

.consumption-progress-date {
  color: #48546a;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.consumption-progress-copy {
  min-width: 0;
}

.consumption-progress-copy strong {
  display: block;
  overflow: hidden;
  color: #27334a;
  font-size: 13px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.consumption-progress-status {
  min-width: 58px;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 750;
  text-align: center;
}

.consumption-progress-item.is-pending .consumption-progress-status {
  color: #bd6e1d;
  background: #fff1dd;
}

.consumption-progress-item.is-issued .consumption-progress-status {
  color: #168454;
  background: #e5f8ee;
}

.consumption-progress-item.is-not-qualified .consumption-progress-status {
  color: #7d8799;
  background: #eef1f5;
}

.sign-card .benefit-card-link {
  color: #3169e6;
}

.lottery-card .benefit-card-link {
  color: #6d52d7;
}

.consumption-card .benefit-card-link {
  color: #b56c26;
}

.profile-card {
  padding: 22px;
  border-radius: 23px;
  background: linear-gradient(145deg, #fff, #f7f9ff);
  box-shadow: 0 10px 28px rgba(35, 52, 91, 0.08);
}

.profile-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.profile-head h3 {
  margin: 0 0 5px;
}

.profile-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.profile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.profile-row span:first-child {
  color: var(--muted);
}

.profile-email-status {
  padding: 5px 8px;
  border: 0;
  border-radius: 8px;
  color: #243047;
  background: transparent;
  font: inherit;
  font-weight: 750;
}

.profile-email-status.is-unbound {
  color: #d43c49;
  background: #fff0f1;
}

.email-binding-overlay {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: grid;
  place-items: center;
  padding: 22px;
}

.email-binding-overlay.hidden {
  display: none;
}

.email-binding-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(23, 32, 51, 0.42);
}

.email-binding-dialog {
  position: relative;
  z-index: 1;
  width: min(390px, 100%);
  padding: 20px;
  border: 1px solid #e0e6f0;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(29, 43, 76, 0.2);
}

.email-binding-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.email-binding-header h3 {
  margin: 0;
  font-size: 20px;
}

.email-binding-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.email-binding-header > button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  color: #6d788b;
  background: #f2f5fa;
  font-size: 21px;
  line-height: 1;
}

.profile-email-form {
  margin-top: 14px;
}

.profile-email-form label {
  display: block;
  margin: 10px 0 7px;
  color: #67738a;
  font-size: 12px;
  font-weight: 650;
}

.profile-email-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.profile-email-action input {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #dbe3f1;
  border-radius: 12px;
  outline: 0;
  color: var(--ink);
  background: #fff;
  font-size: 13px;
}

.profile-email-action input:focus {
  border-color: #7191f6;
  box-shadow: 0 0 0 3px rgba(78, 111, 239, 0.12);
}

.profile-email-action button {
  min-width: 92px;
  height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  color: #315fe8;
  background: #eaf0ff;
  font-size: 12px;
  font-weight: 750;
}

.profile-email-action button.verify-email-button {
  color: #fff;
  background: linear-gradient(135deg, #3e73f4, #6856f4);
}

.profile-email-action button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.profile-email-message {
  margin: 12px 0 0;
  padding: 9px 11px;
  border-radius: 10px;
  color: #2d67d8;
  background: #edf4ff;
  font-size: 11px;
  line-height: 1.5;
}

.profile-email-message.is-error {
  color: #b93642;
  background: #fff0f1;
}

.email-binding-skip {
  width: 100%;
  height: 40px;
  margin-top: 12px;
  border: 0;
  border-radius: 12px;
  color: #6d788b;
  background: #f3f5f9;
  font-size: 13px;
  font-weight: 700;
}

.email-binding-skip:active {
  background: #e9edf4;
}

.outline-button {
  width: 100%;
  height: 47px;
  margin-top: 16px;
  border: 1px solid #d9e0eb;
  border-radius: 14px;
  color: #5f6a7b;
  background: #fff;
  font-weight: 650;
}

/* Customer chat */
.chat-view {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #f3f5f9;
}

.chat-header {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 15px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.back-button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 11px;
  color: #536075;
  background: #f3f5f9;
}

.chat-title {
  flex: 1;
  min-width: 0;
}

.chat-title strong {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

.chat-title span {
  display: block;
  margin-top: 3px;
  color: var(--success);
  font-size: 10px;
}

.chat-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 17px 14px 22px;
}

.chat-day {
  margin: 4px 0 16px;
  color: #9aa4b2;
  text-align: center;
  font-size: 10px;
}

.message-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin: 12px 0;
}

.message-row.mine {
  flex-direction: row-reverse;
}

.message-avatar {
  width: 30px;
  height: 30px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(145deg, #2968ec, #27a3e7);
  font-size: 10px;
  font-weight: 700;
}

.message-row.mine .message-avatar {
  background: linear-gradient(145deg, #ff9a52, #ff6e65);
}

.bubble {
  max-width: 76%;
  padding: 11px 13px;
  border-radius: 6px 16px 16px 16px;
  color: #3d485a;
  background: #fff;
  box-shadow: 0 3px 12px rgba(42, 54, 82, 0.06);
  font-size: 13px;
  line-height: 1.55;
}

.message-row.mine .bubble {
  border-radius: 16px 6px 16px 16px;
  color: #fff;
  background: var(--primary);
}

.message-time {
  margin-top: 5px;
  color: #a8b0bd;
  font-size: 9px;
}

.message-row.mine .message-time {
  text-align: right;
}

.chat-composer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 12px 15px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.chat-composer input {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  background: #f6f8fb;
}

.send-button {
  width: 42px;
  height: 42px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 13px;
  color: #fff;
  background: var(--primary);
}

/* Staff H5 */
.staff-app {
  min-height: 100vh;
  padding: 22px;
  background:
    radial-gradient(circle at 0% 0%, rgba(62, 112, 241, 0.11), transparent 28%),
    #edf1f7;
}

.staff-window {
  width: min(1460px, 100%);
  height: calc(100vh - 44px);
  min-height: 680px;
  display: grid;
  grid-template-columns: 82px 330px minmax(430px, 1fr) 310px;
  overflow: hidden;
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow);
}

.staff-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 22px 13px;
  color: #91a0b4;
  background: #18243a;
}

.staff-logo {
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(145deg, #4c83fb, #6c5df4);
}

.rail-button {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 15px;
  color: inherit;
  background: transparent;
}

.rail-button.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.rail-spacer {
  flex: 1;
}

.conversation-panel {
  min-width: 0;
  border-right: 1px solid var(--line);
  background: #fff;
}

.panel-header {
  padding: 24px 21px 16px;
}

.panel-header h2 {
  margin: 0;
  font-size: 22px;
}

.panel-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.search-box {
  position: relative;
  margin: 0 18px 15px;
}

.search-box .icon {
  position: absolute;
  top: 50%;
  left: 13px;
  width: 17px;
  height: 17px;
  color: #a1aaba;
  transform: translateY(-50%);
}

.search-box input {
  width: 100%;
  height: 42px;
  padding: 0 13px 0 39px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  background: #f5f7fa;
}

.conversation-list {
  overflow-y: auto;
}

.conversation-empty {
  padding: 36px 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
  text-align: center;
}

.conversation-empty span {
  font-size: 12px;
}

.staff-conversation {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 15px 17px;
  border: 0;
  border-left: 3px solid transparent;
  text-align: left;
  background: #fff;
}

.staff-conversation.active {
  border-left-color: var(--primary);
  background: var(--primary-soft);
}

.staff-conversation .avatar {
  width: 43px;
  height: 43px;
  border-radius: 14px;
}

.staff-conversation-info {
  flex: 1;
  min-width: 0;
}

.staff-conversation-info strong,
.staff-conversation-info span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-conversation-info strong {
  font-size: 13px;
}

.staff-conversation-info span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.staff-conversation-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
  color: #a0a9b7;
  font-size: 9px;
}

.staff-chat {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #f7f9fc;
}

.staff-chat-header {
  height: 80px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 22px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.staff-chat-header .chat-title strong {
  font-size: 15px;
}

.header-actions {
  display: flex;
  gap: 8px;
}

.small-icon-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #718096;
  background: #fff;
}

.staff-chat .chat-messages {
  padding: 22px 25px;
}

.staff-chat .chat-composer {
  padding: 14px 18px 18px;
}

.profile-panel {
  overflow-y: auto;
  padding: 22px;
  border-left: 1px solid var(--line);
  background: #fff;
}

.profile-panel h3 {
  margin: 0 0 18px;
  font-size: 16px;
}

.customer-summary {
  padding: 18px;
  border-radius: 18px;
  text-align: center;
  background: #f7f9fd;
}

.customer-summary .avatar {
  width: 54px;
  height: 54px;
  margin: 0 auto 10px;
  border-radius: 18px;
}

.customer-summary strong {
  display: block;
}

.customer-summary span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.group-tag {
  display: inline-flex !important;
  width: auto;
  margin: 10px auto 0 !important;
  padding: 5px 9px;
  border-radius: 999px;
  color: #2d6bce !important;
  background: #e7f0ff;
  font-size: 10px !important;
  font-weight: 700;
}

.info-block {
  margin-top: 20px;
}

.info-block-title {
  margin-bottom: 8px;
  color: #98a3b4;
  font-size: 11px;
  font-weight: 700;
}

.info-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.info-line span:first-child {
  color: var(--muted);
}

.metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.metric {
  padding: 13px;
  border-radius: 13px;
  background: #f5f7fb;
}

.metric strong,
.metric span {
  display: block;
}

.metric strong {
  font-size: 16px;
}

.metric span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.mobile-back {
  display: none;
}

@media (max-width: 1080px) {
  .staff-window {
    grid-template-columns: 76px 300px minmax(400px, 1fr);
  }

  .profile-panel {
    display: none;
  }
}

@media (max-width: 760px) {
  html,
  body {
    width: 100%;
  }

  .customer-stage {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: block;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    padding: 0;
    background: #f5f7fb;
  }

  .phone-shell {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .customer-chat-thread {
    position: fixed;
    top: var(--chat-viewport-top, 0px);
    right: 0;
    bottom: auto;
    left: 0;
    width: 100%;
    height: var(--chat-viewport-height, 100dvh);
  }

  .bottom-nav {
    height: calc(67px + env(safe-area-inset-bottom));
    gap: 7px;
    padding: 7px 10px max(8px, env(safe-area-inset-bottom));
  }

  .page-scroll {
    padding-bottom: calc(82px + env(safe-area-inset-bottom));
  }

  .login-page {
    align-items: start;
    padding: 18px;
  }

  .login-card {
    margin: auto 0;
    padding-right: 24px;
    padding-left: 24px;
  }

  .registration-card {
    margin: 0;
  }

  .customer-header {
    padding-top: max(19px, env(safe-area-inset-top));
  }

  .staff-app {
    padding: 0;
  }

  .staff-window {
    width: 100%;
    height: 100vh;
    min-height: 620px;
    display: block;
    border: 0;
    border-radius: 0;
  }

  .staff-rail,
  .profile-panel {
    display: none;
  }

  .conversation-panel {
    height: 100%;
    border: 0;
  }

  .staff-chat {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: none;
  }

  .staff-window.chat-open .conversation-panel {
    display: none;
  }

  .staff-window.chat-open .staff-chat {
    display: flex;
  }

  .mobile-back {
    display: grid;
  }
}

@media (max-width: 370px) {
  .benefit-page {
    padding-right: 11px;
    padding-left: 11px;
  }

  .benefit-hero {
    padding: 14px;
  }

  .benefit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .benefit-card {
    min-height: 90px;
    padding: 10px 8px;
    border-radius: 15px;
  }

  .benefit-card-compact {
    min-height: 90px;
  }

  .benefit-card-title {
    gap: 6px;
    min-height: 32px;
  }

  .benefit-card-compact .mini-icon {
    width: 31px;
    height: 31px;
    border-radius: 10px;
  }

  .benefit-card .mini-icon .icon {
    width: 17px;
    height: 17px;
  }

  .benefit-card strong {
    font-size: 12px;
  }

  .benefit-card-link {
    margin-top: 8px;
    font-size: 9px;
  }

  .benefit-activity-list {
    gap: 7px;
  }

  .benefit-activity-item {
    gap: 9px;
    padding: 10px;
  }

  .activity-index {
    min-width: 46px;
    padding: 6px 7px;
  }

  .benefit-activity-item strong {
    font-size: 13px;
  }

  .benefit-activity-item p {
    margin-top: 4px;
    font-size: 10px;
  }

  .download-center-card {
    min-height: 68px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding-right: 16px;
    padding-left: 16px;
  }

  .download-center-card .benefit-card-link {
    margin-top: 0;
  }
}
