.ktm-wrapper {
	position: relative;
	width: 100%;
}

.ktm-wrapper img {
	width: 100%;
	height: auto;
	display: block;
}

.ktm-text {
	position: absolute;
	color: black;
	font-size: 14px;
	font-weight: bold;
}

.ktm-text-back {
	position: absolute;
	color: black;
	font-size: 16px;
	font-weight: bold;
}

.ktm-title {
	position: absolute;
	color: black;
	font-size: 20px;
	font-weight: bold;
}

.ktm-italic {
	position: absolute;
	color: black;
	font-size: 10px;
	font-style: italic;
}

.ktm-caption {
	font-weight: 600;
	margin-top: 8px;
}

.ktm-foto img {
	width: 80px;
	height: 100px;
	object-fit: cover;
	border: 1px solid #555;
}

/* Responsive override untuk layar kecil */
@media (max-width: 576px) {
	.ktm-text {
		font-size: 10px;
	}

	.ktm-text-back {
		font-size: 11px;
	}

	.ktm-title {
		font-size: 13px;
		text-align: center;
		width: 100%;
	}

	.ktm-italic {
		font-size: 8px;
		max-width: 100%;
	}

	.ktm-foto img {
		width: 60px;
		height: 80px;
	}

	svg#barcode {
		transform: scale(0.7);
		transform-origin: top left;
	}

	.ktm-wrapper {
		max-width: 100%;
	}
}

@media (max-width: 768px) {
	.ktm-text {
		font-size: 10px;
	}

	.ktm-text-back {
		font-size: 11px;
	}

	.ktm-title {
		font-size: 13px;
		text-align: center;
		width: 100%;
	}

	.ktm-italic {
		font-size: 8px;
		max-width: 100%;
	}

	.ktm-foto img {
		width: 60px;
		height: 80px;
	}

	svg#barcode {
		transform: scale(0.7);
		transform-origin: top left;
	}

	.ktm-wrapper {
		max-width: 100%;
	}
}

.modal-hapus-kegiatan {
	overflow: hidden;
	border: 0;
	border-radius: 16px;
	box-shadow: 0 18px 45px rgba(20, 24, 40, 0.18);
}

.modal-hapus-kegiatan .modal-header {
	padding: 18px 22px;
	border-bottom: 1px solid #edf0f5;
}

.modal-hapus-kegiatan .modal-title {
	color: #2f3542;
	font-size: 18px;
	font-weight: 700;
}

.modal-hapus-kegiatan .modal-body {
	padding: 22px;
}

.modal-hapus-kegiatan .modal-footer {
	padding: 16px 22px;
	border-top: 1px solid #edf0f5;
}

.peringatan-hapus {
	display: flex;
	align-items: center;
	padding: 16px;
	background: #fff7e8;
	border: 1px solid #ffe1a6;
	border-radius: 12px;
}

.ikon-hapus {
	display: inline-flex;
	flex: 0 0 44px;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin-right: 14px;
	color: #e67e22;
	background: #fff;
	border-radius: 50%;
	font-size: 21px;
}

.detail-hapus-kegiatan {
	overflow: hidden;
	border: 1px solid #e7eaf0;
	border-radius: 12px;
}

.row-detail-hapus {
	display: flex;
	justify-content: space-between;
	gap: 20px;
	padding: 11px 14px;
	border-bottom: 1px solid #edf0f5;
}

.row-detail-hapus:last-child {
	border-bottom: 0;
}

.row-detail-hapus span {
	flex: 0 0 130px;
	color: #7b8190;
}

.row-detail-hapus strong {
	flex: 1;
	color: #303544;
	text-align: right;
	overflow-wrap: anywhere;
}

@media (max-width: 575.98px) {
	.row-detail-hapus {
		display: block;
	}

	.row-detail-hapus span {
		display: block;
		margin-bottom: 3px;
	}

	.row-detail-hapus strong {
		display: block;
		text-align: left;
	}

	.modal-hapus-kegiatan .modal-footer {
		display: block;
	}

	.modal-hapus-kegiatan .modal-footer .btn,
	.modal-hapus-kegiatan .modal-footer form {
		display: block;
		width: 100%;
	}

	.modal-hapus-kegiatan .modal-footer .btn-danger {
		margin-top: 8px;
	}
}

#form-prestasi .form-control {
	min-height: 46px;
	border-radius: 12px;
	border-color: #d9dfe8;
}

#form-prestasi textarea.form-control {
	min-height: 120px;
}

#form-prestasi input[type="file"].form-control {
	min-height: 52px;
	padding-top: 11px;
}

#form-prestasi label {
	margin-bottom: 8px;
}

#form-prestasi .custom-control-label {
	padding-top: 2px;
}

.card-title {
	font-weight: 700;
}

