/* ============================================================
   TetaVolt Consumer Portal - lapisan tampilan 3D + pemuat login
   Ditambahkan 2026-09-27. Dimuat SETELAH consumer.css sehingga
   hanya menimpa yang perlu, tanpa membongkar gaya lama.
   ============================================================ */

/* ---------- Kedalaman latar ---------- */
body {
  background:
    radial-gradient(circle at 76% 2%, rgba(39, 130, 190, .28), transparent 30%),
    radial-gradient(circle at 14% 56%, rgba(11, 156, 144, .14), transparent 34%),
    radial-gradient(circle at 50% 120%, rgba(94, 223, 209, .10), transparent 45%),
    var(--bg);
}

/* Kisi halus supaya bidang terasa punya ruang, bukan datar. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(55, 185, 244, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(55, 185, 244, .035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 75%);
}

.consumer-shell { position: relative; z-index: 1; }

/* ---------- Kartu dengan kesan terangkat ---------- */
.consumer-card,
.help-card {
  position: relative;
  border-radius: 20px;
  background:
    linear-gradient(160deg, rgba(23, 44, 55, .92), rgba(12, 25, 32, .96));
  border: 1px solid rgba(94, 223, 209, .14);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .06) inset,
    0 -1px 0 rgba(0, 0, 0, .4) inset,
    0 18px 40px -18px rgba(0, 0, 0, .85),
    0 2px 10px -4px rgba(55, 185, 244, .18);
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s ease;
  transform-style: preserve-3d;
}

/* Kilau tipis di tepi atas, meniru cahaya jatuh dari atas. */
.consumer-card::before,
.help-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(94, 223, 209, .55), transparent);
  pointer-events: none;
}

@media (hover: hover) and (min-width: 860px) {
  .consumer-card:hover,
  .help-card:hover {
    transform: translateY(-4px) perspective(1200px) rotateX(1.4deg);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, .08) inset,
      0 -1px 0 rgba(0, 0, 0, .45) inset,
      0 28px 56px -20px rgba(0, 0, 0, .9),
      0 4px 18px -6px rgba(55, 185, 244, .3);
  }
}

/* ---------- Tombol terasa bisa ditekan ---------- */
.electric-button,
.track-button {
  position: relative;
  border-radius: 12px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .35) inset,
    0 -2px 0 rgba(0, 0, 0, .22) inset,
    0 8px 18px -8px rgba(55, 185, 244, .6);
  transition: transform .14s ease, box-shadow .14s ease, filter .14s ease;
}
.electric-button:active,
.track-button:active {
  transform: translateY(2px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .22) inset,
    0 -1px 0 rgba(0, 0, 0, .25) inset,
    0 3px 8px -5px rgba(55, 185, 244, .5);
}

/* ---------- Kolom isian sedikit cekung ---------- */
input, textarea, .track-form input {
  border-radius: 12px;
  background: rgba(6, 14, 19, .72);
  box-shadow:
    0 2px 6px -3px rgba(0, 0, 0, .8) inset,
    0 1px 0 rgba(255, 255, 255, .04);
  transition: border-color .2s ease, box-shadow .2s ease;
}
input:focus, textarea:focus, .track-form input:focus {
  box-shadow:
    0 2px 6px -3px rgba(0, 0, 0, .8) inset,
    0 0 0 3px rgba(55, 185, 244, .18);
}

/* ============================================================
   PEMUAT LOGIN - pengganti tulisan "Memverifikasi..."
   ============================================================ */

.tv-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 26px 16px 22px;
  animation: tv-loader-in .3s ease both;
}

@keyframes tv-loader-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* Panggung 3D untuk cincin yang berputar. */
.tv-loader-stage {
  position: relative;
  width: 86px;
  height: 86px;
  perspective: 420px;
}

.tv-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid transparent;
  transform-style: preserve-3d;
}

