* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: linear-gradient(to bottom, #e8f5e9 0%, #f5f5f5 100%);
    min-height: 100vh;
    height: 100vh;
    padding: 0;
    color: #333;
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
}

.container {
    max-width: 100%;
    width: 100%;
    margin: 0;
    background: white;
    border-radius: 0;
    box-shadow: none;
    padding: 12px 15px;
    border: none;
    border-top: 4px solid rgb(95, 184, 92);
    min-height: 100vh;
    height: auto;
    display: block;
    overflow-y: auto;
    overflow-x: hidden;
}

.header {
    text-align: left;
    margin-bottom: 12px;
    padding: 10px 15px;
    border-bottom: 2px solid rgb(95, 184, 92);
    background: linear-gradient(to bottom, #f0f9f0 0%, #ffffff 100%);
    border-radius: 0;
    margin: -12px -15px 12px -15px;
    border-top: none;
    flex-shrink: 0;
}

.header h1 {
    color: #2d5f2d;
    font-size: 16px;
    margin-bottom: 3px;
    font-weight: bold;
    text-transform: uppercase;
    line-height: 1.3;
}

.header p {
    color: #2d5f2d;
    font-size: 12px;
    margin: 0;
    font-weight: bold;
    line-height: 1.2;
}

#pageTitle {
    font-size: 16px;
    font-weight: bold;
    color: #2d5f2d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 15px;
    background: linear-gradient(to bottom, #f0f9f0 0%, #ffffff 100%);
    border-left: 4px solid rgb(95, 184, 92);
    margin-bottom: 20px;
}

.form-section {
    margin-bottom: 15px;
    padding: 15px 18px;
    background: linear-gradient(to bottom, #fafafa 0%, #ffffff 100%);
    border-radius: 4px;
    border: 1px solid #ddd;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: visible;
}

/* Section data saksi harus bisa scroll dengan baik */
#section-data-saksi {
    overflow: visible;
    max-height: none;
}

/* Container saksi - pastikan bisa scroll dengan baik */
#containerSaksi {
    overflow: visible;
    max-height: none;
    position: relative;
}

/* Section pilih pihak tidak boleh overflow hidden untuk tooltip */
#section-pilih-pihak {
    overflow: visible !important;
}

/* Styling khusus untuk section Pilih Pihak */
#section-pilih-pihak {
    padding: 25px 20px;
    margin-bottom: 20px;
    background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: visible;
    position: relative;
}

#section-pilih-pihak h2 {
    font-size: 18px;
    font-weight: 800;
    color: #2d5f2d;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 25px;
    padding: 12px 15px;
    background: linear-gradient(to bottom, rgba(95, 184, 92, 0.1) 0%, transparent 100%);
    border-bottom: 3px solid rgb(95, 184, 92);
}

.form-section h2 {
    color: #2d5f2d;
    margin-bottom: 12px;
    font-size: 15px;
    font-weight: bold;
    padding-bottom: 6px;
    border-bottom: 2px solid rgb(95, 184, 92);
    background: linear-gradient(to bottom, rgba(95, 184, 92, 0.05) 0%, transparent 100%);
    padding: 8px 12px;
    margin: -12px -15px 12px -15px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #2d5f2d;
    font-weight: 600;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s;
    font-family: inherit;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(95, 184, 92, 0.2);
    min-height: 44px;
}

/* Prevent zoom on input focus for iOS - font size must be at least 16px */
@media screen and (max-width: 768px) {
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px;
    }
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgb(95, 184, 92);
    box-shadow: 0 0 0 2px rgba(95, 184, 92, 0.2);
}

/* Loading state untuk select elements */
.form-group select.loading {
    background-color: #f5f5f5;
    color: #999;
    cursor: wait;
    opacity: 0.7;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='%23999' d='M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z' opacity='.25'/%3E%3Cpath fill='%23999' d='M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z'%3E%3CanimateTransform attributeName='transform' dur='0.75s' repeatCount='indefinite' type='rotate' values='0 12 12;360 12 12'/%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 40px;
}

.form-group select.loading option {
    color: #999;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Custom Date Picker */
.custom-date-picker {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr;
    gap: 8px;
    width: 100%;
}

.custom-date-picker select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s;
    font-family: inherit;
    background-color: white;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 38px;
    min-height: 44px;
}

.custom-date-picker select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Hanya tampilkan border merah jika sudah di-submit atau di-touch */
.custom-date-picker select:invalid:not(:focus) {
    border-color: #e0e0e0;
}

/* Tampilkan border merah hanya setelah form di-submit atau user sudah berinteraksi */
.form-submitted .custom-date-picker select:invalid,
.custom-date-picker select.touched:invalid {
    border-color: #dc3545;
}

/* Jika date picker sudah valid (hidden input terisi), jangan tampilkan border merah */
.custom-date-picker.date-valid select {
    border-color: #e0e0e0;
}