.prestasi-identitas {
	padding: 16px;
	background: #f8f9fb;
	border: 1px solid #e4e8ef;
	border-radius: 14px;
}

.identitas-item {
	display: flex;
	flex-direction: column;
	margin-bottom: 16px;
}

.identitas-label {
	margin-bottom: 3px;
	color: #7b8190;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .4px;
}

.section-title {
	display: flex;
	align-items: center;
	margin-bottom: 20px;
	padding-bottom: 10px;
	color: #24324a;
	font-size: 17px;
	font-weight: 700;
	border-bottom: 1px solid #e7eaf0;
}

.section-number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	margin-right: 10px;
	color: #fff;
	background: #4b49ac;
	border-radius: 50%;
	font-size: 14px;
}

.pilihan-radio-wrapper {
	padding: 14px 16px;
	background: #f8f9fb;
	border: 1px solid #e4e8ef;
	border-radius: 12px;
}

.upload-prestasi-card {
	position: relative;
	min-height: 230px;
	margin-bottom: 20px;
	padding: 22px;
	background: #fbfcfe;
	border: 1px solid #dfe4ec;
	border-radius: 14px;
}

.upload-number {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	margin-bottom: 14px;
	color: #fff;
	background: #4b49ac;
	border-radius: 50%;
	font-weight: 700;
}

.file-selected-name {
	display: block;
	margin-top: 8px;
	overflow-wrap: anywhere;
}

#table-prestasi th {
	vertical-align: middle;
	white-space: nowrap;
}

#table-prestasi td {
	vertical-align: top;
}

#table-prestasi td:nth-child(3) {
	min-width: 260px;
	white-space: normal;
}

#table-prestasi td:nth-child(5),
#table-prestasi td:nth-child(6) {
	min-width: 210px;
	white-space: normal;
}

#table-prestasi td:nth-child(7) {
	min-width: 230px;
}

.berkas-prestasi-item {
	margin-bottom: 12px;
	padding-bottom: 12px;
	border-bottom: 1px dashed #dfe3ea;
}

.berkas-prestasi-item:last-child {
	margin-bottom: 0;
	padding-bottom: 0;
	border-bottom: 0;
}

.btn-xs {
	padding: 4px 8px;
	font-size: 11px;
	line-height: 1.2;
}

#dosen_pembimbing_suggestions {
    top: calc(100% - 18px);
    left: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid #dfe4ec;
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(28, 34, 56, .14);
}

#dosen_pembimbing_suggestions .list-group-item {
    padding: 11px 14px;
    border-right: 0;
    border-left: 0;
    cursor: pointer;
    text-align: left;
    white-space: normal;
}

#dosen_pembimbing_suggestions .list-group-item:first-child {
    border-top: 0;
}

#dosen_pembimbing_suggestions .list-group-item:last-child {
    border-bottom: 0;
}

/*
|--------------------------------------------------------------------------
| Autocomplete anggota prestasi
|--------------------------------------------------------------------------
*/
#anggota_tim_wrapper .position-relative {
    position: relative !important;
}

.anggota-suggestions {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: auto;

    /*
     * Input NIM tetap kecil, tetapi daftar pilihan diperlebar
     * sampai mencakup area NIM, Nama, dan Program Studi.
     */
    width: 600px;
    max-width: calc(100vw - 100px);

    display: none;
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;

    background: #ffffff;
    border: 1px solid #dfe4ec;
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(28, 34, 56, 0.18);

    z-index: 2000;
}

.anggota-suggestions .list-group-item {
    padding: 11px 14px;
    white-space: normal;
    text-align: left;
    border-right: 0;
    border-left: 0;
    cursor: pointer;
}

.anggota-suggestions .list-group-item:first-child {
    border-top: 0;
}

.anggota-suggestions .list-group-item:last-child {
    border-bottom: 0;
}

.anggota-suggestions .list-group-item:hover,
.anggota-suggestions .list-group-item:focus {
    background: #f2f4ff;
}

/*
|--------------------------------------------------------------------------
| Susunan NIM dan Nama di hasil autocomplete
|--------------------------------------------------------------------------
*/
.anggota-suggestion-main {
    display: grid;
    grid-template-columns: 135px minmax(0, 1fr);
    column-gap: 14px;
    align-items: start;
}

.anggota-suggestion-nim {
    color: #4b49ac;
    font-weight: 700;
    white-space: nowrap;
}

.anggota-suggestion-nama {
    color: #303544;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.anggota-suggestion-prodi {
    display: block;
    margin-top: 4px;
    margin-left: 149px;
    color: #7b8190;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.kolom-pembimbing-tim {
    min-width: 280px;
    white-space: normal;
}

.prestasi-anggota-list {
    margin-left: 0;
    max-height: 230px;
    overflow-y: auto;
}

