@font-face {
  font-family: "Font Awesome 6 Free";
  src: url("../fonts/fa-solid-900.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: block;
}

* {
  box-sizing: border-box;
}

:root {
  --bg: #0b0b0d;
  --surface: #16161b;
  --panel: #222228;
  --panel-soft: #2c2c33;
  --line: rgba(255, 255, 255, 0.08);
  --text: #ffffff;
  --muted: #aaaab7;
  --weak: #737381;
  --blue: #3477ff;
  --purple: #7c45ff;
  --orange: #ffb02e;
  --pink: #ff4d6a;
  --green: #35d08a;
  --danger: #ff5c70;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
  letter-spacing: 0;
  background: linear-gradient(180deg, #101014 0%, #070708 100%);
}

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

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.fa-solid {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
}

.app-shell {
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 14px 92px;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 79, 106, 0.15), transparent 12rem),
    radial-gradient(circle at 92% 8%, rgba(52, 119, 255, 0.16), transparent 13rem),
    #0d0d10;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  min-height: 54px;
  margin: 0 -14px;
  padding: 4px 14px;
  background: rgba(13, 13, 16, 0.9);
  backdrop-filter: blur(12px);
}

.app-title {
  margin: 0;
  text-align: center;
  font-size: 17px;
  font-weight: 900;
}

.icon-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.hero-banner {
  position: relative;
  min-height: 154px;
  overflow: hidden;
  padding: 20px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 80% 30%, rgba(255, 204, 75, 0.28), transparent 5rem),
    linear-gradient(135deg, #20212b, #101015 72%);
  box-shadow: inset 0 0 0 1px var(--line);
}

.hero-banner::after {
  position: absolute;
  right: -22px;
  bottom: -34px;
  width: 150px;
  height: 120px;
  content: "";
  border-radius: 30px;
  background: linear-gradient(135deg, #ffbf3c, #ff4f6b 70%);
  transform: rotate(-12deg);
  opacity: 0.9;
}

.hero-banner > * {
  position: relative;
  z-index: 1;
}

.hero-kicker {
  margin: 0 0 8px;
  color: #ffd05a;
  font-size: 13px;
  font-weight: 800;
}

.hero-banner h1 {
  max-width: 250px;
  margin: 0;
  font-size: 30px;
  line-height: 1.12;
}

.hero-banner p {
  max-width: 270px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.quick-action,
.primary-btn,
.ghost-btn,
.text-btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 14px;
  font-weight: 900;
}

.quick-action,
.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  box-shadow: 0 12px 24px rgba(52, 119, 255, 0.22);
}

.quick-action.warm,
.primary-btn.warm {
  background: linear-gradient(135deg, var(--pink), var(--orange));
  box-shadow: 0 12px 24px rgba(255, 95, 69, 0.22);
}

.ghost-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px var(--line);
}

.text-btn {
  min-height: auto;
  color: #ffd05a;
  background: transparent;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 0 10px;
}

.section-head h2 {
  margin: 0;
  font-size: 18px;
}

.section-head a {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.scroll-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(150px, 72%);
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.scroll-row::-webkit-scrollbar {
  display: none;
}

.card,
.anchor-card,
.task-card,
.order-card,
.form-card,
.profile-card,
.detail-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(34, 34, 40, 0.92);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.16);
}

.anchor-card,
.task-card,
.order-card,
.form-card,
.profile-card,
.detail-card {
  padding: 14px;
}

.stack {
  display: grid;
  gap: 12px;
}

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

