/* ===== GRID ===== */
.grid-fit {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  max-width: 1600px;
  margin: 0 auto;
}

/* ===== CARD (glass — tema Praya) ===== */
.card {
  position: relative;
  padding: 20px;
  border-radius: 10px;
  color: #e2e8f0;
  /* Kartu gelap semi-transparan agar menyatu dengan background navy */
  background: linear-gradient(
    145deg,
    rgba(24, 25, 44, 0.88) 0%,
    rgba(15, 18, 32, 0.91) 58%,
    rgba(13, 22, 34, 0.88) 100%
  );
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  overflow: hidden;
  isolation: isolate;
  transition: transform .4s cubic-bezier(.22, 1, .36, 1), box-shadow .4s;
  animation: cardIn .7s cubic-bezier(.22, 1, .36, 1) both;
}
/* Per-kartu hanya beda jeda animasi masuk — warna tidak lagi dibedakan */
.card:nth-child(1) { animation-delay: .05s; }
.card:nth-child(2) { animation-delay: .15s; }
.card:nth-child(3) { animation-delay: .25s; }
.card:nth-child(4) { animation-delay: .35s; }
.card:nth-child(5) { animation-delay: .45s; }
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  background: radial-gradient(
    ellipse at 50% 0%,
    rgba(139, 92, 246, 0.14) 0%,
    rgba(34, 211, 238, 0.035) 42%,
    transparent 72%
  );
  opacity: .72;
  transition: opacity .4s;
}
.card:hover::before { opacity: 1; }
/* Hover: kartu terangkat + glow — TANPA perubahan border */
.card:hover {
  transform: translateY(-8px);
  box-shadow:
    0 18px 38px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(167, 139, 250, 0.12),
    0 0 24px rgba(34, 211, 238, 0.08);
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(26px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.pnl-pos { color: #34d399; font-weight: 700; }
.pnl-neg { color: #f87171; font-weight: 700; }
.pnl-neutral { color: #94a3b8; }

.btn-action {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid #a78bfa;
  color: #fff;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: .03em;
  cursor: pointer;
  transition: all .3s ease;
}

.btn-action:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(8, 8, 15, 0.5);
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active { display: flex; }

.modal {
  position: relative;
  width: 100%;
  max-width: 430px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 40px rgba(167, 139, 250, 0.18);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.close-btn {
  background: none;
  border: none;
  color: #cbd5e1;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  transition: color .2s, transform .2s;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  color:  #cbd5e1;
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  padding: 12px 14px;
  background: rgba(10, 10, 20, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: #fff;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.preview-harga {
  background: rgba(10, 10, 20, 0.55);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.85rem;
  color: #cbd5e1;
  margin-bottom: 16px;
}

.preview-harga .value { color: #a78bfa; font-weight: 700; }

.btn-group {
  display: flex;
  gap: 10px;
}

.btn {
  flex: 1;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: .03em;
  cursor: pointer;
  transition: all .3s ease;
}

.error-text {
  color: #f87171;
  font-size: 0.8rem;
  margin-top: -8px;
  margin-bottom: 12px;
  display: none;
}

.error-text.show { display: block; }

.riwayat-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.riwayat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: #cbd5e1;
  transition: 0.25s;
}

.riwayat-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.riwayat-info .main {
  font-weight: 700;
  color: #fff;
}

.riwayat-info .sub {
  font-size: 0.75rem;
  color: #cbd5e1;
}

.riwayat-info .waktu {
  font-size: 0.7rem;
  color: #94a3b8;
  margin-top: 2px;
}

.riwayat-actions {
  display: flex;
  gap: 10px;
}

.riwayat-actions span {
  cursor: pointer;
  font-size: 0.8rem;
}

.riwayat-actions .edit { color: #22d3ee; }
.riwayat-actions .edit:hover { text-decoration: underline; }

.riwayat-actions .hapus { color: #f87171; }
.riwayat-actions .hapus:hover { text-decoration: underline; }

.empty-state {
  text-align: center;
  color: #cbd5e1;
  font-size: 0.85rem;
  padding: 30px 0;
  opacity: .7;
}

/* === TOMBOL DAFTAR USER (hanya dirender saat sudah login) === */
.account-menu {
  position: relative;
}

.account-menu-chevron {
  margin-left: 8px;
  font-size: .72em;
}

.auth-icon {
  margin-right: 8px;
}

.account-menu-chevron[hidden],
.account-dropdown[hidden],
.account-dropdown-item[hidden] {
  display: none;
}

.account-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  min-width: 170px;
  padding: 6px;
  border: 1px solid rgba(148, 163, 184, .2);
  border-radius: 12px;
  background: rgba(12, 12, 20, .97);
  box-shadow: 0 16px 36px rgba(0, 0, 0, .38);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.account-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #e2e8f0;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.account-dropdown-item:hover,
.account-dropdown-item:focus-visible {
  background: rgba(255, 255, 255, .09);
  color: #fff;
  outline: none;
}

.btn[data-action="do-login"] i,
.user-toolbar .btn i {
  margin-right: 6px;
}

/* === DAFTAR USER (isi modal) === */
.user-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 52vh;
  overflow-y: auto;
  margin-bottom: 10px;
}

.user-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  transition: .25s;
}

.user-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Penanda user yang sedang login */
.user-item.self {
  border-color: rgba(52, 211, 153, 0.45);
  background: rgba(52, 211, 153, 0.10);
}

.user-avatar {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #a78bfa, #22d3ee);
  color: #0b0b14;
  font-weight: 800;
  font-size: .95rem;
  text-transform: uppercase;
}

.user-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-info .main {
  font-size: .9rem;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-info .main em {
  font-style: normal;
  font-size: .7rem;
  font-weight: 600;
  color: #34d399;
}

.user-info .sub {
  font-size: .72rem;
  color: #94a3b8;
}

.user-count {
  flex: 0 0 auto;
  font-size: .72rem;
  font-weight: 600;
  color: #22d3ee;
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}

/* === TOOLBAR & AKSI KELOLA USER === */
.user-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

/* .btn punya flex:1 — di toolbar harus selebar isinya saja */
.btn-sm {
  flex: 0 0 auto;
  padding: 8px 14px;
  font-size: .82rem;
}

.user-actions {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  padding-top: 8px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.user-actions span {
  cursor: pointer;
  font-size: .78rem;
  font-weight: 600;
}
.user-actions .rename:hover { text-decoration: underline; }

.user-actions .pw { color: #fbbf24; }
.user-actions .pw:hover { text-decoration: underline; }

.user-actions .hapus { color: #f87171; }
.user-actions .hapus:hover { text-decoration: underline; }

/* teks bantuan kecil di dalam modal */
.form-hint {
  font-size: .75rem;
  color: #94a3b8;
  line-height: 1.4;
  margin: -4px 0 12px;
}

/* ============================================================
   PRAYA PORTFOLIO — PENYELARASAN AKSEN TEAL / BLUE
   Override visual sengaja diletakkan di bawah agar mudah dirawat.
   Pengecualian: modal/popup TIDAK ikut aksen teal — lihat catatan
   "MODAL / POPUP: samakan dengan /online" di bagian bawah file.
   ============================================================ */
:root {
  color-scheme: dark;
  --portfolio-bg: #0b1020;
  --portfolio-border: rgba(148, 163, 184, .16);
  --portfolio-text: #e7edf7;
  --portfolio-muted: #9aa9bf;
  --portfolio-accent: #5eead4;
}

html {
  background: var(--portfolio-bg);
  scroll-behavior: smooth;
}

body.dark-mode {
  color: var(--portfolio-text);
  background:
    radial-gradient(ellipse at 12% 0%, rgba(124, 58, 237, .13), transparent 42%),
    radial-gradient(ellipse at 92% 90%, rgba(34, 211, 238, .07), transparent 38%),
    linear-gradient(155deg, #0b1020 0%, #0d1425 54%, #090e1a 100%);
  background-color: var(--portfolio-bg);
  /* background-attachment: fixed DIHAPUS — diabaikan/dipecah browser HP
     dan bikin bagian bawah halaman tidak terlukis (strip putih). */
}

#main {
  width: 100%;
  padding: clamp(16px, 3vw, 30px);
}

.grid-fit {
  width: 100%;
  max-width: 1240px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
  gap: clamp(14px, 2vw, 20px);
}

/* Card lebih tenang; aksen warna dipakai seperlunya. */
.card {
  padding: clamp(16px, 2vw, 22px);
  border-radius: 16px;
  color: var(--portfolio-text);
  background: linear-gradient(145deg,
    rgba(20, 30, 51, .96) 0%,
    rgba(15, 24, 42, .97) 58%,
    rgba(13, 28, 42, .96) 100%);
  border: 1px solid var(--portfolio-border);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .18);
  backdrop-filter: blur(14px) saturate(125%);
  -webkit-backdrop-filter: blur(14px) saturate(125%);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
  animation-duration: .45s;
}

.card::before {
  background: radial-gradient(ellipse at 50% 0%,
    rgba(94, 234, 212, .10) 0%,
    rgba(96, 165, 250, .035) 40%,
    transparent 72%);
  opacity: .8;
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(94, 234, 212, .32);
  box-shadow: 0 15px 32px rgba(0, 0, 0, .25),
              0 0 0 1px rgba(94, 234, 212, .045);
}

.btn-action {
  border-color: rgba(94, 234, 212, .42);
  background: rgba(94, 234, 212, .07);
  color: #ccfbf1;
  border-radius: 10px;
}

.btn-action:hover:not(:disabled) {
  background: rgba(94, 234, 212, .16);
  border-color: var(--portfolio-accent);
  color: #fff;
  box-shadow: 0 5px 16px rgba(45, 212, 191, .14);
}

/* === MODAL / POPUP: tema ikut halaman portfolio (navy + aksen teal) ===
   Gaya final popup ada di bagian "Popup (modal) — tema kartu portfolio"
   di akhir file ini; blok di bawah hanya mengatur fokus field. */

/* Fokus field di popup: cukup border + ring ungu, TANPA outline teal
   halaman (persis .pin-field input:focus di /online).
   Catatan: input teks selalu cocok :focus-visible saat difokuskan, jadi
   outline global di atas akan membuat cincin ganda kalau tidak dimatikan. */
.modal-overlay input:focus-visible {
  outline: none;
}

/* Tombol popup tetap punya outline fokus, warnanya ungu. */
.modal-overlay button:focus-visible,
.modal-overlay [data-action]:focus-visible {
  outline-color: #a78bfa;
}

button,
input {
  font: inherit;
}

button:focus-visible,
input:focus-visible,
[data-action]:focus-visible {
  outline: 2px solid var(--portfolio-accent);
  outline-offset: 3px;
}

@media (max-width: 600px) {
  #main {
    padding: 14px;
  }

  .grid-fit {
    gap: 14px;
  }

  .card-actions {
    gap: 8px;
  }

  .user-row {
    flex-wrap: wrap;
  }

  .user-count {
    margin-left: 46px;
  }

  .user-actions {
    gap: 12px;
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ===== Kartu portfolio — header koin, grafik live, panel value ===== */

/* 4 kartu per baris di desktop (grid max 1240px), turun otomatis di layar kecil */
.grid-fit {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

.card {
  padding: 16px;
  border-radius: 16px;
}

.card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

/* Lingkaran koin (mengambang seperti ikon menu beranda) */
.coin-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.4em;
  height: 3.4em;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 26%, #86f2d5 0%, #2ee6b0 48%, #1fc79e 100%);
  color: #04231d;
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .01em;
  box-shadow: 0 0 14px rgba(45, 212, 191, .38), inset 0 0 10px rgba(255, 255, 255, .22);
  animation: coinBadgeFloat 5s ease-in-out infinite;
  will-change: transform;
}

.coin-meta {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 1px;
  min-width: 76px;
}

.coin-name {
  font-size: .9rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.coin-type {
  font-size: .66rem;
  color: var(--portfolio-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.price-col {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  margin-left: auto;
  min-width: max-content;
  text-align: right;
}

.live-price {
  font-size: 1.22rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.01em;
  color: #fff;
  text-shadow: none;
  white-space: nowrap;
}

.live-price.loading {
  font-size: .82rem;
  font-weight: 600;
  color: var(--portfolio-muted);
}

.price-sub {
  display: flex;
  align-items: center;
  gap: 5px;
}

.change-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: .66rem;
  font-weight: 700;
  color: var(--portfolio-accent);
  background: rgba(94, 234, 212, .14);
}

.change-pill.pnl-neg {
  color: #f87171;
  background: rgba(248, 113, 113, .14);
}

.change-pill.pnl-neutral {
  color: var(--portfolio-muted);
  background: rgba(148, 163, 184, .14);
}

.per {
  font-size: .62rem;
  color: var(--portfolio-muted);
}

/* Grafik live */
.spark-wrap {
  height: 46px;
  margin: 12px -2px 2px;
}

.spark {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.spark-line {
  fill: none;
  stroke: #2ee6b0;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 6px rgba(45, 212, 191, .5));
}

.spark-area {
  stroke: none;
}

/* Statistik: label kiri, nilai kanan */
.card-body {
  display: flex;
  flex-direction: column;
  font-size: .82rem;
  line-height: 1.4;
  color: #c2cde0;
}

.stat-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
}

.stat-row + .stat-row {
  border-top: 1px solid rgba(148, 163, 184, .12);
}

.stat-row .label {
  font-size: .75rem;
  color: var(--portfolio-muted);
  opacity: 1;
}

.stat-row .value {
  font-size: .84rem;
  font-weight: 700;
  color: #fff;
  text-align: right;
  white-space: nowrap;
}

/* Panel Value + pill PnL */
.value-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(148, 163, 184, .1);
}

.value-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.value-info .label {
  font-size: .66rem;
  color: var(--portfolio-muted);
  opacity: 1;
}

.value-big {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
}

.pnl-pill {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: .66rem;
  font-weight: 700;
  white-space: nowrap;
  color: var(--portfolio-muted);
  background: rgba(148, 163, 184, .14);
}

.pnl-pill.pnl-pos {
  color: #34d399;
  background: rgba(52, 211, 153, .14);
}

.pnl-pill.pnl-neg {
  color: #f87171;
  background: rgba(248, 113, 113, .14);
}

/* Tombol aksi */
.card-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.btn-action {
  flex: 1;
  height: 40px;
  padding: 0 10px;
  border-radius: 12px;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: 0;
}

.btn-action.primary {
  border-color: transparent;
  background: linear-gradient(180deg, #5cf3c2 0%, #22d3a5 100%);
  color: #04231d;
  box-shadow: 0 8px 20px rgba(45, 212, 191, .22);
}

.btn-action.primary:hover:not(:disabled) {
  border-color: transparent;
  background: linear-gradient(180deg, #7af7cf 0%, #2fe6b4 100%);
  color: #04231d;
  box-shadow: 0 10px 24px rgba(45, 212, 191, .3);
}

@keyframes coinBadgeFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

/* Lingkaran koin tetap bergerak di semua browser: aturan prefers-reduced-motion
   global di atas mematikan semua animasi, jadi animasi ini dikembalikan. */
.coin-badge {
  animation-duration: 5s !important;
  animation-iteration-count: infinite !important;
}

@media (max-width: 600px) {
  .card {
    padding: 15px;
  }

  .coin-meta {
    min-width: 0;
  }

  .coin-badge {
    width: 3.8em;
    height: 3.8em;
    font-size: .82rem;
  }

  .live-price {
    font-size: 1.4rem;
  }

  .spark-wrap {
    height: 52px;
  }

  .btn-action {
    height: 44px;
    padding: 0 10px;
    font-size: .85rem;
  }
}

/* ===== Popup (modal) - tema kartu portfolio: navy + aksen teal =====
   Overlay sengaja tipis blur-nya supaya halaman di belakang tetap terlihat. */
.modal-overlay {
  background: rgba(4, 10, 18, .6);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.modal {
  padding: 22px;
  border-radius: 18px;
  background: linear-gradient(160deg,
    rgba(17, 32, 48, .98) 0%,
    rgba(11, 20, 33, .99) 58%,
    rgba(10, 24, 33, .98) 100%);
  border: 1px solid rgba(94, 234, 212, .18);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5), 0 0 30px rgba(45, 212, 191, .1);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.modal-header { margin-bottom: 18px; }

.modal-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #f3f6ff;
  letter-spacing: .01em;
}

.close-btn {
  padding: 2px 6px;
  border-radius: 8px;
  color: #94a3b8;
  font-size: 1.3rem;
}

.close-btn:hover {
  color: var(--portfolio-accent);
  background: rgba(94, 234, 212, .1);
  box-shadow: none;
}

.form-group { margin-bottom: 14px; }

.form-group label {
  margin-bottom: 6px;
  font-size: .78rem;
  letter-spacing: .01em;
  color: var(--portfolio-muted);
}

.form-group input {
  padding: 11px 13px;
  font-size: .95rem;
  color: #f3f6ff;
  background: rgba(8, 16, 26, .72);
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 10px;
}

.form-group input::placeholder { color: #64748b; }

.form-group input:focus {
  border-color: rgba(94, 234, 212, .6);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, .16);
}

.preview-harga {
  background: rgba(8, 16, 26, .6);
  border: 1px dashed rgba(148, 163, 184, .22);
  border-radius: 12px;
  color: var(--portfolio-muted);
}

.preview-harga .value { color: var(--portfolio-accent); }

.btn {
  padding: 11px 14px;
  border-radius: 12px;
  font-size: .88rem;
  font-weight: 700;
  letter-spacing: 0;
}

.btn-primary {
  border-color: transparent;
  background: linear-gradient(180deg, #5cf3c2 0%, #22d3a5 100%);
  color: #04231d;
  box-shadow: 0 8px 20px rgba(45, 212, 191, .22);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #7af7cf 0%, #2fe6b4 100%);
  box-shadow: 0 10px 24px rgba(45, 212, 191, .3);
}

.btn-secondary {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(148, 163, 184, .22);
  color: #e2e8f0;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, .1);
  border-color: rgba(148, 163, 184, .32);
  box-shadow: none;
}

.btn-warning {
  background: linear-gradient(180deg, #fcd34d 0%, #f59e0b 100%);
  color: #1a1206;
}

.btn-warning:hover {
  transform: none;
  box-shadow: 0 8px 20px rgba(245, 158, 11, .25);
}

/* Isi modal: riwayat & daftar user mengikuti aksen teal */
.riwayat-item {
  background: rgba(255, 255, 255, .03);
  border-color: rgba(148, 163, 184, .14);
}

.riwayat-item:hover { border-color: rgba(94, 234, 212, .38); }

.riwayat-item.editing {
  border-color: rgba(94, 234, 212, .55);
  background: rgba(94, 234, 212, .1);
}

.riwayat-actions .edit { color: var(--portfolio-accent); }

.user-item {
  background: rgba(255, 255, 255, .03);
  border-color: rgba(148, 163, 184, .14);
}

.user-item:hover { border-color: rgba(94, 234, 212, .38); }

.user-avatar {
  background: linear-gradient(140deg, #5cf3c2, #22d3a5);
  color: #04231d;
}

.user-count {
  color: var(--portfolio-accent);
  background: rgba(94, 234, 212, .12);
  border-color: rgba(94, 234, 212, .3);
}

.user-actions .rename { color: var(--portfolio-accent); }

/* ===== Posisi popup: menempel ke atas, tidak di tengah layar ===== */
.modal-overlay {
  align-items: flex-start;
  overflow-y: auto;
  padding: 66px 20px 28px;
}

.modal {
  max-height: calc(100vh - 92px);
}

@media (max-width: 600px) {
  .modal-overlay {
    padding: 36px 16px 20px;
  }

  .modal {
    max-height: calc(100vh - 64px);
  }
}
