/* TOKENS */
:root {
  --bg: #f2f2f4;
  --surface: #ffffff;
  --surface-muted: #f6f6f8;
  --text: #16181d;
  --muted: #707784;
  --border: #e6e7eb;
  --honda-red: #da0e15;
  --honda-red-600: #b40c12;
  --honda-red-700: #960a0f;
  --primary: var(--honda-red);
  --ring: 0 0 0 3px rgba(231, 0, 18, 0.2);

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 10px;
  --space-4: 14px;
  --space-5: 18px;
  --space-6: 20px;

  --radius-sm: 9px;
  --card-radius: 16px;
  --radius-md: var(--card-radius);
  --radius-lg: 24px;

  --shadow-sm: 0 2px 8px rgba(14, 18, 26, 0.06);
  --shadow-md: 0 8px 24px rgba(14, 18, 26, 0.08);

  --font-heading: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --font-body: "Inter", "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --max-width: 480px;
  --nav-height: 68px;
  --transition-fast: 180ms;
}

html[data-theme="dark"] {
  --bg: #111216;
  --surface: #1a1c22;
  --surface-muted: #20232b;
  --text: #eff2f8;
  --muted: #a1a7b4;
  --border: #2d3342;
  --honda-red: #ff3a45;
  --honda-red-600: #e0313b;
  --honda-red-700: #bf1f28;
  --primary: var(--honda-red);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.34);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.36);
}

html[data-theme="dark"] .icon-dark {
  color: var(--text);
}

/* BASE */
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6,
.app-title,
.section-title,
.menu-label,
.nav-link strong,
.btn,
.member-pill,
.serial-number {
  font-family: var(--font-heading);
}

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

:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: var(--radius-sm);
}

.skip-link {
  position: absolute;
  top: -44px;
  left: 12px;
  z-index: 1000;
  background: var(--text);
  color: var(--surface);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
}

.skip-link:focus-visible {
  top: 12px;
}

/* LAYOUT */
.app-shell {
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: 100dvh;
  background: var(--bg);
  border-inline: 1px solid var(--border);
  position: relative;
  overflow: clip;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(180deg, var(--honda-red) 0%, var(--honda-red-600) 100%);
  color: #fff;
  border-bottom-left-radius: 24px;
  border-bottom-right-radius: 24px;
  box-shadow: var(--shadow-sm);
  padding: calc(var(--space-4) + env(safe-area-inset-top)) var(--space-4) var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.brand-wrap {
  min-width: 0;
}

.app-title {
  margin: 0;
  font-weight: 800;
  font-size: 0.88rem;
  letter-spacing: 0.01em;
}

.app-tagline {
  margin: var(--space-1) 0 0;
  font-size: 0.72rem;
  opacity: 0.92;
}

.header-btn {
  min-height: 36px;
  min-width: 36px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  padding: 0 var(--space-3);
  display: grid;
  place-items: center;
  cursor: pointer;
  position: relative;
}

.header-btn i {
  font-size: 1.18rem;
}

.notif-dot {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #f59e0b;
  box-shadow: 0 0 0 2px rgba(218, 14, 21, 0.92);
}

#appMain {
  padding: var(--space-4);
  padding-bottom: calc(var(--space-6) + var(--nav-height) + env(safe-area-inset-bottom));
  background:
    radial-gradient(100% 26% at 50% 0%, rgba(218, 14, 21, 0.08), transparent 75%),
    transparent;
  overflow-x: hidden;
}

.page-stack {
  display: grid;
  gap: var(--space-4);
}

.page-stack > * {
  min-width: 0;
}

.bottom-nav {
  position: fixed;
  inset-inline: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: var(--max-width);
  height: calc(var(--nav-height) + env(safe-area-inset-bottom));
  padding: 6px var(--space-2) calc(6px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px;
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  z-index: 30;
}

.section-title {
  margin: 0;
  font-size: 0.9rem;
  position: relative;
  padding-left: 10px;
}

.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--honda-red), var(--honda-red-700));
}

