:root {
  --primary: #2F6BFF;
  --primary-dark: #1E4FD6;
  --primary-light: #6B9BFF;
  --primary-soft: #EBF1FF;
  --primary-muted: #D6E4FF;
  --grad-brand: linear-gradient(145deg, #6B9BFF 0%, #2F6BFF 52%, #1E4FD6 100%);
  --grad-soft: linear-gradient(180deg, #EEF3FF 0%, #FFFFFF 72%);
  --text: #142033;
  --text-2: #5C6575;
  --text-3: #8A919E;
  --line: #E6EAF2;
  --bg: #F3F5FA;
  --white: #FFFFFF;
  --danger: #FF4B43;
  --success: #2F6BFF;
  --radius: 12px;
  --safe-bottom: 20px;
  --tab-h: 72px;
  --nav-h: 44px;
  --status-h: 44px;
  --phone-w: 390px;
  --phone-h: 844px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Segoe UI", sans-serif;
  background: linear-gradient(160deg, #E8EEFB 0%, #EEF1F0 45%, #E8E8E8 100%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; border: none; background: none; outline: none; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ========== Stage ========== */
.stage {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px 16px;
}
.brand-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #333;
}
.brand-logo {
  width: 36px; height: 36px; border-radius: 10px;
  object-fit: cover; display: block;
  box-shadow: 0 2px 8px rgba(47, 107, 255, .28);
}
.brand-bar h1 { font-size: 18px; font-weight: 700; }
.brand-bar p { font-size: 12px; color: var(--text-2); }

.phone {
  width: min(100%, var(--phone-w));
  height: min(92vh, var(--phone-h));
  background: var(--white);
  border-radius: 36px;
  box-shadow: 0 20px 60px rgba(0,0,0,.18), 0 0 0 10px #1c1c1e;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.status-bar {
  height: var(--status-h);
  padding: 12px 22px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
  position: relative;
  z-index: 5;
  background: var(--white);
  flex-shrink: 0;
}
.status-bar .island {
  position: absolute;
  left: 50%; top: 8px; transform: translateX(-50%);
  width: 110px; height: 28px; border-radius: 20px; background: #111;
}
.status-icons { display: flex; gap: 5px; align-items: center; font-size: 12px; }

.app {
  flex: 1;
  min-height: 0;
  position: relative;
  background: var(--bg);
}

.screen {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  background: var(--bg);
  animation: fade .18s ease;
}
.screen.active { display: flex; }

@keyframes fade {
  from { opacity: .4; transform: translateX(8px); }
  to { opacity: 1; transform: none; }
}

.nav {
  height: var(--nav-h);
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
  flex-shrink: 0;
  border-bottom: 1px solid transparent;
}
.nav .title {
  position: absolute; left: 0; right: 0;
  text-align: center; font-size: 17px; font-weight: 650;
  pointer-events: none;
}
.nav-side { display: flex; align-items: center; gap: 8px; min-width: 72px; z-index: 1; }
.nav-side.right { justify-content: flex-end; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center; cursor: pointer; color: var(--text);
}
.icon-btn:active { background: var(--primary-soft); color: var(--primary); }
.icon-btn img, .icon-btn svg { width: 22px; height: 22px; }

.scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.scroll::-webkit-scrollbar { display: none; }

/* ========== Tab bar ========== */
.tabbar {
  height: calc(var(--tab-h) + var(--safe-bottom));
  margin: 0 10px 8px;
  padding: 8px 6px calc(8px + var(--safe-bottom));
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(47,107,255,.1);
  border-radius: 22px;
  box-shadow:
    0 10px 28px rgba(20, 32, 51, .12),
    0 2px 8px rgba(47,107,255,.06);
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  flex-shrink: 0;
  backdrop-filter: blur(14px);
  position: relative;
  z-index: 8;
}
.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #8A919E;
  cursor: pointer;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2px;
  padding: 2px 0 0;
}
.tab-item .tab-icon {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 50%;
  transition: .18s ease;
  background: transparent;
}
.tab-item img { width: 22px; height: 22px; opacity: .7; }
.tab-item.active {
  color: var(--primary-dark);
  font-weight: 700;
}
.tab-item.active .tab-icon {
  background: var(--grad-brand);
  box-shadow: 0 6px 14px rgba(47,107,255,.28);
}
.tab-item.active img {
  opacity: 1;
  filter: brightness(0) invert(1);
}
.tab-item:not(.active) img {
  filter: none;
  opacity: .62;
  color: #8A919E;
}
.tab-item:not(.active):active .tab-icon {
  background: rgba(47,107,255,.06);
}

/* ========== Cells / lists ========== */
.section { margin-top: 10px; background: var(--white); }
.section + .section { margin-top: 10px; }
.section-label {
  padding: 10px 16px 6px;
  font-size: 13px; color: var(--text-3);
}
.cell {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; background: var(--white);
  cursor: pointer; position: relative;
}
.cell:active { background: #FAFAFA; }
.cell + .cell::before,
.cell.line::before {
  content: ""; position: absolute; left: 16px; right: 0; top: 0;
  height: 1px; background: var(--line);
}
.cell.indent::before { left: 68px; }
.cell .label { flex: 1; font-size: 16px; }
.cell .value { font-size: 14px; color: var(--text-3); max-width: 55%; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell .chevron { width: 16px; height: 16px; opacity: .35; flex-shrink: 0; }
.cell .avatar { width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; }
.cell .meta { flex: 1; min-width: 0; }
.cell .name { font-size: 16px; font-weight: 600; }
.cell .sub { font-size: 13px; color: var(--text-3); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell .right-meta { text-align: right; flex-shrink: 0; }
.cell .time { font-size: 11px; color: var(--text-3); }
.cell-desc {
  padding: 0 16px 14px;
  font-size: 12px; color: var(--text-3); line-height: 1.5;
  background: var(--white);
}

/* Switch */
.switch {
  width: 46px; height: 28px; border-radius: 14px;
  background: #E5E5EA; position: relative; flex-shrink: 0;
  transition: .2s; cursor: pointer;
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 24px; height: 24px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2);
  transition: .2s;
}
.switch.on { background: var(--primary); }
.switch.on::after { left: 20px; }

/* Badge */
.badge {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 1px 6px; border-radius: 4px; font-size: 10px; color: #fff;
  background: var(--primary); font-weight: 600;
}
.badge.owner { background: var(--primary); }
.badge.admin { background: #6B9BFF; }
.badge.status { background: var(--grad-brand); border-radius: 4px; padding: 2px 8px; font-size: 11px; }
.badge.tag {
  background: var(--primary-muted); color: var(--primary-dark);
  border-radius: 999px; padding: 2px 8px; font-size: 11px; font-weight: 500;
}
.badge.tag.alt { background: #D6E4FF; color: #1E4FD6; }

/* Members grid */
.members {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 14px 8px; padding: 18px 12px 12px; background: var(--white);
}
.member {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  cursor: pointer; font-size: 11px; color: var(--text-2);
}
.member .ava-wrap { position: relative; width: 52px; height: 52px; }
.member .ava-wrap img { width: 52px; height: 52px; border-radius: 50%; }
.member .online {
  position: absolute; top: 0; right: 0; width: 10px; height: 10px;
  border: 2px solid #fff; border-radius: 50%; background: var(--success);
}
.member .role { margin-top: -2px; }
.member-action {
  width: 52px; height: 52px; border-radius: 50%;
  border: 1.5px dashed #C7C7C7; display: grid; place-items: center;
  color: #999; font-size: 28px; line-height: 1;
}

/* Main tab headers — green hero bar */
.page-nav {
  height: auto;
  min-height: auto;
  padding: 10px 16px 14px;
  display: block;
  background:
    linear-gradient(180deg, #F7F9FF 0%, #FFFFFF 100%);
  border-bottom: 1px solid rgba(47,107,255,.08);
  color: var(--text);
  position: relative;
  overflow: visible;
  z-index: 20;
  box-shadow: none;
}
.page-nav::before {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary) 0%, rgba(47,107,255,.08) 42%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}
.page-nav::after {
  content: "";
  position: absolute;
  width: 120px; height: 120px;
  right: -40px; top: -60px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47,107,255,.08), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.page-nav-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  z-index: 1;
}
.page-nav .nav-copy { min-width: 0; }
.page-nav .brand-eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  border: 1px solid rgba(47,107,255,.14);
  opacity: 1;
}
.page-nav .brand-title {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.2px;
  color: var(--text);
}
.page-nav .brand-sub {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 0;
  border-radius: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  background: transparent;
  border: none;
  position: relative;
  z-index: 1;
}
.page-nav .brand-sub::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 3px rgba(47,107,255,.16);
}
.page-nav .nav-side {
  min-width: auto;
  gap: 8px;
  z-index: 1;
  padding-top: 2px;
}
.page-nav .icon-btn.ghost,
.page-nav .icon-btn.solid {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
}
.page-nav .icon-btn.ghost {
  background: #fff;
  border: 1px solid rgba(47,107,255,.14);
  box-shadow: 0 2px 8px rgba(47,107,255,.06);
}
.page-nav .icon-btn.ghost img {
  width: 17px; height: 17px;
  filter: none;
  opacity: .85;
}
.page-nav .icon-btn.ghost:active { background: var(--primary-soft); }
.page-nav .icon-btn.solid {
  background: var(--grad-brand);
  color: #fff;
  border: none;
  box-shadow: 0 6px 14px rgba(47,107,255,.28);
}
.page-nav .icon-btn.solid img {
  width: 17px; height: 17px;
  filter: brightness(0) invert(1);
}
.page-nav .icon-btn.solid:active { transform: scale(.96); }

/* 主 Tab 顶栏改为浅色，状态栏同步浅底深字 */
.phone:has(#screen-msg.active) .status-bar,
.phone:has(#screen-follow.active) .status-bar,
.phone:has(#screen-contract.active) .status-bar,
.phone:has(#screen-contacts.active) .status-bar {
  background: #F7F9FF;
  color: var(--text);
}
.phone:has(#screen-msg.active) .status-bar .island,
.phone:has(#screen-follow.active) .status-bar .island,
.phone:has(#screen-contract.active) .status-bar .island,
.phone:has(#screen-contacts.active) .status-bar .island {
  background: #111;
}

.nav-more-wrap { position: relative; z-index: 30; }
.nav-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 156px;
  padding: 6px 0;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(20, 36, 28, 0.18), 0 2px 8px rgba(0, 0, 0, 0.06);
  z-index: 50;
  color: var(--text);
}
.nav-popover.hide { display: none; }
.nav-popover::before {
  content: "";
  position: absolute;
  top: -6px; right: 12px;
  width: 12px; height: 12px;
  background: #fff;
  transform: rotate(45deg);
  border-radius: 2px;
  box-shadow: -2px -2px 4px rgba(0,0,0,.04);
}
.nav-popover button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 0;
  background: transparent;
  font-size: 15px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  position: relative;
  z-index: 1;
}
.nav-popover button:active { background: var(--primary-soft); }
.nav-popover-ico {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  color: var(--primary-dark);
  flex-shrink: 0;
}
.nav-popover-ico img {
  width: 18px; height: 18px;
  filter: none;
  opacity: 0.85;
}

/* Ticket add / ticket list */
.ticket-form-scroll { background: var(--white); }
.ticket-form { padding: 4px 0 24px; }
.tf-row, .tf-block {
  display: block;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  cursor: text;
}
.tf-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.tf-label {
  font-size: 15px;
  color: var(--text);
  flex-shrink: 0;
  min-width: 72px;
}
.tf-block .tf-label {
  display: block;
  margin-bottom: 8px;
}
.tf-row input,
.tf-block textarea {
  flex: 1;
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 15px;
  color: var(--text);
  resize: none;
  font-family: inherit;
  line-height: 1.45;
}
.tf-row input::placeholder,
.tf-block textarea::placeholder { color: #C0C0C0; }
.tf-row input { text-align: right; }
.ticket-submit {
  display: block;
  width: calc(100% - 32px);
  margin: 28px 16px 0;
  height: 48px;
  border: 0;
  border-radius: 12px;
  background: var(--grad-brand);
  color: #fff;
  font-size: 16px;
  font-weight: 650;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(47, 107, 255, 0.28);
}
.ticket-submit:active { background: var(--primary-dark); }

.ticket-list-scroll {
  background: var(--bg);
  padding-bottom: 88px;
}
.ticket-list-chips { padding-top: 4px; }
.ticket-search {
  margin: 4px 12px 12px;
  height: 40px;
  border-radius: 12px;
  background: #EFEFEF;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  color: #9A9A9A;
  font-size: 14px;
  cursor: pointer;
}
.ticket-search img { width: 16px; height: 16px; opacity: 0.45; }
.ticket-manage-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 12px 12px;
}
.ticket-m-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 12px;
  background: var(--white);
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.ticket-m-card:active { background: #FAFAFA; }
.ticket-m-card.hide { display: none; }
.ticket-m-card .ava.letter {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--grad-brand);
  color: #fff; font-size: 18px; font-weight: 750;
  display: grid; place-items: center; flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(47,107,255,.2);
}
.ticket-m-card .ava.letter.alt {
  background: linear-gradient(135deg, #6B9BFF, #4C8DFF);
}
.ticket-m-card .ava.letter.done {
  background: linear-gradient(135deg, #BDBDBD, #9E9E9E);
}
.ticket-m-card .meta { flex: 1; min-width: 0; }
.ticket-m-card .name {
  font-size: 16px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ticket-m-card .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ticket-m-card .badge.status { flex-shrink: 0; }
.ticket-m-card .chevron { width: 14px; height: 14px; opacity: 0.3; flex-shrink: 0; }
.ticket-list-foot {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, transparent, var(--bg) 28%);
  pointer-events: none;
  z-index: 2;
}
.ticket-list-foot .ticket-submit {
  margin: 0;
  width: 100%;
  pointer-events: auto;
}

/* Ticket detail (customer detail remap) */
.ticket-detail-scroll {
  background: var(--bg);
  padding: 12px 12px 96px;
}
.td-head-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  background: var(--white);
  border-radius: 14px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.td-head-card .ava.letter {
  width: 52px; height: 52px; border-radius: 14px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: #fff; font-size: 20px; font-weight: 750;
  display: grid; place-items: center; flex-shrink: 0;
}
.td-head-card .info { flex: 1; min-width: 0; }
.td-head-card .name {
  font-size: 17px; font-weight: 750;
  line-height: 1.3;
  padding-right: 8px;
}
.td-head-card .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.td-head-card .badge.status { flex-shrink: 0; margin-top: 2px; }

.td-tabs {
  display: flex;
  gap: 8px;
  margin: 14px 0 12px;
  overflow-x: auto;
}
.td-tabs button {
  flex-shrink: 0;
  height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.td-tabs button.active {
  background: var(--grad-brand);
  color: #fff;
}

.td-pane.hide { display: none; }
.td-day {
  font-size: 13px;
  color: var(--text-3);
  margin: 14px 4px 10px;
}
.td-tl-item {
  display: flex;
  gap: 12px;
  position: relative;
  padding: 0 4px 18px 4px;
}
.td-tl-item::before {
  content: "";
  position: absolute;
  left: 21px;
  top: 36px;
  bottom: 0;
  width: 2px;
  background: #E8E8E8;
}
.td-tl-item:last-child::before { display: none; }
.td-ava {
  width: 36px; height: 36px; border-radius: 50%;
  flex-shrink: 0; position: relative; z-index: 1;
  background: var(--white);
}
.td-body { flex: 1; min-width: 0; }
.td-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.td-name { font-size: 14px; font-weight: 650; }
.td-time { font-size: 12px; color: var(--text-3); }
.td-type { margin: 6px 0; }
.td-text {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.55;
  background: var(--white);
  border-radius: 10px;
  padding: 10px 12px;
}

.td-person {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--white);
  border-radius: 12px;
  margin-bottom: 10px;
  cursor: pointer;
}
.td-person img {
  width: 40px; height: 40px; border-radius: 50%;
}
.td-person .name { flex: 1; font-size: 15px; font-weight: 600; }
.td-del {
  height: 30px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: #3A3A3A;
  color: #fff;
  font-size: 13px;
  cursor: pointer;
}
.td-del:active { opacity: 0.85; }

.td-info-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
  background: transparent;
}
.td-info-row .k {
  width: 72px;
  flex-shrink: 0;
  font-size: 14px;
  color: var(--text);
}
.td-info-row .v {
  flex: 1;
  font-size: 14px;
  color: var(--text-2);
  text-align: right;
  line-height: 1.45;
}
.td-info-row.block {
  flex-direction: column;
  gap: 8px;
}
.td-info-row.block .v { text-align: left; }

.ticket-detail-foot {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, transparent, var(--bg) 28%);
  z-index: 2;
}
.ticket-detail-foot .ticket-submit {
  margin: 0;
  width: 100%;
}

.filter-chips {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 12px 16px 4px;
}
.filter-chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; padding: 6px 14px; border-radius: 999px;
  background: var(--white); color: var(--text-2); font-size: 13px;
  border: 1px solid var(--line); cursor: pointer; font-weight: 500;
}
.chip.active {
  background: var(--grad-brand); color: #fff; border-color: transparent;
  box-shadow: 0 4px 12px rgba(47,107,255,.22);
}

/* 消息页：分段筛选（全部 / 已读 / 未读） */
.msg-seg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin: 12px 16px 8px;
  padding: 4px;
  border-radius: 14px;
  background: rgba(47,107,255,.06);
  border: 1px solid rgba(47,107,255,.08);
}
.msg-seg button {
  height: 34px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
}
.msg-seg button.active {
  color: var(--primary-dark);
  background: #fff;
  box-shadow: 0 2px 8px rgba(47,107,255,.14);
}

.msg-scroll {
  background:
    radial-gradient(120% 60% at 0% 0%, rgba(47,107,255,.08), transparent 55%),
    var(--bg);
}
.msg-list {
  margin: 8px 12px 16px;
  background: var(--white);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(20, 36, 28, 0.04);
  border: 1px solid rgba(47,107,255,.06);
}
.conv-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 14px; cursor: pointer; position: relative;
}
.conv-row + .conv-row::before {
  content: ""; position: absolute; left: 70px; right: 14px; top: 0;
  height: 1px; background: var(--line);
}
.conv-row:active { background: #F7FCFA; }
.conv-row.hide { display: none; }
.ava-box {
  width: 48px; height: 48px; border-radius: 14px; flex-shrink: 0;
  position: relative; background: var(--primary-soft);
  overflow: visible;
}
.ava-box img { width: 48px; height: 48px; border-radius: 14px; display: block; }
.ava-box.group img { border-radius: 14px; }
.ava-box.sys { background: #EBF1FF; }
.ava-box .dot {
  position: absolute; right: -1px; bottom: -1px;
  width: 10px; height: 10px; border-radius: 50%;
  background: #C7C7C7; border: 2px solid #fff;
}
.ava-box .dot.online { background: var(--success); }
.conv-row .meta { flex: 1; min-width: 0; }
.conv-row .top,
.conv-row .bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.conv-row .name { font-size: 16px; font-weight: 650; }
.conv-row .time { font-size: 11px; color: var(--text-3); flex-shrink: 0; }
.conv-row .preview {
  font-size: 13px; color: var(--text-3); margin-top: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0;
}
.conv-row .tag-img { color: var(--primary); }
.conv-row .unread {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--grad-brand); color: #fff; font-size: 11px; font-weight: 700;
  display: inline-grid; place-items: center; flex-shrink: 0;
}
.conv-row .check { width: 14px; height: 14px; flex-shrink: 0; margin-top: 4px; }

/* Contacts */
.contacts-scroll {
  position: relative;
  background: var(--bg);
  padding-bottom: 16px;
}
.ct-team-banner {
  margin: 12px 16px 0;
  padding: 14px 14px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background:
    linear-gradient(135deg, rgba(47,107,255,.12), rgba(107,155,255,.04)),
    #fff;
  border: 1px solid rgba(47,107,255,.12);
}
.ct-team-name { font-size: 15px; font-weight: 750; color: var(--text); }
.ct-team-sub { margin-top: 4px; font-size: 12px; color: var(--text-2); }
.ct-team-btn {
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--grad-brand);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.contacts-search {
  margin: 12px 16px 0; padding: 11px 14px;
  background: #fff; border-radius: 999px;
  display: flex; align-items: center; gap: 8px;
  color: var(--text-3); font-size: 14px; cursor: pointer;
  border: 1px solid rgba(47,107,255,.1);
  box-shadow: 0 2px 10px rgba(47,107,255,.04);
}
.contacts-search img { width: 16px; height: 16px; opacity: .45; }
.contacts-entries {
  display: flex; flex-direction: column; gap: 8px;
  padding: 12px 16px 4px;
}
.entry-card {
  background: #fff; border-radius: 14px; padding: 12px 14px;
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  border: 1px solid rgba(47,107,255,.08);
  box-shadow: 0 2px 10px rgba(20, 32, 51, 0.03);
}
.entry-card:active { background: var(--primary-soft); }
.entry-card img { width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0; }
.entry-card > div { flex: 1; min-width: 0; }
.entry-card .en { font-size: 14px; font-weight: 650; }
.entry-card .es { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.entry-arrow { color: var(--text-3); font-size: 18px; line-height: 1; }
.contacts-section-hd {
  padding: 10px 18px 6px;
  font-size: 12px; font-weight: 700; color: var(--text-3);
}
.contacts-list {
  margin: 0 12px 16px; background: #fff; border-radius: 18px; overflow: hidden;
  box-shadow: 0 4px 16px rgba(20, 32, 51, 0.04);
  border: 1px solid rgba(47,107,255,.06);
}
.index-letter {
  padding: 8px 14px 4px;
  font-size: 12px; color: var(--primary-dark); font-weight: 700;
  background: linear-gradient(90deg, var(--primary-soft), #fff 70%);
}
.contact-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; cursor: pointer; position: relative;
}
.contact-row + .contact-row {
  border-top: 1px solid var(--line);
}
.index-letter + .contact-row { border-top: none; }
.contact-row:active { background: #F5F8FF; }
.contact-row .ava-box { width: 44px; height: 44px; border-radius: 50%; }
.contact-row .ava-box img { width: 44px; height: 44px; border-radius: 50%; }
.contact-row .meta { flex: 1; min-width: 0; }
.contact-row .name { font-size: 15px; font-weight: 650; display: flex; align-items: center; gap: 6px; }
.contact-row .name .gender {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.contact-row .sub { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.side-index {
  position: absolute; right: 6px; top: 52%;
  transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 2px;
  z-index: 3; font-size: 10px; color: var(--primary-dark);
  font-weight: 700; text-align: center;
  padding: 8px 4px; line-height: 1.35;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(47,107,255,.12);
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(47,107,255,.08);
}
.side-index span {
  display: block; min-width: 14px; padding: 2px 0;
  cursor: pointer; border-radius: 4px;
}
.side-index span:active { background: var(--primary-soft); }

/* Follow / 排期看板 */
.follow-scroll {
  background:
    radial-gradient(110% 55% at 0% 0%, rgba(47,107,255,.08), transparent 55%),
    var(--bg);
  padding-bottom: 16px;
}

.seq-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin: 10px 12px 8px;
}
.seq-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 0;
  border-radius: 12px;
  background: var(--white);
  color: var(--text-2);
  font-size: 11px;
  font-weight: 600;
  border: 1px solid rgba(47,107,255,.06);
}
.seq-day span { font-size: 14px; color: var(--text); font-weight: 700; }
.seq-day.active {
  background: var(--grad-brand);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 14px rgba(47,107,255,.28);
}
.seq-day.active span { color: #fff; }
.seq-day.muted { opacity: .55; }

.seq-summary {
  margin: 0 12px 10px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.seq-summary div {
  background: var(--white);
  border-radius: 14px;
  padding: 10px 8px;
  text-align: center;
  border: 1px solid rgba(47,107,255,.08);
}
.seq-summary b {
  display: block;
  font-size: 16px;
  color: var(--primary-dark);
}
.seq-summary span {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--text-3);
}

.seq-flow-tip {
  margin: 0 12px 10px;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-2);
  background: var(--primary-soft);
  border: 1px solid rgba(47,107,255,.12);
}
.seq-flow-tip b { color: var(--primary-dark); }

.seq-chips { margin-bottom: 4px; }

.seq-board {
  display: grid;
  gap: 12px;
  padding: 0 12px 8px;
}
.seq-col {
  background: rgba(255,255,255,.55);
  border: 1px dashed rgba(47,107,255,.16);
  border-radius: 16px;
  padding: 10px;
}
.seq-col.hide { display: none; }
.seq-col-hd {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 13px;
}
.seq-col-hd strong { color: var(--text); }
.seq-col-hd em {
  margin-left: auto;
  font-style: normal;
  font-size: 12px;
  color: var(--text-3);
  background: var(--primary-soft);
  padding: 1px 8px;
  border-radius: 999px;
}
.seq-col-hd .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary);
}
.seq-col-hd .dot.pending { background: #F5A623; }
.seq-col-hd .dot.doing { background: var(--primary); }
.seq-col-hd .dot.done { background: #9CA3AF; }

.seq-card {
  margin: 0 !important;
  padding: 12px !important;
  border-radius: 14px !important;
  cursor: pointer;
}
.seq-card + .seq-card { margin-top: 8px !important; }
.seq-card.focus {
  box-shadow: 0 8px 20px rgba(47,107,255,.16) !important;
  border-color: rgba(47,107,255,.22) !important;
}
.seq-card.done { opacity: .88; }
.seq-ord {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 4px;
}
.seq-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}
.seq-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-3);
}
.seq-progress {
  margin-top: 10px;
  height: 6px;
  border-radius: 999px;
  background: var(--primary-soft);
  overflow: hidden;
}
.seq-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--grad-brand);
}
.seq-owners {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-2);
}
.seq-owners img {
  width: 22px; height: 22px; border-radius: 50%;
}
.seq-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.seq-actions button {
  flex: 1;
  height: 32px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-dark);
  background: var(--primary-soft);
}
.seq-actions button:active { background: var(--primary-muted); }
.seq-actions button[data-seq-start],
.seq-actions button[data-seq-done] {
  background: var(--grad-brand);
  color: #fff;
}