.custom-date-picker.date-valid select:focus {
    border-color: #667eea;
}

.custom-date-picker .date-day {
    grid-column: 1;
}

.custom-date-picker .date-month {
    grid-column: 2;
}

.custom-date-picker .date-year {
    grid-column: 3;
}

.custom-date-picker .date-hidden {
    display: none;
}

/* Scrollable select options */
.custom-date-picker select {
    max-height: 200px;
}

.custom-date-picker select option {
    padding: 8px;
    cursor: pointer;
}

/* Better scrolling for select */
@media (max-width: 768px) {
    .custom-date-picker {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .custom-date-picker .date-day,
    .custom-date-picker .date-month,
    .custom-date-picker .date-year {
        grid-column: 1;
        min-height: 48px;
        font-size: 16px;
    }
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

/* Touch-friendly spacing */
@media (hover: none) and (pointer: coarse) {
    .form-row {
        gap: 20px;
        margin-bottom: 20px;
    }
}

.form-section-address {
    background: white;
    padding: 15px;
    border-radius: 6px;
    margin-top: 15px;
    margin-bottom: 15px;
}

.form-section-address h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 15px;
    font-weight: bold;
}

.saksi-item {
    background: linear-gradient(to bottom, #ffffff 0%, #fafafa 100%);
    border: 1px solid #ddd;
    border-left: 4px solid rgb(95, 184, 92);
    border-radius: 4px;
    padding: 18px 20px;
    margin-bottom: 18px;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.saksi-item:hover {
    border-color: rgb(95, 184, 92);
    box-shadow: 0 2px 6px rgba(95, 184, 92, 0.15);
    transform: translateY(-1px);
}

.saksi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgb(95, 184, 92);
    background: linear-gradient(to bottom, rgba(95, 184, 92, 0.08) 0%, rgba(95, 184, 92, 0.03) 100%);
    padding: 12px 15px;
    margin: -18px -20px 15px -20px;
    border-radius: 4px 4px 0 0;
}

.saksi-header h3 {
    color: #2d5f2d;
    font-size: 15px;
    font-weight: bold;
    margin: 0;
}

.btn-add,
.btn-submit,
.btn-reset,
.btn-view,
.btn-back,
.btn-view-small {
    padding: 8px 16px;
    border: none;
    border-radius: 0;
    font-size: 13px;
    font-weight: normal;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(95, 184, 92, 0.3);
    user-select: none;
    -webkit-user-select: none;
    min-height: 40px;
    min-width: 44px;
}

.btn-add {
    background: rgb(95, 184, 92);
    color: white;
    border: 1px solid rgba(95, 184, 92, 0.8);
}

.btn-add:hover {
    background: rgba(95, 184, 92, 0.9);
    border-color: rgba(95, 184, 92, 0.7);
}

.btn-submit {
    background: rgb(95, 184, 92);
    color: white;
    border: 1px solid rgba(95, 184, 92, 0.8);
}

.btn-submit:hover {
    background: rgba(95, 184, 92, 0.9);
    border-color: rgba(95, 184, 92, 0.7);
    box-shadow: 0 2px 4px rgba(95, 184, 92, 0.3);
}

.btn-reset {
    background: #6c757d;
    color: white;
}

.btn-reset:hover {
    background: #5a6268;
}

.btn-view {
    background: rgb(95, 184, 92);
    color: white;
    border: 1px solid rgba(95, 184, 92, 0.8);
}

.btn-view:hover {
    background: rgba(95, 184, 92, 0.9);
    border-color: rgba(95, 184, 92, 0.7);
    box-shadow: 0 2px 4px rgba(95, 184, 92, 0.3);
}

.btn-remove {
    background: #dc3545;
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(220, 53, 69, 0.3);
    user-select: none;
    -webkit-user-select: none;
    min-height: 40px;
    min-width: 44px;
}

.btn-remove:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.btn-view-small {
    background: rgb(95, 184, 92);
    color: white;
    padding: 6px 12px;
    font-size: 12px;
    border: 1px solid rgba(95, 184, 92, 0.8);
}

.btn-view-small:hover {
    background: rgba(95, 184, 92, 0.9);
    border-color: rgba(95, 184, 92, 0.7);
    box-shadow: 0 2px 4px rgba(95, 184, 92, 0.3);
}

.btn-back {
    background: #6c757d;
    color: white;
    padding: 8px 16px;
    font-size: 14px;
}

.btn-back:hover {
    background: #5a6268;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 2px solid #f0f0f0;
    flex-shrink: 0;
}

.footer-actions {
    text-align: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 2px solid #f0f0f0;
    flex-shrink: 0;
}

.actions-bar {
    margin-bottom: 20px;
}

.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background: linear-gradient(to bottom, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 1px solid #28a745;
    border-left: 4px solid #28a745;
    box-shadow: 0 1px 3px rgba(40, 167, 69, 0.2);
}

.table-container {
    overflow-x: auto;
    margin-top: 20px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border: 1px solid #ddd;
    margin-top: 10px;
    border-radius: 0;
}

.data-table thead {
    background: rgb(95, 184, 92);
    color: white;
}

.data-table th {
    padding: 10px 12px;
    text-align: left;
    border: 1px solid rgba(95, 184, 92, 0.8);
    font-weight: bold;
    font-size: 13px;
}

.data-table td {
    padding: 8px 12px;
    text-align: left;
    border: 1px solid #ddd;
    font-size: 13px;
}

.data-table tbody tr:nth-child(even) {
    background: #f9f9f9;
}

.data-table tbody tr:hover {
    background: #f0f9f0;
}

.data-table tbody tr:nth-child(even):hover {
    background: #e8f5e8;
}

.data-table tbody tr:last-child td {
    border-bottom: 1px solid #ddd;
}

.text-center {
    text-align: center;
}

.detail-view {
    margin-top: 20px;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.detail-header h2 {
    color: #2d5f2d;
    font-weight: bold;
    border-bottom: 2px solid rgb(95, 184, 92);
    padding-bottom: 10px;
}

.form-info {
    background: linear-gradient(to bottom, #fafafa 0%, #ffffff 100%);
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-left: 4px solid rgb(95, 184, 92);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.form-info p {
    margin-bottom: 8px;
    font-size: 14px;
}

.form-info p:last-child {
    margin-bottom: 0;
}

.saksi-list {
    margin-top: 20px;
}

.saksi-detail {
    background: linear-gradient(to bottom, #fafafa 0%, #ffffff 100%);
    border: 1px solid #ddd;
    border-left: 4px solid rgb(95, 184, 92);
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.saksi-detail h3 {
    color: #2d5f2d;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgb(95, 184, 92);
    font-weight: bold;
    background: linear-gradient(to bottom, rgba(95, 184, 92, 0.08) 0%, rgba(95, 184, 92, 0.03) 100%);
    padding: 15px;
    margin: -20px -20px 20px -20px;
    border-radius: 4px 4px 0 0;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.detail-item {
    margin-bottom: 15px;
}

.detail-item.full-width {
    grid-column: 1 / -1;
}

.detail-item label {
    display: block;
    font-weight: 600;
    color: #2d5f2d;
    margin-bottom: 5px;
    font-size: 13px;
}

.detail-item p {
    color: #333;
    font-size: 14px;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .detail-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .data-table {
        font-size: 12px;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px;
    }
}

/* Validasi Nomor Perkara */
.input-with-validation {
    position: relative;
    display: flex;
    gap: 10px;
    align-items: center;
}

.input-with-validation input {
    flex: 1;
}

/* Nomor Perkara - Input terpisah (nomor + Pdt.G/P + tahun) - satu baris horizontal */
.nomor-perkara-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: nowrap;
}

.nomor-perkara-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    flex-wrap: nowrap;
    min-width: 0;
}

.nomor-perkara-inputs input#nomor_perkara {
    width: 80px !important;
    min-width: 60px;
    flex-shrink: 0;
}

.nomor-perkara-inputs select {
    min-width: 100px;
    width: auto !important;
    flex-shrink: 0;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.nomor-perkara-separator {
    color: #666;
    font-weight: 600;
    flex-shrink: 0;
}

.nomor-perkara-suffix {
    color: #999;
    font-size: 13px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Hanya stack vertikal di layar sangat sempit (HP kecil) */
@media (max-width: 380px) {
    .nomor-perkara-row {
        flex-direction: column;
        align-items: stretch;
        flex-wrap: wrap;
    }
    
    .nomor-perkara-inputs {
        flex-wrap: wrap;
        justify-content: flex-start;
    }
}

.btn-validasi {
    padding: 10px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    background: #f8f9fa;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    font-weight: 500;
    min-width: 100px;
    min-height: 44px;
    text-align: center;
    display: flex;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(95, 184, 92, 0.3);
    user-select: none;
    -webkit-user-select: none;
    align-items: center;
    justify-content: center;
    gap: 5px;
    white-space: nowrap;
}

.btn-validasi:hover {
    background: #e9ecef;
    border-color: #666;
}

.btn-validasi.loading {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
    cursor: wait;
}

.btn-validasi.valid {
    background: #d4edda;
    border-color: #5cb85c;
    color: #155724;
}

.btn-validasi.invalid {
    background: #f8d7da;
    border-color: #d9534f;
    color: #721c24;
}

.btn-validasi.error {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.pesan-validasi {
    margin-top: 5px;
    font-size: 12px;
    min-height: 20px;
}

.pesan-validasi.validasi-success {
    color: #155724;
}

.pesan-validasi.validasi-error {
    color: #721c24;
}

.validasi-loading,
.validasi-success,
.validasi-error {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: 500;
}

.validasi-loading {
    color: #856404;
}

.validasi-success {
    color: #155724;
    background: #d4edda;
}

.validasi-error {
    color: #721c24;
    background: #f8d7da;
}

.validasi-info {
    color: #004085;
    background: #cce5ff;
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: 500;
    margin-top: 5px;
}

.validasi-detail {
    margin-top: 12px;
    padding: 12px;
    background-color: #f0f9ff;
    border-left: 3px solid #28a745;
    border-radius: 4px;
    font-size: 12px;
    text-align: left;
    line-height: 1.6;
}

.validasi-detail > strong:first-child {
    color: #28a745;
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
}

.validasi-detail > div {
    margin-bottom: 6px;
    padding: 4px 0;
    border-bottom: 1px solid #e0e0e0;
}

.validasi-detail > div:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.validasi-detail > div strong {
    color: #555;
    font-weight: 600;
    margin-right: 5px;
    display: inline;
    font-size: 12px;
}

.validasi-detail > div span {
    color: #28a745;
    font-weight: 600;
}

/* Touch Screen Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Target touch devices */
    
    /* Increase touch target sizes - minimum 44x44px */
    button,
    .btn-add,
    .btn-submit,
    .btn-reset,
    .btn-view,
    .btn-back,
    .btn-view-small,
    .btn-validasi,
    .btn-remove,
    .btn-cancel,
    .btn-confirm,
    .modal-notification-close,
    .modal-close,
    input[type="submit"],
    input[type="button"],
    input[type="reset"],
    a.btn-view,
    a.btn-back {
        min-height: 48px;
        min-width: 48px;
        padding: 14px 20px;
        font-size: 16px;
        line-height: 1.5;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(95, 184, 92, 0.3);
    }
    
    /* Larger form inputs for touch */
    .form-group input,
    .form-group select,
    .form-group textarea {
        min-height: 48px;
        padding: 14px 16px;
        font-size: 16px;
        line-height: 1.5;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(95, 184, 92, 0.2);
    }
    
    /* Custom date picker selects */
    .custom-date-picker select {
        min-height: 48px;
        padding: 14px 40px 14px 16px;
        font-size: 16px;
    }
    
    /* Larger labels */
    .form-group label {
        font-size: 15px;
        margin-bottom: 8px;
    }
    
    /* Increase spacing between form elements */
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-row {
        gap: 20px;
        margin-bottom: 20px;
    }
    
    /* Larger card touch targets */
    .pihak-card {
        min-height: 120px;
        padding: 25px 20px;
        cursor: pointer;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(95, 184, 92, 0.2);
    }
    
    .pihak-card:active {
        transform: scale(0.98);
        background-color: #f0f0f0;
    }
    
    /* Larger saksi item spacing */
    .saksi-item {
        padding: 25px;
        margin-bottom: 25px;
    }
    
    /* Larger modal buttons */
    .modal-preview-footer button,
    .modal-notification-close {
        min-height: 50px;
        padding: 15px 25px;
        font-size: 16px;
    }
    
    /* Increase container padding for touch */
    .container {
        padding: 25px;
    }
    
    .form-section {
        padding: 25px;
        margin-bottom: 30px;
    }
    
    /* Larger icons and text in cards */
    .pihak-card-icon {
        font-size: 72px;
        margin-bottom: 20px;
    }
    
    .pihak-card-title {
        font-size: 22px;
        margin-bottom: 12px;
    }
    
    .pihak-card-desc {
        font-size: 15px;
    }
    
    /* Better spacing for action buttons */
    .form-actions {
        gap: 15px;
        padding: 20px 0;
    }
    
    .section-header {
        margin-bottom: 25px;
    }
    
    /* Larger remove buttons */
    .btn-remove {
        min-height: 44px;
        padding: 12px 18px;
        font-size: 14px;
    }
    
    /* Increase input-with-validation button size */
    .input-with-validation button {
        min-width: 100px;
        min-height: 48px;
        padding: 14px 20px;
    }
    
    /* Better touch feedback */
    button:active,
    .btn-add:active,
    .btn-submit:active,
    .btn-reset:active,
    .btn-view:active,
    .btn-back:active,
    .btn-validasi:active,
    .btn-remove:active {
        transform: scale(0.97);
        opacity: 0.9;
    }
    
    /* Prevent text selection on buttons */
    button,
    .btn-add,
    .btn-submit,
    .btn-reset,
    .btn-view,
    .btn-back,
    .btn-validasi,
    .btn-remove {
        user-select: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
    }
    
    /* Larger table cells for touch */
    table td,
    table th {
        padding: 12px 15px;
        font-size: 15px;
    }
    
    /* Larger search input */
    .search-container input {
        min-height: 48px;
        padding: 14px 16px;
        font-size: 16px;
    }
    
    /* Larger detail view elements */
    .detail-item {
        margin-bottom: 18px;
        padding: 12px 0;
    }
    
    .detail-item label {
        font-size: 15px;
        margin-bottom: 8px;
    }
    
    .detail-item p {
        font-size: 15px;
        line-height: 1.6;
    }
}

/* Additional touch optimizations for all devices */
@media (max-width: 1024px) {
    /* Increase sizes for tablets and smaller screens */
    button,
    .btn-add,
    .btn-submit,
    .btn-reset,
    .btn-view,
    .btn-back,
    .btn-view-small,
    .btn-validasi {
        min-height: 44px;
        padding: 12px 18px;
        font-size: 15px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        min-height: 44px;
        padding: 12px 14px;
        font-size: 15px;
    }
    
    .custom-date-picker select {
        min-height: 44px;
        padding: 12px 38px 12px 14px;
        font-size: 15px;
    }
}

/* Prevent double-tap zoom on buttons and inputs */
button,
input,
select,
textarea,
.btn-add,
.btn-submit,
.btn-reset,
.btn-view,
.btn-back,
.btn-validasi,
.btn-remove,
.pihak-card {
    touch-action: manipulation;
}

/* Print Styles */
@media print {
    body {
        background: white;
        padding: 0;
    }
    
    .container {
        box-shadow: none;
        padding: 20px;
    }
    
    .btn-add,
    .btn-submit,
    .btn-reset,
    .btn-view,
    .btn-back,
    .btn-remove,
    .form-actions,
    .footer-actions,
    .actions-bar,
    .btn-validasi,
    .pesan-validasi {
        display: none;
    }
    
    .saksi-item {
        page-break-inside: avoid;
        border: 1px solid #ccc;
    }
    
    .input-with-validation input {
        width: 100%;
    }
}

/* Modal Preview */
.modal-preview {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-preview-content {
    background-color: white;
    border-radius: 12px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-preview-header {
    padding: 20px 30px;
    border-bottom: 2px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #667eea;
    color: white;
    border-radius: 12px 12px 0 0;
}

.modal-preview-header h2 {
    margin: 0;
    color: white;
    font-size: 22px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: white;
    cursor: pointer;
    padding: 0;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    line-height: 44px;
    border-radius: 50%;
    transition: all 0.3s;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.3);
    user-select: none;
    -webkit-user-select: none;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-close:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.3);
}

.modal-preview-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.preview-section {
    margin-bottom: 30px;
}

.preview-section h3 {
    color: #667eea;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.preview-saksi {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
}

.preview-saksi h4 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 18px;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.preview-item {
    padding: 8px 0;
}

.preview-item.full-width {
    grid-column: 1 / -1;
}

.preview-item strong {
    color: #555;
    display: inline-block;
    min-width: 180px;
}

.modal-preview-footer {
    padding: 20px 30px;
    border-top: 2px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

.btn-cancel {
    padding: 10px 20px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(108, 117, 125, 0.3);
    user-select: none;
    -webkit-user-select: none;
    min-height: 44px;
    min-width: 44px;
}

.btn-cancel:hover {
    background: #5a6268;
}

.btn-cancel:active {
    transform: scale(0.97);
    opacity: 0.9;
}

.btn-confirm {
    padding: 10px 20px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(40, 167, 69, 0.3);
    user-select: none;
    -webkit-user-select: none;
    min-height: 44px;
    min-width: 44px;
}

.btn-confirm:active {
    transform: scale(0.97);
    opacity: 0.9;
}

.btn-confirm:hover {
    background: #218838;
}

/* Notifikasi */
/* Modal Notifikasi Popup */
.modal-notification {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
}

.modal-notification-content {
    background-color: #fff;
    border-radius: 12px;
    padding: 30px 40px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
    animation: slideUp 0.3s ease-out;
    position: relative;
}

.modal-notification-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
}

.modal-notification-icon.icon-success {
    background-color: #d4edda;
    color: #28a745;
}

.modal-notification-icon.icon-error {
    background-color: #f8d7da;
    color: #dc3545;
}

.modal-notification-icon.icon-info {
    background-color: #d1ecf1;
    color: #17a2b8;
}

.notification-icon-symbol {
    line-height: 1;
}

.modal-notification-message {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 25px;
    word-wrap: break-word;
}

.modal-notification-close {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 10px 30px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0, 123, 255, 0.3);
    user-select: none;
    -webkit-user-select: none;
    min-height: 44px;
    min-width: 80px;
}

.modal-notification-close:hover {
    background-color: #0056b3;
}

.modal-notification-close:active {
    transform: scale(0.97);
    opacity: 0.9;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Styling untuk modal bukti berhasil */
.modal-bukti .modal-notification-content {
    max-width: 380px;
    padding: 18px;
    text-align: left;
    max-height: 85vh;
    overflow-y: auto;
}

.bukti-berhasil {
    width: 100%;
}

.bukti-header {
    text-align: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid #28a745;
}

.bukti-icon {
    font-size: 42px;
    color: #28a745;
    margin-bottom: 6px;
    font-weight: bold;
    line-height: 1;
}

.bukti-header h3 {
    margin: 0;
    font-size: 16px;
    color: #28a745;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bukti-content {
    font-size: 13px;
    line-height: 1.6;
}

.bukti-item {
    margin-bottom: 8px;
    padding: 6px 0;
    border-bottom: 1px solid #e0e0e0;
}

.bukti-item:last-of-type {
    border-bottom: none;
}

.bukti-item strong {
    display: inline-block;
    min-width: 95px;
    color: #333;
    font-weight: 600;
    font-size: 12px;
}

.bukti-item span {
    color: #555;
}

.bukti-saksi {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
}

.bukti-saksi > strong {
    display: block;
    margin-bottom: 6px;
    color: #333;
    font-size: 13px;
    font-weight: 600;
}

.bukti-saksi-item {
    display: flex;
    margin-bottom: 6px;
    padding: 5px 8px;
    background-color: #f8f9fa;
    border-radius: 4px;
    font-size: 11px;
    border-left: 2px solid #28a745;
}

.bukti-saksi-item:last-child {
    margin-bottom: 0;
}

.bukti-saksi-nomor {
    min-width: 18px;
    font-weight: bold;
    color: #666;
    margin-right: 6px;
    font-size: 11px;
}

.bukti-saksi-detail {
    flex: 1;
}

.bukti-saksi-detail div {
    margin-bottom: 3px;
    line-height: 1.4;
}

.bukti-saksi-detail div:last-child {
    margin-bottom: 0;
}

.bukti-saksi-detail strong {
    color: #555;
    font-weight: 600;
    margin-right: 3px;
    font-size: 11px;
}

.bukti-catatan {
    margin-top: 10px;
    padding: 8px 10px;
    background-color: #fff3cd;
    border-left: 3px solid #ffc107;
    border-radius: 4px;
    font-size: 11px;
    color: #856404;
    line-height: 1.5;
    text-align: center;
}

.bukti-catatan strong {
    color: #856404;
    font-weight: 600;
}

/* Mobile optimization untuk bukti */
@media (max-width: 480px) {
    .modal-bukti .modal-notification-content {
        max-width: 95%;
        padding: 15px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .bukti-header h3 {
        font-size: 16px;
    }
    
    .bukti-icon {
        font-size: 40px;
    }
    
    .bukti-content {
        font-size: 12px;
    }
    
    .bukti-item {
        margin-bottom: 8px;
        padding: 6px 0;
    }
    
    .bukti-item strong {
        min-width: 85px;
        font-size: 12px;
    }
    
    .bukti-saksi-item {
        font-size: 11px;
        padding: 5px;
    }
    
    .bukti-saksi-detail div {
        margin-bottom: 3px;
    }
    
    .bukti-catatan {
        font-size: 11px;
        padding: 8px;
    }
}

/* Card Pilihan Pihak */
.pihak-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin: 20px 0;
    position: relative;
    overflow: visible;
}

.pihak-card {
    background: white;
    border: 3px solid #333;
    border-radius: 6px;
    padding: 30px 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(95, 184, 92, 0.2);
    user-select: none;
    -webkit-user-select: none;
    min-height: 160px;
    font-weight: 600;
    overflow: visible;
    z-index: 1;
}

.pihak-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: rgb(95, 184, 92);
    transform: scaleX(0);
    transition: transform 0.2s ease;
    border-radius: 6px 6px 0 0;
}

.pihak-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border-color: rgb(95, 184, 92);
    transform: translateY(-2px);
}

.pihak-card:hover::before {
    transform: scaleX(1);
}

.pihak-card.selected {
    border-color: rgb(95, 184, 92);
    border-width: 4px;
    background: linear-gradient(to bottom, #f0f9f0 0%, #ffffff 100%);
    box-shadow: 0 5px 20px rgba(95, 184, 92, 0.3);
    transform: translateY(-2px);
}

.pihak-card.selected::before {
    transform: scaleX(1);
    background: rgb(95, 184, 92);
    height: 5px;
}

.pihak-card-icon {
    font-size: 64px;
    margin-bottom: 15px;
    line-height: 1;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.2));
}

.pihak-card.selected .pihak-card-icon {
    animation: bounce 0.5s ease;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.pihak-card-title {
    font-size: 20px;
    font-weight: 800;
    color: #2d5f2d;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.3;
}

.pihak-card.selected .pihak-card-title {
    color: #2d5f2d;
    font-weight: 900;
}

.pihak-card-desc {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    font-weight: 500;
}

.pihak-card.selected .pihak-card-desc {
    color: #2d5f2d;
    font-weight: 600;
}

@media (max-width: 768px) {
    .pihak-cards {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .pihak-card {
        padding: 35px 25px;
        min-height: 180px;
    }
    
    .pihak-card-icon {
        font-size: 56px;
        margin-bottom: 18px;
    }
    
    .pihak-card-title {
        font-size: 18px;
        margin-bottom: 12px;
    }
    
    .pihak-card-desc {
        font-size: 13px;
    }
    
    #section-pilih-pihak {
        padding: 20px 15px;
        margin-bottom: 25px;
    }
    
    #section-pilih-pihak h2 {
        font-size: 16px;
        margin-bottom: 20px;
        padding: 10px 12px;
    }
}

/* Styling untuk perkara group di view.php */
.perkara-group {
    transition: all 0.2s ease;
    border: 1px solid #ddd !important;
}

.perkara-group:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.pihak-card-view {
    transition: all 0.2s ease;
    border: 1px solid #ddd !important;
}

.pihak-card-view:hover {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.pihak-card-view.no-data {
    opacity: 0.7;
}

.pihak-card-view.no-data:hover {
    opacity: 1;
}

@media (max-width: 768px) {
    .pihak-list {
        grid-template-columns: 1fr !important;
    }
    
    .perkara-header h2 {
        font-size: 18px !important;
    }
}

@media (max-width: 768px) {
    .preview-grid {
        grid-template-columns: 1fr;
    }
    
    .preview-item strong {
        min-width: auto;
        display: block;
        margin-bottom: 5px;
    }
    
    .modal-preview-content {
        max-height: 95vh;
    }
}

/* Modal Loading */
.modal-loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 10001;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
}

.modal-loading-content {
    background-color: #fff;
    border-radius: 12px;
    padding: 40px 50px;
    max-width: 350px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
    animation: slideUp 0.3s ease-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    position: relative;
    width: 60px;
    height: 60px;
}

.spinner-ring {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgb(95, 184, 92);
    animation: spinnerBounce 1.4s infinite ease-in-out both;
}

.spinner-ring:nth-child(1) {
    animation-delay: -0.32s;
}

.spinner-ring:nth-child(2) {
    animation-delay: -0.16s;
}

.spinner-ring:nth-child(3) {
    animation-delay: 0s;
}

@keyframes spinnerBounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

.loading-message {
    font-size: 16px;
    color: #333;
    font-weight: 500;
    margin-top: 10px;
}

/* Tooltip Styles */
.tooltip-container {
    position: relative;
    display: inline-block;
}

.tooltip-text {
    visibility: hidden;
    opacity: 0;
    background-color: rgba(0, 0, 0, 0.9);
    color: #fff;
    text-align: left;
    border-radius: 8px;
    padding: 12px 16px;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    font-size: 13px;
    line-height: 1.5;
    white-space: normal;
    width: 280px;
    max-width: 90vw;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: opacity 0.3s, visibility 0.3s;
    pointer-events: none;
    word-wrap: break-word;
}

.tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.9) transparent transparent transparent;
}

/* Show tooltip when active (hover or touch) */
.tooltip-container:hover .tooltip-text,
.tooltip-container:focus .tooltip-text,
.tooltip-container.tooltip-active .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Touch device optimizations */
@media (max-width: 768px) {
    .tooltip-text {
        width: 250px;
        font-size: 12px;
        padding: 10px 14px;
    }
    
    /* Show tooltip on long press for touch devices */
    .tooltip-container.tooltip-active .tooltip-text {
        visibility: visible;
        opacity: 1;
    }
}

/* Special positioning for tooltips */
.input-with-validation .tooltip-text {
    width: 260px;
    bottom: auto;
    top: 125%;
    transform: translateX(-50%);
    margin-bottom: 0;
    margin-top: 8px;
}

.input-with-validation .tooltip-text::after {
    top: auto;
    bottom: 100%;
    border-color: transparent transparent rgba(0, 0, 0, 0.9) transparent;
}

/* Tooltip positioning untuk pihak-card - muncul di bawah agar tidak terpotong header */
.pihak-card .tooltip-text {
    bottom: auto;
    top: calc(100% + 15px);
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    margin-bottom: 0;
    margin-top: 0;
    z-index: 10000;
    width: 300px;
    max-width: calc(100vw - 40px);
    position: absolute;
}

/* Jika tooltip terlalu lebar, sesuaikan positioning */
@media (max-width: 768px) {
    .pihak-card .tooltip-text {
        width: 280px;
        max-width: min(280px, calc(100vw - 20px));
        font-size: 12px;
        padding: 10px 14px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }
}

/* Arrow tooltip untuk pihak-card - menunjuk ke atas */
.pihak-card .tooltip-text::after {
    content: "";
    position: absolute;
    top: auto;
    bottom: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent rgba(0, 0, 0, 0.9) transparent;
    margin-bottom: -1px;
}

/* Pastikan tooltip tidak terpotong dengan menambahkan spacing extra di section */
#section-pilih-pihak {
    padding-bottom: 30px;
}

/* Untuk media query layar besar - tambah padding lebih banyak untuk tooltip */
@media (min-width: 1024px) {
    #section-pilih-pihak {
        padding-bottom: 40px;
    }
}

