/* =========================================================
   GIV AI - PROFESSIONAL INVESTMENT FORM
   Hanya berlaku pada #interestModal
   ========================================================= */

#interestModal .modal-card{
  width:min(720px, calc(100vw - 32px)) !important;
  max-width:720px !important;
  max-height:90vh !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  box-sizing:border-box !important;

  padding:24px 26px 20px !important;
  border-radius:22px !important;
}

/* Judul modal */
#interestModal h2,
#interestModal .modal-title{
  font-size:22px !important;
  line-height:1.2 !important;
  margin:0 0 14px !important;
  font-weight:800 !important;
}

/* Ringkasan potensi */
#interestModal #interestProjectName{
  font-size:17px !important;
  line-height:1.25 !important;
  font-weight:800 !important;
}

#interestModal #interestProjectMeta{
  font-size:10px !important;
  line-height:1.35 !important;
  margin-top:3px !important;
}

/* Jika ringkasan potensi berada dalam box */
#interestModal #interestProjectName,
#interestModal #interestProjectMeta{
  max-width:100% !important;
  overflow-wrap:anywhere !important;
}

/* Grid */
#interestModal .form-grid{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) !important;
  column-gap:16px !important;
  row-gap:12px !important;

  width:100% !important;
  max-width:100% !important;
  margin-top:16px !important;
  box-sizing:border-box !important;
}

/* Field */
#interestModal .field{
  width:100% !important;
  min-width:0 !important;
  max-width:100% !important;
  box-sizing:border-box !important;
  margin:0 !important;
}

#interestModal .field.full{
  grid-column:1 / -1 !important;
}

/* Label */
#interestModal .field label{
  display:block !important;
  margin:0 0 5px !important;
  padding:0 !important;

  font-size:11px !important;
  line-height:1.2 !important;
  font-weight:700 !important;
}

/* Semua kontrol */
#interestModal .field input,
#interestModal .field select,
#interestModal .field textarea{
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  box-sizing:border-box !important;

  border:1px solid #d8e1dd !important;
  border-radius:11px !important;
  background:#fff !important;

  font-size:13px !important;
  font-weight:500 !important;

  box-shadow:none !important;
  transition:border-color .18s ease, box-shadow .18s ease !important;
}

/* Input & select dibuat lebih compact */
#interestModal .field input,
#interestModal .field select{
  height:40px !important;
  min-height:40px !important;
  padding:0 12px !important;
}

/* Agar dropdown tidak melewati batas */
#interestModal .field select{
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  padding-right:34px !important;
}

/* Textarea */
#interestModal .field textarea{
  min-height:88px !important;
  height:88px !important;
  padding:10px 12px !important;
  line-height:1.45 !important;
  resize:vertical !important;
}

/* Placeholder */
#interestModal input::placeholder,
#interestModal textarea::placeholder{
  font-size:12px !important;
  opacity:.65 !important;
}

/* Focus profesional */
#interestModal .field input:focus,
#interestModal .field select:focus,
#interestModal .field textarea:focus{
  outline:none !important;
  border-color:#7763bd !important;
  box-shadow:0 0 0 3px rgba(119,99,189,.10) !important;
}

/* Nomor input tidak terlalu dominan */
#interestModal input[type="number"]{
  appearance:textfield;
}

#interestModal input[type="number"]::-webkit-inner-spin-button,
#interestModal input[type="number"]::-webkit-outer-spin-button{
  opacity:.45;
}

/* Area tombol */
#interestModal .modal-actions{
  display:flex !important;
  justify-content:flex-end !important;
  align-items:center !important;
  gap:9px !important;

  margin-top:15px !important;
  padding-top:14px !important;

  border-top:1px solid #edf1ef !important;
  background:#fff !important;
}

/* Tombol */
#interestModal .btn-close,
#interestModal .btn-submit{
  height:40px !important;
  min-height:40px !important;
  padding:0 16px !important;

  border-radius:10px !important;
  font-size:12px !important;
  font-weight:700 !important;
}

#interestModal .btn-submit{
  min-width:150px !important;
}

/* Scrollbar lebih halus */
#interestModal .modal-card{
  scrollbar-width:thin;
  scrollbar-color:#bbb #f4f4f4;
}

#interestModal .modal-card::-webkit-scrollbar{
  width:7px;
}

#interestModal .modal-card::-webkit-scrollbar-track{
  background:#f4f4f4;
}

#interestModal .modal-card::-webkit-scrollbar-thumb{
  background:#b7b7b7;
  border-radius:10px;
}

/* Tablet */
@media (max-width:760px){
  #interestModal .modal-card{
    width:calc(100vw - 24px) !important;
    padding:20px !important;
  }
}

