/* Kompatibilitas perangkat seluler: Android, iPhone/iPad, dan layar kecil. */
html {
    width: 100%;
    min-width: 320px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
}
*, *::before, *::after { box-sizing: border-box; }
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}
img, video, canvas, svg, iframe { max-width: 100%; }
input, select, textarea, button { max-width: 100%; }
a, button, .btn, [role="button"] { touch-action: manipulation; }
.table-responsive {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
@supports (padding: max(0px)) {
    body { padding-bottom: env(safe-area-inset-bottom); }
}
@media (max-width: 991.98px) {
    .container, .container-fluid { max-width: 100%; }
    .row > * { min-width: 0; }
    .modal-dialog { max-width: calc(100vw - 1rem); }
}
@media (max-width: 767.98px) {
    .main-content { width: 100%; min-width: 0; margin-left: 0 !important; }
    .content-area { padding: 12px !important; }
    .container-fluid { padding-left: 12px !important; padding-right: 12px !important; }
    .sidebar {
        max-height: 100vh;
        max-height: 100dvh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
    .card, .card-body, .modal-content { min-width: 0; }
    .card-body { overflow-wrap: anywhere; }
    .btn, button { min-height: 40px; }
    .form-control, .form-select, input, select, textarea {
        font-size: 16px !important; /* cegah auto-zoom input di Safari iPhone */
        max-width: 100%;
    }
    .table { font-size: .875rem; }
    .table th, .table td { vertical-align: middle; }
    .modal-dialog { margin: .5rem auto; }
    .modal-body {
        max-height: calc(100vh - 160px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .d-flex.justify-content-between { flex-wrap: wrap; gap: .5rem; }
    .display-4 { font-size: 2rem; }
    .display-5 { font-size: 1.75rem; }
    .display-6 { font-size: 1.5rem; }
}
@media (max-width: 575.98px) {
    h1 { font-size: 1.55rem; }
    h2 { font-size: 1.35rem; }
    h3 { font-size: 1.2rem; }
    .btn-group { display: flex; flex-wrap: wrap; }
    .btn-group > .btn { flex: 1 1 auto; }
    .modal-dialog { margin: .25rem; }
    .modal-body { max-height: calc(100vh - 130px); }
}
@media (max-height: 500px) and (orientation: landscape) {
    .sidebar { max-height: 100vh; }
    .modal-body { max-height: calc(100vh - 110px); }
}