.follow-card {
  margin: 10px 12px; background: var(--white); border-radius: 18px;
  padding: 16px;
  box-shadow: 0 4px 16px rgba(20, 36, 28, 0.04);
  border: 1px solid rgba(47,107,255,.06);
}
.follow-card.hide { display: none; }
.follow-head { display: flex; gap: 12px; align-items: flex-start; }
.follow-head .ava.letter {
  width: 48px; height: 48px; border-radius: 14px; flex-shrink: 0;
  background: var(--grad-brand);
  color: #fff; font-size: 18px; font-weight: 700;
  display: grid; place-items: center;
  box-shadow: 0 4px 10px rgba(47,107,255,.22);
}
.follow-head .ava.letter.alt {
  background: linear-gradient(135deg, #8BB4FF, #6B9BFF);
}
.follow-head .ava.letter.done {
  background: linear-gradient(135deg, #C8C8C8, #9E9E9E);
}
.follow-head .info { flex: 1; min-width: 0; }
.follow-head .row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.follow-head .name { font-size: 17px; font-weight: 700; }
.badge.status.pending { background: #F5A623; }
.badge.status.done { background: #9E9E9E; }
.follow-call {
  flex-shrink: 0; height: 30px; padding: 0 12px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary);
  font-size: 12px; font-weight: 650; cursor: pointer;
}
.follow-call:active { background: var(--primary-muted); }
.tags { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.follow-stats {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 8px; margin-top: 14px;
  background: var(--primary-soft); border-radius: 12px; padding: 10px 8px;
}
.follow-stats div { text-align: center; }
.follow-stats b { display: block; font-size: 14px; color: var(--primary-dark); }
.follow-stats span { font-size: 11px; color: var(--text-3); }
.timeline { margin-top: 16px; padding-left: 4px; }
.timeline-date { font-size: 13px; color: var(--text-2); margin-bottom: 12px; font-weight: 600; }
.tl-item { display: flex; gap: 12px; position: relative; padding-bottom: 8px; }
.tl-ava { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; }
.tl-body { flex: 1; }
.tl-top { display: flex; justify-content: space-between; align-items: center; }
.tl-name { font-weight: 600; font-size: 14px; }
.tl-time { font-size: 12px; color: var(--text-3); }
.tl-type { margin: 6px 0; }
.tl-text { font-size: 13px; color: var(--text-2); line-height: 1.55; }
.follow-more {
  text-align: center; margin-top: 12px; padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 13px; color: var(--primary); font-weight: 600; cursor: pointer;
}

/* ========== Contract page ========== */
.contract-scroll {
  background: var(--bg);
  padding: 0 0 24px;
}

.flow-hero {
  margin: 10px 12px 8px;
  padding: 14px;
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(47,107,255,.14), rgba(255,255,255,.92));
  border: 1px solid rgba(47,107,255,.12);
}
.flow-hero-title { font-size: 16px; font-weight: 700; }
.flow-hero-sub { margin-top: 4px; font-size: 12px; color: var(--text-2); line-height: 1.4; }
.flow-steps {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
}
.flow-steps span {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.8);
  border: 1px solid rgba(47,107,255,.08);
}
.flow-steps span.on {
  color: var(--primary-dark);
  background: var(--primary-soft);
  border-color: rgba(47,107,255,.16);
}
.flow-steps i {
  width: 14px; height: 1px;
  background: rgba(47,107,255,.25);
}

.contract-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 12px;
}
.contract-card {
  background: var(--white);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.contract-card.hide { display: none; }
.flow-card { border: 1px solid rgba(47,107,255,.08); }
.flow-card.archived { opacity: .9; }
.flow-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.flow-badge {
  font-size: 11px;
  font-weight: 700;
  color: #C2410C;
  background: #FFF7ED;
  padding: 3px 8px;
  border-radius: 999px;
}
.flow-badge.soft {
  color: var(--primary-dark);
  background: var(--primary-soft);
}
.flow-badge.mute {
  color: #6B7280;
  background: #F3F4F6;
}
.flow-path {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  font-size: 11px;
  color: var(--text-3);
}
.flow-path span {
  padding: 3px 8px;
  border-radius: 999px;
  background: #F3F4F6;
}
.flow-path span.done {
  color: var(--primary-dark);
  background: var(--primary-soft);
}
.flow-path span.now {
  color: #C2410C;
  background: #FFF7ED;
  font-weight: 700;
}
.flow-path i {
  width: 10px; height: 1px;
  background: #D1D5DB;
}
.ct-top { display: flex; gap: 12px; align-items: flex-start; }
.ct-icon {
  width: 44px; height: 52px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.ct-icon img { width: 40px; height: auto; }
.ct-meta { flex: 1; min-width: 0; }
.ct-name {
  font-size: 15px; font-weight: 700;
  line-height: 1.35;
  word-break: break-all;
}
.ct-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ct-sub { font-size: 12px; color: var(--text-3); margin-top: 6px; }
.ct-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.ct-btn {
  height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.ct-btn:active { background: var(--primary-dark); }
.ct-btn.ghost {
  background: var(--primary-soft);
  color: var(--primary-dark);
}
.ct-btn.ghost:active { background: var(--primary-muted); }

.badge.tag.st-pending {
  background: #FFF4E0;
  color: #C47A0A;
}
.badge.tag.st-active {
  background: #EBF1FF;
  color: #1E4FD6;
}
.badge.tag.st-archived {
  background: #F0F2F1;
  color: #6B7570;
}

/* Contract upload */
.contract-upload-scroll {
  background: var(--bg);
  padding: 12px 12px 28px;
}
.cu-file {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, #F5F8FF 0%, #FFFFFF 70%);
  border: 1.5px dashed rgba(47,107,255,.35);
  text-align: left;
  cursor: pointer;
  margin-bottom: 12px;
}
.cu-file:active { background: var(--primary-soft); }
.cu-file-ico {
  width: 48px; height: 56px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.cu-file-ico img { width: 40px; height: auto; }
.cu-file-meta { flex: 1; min-width: 0; }
.cu-file-title {
  font-size: 15px; font-weight: 700; color: var(--text);
  word-break: break-all;
}
.cu-file-sub {
  margin-top: 4px;
  font-size: 12px; color: var(--text-3);
}
.cu-file-act {
  flex-shrink: 0;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--grad-brand);
  color: #fff;
  font-size: 12px;
  font-weight: 650;
  display: grid;
  place-items: center;
}
.cu-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,.03);
}
.cu-card .tf-row:last-child,
.cu-card .tf-block:last-child { border-bottom: 0; }
.cu-status-card { padding: 14px; }
.cu-section-hd {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.cu-section-title { font-size: 15px; font-weight: 700; }
.cu-section-desc { font-size: 12px; color: var(--text-3); }
.cu-status-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cu-status-opt,
.status-sheet-opt {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: #fff;
  text-align: left;
  cursor: pointer;
  color: var(--text);
}
.cu-status-opt:active,
.status-sheet-opt:active { background: #FAFCFA; }
.cu-status-opt.active,
.status-sheet-opt.active {
  border-color: rgba(47,107,255,.45);
  background: linear-gradient(180deg, #F4FDF9 0%, #FFFFFF 100%);
  box-shadow: 0 0 0 3px rgba(47,107,255,.08);
}
.cu-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.cu-dot.pending { background: #F5A623; box-shadow: 0 0 0 4px rgba(245,166,35,.18); }
.cu-dot.active { background: #2F6BFF; box-shadow: 0 0 0 4px rgba(47,107,255,.18); }
.cu-dot.archived { background: #9AA39E; box-shadow: 0 0 0 4px rgba(154,163,158,.18); }
.cu-opt-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cu-opt-text strong {
  font-size: 15px;
  font-weight: 700;
  font-style: normal;
}
.cu-opt-text em {
  font-size: 12px;
  color: var(--text-3);
  font-style: normal;
}
.cu-check {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 1.5px solid #D5DCD8;
  flex-shrink: 0;
  position: relative;
}
.cu-status-opt.active .cu-check,
.status-sheet-opt.active .cu-check {
  border-color: var(--primary);
  background: var(--primary);
}
.cu-status-opt.active .cu-check::after,
.status-sheet-opt.active .cu-check::after {
  content: "";
  position: absolute;
  left: 6px; top: 3px;
  width: 5px; height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Status change sheet */
.status-sheet {
  left: 10px; right: 10px;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
}
.status-sheet-panel {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(20, 36, 28, 0.12);
}
.status-sheet-hd {
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--line);
}
.status-sheet-kicker {
  font-size: 12px;
  font-weight: 650;
  color: var(--primary-dark);
  letter-spacing: 0.5px;
}
.status-sheet-title {
  margin-top: 4px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  word-break: break-all;
}
.status-sheet-list {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.status-sheet .sheet-cancel { margin-top: 8px; }

.sheet-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 50;
}
.sheet-mask.hide { display: none; }
.action-sheet {
  position: absolute;
  left: 10px; right: 10px;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  z-index: 51;
  background: transparent;
}
.action-sheet.hide { display: none; }
.sheet-title {
  background: #fff;
  border-radius: 14px 14px 0 0;
  padding: 14px 16px 8px;
  text-align: center;
  font-size: 13px;
  color: var(--text-3);
  word-break: break-all;
}
.sheet-item {
  display: block;
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 16px;
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
}
.sheet-item:last-of-type { border-radius: 0 0 14px 14px; }
.sheet-item:active { background: #FAFAFA; }
.sheet-cancel {
  display: block;
  width: 100%;
  margin-top: 8px;
  border: 0;
  border-radius: 14px;
  background: #fff;
  padding: 16px;
  font-size: 16px;
  font-weight: 650;
  color: var(--text);
  cursor: pointer;
}
.sheet-cancel:active { background: #FAFAFA; }

/* Join team dialog */
.team-mask {
  position: absolute;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.38);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
}
.team-mask.hide { display: none; }
.team-dialog {
  width: min(100%, 300px);
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(20, 32, 51, 0.18);
}
.team-dialog-body { padding: 20px 18px 12px; }
.team-dialog-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}
.team-dialog-sub {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-3);
}
.team-dialog-input {
  width: 100%;
  height: 40px;
  margin-top: 14px;
  padding: 0 12px;
  border: 1px solid #E6EAF2;
  border-radius: 8px;
  background: #fff;
  font-size: 16px;
  color: var(--text);
}
.team-dialog-input:focus { border-color: var(--primary); }
.team-apply-link {
  display: block;
  margin-top: 12px;
  padding: 0;
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}
.team-dialog-actions {
  display: flex;
  border-top: 1px solid var(--line);
}
.team-dialog-actions button {
  flex: 1;
  height: 46px;
  font-size: 16px;
  font-weight: 600;
  color: #6B7280;
  cursor: pointer;
}
.team-dialog-actions button + button { border-left: 1px solid var(--line); }
.team-dialog-actions button.primary { color: var(--primary); }
.team-dialog-actions button:active { background: #F7F8FB; }

.team-apply-scroll {
  background: #fff;
  padding: 8px 16px 28px;
}
.team-apply-lead {
  margin: 8px 0 16px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-2);
}
.team-field { display: block; margin-bottom: 14px; }
.team-field > span {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 650;
  color: var(--text);
}
.team-field input,
.team-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #F7F8FB;
  padding: 12px 12px;
  font-size: 15px;
  color: var(--text);
  resize: none;
}
.team-field input { height: 46px; }
.team-field input:focus,
.team-field textarea:focus {
  border-color: var(--primary);
  background: #fff;
}

.team-members-scroll { padding: 12px 12px 28px; }
.tm-head {
  background: #fff; border-radius: 16px; padding: 14px 16px; margin-bottom: 12px;
  border: 1px solid rgba(47,107,255,.08);
}
.tm-team { font-size: 16px; font-weight: 750; }
.tm-code { margin-top: 4px; font-size: 12px; color: var(--text-3); }
.tm-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.tm-card {
  background: #fff; border-radius: 16px; padding: 14px;
  border: 1px solid rgba(47,107,255,.06);
}
.tm-card.hide { display: none; }
.tm-main { display: flex; align-items: center; gap: 10px; }
.tm-main img { width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0; }
.tm-meta { flex: 1; min-width: 0; }
.tm-name { font-size: 15px; font-weight: 700; }
.tm-sub { margin-top: 3px; font-size: 12px; color: var(--text-3); }
.tm-badge {
  flex-shrink: 0; font-size: 12px; font-weight: 650;
  padding: 3px 8px; border-radius: 999px;
}
.tm-badge.pending { background: #FFF4E0; color: #C47A0A; }
.tm-badge.passed { background: #E8F8EF; color: #1F8A4C; }
.tm-actions { display: flex; justify-content: flex-end; margin-top: 12px; }

/* Me page */
.me-scroll {
  background:
    radial-gradient(90% 40% at 0% 0%, rgba(47,107,255,.08), transparent 55%),
    var(--bg);
  padding-bottom: 20px;
}
.me-head {
  margin: 12px 12px 0;
  padding: 14px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(47,107,255,.1);
  box-shadow: 0 8px 24px rgba(47,107,255,.08);
}
.me-head-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.me-brand-chip {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 750;
  color: var(--primary-dark);
  background: var(--primary-soft);
  border: 1px solid rgba(47,107,255,.14);
}
.me-head-actions { display: flex; gap: 8px; }
.me-head-actions .icon-btn.ghost {
  width: 34px; height: 34px; border-radius: 50%;
  background: #fff;
  border: 1px solid rgba(47,107,255,.14);
}
.me-head-actions .icon-btn.ghost img { width: 18px; height: 18px; }
.me-profile {
  display: flex; gap: 12px; align-items: center;
}
.me-profile .ava {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--primary-soft); flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(47,107,255,.16);
}
.me-info { flex: 1; min-width: 0; }
.me-info .name-row {
  display: flex; align-items: center; gap: 8px;
}
.me-info .name { font-size: 20px; font-weight: 780; color: var(--text); }
.me-edit {
  height: 26px; padding: 0 10px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary-dark);
  font-size: 11px; font-weight: 700; cursor: pointer;
  border: 1px solid rgba(47,107,255,.14);
}
.me-info .id { font-size: 13px; color: var(--text-2); margin-top: 4px; }
.me-meta-row {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 8px;
}
.me-info .verify {
  display: inline-block;
  font-size: 11px; padding: 3px 8px; border-radius: 999px;
  color: #C2410C; background: #FFF7ED; cursor: pointer;
}
.me-team {
  display: inline-block;
  font-size: 11px; padding: 3px 8px; border-radius: 999px;
  color: var(--text-3); background: #F3F5FA;
}
.me-team.on {
  color: var(--primary-dark); background: var(--primary-soft);
}
.me-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px; margin-top: 14px;
}
.me-stats button {
  text-align: center;
  padding: 10px 6px;
  border-radius: 12px;
  background: var(--primary-soft);
  border: 1px solid rgba(47,107,255,.1);
  cursor: pointer;
}
.me-stats b {
  display: block;
  font-size: 18px;
  color: var(--primary-dark);
  line-height: 1.1;
}
.me-stats span {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-2);
}
.me-quick-grid {
  margin: 12px 12px 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.me-quick-grid button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 14px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(47,107,255,.08);
  box-shadow: 0 4px 14px rgba(20,32,51,.04);
  cursor: pointer;
  text-align: left;
}
.me-quick-grid button:active { background: var(--primary-soft); }
.me-quick-grid img {
  width: 40px; height: 40px; border-radius: 12px;
  box-shadow: 0 2px 8px rgba(47,107,255,.16);
}
.me-quick-grid span {
  font-size: 14px; font-weight: 700; color: var(--text);
}
.me-quick-grid em {
  font-style: normal;
  font-size: 11px;
  color: var(--text-3);
}
.me-group {
  margin: 12px 12px 0; background: #fff; border-radius: 18px; overflow: hidden;
  box-shadow: 0 4px 16px rgba(20, 32, 51, 0.04);
  border: 1px solid rgba(47,107,255,.06);
}
.me-group-title {
  padding: 12px 14px 4px; font-size: 12px; color: var(--text-3); font-weight: 600;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.me-role-demo {
  font-size: 11px; font-weight: 650; color: var(--primary); cursor: pointer; padding: 2px 0;
}
.me-cell {
  display: flex; align-items: center; gap: 12px;
  padding: 14px; cursor: pointer; position: relative;
}
.me-cell + .me-cell::before {
  content: ""; position: absolute; left: 66px; right: 14px; top: 0;
  height: 1px; background: var(--line);
}
.me-cell:active { background: #F5F8FF; }
.me-cell .label { flex: 1; font-size: 15px; font-weight: 560; }
.me-cell .hint-right { font-size: 12px; color: var(--text-3); }
.me-cell .chevron { width: 16px; height: 16px; opacity: .35; }
.menu-icon {
  width: 40px; height: 40px; border-radius: 12px;
  background: transparent;
  display: grid; place-items: center; flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(47,107,255,.16);
}
.menu-icon img { width: 40px; height: 40px; border-radius: 12px; display: block; }

/* Chat — green theme */
.chat-nav {
  height: auto;
  min-height: 56px;
  padding: 8px 10px 10px;
  gap: 6px;
  background: linear-gradient(180deg, #EEF3FF 0%, #FFFFFF 100%);
  border-bottom: 1px solid var(--primary-muted);
  position: relative;
}
.chat-nav::after {
  content: "";
  position: absolute; left: 16px; right: 16px; bottom: 0;
  height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), transparent 70%);
  opacity: .35;
}
.chat-back {
  flex-shrink: 0;
  color: var(--text);
  z-index: 1;
}
.chat-head {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 10px;
  z-index: 1; cursor: pointer;
  padding: 2px 4px;
  border-radius: 12px;
}
.chat-head:active { background: var(--primary-soft); }
.chat-head .ava-wrap {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  padding: 2px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  box-shadow: 0 2px 8px rgba(47,107,255,.22);
}
.chat-head .ava {
  width: 100%; height: 100%; border-radius: 10px;
  display: block; background: #fff;
}
.chat-head .meta { min-width: 0; }
.chat-head .meta .n {
  font-size: 16px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chat-head .meta .s {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; color: var(--text-3); margin-top: 2px;
}
.chat-head .online-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--success); flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(34,197,94,.2);
}
.chat-actions {
  display: flex; align-items: center; gap: 2px;
  flex-shrink: 0; z-index: 1;
}
.chat-actions .icon-btn {
  width: 36px; height: 36px;
  color: var(--primary);
}
.chat-actions .icon-btn img { width: 20px; height: 20px; }

.chat-bg {
  flex: 1; overflow-y: auto; padding: 8px 12px 12px;
  background: #F2F2F2;
}
.date-pill {
  width: fit-content; margin: 10px auto;
  background: #E8E8E8; color: #8A8A8A;
  font-size: 12px; padding: 3px 10px; border-radius: 999px;
}
.sys-tip {
  width: fit-content; max-width: 86%; margin: 10px auto;
  background: rgba(0,0,0,.06); color: #8A8A8A;
  font-size: 12px; padding: 6px 12px; border-radius: 8px; text-align: center; line-height: 1.4;
}
.bubble-row {
  display: flex; gap: 8px; margin: 8px 0; align-items: flex-end;
}
.bubble-row.out { flex-direction: row-reverse; }
.bubble-row .ava { width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0; }
.bubble {
  max-width: 72%; border-radius: 12px; position: relative;
  font-size: 15px; line-height: 1.45; color: var(--text);
}
.bubble.text {
  background: #fff;
  padding: 10px 12px;
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
}
.bubble-row.out .bubble.text {
  background: var(--primary-muted);
  border-radius: 12px 4px 12px 12px;
}
.bubble-row:not(.out) .bubble.text {
  border-radius: 4px 12px 12px 12px;
}
.bubble .txt { flex: 1; min-width: 0; word-break: break-word; }
.bubble .meta-inline {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; color: var(--text-3); white-space: nowrap; margin-left: auto;
}
.bubble .meta-inline img { width: 12px; height: 12px; }
.bubble.media-wrap {
  padding: 0; overflow: hidden; background: #fff;
  border: 2px solid var(--primary); border-radius: 12px 4px 12px 12px;
}
.bubble .img-msg {
  width: 180px; height: 130px;
  background: linear-gradient(160deg, #D6E4FF, #6B9BFF 45%, #2F6BFF);
  color: #fff; font-size: 13px; font-weight: 600;
  display: grid; place-items: center;
}
.bubble .stamp {
  position: absolute; right: 8px; bottom: 6px;
  font-size: 10px; color: #fff;
  display: flex; align-items: center; gap: 3px;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
}
.chat-input {
  background: #fff; padding: 8px 12px calc(8px + var(--safe-bottom));
  border-top: 1px solid #EEE;
}
.composer {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.composer .field {
  flex: 1; background: #F5F5F5; border-radius: 22px;
  padding: 11px 16px; font-size: 15px; color: var(--text-3); cursor: text;
}
.send-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--grad-brand);
  display: grid; place-items: center;
  cursor: pointer; flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(47,107,255,.35);
}
.send-btn:active { transform: scale(.96); filter: brightness(.96); }
.send-btn img { width: 18px; height: 18px; }
.tools.line {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 4px;
}
.tools.line button {
  width: 40px; height: 36px; display: grid; place-items: center;
  cursor: pointer; border-radius: 10px; color: var(--primary);
}
.tools.line button:active { background: var(--primary-soft); }
.tools.line img { width: 26px; height: 26px; }
.tools.line button img[src*="more"] { width: 18px; height: 18px; }


/* ========== Auth screens (login / register / forgot) ========== */
.auth-screen { background: #12203A; }
.auth-shell {
  flex: 1; min-height: 0; display: flex; flex-direction: column;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: var(--bg);
}
.auth-shell.alt {
  background: var(--bg);
}
.auth-hero {
  position: relative; padding: 6px 20px 20px; color: #fff; overflow: hidden;
  flex-shrink: 0;
}
.auth-hero-deco {
  position: absolute; right: -46px; top: -8px; width: 140px; height: 140px;
  border-radius: 40% 60% 50% 50%;
  background: linear-gradient(135deg, rgba(255,255,255,.12), transparent);
  transform: rotate(18deg); pointer-events: none;
}
.auth-hero-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; position: relative; z-index: 1;
}
.net-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; padding: 5px 10px; border-radius: 999px;
  background: rgba(255,255,255,.14); cursor: pointer;
}
.net-chip .pulse {
  width: 7px; height: 7px; border-radius: 50%; background: #4ADE80;
  box-shadow: 0 0 0 3px rgba(74,222,128,.25);
}
.ghost-refresh {
  font-size: 12px; font-weight: 650; color: #fff;
  padding: 6px 12px; border-radius: 8px;
  background: rgba(255,255,255,.16); cursor: pointer;
}
.auth-brand {
  display: flex; align-items: center; gap: 11px;
  position: relative; z-index: 1; margin-bottom: 8px;
}
.auth-logo { width: 44px; height: 44px; border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,.22); }
.auth-name { font-size: 20px; font-weight: 800; letter-spacing: .3px; }
.auth-tag { font-size: 12px; opacity: .78; margin-top: 2px; }
.auth-hello-sub {
  font-size: 12px; opacity: .78; line-height: 1.4;
  position: relative; z-index: 1;
}

.auth-sheet {
  flex: 1;
  margin-top: 0;
  background: #fff;
  border-radius: 22px 22px 0 0;
  padding: 18px 20px calc(12px + var(--safe-bottom));
  box-shadow: 0 -8px 28px rgba(0,0,0,.16);
  display: flex;
  flex-direction: column;
}
.auth-sheet.flat {
  margin: 0 12px 16px; border-radius: 18px;
  box-shadow: 0 4px 16px rgba(0,0,0,.04);
  padding: 16px 16px 20px;
}

.auth-seg {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  background: #F4F4F4; border-radius: 12px; padding: 4px; margin-bottom: 18px;
}
.auth-seg button {
  height: 36px; border-radius: 10px; font-size: 14px; font-weight: 650;
  color: var(--text-2); cursor: pointer;
}
.auth-seg button.active {
  background: #fff; color: var(--primary);
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.auth-pane.hide { display: none; }

.auth-field {
  display: block; margin-bottom: 14px;
}
.auth-field > span {
  display: block; font-size: 12px; color: var(--text-3); margin-bottom: 6px; font-weight: 600;
}
.auth-field input {
  width: 100%; height: 46px; border-radius: 12px;
  background: #F7F7F7; border: 1px solid transparent;
  padding: 0 14px; font-size: 15px; color: var(--text);
}
.auth-field input:focus { border-color: var(--primary-muted); background: #F3FCF8; }
.auth-field.compact { margin-bottom: 10px; }
.with-icon, .with-action, .phone-row {
  display: flex; align-items: center; gap: 8px;
  background: #F7F7F7; border-radius: 12px; padding-right: 8px;
}
.with-icon input, .with-action input, .phone-row input {
  background: transparent !important; border: none !important; flex: 1; min-width: 0;
}
.eye-btn {
  width: 36px; height: 36px; display: grid; place-items: center; cursor: pointer; opacity: .7;
}
.eye-btn img { width: 20px; height: 20px; }
.code-btn {
  flex-shrink: 0; height: 32px; padding: 0 10px; border-radius: 8px;
  background: var(--primary-soft); color: var(--primary);
  font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.code-btn:active { background: var(--primary-muted); }
.cc {
  flex-shrink: 0; height: 46px; padding: 0 10px 0 14px;
  font-size: 14px; font-weight: 650; color: var(--text); cursor: pointer;
  border-right: 1px solid #E8E8E8;
}

.auth-links {
  display: flex; align-items: center; gap: 10px;
  justify-content: flex-end; margin: 4px 0 16px;
  font-size: 13px;
}
.auth-links.end { justify-content: flex-end; color: var(--text-3); }
.auth-links button { color: var(--primary); font-weight: 650; cursor: pointer; }
.auth-links .sep { color: #DDD; }

.auth-primary {
  width: 100%; height: 50px; border-radius: 14px;
  background: var(--grad-brand);
  color: #fff; font-size: 16px; font-weight: 750; cursor: pointer;
  box-shadow: 0 10px 24px rgba(47,107,255,.32);
  margin-top: 8px;
}
.auth-primary:active { transform: scale(.985); filter: brightness(.96); }

/* Auth v3 — blue hero + bottom sheet */
.auth-shell.v3 {
  flex: 1; min-height: 0; display: flex; flex-direction: column;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: var(--bg);
  padding: 0;
}
.auth-v3-hero {
  padding: 10px 18px 22px;
  color: #fff;
  background:
    radial-gradient(90% 80% at 100% 0%, rgba(255,255,255,.18), transparent 45%),
    linear-gradient(155deg, #6B9BFF 0%, #2F6BFF 48%, #1A45C7 100%);
  border-radius: 0 0 28px 28px;
  box-shadow: 0 12px 28px rgba(47,107,255,.28);
}
.auth-v3-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.auth-shell.v3 .net-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px 0 10px;
  border-radius: 10px;
  background: rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.28);
  color: #fff;
  font-size: 12px;
  font-weight: 650;
  backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
}
.auth-shell.v3 .net-chip .net-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}
.auth-shell.v3 .net-chip .net-bars i {
  display: block;
  width: 3px;
  border-radius: 1px;
  background: rgba(255,255,255,.35);
}
.auth-shell.v3 .net-chip .net-bars i:nth-child(1) { height: 4px; }
.auth-shell.v3 .net-chip .net-bars i:nth-child(2) { height: 6px; }
.auth-shell.v3 .net-chip .net-bars i:nth-child(3) { height: 9px; }
.auth-shell.v3 .net-chip .net-bars i:nth-child(4) { height: 12px; }
.auth-shell.v3 .net-chip.ok .net-bars i {
  background: #fff;
}
.auth-shell.v3 .net-chip .net-text {
  letter-spacing: .3px;
}
.auth-shell.v3 .ghost-refresh {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.28);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
}
.auth-shell.v3 .ghost-refresh img {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1);
}
.auth-shell.v3 .ghost-refresh:active {
  background: rgba(255,255,255,.32);
}
.auth-v3-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.auth-v3-logo {
  width: 56px; height: 56px; border-radius: 16px;
  object-fit: cover; display: block;
  box-shadow: 0 8px 20px rgba(0,0,0,.18);
}
.auth-v3-brand h1 {
  font-size: 26px; font-weight: 800; letter-spacing: .5px;
}
.auth-v3-brand p {
  margin-top: 4px; font-size: 12px; opacity: .88;
}
.auth-v3-pills {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 16px;
}
.auth-v3-pills span {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.2);
}
.auth-v3-sheet {
  margin: -18px 14px 16px;
  padding: 18px 16px 16px;
  background: #fff;
  border-radius: 20px;
  border: 1px solid rgba(47,107,255,.1);
  box-shadow: 0 12px 32px rgba(20,32,51,.1);
  position: relative;
  z-index: 2;
}
.auth-v3-sheet.flat {
  margin: 0 14px 16px;
}
.auth-shell.v3.reg {
  background:
    radial-gradient(80% 40% at 100% 0%, rgba(47,107,255,.1), transparent 50%),
    var(--bg);
}
.auth-v3-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 10px 4px;
}
.auth-v3-bar-title {
  font-size: 16px; font-weight: 750; color: var(--text);
}
.auth-v3-intro {
  padding: 8px 18px 12px;
}
.auth-v3-intro .kicker {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary-dark);
  background: var(--primary-soft);
}
.auth-v3-intro h1 {
  margin-top: 10px;
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
}
.auth-v3-intro p {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-2);
}
.auth-links.between {
  justify-content: space-between;
  margin: 12px 0 4px;
}
.auth-links.center {
  justify-content: center;
  margin-top: 12px;
  color: var(--text-3);
}
.auth-shell.v3 .auth-version {
  margin-top: 14px;
  text-align: center;
  color: var(--text-3);
  font-size: 12px;
}
.auth-shell.v3 .auth-agree { margin-top: 12px; }
.auth-shell.v3 .auth-field input:focus {
  border-color: rgba(47,107,255,.35);
  background: #F5F8FF;
}
.auth-shell.v3 .with-action,
.auth-shell.v3 .phone-row {
  background: #F5F7FB;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.auth-shell.v3 .auth-field > span { color: var(--text-2); }

.auth-agree {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 12px; color: var(--text-2); line-height: 1.45;
  cursor: pointer;
}
.auth-agree input { margin-top: 2px; accent-color: var(--primary); }
.auth-agree a { color: var(--primary); font-weight: 600; }
.auth-version { font-size: 12px; color: var(--text-3); }
.auth-foot-tip {
  margin-top: 12px; text-align: center;
  font-size: 12px; color: var(--text-3); line-height: 1.5;
}
.auth-foot-tip a { color: var(--primary); }

.icon-btn.ghost-dark {
  width: 36px; height: 36px; border-radius: 10px;
  background: #fff; border: 1px solid rgba(47,107,255,.12);
  display: grid; place-items: center;
}
.icon-btn.ghost-dark img { width: 18px; height: 18px; }
.text-link {
  font-size: 13px; font-weight: 650; color: var(--primary);
  padding: 8px 10px; cursor: pointer;
}

.steps {
  display: flex; align-items: center; justify-content: space-between;
  gap: 6px; margin-bottom: 18px;
}
.step {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 11px; color: var(--text-3); font-weight: 600;
}
.step i {
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  background: #EEF1F6; color: var(--text-3);
  font-style: normal; font-size: 12px; font-weight: 700;
}
.step.on { color: var(--primary-dark); }
.step.on i {
  background: var(--grad-brand); color: #fff;
  box-shadow: 0 4px 10px rgba(47,107,255,.28);
}
.step-line {
  flex: 1; height: 2px; background: var(--line);
  margin-bottom: 18px;
}

.reg-block { margin-bottom: 14px; }
.reg-block-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 750; color: var(--text);
  margin-bottom: 10px;
}
.reg-block-title i {
  width: 20px; height: 20px; border-radius: 6px;
  display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary-dark);
  font-style: normal; font-size: 11px; font-weight: 800;
}

