/* ============================================================
   LAYOUT.CSS — Layout Global (TANPA SIDEBAR)
   ============================================================ */

/* --- Container utama --- */
.container {
  position: relative;
  z-index: 1;
  transform: translateZ(0);
  will-change: transform;
  isolation: isolate;
  animation: fadeIn 0.2s ease-in-out;
  max-width: 1920px;
  width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
  background: rgba(10, 15, 26, 0.03) !important;
  backdrop-filter: blur(0px) !important;
  -webkit-backdrop-filter: blur(0px) !important;
  border-radius: var(--radius);
  border: none !important;
  padding: 20px;
  overflow-x: hidden;
}

/* --- Layout utama --- */
.layout {
  display: flex;
  gap: 20px;
  min-height: 100%;
}
.main {
  flex: 1;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0;
  min-width: 0;
}

/* --- Topbar / Header --- */
.topbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-bottom: 1px solid rgba(224, 230, 237, 0.2);
  padding-bottom: 16px;
  margin-bottom: 20px;
}

/* --- Loop status --- */
.loop-container {
  display: flex;
  justify-content: center;
  margin: 10px 0 8px;
}
.loop-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 20px;
  border-radius: 40px;
  background: var(--primary-tint-10);
  border: 1px solid var(--primary-tint-30);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
}
.loop-status.online {
  border-color: var(--primary);
  background: rgba(0, 255, 163, 0.12);
  box-shadow: 0 0 15px var(--primary-glow);
}
.loop-dot {
  width: 10px;
  height: 10px;
  background: var(--primary);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

/* --- Dashboard Grid --- */
.dashboard-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
@media (min-width: 1200px) {
  .dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .card:first-child {
    grid-column: 1 / 2;
  }
  .card:nth-child(2) {
    grid-column: 2 / 3;
  }
  .card.full-width {
    grid-column: 1 / -1;
  }
}

/* --- Card --- */
.card {
  background: rgba(255, 255, 255, 0.025) !important;  /* 🆕 Efek kaca sangat tipis */
  backdrop-filter: blur(20px) !important;             /* 🆕 Blur lebih kuat */
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(0, 255, 163, 0.06) !important; /* 🆕 Garis samar agar tidak hilang */
  border-radius: var(--radius);
  padding: 0px;
  width: 100%;
  box-sizing: border-box;
  transition: transform 0.25s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.25s ease; /* 🆕 Transisi lebih halus */
  overflow-x: hidden;
  box-shadow: none !important;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: none !important;
}
.full-width {
  grid-column: 1 / -1;
}

/* 🆕 Beri jarak antar elemen di dalam card agar tidak saling tempel */
.card > *:not(:last-child) {
  margin-bottom: 12px;
}

/* ========== LIGHT MODE LAYOUT ========== */
/* ✅ HANYA YANG UNIK: threshold-section */
body.light .threshold-section {
  border: none !important;
}

/* ========== RESPONSIVE LAYOUT (NON-SIDEBAR) ========== */
@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  body {
    padding: 0 !important;
    font-size: var(--font-mobile) !important;
  }
  .container {
    padding: 4px 2px !important;
    border-radius: var(--radius-sm) !important;
    padding-top: 75px !important;
  }
  .card {
    padding: 0px !important;
    margin-bottom: 10px !important;
    border-radius: 14px !important;
    background: rgba(12, 18, 32, 0.85) !important; /* Mobile tetap gelap agar terbaca */
    border: none !important;
    box-shadow: none !important;
  }
  .loop-status {
    padding: 3px 14px !important;
    font-size: 9px !important;
  }
  .loop-dot {
    width: 7px !important;
    height: 7px !important;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 2px 1px !important;
    padding-top: 56px !important;
  }
  .card {
    padding: 0px !important;
    margin-bottom: 8px !important;
    box-shadow: none !important;
  }
}