/* ===============================================
   PUBLIKASI KUALITAS DATA - CSS STYLES
   =============================================== */

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  min-height: 100vh;
  overflow-y: auto !important;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  position: relative;
}

/* Background Pattern */
body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(
      circle at 25% 25%,
      rgba(255, 255, 255, 0.1) 2px,
      transparent 2px
    ),
    radial-gradient(
      circle at 75% 75%,
      rgba(255, 255, 255, 0.1) 2px,
      transparent 2px
    );
  background-size: 50px 50px;
  background-position: 0 0, 25px 25px;
  pointer-events: none;
  z-index: 1;
}

/* Container Utama */
.module-home-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
  padding-bottom: 60px;
}

/* ===============================================
   HEADER SECTION
   =============================================== */
.module-home-header {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding: 15px 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.logo-container {
  margin-bottom: 10px;
}

.logo-container img {
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
  transition: transform 0.3s ease;
  max-width: 150px !important;
  height: auto;
}

.logo-container img:hover {
  transform: scale(1.05);
}

.module-home-header-text {
  font-size: 1.5rem;
  font-weight: 800;
  color: #2c3e50;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
  margin: 0;
  position: relative;
  background: linear-gradient(
    45deg,
    #2c3e50 0%,
    #3498db 25%,
    #667eea 50%,
    #764ba2 75%,
    #2c3e50 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===============================================
   MAIN CONTENT SECTION
   =============================================== */
.module-home-content {
  flex: 1;
  padding: 15px 8px 0px 8px;
  display: flex;
  align-items: stretch;
  min-height: calc(100vh - 120px);
  height: auto;
  overflow: visible;
}

.module-home-content .container-fluid {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
}

.module-home-content .row {
  margin: 0;
  width: 100%;
}

.module-home-content .col-12,
.module-home-content .col-lg-4,
.module-home-content .col-lg-8,
.module-home-content .col-xl-4,
.module-home-content .col-xl-8 {
  display: flex;
  flex-direction: column;
  padding: 0 8px;
  margin-bottom: 0;
  min-height: 0;
}

/* ===============================================
   GLASS CARD EFFECTS
   =============================================== */
.glass-card {
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  overflow: hidden;
}

.glass-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  background: rgba(255, 255, 255, 0.99) !important;
}

/* ===============================================
   STATISTICS CARDS
   =============================================== */
.stats-card {
  background: rgba(255, 255, 255, 0.98) !important;
  border-radius: 15px;
  padding: 20px 12px;
  text-align: center;
  color: #2c3e50 !important;
  transition: all 0.3s ease;
  border: 2px solid rgba(0, 0, 0, 0.1) !important;
  backdrop-filter: blur(10px);
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 140px;
  max-height: 160px;
  flex: 1;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.stats-card:hover {
  transform: scale(1.02);
  background: rgba(255, 255, 255, 1) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  border-color: rgba(0, 0, 0, 0.2) !important;
}

.stats-icon {
  font-size: 2.2rem;
  margin-bottom: 8px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  color: #2c3e50 !important;
}

.stats-title {
  font-size: 0.9rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: #2c3e50 !important;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stats-number {
  font-size: 2.8rem;
  font-weight: 800;
  color: #2c3e50 !important;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
  margin-bottom: 5px;
  text-decoration: none;
  border: none;
}

.stats-label {
  font-size: 0.8rem;
  color: #495057 !important;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
  font-weight: 600;
}

/* ===============================================
   FILTER SECTION
   =============================================== */
.filter-section {
  background: rgba(255, 255, 255, 0.98) !important;
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 25px;
  border: 2px solid rgba(0, 0, 0, 0.1) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.filter-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #2c3e50 !important;
  margin-bottom: 15px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.form-label {
  font-weight: 800;
  color: #2c3e50 !important;
  margin-bottom: 8px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
  font-size: 0.95rem;
}

.form-select,
.form-control {
  background: rgba(255, 255, 255, 0.98) !important;
  border: 2px solid rgba(0, 0, 0, 0.2) !important;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.9rem;
  color: #2c3e50 !important;
  transition: all 0.3s ease;
  font-weight: 600;
  width: 100%;
  max-width: 100%;
}

.form-select:focus,
.form-control:focus {
  background: rgba(255, 255, 255, 1) !important;
  border-color: #667eea !important;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
  outline: none;
}

.btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 10px;
  padding: 12px 25px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  color: white !important;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* ===============================================
   CHARTS SECTION
   =============================================== */
.chart-container {
  background: rgba(255, 255, 255, 0.98) !important;
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 25px;
  border: 2px solid rgba(0, 0, 0, 0.1) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.chart-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #2c3e50 !important;
  margin-bottom: 20px;
  text-align: center;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.chart-wrapper {
  position: relative;
  height: 300px;
  margin-bottom: 15px;
}

/* ===============================================
   DETAIL DATA TABLE
   =============================================== */
.detail-data-section {
  background: rgba(255, 255, 255, 0.98) !important;
  border-radius: 15px;
  padding: 25px;
  border: 2px solid rgba(0, 0, 0, 0.1) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.detail-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #2c3e50 !important;
  margin-bottom: 20px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.table-responsive {
  border-radius: 10px;
  background: rgba(255, 255, 255, 1) !important;
  border: 2px solid rgba(0, 0, 0, 0.1) !important;
  overflow-x: auto;
}

.table {
  color: #2c3e50 !important;
  margin: 0;
  background: transparent !important;
}

.table th {
  background: rgba(102, 126, 234, 0.1) !important;
  border: none;
  color: #2c3e50 !important;
  font-weight: 800;
  padding: 15px 10px;
  font-size: 0.9rem;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 10;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.table td {
  border: none;
  padding: 12px 10px;
  font-size: 0.85rem;
  text-align: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  color: #2c3e50 !important;
  font-weight: 600;
}

/* Tidy jurusan cell: truncate long department names to keep table neat */
.nama-jurusan-cell {
  display: inline-block;
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  text-align: left;
  font-size: 0.85rem;
  font-weight: 700;
  color: #495057 !important;
}

.table tbody tr:hover {
  background: rgba(102, 126, 234, 0.05) !important;
}

.table tbody tr:nth-child(even) {
  background: rgba(248, 249, 250, 0.8) !important;
}

/* ===============================================
   BADGES
   =============================================== */
.badge {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 2px solid;
}

.badge-success {
  background: #28a745 !important;
  color: white !important;
  border-color: #1e7e34 !important;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.badge-warning {
  background: #ffc107 !important;
  color: #212529 !important;
  border-color: #d39e00 !important;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.badge-danger {
  background: #dc3545 !important;
  color: white !important;
  border-color: #bd2130 !important;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.badge-secondary {
  background: #6c757d !important;
  color: white !important;
  border-color: #545b62 !important;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* ===============================================
   FILTER CARD SPECIFIC STYLES
   =============================================== */
.filter-card {
  background: rgba(255, 255, 255, 0.98) !important;
  border-radius: 15px;
  border: 2px solid rgba(0, 0, 0, 0.1) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  margin-bottom: 25px;
}

.filter-card .card-header {
  background: rgba(248, 249, 250, 0.98) !important;
  border-bottom: 2px solid rgba(0, 0, 0, 0.1) !important;
  padding: 15px 20px;
  border-radius: 15px 15px 0 0;
}

.filter-card .card-body {
  padding: 20px;
}

.filter-card .form-group {
  margin-bottom: 15px;
}

.filter-card .form-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #2c3e50 !important;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-card .form-select {
  font-size: 0.85rem;
  padding: 8px 10px;
  border-radius: 8px;
  height: auto;
  min-height: 38px;
}

.filter-card .btn {
  font-size: 0.8rem;
  padding: 8px 15px;
  font-weight: 700;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-card .d-grid {
  gap: 8px !important;
}

/* ===============================================
   PERFORMANCE CARD STYLES
   =============================================== */
.performance-card {
  background: rgba(255, 255, 255, 0.98) !important;
  border-radius: 15px;
  border: 2px solid rgba(0, 0, 0, 0.1) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  overflow-x: auto;
  /* allow vertical scrolling when there are many classes */
  max-height: 420px;
  overflow-y: auto;
}

.performance-card .card-header {
  background: rgba(248, 249, 250, 0.98) !important;
  border-bottom: 2px solid rgba(0, 0, 0, 0.1) !important;
  padding: 15px 20px;
  border-radius: 15px 15px 0 0;
}

.performance-card .card-body {
  padding: 20px;
}

.performance-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #2c3e50 !important;
  margin: 0;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.performance-card .table-responsive {
  border-radius: 10px;
  background: rgba(255, 255, 255, 1) !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  overflow-x: auto;
}

.performance-card .table {
  color: #2c3e50 !important;
  margin: 0;
  background: transparent !important;
  font-size: 0.8rem;
}

.performance-card .table th {
  background: rgba(102, 126, 234, 0.1) !important;
  border: none;
  color: #2c3e50 !important;
  font-weight: 700;
  padding: 8px 6px;
  font-size: 0.75rem;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 10;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.performance-card .table td {
  border: none;
  padding: 8px 6px;
  font-size: 0.75rem;
  text-align: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  color: #2c3e50 !important;
  font-weight: 500;
}

.performance-card .table tbody tr:hover {
  background: rgba(102, 126, 234, 0.05) !important;
}

.performance-card .table tbody tr:nth-child(even) {
  background: rgba(248, 249, 250, 0.5) !important;
}

/* ===============================================
   INFO CARD STYLES
   =============================================== */
.info-card {
  background: rgba(255, 255, 255, 0.98) !important;
  border-radius: 15px;
  border: 2px solid rgba(0, 0, 0, 0.1) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  margin-bottom: 25px;
}

.info-card .card-header {
  background: rgba(248, 249, 250, 0.98) !important;
  border-bottom: 2px solid rgba(0, 0, 0, 0.1) !important;
  padding: 15px 20px;
  border-radius: 15px 15px 0 0;
}

.info-card .card-body {
  padding: 20px;
}

.info-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #2c3e50 !important;
  margin: 0;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* ===============================================
   RESPONSIVE DESIGN
   =============================================== */
@media (max-width: 991.98px) {
  .module-home-content .col-12.col-lg-8.col-xl-8,
  .module-home-content .col-12.col-lg-4.col-xl-4 {
    margin-bottom: 20px;
  }

  .stats-card {
    min-height: 120px;
    max-height: 140px;
    padding: 15px 10px;
  }

  .stats-number {
    font-size: 2.2rem;
  }

  .stats-icon {
    font-size: 1.8rem;
  }

  /* Filter card responsivitas untuk tablet */
  .filter-card .card-body {
    padding: 15px;
  }

  .filter-card .form-label {
    font-size: 0.8rem;
  }

  .filter-card .form-select {
    font-size: 0.8rem;
    padding: 6px 8px;
  }
}

@media (max-width: 767.98px) {
  .module-home-header-text {
    font-size: 1.2rem;
  }

  .logo-container img {
    max-width: 120px !important;
  }

  .stats-card {
    min-height: 100px;
    max-height: 120px;
    padding: 12px 8px;
  }

  .stats-number {
    font-size: 1.8rem;
  }

  .stats-title {
    font-size: 0.8rem;
  }

  .stats-icon {
    font-size: 1.5rem;
  }

  .chart-wrapper {
    height: 250px;
  }

  .filter-section,
  .chart-container,
  .detail-data-section {
    padding: 15px;
    margin-bottom: 15px;
  }

  /* Filter card mobile optimizations */
  .filter-card {
    margin-bottom: 15px;
  }

  .filter-card .card-header {
    padding: 12px 15px;
  }

  .filter-card .card-body {
    padding: 12px 15px;
  }

  .filter-card .form-group {
    margin-bottom: 12px;
  }

  .filter-card .form-label {
    font-size: 0.75rem;
    margin-bottom: 4px;
  }

  .filter-card .form-select {
    font-size: 0.75rem;
    padding: 6px 8px;
    min-height: 32px;
    border-radius: 6px;
  }

  .filter-card .btn {
    font-size: 0.75rem;
    padding: 6px 12px;
    border-radius: 6px;
  }

  .filter-card .d-grid {
    gap: 6px !important;
  }

  /* Pastikan form tidak overflow pada mobile */
  .filter-card .form-select,
  .filter-card .form-control {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Performance card responsive */
  .performance-card .card-header {
    padding: 10px 12px;
  }

  .performance-card .card-body {
    padding: 10px 12px;
  }

  .performance-card .table th {
    font-size: 0.65rem;
    padding: 6px 4px;
  }

  .performance-card .table td {
    font-size: 0.65rem;
    padding: 6px 4px;
  }

  .performance-card .btn-sm {
    padding: 2px 6px;
    font-size: 0.65rem;
  }

  .performance-card .badge {
    font-size: 0.6rem;
    padding: 2px 6px;
  }
}

/* ===============================================
   SCROLLBAR STYLING
   =============================================== */
.table-responsive::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: rgba(102, 126, 234, 0.3);
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
  background: rgba(102, 126, 234, 0.5);
}

/* ===============================================
   FOCUS STATES
   =============================================== */
.glass-card:focus-within {
  outline: 3px solid rgba(102, 126, 234, 0.5);
  outline-offset: 2px;
}

.btn:focus {
  outline: 3px solid rgba(102, 126, 234, 0.5);
  outline-offset: 2px;
}

/* ===============================================
   LOADING STATES
   =============================================== */
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.loading {
  opacity: 0.7;
  pointer-events: none;
}

/* ===============================================
   UTILITY CLASSES
   =============================================== */
.text-shadow {
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.bg-gradient {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.border-gradient {
  border: 2px solid;
  border-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%) 1;
}