/* Button loading state */
.btn-validasi.loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-validasi.loading .btn-validasi-text::after {
    content: "...";
    animation: loadingDots 1.5s infinite;
}

@keyframes loadingDots {
    0%, 20% { content: "."; }
    40% { content: ".."; }
    60%, 100% { content: "..."; }
}

/* Disable interactions when loading */
body.loading-active {
    overflow: hidden;
}

body.loading-active * {
    pointer-events: none;
}

body.loading-active .modal-loading {
    pointer-events: auto;
}

/* Fullscreen optimizations untuk anjungan */
@media (min-width: 1024px) {
    .container {
        padding: 12px 15px;
        height: auto;
        overflow-y: auto;
    }
    
    .header {
        padding: 10px 15px;
        margin: -12px -15px 12px -15px;
    }
    
    .form-section {
        padding: 15px 18px;
        margin-bottom: 15px;
        overflow: visible;
    }
    
    .form-section h2 {
        padding: 8px 12px;
        margin: -15px -18px 15px -18px;
        font-size: 15px;
    }
    
    .saksi-item {
        padding: 18px 20px;
        margin-bottom: 18px;
    }
    
    .saksi-header {
        padding: 12px 15px;
        margin: -18px -20px 15px -20px;
    }
    
    #containerSaksi {
        overflow: visible;
        max-height: none;
    }
    
    .form-group {
        margin-bottom: 10px;
    }
    
    .form-row {
        gap: 8px;
        margin-bottom: 10px;
    }
    
    .pihak-cards {
        gap: 20px;
        margin: 15px 0;
    }
    
    .pihak-card {
        padding: 25px 20px;
        min-height: 140px;
    }
    
    .pihak-card-icon {
        font-size: 56px;
        margin-bottom: 12px;
    }
    
    .pihak-card-title {
        font-size: 18px;
        margin-bottom: 8px;
    }
    
    .pihak-card-desc {
        font-size: 13px;
    }
    
    #section-pilih-pihak {
        padding: 20px 15px;
        margin-bottom: 15px;
    }
    
    #section-pilih-pihak h2 {
        font-size: 16px;
        margin-bottom: 20px;
    }
}

