/* R41 — visual da tela Início baseado na referência do Clube. */
.ach-home-logo,
.ach-home-runs-button {
  display: none;
}

body:has(#home.active):not(.auth-locked) {
  --home-ink: #09183d;
  --home-orange: #a54400;
  --home-canvas: #f6f7fb;
  --home-nav-height: clamp(64px, 17vw, 118px);
  background: radial-gradient(ellipse at 50% 22%, #fff, var(--home-canvas) 65%) !important;
}

body:has(#home.active):not(.auth-locked) header.ach-branded-header {
  height: clamp(162px, 43vw, 292px) !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: linear-gradient(168deg, #ff7b00 61%, #ffb906 88%, #ff8a00 92%) !important;
}

body:has(#home.active):not(.auth-locked) header.ach-branded-header::before {
  inset: 0;
  height: auto;
  border-radius: 0;
  transform: none;
  background: radial-gradient(ellipse at 47% 35%, #0767d7 0%, #0246aa 45%, #051f6c 80%);
  clip-path: ellipse(74% 98% at 32% 0%);
  filter: drop-shadow(0 3px 1px #ffda2b);
}

body:has(#home.active):not(.auth-locked) header.ach-branded-header::after {
  inset: auto -8% -35% 1%;
  height: 45%;
  border-radius: 60% 46% 0 0 / 75% 84% 0 0;
  background: var(--home-canvas);
  transform: rotate(-2deg);
}

body:has(#home.active) .ach-r35-brand-logo:not(.ach-home-logo) {
  display: none;
}

body:has(#home.active) .ach-home-logo {
  display: block;
  width: clamp(110px, 32vw, 208px);
  height: auto;
  aspect-ratio: 1;
  top: clamp(5px, 1.4vw, 12px);
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 0 14px #ff9f2e9e;
}

body:has(#home.active) .ach-r35-hello {
  left: max(5vw, (100% - 780px) / 2);
  bottom: 13%;
  max-width: 87%;
  font-size: clamp(18px, 4.7vw, 34px);
  color: #fff;
}

body:has(#home.active) .ach-r35-hello small {
  color: #fff;
  margin-top: 4px;
  font-size: clamp(12px, 3.65vw, 25px);
  font-weight: 500;
}

body:has(#home.active) .ach-r35-menu,
body:has(#home.active) button.ach-home-runs-button {
  position: absolute;
  top: clamp(20px, 6vw, 43px);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: #fff !important;
  box-shadow: none !important;
}

body:has(#home.active) .ach-r35-menu {
  left: max(3vw, (100% - 810px) / 2);
  font-size: 0 !important;
}

body:has(#home.active) .ach-r35-menu::before {
  content: "";
  width: clamp(22px, 5.5vw, 38px);
  height: 4px;
  border-radius: 4px;
  background: currentColor;
  box-shadow: 0 -7px currentColor, 0 7px currentColor;
  transform: rotate(-2deg);
}

body:has(#home.active) button.ach-home-runs-button {
  right: max(3vw, (100% - 810px) / 2);
}

.ach-home-bell {
  position: relative;
  width: clamp(17px, 4.5vw, 28px);
  aspect-ratio: 1;
  border: 2.5px solid currentColor;
  border-radius: 60% 60% 25% 25%;
}

.ach-home-bell::before,
.ach-home-bell::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: currentColor;
}

.ach-home-bell::before { top: -5px; width: 6px; height: 5px; }
.ach-home-bell::after { bottom: -6px; width: 7px; height: 4px; }

body:has(#home.active):not(:has(#achMorePanel.is-open)) #achSessionBadge {
  display: none !important;
}

body:has(#home.active) main {
  max-width: 852px !important;
  min-height: 0 !important;
  padding: 9px clamp(8px, 2vw, 17px) calc(var(--home-nav-height) + 42px + env(safe-area-inset-bottom)) !important;
}

#home .ach-daily-panel,
#home .ach-schedule-card {
  margin: 0 0 clamp(12px, 3vw, 25px) !important;
  padding: clamp(10px, 2.5vw, 22px) !important;
  background: linear-gradient(135deg, #fff, #fafbfd) !important;
  border: 1px solid #e0e6f2 !important;
  border-radius: clamp(20px, 5vw, 42px) !important;
  box-shadow: 0 5px 16px #1537781b !important;
}

#home .ach-daily-panel::before,
#home .ach-daily-stat::before { display: none; }

#home .ach-daily-heading,
#home .ach-schedule-heading {
  gap: 7px;
  margin: 0 0 clamp(10px, 2.5vw, 22px) !important;
  padding: 0 !important;
}

#home :is(.ach-daily-heading, .ach-schedule-heading) h2 {
  display: flex;
  align-items: center;
  gap: .42em;
  margin: 0 !important;
  color: var(--home-ink) !important;
  font-size: clamp(15px, 4.4vw, 36px) !important;
  line-height: 1.06;
  font-weight: 820;
  letter-spacing: -.035em;
}

.ach-home-chart {
  display: inline-flex;
  align-items: end;
  gap: .105em;
  height: 1em;
  color: #ae5105;
}

.ach-home-chart i {
  width: .21em;
  height: 42%;
  border: 1px solid currentColor;
  border-radius: .11em;
  background: linear-gradient(#ffbf55, #e67e00);
}

.ach-home-chart i:nth-child(2) { height: 68%; }
.ach-home-chart i:nth-child(3) { height: 100%; }

#home .ach-home-date {
  display: flex;
  align-items: center;
  gap: .45em;
  padding: .48em .8em;
  border-radius: 100px;
  background: #e1effa;
  color: #102e70 !important;
  font-size: clamp(10px, 2.8vw, 23px) !important;
  font-weight: 760;
  white-space: nowrap;
}

#home #achTodayLabel {
  color: inherit !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  letter-spacing: normal !important;
}

#home .ach-daily-grid { gap: clamp(4px, 1.2vw, 10px) !important; }

#home .ach-daily-grid .ach-daily-stat {
  --tile-edge: #76c0ec;
  --tile-start: #d8f2ff;
  --tile-end: #9ddbf6;
  --tile-icon: #154f9b;
  gap: clamp(3px, 1.1vw, 10px) !important;
  justify-content: center;
  padding: clamp(9px, 2.2vw, 20px) 2px !important;
  border-radius: clamp(12px, 4vw, 34px) !important;
  background: linear-gradient(150deg, var(--tile-start), var(--tile-end)) !important;
  border: 1px solid var(--tile-edge) !important;
  box-shadow: inset 0 0 0 1px #ffffff96 !important;
}

