/* ============================================================
 * MITRA NIAGA - CUSTOM STYLESHEET
 * Compatible with PC Desktop, Android, & iOS
 * ============================================================ */

/* Import Google Font: Plus Jakarta Sans */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ------------------------------------------------------------
 * 1. BASE & ROOT RESET
 * ------------------------------------------------------------ */
:root {
  --color-navy-main: #11162d;
  --color-navy-card: #1a203c;
  --color-brand-teal: #14b8a6;
  --color-brand-blue: #2563eb;
}

html {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent; /* Menghilangkan highlight biru saat ditekan di mobile/iOS */
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: #f1f5f9; /* Slate 100 */
  color: #1e293b;            /* Slate 800 */
  overflow-x: hidden;         /* Mencegah horizontal scroll berlebih pada mobile */
}

/* ------------------------------------------------------------
 * 2. CUSTOM SCROLLBAR (PC & Laptop)
 * ------------------------------------------------------------ */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #0d1224;
}

::-webkit-scrollbar-thumb {
  background: #2a3458;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #3b4878;
}

/* ------------------------------------------------------------
 * 3. OPTIMASI TOUCH & UI UNTUK MOBILE (Android & iOS)
 * ------------------------------------------------------------ */
/* Memastikan area sentuh tombol & link di ponsel cukup besar */
button, 
a {
  touch-action: manipulation;
}

/* Perbaikan khusus input/form pada iOS agar tidak auto-zoom berlebih */
input, 
select, 
textarea {
  font-size: 16px !important;
}

/* Smooth transition untuksemua elemen interaktif */
a, 
button, 
.card-hover {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ------------------------------------------------------------
 * 4. CUSTOM ANIMATIONS
 * ------------------------------------------------------------ */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fadeIn {
  animation: fadeIn 0.25s ease-out forwards;
}

/* Subtle Pulse Glow */
@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.2);
  }
  50% {
    box-shadow: 0 0 25px rgba(37, 99, 235, 0.4);
  }
}

.glow-effect {
  animation: glowPulse 3s infinite ease-in-out;
}

/* ------------------------------------------------------------
 * 5. CARDS & UTILITIES KUSTOM
 * ------------------------------------------------------------ */
.bg-navy-main {
  background-color: var(--color-navy-main);
}

.bg-navy-card {
  background-color: var(--color-navy-card);
}

/* Efek elevasi halus pada card saat di-hover (Desktop) */
.hover-lift {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@media (min-width: 768px) {
  .hover-lift:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
  }
}

/* ============================================================
 * STYLING KHUSUS UNTUK HALAMAN AKTIVITAS
 * ============================================================ */

/* Efek transisi & shadow halus untuk kartu Aktivitas */
.aktivitas-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.aktivitas-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px -6px rgba(0, 0, 0, 0.08);
}

/* Animasi kilau/pulse halus pada tombol Aktivitas 1 yang aktif */
@keyframes activePulse {
  0%, 100% {
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.2);
  }
  50% {
    border-color: rgba(16, 185, 129, 0.8);
    box-shadow: 0 0 12px 2px rgba(16, 185, 129, 0.25);
  }
}

#btn-kerjakan-1 {
  animation: activePulse 2.5s infinite ease-in-out;
}

/* ============================================================
 * STYLING KHUSUS UNTUK HALAMAN BANTUAN & LIVE CHAT
 * ============================================================ */

/* Custom scrollbar untuk kotak obrolan agar lebih bersih */
#chat-messages::-webkit-scrollbar {
  width: 5px;
}

#chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

#chat-messages::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

#chat-messages::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Animasi saat pesan baru dikirim */
@keyframes fadeInMsg {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fadeIn {
  animation: fadeInMsg 0.2s ease-out forwards;
}

/* ============================================================
 * STYLING KHUSUS UNTUK HALAMAN AKUN / DASHBOARD
 * ============================================================ */

/* Transition halus untuk tombol-tombol pintasan di halaman Akun */
.lg\:col-span-4 button,
.lg\:col-span-4 a {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Transisi dan efek angkat halus pada tombol aksi keuangan (Top-Up, Withdraw, Riwayat) */
.lg\:col-span-8 .grid button {
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.lg\:col-span-8 .grid button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.05);
}

/* ============================================================
 * STYLING KHUSUS UNTUK HALAMAN LOGIN / REGISTER (MITRA NIAGA)
 * ============================================================ */

/* Transisi halus saat beralih antar Tab (Masuk / Daftar Akun) */
#tab-login-btn,
#tab-register-btn {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animasi pudar (fade-in) saat form berganti */
#form-login,
#form-register {
  animation: fadeInForm 0.3s ease-in-out forwards;
}

@keyframes fadeInForm {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Efek fokus dan hover pada Input Field */
input[type="text"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus {
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15); /* Ring oranye halus saat di-fokus */
}

/* Transisi dan efek tekan untuk Tombol Utama (Orange Button) */
button[type="submit"] {
  transition: transform 0.15s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

button[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px -5px rgba(249, 115, 22, 0.4);
}

button[type="submit"]:active {
  transform: translateY(0);
}

/* Animasi Pudar & Geser Halus untuk Modal (Versi Light Mode) */
.fixed:not(.hidden) > div {
  animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalPop {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
  }
}