/* Landscape orientation optimizations - tetap bisa scroll normal */
@media (orientation: landscape) and (min-height: 600px) {
    .container {
        display: block;
        height: auto;
        overflow-y: auto;
        overflow-x: hidden;
    }
    
    .form-section {
        overflow: visible;
        max-height: none;
    }
    
    #containerSaksi {
        max-height: none;
        overflow: visible;
    }
}

/* Fullscreen mode - tetap bisa scroll, hanya kurangi spacing */
@media (min-width: 1280px) {
    body {
        padding: 0;
        overflow-y: auto;
    }
    
    .container {
        padding: 12px 15px;
        border-radius: 0;
        height: auto;
        overflow-y: auto;
    }
    
    .header {
        padding: 6px 10px;
        margin: -8px -10px 8px -10px;
    }
    
    .header h1 {
        font-size: 15px;
        margin-bottom: 2px;
    }
    
    .header p {
        font-size: 11px;
    }
    
    .form-section {
        padding: 15px 18px;
        margin-bottom: 15px;
        overflow: visible;
    }
    
    .form-section h2 {
        padding: 8px 12px;
        margin: -15px -18px 15px -18px;
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-row {
        gap: 12px;
        margin-bottom: 15px;
    }
    
    .saksi-item {
        padding: 18px 20px;
        margin-bottom: 18px;
    }
    
    .saksi-header {
        padding: 12px 15px;
        margin: -18px -20px 15px -20px;
        margin-bottom: 15px;
    }
    
    #containerSaksi {
        overflow: visible;
        max-height: none;
    }
    
    .form-actions,
    .footer-actions {
        margin-top: 8px;
        padding-top: 8px;
    }
    
    .pihak-cards {
        gap: 18px;
        margin: 12px 0;
    }
    
    .pihak-card {
        padding: 22px 18px;
        min-height: 130px;
    }
    
    .pihak-card-icon {
        font-size: 52px;
        margin-bottom: 10px;
    }
    
    .pihak-card-title {
        font-size: 17px;
        margin-bottom: 8px;
    }
    
    .pihak-card-desc {
        font-size: 12px;
    }
    
    #section-pilih-pihak {
        padding: 18px 12px;
        margin-bottom: 12px;
    }
    
    #section-pilih-pihak h2 {
        font-size: 15px;
        margin-bottom: 18px;
    }
}