#home .ach-daily-grid .ach-stat-executed {
  --tile-edge: #b397ea;
  --tile-start: #ece2ff;
  --tile-end: #ccb0f1;
  --tile-icon: #5e229b;
}

#home .ach-daily-grid .ach-stat-posted {
  --tile-edge: #70c79b;
  --tile-start: #d9f9e7;
  --tile-end: #9ce7bf;
  --tile-icon: #056c50;
}

#home .ach-daily-grid .ach-stat-pending {
  --tile-edge: #efb17b;
  --tile-start: #ffeada;
  --tile-end: #ffc895;
  --tile-icon: var(--home-orange);
}

#home .ach-daily-grid .ach-daily-stat > span {
  color: var(--tile-icon);
  font-size: clamp(16px, 6.7vw, 50px);
}

#home .ach-daily-grid .ach-daily-stat small {
  font-size: clamp(8px, 2.45vw, 22px) !important;
  color: var(--home-ink) !important;
  letter-spacing: -.045em;
}

#home .ach-daily-grid .ach-daily-stat strong {
  font-size: clamp(26px, 8.1vw, 69px) !important;
  line-height: 1 !important;
  color: var(--home-ink) !important;
}

.ach-home-calendar,
.ach-home-clock,
.ach-home-done {
  display: inline-grid;
  place-items: center;
  position: relative;
  width: 1em;
  height: 1em;
  border: max(1.5px, .09em) solid currentColor;
  flex: none;
}

.ach-home-calendar {
  height: .88em;
  border-radius: .19em;
  background: linear-gradient(currentColor, currentColor) no-repeat center .23em / 100% max(1.5px, .075em);
}

.ach-home-calendar::before,
.ach-home-calendar::after {
  content: "";
  position: absolute;
  top: -.21em;
  width: max(1.5px, .09em);
  height: .29em;
  border-radius: .08em;
  background: currentColor;
}

.ach-home-calendar::before { left: .14em; }
.ach-home-calendar::after { right: .14em; }
.ach-home-clock, .ach-home-done { border-radius: 50%; }

