/* =========================================
   1. STYLE HALAMAN APPS (LAYOUT UTAMA)
   ========================================= */
.apps-section {
  margin-top: -64px;
  padding-top: 96px;
  padding-bottom: 60px;
  background: linear-gradient(180deg, #dbeafe 0%, #f0f9ff 25%, #e0f2fe 100%);
  min-height: 100vh;
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* =========================================
   3. STYLE HEADER (COMPACT & MODERN)
   ========================================= */
.page-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 30px auto;
  padding-top: 0;
  border-bottom: none;
}

.header-badge {
  display: inline-flex;
  align-items: center;
  background-color: #eff6ff;
  color: #2563eb;
  padding: 6px 18px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 14px;
  border: 1px solid #bfdbfe;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.08);
}

.page-header h1 {
  font-size: 2.4rem;
  color: #0f172a;
  margin: 0 0 10px 0;
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.2;
}

.page-header p {
  color: #475569;
  margin: 0 auto;
  font-size: 1.02rem;
  line-height: 1.6;
  font-weight: 500;
}

/* =========================================
   4. GRID SYSTEM & CARDS (UNIFORM ALIGNMENT)
   ========================================= */

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  align-items: stretch;
}

.app-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.85) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 20px;
  padding: 22px 24px;
  text-decoration: none;
  color: #0f172a;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 18px;
  transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  min-height: 110px;
  box-shadow: 0 4px 18px rgba(30, 58, 138, 0.04), inset 0 2px 4px rgba(255, 255, 255, 0.8);
  z-index: 1;
}

/* Dynamic Glossy Shine Effect */
.app-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg,
      transparent 40%,
      rgba(255, 255, 255, 0.4) 45%,
      rgba(255, 255, 255, 0.7) 50%,
      rgba(255, 255, 255, 0.4) 55%,
      transparent 60%);
  transform: rotate(30deg) translate(-100%, -100%);
  transition: transform 0.6s ease;
  z-index: 0;
  pointer-events: none;
}

.app-card:hover::before {
  transform: rotate(30deg) translate(100%, 100%);
}

.app-card:hover {
  transform: translateY(-6px);
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: 0 16px 36px -8px rgba(37, 99, 235, 0.16), inset 0 2px 4px rgba(255, 255, 255, 0.9);
}

.app-card * {
  z-index: 2;
}

/* Icon Box dengan Gradient & Soft Glow Shadow */
.app-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.app-card:hover .app-icon-box {
  transform: scale(1.08) rotate(4deg);
}

/* Warna Gradient Modern & Glow */
.color-blue {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  color: #2563eb;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
}

.color-green {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  color: #16a34a;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.12);
}

.color-purple {
  background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
  color: #9333ea;
  box-shadow: 0 4px 12px rgba(147, 51, 234, 0.12);
}

.color-orange {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  color: #ea580c;
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.12);
}

.color-red {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  color: #dc2626;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.12);
}

.color-cyan {
  background: linear-gradient(135deg, #ecfeff 0%, #cffafe 100%);
  color: #0891b2;
  box-shadow: 0 4px 12px rgba(8, 145, 178, 0.12);
}

.color-yellow {
  background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
  color: #ca8a04;
  box-shadow: 0 4px 12px rgba(202, 138, 4, 0.12);
}

.color-indigo {
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
  color: #4f46e5;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.12);
}

.color-pink {
  background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%);
  color: #db2777;
  box-shadow: 0 4px 12px rgba(219, 39, 119, 0.12);
}

/* Konten Teks */
.app-content {
  flex: 1;
  padding-right: 10px;
}

.app-content h3 {
  margin: 0 0 4px 0;
  font-size: 1.04rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.3px;
  transition: color 0.25s ease;
}

.app-card:hover .app-content h3 {
  color: #2563eb;
}

.app-content p {
  margin: 0;
  font-size: 0.86rem;
  color: #64748b;
  line-height: 1.48;
  font-weight: 500;
}

/* Panah Hover Interaktif */
.app-arrow {
  margin-left: auto;
  color: #94a3b8;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background-color: #f1f5f9;
  border: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.app-card:hover .app-arrow {
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
  border-color: transparent;
  transform: translateX(3px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* =========================================
   STYLE MAINTENANCE MODE (MUTED GLASS LOOK)
   ========================================= */

.app-card.maintenance {
  background: rgba(241, 245, 249, 0.7);
  border: 1px dashed rgba(203, 213, 225, 0.8);
  cursor: not-allowed;
  box-shadow: none;
}

.app-card.maintenance .app-content,
.app-card.maintenance .app-icon-box {
  opacity: 0.65;
  filter: grayscale(80%);
}

.app-card.maintenance:hover {
  transform: none;
  border-color: rgba(203, 213, 225, 1);
  box-shadow: none;
}

/* Badge Coming Soon */
.maintenance-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.28);
  font-size: 0.62rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  z-index: 10;
}

.app-card.maintenance .app-arrow {
  display: none;
}

/* =========================================
   5. RESPONSIVE MOBILE
   ========================================= */
@media screen and (max-width: 991px) {
  .apps-section {
    margin-top: -44px !important;
    padding-top: 68px !important;
    padding-bottom: 40px !important;
  }

  .page-header {
    margin: 0 auto 24px auto !important;
    padding-top: 0 !important;
  }

  .page-header h1 {
    font-size: 2rem;
  }

  .page-header p {
    font-size: 0.95rem;
    padding: 0 10px;
  }

  .apps-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .app-card {
    flex-direction: row;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
  }

  .app-icon-box {
    width: 46px;
    height: 46px;
    font-size: 1.25rem;
  }
}

/* =========================================
   APPS NIGHT MODE STYLES
   ========================================= */

body.night-mode .apps-section {
  background: #0b0f19 !important;
  color: #f8fafc !important;
}

body.night-mode .page-header h1,
body.night-mode .app-content h3 {
  color: #ffffff !important;
}

body.night-mode .page-header p,
body.night-mode .app-content p {
  color: #cbd5e1 !important;
}

body.night-mode .header-badge {
  background-color: rgba(37, 99, 235, 0.15) !important;
  color: #60a5fa !important;
  border-color: rgba(96, 165, 250, 0.3) !important;
}

body.night-mode .app-card {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.95) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35), inset 0 1px 2px rgba(255, 255, 255, 0.03) !important;
}

body.night-mode .app-card:hover {
  border-color: rgba(96, 165, 250, 0.4) !important;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6), 0 0 20px -5px rgba(59, 130, 246, 0.25) !important;
}

body.night-mode .app-card::before {
  background: linear-gradient(45deg,
      transparent 40%,
      rgba(255, 255, 255, 0.03) 45%,
      rgba(255, 255, 255, 0.08) 50%,
      rgba(255, 255, 255, 0.03) 55%,
      transparent 60%) !important;
}

body.night-mode .app-arrow {
  color: #64748b !important;
  background-color: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

body.night-mode .app-card:hover .app-arrow {
  color: #ffffff !important;
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%) !important;
  border-color: transparent !important;
}

body.night-mode .app-card.maintenance {
  background: rgba(30, 41, 59, 0.4) !important;
  border: 1px dashed rgba(255, 255, 255, 0.12) !important;
}

body.night-mode .maintenance-badge {
  background: rgba(239, 68, 68, 0.2) !important;
  color: #f87171 !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
}