/* ================= BRAND COLOR ================= */
:root {
  --red-background: #ffe3e6;
  --telu-gray: #374151;
}

/* ================= MODAL DETAIL ================= */

.detail-card {
  max-width: 560px;
  width: 100%;
  max-height: 85vh;
  padding: 26px;
  border-radius: 26px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);

  display: flex;
  flex-direction: column;

  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.18);
  animation: modalEnter 0.45s cubic-bezier(.4,0,.2,1);
}

/* ================= HEADER (TELKOM CARD) ================= */

.modal-header {
  padding: 14px 14px; /* dipadatkan */
  border-radius: 20px;

  background: var(--red-background);

  box-shadow: 0 8px 20px rgba(0,0,0,.08);
}

.detail-card h2 {
  font-size: 22px;
  font-weight: 800;
  margin-top: 0;
  margin-bottom: 6px;
  color: var(--red-text);
  letter-spacing: .2px;
}

/* Deskripsi utama */
.detail-desc {
  font-size: 14px;
  line-height: 1.55;
  color: var(--telu-gray);
  margin: 0;
}

/* Catatan kecil */
.detail-desc small {
  display: block;
  padding-top: 6px;

  font-size: 11px;
  line-height: 1.45;
  color: #6b7280;

  border-top: 1px dashed #fecaca;
}

.detail-desc .bullet {
  position: relative;
  padding-left: 16px;
  margin-bottom: 6px;
}

.detail-desc .bullet::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0;
  color: #6b7280;
  font-size: 18px;
  line-height: 1;
}

.detail-desc .note {
  margin-top: 8px;
  text-align: left;
  font-size: 12px;
  color: var(--red-text);
}
/* ================= SCROLL AREA ================= */

.yearly-breakdown {
  position: relative;

  margin-top: 16px;
  margin-bottom: 0px; /* lebih nempel ke total */
  display: grid;
  gap: 16px;

  flex: 1;
  overflow-y: auto;
  padding-right: 6px;
}

/* ===== SCROLL HINT (FADE BAWAH) ===== */
.yearly-breakdown::after {
  content: "";
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;

  height: 32px;

  background: linear-gradient(
    to bottom,
    rgba(248,250,252,0),
    rgba(248,250,252,0.95)
  );

  pointer-events: none;
}

/* ================= YEAR CARD ================= */

.year-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 18px;

  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.year-card h4 {
  font-size: 16px;
  margin-bottom: 10px;
  font-weight: 700;
  color: #111827;
}

/* ================= COST ROW ================= */

.cost-row {
  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 8px 0;
  border-bottom: 1px dashed #e5e7eb;

  font-size: 14px;
  color: #374151;
}

.cost-row span {
  max-width: 70%;
}

.cost-row strong {
  font-weight: 700;
  color: #111827;
}

.cost-row:last-child {
  border-bottom: none;
}

/* ================= YEAR TOTAL ================= */

.year-total {
  margin-top: 0px;
  padding-top: 8px;

  display: flex;
  justify-content: space-between;
  align-items: center;

  font-weight: 800;
  font-size: 15px;
  color: var(--red-text);

  border-top: 2px solid #fee2e2;
}

/* ================= FOOTER ================= */

.detail-footer {
  margin-top: 8px; /* dipersempit */
}

/* ================= GRAND TOTAL ================= */

.grand-total {
  margin-top: 0px;
  padding: 14px 18px;
  border-radius: 16px;

  background: linear-gradient(
    135deg,
    var(--red-background),
    #ffffff
  );

  display: flex;
  justify-content: space-between;
  align-items: center;

  font-size: 16px;
  font-weight: 900;
  color: var(--red-text);
}

/* ================= BACK BUTTON ================= */

.back-btn {
  width: 100%;
  margin-top: 14px;

  background: #ffffff;
  border: 1px solid #e5e7eb;

  padding: 11px 24px;
  border-radius: 999px;

  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: #374151;

  transition:
    background-color 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.15s ease;
}

.back-btn:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  box-shadow: 0 6px 18px rgba(0,0,0,.12);
  transform: translateY(-1px);
}

.back-btn:active {
  transform: translateY(0);
  box-shadow: 0 3px 8px rgba(0,0,0,.15);
}

/* ================= SCROLLBAR ================= */

.yearly-breakdown::-webkit-scrollbar {
  width: 6px;
}

.yearly-breakdown::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 999px;
}

.yearly-breakdown::-webkit-scrollbar-track {
  background: transparent;
}

/* ================= ANIMATION ================= */

@keyframes modalEnter {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Text prodi */
.detail-prodi {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 4px;
}

p{
  margin: 0;
}

/* ================= RESPONSIVE ================= */

@media (max-width: 480px) {
  .detail-card {
    padding: 22px;
    border-radius: 22px;
  }

  .detail-card h2 {
    font-size: 20px;
  }

  .grand-total {
    font-size: 15px;
  }
}
