/* Member screens in the app style (D-098, prototype/app-ui): overview, lead list and detail.
   Phones and tablets keep one readable column; from 1024px the screens use the full width
   (D-100: the 720px column left half of a desktop screen empty). */

.m-screen {
  max-width: 720px;
}
@media (min-width: 1024px) {
  .m-screen {
    max-width: none;
  }
  .m-screen .m-search {
    max-width: 560px;
  }
}
.m-hello.pagehead {
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}
.m-hello .tb-avatar {
  width: 58px;
  height: 58px;
}
.m-hello h1 {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.3;
}
.m-greet {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}
.m-notice {
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.m-notice span {
  flex: 1;
  min-width: 0;
}
.m-notice a {
  flex: none;
  margin-left: auto;
  padding: 8px 4px;
  font-weight: 700;
}

/* Section titles, counts, lists */
.m-section {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 22px 2px 10px;
}
.m-section h2 {
  margin: 0;
  font-size: 1rem;
}
.m-section a {
  padding: 6px 0;
  color: var(--green);
  font-size: 0.88rem;
  font-weight: 600;
}
.m-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.m-stat {
  min-height: 74px;
  padding: 12px 4px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  text-align: center;
  cursor: pointer;
}
.m-stat b {
  display: block;
  font-size: 1.45rem;
  line-height: 1.2;
}
.m-stat span {
  color: var(--muted);
  font-size: 0.76rem;
}
.m-stat.hot b {
  color: var(--danger);
}
.m-stat:hover {
  border-color: var(--green);
}
.m-list,
.m-card,
.m-empty {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
}
.m-list {
  overflow: hidden;
}
.m-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}
.m-row:last-child {
  border-bottom: 0;
}
.m-row:hover {
  background: var(--bg);
}
.m-row:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: -2px;
}
.m-avatar {
  display: grid;
  flex: none;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--green);
  font-weight: 700;
}
.m-avatar.lg {
  width: 64px;
  height: 64px;
  font-size: 1.6rem;
}
.m-main {
  flex: 1;
  min-width: 0;
}
.m-title,
.m-sub {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.m-title {
  font-weight: 600;
}
.m-sub {
  color: var(--muted);
  font-size: 0.8rem;
}
.m-end {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.m-time {
  color: var(--muted);
  font-size: 0.72rem;
  white-space: nowrap;
}
.m-empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 26px 18px;
  color: var(--muted);
  text-align: center;
}
.m-empty p {
  margin: 0;
}
.m-more {
  width: 100%;
  margin-top: 12px;
}

/* Search and filter chips */
.m-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 50px;
  margin-bottom: 10px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  color: var(--muted);
}
.m-search:focus-within {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}
.m-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  outline: 0;
}
.m-chips {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
  padding-bottom: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.m-chip {
  flex: none;
  min-height: 40px;
  padding: 7px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
}
.m-chip[aria-pressed="true"] {
  border-color: #102a43;
  background: #102a43;
  color: #fff;
}
html[data-theme="dark"] .m-chip[aria-pressed="true"] {
  border-color: var(--green);
  background: var(--green);
  color: #0d1823;
}

/* Lead detail */
.m-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}
.m-actions .btn {
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-height: 72px;
  padding: 8px 4px;
  font-size: 0.84rem;
}
.m-why {
  margin: 0 0 10px;
}
.m-card {
  padding: 16px;
}
.m-kv {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px 16px;
  margin: 0;
  font-size: 0.92rem;
}
.m-kv dt {
  color: var(--muted);
}
.m-kv dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.m-segment {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  margin-bottom: 10px;
  padding: 3px;
  border-radius: 12px;
  background: var(--line);
}
.m-segment button {
  min-height: 44px;
  padding: 8px 4px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}
.m-segment [aria-pressed="true"] {
  background: var(--paper);
  font-weight: 600;
  box-shadow: 0 1px 3px rgb(16 42 67 / 0.15);
}

/* QR sheet */
.m-qr {
  display: grid;
  gap: 12px;
  padding-top: 6px;
}
.m-qr-img {
  width: 220px;
  height: 220px;
  margin: 0 auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.m-qr-img svg {
  display: block;
  width: 100%;
  height: 100%;
}
.m-qr-url {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
  overflow-wrap: anywhere;
}