/* Mobile */
@media (max-width:600px){
  #interestModal .modal-card{
    width:calc(100vw - 16px) !important;
    max-height:94vh !important;
    padding:18px 16px !important;
    border-radius:18px !important;
  }

  #interestModal .form-grid{
    grid-template-columns:minmax(0,1fr) !important;
    row-gap:11px !important;
  }

  #interestModal .field.full{
    grid-column:auto !important;
  }

  #interestModal .modal-actions{
    position:sticky !important;
    bottom:0 !important;
    margin-left:-2px !important;
    margin-right:-2px !important;
    padding-bottom:2px !important;
  }

  #interestModal .btn-close{
    flex:1 !important;
  }

  #interestModal .btn-submit{
    flex:2 !important;
    min-width:0 !important;
  }
}

/* Lebarkan modal form investasi */
#interestModal .modal-card{
  width:min(820px, calc(100vw - 32px)) !important;
  max-width:820px !important;
}

@media (max-width:900px){
  #interestModal .modal-card{
    width:calc(100vw - 24px) !important;
  }
}

/* FORCE WIDER INVESTMENT MODAL */
#interestModal .modal-card{
  width:96vw !important;
  max-width:960px !important;
  min-width:0 !important;
}

#interestModal .form-grid{
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) !important;
  column-gap:24px !important;
}

@media (max-width:1000px){
  #interestModal .modal-card{
    width:94vw !important;
    max-width:94vw !important;
  }
}

@media (max-width:600px){
  #interestModal .modal-card{
    width:96vw !important;
    max-width:96vw !important;
  }

  #interestModal .form-grid{
    grid-template-columns:1fr !important;
    column-gap:0 !important;
  }
}

/* ==================================================
   FINAL WIDTH FIX - TARGET WRAPPER YANG BENAR
   ================================================== */

#interestModal .interest-card{
  width:min(980px, calc(100vw - 40px)) !important;
  max-width:980px !important;
  min-width:0 !important;
  box-sizing:border-box !important;
  padding:26px 28px 22px !important;
  border-radius:22px !important;
}

/* Dua kolom lebih lega */
#interestModal .form-grid{
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) !important;
  column-gap:28px !important;
  row-gap:14px !important;
}

/* Ringkasan potensi ikut melebar */
#interestModal .project-box{
  width:100% !important;
  max-width:100% !important;
  box-sizing:border-box !important;
}

/* Tablet */
@media (max-width:1024px){
  #interestModal .interest-card{
    width:94vw !important;
    max-width:94vw !important;
  }
}

/* Mobile */
@media (max-width:680px){
  #interestModal .interest-card{
    width:96vw !important;
    max-width:96vw !important;
    padding:18px 16px !important;
  }

  #interestModal .form-grid{
    grid-template-columns:1fr !important;
    column-gap:0 !important;
  }
}

/* ===============================
   INVESTOR DETAIL EXPORT BUTTONS
   =============================== */

.investor-export-actions{
  display:flex !important;
  justify-content:flex-end !important;
  align-items:center !important;
  gap:12px !important;
  margin:0 0 18px !important;
  padding:12px 0 !important;
  width:100% !important;
}

.investor-export-actions a{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:8px !important;

  min-width:138px !important;
  height:42px !important;

  padding:0 16px !important;
  border-radius:12px !important;

  font-size:13px !important;
  font-weight:700 !important;
  line-height:1 !important;
  text-decoration:none !important;

  box-shadow:0 4px 12px rgba(0,0,0,.06) !important;
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    background .18s ease !important;
}

.investor-export-actions a:hover{
  transform:translateY(-1px) !important;
  box-shadow:0 6px 16px rgba(0,0,0,.10) !important;
}

/* Excel */
.investor-export-actions .btn-success{
  background:#ecfdf3 !important;
  color:#157347 !important;
  border:1px solid #b7e4c7 !important;
}

.investor-export-actions .btn-success:hover{
  background:#dff7e8 !important;
}

/* PDF */
.investor-export-actions .btn-danger{
  background:#fff1f1 !important;
  color:#c73737 !important;
  border:1px solid #f3c2c2 !important;
}

.investor-export-actions .btn-danger:hover{
  background:#ffe4e4 !important;
}

/* icon */
.investor-export-actions i{
  font-size:16px !important;
  line-height:1 !important;
}

/* Mobile */
@media(max-width:680px){
  .investor-export-actions{
    justify-content:stretch !important;
    gap:10px !important;
  }

  .investor-export-actions a{
    flex:1 !important;
    min-width:0 !important;
  }
}

/* FIX LABEL EXPORT EXCEL */
.investor-export-actions .btn-success,
.investor-export-actions .btn-success span,
.investor-export-actions .btn-success i{
  color:#157347 !important;
  opacity:1 !important;
  visibility:visible !important;
}

.investor-export-actions .btn-success span{
  display:inline-block !important;
  font-size:13px !important;
  font-weight:700 !important;
  line-height:1 !important;
}

.investor-export-actions .btn-success{
  background:#ecfdf3 !important;
  border:1px solid #9fd8b6 !important;
}
