:root {
  --primary-color: #4f46e5; /* Indigo */
  --primary-light: #818cf8;
  --primary-dark: #3730a3;
  --secondary-color: #06b6d4; /* Cyan */
  --accent-color: #f59e0b; /* Amber */
  --success-color: #10b981; /* Emerald */
  --danger-color: #ef4444; /* Rose */
  --info-color: #3b82f6; /* Blue */
  --text-dark: #0f172a; /* Slate 900 */
  --text-muted: #64748b; /* Slate 500 */
  --bg-light: #f8fafc; /* Slate 50 */
  --bg-card: #ffffff;
  --sidebar-bg: #0f172a; /* Slate 900 (Dark Sidebar) */
  --sidebar-text: #94a3b8; /* Slate 400 */
  --sidebar-text-active: #ffffff;
  --sidebar-hover-bg: #1e293b; /* Slate 800 */
  --sidebar-border: #1e293b;
  --border-color: #e2e8f0; /* Slate 200 */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06), 0 2px 12px -2px rgba(15, 23, 42, 0.04);
  --box-shadow-hover: 0 20px 25px -5px rgba(79, 70, 229, 0.1), 0 10px 10px -5px rgba(79, 70, 229, 0.04);
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
  overflow-x: hidden;
}

/* Landing Page Styles */
.navbar-custom {
  background-color: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  padding: 15px 0;
  transition: var(--transition-smooth);
}
.navbar-custom.scrolled {
  padding: 10px 0;
  box-shadow: var(--box-shadow);
}
.hero-section {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.85), rgba(15, 23, 42, 0.9)), url('https://images.unsplash.com/photo-1523050854058-8df90110c9f1?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') no-repeat center center;
  background-size: cover;
  min-height: 85vh;
  display: flex;
  align-items: center;
  color: white;
  padding: 80px 0;
}
.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 20px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.hero-subtitle {
  font-size: 1.2rem;
  font-weight: 300;
  line-height: 1.8;
  max-width: 700px;
  margin-bottom: 30px;
  color: #e2e8f0;
}
.btn-custom {
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
  color: white;
  font-weight: 600;
  padding: 12px 30px;
  border-radius: var(--radius-xl);
  border: none;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}
.btn-custom:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(79, 70, 229, 0.4);
  color: white;
}
.section-padding {
  padding: 100px 0;
}
.section-title {
  font-weight: 700;
  text-align: center;
  margin-bottom: 15px;
  color: var(--text-dark);
}
.title-separator {
  width: 80px;
  height: 4px;
  background-color: var(--primary-color);
  margin: 0 auto 30px;
  border-radius: 2px;
}
.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 50px;
}
.about-card {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--box-shadow);
  overflow: hidden;
  transition: var(--transition-smooth);
  margin-bottom: 30px;
}
.about-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--box-shadow-hover);
}
.about-card img {
  height: 200px;
  object-fit: cover;
}
.about-card .icon-wrapper {
  background-color: var(--primary-color);
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: -30px auto 15px;
  position: relative;
  z-index: 2;
  box-shadow: 0 4px 10px rgba(79,70,229,0.3);
}
.feature-box {
  background-color: white;
  padding: 40px 30px;
  border-radius: var(--radius-lg);
  box-shadow: var(--box-shadow);
  transition: var(--transition-smooth);
  height: 100%;
}
.feature-box:hover {
  transform: translateY(-8px);
  box-shadow: var(--box-shadow-hover);
}
.feature-icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 20px;
  display: inline-block;
}
.cta-section {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
  color: white;
  padding: 80px 0;
  text-align: center;
}
.btn-light-custom {
  background-color: white;
  color: var(--primary-color);
  font-weight: 600;
  padding: 12px 30px;
  border-radius: var(--radius-xl);
  border: none;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.btn-light-custom:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Logdy Split Screen Login */
.login-split-container {
  min-height: 100vh;
  display: flex;
}
.login-left {
  flex: 1.2;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.85), rgba(15, 23, 42, 0.95)), url('https://www.gamelab.id/uploads/modules/NEWS/971/screenshot-20181223-213442-5c1f8f65aeebe155c71be4da.jpg?1632885470845') no-repeat center center;
  background-size: cover;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px;
  color: white;
}
.login-left h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 20px;
  letter-spacing: -1px;
}
.login-left p {
  font-size: 1.2rem;
  font-weight: 300;
  line-height: 1.8;
  max-width: 85%;
  color: #cbd5e1;
}
.login-right {
  flex: 1;
  background-color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
}
.login-form-wrapper {
  width: 100%;
  max-width: 420px;
}
.login-form-wrapper h2 {
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text-dark);
  letter-spacing: -0.5px;
}
.login-form-wrapper p {
  color: var(--text-muted);
  margin-bottom: 35px;
}
.form-control-custom {
  border-radius: var(--radius-md);
  padding: 14px 18px;
  border: 1.5px solid var(--border-color);
  background-color: #f8fafc;
  margin-bottom: 20px;
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}
.form-control-custom:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
  background-color: white;
}
.btn-login {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: white;
  font-weight: 600;
  padding: 14px;
  border-radius: var(--radius-md);
  border: none;
  width: 100%;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}