.phone:has(#screen-login.active) .status-bar {
  background: #6B9BFF;
  color: #fff;
}
.phone:has(#screen-login.active) .status-bar .island {
  background: rgba(0,0,0,.55);
}
.phone:has(#screen-forgot.active) .status-bar,
.phone:has(#screen-register.active) .status-bar,
.phone:has(#screen-me.active) .status-bar {
  background: #F3F5FA;
  color: var(--text);
}
.phone:has(#screen-forgot.active) .status-bar .island,
.phone:has(#screen-register.active) .status-bar .island,
.phone:has(#screen-me.active) .status-bar .island {
  background: #111;
}

.me-cell.danger { justify-content: center; }
.me-cell.danger::before { display: none !important; }

/* Toast */
.toast {
  position: absolute; left: 50%; bottom: 100px; transform: translateX(-50%);
  background: rgba(0,0,0,.78); color: #fff; padding: 8px 14px;
  border-radius: 8px; font-size: 13px; opacity: 0; pointer-events: none;
  transition: .2s; z-index: 20; white-space: nowrap;
}
.toast.show { opacity: 1; }

.hint {
  font-size: 12px; color: #666; text-align: center; max-width: 390px; line-height: 1.5;
}
.hint code { background: #fff; padding: 1px 6px; border-radius: 4px; }

@media (max-width: 480px) {
  .stage { padding: 0; justify-content: stretch; }
  .brand-bar, .hint { display: none; }
  .phone {
    width: 100%; height: 100vh; height: 100dvh;
    border-radius: 0; box-shadow: none;
  }
}
