body {
    font-family: Arial, sans-serif;
    padding: 10px;
    max-width: 100%;
    overflow-x: hidden;
}

.section {
    margin-bottom: 20px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.judul h2 {
    margin: 2px;
    padding: 5px;
    line-height: 1;
    display: block;
    text-align: center;
}

label{
    font-size: 14px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    font-size: 14px;
}

th,
td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

th {
    background-color: #f2f2f2;
}

input[type="text"],
input[type="number"],
select {
    width: 100%;
    padding: 8px;
    margin: 5px 0;
    box-sizing: border-box;
}

button {
    background-color: #4CAF50;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin: 5px;
}

button:hover {
    background-color: #45a049;
}

.red-bg {
    background-color: #ffcccc;
}

.report {
    background-color: #f9f9f9;
    padding: 10px;
    margin-top: 10px;
}

.tab {
    overflow: hidden;
    border: 1px solid #ccc;
    background-color: #f1f1f1;
    border-radius: 5px 5px 0 0;
}

.tab button {
    background-color: inherit;
    float: left;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 10px 16px;
    transition: 0.3s;
    color: black;
}

.tab button:hover {
    background-color: #ddd;
}

.tab button.active {
    background-color: #4CAF50;
    color: white;
}

.tabcontent {
    display: none;
    padding: 10px;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 5px 5px;
}

.timestamp {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.yellow-bg {
    background-color: #ffff99;
}

.blue-bg {
    background-color: #99ccff;
}

#unverifiedTable td:not(:nth-child(15)) {
    text-align: center;
    white-space: nowrap;
}

#unverifiedTable td:nth-child(15) {
    text-align: left;
    white-space: nowrap;
    word-break: break-word;
    max-width: 200px;
}

#unverifiedTable td[class*="-bg"] {
    text-align: center !important;
}

#reportTable td:nth-child(2),
#reportTable td:nth-child(4),
#reportTable td:nth-child(5),
#reportTable td:nth-child(6),
#reportTable td:nth-child(7),
#reportTable td:nth-child(8),
#reportTable td:nth-child(9),
#reportTable td:nth-child(10),
#reportTable td:nth-child(11),
#reportTable td:nth-child(12),
#reportTable td:nth-child(13),
#reportTable td:nth-child(14) {
    text-align: center;
}


#unverifiedModal>div,
#pokokBModal>div {
    background: white;
    margin: 50px auto;
    padding: 20px;
    border-radius: 5px;
    max-width: 95%;
    width: 900px;
    position: relative;
    max-height: 80vh;
    overflow: auto;
    border: 1px solid #ccc;
}

#unverifiedTable th,
#pokokBTable th {
    background-color: #f2f2f2;
}

#unverifiedTable td,
#pokokBTable td {
    border: 1px solid #ddd;
}


/* Dark mode */
body.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
}

body.dark-mode .section {
    border-color: #444;
    background-color: #1e1e1e;
}

body.dark-mode .tab {
    background-color: #333;
    border-color: #444;
}

body.dark-mode .tab button {
    color: #e0e0e0;
    background-color: #333;
}

body.dark-mode .tab button:hover {
    background-color: #555;
}

body.dark-mode .tab button.active {
    background-color: #4CAF50;
    color: white;
}

body.dark-mode .tabcontent {
    border-color: #444;
    background-color: #1e1e1e;
}

body.dark-mode table {
    color: #e0e0e0;
}

body.dark-mode th {
    background-color: #333;
    color: #e0e0e0;
}

body.dark-mode td {
    border-color: #444;
}

body.dark-mode input[type="text"],
body.dark-mode input[type="number"],
body.dark-mode select {
    background-color: #333;
    color: #e0e0e0;
    border-color: #555;
}

body.dark-mode .report {
    background-color: #252525;
}

body.dark-mode .timestamp {
    color: #aaa;
}

body.dark-mode #verifikasiSummary {
    background-color: #252525;
    border-color: #444;
}

body.dark-mode #unverifiedModal>div {
    background-color: #1e1e1e;
    color: #e0e0e0;
    border-color: #444;
}