.ach-home-clock::after {
  content: "";
  width: .25em;
  height: .31em;
  border: max(1px, .07em) solid currentColor;
  border-width: 0 0 max(1px, .07em) max(1px, .07em);
  transform: translate(.1em, -.04em) skewY(28deg);
}

.ach-home-done { line-height: 1; }
.ach-home-send { line-height: 1; transform: rotate(-30deg); }

#home .ach-schedule-heading .ach-home-calendar { color: #c36507; }

#home .ach-schedule-heading .ach-jobs-refresh {
  min-height: 36px;
  padding: .4em .75em !important;
  border: 1px solid #e6780a !important;
  border-radius: 100px !important;
  background: #fff8f0 !important;
  color: var(--home-orange) !important;
  font-size: clamp(10px, 2.75vw, 24px);
  white-space: nowrap;
  box-shadow: none !important;
}

#home .ach-v57-next {
  display: flex;
  align-items: center;
  gap: .65em;
  padding: .58em .85em;
  margin-bottom: clamp(10px, 3vw, 23px);
  border-radius: 100px !important;
  background: linear-gradient(100deg, #fff2e1, #fce4cb) !important;
  color: var(--home-ink) !important;
  font-size: clamp(11px, 3vw, 24px);
  line-height: 1.25;
}

#home .ach-v57-next .ach-home-clock { color: var(--home-orange); font-size: 1.24em; }

#home #overview .home-slot {
  overflow: hidden;
  margin: 0 0 clamp(7px, 2.1vw, 17px);
  background: #fff !important;
  border: 1px solid #d7dce7 !important;
  border-radius: clamp(13px, 3.3vw, 28px) !important;
  box-shadow: none !important;
}

#home #overview .home-slot:last-child { margin-bottom: 0; }

#home #overview .home-slot.ach-v62-ready-green {
  background: linear-gradient(112deg, #eef9f1, #cbf1dd) !important;
  border: 1px solid #a8d8bf !important;
  box-shadow: inset 0 0 0 1px #ffffffba !important;
}

#home #overview .home-slot .home-slot-btn {
  display: grid;
  grid-template-columns: max-content max-content minmax(0, 1fr) minmax(0, auto);
  gap: clamp(4px, 1.65vw, 15px);
  align-items: center;
  padding: clamp(6px, 1.55vw, 14px) clamp(6px, 2.5vw, 22px) !important;
  min-height: clamp(48px, 11.5vw, 97px) !important;
  background: transparent !important;
  color: var(--home-ink) !important;
  cursor: pointer;
  list-style: none;
}

#home .home-slot-btn::-webkit-details-marker { display: none; }

#home #overview .home-slot .home-slot-time {
  color: var(--home-ink) !important;
  font-size: clamp(14px, 4.1vw, 35px);
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

#home #overview .home-slot-info strong {
  color: #171922;
  font-size: clamp(10px, 3.05vw, 27px);
  line-height: 1.13;
  overflow-wrap: anywhere;
}

#home #overview .home-slot-info small {
  display: block;
  color: #3d4554;
  font-size: clamp(9px, 2.55vw, 22px);
  margin-top: 3px;
  line-height: 1.13;
}

#home #overview .home-slot .home-slot-progress {
  display: flex;
  align-items: center;
  gap: .34em;
  max-width: 11ch;
  color: var(--home-orange) !important;
  font-size: clamp(9px, 2.48vw, 22px) !important;
  line-height: 1.13;
  white-space: normal;
}

#home #overview .home-slot.ach-v62-ready-green .home-slot-progress { color: #0d563d !important; }

.ach-home-ready-icon {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 1.25em;
  height: 1.25em;
  border-radius: 50%;
  background: linear-gradient(#4fca88, #008746);
  color: #fff;
  font-weight: 850;
}

#home .ach-home-store-icon {
  display: grid;
  place-items: center;
  width: clamp(23px, 8vw, 66px);
  aspect-ratio: 1;
  border: 1px solid #ebdbc6;
  border-radius: 50%;
  background: #fff;
}

#home .ach-home-store-icon:has(.ach-r40-bag) { background: linear-gradient(145deg, #ff882b, #fc4a0d); }
#home .ach-home-store-icon .ach-r40-bag { --bag-size: clamp(12px, 4vw, 34px); background: #fff; color: #e94107; }
#home .ach-home-store-icon .ach-r40-bag::before { color: #fff; }

