/* Super App V1.14 visual polish layer */

/* Account brand treatment: remove the white tile effect and let real marks breathe. */
.account-icon.v14-brand-shell,
.v13-account-logo.v14-brand-shell {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  overflow: hidden;
}
.account-icon.v14-brand-shell {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  flex: 0 0 50px;
}
.v13-account-logo.v14-brand-shell {
  border-radius: 22px;
}
.v14-brand-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.v14-brand-full {
  width: 96%;
  height: 96%;
}
.v14-brand-contained {
  width: 84%;
  height: 84%;
  margin: auto;
}
.v14-brand-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  border-radius: inherit;
  background: linear-gradient(145deg, #e6eee7, #f4efe2);
  color: #1a5142;
  font-weight: 800;
  letter-spacing: .02em;
  border: 1px solid rgba(20,75,60,.08);
}

/* A calmer, shorter Home hero. */
.hero-card.v14-home-hero {
  min-height: 142px;
  padding: 24px 30px;
  border-radius: 26px;
}
.hero-card.v14-home-hero h2 {
  margin: 5px 0 6px;
  max-width: 760px;
  font-size: clamp(30px, 3.1vw, 38px);
  line-height: 1.03;
  letter-spacing: -.02em;
}
.hero-card.v14-home-hero > div:first-child {
  position: relative;
  z-index: 2;
  min-width: 0;
}
.hero-card.v14-home-hero .hero-art {
  max-width: 180px;
  opacity: .9;
}
.hero-card.v14-home-hero .hero-motif {
  max-width: 132px;
  max-height: 96px;
  object-fit: contain;
  justify-self: end;
}

/* Home rhythm after removing the redundant My Money shortcut. */
.my-day-grid.v14-home-grid {
  grid-template-columns: repeat(12, minmax(0,1fr));
  gap: 16px;
  align-items: stretch;
}
.v14-home-grid > .card {
  min-width: 0;
}
.v14-money-setup-card { grid-column: 1 / -1; }
.v14-upcoming-card { grid-column: span 4; }
.v14-travel-card { grid-column: span 5; }
.v14-fx-card { grid-column: span 3; }
.v14-news-card { grid-column: 1 / -1; }

.v14-upcoming-card {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 14px;
  background: linear-gradient(145deg, rgba(247,244,235,.98), rgba(234,241,234,.92));
}
.v14-upcoming-card h3 {
  font-size: 1.55rem;
  line-height: 1.08;
  margin: 4px 0 8px;
}
.v14-upcoming-card p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}
.v14-upcoming-card > button {
  width: fit-content;
  min-width: 112px;
}

.v14-travel-card,
.v14-fx-card,
.v14-news-card {
  overflow: hidden;
}
.v14-travel-card .section-head,
.v14-fx-card .section-head,
.v14-news-card .section-head {
  margin-bottom: 12px;
}
.v14-travel-card .trip-placeholder {
  min-height: 170px;
}
.v14-news-card .news-mini-list {
  grid-template-columns: repeat(2,minmax(0,1fr));
}

@media (max-width: 1100px) {
  .my-day-grid.v14-home-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .v14-money-setup-card,
  .v14-upcoming-card,
  .v14-travel-card,
  .v14-news-card { grid-column: 1 / -1; }
  .v14-fx-card { grid-column: auto; }
}

@media (max-width: 820px) {
  .content { padding-top: 14px; }
  .hero-card.v14-home-hero {
    min-height: 128px;
    padding: 18px 20px;
    border-radius: 22px;
    align-items: center;
  }
  .hero-card.v14-home-hero h2 {
    max-width: calc(100% - 34px);
    font-size: clamp(27px, 7.4vw, 31px);
    line-height: 1.02;
    margin: 4px 0 5px;
  }
  .hero-card.v14-home-hero > div:first-child > p:last-child {
    max-width: 78%;
    font-size: .88rem;
    line-height: 1.3;
  }
  .hero-card.v14-home-hero .hero-art {
    position: absolute;
    right: 12px;
    bottom: 8px;
    width: 92px;
    max-width: 92px;
    opacity: .22;
    pointer-events: none;
  }
  .hero-card.v14-home-hero .hero-art small { display: none; }
  .hero-card.v14-home-hero .hero-motif {
    width: 92px;
    max-width: 92px;
    max-height: 92px;
  }

  .v14-my-day-head {
    margin-top: 22px;
    margin-bottom: 0;
  }
  .v14-my-day-head h3 { font-size: 28px; }
  .v14-my-day-head small { display: none; }

  .my-day-grid.v14-home-grid {
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
    gap: 12px;
    margin-top: 12px;
  }
  .v14-money-setup-card,
  .v14-upcoming-card,
  .v14-travel-card { grid-column: 1 / -1 !important; }
  .v14-fx-card,
  .v14-news-card { grid-column: span 1 !important; }

  .v14-upcoming-card {
    min-height: 92px;
    padding: 16px 18px;
    grid-template-columns: minmax(0,1fr) auto;
    grid-template-rows: auto;
    align-items: center;
    gap: 12px;
  }
  .v14-upcoming-card h3 {
    margin: 3px 0 0;
    font-size: 1.28rem;
  }
  .v14-upcoming-card p:not(.eyebrow) { display: none; }
  .v14-upcoming-card > button {
    min-width: 0;
    width: auto;
    padding: 9px 12px;
    border-radius: 12px;
  }

  .v14-travel-card { padding: 16px; }
  .v14-travel-card .section-head h3 { font-size: 25px; }
  .v14-travel-card .trip-placeholder {
    min-height: 178px;
    border-radius: 18px;
  }

  .v14-fx-card,
  .v14-news-card {
    min-height: 202px;
    padding: 15px 14px;
    border-radius: 20px;
  }
  .v14-fx-card .section-head,
  .v14-news-card .section-head {
    align-items: flex-start;
    gap: 6px;
  }
  .v14-fx-card .section-head h3,
  .v14-news-card .section-head h3 {
    font-size: 21px;
    line-height: 1.05;
  }
  .v14-fx-card .section-head button,
  .v14-news-card .section-head button {
    font-size: .76rem;
  }
  .v14-fx-card .fx-row {
    grid-template-columns: minmax(0,1fr) auto;
    gap: 6px;
    padding: 10px 0;
    font-size: .88rem;
  }
  .v14-fx-card .fx-row:nth-child(n+3) { display: none; }
  .v14-fx-card .fx-row small { display: none; }
  .v14-news-card .news-mini-list { display: grid; grid-template-columns: 1fr; gap: 8px; }
  .v14-news-card .news-mini:nth-child(n+2) { display: none; }
  .v14-news-card .news-mini strong {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: .88rem;
    line-height: 1.35;
  }
  .v14-news-card .empty {
    padding: 18px 0 0;
    font-size: .82rem;
  }

  .account-icon.v14-brand-shell {
    width: 50px;
    height: 50px;
    flex-basis: 50px;
  }
}

@media (max-width: 360px) {
  .my-day-grid.v14-home-grid { grid-template-columns: 1fr !important; }
  .v14-fx-card,
  .v14-news-card { grid-column: 1 / -1 !important; min-height: auto; }
}
