/* ==========================================================================
   PORTAL GRID & CARD STYLES
   ========================================================================== */

.portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
  padding: 1rem;
}

.portal-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #ffffff;
  border-radius: 16px;
  padding: 1.75rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
  text-decoration: none;
  color: inherit;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.portal-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.12);
}

/* Card Accents (Top Border Color) */
.card-app {
  border-top: 4px solid #10b981;
}

.card-absen {
  border-top: 4px solid #8b5cf6;
}

.card-sales {
  border-top: 4px solid #f59e0b;
}

/* Header & Icon */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #f3f4f6;
  color: #374151;
}

.card-app .card-icon {
  background: #ecfdf5;
  color: #059669;
}

.card-absen .card-icon {
  background: #f5f3ff;
  color: #7c3aed;
}

.card-sales .card-icon {
  background: #fffbeb;
  color: #d97706;
}

.card-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  background: #f3f4f6;
  color: #4b5563;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Body Content */
.card-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.5rem;
}

.card-tagline {
  font-size: 0.925rem;
  color: #4b5563;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

/* Tag & Feature Chips */
.feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tag {
  font-size: 0.75rem;
  font-weight: 600;
  background: #f3f4f6;
  color: #1f2937;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
}

.feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.feature-item {
  font-size: 0.78rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  color: #374151;
}

/* Bullet List */
.bullet-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
}

.bullet-list li {
  font-size: 0.875rem;
  color: #4b5563;
  margin-bottom: 0.6rem;
  position: relative;
  padding-left: 1.25rem;
  line-height: 1.4;
}

.bullet-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #9ca3af;
  font-weight: bold;
}

/* Footer Action */
.card-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 600;
  color: #111827;
  padding-top: 1rem;
  border-top: 1px solid #f3f4f6;
  transition: color 0.2s;
}

.portal-card:hover .card-action {
  color: #2563eb;
}

.portal-card:hover .card-action svg {
  transform: translateX(4px);
  transition: transform 0.2s ease;
}

/* Container untuk gambar diagram bundar agar tampil utuh & proporsional */
.card-preview {
  width: 100%;
  padding: 1rem;
  margin-top: 1rem;
  margin-bottom: 1.25rem;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #ffffff; /* Background putih bersih agar menyatu dengan gambar */
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-img {
  width: 100%;
  max-width: 320px; /* Batasi lebar maksimal agar tidak terlalu raksasa */
  height: auto; /* Kunci aspek rasio asli gambar agar tidak melar */
  display: block;
  object-fit: contain; /* Tampilkan 100% gambar tanpa ada yang terpotong */
  transition: transform 0.3s ease;
}

/* Efek zoom halus saat card di-hover */
.portal-card:hover .card-img {
  transform: scale(1.04);
}

.erp-diagram-container {
  width: 100%;
  margin: 1rem 0;
  padding: 0.5rem;
  background: #fafafa;
  border: 1px solid #f0f0f0;
  border-radius: 12px;
}

.erp-svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Container Modul ERP */
.erp-module-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.625rem;
  margin-top: 1rem;
  margin-bottom: 1.25rem;
  padding: 0.875rem;
  background: #f9fafb;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

/* Chip / Card Modul */
.module-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.2s ease;
}

.module-chip:hover {
  transform: translateY(-1px);
}

.module-chip .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Kategori Warna */
/* Green Theme */
.chip-green {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}
.chip-green .dot {
  background: #10b981;
}

/* Purple Theme */
.chip-purple {
  background: #f5f3ff;
  color: #5b21b6;
  border-color: #ddd6fe;
}
.chip-purple .dot {
  background: #8b5cf6;
}

/* Orange Theme */
.chip-orange {
  background: #fffbeb;
  color: #92400e;
  border-color: #fde68a;
}
.chip-orange .dot {
  background: #f59e0b;
}

/* Mobile Responsive */
@media (max-width: 480px) {
  .erp-module-grid {
    grid-template-columns: 1fr;
  }
}