.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
  color: white;
}
.login-footer-links {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  font-size: 0.9rem;
}
.login-footer-links a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}
.login-footer-links a:hover {
  text-decoration: underline;
}

/* Dashboard Sidebar Layout */
.dashboard-container {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  background-color: var(--sidebar-bg);
  width: 280px;
  min-width: 280px;
  flex-shrink: 0;
  transition: var(--transition-smooth);
  z-index: 100;
  display: flex;
  flex-direction: column;
}
.sidebar-brand {
  padding: 30px 25px;
  border-bottom: 1px solid var(--sidebar-border);
}
.sidebar-link {
  display: flex;
  align-items: center;
  padding: 15px 25px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-smooth);
  border-left: 4px solid transparent;
  font-size: 0.95rem;
}
.sidebar-link i {
  font-size: 1.2rem;
  margin-right: 15px;
  width: 24px;
  text-align: center;
  transition: var(--transition-smooth);
}
.sidebar-link:hover, .sidebar-link.active {
  background-color: var(--sidebar-hover-bg);
  color: var(--sidebar-text-active);
  border-left-color: var(--primary-light);
}
.sidebar-link.active i {
  color: var(--primary-light);
}

.main-content {
  flex-grow: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  background-color: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  border-bottom: 1px solid var(--border-color);
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.mobile-toggle-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-dark);
  cursor: pointer;
}

/* Avatar Placeholders */
.avatar-placeholder {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
  color: white;
  font-size: 2.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.2);
  border: 4px solid white;
  text-transform: uppercase;
  user-select: none;
}
.avatar-placeholder-sm {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  user-select: none;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
  flex-shrink: 0;
}
.profile-img-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.3);
  flex-shrink: 0;
}

/* Card Statistics (Anti-Monoton) */
.card-stat {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--box-shadow);
  transition: var(--transition-smooth);
  background-color: white;
  overflow: hidden;
  position: relative;
}
.card-stat::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background-color: var(--primary-color);
}
.card-stat.stat-primary::after { background-color: var(--primary-color); }
.card-stat.stat-success::after { background-color: var(--success-color); }
.card-stat.stat-warning::after { background-color: var(--accent-color); }
.card-stat.stat-danger::after { background-color: var(--danger-color); }
.card-stat.stat-info::after { background-color: var(--info-color); }

.card-stat:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}
.card-stat .icon-box {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  transition: var(--transition-smooth);
}
.card-stat:hover .icon-box {
  transform: scale(1.08);
}

/* Table Design */
.card-table {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--box-shadow);
  overflow: hidden;
  background-color: white;
}
.table {
  margin-bottom: 0;
}
.table th {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  background-color: #f8fafc;
  border-bottom: 1px solid var(--border-color);
  padding: 16px 20px;
}
.table td {
  padding: 16px 20px;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-color);
}
.table tr:last-child td {
  border-bottom: none;
}

/* Form Styles */
.card-form {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--box-shadow);
}
.form-label {
  color: var(--text-dark);
  font-size: 0.9rem;
}
.form-select, .form-control {
  border-radius: var(--radius-md);
  padding: 10px 15px;
  border: 1.5px solid var(--border-color);
  font-size: 0.95rem;
  transition: var(--transition-smooth);
  background-color: #f8fafc;
}
.form-select:focus, .form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
  background-color: white;
}

/* Modals */
.modal-content {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
}
.modal-header {
  border-bottom: 1px solid var(--border-color);
  padding: 20px 24px;
}
.modal-body {
  padding: 24px;
}
.modal-footer {
  border-top: 1px solid var(--border-color);
  padding: 15px 24px;
}