.avatar {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
  background: linear-gradient(145deg, #ff4e68, #ffb22e);
  box-shadow: 0 10px 22px rgba(255, 80, 105, 0.24);
}

.avatar.blue {
  background: linear-gradient(145deg, #3477ff, #7c45ff);
}

.avatar.green {
  background: linear-gradient(145deg, #32d189, #31a8ff);
}

.avatar-img {
  overflow: hidden;
}

.avatar-img img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.field-tip {
  color: var(--weak);
  font-size: 12px;
  line-height: 1.5;
}

.item-row,
.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.item-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.item-main h3,
.detail-card h2,
.task-card h3,
.order-card h3,
.profile-card h3 {
  margin: 0;
  font-size: 16px;
}

.detail-card h2 {
  line-height: 1.35;
}

.desc,
.meta,
.item-main p,
.task-card p,
.order-card p,
.profile-card p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.price {
  color: #ffd05a;
  font-size: 17px;
  font-weight: 900;
  white-space: nowrap;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag,
.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  color: #dcdce6;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.07);
}

.status.ok {
  color: #9ff2cb;
  background: rgba(53, 208, 138, 0.14);
}

.status.warn {
  color: #ffe09b;
  background: rgba(255, 176, 46, 0.14);
}

.status.danger {
  color: #ffb1bd;
  background: rgba(255, 92, 112, 0.14);
}

.filter-bar {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 8px;
  overflow-x: auto;
  margin: 8px 0 14px;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.filter-bar::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.06);
}

.filter-chip.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--purple));
}

.form-grid {
  display: grid;
  gap: 13px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  color: #f1f1f6;
  font-size: 14px;
  font-weight: 800;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: 0;
  padding: 0 13px;
  color: #ffffff;
  background: #151519;
}

.field textarea {
  min-height: 96px;
  padding: 12px 13px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--weak);
}

.upload-card {
  position: relative;
  display: grid;
  grid-template-columns: 54px 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 74px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #151519;
  cursor: pointer;
}

.upload-preview {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(145deg, #3477ff, #7c45ff);
}

.upload-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.upload-main {
  min-width: 0;
}

.upload-main strong,
.upload-main em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-main strong {
  font-size: 15px;
}

.upload-main em {
  margin-top: 5px;
  color: var(--weak);
  font-size: 12px;
  font-style: normal;
}

.upload-btn {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--pink), var(--orange));
}

.upload-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 30;
  width: min(100%, 480px);
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  min-height: 72px;
  padding: 8px 8px max(8px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(12, 12, 15, 0.95);
  backdrop-filter: blur(12px);
}

.bottom-nav a {
  display: grid;
  place-items: center;
  gap: 4px;
  color: #9c9ca8;
  font-size: 12px;
  font-weight: 800;
}

.bottom-nav a.active {
  color: #ffffff;
}

.bottom-nav i {
  font-size: 18px;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 150px;
  padding: 24px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  color: var(--muted);
  text-align: center;
}

.empty-state i {
  margin-bottom: 10px;
  color: #ffd05a;
  font-size: 28px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.stat-card {
  min-height: 78px;
  display: block;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.055);
  transition: transform 0.16s ease, background 0.16s ease;
}

a.stat-card:active {
  transform: scale(0.98);
  background: rgba(255, 255, 255, 0.08);
}

.stat-card strong {
  display: block;
  font-size: 20px;
}

.stat-card span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