body:has(#home.active) .ach-r40-ml-icon {
  display: inline-grid;
  place-items: center;
  width: clamp(19px, 6.4vw, 55px);
  aspect-ratio: 1.35;
  border: 1px solid #15449b;
  border-radius: 50%;
  background: #ffde3e;
  font: 600 clamp(10px, 4.1vw, 35px)/1 system-ui, sans-serif;
}

body:has(#home.active) :is(.ach-home-amazon, .ach-r40-nav-amazon > span) {
  display: inline-block;
  padding: 0 .13em .02em;
  border-bottom: .09em solid #ef8a00;
  border-radius: 0 0 60% 60%;
  color: #111;
  font: 900 clamp(17px, 5.8vw, 45px)/.84 Arial, sans-serif;
}

#achRunDetails {
  position: fixed;
  inset: clamp(68px, 13vw, 98px) max(12px, (100% - 820px) / 2) auto auto;
  margin: 0;
  width: min(390px, calc(100vw - 24px));
  max-height: min(65vh, 480px);
  overflow: auto;
  padding: 16px;
  color: #09183d;
  background: #fff;
  border: 1px solid #e0e6f2;
  border-radius: 19px;
  box-shadow: 0 10px 32px #0d2c5a44;
}

#achRunDetails .ach-home-runs-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
#achRunDetails h3 { margin: 0; }

body:has(#home.active):not(.auth-locked) .tabbar {
  isolation: isolate;
  min-height: var(--home-nav-height) !important;
  padding: 5px max(6px, (100% - 848px) / 2) calc(25px + env(safe-area-inset-bottom)) !important;
  background: linear-gradient(0deg, #073392 0%, #0458c2 13%, #ffcc28 14%, #ff8e00 31%, var(--home-canvas) 32%) !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: 0 -4px 18px #f6f7fb !important;
}

body:has(#home.active) .tabbar::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -4%;
  right: -4%;
  bottom: calc(10px + env(safe-area-inset-bottom));
  height: 48%;
  pointer-events: none;
  border-radius: 0 0 50% 63% / 0 0 66% 84%;
  border-bottom: 3px solid #ffb900;
  background: var(--home-canvas);
  transform: rotate(-1deg);
}

body:has(#home.active) .tabbar .tabs { gap: clamp(2px, 1vw, 9px) !important; }

body:has(#home.active) .tabbar :is(.tab, .ach-more-button) {
  min-height: var(--home-nav-height) !important;
  padding: 4px 1px !important;
  background: linear-gradient(160deg, #fff, #f6f8fe) !important;
  color: #061c56 !important;
  border: 1px solid #fff !important;
  border-radius: clamp(11px, 3vw, 24px) !important;
  box-shadow: 0 5px 10px #0c33721a !important;
}

body:has(#home.active) .tabbar .tabs > .tab.active {
  background: radial-gradient(ellipse at 50% 10%, #0b56d3, #041d6a 84%) !important;
  color: #fff !important;
  border: 2px solid #ffc82d !important;
  box-shadow: inset 0 0 0 1px #fff9d7, 0 4px 8px #bc70014a !important;
}

body:has(#home.active) .tabbar :is(.tab, .ach-more-button, .ach-ml-nav-label) {
  font-size: clamp(8px, 2.45vw, 19px) !important;
  letter-spacing: -.045em;
}

body:has(#home.active) .tabbar .ach-nav-icon { font-size: clamp(18px, 5.7vw, 47px) !important; }
body:has(#home.active) .tabbar :is(.ach-icon-shopee, .ach-icon-ml, .ach-r40-nav-amazon) { font-size: 0 !important; }
body:has(#home.active) .tabbar .ach-r40-bag { --bag-size: clamp(15px, 5.5vw, 45px); display: inline-grid; }
body:has(#home.active) .tabbar .ach-more-button .ach-nav-icon { color: #c36306; }

body:has(#home.active)::after { display: none; }

@media (max-width: 350px) {
  #home #overview .home-slot .home-slot-btn {
    grid-template-columns: max-content max-content minmax(0, 1fr) minmax(0, 8ch);
  }
  #home .ach-daily-grid .ach-daily-stat small { font-size: 8px !important; }
}