body.dark-mode #unverifiedModal th {
    background-color: #333;
    color: #e0e0e0;
    border-color: #444;
}

body.dark-mode #unverifiedModal td {
    border-color: #444;
    color: #e0e0e0;
}

body.dark-mode #unverifiedModal input,
body.dark-mode #unverifiedModal select,
body.dark-mode #pokokBModal input,
body.dark-mode #pokokBModal select {
    background-color: #333;
    color: #e0e0e0;
    border-color: #555;
}

body.dark-mode .red-bg,
body.dark-mode .yellow-bg,
body.dark-mode .blue-bg {
    color: black !important;
}

#darkModeToggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

body.dark-mode #darkModeToggle {
    background-color: #e0e0e0;
    color: #333;
}

body.dark-mode #pokokBModal>div {
    background-color: #1e1e1e;
    color: #e0e0e0;
    border-color: #444;
}

body.dark-mode #pokokBModal th {
    background-color: #333;
    color: #e0e0e0;
    border-color: #444;
}

body.dark-mode #pokokBModal td {
    border-color: #444;
    color: #e0e0e0;
}


body.dark-mode #pokokBTable td[style*="background-color: #ffcccc"] {
    background-color: #990000 !important;
    color: #ffffff !important;
}

body.dark-mode #pokokBTable td[style*="background-color: #ffffcc"] {
    background-color: #999900 !important;
    color: #ffffff !important;
}

/* Tracking */
#tracking-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 16px; 
}

#tracking-section .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-width: 2px;
}

#tracking-section .btn:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

#tracking-section .btn:active {
    transform: scale(0.95);
}

#tracking-section .btn-success {
    background-color: #28a745;
    border-color: #1e7e34;
}

#tracking-section .btn-warning {
    background-color: #ffc107;
    border-color: #d39e00;
    color: #212529;
}

#tracking-section .btn-danger {
    background-color: #dc3545;
    border-color: #bd2130;
}

#tracking-section .btn:disabled {
    opacity: 0.65;
    transform: none !important;
    box-shadow: none !important;
}

#tracking-section i {
    font-size: 1.1rem;
}

#tracking-status {
    font-size: 0.85rem;
    padding: 8px;
    border-radius: 6px;
    margin-top: 12px;
}

#tracking-history-table td,
#tracking-history-table th {
    white-space: nowrap;
    text-align: center;
    vertical-align: middle;
}

#tracking-history-table .aksi-btn {
    padding: 4px 10px;
    margin: 2px 2px;
    border-radius: 3px;
    border: none;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}

#tracking-history-table .btn-export {
    background: #2196f3;
    color: #fff;
}

#tracking-history-table .btn-export:hover {
    background: #1565c0;
}

#tracking-history-table .btn-delete {
    background: #e53935;
    color: #fff;
}

#tracking-history-table .btn-delete:hover {
    background: #b71c1c;
}

#reportTable th,
#reportTable td {
    padding: 6px;
    font-size: 13px;
}

#reportTable button {
    padding: 5px 10px;
    font-size: 12px;
}

#geo-map {
    position: relative;
    /* pastikan tidak ada pointer-events:none di sini! */
    pointer-events: auto !important;
    touch-action: auto !important;
    -ms-touch-action: auto !important;
}
.leaflet-container {
    pointer-events: auto !important;
    touch-action: auto !important;
}

#mapCenterMarker {
    position: absolute;
    z-index: 800;
    left: 50%;
    top: 50%;
    width: 32px;
    height: 32px;
    margin-left: -16px;
    margin-top: -16px;
    pointer-events: none;      /* KUNCI AGAR PETA TIDAK TERHALANG! */
    font-size: 32px;
    color: #1976d2;
    user-select: none;
}


/* Versi Mobile */
@media screen and (max-width: 600px) {
    table {
        font-size: 12px;
    }

    th,
    td {
        padding: 5px;
    }
}
@media screen and (max-width: 1200px) {
    #reportTable,
    #tracking-history-table,
    #placemarkTable {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}