.section-subtitle {
  margin: var(--space-1) 0 0;
  color: var(--muted);
  font-size: 0.74rem;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: var(--space-3);
}

.section-head > div {
  min-width: 0;
}

/* COMPONENTS */
.nav-link {
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  text-decoration: none;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  color: var(--muted);
  font-size: 0.69rem;
  gap: 2px;
  -webkit-tap-highlight-color: transparent;
}

.nav-link:link,
.nav-link:visited,
.nav-link:hover,
.nav-link:active {
  text-decoration: none;
}

.bottom-nav .nav-link:nth-child(2) {
  margin-right: 40px;
}

.bottom-nav .nav-link:nth-child(3) {
  margin-left: 40px;
}

.nav-link strong {
  font-size: 0.69rem;
  font-weight: 600;
}

.nav-dot {
  width: 18px;
  height: 18px;
  font-size: 0.88rem;
  display: grid;
  place-items: center;
  color: #9aa2af;
}

.nav-link.is-active {
  color: var(--muted);
  background: transparent;
}

.nav-link.is-active .nav-dot {
  color: var(--primary);
}

.fab-btn {
  position: absolute;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 18px);
  transform: translateX(-50%);
  width: 52px;
  height: 52px;
  border-radius: 999px;
  border: 0;
  background: linear-gradient(180deg, var(--honda-red) 0%, var(--honda-red-700) 100%);
  color: #fff;
  box-shadow:
    0 10px 24px rgba(15, 23, 42, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  display: grid;
  place-items: center;
  font-size: 1.05rem;
  z-index: 35;
  cursor: pointer;
}

.card {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 92%, #fff), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow:
    0 8px 18px rgba(15, 23, 42, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
  padding: 12px;
}

.member-card {
  background: linear-gradient(180deg, var(--honda-red) 0%, var(--honda-red-700) 100%);
  color: #fff;
  border: 0;
  border-radius: 22px;
  box-shadow: var(--shadow-md);
}

.banner-slider {
  padding: 0;
}

.banner-swiper {
  position: relative;
  height: 164px;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--border) 84%, #fff);
  box-shadow:
    0 8px 18px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.banner-track {
  display: flex;
  width: 100%;
  height: 100%;
  will-change: transform;
}

.banner-slide {
  min-width: 100%;
  width: 100%;
  height: 100%;
}

.banner-image {
  width: 100%;
  height: 164px;
  object-fit: cover;
  display: block;
  cursor: default;
  background: #e9edf3;
}

.banner-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 0;
  background: rgba(16, 20, 27, 0.32);
  color: #fff;
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 5;
}

.banner-prev {
  left: 8px;
}

.banner-next {
  right: 8px;
}

.banner-pagination {
  position: absolute;
  inset: auto 0 8px;
  display: flex;
  justify-content: center;
  z-index: 5;
}

.banner-dot {
  width: 7px;
  height: 7px;
  margin: 0 3px;
  background: #c8cfd9;
  border-radius: 999px;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.banner-dot.is-active {
  width: 18px;
  background: var(--honda-red);
}

.member-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
}

.member-pill {
  min-height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0 var(--space-3);
  background: rgba(255, 255, 255, 0.2);
  font-weight: 700;
}

.member-tier {
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  display: inline-flex;
  align-items: center;
  font-size: 0.69rem;
  font-weight: 600;
}

