/* =========================================
   FLYBIT MODERN DESIGN SYSTEM
   ========================================= */

:root {
  --bg: #020617;
  --sidebar: #0b1120;
  --card: #0f172a;
  --border: #1e293b;
  --primary: #38bdf8;
  --primary-glow: rgba(56, 189, 248, 0.2);
  --text: #f1f5f9;
  --muted: #94a3b8;
  --success: #10b981;
}

* {
  box-sizing: border-box;
  transition: background-color 0.3s, border-color 0.3s, transform 0.2s ease-out;
}

body {
  margin: 0;
  display: flex;
  font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
}

/* =========================================
   SIDEBAR (FIXED LEFT)
   ========================================= */
.sidebar {
  width: 260px;
  height: 100vh;
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  padding: 30px 20px;
  position: fixed;
  z-index: 100;
}

.logo {
  font-size: 26px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 50px;
  letter-spacing: -1px;
  text-transform: uppercase;
  text-shadow: 0 0 15px var(--primary-glow);
}

.menu a {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  border-radius: 12px;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 10px;
  font-weight: 500;
  font-size: 15px;
}

.menu a:hover {
  background: rgba(56, 189, 248, 0.05);
  color: var(--primary);
}

.menu a.active {
  background: var(--primary);
  color: #020617;
  box-shadow: 0 10px 20px -5px rgba(56, 189, 248, 0.4);
}

/* =========================================
   CONTENT AREA
   ========================================= */
.content {
  margin-left: 260px;
  padding: 40px;
  width: calc(100% - 260px);
  min-height: 100vh;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px;
  max-width: 1100px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
}

h1, h2, h3 {
  margin-top: 0;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.025em;
}

h2 { color: var(--primary); }

p {
  color: var(--muted);
  font-size: 16px;
}

/* =========================================
   DASHBOARD & PRODUCT BOXES
   ========================================= */
.dashboard-box, .product-list, .about-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.dashboard-item, .product-item, .about-item {
  background-color: #1e293b;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 25px;
  text-align: left; /* Align left for more professional look */
  text-decoration: none;
}

.dashboard-item:hover, .product-item:hover {
  transform: translateY(-8px);
  border-color: var(--primary);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
}

.dashboard-item.balance {
  grid-column: 1 / -1; /* Full width modern look */
  background: linear-gradient(90deg, #1e293b 0%, #0f172a 100%);
  border-left: 4px solid var(--primary);
}

.dashboard-item h3, .product-item h3 {
  color: var(--primary);
  font-size: 1.2em;
  margin-bottom: 10px;
}

/* =========================================
   TABLES (FBC SCAN)
   ========================================= */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
  margin-top: 20px;
}

th {
  padding: 15px;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: left;
}

td {
  padding: 18px 15px;
  background: rgba(30, 41, 59, 0.5);
}

td:first-child { border-radius: 12px 0 0 12px; }
td:last-child { border-radius: 0 12px 12px 0; }

tr:hover td {
  background: rgba(30, 41, 59, 0.8);
  color: var(--primary);
}

/* =========================================
   RESPONSIVE (MOBILE)
   ========================================= */
@media (max-width: 1024px) {
  .sidebar { width: 80px; padding: 30px 10px; }
  .logo { font-size: 14px; text-align: center; }
  .menu a { justify-content: center; padding: 15px 0; }
  .content { margin-left: 80px; width: calc(100% - 80px); padding: 20px; }
}

@media (max-width: 640px) {
  .dashboard-box { grid-template-columns: 1fr; }
  .card { padding: 25px; }
}

/* =========================================
   MOBILE MENU DI BAWAH (APP STYLE)
   ========================================= */
@media (max-width: 640px) {
  body {
    display: block !important;
  }

  .sidebar {
    /* Memaksa menu pindah ke bawah layar */
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: auto !important;
    background: var(--sidebar) !important;
    padding: 10px 0 !important;
    border-right: none !important;
    border-top: 1px solid var(--border) !important;
    z-index: 999 !important;
  }

  /* Sembunyikan Logo di menu bawah agar hemat tempat */
  .logo {
    display: none !important;
  }

  .menu {
    display: flex !important;
    flex-direction: row !important; /* Menu berjejer ke samping */
    justify-content: space-around !important; /* Jarak antar menu rata */
    margin: 0 !important;
  }

  .menu a {
    flex-direction: column !important; /* Icon di atas, teks di bawah (jika ada) */
    padding: 8px !important;
    font-size: 11px !important;
    margin-bottom: 0 !important;
    text-align: center;
  }

  .content {
    margin-left: 0 !important;
    width: 100% !important;
    padding: 20px !important;
    /* Ruang agar konten tidak tertutup menu bawah & tidak terpotong navigasi HP */
    padding-bottom: 180px !important; 
  }

  .card {
    padding: 20px !important;
    border-radius: 16px !important;
  }
}