/* Badges */
.badge {
  padding: 6px 12px;
  font-weight: 500;
  border-radius: 30px;
  font-size: 0.75rem;
}
.bg-success { background-color: rgba(16, 185, 129, 0.1) !important; color: var(--success-color) !important; }
.bg-danger { background-color: rgba(239, 68, 68, 0.1) !important; color: var(--danger-color) !important; }
.bg-warning { background-color: rgba(245, 158, 11, 0.1) !important; color: var(--accent-color) !important; }
.bg-primary { background-color: rgba(79, 70, 229, 0.1) !important; color: var(--primary-color) !important; }
.bg-secondary { background-color: #f1f5f9 !important; color: #475569 !important; }

/* Profile Page */
.profile-card-header {
  height: 120px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
}
.profile-avatar-container {
  margin-top: -60px;
  position: relative;
  display: inline-block;
  margin-bottom: 15px;
}
.profile-img-lg {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid white;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.profile-upload-icon {
  position: absolute;
  bottom: 0;
  right: 0;
  background-color: var(--primary-color);
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: var(--transition-smooth);
}
.profile-upload-icon:hover {
  background-color: var(--primary-dark);
  transform: scale(1.1);
}

/* ============================================
   RESPONSIVITAS - SEMUA PERANGKAT
   ============================================ */

/* Sidebar overlay untuk mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 99;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.active {
  display: block;
}

/* ---- TABLET (≤991px) ---- */
@media (max-width: 991.98px) {
  .sidebar {
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    transform: translateX(-100%);
    box-shadow: none;
    z-index: 200;
  }
  .sidebar.active {
    transform: translateX(0);
    box-shadow: 5px 0 30px rgba(0,0,0,0.25);
  }
  .mobile-toggle-btn {
    display: block;
  }
  .topbar {
    padding: 12px 20px;
    height: auto;
    min-height: 64px;
  }
  /* Login: hide left panel */
  .login-left {
    display: none !important;
  }
  .login-right {
    padding: 40px 30px;
    flex: 1;
  }

  /* Hero section */
  .hero-title { font-size: 2.5rem; }
  .section-padding { padding: 70px 0; }

  /* Table: horizontal scroll */
  .card-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .table-responsive-always {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Stat cards: 2 columns */
  .row-cols-md-4 > * { flex: 0 0 50%; max-width: 50%; }
}

/* ---- TABLET KECIL (≤768px) ---- */
@media (max-width: 767.98px) {
  body { font-size: 0.9rem; }

  /* Container padding */
  .container-fluid.p-4 { padding: 1rem !important; }

  /* Topbar */
  .topbar {
    padding: 10px 16px;
    flex-wrap: nowrap;
    gap: 8px;
  }
  .topbar h5 { font-size: 0.9rem; }

  /* Sidebar */
  .sidebar { width: 260px; min-width: 260px; }
  .sidebar-brand { padding: 20px 18px; }

  /* Profile header */
  .profile-card-header { height: 90px; }
  .profile-avatar-container { margin-top: -45px; }
  .profile-img-lg { width: 90px; height: 90px; }

  /* Table cells tighter */
  .table th, .table td { padding: 12px 14px; font-size: 0.82rem; }

  /* Modal full-screen feel */
  .modal-dialog { margin: 0.5rem; }

  /* Stat cards: stacked */
  .card-stat .icon-box { width: 44px; height: 44px; font-size: 1.2rem; }

  /* Hero */
  .hero-title { font-size: 2rem; line-height: 1.3; }
  .hero-subtitle { font-size: 1rem; }
  .section-padding { padding: 50px 0; }
  .btn-custom { padding: 10px 24px; font-size: 0.95rem; }
}

/* ---- MOBILE (≤576px) ---- */
@media (max-width: 575.98px) {
  body { font-size: 0.875rem; }

  /* Container full width */
  .container-fluid.p-4 { padding: 0.75rem !important; }

  /* Topbar */
  .topbar { padding: 10px 12px; min-height: 56px; }
  .topbar h5 { font-size: 0.82rem; }
  .topbar span.d-none { display: none !important; }

  /* Sidebar: narrower on very small screens */
  .sidebar { width: 240px; min-width: 240px; }
  .sidebar-link { padding: 12px 18px; font-size: 0.88rem; }
  .sidebar-link i { font-size: 1rem; margin-right: 12px; }

  /* Stat cards: full width */
  .col-6, .col-md-3, .col-md-4 {
    flex: 0 0 100%;
    max-width: 100%;
  }
  .card-stat { margin-bottom: 0.75rem; }

  /* Tables: simplify */
  .table th, .table td { padding: 10px 12px; font-size: 0.78rem; }
  .table th:nth-child(n+4),
  .table td:nth-child(n+4) { display: none; } /* Sembunyikan kolom >3 */

  /* Buttons */
  .btn { font-size: 0.82rem; padding: 8px 14px; }
  .btn-sm { font-size: 0.75rem; padding: 5px 10px; }

  /* Cards */
  .card-body { padding: 1rem; }

  /* Forms */
  .form-control, .form-select { font-size: 0.9rem; padding: 9px 13px; }
  .modal-footer { flex-direction: column; gap: 8px; }
  .modal-footer .btn { width: 100%; }

  /* Hero */
  .hero-title { font-size: 1.6rem; }
  .hero-subtitle { font-size: 0.95rem; }
  .hero-section { min-height: 60vh; padding: 60px 0; }
  .section-padding { padding: 40px 0; }

  /* Login */
  .login-right { padding: 24px 16px; }
  .login-form-wrapper { max-width: 100%; }

  /* Badge */
  .badge { padding: 4px 8px; font-size: 0.7rem; }

  /* Avatar */
  .avatar-placeholder { width: 80px; height: 80px; font-size: 1.8rem; }
}

/* ---- EXTRA SMALL (≤400px) ---- */
@media (max-width: 399.98px) {
  .sidebar { width: 220px; min-width: 220px; }
  .topbar h5 { font-size: 0.78rem; }
  .hero-title { font-size: 1.4rem; }
}

/* Utilities: touch-friendly tap targets */
@media (pointer: coarse) {
  .sidebar-link { min-height: 48px; }
  .btn { min-height: 44px; }
  .form-control, .form-select { min-height: 44px; }
}