.serial-number {
  margin: 10px 0 4px;
  font-size: clamp(1.34rem, 5.1vw, 1.65rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.member-sub {
  margin: 0;
  font-size: 0.72rem;
  opacity: 0.9;
}

.member-stats {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.member-stat {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  padding: 7px 8px;
  display: grid;
  gap: 2px;
}

.member-stat span {
  font-size: 0.62rem;
  opacity: 0.88;
}

.member-stat strong {
  font-size: 0.74rem;
  line-height: 1.2;
}

.member-actions {
  margin-top: 10px;
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.btn {
  min-height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  padding: 0 var(--space-4);
  font-weight: 600;
  font-size: 0.76rem;
  cursor: pointer;
  transition: transform var(--transition-fast) ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: #ffffff;
  color: #111;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border-color: transparent;
  backdrop-filter: blur(16px) saturate(1.25);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 8px 18px rgba(15, 23, 42, 0.12);
}

.btn-ghost {
  background: var(--surface-muted);
  border-color: var(--border);
}

.info-strip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid color-mix(in srgb, var(--honda-red) 75%, white);
  border-radius: var(--radius-md);
  padding: 4px 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.info-tag {
  min-height: 22px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  font-weight: 700;
  font-size: 0.76rem;
}

.info-marquee {
  overflow: hidden;
  flex: 1;
  position: relative;
  min-width: 0;
}

.ticker-track {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  width: max-content;
  white-space: nowrap;
  animation: tickerLoop 34s linear infinite;
}

.ticker-item {
  color: var(--text);
  font-size: 0.75rem;
}

.ticker-item i {
  margin-right: 6px;
}

.text-secondary {
  color: #2f80ff;
}

.info-marquee:hover .ticker-track {
  animation-play-state: paused;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}

.menu-grid-primary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.menu-card {
  min-height: 118px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: var(--space-3);
  text-align: center;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: var(--space-2);
}

.menu-card-primary {
  min-height: 102px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.66), rgba(255, 255, 255, 0.42));
  border-color: color-mix(in srgb, var(--border) 86%, #fff);
  box-shadow:
    0 10px 22px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.menu-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, var(--surface-muted), color-mix(in srgb, var(--surface-muted) 75%, white));
  border: 1px solid var(--border);
  font-size: 1.2rem;
}

.menu-fa {
  font-size: 0.95rem;
}

.icon-cyan {
  color: #18b9e6;
}

.icon-blue {
  color: #2f80ff;
}

.icon-green {
  color: #1ea85a;
}

.icon-gold {
  color: #f3b10b;
}

.icon-orange {
  color: #f59e0b;
}

.icon-pink {
  color: #e64f6a;
}

.icon-slate {
  color: #6b7280;
}

.icon-dark {
  color: #12151b;
}

.menu-label {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text);
}

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

.service-item {
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 92%, #fff), var(--surface));
  display: grid;
  grid-template-columns: 34px 1fr 14px;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  text-align: left;
  cursor: pointer;
}

.service-item:hover {
  border-color: color-mix(in srgb, var(--border) 72%, #fff);
  box-shadow:
    0 8px 18px rgba(15, 23, 42, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.service-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.service-label {
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--text);
}

.akses-main {
  display: grid;
  gap: 10px;
}

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

.quick-round-item {
  border: 0;
  background: transparent;
  padding: 0;
  display: grid;
  justify-items: center;
  gap: 6px;
  text-align: center;
  cursor: pointer;
}

.quick-round-icon {
  width: 58px;
  height: 58px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, #f3f4f8);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  box-shadow:
    0 6px 14px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.quick-round-label {
  margin: 0;
  font-size: 0.7rem;
  line-height: 1.25;
  font-weight: 600;
  color: var(--text);
}

.service-arrow {
  font-size: 0.68rem;
  color: #9aa2af;
}

.promo-subtitle {
  font-size: 0.72rem;
  line-height: 1.35;
}

.promo-list {
  gap: 8px;
}

.promo-item {
  padding: 8px 10px;
}

.promo-title {
  font-size: 0.88rem;
  line-height: 1.28;
}

.promo-meta {
  font-size: 0.7rem;
  margin-top: 2px;
}

.promo-btn {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.74rem;
  font-weight: 700;
}

.promo-refresh {
  min-width: 88px;
}

.special-offer {
  padding-bottom: 10px;
}

.offer-slider {
  margin-top: 8px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 2px;
}

.offer-slider::-webkit-scrollbar {
  display: none;
}

.offer-card {
  min-width: 190px;
  max-width: 190px;
  scroll-snap-align: start;
  border: 1px solid color-mix(in srgb, var(--honda-red) 22%, var(--border));
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(218, 14, 21, 0.08), #ffffff);
  padding: 10px;
  display: grid;
  gap: 4px;
}

.offer-badge {
  width: fit-content;
  min-height: 20px;
  border-radius: 999px;
  padding: 0 8px;
  background: var(--honda-red);
  color: #fff;
  font-size: 0.64rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
}

.offer-title {
  margin: 2px 0 0;
  font-size: 0.82rem;
  line-height: 1.3;
}

.offer-old-price {
  margin: 0;
  font-size: 0.68rem;
  color: #7d8593;
  text-decoration: line-through;
}

.offer-price {
  margin: 0;
  color: var(--honda-red-700);
  font-size: 0.98rem;
  font-weight: 800;
}

.offer-cta {
  margin-top: 4px;
  min-height: 34px;
  border-radius: 10px;
  background: linear-gradient(180deg, var(--honda-red), var(--honda-red-700));
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.part-discount {
  padding-bottom: 10px;
}

.part-card {
  background: #ffffff;
  border-color: color-mix(in srgb, var(--honda-red) 45%, var(--border));
  box-shadow:
    0 8px 16px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.part-thumb {
  width: 100%;
  height: 86px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--border) 82%, #fff);
  margin-bottom: 4px;
  background: #f4f5f8;
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
}

.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.meta,
.hint,
.kpi-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
}

.badge {
  min-height: 24px;
  border-radius: 999px;
  padding: 0 var(--space-2);
  border: 1px solid var(--border);
  background: var(--surface-muted);
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
}

.badge-success,
.badge-danger {
  color: var(--text);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.pill {
  min-height: 34px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 0 var(--space-3);
  cursor: pointer;
}

.pill[aria-pressed="true"] {
  border-color: rgba(231, 0, 18, 0.28);
  color: var(--primary);
  background: var(--surface);
}

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

.label {
  font-size: 0.79rem;
  font-weight: 600;
}

.input,
.textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  min-height: 38px;
  padding: 0 var(--space-3);
}

.textarea {
  min-height: 80px;
  padding-block: var(--space-2);
  resize: vertical;
}

.input[aria-invalid="true"],
.textarea[aria-invalid="true"] {
  border-color: #df3d47;
}

.error-text {
  margin: 0;
  font-size: 0.72rem;
  color: #cf2d37;
  min-height: 18px;
}

.loading,
.empty,
.error {
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
  padding: var(--space-4);
  text-align: center;
  color: var(--muted);
}

.skeleton {
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, #e5e7ed, #f2f3f6, #e5e7ed);
  background-size: 170% 100%;
  animation: shine 1.2s infinite linear;
}

.skeleton + .skeleton {
  margin-top: var(--space-2);
}

.toast-region {
  position: fixed;
  right: var(--space-4);
  bottom: calc(var(--nav-height) + env(safe-area-inset-bottom) + var(--space-4));
  z-index: 40;
  display: grid;
  gap: var(--space-2);
  max-width: min(88vw, 320px);
}

.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  box-shadow: var(--shadow-md);
  font-size: 0.78rem;
}

.hidden {
  display: none !important;
}

@keyframes shine {
  to {
    background-position: -170% 0;
  }
}

@keyframes tickerLoop {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

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

  .bottom-nav .nav-link:nth-child(2) {
    margin-right: 30px;
  }

  .bottom-nav .nav-link:nth-child(3) {
    margin-left: 30px;
  }
}

@media (min-width: 640px) {
  #appMain {
    padding: var(--space-5);
    padding-bottom: calc(var(--space-6) + var(--nav-height) + env(safe-area-inset-bottom));
  }

  .quick-round-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .topbar {
    padding-inline: var(--space-5);
  }
}

@media (min-width: 1024px) {
  body {
    padding: var(--space-4) 0;
  }

  .app-shell {
    border-radius: 26px;
    min-height: calc(100dvh - 32px);
    box-shadow: var(--shadow-md);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }

  .ticker-track {
    animation: none !important;
  }
}