/* Tiga cincin pada sumbu berbeda: kesan bola berputar, bukan lingkaran datar. */
.tv-ring-1 {
  border-top-color: var(--blue, #37b9f4);
  border-bottom-color: rgba(55, 185, 244, .25);
  animation: tv-spin-x 1.5s linear infinite;
}
.tv-ring-2 {
  inset: 12px;
  border-left-color: var(--cyan, #5edfd1);
  border-right-color: rgba(94, 223, 209, .22);
  animation: tv-spin-y 1.9s linear infinite reverse;
}
.tv-ring-3 {
  inset: 24px;
  border-top-color: var(--lime, #d8f548);
  border-left-color: rgba(216, 245, 72, .3);
  animation: tv-spin-z 1.2s linear infinite;
}

@keyframes tv-spin-x {
  from { transform: rotateX(62deg) rotateZ(0deg); }
  to   { transform: rotateX(62deg) rotateZ(360deg); }
}
@keyframes tv-spin-y {
  from { transform: rotateY(64deg) rotateZ(0deg); }
  to   { transform: rotateY(64deg) rotateZ(360deg); }
}
@keyframes tv-spin-z {
  from { transform: rotateZ(0deg); }
  to   { transform: rotateZ(360deg); }
}

/* Inti menyala di tengah. */
.tv-core {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 26px;
  color: var(--cyan, #5edfd1);
  text-shadow: 0 0 14px rgba(94, 223, 209, .7);
  animation: tv-pulse 1.5s ease-in-out infinite;
}

@keyframes tv-pulse {
  0%, 100% { opacity: .55; transform: scale(.92); }
  50%      { opacity: 1;   transform: scale(1.06); }
}

/* Bayangan lantai memberi tumpuan agar tidak melayang. */
.tv-loader-stage::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -14px;
  width: 54px;
  height: 9px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(55, 185, 244, .4), transparent 70%);
  filter: blur(3px);
  animation: tv-shadow 1.5s ease-in-out infinite;
}

@keyframes tv-shadow {
  0%, 100% { opacity: .35; width: 44px; }
  50%      { opacity: .6;  width: 58px; }
}

.tv-loader-text {
  margin: 0;
  font: 600 13px 'Rajdhani', 'Segoe UI', sans-serif;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--ink, #edf8f7);
}

/* Titik berjalan menandakan proses masih berlangsung. */
.tv-loader-text::after {
  content: '';
  animation: tv-dots 1.4s steps(4, end) infinite;
}

@keyframes tv-dots {
  0%   { content: ''; }
  25%  { content: '.'; }
  50%  { content: '..'; }
  75%  { content: '...'; }
  100% { content: ''; }
}

.tv-loader-sub {
  margin: -8px 0 0;
  font-size: 11.5px;
  letter-spacing: .4px;
  color: var(--dim, #91aeb2);
  opacity: .85;
}

/* Garis kemajuan yang bergerak: memberi kesan ada yang berjalan. */
.tv-loader-bar {
  width: 190px;
  height: 3px;
  border-radius: 99px;
  background: rgba(94, 223, 209, .12);
  overflow: hidden;
}
.tv-loader-bar i {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, transparent, var(--blue, #37b9f4), var(--cyan, #5edfd1), transparent);
  animation: tv-bar 1.25s ease-in-out infinite;
}

@keyframes tv-bar {
  0%   { transform: translateX(-110%); }
  100% { transform: translateX(310%); }
}

/* Hormati pengguna yang mematikan animasi di perangkatnya. */
@media (prefers-reduced-motion: reduce) {
  .tv-ring, .tv-core, .tv-loader-bar i,
  .tv-loader-stage::after, .tv-loader-text::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
  .tv-loader-text::after { content: '...'; }
  .consumer-card, .help-card { transition: none; }
}

.services-ready {
  background: linear-gradient(145deg, #11191b, #080d0e 70%);
}
.services-ready .consumer-topbar { padding-bottom: 22px; border-bottom: 1px solid #334345; gap: 16px; }
.services-ready .consumer-brand { width: 160px; flex-shrink: 0; }
.services-ready .consumer-actions { gap: 12px; letter-spacing: 0; }
.services-ready .consumer-shell { max-width: 1200px; }
.service-menu { padding-top: 30px; }
.service-menu-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.menu-kicker { margin: 0 0 8px; color: #94b9b3; font-size: 12px; font-weight: 600; letter-spacing: 0; }
.service-menu h1 { margin: 0; font: 700 38px/1.1 'Rajdhani', sans-serif; letter-spacing: 0; color: #f1f8f4; }
.menu-account { display: flex; align-items: center; gap: 9px; color: #c8d9d4; font-size: 12px; white-space: nowrap; }
.service-choices { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.service-choice {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  min-height: 190px;
  padding: 20px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #102120;
  text-align: left;
  text-decoration: none;
  font: inherit;
  letter-spacing: 0;
  cursor: pointer;
  position: relative;
  box-shadow: 0 4px 0 rgba(0, 0, 0, .28);
  transition: transform .18s ease, box-shadow .18s ease;
  animation: service-arrive .35s ease both;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.service-choice svg, .menu-account svg, .service-navigation svg { width: 22px; height: 22px; flex-shrink: 0; stroke-width: 1.8; }
.choice-top { display: flex; width: 100%; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.choice-number { font-size: 13px; font-weight: 600; line-height: 1; }
.choice-label { display: block; font: 700 23px/1.1 'Rajdhani', sans-serif; letter-spacing: 0; overflow-wrap: break-word; }
.choice-channel { display: block; margin-top: 8px; font-size: 11px; line-height: 1.5; }
.service-choice .choice-icon { width: 30px; height: 30px; margin-bottom: 14px; }
.choice-service { grid-column: span 2; grid-row: span 2; padding: 26px; background: #7ee5d2; }
.choice-service .choice-label { max-width: 300px; font-size: 42px; line-height: 1; }
.choice-service .choice-channel { font-size: 13px; }
.choice-visual { display: flex; width: 100%; flex: 1; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 0 32px; }
.choice-visual svg { width: 104px; height: 104px; stroke-width: 1; }
.choice-visual img { width: 80px; height: 80px; object-fit: contain; border-radius: 50%; }
.choice-inspection { background: #e6eff1; animation-delay: .04s; }
.choice-towing { background: #ffb09e; animation-delay: .08s; }
.choice-parts { background: #253638; border-color: #4a6668; color: #f0faf4; animation-delay: .12s; }
.choice-training { background: #eee28b; animation-delay: .16s; }
.choice-charging { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 20px; min-height: 100px; background: #c7efac; animation-delay: .2s; }
.choice-charging .choice-icon { margin: 0; width: 38px; height: 38px; }
.charging-label { flex: 1; min-width: 0; }
.choice-charging .choice-channel { margin-top: 4px; }
/* Kartu 07: beli kWh & mulai charging dari wallet. Gaya gelap + aksen
   cyan supaya kontras dengan kartu Maps (#c7efac) di sebelahnya. */
.choice-charge-start {
  animation-delay: .24s;
  background:
    radial-gradient(circle at 85% 15%, rgba(55, 185, 244, .22), transparent 45%),
    linear-gradient(160deg, rgba(20, 46, 54, .96), rgba(9, 22, 28, .98));
  border-color: rgba(55, 185, 244, .4);
  color: var(--ink);
}
.choice-charge-start .choice-number { color: var(--cyan); }
.choice-charge-start .choice-channel { color: var(--dim); }
.choice-charge-start .choice-icon { color: var(--blue); }
.service-choice:focus-visible, .service-navigation button:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
.service-choice:active { transform: translateY(2px); box-shadow: none; }
.service-navigation { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding-top: 26px; color: #bdd0cc; font-size: 14px; }
.service-navigation button { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 14px; background: #203331; color: #e6faf4; border: 1px solid #48655c; border-radius: 8px; cursor: pointer; }
.services-ready footer { margin-top: 28px; }
.services-ready .consumer-grid { margin-top: 22px; }
#loginFeedback { color: #ffb6a5; font-size: 14px; line-height: 1.5; }
@keyframes service-arrive {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (hover: hover) {
  .service-choice:hover { transform: translateY(-3px); box-shadow: 0 7px 0 rgba(0, 0, 0, .35); }
}
@media (max-width: 760px) {
  .service-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .service-menu-heading { align-items: flex-start; flex-direction: column; gap: 12px; margin-bottom: 20px; }
  .service-menu h1 { font-size: 32px; }
  .choice-service { grid-row: auto; min-height: 228px; padding: 22px; }
  .choice-service .choice-label { font-size: 34px; max-width: none; }
  .choice-visual { padding: 0 0 14px; }
  .choice-visual svg { width: 68px; height: 68px; }
  .choice-visual img { width: 60px; height: 60px; }
  .choice-service .choice-top { margin-bottom: 4px; }
  .service-choice:not(.choice-service):not(.choice-charging) { min-height: 180px; }
  .choice-charging { min-height: 114px; }
}
@media (max-width: 430px) {
  .services-ready .consumer-brand { width: 125px; }
  .services-ready .secure-label { display: none; }
  .service-menu { padding-top: 24px; }
  .service-choice { padding: 16px; }
  .choice-label { font-size: 21px; }
  .choice-channel { font-size: 11px; }
  .choice-service .choice-label { font-size: 30px; }
  .choice-charging { gap: 12px; }
  .choice-charging .choice-icon { width: 28px; height: 28px; }
  .choice-charging > .choice-number { display: none; }
  .menu-account { font-size: 12px; }
}
/* ============================================================
   PANEL ISI DAYA EV - beli kWh & mulai charging dari wallet
   ============================================================ */
.charge-panel {
  padding-top: 30px;
}
.charge-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}
.charge-panel-head h2 {
  margin: 0;
  font: 700 38px/1.1 'Rajdhani', sans-serif;
  color: #f1f8f4;
}
.charge-sub {
  margin: 8px 0 0;
  color: #94b9b3;
  font-size: 13.5px;
  line-height: 1.55;
  max-width: 460px;
}
.nav-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 16px;
  background: #203331;
  color: #e6faf4;
  font: inherit;
  font-size: 13px;
  letter-spacing: 0;
  border: 1px solid #48655c;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}
.nav-back:hover { background: #2a4240; }
.nav-back:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }

.charge-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr);
  gap: 18px;
  align-items: start;
}
.charge-buy {
  background: linear-gradient(160deg, rgba(23, 44, 55, .92), rgba(12, 25, 32, .96));
  border: 1px solid rgba(94, 223, 209, .14);
  border-radius: 20px;
  padding: 26px;
}
.charge-saldo {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.charge-saldo .eyebrow { margin: 0; }
.charge-saldo strong {
  font: 600 30px/1 'Rajdhani', sans-serif;
  color: var(--cyan);
  letter-spacing: .02em;
}
.charge-saldo a {
  margin-left: auto;
  color: var(--blue);
  font: 700 12px 'Rajdhani', sans-serif;
  letter-spacing: .8px;
  text-decoration: none;
  text-transform: uppercase;
}
.charge-saldo a:hover { text-decoration: underline; }
.charge-buy .card-intro { margin: 12px 0 18px; }

.charge-packages {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.charge-package {
  display: grid;
  gap: 6px;
  padding: 14px 10px;
  border: 1px solid #2c4b54;
  border-radius: 12px;
  background: rgba(6, 14, 19, .72);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .04);
  transition: border-color .16s ease, transform .14s ease, box-shadow .14s ease;
}
.charge-package strong { font: 700 18px 'Rajdhani', sans-serif; letter-spacing: .03em; }
.charge-package span { font-size: 11.5px; color: var(--dim); }
.charge-package:hover { border-color: rgba(94, 223, 209, .55); }
.charge-package:active { transform: translateY(1px); }
.charge-package:focus-visible { outline: 3px solid rgba(216, 245, 72, .55); outline-offset: 3px; }

.charge-custom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font: 700 10px 'Rajdhani', sans-serif;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #82a0a5;
}
.charge-custom input {
  max-width: 150px;
  min-height: 46px;
  margin-top: 0;
}

.charge-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0 12px;
  padding-top: 16px;
  border-top: 1px dashed #2c4b54;
  color: #82a0a5;
  font: 700 10px 'Rajdhani', sans-serif;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.charge-summary strong {
  font: 600 26px/1 'Rajdhani', sans-serif;
  color: var(--ink);
  letter-spacing: .02em;
}

.charge-start {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  min-height: 54px;
  padding: 14px 18px;
  border: 0;
  border-radius: 12px;
  background: var(--blue);
  color: #061018;
  font: 700 13px 'Rajdhani', sans-serif;
  letter-spacing: .7px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .35) inset,
    0 -2px 0 rgba(0, 0, 0, .22) inset,
    0 8px 18px -8px rgba(55, 185, 244, .6);
  transition: background .16s ease, transform .14s ease, box-shadow .14s ease;
}
.charge-start:hover { background: var(--lime); }
.charge-start:active { transform: translateY(2px); }
.charge-start:disabled { opacity: .55; cursor: wait; }
.charge-start:focus-visible { outline: 3px solid rgba(216, 245, 72, .55); outline-offset: 3px; }

.charge-msg { min-height: 16px; margin: 10px 0 0; font-size: 12px; line-height: 1.5; color: var(--dim); }
.charge-msg-ok { color: var(--cyan); }
.charge-msg-err { color: #ffb6a5; }

/* Kotak sesi berjalan */
.charge-active {
  background: linear-gradient(160deg, rgba(13, 41, 40, .9), rgba(8, 22, 24, .96));
  border: 1px solid rgba(94, 223, 209, .3);
  border-radius: 20px;
  padding: 26px;
  box-shadow: 0 0 0 1px rgba(94, 223, 209, .06), 0 18px 40px -18px rgba(0, 0, 0, .85);
}
.charge-active-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.charge-active-head strong {
  font: 700 14px 'Rajdhani', sans-serif;
  letter-spacing: .06em;
  color: var(--cyan);
}
.charge-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.charge-stats > div {
  padding: 13px 14px;
  border: 1px solid #2c4b54;
  border-radius: 12px;
  background: rgba(6, 14, 19, .72);
}
.charge-stats span {
  display: block;
  font: 700 9.5px 'Rajdhani', sans-serif;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #73a4ad;
  margin-bottom: 6px;
}
.charge-stats strong {
  font: 700 20px 'Rajdhani', sans-serif;
  color: var(--ink);
  letter-spacing: .02em;
}
.charge-stop {
  width: 100%;
  min-height: 48px;
  margin-top: 16px;
  padding: 12px 16px;
  border: 1px solid #e0907e;
  border-radius: 12px;
  background: transparent;
  color: #ffb09e;
  font: 700 12px 'Rajdhani', sans-serif;
  letter-spacing: .7px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .16s ease, color .16s ease;
}
.charge-stop:hover { background: rgba(255, 176, 158, .14); }
.charge-stop:focus-visible { outline: 3px solid rgba(255, 176, 158, .55); outline-offset: 3px; }
.charge-note { margin: 12px 0 0; font-size: 11.5px; line-height: 1.55; color: var(--dim); }

@media (max-width: 760px) {
  .charge-panel { padding-top: 24px; }
  .charge-panel-head { flex-direction: column; align-items: stretch; gap: 14px; margin-bottom: 20px; }
  .charge-panel-head h2 { font-size: 32px; }
  .nav-back { align-self: flex-start; }
  .charge-layout { grid-template-columns: 1fr; }
  .charge-packages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .charge-buy, .charge-active { padding: 22px; }
}
@media (max-width: 430px) {
  .charge-saldo strong { font-size: 26px; }
  .charge-saldo a { margin-left: 0; }
  .charge-custom { flex-wrap: wrap; }
  .charge-custom input { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .service-choice { animation: none; transition: none; }
}
