/*
  Standarisasi font aplikasi.
  File ini sengaja dipasang hanya pada halaman non-editor soal.
  Tujuan: menyamakan font utama, ukuran teks dasar, dan header tabel tanpa mengubah layout/fungsi lain.
*/
:root {
  --app-font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --app-text-size: 0.875rem;
  --app-small-text-size: 0.8125rem;
  --app-heading-size: 1rem;
  --app-table-head-size: 0.75rem;
  --app-line-height: 1.5;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--app-font-family) !important;
  font-size: var(--app-text-size) !important;
  line-height: var(--app-line-height);
}

body,
.card,
.modal,
.dropdown-menu,
.table,
.alert,
.toast,
.tooltip,
.popover,
.navbar,
.offcanvas,
.btn,
.form-control,
.form-select,
.form-label,
.input-group-text,
.page-link,
.nav-link,
.dropdown-item,
.badge,
label,
button,
input,
select,
textarea {
  font-family: var(--app-font-family) !important;
}

p,
li,
td,
label,
button,
input,
select,
textarea,
.btn,
.form-control,
.form-select,
.input-group-text,
.dropdown-item,
.page-link,
.nav-link,
.list-group-item,
.alert,
.badge {
  font-size: var(--app-text-size) !important;
}

small,
.small {
  font-size: var(--app-small-text-size) !important;
}

h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
  font-family: var(--app-font-family) !important;
  font-size: var(--app-heading-size) !important;
  line-height: 1.25;
  font-weight: 600;
}

.table {
  font-size: var(--app-text-size) !important;
}

.table > :not(caption) > * > th,
table thead th {
  font-family: var(--app-font-family) !important;
  font-size: var(--app-table-head-size) !important;
  line-height: 1.25 !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.035em !important;
  vertical-align: middle !important;
}

.table > :not(caption) > * > td,
table tbody td {
  font-family: var(--app-font-family) !important;
  font-size: var(--app-text-size) !important;
  line-height: 1.4 !important;
  vertical-align: middle;
}

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 575.98px) {
  :root {
    --app-text-size: 0.8125rem;
    --app-small-text-size: 0.75rem;
    --app-heading-size: 0.95rem;
    --app-table-head-size: 0.7rem;
  }

  main,
  .container,
  .container-fluid,
  .card,
  .modal-dialog,
  .table-responsive {
    min-width: 0;
  }

  .table > :not(caption) > * > th,
  table thead th,
  .table > :not(caption) > * > td,
  table tbody td {
    white-space: nowrap;
  }
}

/* Utility lokal untuk menurunkan ukuran teks satu tingkat tanpa mengubah layout. */
.app-font-size-down,
.badge.app-font-size-down,
.form-check-label.app-font-size-down {
  font-size: var(--app-small-text-size) !important;
}


.app-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
}

.app-footer .container-fluid {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.app-footer-content {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.app-footer-content p,
.app-footer-content div,
.app-footer-content span,
.app-footer-content small,
.app-footer-content strong,
.app-footer-content a {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* Revisi mobile: gutter khusus untuk area scroll tabel admin yang diminta.
   Desktop tidak berubah karena aturan ini hanya aktif di layar HP/tablet kecil. */
@media (max-width: 767.98px) {
  .admin-mobile-scroll-gutter {
    box-sizing: border-box;
    width: calc(100% - 1.5rem);
    max-width: calc(100% - 1.5rem);
    margin-left: 0.75rem;
    margin-right: 0.75rem;
    scroll-padding-left: 0.75rem;
    scroll-padding-right: 0.75rem;
  }

  .admin-mobile-scroll-gutter > .table {
    margin-bottom: 0;
  }
}


/* Revisi 04: tampilan list tabel admin disamakan dengan /admin/master/subjects.
   Scoped dengan class khusus supaya tidak mengubah tabel/modal lain. */
.admin-list-card-toolbar,
.admin-list-card-toolbar-wrap {
  background-color: #ffffff;
  border-bottom: 1px solid var(--bs-border-color);
}

.admin-list-card-toolbar {
  margin-top: 0 !important;
  margin-right: 0 !important;
  margin-bottom: 0 !important;
  margin-left: 0 !important;
  padding: 0.5rem 1rem !important;
}

.admin-list-card-toolbar-wrap {
  padding: 0.5rem 1rem !important;
}

.admin-list-card-toolbar-row {
  margin-top: 0 !important;
  margin-right: 0 !important;
  margin-bottom: 0 !important;
  margin-left: 0 !important;
}

.admin-list-table thead th {
  text-align: center;
  vertical-align: middle !important;
}

.admin-list-table thead th input[type="checkbox"],
.admin-list-table tbody td input[type="checkbox"] {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.admin-list-table tbody tr.table-empty-row > td {
  padding-top: 0.75rem !important;
  padding-bottom: 0.75rem !important;
}

@media (max-width: 575.98px) {
  .admin-list-card-toolbar,
  .admin-list-card-toolbar-wrap {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }
}

/* Modal action helpers: jelas terlihat di desktop dan HP */
.btn-cancel-modal {
  background-color: #475569 !important;
  border-color: #475569 !important;
  color: #fff !important;
  box-shadow: 0 0.125rem 0.35rem rgba(15, 23, 42, 0.18);
}
.btn-cancel-modal:hover,
.btn-cancel-modal:focus {
  background-color: #334155 !important;
  border-color: #334155 !important;
  color: #fff !important;
}
.btn-cancel-modal:active {
  background-color: #1e293b !important;
  border-color: #1e293b !important;
  color: #fff !important;
}
.modal-template-download {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
@media (min-width: 576px) {
  .modal-template-download {
    width: auto;
  }
}

/* ==========================================================================
   Daftar Detail Ujian & Waktu Ujian (admin/exams, admin/scores):
   ikon list ringan sesuai tampilan aplikasi.
   ========================================================================== */
.admin-row-accordion ul {
  list-style: none;
  padding-left: 1.1rem;
}

.admin-row-accordion ul > li {
  position: relative;
}

.admin-row-accordion ul > li::before {
  content: "✤";
  position: absolute;
  left: -1.1rem;
  top: 0;
  color: #3B3B3B;
  font-size: 0.72em;
  line-height: inherit;
  font-weight: 400;
}

/*
 * Penyelarasan vertikal marker khusus kolom Detail Ujian dan Waktu Ujian.
 * Offset kecil menjaga marker tetap sejajar dengan baris pertama saat teks membungkus,
 * tanpa mengubah ukuran, jarak horizontal, atau layout tabel.
 */
.exam-list-table td.exam-col-detail .admin-row-accordion ul > li::before,
.exam-list-table td.exam-col-time .admin-row-accordion ul > li::before,
#scoresTable.admin-scores-list-table td.score-col-detail .admin-row-accordion ul > li::before,
#scoresTable.admin-scores-list-table td.score-col-time .admin-row-accordion ul > li::before {
  top: 0.18rem;
}

/* ========================================================================== 
   DATA 19 - Mobile admin typography refinement:
   ukuran isi admin di HP tidak lagi diperkecil ke 13px. Gunakan kembali skala
   normal aplikasi (14px body, 13px small, 16px heading, 12px table header).
   Scoped ke halaman admin agar tampilan siswa/login tidak ikut berubah.
   ========================================================================== */
@media (max-width: 575.98px) {
  body.bg-light.app-shell-page {
    --app-text-size: 0.875rem;
    --app-small-text-size: 0.8125rem;
    --app-heading-size: 1rem;
    --app-table-head-size: 0.75rem;
  }
}