@media (min-width: 760px) {
  .app-shell,
  .bottom-nav {
    width: min(100%, 1080px);
  }

  .app-shell {
    padding-inline: 22px;
  }

  .home-layout,
  .detail-layout {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 18px;
    align-items: start;
  }

  .scroll-row {
    grid-auto-flow: initial;
    grid-template-columns: repeat(3, 1fr);
    overflow: visible;
  }

  .desktop-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .desktop-grid.two {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 360px) {
  .app-shell {
    padding-inline: 12px;
  }

  .hero-banner h1 {
    font-size: 26px;
  }

  .grid-2,
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

.fa-house::before { content: "\f015"; }
.fa-list-check::before { content: "\f0ae"; }
.fa-users::before { content: "\f0c0"; }
.fa-circle-user::before { content: "\f2bd"; }
.fa-user::before { content: "\f007"; }
.fa-plus::before { content: "\2b"; }
.fa-bullhorn::before { content: "\f0a1"; }
.fa-chevron-left::before { content: "\f053"; }
.fa-chevron-right::before { content: "\f054"; }
.fa-id-card::before { content: "\f2c2"; }
.fa-cart-plus::before { content: "\f217"; }
.fa-credit-card::before { content: "\f09d"; }
.fa-check::before { content: "\f00c"; }
.fa-paper-plane::before { content: "\f1d8"; }
.fa-file-lines::before { content: "\f15c"; }
.fa-store::before { content: "\f54e"; }
.fa-upload::before { content: "\f093"; }
.fa-inbox::before { content: "\f01c"; }
.fa-handshake::before { content: "\f2b5"; }
.fa-mobile-screen-button::before { content: "\f3cd"; }
.fa-lock::before { content: "\f023"; }
.fa-shield-halved::before { content: "\f3ed"; }
.fa-gift::before { content: "\f06b"; }
.fa-right-to-bracket::before { content: "\f2f6"; }
.fa-user-plus::before { content: "\f234"; }
.fa-wallet::before { content: "\f555"; }
.fa-bell::before { content: "\f0f3"; }
.fa-money-bill-transfer::before { content: "\e528"; }
.fa-clipboard-list::before { content: "\f46d"; }
.fa-chart-line::before { content: "\f201"; }
.fa-gear::before { content: "\f013"; }
.fa-pen-to-square::before { content: "\f044"; }
.fa-star::before { content: "\f005"; }
.fa-camera::before { content: "\f030"; }
.fa-video::before { content: "\f03d"; }
.fa-sack-dollar::before { content: "\f81d"; }

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

.anchor-tile {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(34, 34, 40, 0.92);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.16);
}

.anchor-cover {
  position: relative;
  aspect-ratio: 1 / 1.08;
  display: grid;
  align-items: end;
  padding: 12px;
  overflow: hidden;
  background: linear-gradient(145deg, #ff596f, #ffb02e);
}

.anchor-cover.blue {
  background: linear-gradient(145deg, #3477ff, #7c45ff);
}

.anchor-cover.green {
  background: linear-gradient(145deg, #2fd08a, #31a8ff);
}

.anchor-cover.purple {
  background: linear-gradient(145deg, #c04dff, #5b55ff);
}

.anchor-cover::before {
  position: absolute;
  inset: 14% 18% auto;
  height: 58%;
  content: "";
  border-radius: 999px 999px 30px 30px;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 -28px 0 rgba(0, 0, 0, 0.08);
}

.anchor-cover::after {
  position: absolute;
  left: 50%;
  top: 18%;
  width: 42px;
  height: 42px;
  content: "";
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  transform: translateX(-50%);
}

.anchor-cover .cover-name {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 900;
}

.anchor-body {
  padding: 11px;
}

.anchor-body h3 {
  margin: 0;
  font-size: 15px;
}

.anchor-body p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.menu-tile {
  min-height: 82px;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 10px 6px;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: #e9e9ef;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.055);
}

.menu-tile i {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  font-size: 16px;
  background: linear-gradient(135deg, var(--blue), var(--purple));
}

.menu-tile.warm i {
  background: linear-gradient(135deg, var(--pink), var(--orange));
}

.menu-tile.green i {
  background: linear-gradient(135deg, var(--green), #31a8ff);
}

.user-hero {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(circle at 90% 20%, rgba(255, 208, 90, 0.2), transparent 6rem),
    linear-gradient(135deg, rgba(52, 119, 255, 0.26), rgba(255, 77, 106, 0.12)),
    rgba(34, 34, 40, 0.95);
}

.user-hero .item-main {
  align-items: center;
}

.wallet-card {
  margin-top: 14px;
  padding: 14px;
  border-radius: 15px;
  background: rgba(0, 0, 0, 0.18);
}

.wallet-card strong {
  display: block;
  color: #ffd05a;
  font-size: 24px;
}

.wallet-card span {
  color: var(--muted);
  font-size: 12px;
}

@media (min-width: 760px) {
  .anchor-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .menu-grid {
    grid-template-columns: repeat(8, 1fr);
  }
}

@media (max-width: 360px) {
  .menu-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.fa-solid,
.fa-solid::before {
  font-style: normal;
}

.detail-cover {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(145deg, #ff5a70, #ffb02e);
}

.detail-cover.blue {
  background: linear-gradient(145deg, #3477ff, #7c45ff);
}

.detail-cover::before {
  position: absolute;
  left: 50%;
  top: 22px;
  width: 108px;
  height: 108px;
  content: "";
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  transform: translateX(-50%);
}

.detail-cover::after {
  position: absolute;
  left: 20%;
  right: 20%;
  bottom: -34px;
  height: 128px;
  content: "";
  border-radius: 999px 999px 22px 22px;
  background: rgba(255, 255, 255, 0.22);
}

.cover-badge {
  position: relative;
  z-index: 1;
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  background: rgba(0, 0, 0, 0.18);
}

.service-list {
  display: grid;
  gap: 10px;
}

.service-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.step-list {
  display: grid;
  gap: 10px;
}

.step-item {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  align-items: start;
}

.step-index {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--blue), var(--purple));
}

.success-panel {
  min-height: 260px;
  display: grid;
  place-items: center;
  padding: 28px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  text-align: center;
  background: rgba(34, 34, 40, 0.92);
}

.success-panel i {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 50%;
  color: #ffffff;
  font-size: 30px;
  background: linear-gradient(135deg, var(--green), #31a8ff);
}

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

.success-panel p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.settings-list {
  display: grid;
  gap: 12px;
}

.settings-row {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(34, 34, 40, 0.92);
}

.settings-row i:first-child {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--purple));
}

.settings-row h3 {
  margin: 0;
  font-size: 15px;
}

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

.card-action {
  width: 100%;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  border-radius: 11px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.08);
}

.anchor-tile,
.task-card {
  cursor: pointer;
}

.anchor-cover,
.anchor-cover::before,
.anchor-cover::after {
  pointer-events: none;
}

/* Stable button layout overrides */
.quick-action,
.primary-btn,
.ghost-btn,
.card-action {
  width: 100%;
  max-width: 100%;
  padding: 0 16px;
  overflow: hidden;
  text-align: center;
  line-height: 1.2;
  white-space: nowrap;
}

.quick-action .fa-solid,
.primary-btn .fa-solid,
.ghost-btn .fa-solid,
.card-action .fa-solid,
.icon-btn .fa-solid,
.bottom-nav .fa-solid,
.menu-tile .fa-solid,
.settings-row .fa-solid {
  flex: 0 0 auto;
  width: 1.15em;
  min-width: 1.15em;
  height: 1.15em;
  display: inline-grid;
  place-items: center;
  margin: 0;
  font-size: 1em;
  line-height: 1;
  text-align: center;
  font-style: normal;
}

.quick-action .fa-solid::before,
.primary-btn .fa-solid::before,
.ghost-btn .fa-solid::before,
.card-action .fa-solid::before,
.icon-btn .fa-solid::before,
.bottom-nav .fa-solid::before,
.menu-tile .fa-solid::before,
.settings-row .fa-solid::before {
  display: block;
  width: 1em;
  line-height: 1;
  text-align: center;
}

.primary-btn,
.ghost-btn {
  min-width: 0;
}

.grid-2 .primary-btn,
.grid-2 .ghost-btn {
  padding-left: 10px;
  padding-right: 10px;
}

.settings-list > .ghost-btn,
.app-shell > .ghost-btn,
.app-shell > .primary-btn,
.form-card .primary-btn,
.form-card .ghost-btn {
  display: flex;
}

.text-btn {
  width: auto;
  padding: 0;
  overflow: visible;
  white-space: normal;
}

/* Restore dashboard menu icon blocks after generic button icon normalization */
.menu-tile .fa-solid {
  width: 34px;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  font-size: 16px;
  line-height: 1;
  background: linear-gradient(135deg, var(--blue), var(--purple));
}

.menu-tile.warm .fa-solid {
  background: linear-gradient(135deg, var(--pink), var(--orange));
}

.menu-tile.green .fa-solid {
  background: linear-gradient(135deg, var(--green), #31a8ff);
}

.menu-tile .fa-solid::before {
  display: block;
  width: auto;
  line-height: 1;
  text-align: center;
}

/* Home recommended anchor cards */
.home-anchor-row {
  grid-auto-columns: 42%;
  align-items: stretch;
}

.home-anchor-card {
  min-height: 188px;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 9px;
  padding: 16px 12px 14px;
  text-align: center;
}

.home-anchor-card .avatar {
  width: 62px;
  height: 62px;
  margin: 0 auto;
  font-size: 24px;
}

.home-anchor-card h3 {
  width: 100%;
  margin: 2px 0 0;
  overflow: hidden;
  font-size: 16px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-anchor-card p {
  min-height: 38px;
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.home-anchor-card .tags {
  width: 100%;
  justify-content: center;
  margin-top: auto;
}

.home-anchor-card .tag {
  min-height: 22px;
  padding: 0 8px;
  font-size: 11px;
}

@media (min-width: 760px) {
  .home-anchor-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 380px) {
  .home-anchor-row {
    grid-auto-columns: 48%;
  }

  .home-anchor-card {
    min-height: 178px;
    padding-inline: 10px;
  }
}

/* Show a peek of the next recommended anchor card on mobile */
.home-anchor-row {
  grid-auto-columns: 44%;
}

@media (max-width: 380px) {
  .home-anchor-row {
    grid-auto-columns: 46%;
  }
}

.selectable-card { cursor: pointer; position: relative; }
.selectable-card input[type="checkbox"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.selectable-card:has(input:checked), .selectable-card.selected { border-color: #ff8a3d; box-shadow: 0 10px 24px rgba(255, 138, 61, .18); }
.ghost-btn.mini { min-height: 34px; padding: 0 10px; font-size: 12px; }
.fa-arrow-down::before { content: "\f063"; }
.fa-handshake-angle::before { content: "\f4c4"; }
.fa-magnifying-glass::before { content: "\f002"; }
.fa-xmark::before { content: "\f00d"; }

.empty-card {
  display: block;
  width: 100%;
  padding: 18px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  color: var(--muted);
  line-height: 1.6;
  background: rgba(255, 255, 255, 0.045);
}

.xb-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 9px;
  width: calc(100% - 32px);
  max-width: 390px;
  min-height: 46px;
  padding: 11px 15px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  background: rgba(20, 24, 38, 0.94);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, calc(-50% + 14px)) scale(0.98);
  transition: opacity 0.18s ease, transform 0.18s ease;
  backdrop-filter: blur(14px);
}

.xb-toast.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.xb-toast-icon {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff4f72, #ffad35);
}

.xb-toast.success .xb-toast-icon {
  background: linear-gradient(135deg, #23d18b, #31a8ff);
}

.xb-toast-icon::after {
  display: block;
  color: #fff;
  font-size: 15px;
  line-height: 22px;
  text-align: center;
  content: "!";
}

.xb-toast.success .xb-toast-icon::after {
  content: "\2713";
}

.xb-dialog-mask {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(8, 10, 20, 0.56);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  backdrop-filter: blur(8px);
}

.xb-dialog-mask.show {
  opacity: 1;
  pointer-events: auto;
}

.xb-dialog {
  width: min(100%, 340px);
  padding: 22px 18px 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  color: #fff;
  text-align: center;
  background: #171b2a;
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.36);
  transform: translateY(10px) scale(0.98);
  transition: transform 0.18s ease;
}

.xb-dialog-mask.show .xb-dialog {
  transform: translateY(0) scale(1);
}

.xb-dialog-icon {
  width: 42px;
  height: 42px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3477ff, #ff9b35);
}

.xb-dialog-icon::after {
  display: block;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  line-height: 42px;
  content: "!";
}

.xb-dialog h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.xb-dialog p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.xb-dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.xb-dialog-actions button {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
}

.xb-dialog-cancel {
  color: #d9dfef;
  background: rgba(255, 255, 255, 0.08);
}

.xb-dialog-ok {
  color: #fff;
  background: linear-gradient(135deg, #3477ff, #8143ff);
}