.prestasi-anggota-list li {
    padding-right: 6px;
    line-height: 1.4;
}

/*
 * Agar dropdown tidak terpotong oleh table-responsive
 * pada layar desktop.
 */
@media (min-width: 992px) {
    #anggota_tim_wrapper .table-responsive {
        overflow: visible;
    }
}

/*
|--------------------------------------------------------------------------
| Tampilan autocomplete pada layar kecil
|--------------------------------------------------------------------------
*/
@media (max-width: 767.98px) {
    .anggota-suggestions {
        width: calc(100vw - 55px);
        max-width: calc(100vw - 55px);
    }

    .anggota-suggestion-main {
        grid-template-columns: 1fr;
        row-gap: 3px;
    }

    .anggota-suggestion-nim {
        white-space: normal;
    }

    .anggota-suggestion-prodi {
        margin-left: 0;
    }
}

@media (max-width: 767.98px) {
	.upload-prestasi-card {
		min-height: auto;
	}

	.custom-control-inline {
		display: block;
		margin-bottom: 10px;
	}
}

.beasiswa-card {
	overflow: hidden;
	border: 1px solid #e6e9f0 !important;
}

.beasiswa-card-header {
	padding: 22px 28px;
	background: linear-gradient(
		135deg,
		#f8f8ff 0%,
		#f0f3ff 100%
	);
	border-bottom: 1px solid #e5e8f0;
}

.beasiswa-title {
	color: #252a3a;
	font-size: 21px;
	font-weight: 700;
}

.beasiswa-text {
	color: #545b6b;
	line-height: 1.7;
}

.periode-beasiswa-box,
.beasiswa-panel {
	padding: 18px;
	background: #f8f9fc;
	border: 1px solid #e4e7ee;
	border-radius: 13px;
}

.beasiswa-card-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-top: 20px;
	border-top: 1px solid #e8eaf0;
}

.beasiswa-action-wrapper {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: wrap;
}

/*
|--------------------------------------------------------------------------
| Modal Pengajuan Beasiswa
|--------------------------------------------------------------------------
*/
.modal-pengajuan-beasiswa {
    display: flex;
    flex-direction: column;

    /*
     * Membatasi tinggi modal agar tidak keluar dari layar.
     */
    max-height: calc(100vh - 50px);

    overflow: hidden;
    border: 0;
    border-radius: 16px;
    background: #ffffff;
}

.modal-pengajuan-beasiswa .modal-header {
    flex: 0 0 auto;
    padding: 20px 24px;
    background: #ffffff;
    border-bottom: 1px solid #e7eaf0;
}

.modal-pengajuan-beasiswa .modal-body-pengajuan {
    /*
     * Hanya isi modal yang di-scroll.
     * Footer tetap berada di bawah dan selalu terlihat.
     */
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 24px;
}

.modal-pengajuan-beasiswa .modal-footer-pengajuan {
    position: relative;
    z-index: 3;

    flex: 0 0 auto;
    padding: 16px 24px;

    background: #ffffff;
    border-top: 1px solid #e7eaf0;
    box-shadow: 0 -5px 15px rgba(30, 35, 50, 0.06);
}

.modal-pengajuan-beasiswa .btn-kirim-pengajuan {
    min-width: 170px;
}

.pengajuan-section-title {
    margin-bottom: 13px;
    color: #303545;
    font-weight: 700;
}

.riwayat-beasiswa-list {
    max-height: 230px;
    overflow-y: auto;
    border: 1px solid #e4e7ed;
    border-radius: 12px;
}

.riwayat-beasiswa-item {
    padding: 13px 15px;
    border-bottom: 1px solid #edf0f4;
}

.riwayat-beasiswa-item:last-child {
    border-bottom: 0;
}

.modal-pengajuan-beasiswa textarea.form-control {
    min-height: 170px;
    border-radius: 12px;
}

@media (max-width: 767.98px) {
    .modal-pengajuan-beasiswa {
        max-height: calc(100vh - 20px);
    }

    .modal-pengajuan-beasiswa .modal-header,
    .modal-pengajuan-beasiswa .modal-body-pengajuan,
    .modal-pengajuan-beasiswa .modal-footer-pengajuan {
        padding-right: 16px;
        padding-left: 16px;
    }

    .modal-footer-pengajuan {
        display: block;
    }

    .modal-footer-pengajuan .btn {
        display: block;
        width: 100%;
    }

    .modal-footer-pengajuan .btn-success {
        margin-top: 8px;
    }
}

@media (max-width: 767.98px) {
	.beasiswa-card-header {
		padding: 20px;
	}

	.beasiswa-card-footer {
		display: block;
	}

	.beasiswa-action-wrapper {
		justify-content: flex-start;
		margin-top: 15px;
	}
}