/* E-Lily Home v2 — red/white mobile app structure */
:root {
  --el-red: #df2b20;
  --el-red-dark: #bd2018;
  --el-red-soft: #fff0ee;
  --el-ink: #211b1b;
  --el-muted: #786d6c;
  --el-line: #eee5e3;
  --el-bg: #f7f4f3;
}

body.kx-on-home,
body.kx-on-home .shell,
body.kx-on-home .shell-main,
.rf-home.kx-authhome {
  background: var(--el-bg) !important;
}
body.kx-on-home { overflow-x: hidden !important; }
body.kx-on-home .shell-main { padding-top: 0 !important; overflow-x: hidden !important; }

.kx-authhome > .rf-hero,
.kx-authhome > .kx-hero,
.kx-authhome > .kx-ticker,
.kx-authhome > .rf-promo,
.kx-authhome > .kx-widgets,
.kx-authhome > .kx-about,
.kx-authhome > .kh:not(.kh-v2) {
  display: none !important;
}

.kh-v2 {
  width: 100%;
  min-height: 100dvh;
  color: var(--el-ink);
  background: var(--el-bg);
  font-family: "Space Grotesk", Inter, system-ui, sans-serif;
  overflow: hidden;
  padding-bottom: calc(88px + env(safe-area-inset-bottom));
}

.kh-cover {
  min-height: 238px;
  padding: calc(17px + env(safe-area-inset-top)) 18px 82px;
  color: #fff;
  background:
    radial-gradient(circle at 100% 0, rgba(255,255,255,.16) 0 92px, transparent 93px),
    radial-gradient(circle at 0 100%, rgba(255,255,255,.08) 0 115px, transparent 116px),
    linear-gradient(145deg, #ee3125 0%, var(--el-red) 48%, #ca2119 100%);
  position: relative;
}
.kh-cover::after {
  content: "";
  position: absolute;
  inset: auto -60px 24px auto;
  width: 210px;
  height: 72px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 50%;
  transform: rotate(-14deg);
}

.kh-topbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; position: relative; z-index: 2; }
.kh-wordmark { width: 108px; height: 46px; object-fit: cover; object-position: center; display: block; border: 1px solid rgba(255,255,255,.15); border-radius: 9px; box-shadow: 0 7px 18px rgba(109,10,5,.14); }
.kh-ics { display: flex; gap: 7px; }
.kh-ics .rf-hero-ic,
.kh-ics button {
  width: 36px !important;
  height: 36px !important;
  display: grid !important;
  place-items: center !important;
  border: 1px solid rgba(255,255,255,.24) !important;
  border-radius: 50% !important;
  background: rgba(255,255,255,.12) !important;
  color: #fff !important;
  backdrop-filter: blur(8px);
}
.kh-ics svg { color: #fff !important; }

.kh-welcome { position: relative; z-index: 2; margin-top: 25px; }
.kh-welcome small { display: block; color: rgba(255,255,255,.76); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.kh-welcome b { display: block; margin-top: 5px; max-width: 280px; font-size: 22px; line-height: 1.15; font-weight: 700; letter-spacing: -.02em; }

.kh-content { width: 100%; position: relative; z-index: 3; padding: 0 16px; margin-top: -62px; }
.kh-wallet {
  padding: 19px 17px 16px;
  border: 1px solid rgba(116,45,39,.10);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(69,22,19,.13);
}
.kh-wallet-head { display: flex; align-items: center; justify-content: space-between; color: var(--el-muted); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.kh-eye { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--el-red-soft); color: var(--el-red); }
.kh-eye svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.kh-amt { display: block; margin: 4px 0 15px; color: var(--el-ink); font-family: "Archivo Black", Impact, sans-serif; font-size: clamp(30px, 9vw, 38px); font-weight: 400; line-height: 1; letter-spacing: -.045em; }
.kh-wallet-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 14px; }
.kh-wallet-stats > div { min-width: 0; padding: 10px 11px; border-radius: 13px; background: #faf7f6; border: 1px solid var(--el-line); }
.kh-wallet-stats small { display: block; color: var(--el-muted); font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.kh-wallet-stats b { display: block; margin-top: 4px; color: var(--el-ink); font-size: 12px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kh-acts { display: grid; grid-template-columns: 1.2fr 1fr; gap: 9px; }
.kh-dep, .kh-wit { height: 48px; border-radius: 14px; font: 800 12.5px/1 "Space Grotesk", sans-serif; letter-spacing: .04em; }
.kh-dep { border: 0; color: #fff; background: linear-gradient(180deg, #ee3428, #d8241b); box-shadow: 0 9px 20px rgba(223,43,32,.24); }
.kh-wit { border: 1.5px solid #ead4d1; color: var(--el-red); background: #fff; }
.kh-dep span, .kh-wit span { margin-right: 7px; font-size: 16px; }
.kh-balance-hidden .kh-amt,
.kh-balance-hidden .kh-av { font-size: 0 !important; }
.kh-balance-hidden .kh-amt::after { content: "₱ ••••••"; font-size: clamp(30px, 9vw, 38px); }
.kh-balance-hidden .kh-av::after { content: "₱ ••••"; font-size: 12px; }

.kh-tier-slot { min-height: 0; }
.kh-tier-slot:has(.kx-home-tier) { margin-top: 13px; }
.kh-tier-slot .kx-home-tier {
  width: 100%; margin: 0 !important; padding: 9px 11px !important;
  border-radius: 13px !important; background: var(--el-red-soft) !important; color: var(--el-ink) !important;
  box-shadow: none !important; font-family: "Space Grotesk", sans-serif !important; font-size: 11px !important;
}
.kh-tier-slot .kx-home-tier img { width: 26px; height: 26px; background: #fff; }
.kh-tier-slot .kx-home-tier .kx-home-tier-prog { margin-left: auto; color: var(--el-red); background: #fff; }
.kh-tier-slot .kx-home-tier .kx-home-tier-arrow { color: var(--el-red); }
body.kx-on-home > .kx-home-tier,
body.kx-on-home .shell-main > .kx-home-tier { display: none !important; }

.kh-section { margin-top: 23px; }
.kh-section-head { display: flex; align-items: flex-end; justify-content: space-between; margin: 0 2px 12px; }
.kh-section-head small { display: block; color: var(--el-red); font-size: 9.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.kh-section-head h2 { margin: 3px 0 0; color: var(--el-ink); font-size: 19px; line-height: 1.15; letter-spacing: -.025em; }

.kh-quick { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; }
.kh-quick-btn { min-width: 0; padding: 11px 5px 10px; border: 1px solid var(--el-line); border-radius: 17px; color: var(--el-ink); background: #fff; text-align: center; }
.kh-quick-btn .kh-icon { width: 42px; height: 42px; display: grid; place-items: center; margin: 0 auto 7px; border-radius: 14px; color: var(--el-red); background: var(--el-red-soft); }
.kh-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.kh-copy b, .kh-copy small { display: block; }
.kh-quick-btn .kh-copy b { font-size: 11.5px; line-height: 1.15; }
.kh-quick-btn .kh-copy small { margin-top: 3px; color: var(--el-muted); font-size: 8.5px; line-height: 1.15; }

.kh-feature { width: 100%; min-height: 180px; display: block; position: relative; overflow: hidden; margin-top: 22px; padding: 21px 18px; border: 0; border-radius: 23px; color: #fff; text-align: left; background: linear-gradient(135deg, #d52219 0%, #ef3327 58%, #bd1c15 100%); box-shadow: 0 16px 30px rgba(176,31,24,.20); }
.kh-feature-copy { width: 68%; position: relative; z-index: 3; }
.kh-feature small { color: rgba(255,255,255,.72); font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.kh-feature h2 { margin: 7px 0 5px; font-family: "Archivo Black", Impact, sans-serif; font-size: 23px; font-weight: 400; line-height: 1.05; letter-spacing: -.03em; }
.kh-feature p { margin: 0; color: rgba(255,255,255,.78); font-size: 11.5px; line-height: 1.4; }
.kh-feature b { display: inline-flex; gap: 6px; align-items: center; margin-top: 17px; font-size: 11.5px; }
.kh-feature b span { font-size: 17px; }
.kh-feature img { position: absolute; z-index: 2; width: 152px; height: 86px; right: -20px; bottom: 15px; object-fit: cover; object-position: center; transform: rotate(-8deg); opacity: .96; }
.kh-feature-orb { position: absolute; border-radius: 50%; background: rgba(255,255,255,.10); }
.kh-feature-orb-a { width: 150px; height: 150px; right: -40px; top: -56px; }
.kh-feature-orb-b { width: 94px; height: 94px; right: 56px; bottom: -52px; }

.kh-reward-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.kh-reward-grid .kh-roul,
.kh-reward-grid .kh-checkin {
  width: 100% !important;
  min-height: 158px !important;
  display: block !important;
  position: relative !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 15px 13px !important;
  border: 1px solid var(--el-line) !important;
  border-radius: 18px !important;
  color: var(--el-ink) !important;
  text-align: left !important;
  background: #fff !important;
  background-image: none !important;
  box-shadow: none !important;
}
.kh-reward-grid .kh-checkin { color: #fff !important; border-color: transparent !important; background: linear-gradient(145deg,#ee3428,#c92018) !important; }
.kh-reward-grid .kh-roul::before,
.kh-reward-grid .kh-checkin::before { content: none !important; display: none !important; background: none !important; }
.kh-reward-grid .kh-roul::after,
.kh-reward-grid .kh-checkin::after {
  content: "";
  position: absolute;
  width: 92px;
  height: 92px;
  right: -38px;
  bottom: -38px;
  border-radius: 50%;
  background: var(--el-red-soft);
}
.kh-reward-grid .kh-checkin::after { background: rgba(255,255,255,.12); }
.kh-reward-grid .kh-roul-c,
.kh-reward-grid .kh-checkin-c { display: flex !important; flex-direction: column !important; align-items: flex-start !important; height: 100% !important; position: relative !important; z-index: 2 !important; }
.kh-reward-grid .kh-roul-k,
.kh-reward-grid .kh-checkin-k { color: var(--el-red) !important; font-size: 8.5px !important; font-weight: 800 !important; letter-spacing: .13em !important; text-transform: uppercase !important; }
.kh-reward-grid .kh-checkin-k { color: rgba(255,255,255,.72) !important; }
.kh-reward-grid .kh-roul-t,
.kh-reward-grid .kh-checkin-t { display: block !important; margin-top: 7px !important; color: inherit !important; font-size: 17px !important; font-weight: 800 !important; line-height: 1.08 !important; }
.kh-reward-grid .kh-roul-s,
.kh-reward-grid .kh-checkin-s { display: block !important; margin-top: 7px !important; color: var(--el-muted) !important; font-size: 9.5px !important; line-height: 1.35 !important; }
.kh-reward-grid .kh-checkin-s { color: rgba(255,255,255,.76) !important; }
.kh-reward-grid .kh-roul-b,
.kh-reward-grid .kh-checkin-b { display: inline-flex !important; align-items: center !important; min-height: 28px !important; margin-top: auto !important; padding: 0 10px !important; border-radius: 999px !important; color: #fff !important; background: var(--el-red) !important; font-size: 9px !important; font-weight: 800 !important; }
.kh-reward-grid .kh-checkin-b { color: var(--el-red) !important; background: #fff !important; }

.kh-more-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.kh-more { min-width: 0; min-height: 76px; display: grid; grid-template-columns: 38px minmax(0,1fr) 10px; gap: 9px; align-items: center; padding: 11px; border: 1px solid var(--el-line); border-radius: 17px; background: #fff; color: var(--el-ink); text-align: left; }
.kh-more .kh-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: var(--el-red); background: var(--el-red-soft); }
.kh-more .kh-icon svg { width: 20px; height: 20px; }
.kh-more .kh-copy b { font-size: 12px; }
.kh-more .kh-copy small { margin-top: 3px; color: var(--el-muted); font-size: 9.5px; line-height: 1.2; }
.kh-more i { color: #b7a3a0; font-size: 20px; font-style: normal; }

.kh-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 24px 2px 4px; padding-top: 15px; border-top: 1px solid var(--el-line); }
.kh-footer b { color: var(--el-red); font-family: "Archivo Black", Impact, sans-serif; font-size: 14px; font-weight: 400; }
.kh-footer span { color: #a29391; font-size: 8.5px; text-align: right; }

body.kx-on-home .bottomnav { background: transparent !important; border: 0 !important; }
body.kx-on-home .bottomnav-inner,
body.kx-on-home .bottomnav .bottomnav-inner { background: rgba(255,255,255,.96) !important; border: 1px solid rgba(85,35,31,.09); box-shadow: 0 12px 30px rgba(61,24,20,.15) !important; backdrop-filter: blur(14px); }
body.kx-on-home .nav-content.active,
body.kx-on-home .nav-item:has(.active) .nav-content { background: var(--el-red-soft) !important; color: var(--el-red) !important; box-shadow: 0 6px 16px rgba(223,43,32,.16) !important; }
body.kx-on-home .nav-content.active .nav-icwrap svg,
body.kx-on-home .nav-item:has(.active) .nav-icwrap svg,
body.kx-on-home .nav-content.active .nav-label,
body.kx-on-home .nav-item:has(.active) .nav-label { color: var(--el-red) !important; }
body.kx-on-home .nav-item:has(.active)::after { background: var(--el-red) !important; }

@media (max-width: 355px) {
  .kh-cover { padding-left: 14px; padding-right: 14px; }
  .kh-content { padding-left: 12px; padding-right: 12px; }
  .kh-wordmark { width: 98px; }
  .kh-quick { gap: 6px; }
  .kh-quick-btn { padding-left: 3px; padding-right: 3px; }
  .kh-feature-copy { width: 73%; }
  .kh-feature img { width: 128px; right: -28px; }
  .kh-more-grid { grid-template-columns: 1fr; }
  .kh-reward-grid { grid-template-columns: 1fr; }
}

@media (min-width: 700px) {
  .kh-v2 { max-width: 460px; margin: 0 auto; box-shadow: 0 0 0 1px rgba(66,30,27,.06); }
}

.splash img { opacity: 0 !important; }
.splash > div { width: 74px !important; height: 74px !important; background: url("assets/elily-medical-mark.svg?v=1") center/contain no-repeat !important; border-radius: 20px !important; }
