/* ==========================================================
   CPCL WEBGIS
   Balai Pengelolaan Lahan dan Irigasi Pertanian
   Kelas I Bandung
========================================================== */

/* ==========================================================
   RESET
========================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: #f4f6f9;
}

/* ==========================================================
   LAYOUT
========================================================== */

.container {

    display: flex;

    width: 100%;

    height: 100vh;

}

/* ==========================================================
   SIDEBAR
========================================================== */

.sidebar {

    width: 390px;

    background: #ffffff;

    border-right: 1px solid #d9d9d9;

    overflow-y: auto;

    box-shadow: 4px 0 15px rgba(0, 0, 0, .08);

}

/* ==========================================================
   HEADER
========================================================== */

.header {

    background: #1565C0;

    color: white;

    text-align: center;

    padding: 30px;

}

.logo {

    width: 95px;

    height: auto;

    margin-bottom: 18px;

}

.header h1 {

    font-size: 26px;

    font-weight: 700;

    letter-spacing: .5px;

    margin-bottom: 8px;

}

.header h3 {

    font-size: 18px;

    font-weight: 500;

    margin-bottom: 14px;

}

.header p {

    font-size: 14px;

    line-height: 1.6;

    opacity: .95;

}

/* ==========================================================
   DIVIDER
========================================================== */

.divider {

    width: 100%;

    height: 1px;

    background: rgba(255, 255, 255, .30);

    margin: 22px 0;

}

/* ==========================================================
   LAST UPDATE
========================================================== */

.last-update {

    background: rgba(255, 255, 255, .12);

    border-radius: 10px;

    padding: 14px;

    text-align: left;

}

.last-update span {

    display: block;

    font-size: 12px;

    margin-bottom: 6px;

}

.last-update strong {

    font-size: 15px;

    font-weight: 600;

}

/* ==========================================================
   CARD
========================================================== */

.card {

    background: white;

    margin: 18px;

    padding: 18px;

    border-radius: 12px;

    box-shadow: 0 4px 15px rgba(0, 0, 0, .08);

}

.card h2 {

    color: #1565C0;

    font-size: 18px;

    margin-bottom: 18px;

}

/* ==========================================================
   SUMMARY CARDS
========================================================== */

.summary-card {

    background: #fafafa;

    border-left: 6px solid #1565C0;

    border-radius: 10px;

    padding: 18px;

    margin-bottom: 16px;

    transition: .25s;

}

.summary-card:last-child {

    margin-bottom: 0;

}

.summary-card:hover {

    transform: translateY(-2px);

    box-shadow: 0 8px 18px rgba(0, 0, 0, .08);

}

.unit-card {

    border-left-color: #1976D2;

}

.luas-card {

    border-left-color: #2E7D32;

}

.summary-title {

    color: #666;

    font-size: 14px;

    font-weight: 600;

    margin-bottom: 12px;

}

.summary-value {

    font-size: 34px;

    font-weight: bold;

    color: #222;

}

/* ==========================================================
   KEGIATAN
========================================================== */

#kegiatanContainer {

    color: #666;

    font-size: 14px;

    line-height: 1.8;

}

/* ==========================================================
   FILTER
========================================================== */

select {

    width: 100%;

    padding: 12px;

    margin-bottom: 12px;

    border-radius: 8px;

    border: 1px solid #d5d5d5;

    background: white;

    font-size: 14px;

    cursor: pointer;

    transition: .25s;

}

select:last-child {

    margin-bottom: 0;

}

select:hover {

    border-color: #1565C0;

}

select:focus {

    outline: none;

    border-color: #1565C0;

    box-shadow: 0 0 5px rgba(21, 101, 192, .25);

}

/* ==========================================================
   MAP
========================================================== */

main {

    flex: 1;
    position: relative;
    overflow: hidden;

}

#map {

    width: 100%;

    height: 100vh;

}

/* ==========================================================
   MAP LOADING INDICATOR & ERROR BANNER
========================================================== */

.map-loading-indicator {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 22px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 30px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.14);
    color: #1e293b;
    font-size: 13px;
    font-weight: 600;
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.map-loading-indicator.hidden {
    opacity: 0;
    transform: translate(-50%, -15px);
    pointer-events: none;
}

.map-loading-spinner {
    width: 18px;
    height: 18px;
    border: 2.5px solid #e2e8f0;
    border-top-color: #1565C0;
    border-radius: 50%;
    animation: mapSpin 0.75s linear infinite;
}

@keyframes mapSpin {
    to {
        transform: rotate(360deg);
    }
}

.map-error-banner {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1100;
    width: 90%;
    max-width: 540px;
    padding: 14px 18px;
    background: #ffffff;
    border-left: 5px solid #d32f2f;
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.16);
    animation: mapSlideDown 0.3s ease;
}

@keyframes mapSlideDown {
    from {
        opacity: 0;
        transform: translate(-50%, -15px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.map-error-content {
    display: flex;
    align-items: center;
    gap: 14px;
}

.map-error-icon {
    font-size: 26px;
    line-height: 1;
}

.map-error-text {
    flex: 1;
}

.map-error-text strong {
    display: block;
    font-size: 14px;
    color: #b71c1c;
    margin-bottom: 3px;
}

.map-error-text p {
    font-size: 12px;
    color: #475569;
    margin: 0;
    line-height: 1.4;
}

.map-retry-btn {
    padding: 8px 16px;
    background: #1565C0;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    white-space: nowrap;
}

.map-retry-btn:hover {
    background: #0d47a1;
    transform: translateY(-1px);
}

/* ==========================================================
   SCROLLBAR
========================================================== */

.sidebar::-webkit-scrollbar {

    width: 8px;

}

.sidebar::-webkit-scrollbar-thumb {

    background: #bdbdbd;

    border-radius: 20px;

}

.sidebar::-webkit-scrollbar-track {

    background: #eeeeee;

}

/* ==========================================================
   RESPONSIVE
========================================================== */

@media(max-width:1000px) {

    .sidebar {

        width: 320px;

    }

    .logo {

        width: 75px;

    }

    .header h1 {

        font-size: 22px;

    }

    .summary-value {

        font-size: 28px;

    }

}

/* ==========================================
KEGIATAN CARD
========================================== */

.kegiatan-item {

    padding: 12px 14px;

    margin-bottom: 12px;

    background: #f8f9fb;

    border-radius: 12px;

    line-height: 1.6;

    box-shadow: 0 2px 8px rgba(0, 0, 0, .05);

    transition: .2s;

}

.kegiatan-item:hover {

    transform: translateY(-2px);

    box-shadow: 0 5px 15px rgba(0, 0, 0, .08);

}

.kegiatan-item:last-child {

    margin-bottom: 0;

}

.kegiatan-item strong {

    color: #1565C0;

}

/* ==========================================
POPUP
========================================== */

/* Leaflet Popup Container & Scroll Fallback */
.leaflet-popup-content-wrapper {
    border-radius: 12px !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
}

.leaflet-popup-content {
    margin: 0 !important;
    padding: 0 !important;
    max-height: min(440px, 75vh) !important;
    max-width: 320px !important;
    width: 290px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f8fafc;
}

.leaflet-popup-content::-webkit-scrollbar {
    width: 5px;
}

.leaflet-popup-content::-webkit-scrollbar-track {
    background: #f8fafc;
}

.leaflet-popup-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.leaflet-popup-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.leaflet-popup-close-button {
    top: 6px !important;
    right: 8px !important;
    padding: 2px !important;
    color: #64748b !important;
    font-size: 16px !important;
    z-index: 20 !important;
    transition: color 0.15s !important;
}

.leaflet-popup-close-button:hover {
    color: #0f172a !important;
}

.popup {
    width: 100%;
    max-width: 320px;
    box-sizing: border-box;
    padding: 10px 14px;
}

.popup-header {
    text-align: center;
    margin-bottom: 8px;
    padding-right: 14px;
    /* avoid overlap with close button */
}

.popup-header h3 {
    color: #1565C0;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
}

.popup h4 {
    margin: 8px 0 5px;
    color: #1565C0;
    font-size: 0.85rem;
    font-weight: 700;
}

.popup-section {
    margin-bottom: 6px;
}

.popup-label {
    color: #64748b;
    font-size: 0.8rem;
    margin-bottom: 2px;
}

.popup-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.3;
}

.popup table {
    width: 100%;
    border-collapse: collapse;
    line-height: 1.3;
}

.popup td {
    padding: 3px 0;
    vertical-align: top;
    font-size: 0.82rem;
    color: #334155;
}

.popup td:first-child {
    width: 95px;
    font-weight: 600;
    color: #64748b;
}

.popup hr {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 8px 0;
}

/* ==========================================
CPCL POLYGON MODERN LEAFLET POPUP
========================================== */

.polygon-leaflet-popup .leaflet-popup-content {
    width: 285px !important;
    margin: 0 !important;
    padding: 0 !important;
}

.cpcl-polygon-popup {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1e293b;
    box-sizing: border-box;
    overflow: hidden;
}

/* Header */
.polygon-popup-header {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 12px 14px 10px 14px;
    padding-right: 32px; /* Ensure space for Leaflet's '×' close button */
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.polygon-popup-header-title-row {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.polygon-popup-icon {
    font-size: 14px;
    line-height: 1;
    flex-shrink: 0;
}

.polygon-popup-filename {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.polygon-popup-cpcl-badge {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    padding: 2.5px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.4;
    box-shadow: 0 1px 2px rgba(29, 78, 216, 0.08);
}

.polygon-popup-cpcl-badge.unassigned {
    background: #f1f5f9;
    color: #64748b;
    border-color: #cbd5e1;
    box-shadow: none;
}

.cpcl-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #2563eb;
    display: inline-block;
    flex-shrink: 0;
}

/* Body & Grid */
.polygon-popup-body {
    padding: 12px 14px;
    background: #ffffff;
}

.polygon-popup-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 12px;
}

.polygon-popup-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.polygon-popup-field.full-width {
    grid-column: 1 / -1;
}

.polygon-popup-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em; /* tracking-wider */
    color: #64748b;
    line-height: 1.2;
}

.polygon-popup-val-dark {
    font-size: 12.5px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.polygon-popup-val-dark.poktan-name {
    color: #1e293b;
    font-weight: 600;
    font-size: 12px;
}

/* Luas Emerald/Green Highlight Badge */
.polygon-popup-area-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
    padding: 2.5px 8px;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 700;
    width: fit-content;
    box-shadow: 0 1px 2px rgba(4, 120, 87, 0.08);
}

.polygon-popup-area-badge .area-icon {
    font-size: 12px;
    line-height: 1;
}

/* Footer CTA */
.polygon-popup-footer {
    padding: 9px 14px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    color: #0284c7;
    font-size: 11.5px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    user-select: none;
}

.polygon-popup-footer:hover {
    background: #f0f9ff;
    color: #0369a1;
}

.polygon-popup-arrow {
    font-size: 13px;
    font-weight: 700;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.polygon-popup-footer:hover .polygon-popup-arrow {
    transform: translateX(4px);
}

/* ==========================================
LEGEND
========================================== */

.legend {

    background: white;

    padding: 14px 16px;

    border-radius: 10px;

    box-shadow: 0 3px 12px rgba(0, 0, 0, .20);

    line-height: 1.9;

    font-size: 13px;

}

.legend h4 {

    margin-bottom: 10px;

    color: #1565C0;

}

.legend-color {

    display: inline-block;

    width: 14px;

    height: 14px;

    border-radius: 50%;

    margin-right: 8px;

    vertical-align: middle;

}

/* ==========================================
SEARCH
========================================== */

#searchInput {

    width: 100%;

    padding: 12px;

    border: 1px solid #d5d5d5;

    border-radius: 8px;

    font-size: 14px;

    transition: .2s;

}

#searchInput:focus {

    outline: none;

    border-color: #1565C0;

    box-shadow: 0 0 6px rgba(21, 101, 192, .20);

}

#searchResults {

    margin-top: 10px;

    max-height: 220px;

    overflow-y: auto;

    border-radius: 8px;

}

.search-item {

    padding: 10px;

    cursor: pointer;

    border-bottom: 1px solid #eeeeee;

    transition: .15s;

}

.search-item:hover {

    background: #E3F2FD;

}

.search-item:last-child {

    border-bottom: none;

}

/* ==========================================
EXPORT BUTTON
========================================== */

.export-btn {

    width: 100%;

    margin-top: 15px;

    padding: 12px;

    border: none;

    border-radius: 10px;

    background: #1565C0;

    color: white;

    font-size: 15px;

    font-weight: 600;

    cursor: pointer;

    transition: .2s;

}

.export-btn:hover {

    background: #0D47A1;

    transform: translateY(-2px);

}

.export-btn:active {

    transform: translateY(0);

}

.export-btn:disabled {

    background: #9E9E9E;

    cursor: not-allowed;

    transform: none;

    opacity: 0.8;

}

/* ==========================================
KEGIATAN STATISTICS
========================================== */

.kegiatan-item {

    background: #f8f9fc;

    border-radius: 12px;

    padding: 12px;

    margin-bottom: 12px;

}

.kegiatan-header {

    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 8px;

}

.kegiatan-header strong {

    font-size: 15px;

}

.kegiatan-header span {

    font-size: 14px;

    font-weight: 600;

    color: #555;

}

.progress {

    width: 100%;

    height: 8px;

    background: #e3e8ef;

    border-radius: 20px;

    overflow: hidden;

}

.progress-fill {

    height: 100%;

    border-radius: 20px;

    transition: width .4s ease;

}

/* ==========================================
SEARCH RESULT V2
========================================== */

.search-title {

    color: #1565C0;

    font-size: 13px;

    margin-bottom: 4px;

}

.search-value {

    font-size: 16px;

    font-weight: 700;

    color: #222;

    margin-bottom: 6px;

}

.search-location {

    font-size: 13px;

    color: #666;

    line-height: 1.5;

}

/* ======================================
   PHOTO GRID
====================================== */

.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-top: 6px;
}

.photo-card {
    text-align: center;
}

.photo-title {
    font-size: 10.5px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 2px;
}

.photo-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    display: block;
    transition: transform 0.2s ease;
}

.photo-thumbnail:hover {
    transform: scale(1.05);
}

.photo-body {
    height: 52px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.photo-missing {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 1px dashed #cbd5e1;
    border-radius: 4px;
    background: #f8fafc;
    color: #94a3b8;
    font-size: 9px;
    text-align: center;
    padding: 2px;
}

.warning-icon {
    font-size: 15px;
    margin-bottom: 2px;
}

.photo-text {
    text-align: center;
    line-height: 1.2;
    font-size: 8.5px;
}

/* ======================================
    LIGHTBOX
    ====================================== */

.lightbox {

    display: none;

    position: fixed;

    z-index: 9999;

    left: 0;
    top: 0;

    width: 100%;
    height: 100%;

    background: rgba(0, 0, 0, 0.85);

    justify-content: center;
    align-items: center;

}

.lightbox img {

    max-width: 90%;
    max-height: 90%;

    border-radius: 8px;

}

.lightbox-close {

    position: absolute;

    top: 20px;
    right: 30px;

    color: white;

    font-size: 40px;

    cursor: pointer;

}

/* ==========================================================
   POLYGON MANAGEMENT & UPLOAD BUTTON
========================================================== */

.upload-btn {
    width: 100%;
    margin-top: 6px;
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(21, 101, 192, 0.28);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.upload-btn .btn-icon {
    font-size: 16px;
}

.upload-btn:hover {
    background: linear-gradient(135deg, #1E88E5 0%, #0D47A1 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(21, 101, 192, 0.4);
}

.upload-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(21, 101, 192, 0.25);
}

.upload-btn:disabled {
    background: #9E9E9E;
    cursor: not-allowed;
    transform: none;
    opacity: 0.7;
    box-shadow: none;
}

/* ==========================================================
   ACTIVE POLYGON CARD
========================================================== */

.polygon-container {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.active-polygon-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 5px solid #1565C0;
    border-radius: 10px;
    padding: 14px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
    transition: all 0.25s ease;
}

.active-polygon-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.polygon-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    gap: 8px;
}

.polygon-plot-name {
    font-size: 13.5px;
    font-weight: 700;
    color: #1e293b;
    word-break: break-all;
    display: flex;
    align-items: center;
    gap: 6px;
}

.polygon-status-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 12px;
    background: #e0f2fe;
    color: #0369a1;
    white-space: nowrap;
}

.polygon-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 12px;
}

.polygon-area-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #475569;
}

.polygon-area-val {
    font-weight: 700;
    color: #2E7D32;
    background: #e8f5e9;
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 12.5px;
}

.polygon-cpcl-row {
    font-size: 12px;
    color: #64748b;
}

.polygon-cpcl-val {
    font-weight: 600;
    color: #1565C0;
}

.polygon-actions {
    display: flex;
    gap: 8px;
}

.poly-action-btn {
    flex: 1;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.btn-poly-zoom {
    background: #e3f2fd;
    color: #1565C0;
    border-color: #bbdefb;
}

.btn-poly-zoom:hover {
    background: #bbdefb;
    color: #0d47a1;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(21, 101, 192, 0.15);
}

.btn-poly-delete {
    background: #ffebee;
    color: #c62828;
    border-color: #ffcdd2;
}

.btn-poly-delete:hover {
    background: #ffcdd2;
    color: #b71c1c;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(198, 40, 40, 0.15);
}

.polygon-empty-state {
    padding: 16px 12px;
    text-align: center;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    color: #64748b;
    font-size: 12.5px;
}

/* ==========================================================
   TOAST NOTIFICATIONS
========================================================== */

.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    min-width: 260px;
    max-width: 380px;
    padding: 12px 18px;
    border-radius: 10px;
    background: #ffffff;
    color: #1e293b;
    font-size: 13.5px;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15), 0 2px 6px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 5px solid #1565C0;
    animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1), toastFadeOut 0.3s ease 2.7s forwards;
    transition: all 0.25s ease;
}

.toast-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    line-height: 1.4;
}

.toast-success {
    border-left-color: #2e7d32;
    background: #f0fdf4;
    color: #166534;
}

.toast-error {
    border-left-color: #c62828;
    background: #fef2f2;
    color: #991b1b;
}

.toast-warning {
    border-left-color: #ea580c;
    background: #fff7ed;
    color: #9a3412;
}

.toast-info {
    border-left-color: #1565c0;
    background: #f0f9ff;
    color: #075985;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toastFadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-8px);
    }
}

/* ==========================================================
   POLYGON LAYER TOGGLE & CARD POLISH
========================================================== */

.polygon-toggle-wrapper {
    margin-top: 12px;
    padding: 10px 14px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.polygon-toggle-wrapper:hover {
    background: #f1f5f9;
}

.polygon-toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    user-select: none;
}

.polygon-toggle-label input[type="checkbox"] {
    width: 17px;
    height: 17px;
    cursor: pointer;
    accent-color: #1565C0;
}

.polygon-card-close-btn {
    background: transparent;
    border: none;
    font-size: 16px;
    color: #94a3b8;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
    transition: all 0.2s;
}

.polygon-card-close-btn:hover {
    color: #ef4444;
    background: #fee2e2;
}

/* ==========================================================
   SPATIAL VALIDATION WARNING BANNERS
========================================================== */

.polygon-warning-banner {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.45;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    animation: toastSlideIn 0.25s ease-out;
}

.polygon-warning-banner.warning-distance {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

.polygon-warning-banner.warning-distance .warning-icon {
    font-size: 15px;
    color: #dc2626;
    flex-shrink: 0;
}

.polygon-warning-banner.warning-overlap {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    color: #92400e;
}

.polygon-warning-banner.warning-overlap .warning-icon {
    font-size: 15px;
    color: #d97706;
    flex-shrink: 0;
}

/* ==========================================================
   ACTIVE POLYGON CARD REFINEMENTS & STATUS BADGES
========================================================== */

.polygon-status-badge.status-saved {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.polygon-status-badge.status-draft {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.polygon-cpcl-section {
    margin: 10px 0;
    padding: 11px 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.polygon-cpcl-section.unassigned {
    background: #fffdf5;
    border-color: #fef08a;
}

.polygon-cpcl-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.polygon-cpcl-title {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.polygon-cpcl-id {
    font-size: 13px;
    font-weight: 700;
    color: #1565C0;
}

.polygon-cpcl-id.unassigned {
    color: #d97706;
    font-size: 12px;
}

.polygon-cpcl-poktan {
    font-size: 12.5px;
    color: #1e293b;
    line-height: 1.35;
}

.polygon-cpcl-loc {
    font-size: 11.5px;
    color: #64748b;
}

.polygon-cpcl-hint {
    font-size: 12px;
    color: #78716c;
    margin: 0;
}

.btn-change-cpcl {
    margin-top: 4px;
    width: 100%;
    padding: 7px 12px;
    border: 1px solid #bfdbfe;
    border-radius: 7px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-change-cpcl:hover {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1e40af;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(29, 78, 216, 0.12);
}

.btn-change-cpcl.btn-assign-now {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #c2410c;
}

.btn-change-cpcl.btn-assign-now:hover {
    background: #ffedd5;
    border-color: #fdba74;
    color: #9a3412;
}

/* ==========================================================
   CPCL SELECTION MODAL
========================================================== */

.cpcl-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.cpcl-modal-card {
    background: #ffffff;
    width: 100%;
    max-width: 520px;
    max-height: 86vh;
    border-radius: 14px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25), 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalScaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleUp {
    from {
        transform: scale(0.94) translateY(12px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.cpcl-modal-header {
    padding: 18px 22px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.cpcl-modal-header h3 {
    font-size: 16.5px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 3px 0;
    line-height: 1.3;
}

.cpcl-modal-subtitle {
    font-size: 12.5px;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

.cpcl-modal-close {
    background: transparent;
    border: none;
    font-size: 20px;
    color: #94a3b8;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 6px;
    line-height: 1;
    transition: all 0.2s;
}

.cpcl-modal-close:hover {
    color: #ef4444;
    background: #fee2e2;
}

.cpcl-modal-body {
    padding: 18px 22px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: hidden;
    flex: 1;
}

.cpcl-search-bar {
    position: relative;
    display: flex;
    align-items: center;
}

.cpcl-search-bar input {
    width: 100%;
    padding: 11px 36px 11px 38px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 13.5px;
    color: #1e293b;
    background: #ffffff;
    outline: none;
    transition: all 0.2s ease;
}

.cpcl-search-bar input:focus {
    border-color: #1565C0;
    box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.15);
}

.cpcl-search-bar .search-bar-icon {
    position: absolute;
    left: 12px;
    font-size: 14px;
    color: #64748b;
    pointer-events: none;
}

.cpcl-search-bar .btn-clear-search {
    position: absolute;
    right: 10px;
    background: transparent;
    border: none;
    font-size: 14px;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
}

.cpcl-search-bar .btn-clear-search:hover {
    color: #475569;
}

.cpcl-results-count {
    font-size: 11.5px;
    color: #64748b;
    font-weight: 500;
}

.cpcl-modal-results {
    max-height: 360px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 4px;
}

.cpcl-modal-results::-webkit-scrollbar {
    width: 6px;
}

.cpcl-modal-results::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.cpcl-modal-results::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.cpcl-modal-item {
    padding: 11px 14px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cpcl-modal-item:hover {
    background: #f0f7ff;
    border-color: #90caf9;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(21, 101, 192, 0.08);
}

.cpcl-modal-item.current-active {
    background: #e3f2fd;
    border-color: #1976D2;
}

.cpcl-item-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.cpcl-item-id {
    font-size: 13px;
    font-weight: 700;
    color: #1565C0;
}

.cpcl-item-badge {
    font-size: 10.5px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 10px;
    border: 1px solid transparent;
}

.cpcl-item-poktan {
    font-size: 13px;
    color: #1e293b;
    line-height: 1.35;
}

.cpcl-item-poktan small {
    color: #64748b;
    font-size: 11.5px;
    font-weight: normal;
}

.cpcl-item-loc {
    font-size: 11.5px;
    color: #64748b;
}

.cpcl-no-results {
    padding: 24px 16px;
    text-align: center;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    color: #64748b;
    font-size: 13px;
}

.cpcl-modal-footer {
    padding: 12px 22px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
}

.btn-modal-cancel {
    padding: 8px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-modal-cancel:hover {
    background: #f1f5f9;
    color: #1e293b;
}

/* ==========================================
SPATIAL QUALITY AUDIT CARD
========================================== */

.spatial-audit-card {
    padding: 14px 16px;
    margin-bottom: 15px;
    border-left: 4px solid #1565C0;
    transition: all 0.2s ease;
}

.audit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.audit-title-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.audit-title-wrapper h2 {
    margin: 0;
    font-size: 14px;
    color: #1565C0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.audit-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.audit-badge-ok {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.audit-badge-warning {
    background: #fff8e1;
    color: #b78103;
    border: 1px solid #ffe082;
}

.audit-badge-danger {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.audit-badge-loading {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #cbd5e1;
}

.audit-chevron {
    font-size: 12px;
    color: #64748b;
    transition: transform 0.2s ease;
}

.audit-chevron.open {
    transform: rotate(180deg);
}

.audit-content {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.audit-metrics-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.audit-metric-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 6px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.audit-metric-label {
    font-size: 10px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
}

.audit-metric-val {
    font-size: 17px;
    font-weight: 800;
    color: #1e293b;
}

.text-warning {
    color: #d97706 !important;
}

.text-danger {
    color: #dc2626 !important;
}

.audit-sub-section {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.audit-sub-header {
    background: #f1f5f9;
    padding: 6px 10px;
    font-size: 11.5px;
    color: #334155;
    border-bottom: 1px solid #e2e8f0;
}

.audit-items-list {
    max-height: 140px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.audit-item {
    padding: 7px 10px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11.5px;
    cursor: pointer;
    transition: background 0.15s;
}

.audit-item:hover {
    background: #f8fafc;
}

.audit-item:last-child {
    border-bottom: none;
}

.audit-item-poly {
    font-weight: 700;
    color: #1565C0;
}

.audit-item-meta {
    font-size: 10.5px;
    color: #64748b;
}

.audit-item-tag {
    font-size: 10.5px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
}

.audit-tag-overlap {
    background: #fef3c7;
    color: #92400e;
}

.audit-tag-distance {
    background: #fee2e2;
    color: #991b1b;
}

.audit-empty-text {
    padding: 10px;
    margin: 0;
    font-size: 11px;
    color: #94a3b8;
    text-align: center;
    font-style: italic;
}

.audit-refresh-btn {
    width: 100%;
    padding: 7px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    background: #f8fafc;
    color: #1e293b;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.audit-refresh-btn:hover {
    background: #e2e8f0;
}

/* ==========================================
TWO-STEP UPLOAD CONFIRMATION MODAL
========================================== */

.upload-confirm-card,
.reassign-confirm-card {
    max-width: 540px;
}

.confirm-modal-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px 22px;
}

.confirm-info-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    padding: 12px 14px;
}

.confirm-info-section h4 {
    margin: 0 0 8px 0;
    font-size: 12.5px;
    color: #1565C0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.confirm-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 14px;
}

.confirm-grid-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.confirm-label {
    font-size: 11px;
    color: #64748b;
    font-weight: 500;
}

.confirm-grid-item strong {
    font-size: 13px;
    color: #1e293b;
    word-break: break-word;
}

.distance-preview-badge {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.distance-safe-badge {
    background: #e8f5e9;
    color: #1b5e20;
    border: 1px solid #81c784;
}

.distance-warning-badge {
    background: #fff8e1;
    color: #b78103;
    border: 1px solid #ffd54f;
}

.btn-confirm-save {
    padding: 9px 20px;
    border: none;
    border-radius: 8px;
    background: #1565C0;
    color: #ffffff;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(21, 101, 192, 0.25);
}

.btn-confirm-save:hover {
    background: #0d47a1;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(21, 101, 192, 0.35);
}

/* ==========================================
REASSIGNMENT CONFIRMATION MODAL
========================================== */

.reassign-alert-box {
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.reassign-alert-icon {
    font-size: 18px;
    line-height: 1;
}

.reassign-alert-box p {
    margin: 4px 0 0 0;
    font-size: 12px;
    color: #78350f;
    line-height: 1.4;
}

.reassign-diff-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.reassign-col {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.reassign-col.old-col {
    background: #f1f5f9;
    border: 1px dashed #cbd5e1;
}

.reassign-col.new-col {
    background: #e3f2fd;
    border: 1px solid #90caf9;
}

.reassign-arrow {
    font-size: 18px;
    color: #64748b;
    font-weight: 700;
}

/* ==========================================
SPATIAL QUALITY AUDIT MODAL & SIDEBAR BUTTON
========================================== */

.audit-open-table-btn {
    width: 100%;
    padding: 8px 14px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: #1e40af;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 1px 3px rgba(30, 64, 175, 0.08);
}

.audit-open-table-btn:hover {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e3a8a;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(30, 64, 175, 0.16);
}

.manage-polygons-btn {
    width: 100%;
    padding: 8px 14px;
    margin-top: 8px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    color: #1e293b;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.manage-polygons-btn:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
    color: #0f172a;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08);
}

.spatial-audit-modal-card {
    max-width: 960px;
    width: 95vw;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
}

.audit-modal-body {
    padding: 18px 22px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #f8fafc;
}

/* KPI Summary Cards */
.audit-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.audit-kpi-card {
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1.5px solid #e2e8f0;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.audit-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.audit-kpi-card:active {
    transform: translateY(0);
}

.audit-kpi-card.kpi-total {
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
    border-color: #bbf7d0;
}

.audit-kpi-card.kpi-total:hover {
    border-color: #4ade80;
    box-shadow: 0 6px 16px rgba(34, 197, 94, 0.15);
}

.audit-kpi-card.kpi-total.is-active {
    border-color: #16a34a;
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.2), 0 4px 12px rgba(22, 163, 74, 0.12);
}

.audit-kpi-card.kpi-distance {
    background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%);
    border-color: #fde68a;
}

.audit-kpi-card.kpi-distance:hover {
    border-color: #f59e0b;
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.15);
}

.audit-kpi-card.kpi-distance.is-active {
    border-color: #d97706;
    box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.2), 0 4px 12px rgba(217, 119, 6, 0.12);
}

.audit-kpi-card.kpi-overlap {
    background: linear-gradient(135deg, #fef2f2 0%, #ffffff 100%);
    border-color: #fecaca;
}

.audit-kpi-card.kpi-overlap:hover {
    border-color: #ef4444;
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.15);
}

.audit-kpi-card.kpi-overlap.is-active {
    border-color: #dc2626;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.2), 0 4px 12px rgba(220, 38, 38, 0.12);
}

.audit-kpi-card .kpi-icon {
    font-size: 24px;
    line-height: 1;
}

.audit-kpi-card .kpi-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.audit-kpi-card .kpi-label {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.audit-kpi-card .kpi-val {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.1;
}

/* Toolbar: Tabs & Search */
.audit-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.audit-filter-tabs {
    display: flex;
    gap: 4px;
    background: #e2e8f0;
    padding: 3px;
    border-radius: 8px;
}

.audit-tab-btn {
    background: transparent;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.audit-tab-btn:hover {
    color: #1e293b;
}

.audit-tab-btn.active {
    background: #ffffff;
    color: #1565C0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    font-weight: 700;
}

.tab-badge {
    font-size: 10.5px;
    padding: 1px 6px;
    border-radius: 10px;
    background: #cbd5e1;
    color: #334155;
    font-weight: 700;
}

.audit-tab-btn.active .tab-badge {
    background: #dbeafe;
    color: #1d4ed8;
}

.audit-search-bar {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    padding: 5px 10px;
    gap: 6px;
    width: 260px;
    max-width: 100%;
    transition: all 0.2s;
}

.audit-search-bar:focus-within {
    border-color: #1565C0;
    box-shadow: 0 0 0 2px rgba(21, 101, 192, 0.15);
}

.audit-search-bar input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 12px;
    color: #1e293b;
    background: transparent;
}

/* Interactive Table */
.audit-table-container {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    overflow-x: auto;
    max-height: 380px;
    overflow-y: auto;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.audit-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 12.5px;
}

.audit-table thead th {
    background: #f1f5f9;
    color: #334155;
    font-weight: 700;
    padding: 10px 12px;
    border-bottom: 2px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 2;
    white-space: nowrap;
}

.audit-table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.audit-table tbody tr:hover {
    background: #f8fafc;
}

.audit-table-poly-name {
    font-weight: 700;
    color: #1565C0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.audit-table-poly-sub {
    font-size: 11px;
    color: #64748b;
    margin-top: 2px;
}

.audit-table-cpcl-id {
    font-weight: 700;
    color: #0f172a;
}

.audit-table-cpcl-poktan {
    font-size: 11.5px;
    color: #475569;
    margin-top: 1px;
}

/* Badge Pills */
.audit-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 9px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.badge-distance {
    background: #fff1f2;
    color: #be123c;
    border: 1px solid #fecdd3;
}

.badge-overlap {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
}

.badge-optimal {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

/* Action Buttons inside Table */
.audit-table-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}

.btn-table-zoom {
    padding: 5px 9px;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-table-zoom:hover {
    background: #2563eb;
    color: #ffffff;
    border-color: #1d4ed8;
    transform: translateY(-1px);
}

.btn-table-reassign {
    padding: 5px 9px;
    border: 1px solid #fed7aa;
    background: #fff7ed;
    color: #c2410c;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-table-reassign:hover {
    background: #ea580c;
    color: #ffffff;
    border-color: #c2410c;
    transform: translateY(-1px);
}

/* Empty State */
.audit-empty-container {
    padding: 36px 20px;
    text-align: center;
    color: #64748b;
}

.audit-empty-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 8px;
}

.audit-empty-container h4 {
    margin: 0 0 6px 0;
    color: #1e293b;
    font-size: 14.5px;
    font-weight: 700;
}

.audit-empty-container p {
    margin: 0;
    font-size: 12px;
    color: #64748b;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

/* Footer Styling */
.audit-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 22px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.audit-modal-footer-info {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

.btn-audit-refresh {
    padding: 7px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    background: #ffffff;
    color: #334155;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-audit-refresh:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

@media (max-width: 768px) {
    .audit-kpi-grid {
        grid-template-columns: 1fr;
    }

    .audit-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .audit-search-bar {
        width: 100%;
    }
}

/* ==========================================================
   USER AUTHENTICATION & SESSION WIDGET
========================================================== */

.auth-card {
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 14px;
}

.auth-card-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.auth-user-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-user-avatar {
    font-size: 20px;
}

.auth-user-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.auth-username {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
}

.auth-role-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 12px;
    text-transform: uppercase;
    display: inline-block;
    width: fit-content;
}

.role-admin {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #7dd3fc;
}

.role-uploader {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.role-viewer {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #cbd5e1;
}

.auth-login-btn {
    padding: 6px 12px;
    background: #1565C0;
    color: white;
    border: none;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.auth-login-btn:hover {
    background: #0d47a1;
}

.auth-logout-btn {
    padding: 6px 10px;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.auth-logout-btn:hover {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fca5a5;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.auth-field label {
    font-size: 12.5px;
    font-weight: 600;
    color: #334155;
}

.auth-field input {
    padding: 9px 12px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.auth-field input:focus {
    outline: none;
    border-color: #1565C0;
    box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.12);
}

.auth-error-alert {
    padding: 10px 12px;
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #f87171;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.4;
}

.auth-quick-demo {
    padding: 10px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
}

.quick-demo-label {
    display: block;
    font-size: 11.5px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 6px;
}

.quick-demo-buttons {
    display: flex;
    gap: 8px;
}

.btn-quick-login {
    flex: 1;
    padding: 6px 8px;
    background: white;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-quick-login:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}

/* ==========================================================
   MAKER-CHECKER WORKFLOW SIDEBAR CARD
========================================================== */

.maker-checker-card {
    border-left: 4px solid #1565C0;
}

.card-header-with-badge {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.card-header-with-badge h2 {
    margin: 0;
}

.pending-count-badge {
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
    animation: pulseBadge 2s infinite ease-in-out;
}

@keyframes pulseBadge {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.85;
        transform: scale(1.04);
    }
}

.maker-checker-desc {
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
    margin-bottom: 12px;
}

.admin-review-btn {
    width: 100%;
    padding: 9px 14px;
    background: linear-gradient(135deg, #1565C0 0%, #0d47a1 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 6px rgba(21, 101, 192, 0.25);
}

.admin-review-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(21, 101, 192, 0.35);
}

.admin-review-btn .btn-badge {
    padding: 2px 7px;
    background: #ef4444;
    color: white;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 800;
}

.restricted-notice {
    padding: 8px 10px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    font-size: 11px;
    color: #64748b;
    line-height: 1.4;
}

/* ==========================================================
   MAKER-CHECKER REVIEW PANEL MODAL & TABLE
========================================================== */

.suggestion-review-modal-card {
    max-width: 1050px;
    width: 95vw;
    max-height: 88vh;
}

.review-modal-body {
    padding: 16px 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: #f8fafc;
}

.review-table-container {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow-x: auto;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.sugg-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.sugg-badge-add {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
}

.sugg-badge-edit {
    background: #dbeafe;
    color: #1d4ed8;
    border: 1px solid #93c5fd;
}

.sugg-badge-delete {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
}

.sugg-badge-delete-poly {
    background: #ffe4e6;
    color: #be123c;
    border: 1px solid #fda4af;
}

.sugg-badge-reassign {
    background: #f3e8ff;
    color: #7e22ce;
    border: 1px solid #d8b4fe;
}

.sugg-status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.status-approved {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.status-rejected {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.user-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-cell strong {
    font-size: 12px;
    color: #0f172a;
}

.user-cell small {
    font-size: 10.5px;
    color: #64748b;
}

.submitter-wa-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
    font-size: 11px;
    font-weight: 500;
    color: #047857;
    text-decoration: none;
    width: fit-content;
}

.submitter-wa-link:hover {
    color: #065f46;
    text-decoration: underline;
}

.target-summary-cell {
    display: flex;
    flex-direction: column;
    gap: 3px;
    max-width: 320px;
}

.target-summary-cell strong {
    font-size: 12.5px;
    color: #1e293b;
}

.summary-sub {
    font-size: 11px;
    color: #64748b;
    line-height: 1.3;
}

.timestamp-cell {
    font-size: 11.5px;
    color: #64748b;
}

.action-buttons-cell {
    display: flex;
    gap: 6px;
    justify-content: center;
    align-items: center;
}

.btn-sugg-detail {
    padding: 5px 9px;
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-sugg-detail:hover {
    background: #e2e8f0;
}

.btn-sugg-approve {
    padding: 5px 9px;
    background: #16a34a;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-sugg-approve:hover {
    background: #15803d;
}

.btn-sugg-reject {
    padding: 5px 9px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-sugg-reject:hover {
    background: #dc2626;
}

.reviewed-by-tag {
    font-size: 10.5px;
    color: #64748b;
    font-style: italic;
}

/* Detail Drawer Row */
.sugg-detail-row {
    background: #f1f5f9 !important;
}

.sugg-detail-container {
    padding: 14px 18px;
    border-radius: 8px;
    background: #ffffff;
    margin: 4px 12px 10px 12px;
    border: 1px solid #cbd5e1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.detail-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e2e8f0;
}

.detail-header-row h4 {
    margin: 0;
    font-size: 13.5px;
    color: #1565C0;
}

.detail-submitter {
    font-size: 11px;
    color: #64748b;
}

.detail-notes-box {
    background: #fffbeb;
    border-left: 3px solid #f59e0b;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: 12px;
}

.detail-notes-box strong {
    color: #b45309;
}

.detail-notes-box p {
    margin: 3px 0 0 0;
    color: #78350f;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.detail-grid-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    padding: 10px;
}

.detail-grid-card h5 {
    margin: 0 0 8px 0;
    font-size: 11.5px;
    color: #475569;
    text-transform: uppercase;
}

.detail-kv-table {
    width: 100%;
    font-size: 11.5px;
    border-collapse: collapse;
}

.detail-kv-table td {
    padding: 4px 6px;
    border-bottom: 1px solid #e2e8f0;
}

.detail-kv-table td:first-child {
    color: #64748b;
    width: 40%;
}

.detail-json-pre {
    margin: 0;
    padding: 8px;
    background: #1e293b;
    color: #38bdf8;
    border-radius: 6px;
    font-size: 11px;
    max-height: 180px;
    overflow: auto;
    font-family: Consolas, "Courier New", monospace;
}

/* ==========================================================
   TOAST NOTIFICATIONS
========================================================== */

.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast-item {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 280px;
    max-width: 440px;
    padding: 12px 16px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15), 0 2px 6px rgba(0, 0, 0, 0.08);
    opacity: 0;
    transform: translateY(16px) scale(0.96);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border-left: 4px solid #1565C0;
}

.toast-item.toast-show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.toast-item.toast-success {
    border-left-color: #16a34a;
}

.toast-item.toast-error {
    border-left-color: #dc2626;
}

.toast-item.toast-warning {
    border-left-color: #f59e0b;
}

.toast-item.toast-info {
    border-left-color: #0284c7;
}

.toast-icon {
    font-size: 18px;
    line-height: 1;
}

.toast-message {
    flex: 1;
    font-size: 12.5px;
    color: #1e293b;
    line-height: 1.4;
}

.toast-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 14px;
    padding: 2px 4px;
    transition: color 0.15s;
}

.toast-close:hover {
    color: #334155;
}

/* ==========================================================
   POINT EDITING CONTROLS & MAKER-CHECKER STYLING
========================================================== */

/* Crosshair Mode on Map */
.map-crosshair-mode,
.map-crosshair-mode .leaflet-container,
.map-crosshair-mode .leaflet-grab,
.map-crosshair-mode .leaflet-interactive {
    cursor: crosshair !important;
}

/* Floating Crosshair Banner */
.crosshair-instruction-banner {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 20px;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(8px);
    color: #ffffff;
    border-radius: 30px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), 0 0 0 2px rgba(245, 158, 11, 0.6);
    font-size: 13.5px;
    animation: bannerSlideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto;
}

@keyframes bannerSlideDown {
    from {
        opacity: 0;
        transform: translate(-50%, -20px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.crosshair-instruction-banner .banner-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.crosshair-instruction-banner .banner-icon {
    font-size: 20px;
    animation: pulseIcon 1.5s infinite;
}

@keyframes pulseIcon {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

.crosshair-instruction-banner .banner-text strong {
    color: #fbbf24;
}

.crosshair-instruction-banner .btn-banner-cancel {
    background: rgba(239, 68, 68, 0.85);
    color: #ffffff;
    border: none;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.crosshair-instruction-banner .btn-banner-cancel:hover {
    background: #dc2626;
    transform: scale(1.05);
}

/* Sidebar Tambah Titik Button */
.btn-add-point-sidebar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.25);
    transition: all 0.2s ease;
}

.btn-add-point-sidebar:hover {
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(16, 185, 129, 0.35);
}

.btn-add-point-sidebar.btn-active-mode {
    background: #d97706;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.4);
}

/* Leaflet Map Toolbar Button */
.leaflet-control-add-point-btn {
    background-color: #ffffff !important;
    width: 32px !important;
    height: 32px !important;
    line-height: 32px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.leaflet-control-add-point-btn:hover {
    background-color: #f1f5f9 !important;
}

.leaflet-control-add-point-btn.btn-active-mode {
    background-color: #fef3c7 !important;
    color: #b45309;
}

/* Marker Popup Action Buttons */
.popup-actions-wrapper {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    padding-top: 2px;
}

.btn-popup-action {
    flex: 1;
    padding: 6px 8px;
    border: none;
    border-radius: 5px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.15s ease;
}

.btn-popup-edit {
    background: #0284c7;
    color: white;
}

.btn-popup-edit:hover {
    background: #0369a1;
}

.btn-popup-delete {
    background: #ef4444;
    color: white;
}

.btn-popup-delete:hover {
    background: #dc2626;
}

/* Modal Form Styles */
.point-editor-card {
    max-width: 680px !important;
    width: 95%;
}

.point-form-body {
    padding: 20px;
    max-height: 75vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.point-coords-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 14px;
}

.point-coords-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 12.5px;
    font-weight: 600;
    color: #334155;
}

.btn-repick-coords {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-repick-coords:hover {
    background: #bae6fd;
}

.point-coords-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.point-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-group label {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
}

.form-group label .required {
    color: #dc2626;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    color: #1e293b;
    background: #ffffff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.input-coordinate-modified {
    border-color: #10b981 !important;
    background: #f0fdf4 !important;
}

/* Step 1: Method Selector Modal */
.method-selector-card {
    max-width: 500px !important;
    width: 92%;
    border-radius: 14px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.22);
    overflow: hidden;
}

.method-selector-body {
    padding: 20px 24px;
}

.method-cards-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.method-option-card {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 16px 18px;
    border-radius: 12px;
    border: 1.5px solid #e2e8f0;
    background: #ffffff;
    cursor: pointer;
    text-align: left;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.method-option-card:hover {
    border-color: #0284c7;
    background: #f0f9ff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(2, 132, 199, 0.15);
}

.method-option-card:active {
    transform: translateY(0);
}

.method-card-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.2s;
}

.method-option-card:hover .method-card-icon {
    background: #e0f2fe;
    transform: scale(1.08);
}

.method-card-text {
    flex: 1;
}

.method-card-title {
    font-size: 14.5px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 4px 0;
}

.method-card-subtitle {
    font-size: 12px;
    color: #64748b;
    margin: 0;
    line-height: 1.45;
}

.method-card-arrow {
    font-size: 16px;
    font-weight: 700;
    color: #94a3b8;
    margin-left: auto;
    transition: transform 0.2s, color 0.2s;
}

.method-option-card:hover .method-card-arrow {
    transform: translateX(4px);
    color: #0284c7;
}

.method-selector-footer {
    display: flex;
    justify-content: flex-end;
    padding: 12px 24px 18px 24px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

/* Dual-Mode Coordinate Segmented Control & Readonly Styles */
.coord-mode-segmented {
    display: inline-flex;
    background: #e2e8f0;
    border-radius: 8px;
    padding: 3px;
    gap: 3px;
}

.coord-mode-btn {
    border: none;
    background: transparent;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.coord-mode-btn:hover {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.5);
}

.coord-mode-btn.active {
    background: #ffffff;
    color: #0284c7;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.coord-mode-action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 6px;
}

.coord-mode-desc {
    font-size: 11.5px;
    color: #0369a1;
    font-weight: 500;
    line-height: 1.35;
}

.coord-input-readonly {
    background-color: #f3f4f6 !important;
    cursor: not-allowed !important;
    color: #64748b !important;
    border-color: #e2e8f0 !important;
}

.coord-input-readonly:focus {
    box-shadow: none !important;
    border-color: #e2e8f0 !important;
}

/* Switch Toggle for Pindah Lokasi */
.move-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.switch-label {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 22px;
}

.switch-label input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .3s;
    border-radius: 22px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: #f59e0b;
}

input:checked+.slider:before {
    transform: translateX(16px);
}

.move-toggle-text {
    font-size: 12px;
    font-weight: 600;
    color: #b45309;
}

.move-active-notice {
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 12px;
    color: #92400e;
    margin-bottom: 10px;
}

/* Severe Warning Modal (Delete) */
.delete-warning-card {
    border-top: 5px solid #dc2626 !important;
}

.delete-modal-header {
    background: #fef2f2;
}

.warning-large-icon {
    font-size: 28px;
    line-height: 1;
}

.severe-warning-box {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    border-left: 4px solid #e11d48;
    border-radius: 8px;
    padding: 12px 14px;
}

.severe-warning-title {
    font-size: 12px;
    font-weight: 700;
    color: #9f1239;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.severe-warning-text {
    font-size: 12.5px;
    color: #881337;
    line-height: 1.45;
    margin: 0;
}

.delete-target-info {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.delete-info-row {
    display: flex;
    font-size: 12.5px;
}

.delete-info-label {
    width: 130px;
    color: #64748b;
    font-weight: 500;
}

.delete-info-value {
    color: #1e293b;
    font-weight: 600;
}

.cpcl-code-tag {
    background: #e2e8f0;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12.5px;
}

.guardrail-box {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 12px 14px;
}

.guardrail-label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: #991b1b;
    margin-bottom: 8px;
}

/* Custom Marker Pins */
.custom-preview-pin,
.custom-edit-pin {
    position: relative;
    width: 36px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-pin-core,
.edit-pin-core {
    font-size: 28px;
    z-index: 2;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.preview-pin-pulse {
    position: absolute;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.4);
    animation: markerPulse 1.6s infinite ease-out;
    z-index: 1;
}

.edit-pin-pulse {
    position: absolute;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.4);
    animation: markerPulse 1.6s infinite ease-out;
    z-index: 1;
}

@keyframes markerPulse {
    0% {
        transform: scale(0.6);
        opacity: 0.9;
    }

    100% {
        transform: scale(2.2);
        opacity: 0;
    }
}

/* ==========================================================
   BATCH POINT UPLOAD & PREVIEW STYLES
========================================================== */

.btn-upload-batch-sidebar {
    width: 100%;
    padding: 9px 14px;
    margin-top: 8px;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}

.btn-upload-batch-sidebar:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
}

.btn-add-point-sidebar {
    width: 100%;
    padding: 9px 14px;
    margin-top: 8px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
}

.btn-add-point-sidebar:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.sugg-badge-batch {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #7dd3fc;
}

.btn-sugg-batch-preview {
    padding: 5px 9px;
    background: #0284c7;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-sugg-batch-preview:hover {
    background: #0369a1;
    transform: translateY(-1px);
}

/* Batch Preview Modal */
.batch-preview-modal-card {
    max-width: 1200px !important;
    width: 95vw;
    max-height: 90vh;
}

.batch-preview-modal-body {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 72vh;
    overflow: hidden;
}

.batch-preview-notes-banner {
    background: #f0fdf4;
    border-left: 4px solid #22c55e;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 12.5px;
    color: #14532d;
}

.batch-preview-notes-banner p {
    margin: 4px 0 0 0;
    font-size: 12px;
    color: #166534;
}

.batch-preview-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.batch-count-tag {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
    padding: 5px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 700;
}

.batch-preview-table-container {
    flex: 1;
    overflow: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    max-height: 52vh;
}

.batch-preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    white-space: nowrap;
}

.batch-preview-table thead {
    position: sticky;
    top: 0;
    background: #f8fafc;
    z-index: 2;
}

.batch-preview-table th {
    padding: 10px 12px;
    text-align: left;
    font-weight: 700;
    font-size: 11.5px;
    color: #475569;
    border-bottom: 2px solid #cbd5e1;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.batch-preview-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #f1f5f9;
    color: #1e293b;
}

.batch-preview-table tbody tr:hover {
    background: #f0f9ff;
}

.table-kegiatan-tag {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 4px;
    background: #f1f5f9;
    color: #334155;
    font-size: 11px;
    font-weight: 600;
}

.batch-preview-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.batch-footer-left {
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
}

/* Upload Batch Modal */
.upload-batch-modal-card {
    max-width: 580px !important;
    width: 95%;
}

.upload-batch-form-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 80vh;
    overflow-y: auto;
}

.upload-batch-alert {
    padding: 10px 14px;
    border-radius: 8px;
    background: #fee2e2;
    border: 1px solid #f87171;
    color: #991b1b;
    font-size: 12.5px;
    line-height: 1.4;
    font-weight: 500;
}

.batch-template-banner {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.batch-template-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.batch-template-icon {
    font-size: 24px;
}

.batch-template-left strong {
    font-size: 12.5px;
    color: #1e293b;
    display: block;
}

.batch-template-left p {
    margin: 2px 0 0 0;
    font-size: 11px;
    color: #64748b;
}

.btn-download-template {
    white-space: nowrap;
    padding: 7px 12px;
    background: #f1f5f9;
    color: #0f172a;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-download-template:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
}

.batch-dropzone {
    border: 2px dashed #94a3b8;
    border-radius: 10px;
    padding: 24px 16px;
    text-align: center;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.2s ease;
}

.batch-dropzone:hover,
.batch-dropzone.drag-over {
    border-color: #0284c7;
    background: #f0f9ff;
}

.dropzone-icon-circle {
    font-size: 32px;
    margin-bottom: 8px;
}

.dropzone-prompt {
    margin: 0;
    font-size: 13px;
    color: #334155;
}

.dropzone-subtext {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: #64748b;
}

.dropzone-selected {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 1px solid #93c5fd;
    border-radius: 8px;
    padding: 10px 14px;
}

.file-success-icon {
    font-size: 24px;
    margin-right: 10px;
}

.file-meta {
    flex: 1;
    text-align: left;
}

.file-meta strong {
    display: block;
    font-size: 13px;
    color: #0369a1;
}

.file-meta small {
    color: #64748b;
    font-size: 11px;
}

.btn-remove-selected-file {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
    border-radius: 6px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.btn-remove-selected-file:hover {
    background: #fecaca;
    color: #991b1b;
}

.batch-client-preview {
    margin-top: 10px;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 12px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
}

.batch-client-preview-ok {
    border-color: #86efac;
    background: #f0fdf4;
    color: #166534;
}

.batch-client-preview-error {
    border-color: #fca5a5;
    background: #fef2f2;
    color: #991b1b;
}

.batch-preview-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    font-weight: 600;
}

.batch-delim-pill {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 500;
    color: #334155;
}

.batch-preview-err-text {
    margin-top: 6px;
    font-weight: 500;
}

.batch-preview-err-title {
    color: #991b1b;
    font-weight: 700;
    font-size: 12.5px;
}

.batch-preview-err-subtitle {
    margin-top: 6px;
    font-size: 11.5px;
    color: #7f1d1d;
    opacity: 0.9;
}

.max-h-56 {
    max-height: 14rem;
}

.overflow-y-auto {
    overflow-y: auto;
}

.batch-preview-err-list {
    list-style: none;
    margin: 8px 0 0 0;
    padding: 4px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: #ffffff;
    border: 1px solid #fecaca;
    border-radius: 6px;
}

.batch-preview-err-list::-webkit-scrollbar {
    width: 6px;
}

.batch-preview-err-list::-webkit-scrollbar-track {
    background: #fef2f2;
    border-radius: 6px;
}

.batch-preview-err-list::-webkit-scrollbar-thumb {
    background: #fca5a5;
    border-radius: 6px;
}

.batch-preview-err-list::-webkit-scrollbar-thumb:hover {
    background: #f87171;
}

.batch-preview-err-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 5px;
    background: #fff5f5;
    border: 1px solid #fee2e2;
    font-size: 11.5px;
    line-height: 1.45;
    color: #7f1d1d;
}

.batch-err-row-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 2px 7px;
    border-radius: 999px;
    background: #dc2626;
    color: #ffffff;
    font-size: 10.5px;
    font-weight: 700;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    letter-spacing: 0.01em;
    line-height: 1.4;
    margin-top: 1px;
}

.batch-err-row-badge-file {
    background: #991b1b;
}

.batch-err-item-body {
    flex: 1;
    min-width: 0;
    word-break: break-word;
    color: #7f1d1d;
}

.batch-err-poktan {
    color: #991b1b;
    font-weight: 700;
}

.batch-err-sep {
    color: #b91c1c;
    opacity: 0.7;
}

.batch-mini-table-wrap {
    margin-top: 8px;
    overflow-x: auto;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    background: #ffffff;
}

.batch-mini-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    color: #1e293b;
}

.batch-mini-table th,
.batch-mini-table td {
    padding: 4px 6px;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.batch-mini-table th {
    background: #f1f5f9;
    font-weight: 600;
    text-align: left;
    color: #475569;
}

.batch-mini-more {
    margin-top: 4px;
    font-size: 11px;
    color: #15803d;
    text-align: right;
}

/* ==========================================================
   USER MANAGEMENT & REGIONAL ACCOUNT PROVISIONING MODAL
========================================================== */

.auth-admin-btn {
    padding: 6px 12px;
    background: #0f766e;
    color: white;
    border: none;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.auth-admin-btn:hover {
    background: #115e59;
}

.auth-change-pwd-btn {
    padding: 6px 12px;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.auth-change-pwd-btn:hover {
    background: #dbeafe;
    border-color: #93c5fd;
}

.reset-password-hint {
    display: block;
    margin-top: 4px;
    font-size: 11.5px;
    color: #64748b;
    line-height: 1.4;
}

.user-mgmt-alert-info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 12.5px;
    line-height: 1.45;
}

.reset-reveal-box {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.reset-reveal-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.reset-reveal-label {
    font-size: 12.5px;
    color: #475569;
    font-weight: 600;
}

.reset-reveal-value {
    font-size: 14px;
    color: #0f172a;
}

.reset-reveal-password {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 15px;
    font-weight: 700;
    color: #0369a1;
    background: #e0f2fe;
    border: 1px solid #bae6fd;
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    user-select: all;
}

.btn-copy-credentials {
    padding: 9px 14px;
    background: #16a34a;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-copy-credentials:hover {
    background: #15803d;
}

.admin-manage-users-btn {
    width: 100%;
    padding: 9px 14px;
    background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 6px rgba(15, 118, 110, 0.25);
    transition: all 0.2s ease;
    margin-top: 8px;
}

.admin-manage-users-btn:hover {
    background: linear-gradient(135deg, #115e59 0%, #0f766e 100%);
    box-shadow: 0 4px 10px rgba(15, 118, 110, 0.35);
    transform: translateY(-1px);
}

.user-management-modal-card {
    max-width: 880px;
    width: 95%;
    max-height: 90vh;
}

.user-mgmt-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.user-mgmt-modal-body {
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
    background: #f1f5f9;
    max-height: calc(90vh - 140px);
}

.user-section-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.user-section-header {
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
}

.user-section-header h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 6px;
}

.section-subtext {
    font-size: 11.5px;
    color: #64748b;
    margin-top: 3px;
    display: block;
}

.user-table-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.user-badge-counter {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
    padding: 3px 9px;
    border-radius: 12px;
    font-size: 11.5px;
    font-weight: 700;
}

.btn-refresh-users-table {
    padding: 5px 10px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-refresh-users-table:hover {
    background: #e2e8f0;
    color: #1e293b;
}

/* User Form Grid */
.user-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

@media (max-width: 640px) {
    .user-form-grid {
        grid-template-columns: 1fr;
    }
}

.user-form-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.user-form-field-full {
    grid-column: 1 / -1;
}

.user-form-field label {
    font-size: 12.5px;
    font-weight: 600;
    color: #334155;
}

.required-star {
    color: #dc2626;
    font-weight: 700;
}

.user-form-field input,
.user-form-field select {
    padding: 9px 12px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    background: #ffffff;
    color: #1e293b;
    transition: all 0.15s ease;
}

.user-form-field input:focus,
.user-form-field select:focus {
    outline: none;
    border-color: #0f766e;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    width: 100%;
    padding-right: 42px;
}

.btn-toggle-password {
    position: absolute;
    right: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 4px 6px;
    border-radius: 4px;
    opacity: 0.7;
    transition: opacity 0.15s;
}

.btn-toggle-password:hover {
    opacity: 1;
}

.user-form-actions {
    margin-top: 16px;
    display: flex;
    justify-content: flex-end;
}

.btn-create-account {
    padding: 10px 20px;
    background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 6px rgba(15, 118, 110, 0.2);
}

.btn-create-account:hover {
    background: linear-gradient(135deg, #115e59 0%, #0f766e 100%);
    box-shadow: 0 4px 10px rgba(15, 118, 110, 0.3);
    transform: translateY(-1px);
}

.btn-create-account:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* User Management Alert */
.user-mgmt-alert {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 12.5px;
    line-height: 1.4;
    font-weight: 500;
    margin-bottom: 12px;
}

.user-mgmt-alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #f87171;
}

/* User Table */
.user-table-responsive {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
}

.user-mgmt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
    text-align: left;
}

.user-mgmt-table thead th {
    background: #f8fafc;
    color: #475569;
    padding: 10px 14px;
    font-weight: 700;
    font-size: 12px;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.user-mgmt-table tbody td {
    padding: 11px 14px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: middle;
}

.user-mgmt-table tbody tr:last-child td {
    border-bottom: none;
}

.user-mgmt-table tbody tr:hover {
    background: #f8fafc;
}

.user-username-cell {
    font-weight: 600;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.user-avatar-icon {
    font-size: 16px;
}

.user-role-pill {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.role-pill-admin {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.role-pill-surveyor {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.user-region-text {
    font-size: 12px;
    color: #475569;
}

.user-phone-text {
    font-size: 12px;
    color: #334155;
    white-space: nowrap;
}

.user-phone-empty {
    color: #94a3b8;
}

.user-actions-group {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-user-edit {
    padding: 5px 10px;
    background: #ffffff;
    color: #0f766e;
    border: 1px solid #99f6e4;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.btn-user-edit:hover {
    background: #f0fdfa;
    border-color: #5eead4;
    color: #0d9488;
    box-shadow: 0 1px 3px rgba(15, 118, 110, 0.15);
}

.btn-user-reset-pwd {
    padding: 5px 10px;
    background: #ffffff;
    color: #0369a1;
    border: 1px solid #bae6fd;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.btn-user-reset-pwd:hover {
    background: #f0f9ff;
    border-color: #7dd3fc;
    color: #0284c7;
    box-shadow: 0 1px 3px rgba(3, 105, 161, 0.15);
}

.btn-user-delete {
    padding: 5px 10px;
    background: #ffffff;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.btn-user-delete:hover:not(:disabled) {
    background: #fef2f2;
    border-color: #f87171;
    color: #b91c1c;
    box-shadow: 0 1px 3px rgba(220, 38, 38, 0.15);
}

.btn-user-delete:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    background: #f8fafc;
    color: #94a3b8;
    border-color: #e2e8f0;
}

.user-table-empty {
    text-align: center;
    padding: 28px 14px !important;
    color: #64748b;
    font-size: 13px;
}

.user-table-error {
    color: #b91c1c;
    background: #fff5f5;
}

.btn-retry-users {
    margin-top: 8px;
    padding: 5px 12px;
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.user-loading-spinner {
    display: inline-block;
    animation: rotateSpinner 1.2s infinite linear;
}

@keyframes rotateSpinner {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Reset Password Modal specific */
.target-user-info-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 10px 14px;
}

.target-user-icon {
    font-size: 24px;
}

.target-user-label {
    display: block;
    font-size: 11px;
    color: #166534;
}

.target-username-val {
    font-size: 14px;
    color: #14532d;
}

/* ==========================================================
   SWEETALERT2 MODERN IN-APP MODAL & TOAST THEME
========================================================== */

.swal2-container {
    z-index: 200000 !important;
}

.cpcl-swal-popup {
    border-radius: 16px !important;
    padding: 24px 20px !important;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.22), 0 4px 12px rgba(15, 23, 42, 0.08) !important;
    font-family: inherit !important;
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    background: #ffffff !important;
}

.cpcl-swal-title {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    padding: 0 0 8px 0 !important;
    margin: 0 !important;
}

.cpcl-swal-text {
    font-size: 13.5px !important;
    color: #475569 !important;
    line-height: 1.55 !important;
    margin: 8px 0 16px 0 !important;
}

.cpcl-swal-btn {
    border: none !important;
    outline: none !important;
    padding: 10px 20px !important;
    border-radius: 8px !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    margin: 0 4px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.cpcl-swal-btn-primary {
    background: #1565C0 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(21, 101, 192, 0.3) !important;
}

.cpcl-swal-btn-primary:hover {
    background: #0d47a1 !important;
    box-shadow: 0 4px 10px rgba(21, 101, 192, 0.4) !important;
    transform: translateY(-1px) !important;
}

.cpcl-swal-btn-danger {
    background: #dc2626 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3) !important;
}

.cpcl-swal-btn-danger:hover {
    background: #b91c1c !important;
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.4) !important;
    transform: translateY(-1px) !important;
}

.cpcl-swal-btn-cancel {
    background: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #cbd5e1 !important;
}

.cpcl-swal-btn-cancel:hover {
    background: #e2e8f0 !important;
    color: #1e293b !important;
}

/* SweetAlert2 Toast Customization */
.cpcl-swal-toast {
    border-radius: 12px !important;
    padding: 12px 18px !important;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.18), 0 2px 6px rgba(15, 23, 42, 0.08) !important;
    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
}

.cpcl-swal-toast.cpcl-toast-success {
    border-left: 4px solid #16a34a !important;
}

.cpcl-swal-toast.cpcl-toast-error {
    border-left: 4px solid #dc2626 !important;
}

.cpcl-swal-toast.cpcl-toast-warning {
    border-left: 4px solid #f59e0b !important;
}

.cpcl-swal-toast.cpcl-toast-info {
    border-left: 4px solid #0284c7 !important;
}

/* ==========================================================
   TWO-WAY JUSTIFICATION & REJECTION FEEDBACK UI
========================================================== */

.my-requests-sidebar-btn {
    width: 100%;
    padding: 9px 12px;
    margin-top: 8px;
    background: linear-gradient(135deg, #0f766e 0%, #115e59 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 6px rgba(15, 118, 110, 0.25);
}

.my-requests-sidebar-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 118, 110, 0.35);
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
}

.my-requests-sidebar-btn .btn-badge {
    padding: 2px 7px;
    border-radius: 10px;
    font-size: 10.5px;
    font-weight: 800;
    color: #ffffff;
}

.my-requests-sidebar-btn .btn-badge-rejected {
    background: #dc2626;
}

.my-requests-sidebar-btn .btn-badge-pending {
    background: #d97706;
}

.reason-callout-inline {
    margin-top: 6px;
    padding: 6px 9px;
    background: #fffbeb;
    border-left: 3px solid #f59e0b;
    border-radius: 5px;
    font-size: 11.5px;
    line-height: 1.4;
    color: #78350f;
}

.reason-callout-inline.reason-callout-delete {
    background: #fef2f2;
    border-left-color: #dc2626;
    color: #7f1d1d;
}

.reason-callout-label {
    font-weight: 700;
    display: inline-block;
    margin-right: 4px;
}

.reason-callout-text {
    word-break: break-word;
}

.reject-feedback-inline {
    margin-top: 6px;
    padding: 6px 9px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 3px solid #dc2626;
    border-radius: 5px;
    font-size: 11.5px;
    line-height: 1.4;
    color: #991b1b;
}

.reject-feedback-label {
    font-weight: 700;
    display: inline-block;
    margin-right: 4px;
}

.detail-feedback-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.detail-reason-box {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid #f59e0b;
    padding: 10px 14px;
    border-radius: 7px;
    font-size: 12.5px;
}

.detail-reason-box strong {
    color: #b45309;
    display: block;
    margin-bottom: 4px;
}

.detail-reason-box p {
    margin: 0;
    color: #78350f;
    line-height: 1.45;
    white-space: pre-wrap;
}

.detail-reason-box.detail-reason-box-delete {
    background: #fff1f2;
    border-color: #fecdd3;
    border-left-color: #e11d48;
}

.detail-reason-box.detail-reason-box-delete strong {
    color: #be123c;
}

.detail-reason-box.detail-reason-box-delete p {
    color: #881337;
}

.detail-reject-box {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 4px solid #dc2626;
    padding: 10px 14px;
    border-radius: 7px;
    font-size: 12.5px;
}

.detail-reject-box strong {
    color: #991b1b;
    display: block;
    margin-bottom: 4px;
}

.detail-reject-box p {
    margin: 0;
    color: #7f1d1d;
    line-height: 1.45;
    white-space: pre-wrap;
}

.detail-reject-box.detail-approve-box {
    background: #f0fdf4;
    border-color: #bbf7d0;
    border-left-color: #16a34a;
}

.detail-reject-box.detail-approve-box strong {
    color: #166534;
}

.detail-reject-box.detail-approve-box p {
    color: #14532d;
}

.detail-reviewer-meta {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    color: #64748b;
}

.reject-context-box {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 3px solid #f59e0b;
    border-radius: 7px;
    padding: 9px 12px;
}

.reject-context-label {
    display: block;
    font-size: 11.5px;
    font-weight: 700;
    color: #b45309;
    margin-bottom: 3px;
}

.reject-context-text {
    margin: 0;
    font-size: 12.5px;
    color: #78350f;
    line-height: 1.4;
}

.inline-field-error {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #dc2626;
}

.input-error-border {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.14) !important;
}

.my-req-time-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.my-req-status-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.my-req-reject-feedback {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-left: 4px solid #dc2626;
    border-radius: 6px;
    padding: 8px 10px;
}

.my-req-feedback-title {
    font-size: 11.5px;
    font-weight: 700;
    color: #b91c1c;
    margin-bottom: 3px;
}

.my-req-feedback-body {
    margin: 0;
    font-size: 12px;
    color: #7f1d1d;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
}

.my-req-feedback-meta {
    display: block;
    margin-top: 4px;
    font-size: 10.5px;
    color: #64748b;
}

.my-req-approve-feedback {
    font-size: 11.5px;
    color: #166534;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    padding: 6px 9px;
}

.my-req-pending-hint {
    font-size: 11px;
    color: #92400e;
    font-style: italic;
}

/* ==========================================================
   ADMIN SYSTEM AUDIT LOG / AUDIT TRAIL MODAL & BADGES
========================================================== */

.admin-audit-log-btn {
    width: 100%;
    padding: 9px 14px;
    margin-top: 8px;
    background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 6px rgba(30, 41, 59, 0.25);
}

.admin-audit-log-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 41, 59, 0.35);
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
}

.audit-log-modal-card {
    max-width: 1220px !important;
    width: 96vw;
    max-height: 90vh;
}

.audit-log-modal-body {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 74vh;
    overflow: hidden;
}

.audit-log-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
}

.audit-log-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
    flex: 1;
}

.audit-filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 140px;
}

.audit-filter-group label {
    font-size: 11px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.audit-log-select {
    padding: 7px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    font-size: 12.5px;
    font-family: inherit;
    color: #0f172a;
    background: #ffffff;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.audit-log-select:focus {
    outline: none;
    border-color: #1565C0;
    box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.14);
}

.audit-log-toolbar-actions {
    display: flex;
    align-items: center;
}

.btn-export-audit-xlsx {
    padding: 9px 15px;
    background: linear-gradient(135deg, #15803d 0%, #166534 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(21, 128, 61, 0.25);
    transition: all 0.2s ease;
}

.btn-export-audit-xlsx:hover:not(:disabled) {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    box-shadow: 0 4px 12px rgba(21, 128, 61, 0.35);
}

.btn-export-audit-xlsx:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.audit-log-table-container {
    flex: 1;
    overflow: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    max-height: 55vh;
}

.audit-log-table td {
    vertical-align: top;
    font-size: 12px;
}

.audit-time-wib {
    font-family: monospace;
    font-size: 11.5px;
    color: #334155;
    white-space: nowrap;
}

.audit-actor-line {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.audit-role-mini {
    font-size: 9.5px !important;
    padding: 1px 6px !important;
}

.audit-phone-empty {
    color: #94a3b8;
    font-size: 11.5px;
}

.audit-target-tag {
    display: inline-block;
    font-size: 11px !important;
    word-break: break-word;
}

.audit-summary-text {
    font-size: 12px;
    color: #0f172a;
    line-height: 1.45;
    word-break: break-word;
}

.audit-note-text {
    font-size: 11.5px;
    color: #475569;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Color-coded Action Type Badges */
.audit-action-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    border: 1px solid transparent;
}

.audit-act-add {
    background: #dcfce7;
    color: #166534;
    border-color: #86efac;
}

.audit-act-edit {
    background: #fef9c3;
    color: #854d0e;
    border-color: #fde047;
}

.audit-act-batch {
    background: #e0f2fe;
    color: #075985;
    border-color: #7dd3fc;
}

.audit-act-poly {
    background: #ede9fe;
    color: #5b21b6;
    border-color: #c4b5fd;
}

.audit-act-reassign {
    background: #e0e7ff;
    color: #3730a3;
    border-color: #a5b4fc;
}

.audit-act-req-del {
    background: #ffedd5;
    color: #9a3412;
    border-color: #fdba74;
}

.audit-act-approve {
    background: #d1fae5;
    color: #065f46;
    border-color: #6ee7b7;
}

.audit-act-reject {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fca5a5;
}

.audit-act-direct-del {
    background: #ffe4e6;
    color: #9f1239;
    border-color: #fda4af;
}

.audit-act-user {
    background: #ccfbf1;
    color: #115e59;
    border-color: #5eead4;
}

.audit-act-default {
    background: #f1f5f9;
    color: #334155;
    border-color: #cbd5e1;
}

.audit-act-link {
    background: #f3e8ff;
    color: #6b21a8;
    border-color: #d8b4fe;
}

/* ==========================================================
   VALIDATION MODALS (HARD_REJECT / SOFT_WARNING) & MULTI-UNIT POLYGONS
========================================================== */

.cpcl-swal-hard-reject {
    border-top: 5px solid #dc2626 !important;
}

.cpcl-swal-title-danger {
    color: #b91c1c !important;
}

.cpcl-swal-soft-warning {
    border-top: 5px solid #d97706 !important;
}

.cpcl-swal-title-amber {
    color: #b45309 !important;
}

.cpcl-swal-btn-amber {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 9px 18px !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
}

.cpcl-swal-btn-amber:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
}

.cpcl-swal-btn-zoom {
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    border: 1.5px solid #93c5fd !important;
    padding: 9px 16px !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
}

.cpcl-swal-btn-zoom:hover {
    background: #dbeafe !important;
}

.validation-conflict-box {
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 12.5px;
    line-height: 1.45;
    margin-top: 6px;
}

.validation-conflict-red {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #7f1d1d;
}

.validation-conflict-amber {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #78350f;
}

.validation-conflict-title {
    font-weight: 700;
    margin-bottom: 4px;
}

.unit-2-tag-badge {
    display: inline-block;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
    border-radius: 999px;
    padding: 1px 7px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.2px;
    vertical-align: middle;
}

.area-validation-badge {
    padding: 8px 12px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.area-badge-ok {
    background: #ecfdf5;
    border: 1px solid #86efac;
    color: #166534;
}

.area-badge-error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #b91c1c;
}

.polygon-cpcl-chips-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.polygon-cpcl-unit-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 700;
}

.polygon-cpcl-unit-chip small {
    font-weight: 600;
    color: #3b82f6;
}

.merged-polygon-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f3e8ff;
    color: #6b21a8;
    border: 1px solid #d8b4fe;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 10.5px;
    font-weight: 700;
}

.btn-link-second-cpcl {
    margin-top: 4px;
    width: 100%;
    padding: 7px 12px;
    border: 1px solid #c4b5fd;
    border-radius: 7px;
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    color: #5b21b6;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-link-second-cpcl:hover {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    border-color: #a78bfa;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(91, 33, 182, 0.16);
}

.polygon-popup-cpcl-badges-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.polygon-popup-link-btn {
    margin-top: 10px;
    width: 100%;
    padding: 7px 10px;
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    color: #ffffff;
    border: none;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 2px 5px rgba(109, 40, 217, 0.25);
    transition: all 0.18s ease;
}

.polygon-popup-link-btn:hover {
    background: linear-gradient(135deg, #6d28d9 0%, #5b21b6 100%);
    transform: translateY(-1px);
}

/* ==========================================================
   BULK SHAPEFILE UPLOAD & MULTI-FORMAT SPATIAL EXPORT MODALS
========================================================== */

.export-spatial-btn {
    width: 100%;
    margin-top: 8px;
    padding: 11px 14px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
    color: #ffffff;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 3px 10px rgba(13, 148, 136, 0.24);
    transition: all 0.2s ease;
}

.export-spatial-btn:hover {
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(13, 148, 136, 0.34);
}

.audit-act-export {
    background: #ccfbf1;
    color: #0f766e;
    border-color: #5eead4;
}

.polygon-upload-modal-card {
    max-width: 780px;
    width: 94%;
}

.polygon-upload-modal-body {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 72vh;
    overflow-y: auto;
}

.upload-dropzone {
    border: 2px dashed #93c5fd;
    background: #f8fafc;
    border-radius: 12px;
    padding: 28px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.upload-dropzone:hover,
.upload-dropzone.drag-over {
    border-color: #1565C0;
    background: #eff6ff;
}

.upload-dropzone-icon {
    font-size: 34px;
    line-height: 1;
}

.upload-dropzone-title {
    font-size: 14px;
    color: #1e293b;
}

.upload-dropzone-hint {
    font-size: 12px;
    color: #64748b;
    max-width: 520px;
}

.shapefile-config-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.shapefile-selected-file-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    font-size: 13.5px;
    color: #1e3a8a;
}

.shapefile-rules-note {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 12px;
    color: #334155;
    line-height: 1.5;
}

.shapefile-rules-note ul {
    margin: 6px 0 0 18px;
}

.shapefile-fallback-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.shapefile-fallback-group label {
    font-size: 12.5px;
    font-weight: 600;
    color: #334155;
}

.shapefile-report-section {
    border-top: 1px solid #e2e8f0;
    padding-top: 12px;
}

.shapefile-report-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.shapefile-report-header h4 {
    font-size: 14px;
    color: #0f172a;
}

.shapefile-report-kpi-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}

.shp-kpi-box {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.shp-kpi-box span {
    font-size: 11.5px;
    font-weight: 600;
    color: #475569;
}

.shp-kpi-box strong {
    font-size: 20px;
    font-weight: 800;
}

.shp-kpi-total {
    background: #f8fafc;
}

.shp-kpi-total strong {
    color: #0f172a;
}

.shp-kpi-pass {
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.shp-kpi-pass strong {
    color: #047857;
}

.shp-kpi-fail {
    background: #fef2f2;
    border-color: #fecaca;
}

.shp-kpi-fail strong {
    color: #b91c1c;
}

.shapefile-report-table-wrap {
    max-height: 240px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.shp-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.shp-status-pass {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.shp-status-fail {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.spatial-export-modal-card {
    max-width: 620px;
    width: 94%;
}

.spatial-export-modal-body {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.export-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.export-section-label {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
}

.spatial-export-options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.export-radio-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 11px 12px;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.18s ease;
}

.export-radio-card:hover {
    border-color: #1565C0;
    background: #f8fafc;
}

.export-radio-card input[type="radio"] {
    accent-color: #1565C0;
    margin-bottom: 2px;
}

.export-radio-card:has(input[type="radio"]:checked) {
    border-color: #1565C0;
    background: #eff6ff;
    box-shadow: 0 0 0 2px rgba(21, 101, 192, 0.15);
}

.export-radio-title {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
}

.export-radio-sub {
    font-size: 11px;
    color: #64748b;
}

.export-filter-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.export-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.export-field label {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
}

.export-field select,
.export-field input[type="text"] {
    width: 100%;
    padding: 8px 10px;
    margin-bottom: 0;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 13px;
    background: #ffffff;
}

@media (max-width: 600px) {
    .spatial-export-options-grid,
    .export-filter-grid,
    .shapefile-report-kpi-row {
        grid-template-columns: 1fr;
    }
}


/* ==========================================================
   HELD DUPLICATES (DAFTAR TERTAHAN), MONITORING & UNIT KE-2
========================================================== */

.admin-held-btn {
    width: 100%;
    padding: 9px 14px;
    margin-top: 8px;
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 6px rgba(217, 119, 6, 0.28);
    transition: all 0.2s ease;
}

.admin-held-btn:hover {
    background: linear-gradient(135deg, #b45309 0%, #92400e 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(180, 83, 9, 0.36);
}

.my-held-sidebar-btn {
    width: 100%;
    padding: 9px 14px;
    margin-top: 8px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.25);
    transition: all 0.2s ease;
}

.my-held-sidebar-btn:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    transform: translateY(-1px);
}

.btn-badge-held,
.tab-badge-held {
    background: #fef3c7 !important;
    color: #92400e !important;
    border: 1px solid #f59e0b;
    font-weight: 800;
}

.audit-tab-held.active {
    background: #fef3c7 !important;
    color: #92400e !important;
    border-color: #f59e0b !important;
}

.held-monitoring-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.held-monitoring-banner {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-left: 4px solid #d97706;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 12.5px;
    color: #78350f;
}

.held-monitoring-banner strong {
    display: block;
    font-size: 13px;
    color: #92400e;
    margin-bottom: 3px;
}

.held-monitoring-banner p {
    margin: 0;
    line-height: 1.45;
}

.held-filters-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    align-items: flex-end;
}

.held-filter-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 170px;
}

.held-filter-item.held-filter-search {
    flex: 1;
    min-width: 200px;
}

.held-filter-item label {
    font-size: 11.5px;
    font-weight: 700;
    color: #475569;
}

.held-filter-item input {
    padding: 7px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 12.5px;
}

.held-coords-compare {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.held-coord-line {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
}

.held-coord-line code {
    font-family: monospace;
    font-size: 11px;
    color: #1e293b;
    background: #f1f5f9;
    padding: 2px 5px;
    border-radius: 4px;
}

.held-coord-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    min-width: 44px;
    text-align: center;
}

.held-coord-tag.tag-u1 {
    background: #dbeafe;
    color: #1d4ed8;
}

.held-coord-tag.tag-u2 {
    background: #fef3c7;
    color: #b45309;
}

.btn-mini-zoom {
    background: #e0f2fe;
    border: 1px solid #bae6fd;
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 11px;
    cursor: pointer;
    line-height: 1.3;
}

.btn-mini-zoom:hover {
    background: #bae6fd;
}

.held-dist-pill {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    font-family: monospace;
}

.held-dist-ok {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.held-dist-bad {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.held-dist-neutral {
    background: #f1f5f9;
    color: #64748b;
}

.held-block-hint {
    font-size: 10.5px;
    color: #b91c1c;
    margin-top: 4px;
    line-height: 1.3;
}

.held-actions-stack {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: stretch;
}

.btn-held-promote {
    background: #16a34a;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-held-promote:hover:not(:disabled) {
    background: #15803d;
}

.btn-held-promote:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    opacity: 0.7;
}

.btn-held-discard {
    background: #f1f5f9;
    color: #b91c1c;
    border: 1px solid #fecaca;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-held-discard:hover:not(:disabled) {
    background: #fee2e2;
    border-color: #f87171;
}

.btn-force-cleanup {
    background: #dc2626;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}

.btn-force-cleanup:hover:not(:disabled) {
    background: #b91c1c;
}

.held-wilayah-text {
    font-size: 12px;
    color: #334155;
    line-height: 1.4;
}

/* Popup Manual Ajukan Unit ke-2 Button */
.popup-actions-unit2 {
    margin-top: 6px !important;
}

.btn-popup-unit2 {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: #ffffff;
}

.btn-popup-unit2:hover {
    background: linear-gradient(135deg, #15803d 0%, #166534 100%);
}

.popup-unit2-full-badge {
    margin-top: 6px;
    padding: 5px 8px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
    color: #475569;
    text-align: center;
}

/* Manual Propose Unit ke-2 Modal Locked Identity Card */
.unit2-locked-card {
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 8px;
    padding: 12px 14px;
}

.unit2-locked-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 12px;
    font-weight: 700;
    color: #166534;
    margin-bottom: 8px;
}

.unit2-locked-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 12px;
    font-size: 12.5px;
    color: #1e293b;
}

.unit2-lock-label {
    color: #64748b;
    font-weight: 500;
}

.unit2-distance-preview {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.4;
}

.unit2-dist-valid {
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #166534;
}

.unit2-dist-invalid {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}


/* ==========================================================
   CONSTRUCTION MILESTONE PHOTO UPLOAD & ADMIN GEOTAG VERIFIER
========================================================== */

.admin-photo-verify-btn {
    width: 100%;
    padding: 9px 14px;
    margin-top: 8px;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
    transition: all 0.2s ease;
}

.admin-photo-verify-btn:hover {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
    transform: translateY(-1px);
}

.btn-upload-photo-sidebar {
    width: 100%;
    padding: 9px 14px;
    margin-top: 8px;
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 6px rgba(124, 58, 237, 0.25);
    transition: all 0.2s ease;
}

.btn-upload-photo-sidebar:hover {
    background: linear-gradient(135deg, #6d28d9 0%, #5b21b6 100%);
    transform: translateY(-1px);
}

.tab-badge-photos {
    background: #e0f2fe !important;
    color: #0369a1 !important;
    border: 1px solid #38bdf8;
    font-weight: 800;
}

.audit-tab-photos.active {
    background: #e0f2fe !important;
    color: #0369a1 !important;
    border-color: #0284c7 !important;
}

.photo-verify-banner {
    background: #f0f9ff !important;
    border-color: #7dd3fc !important;
    border-left-color: #0284c7 !important;
    color: #0c4a6e !important;
}

.photo-verify-banner strong {
    color: #0369a1 !important;
}

.photo-upload-modal-card {
    max-width: 840px !important;
    width: 95%;
}

.photo-upload-modal-body {
    padding: 18px 22px;
    max-height: 76vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.photo-section-label {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 6px;
}

.photo-cpcl-search-results {
    margin-top: 6px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    max-height: 240px;
    overflow-y: auto;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.photo-search-status {
    padding: 14px;
    text-align: center;
    font-size: 12.5px;
    color: #64748b;
}

.photo-search-result-item {
    width: 100%;
    text-align: left;
    background: #ffffff;
    border: none;
    border-bottom: 1px solid #f1f5f9;
    padding: 10px 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 3px;
    transition: background 0.15s;
}

.photo-search-result-item:hover {
    background: #f0f9ff;
}

.photo-search-item-top {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #0f172a;
}

.photo-search-item-sub {
    font-size: 11.5px;
    color: #475569;
}

.photo-search-item-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 11px;
    color: #64748b;
}

.photo-unit-pill {
    background: #ede9fe;
    color: #5b21b6;
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 999px;
}

.photo-slot-dots-row {
    display: inline-flex;
    gap: 4px;
}

.photo-slot-dot {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 999px;
}

.slot-dot-empty {
    background: #f1f5f9;
    color: #64748b;
}

.slot-dot-pending {
    background: #fef3c7;
    color: #b45309;
}

.slot-dot-approved {
    background: #dcfce7;
    color: #166534;
}

.slot-dot-rejected {
    background: #fee2e2;
    color: #b91c1c;
}

.photo-selected-cpcl-card {
    background: #f8fafc;
    border: 1px solid #bae6fd;
    border-left: 4px solid #0284c7;
    border-radius: 8px;
    padding: 12px 14px;
}

.photo-selected-cpcl-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.photo-selected-meta {
    font-size: 12px;
    color: #475569;
    margin-top: 4px;
}

.photo-upload-idle-hint {
    text-align: center;
    padding: 28px 18px;
    background: #f8fafc;
    border: 1.5px dashed #cbd5e1;
    border-radius: 10px;
    color: #475569;
}

.photo-upload-idle-hint h4 {
    margin: 8px 0 4px 0;
    color: #1e293b;
}

.photo-upload-idle-hint p {
    margin: 0;
    font-size: 12.5px;
}

.photo-milestone-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

@media (max-width: 760px) {
    .photo-milestone-grid {
        grid-template-columns: 1fr;
    }
}

.photo-milestone-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.photo-milestone-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    font-size: 13px;
    color: #0f172a;
}

.photo-slot-badge {
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    white-space: nowrap;
}

.badge-empty {
    background: #f1f5f9;
    color: #475569;
}

.badge-pending {
    background: #fef3c7;
    color: #92400e;
}

.badge-approved {
    background: #dcfce7;
    color: #166534;
}

.badge-rejected {
    background: #fee2e2;
    color: #991b1b;
}

.photo-milestone-empty-preview {
    height: 135px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #94a3b8;
    font-size: 24px;
}

.photo-milestone-empty-preview small {
    font-size: 11px;
}

.photo-milestone-img-wrap {
    height: 135px;
    border-radius: 8px;
    overflow: hidden;
    background: #0f172a;
    border: 1px solid #cbd5e1;
}

.photo-milestone-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
    transition: transform 0.2s;
}

.photo-milestone-img:hover {
    transform: scale(1.04);
}

.photo-geo-mini {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
}

.geo-mini-ok {
    background: #dcfce7;
    color: #166534;
}

.geo-mini-warn {
    background: #fef2f2;
    color: #b91c1c;
}

.photo-rejection-box {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 11.5px;
    color: #991b1b;
    line-height: 1.4;
}

.photo-slot-dropzone {
    border: 1.5px dashed #93c5fd;
    background: #f0f9ff;
    border-radius: 8px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    text-align: center;
    transition: all 0.15s;
}

.photo-slot-dropzone.drag-over {
    border-color: #0284c7;
    background: #e0f2fe;
}

.photo-slot-dropzone small {
    font-size: 10.5px;
    color: #64748b;
}

.btn-slot-upload {
    width: 100%;
    padding: 7px 10px;
    background: #0284c7;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-slot-upload:hover:not(:disabled) {
    background: #0369a1;
}

.btn-slot-upload:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

.photo-slot-locked-note {
    font-size: 11px;
    color: #64748b;
    text-align: center;
    padding: 6px;
    background: #f8fafc;
    border-radius: 6px;
}

/* Admin Geotag Verifier Table */
.admin-photo-thumb {
    width: 96px;
    height: 72px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    cursor: zoom-in;
    transition: transform 0.15s;
}

.admin-photo-thumb:hover {
    transform: scale(1.06);
}

.photo-stage-pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.photo-stage-pill.stage-0 {
    background: #e0f2fe;
    color: #0369a1;
}

.photo-stage-pill.stage-50 {
    background: #fef3c7;
    color: #b45309;
}

.photo-stage-pill.stage-100 {
    background: #dcfce7;
    color: #166534;
}

.geotag-status-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.geotag-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 700;
    width: fit-content;
}

.geotag-badge-ok {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.geotag-badge-warn {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.geotag-coords code {
    font-family: monospace;
    font-size: 11px;
    color: #334155;
    background: #f1f5f9;
    padding: 2px 5px;
    border-radius: 4px;
}

.geotag-ts {
    font-size: 11px;
    color: #64748b;
}


/* ==========================================================
   REFACTORED SIDEBAR CARDS & UNIFIED TABBED MODALS
========================================================== */

.input-cpcl-card {
    border-left: 4px solid #16a34a;
}

.input-cpcl-card h2,
.verification-hub-card h2 {
    margin-bottom: 10px;
}

.input-cpcl-grid-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 8px;
}

.input-cpcl-grid-row .btn-input-compact {
    margin: 0 !important;
    padding: 9px 6px;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
}

.input-cpcl-grid-row .upload-btn.btn-input-compact .btn-icon {
    font-size: 13px;
}

.btn-input-photo-full {
    margin-top: 0 !important;
    width: 100%;
    padding: 9px 12px;
    font-size: 12.5px;
}

.verification-hub-card {
    border-left: 4px solid #1565C0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.verification-hub-card h2 {
    margin-bottom: 2px;
}

.verification-hub-card .my-requests-sidebar-btn {
    margin-top: 0 !important;
}

.admin-center-modal-card {
    max-width: 1180px;
    width: 96vw;
    max-height: 90vh;
}

/* Extensible Horizontal Primary Modal Navigation Tabs (Supports 5+ tabs cleanly) */
.unified-modal-nav-tabs {
    display: flex;
    align-items: stretch;
    gap: 4px;
    padding: 0 20px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    overflow-x: auto;
    scrollbar-width: thin;
    flex-shrink: 0;
}

.unified-nav-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 12px 15px;
    border: none;
    border-bottom: 3px solid transparent;
    background: transparent;
    color: #475569;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.unified-nav-tab:hover {
    color: #0f172a;
    background: #f8fafc;
}

.unified-nav-tab.active {
    color: #1565C0;
    border-bottom-color: #1565C0;
    background: #f8fafc;
}

.unified-nav-tab .tab-badge {
    font-size: 11px;
    font-weight: 800;
    padding: 1px 7px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #334155;
}

.unified-nav-tab.active .tab-badge {
    background: #dbeafe;
    color: #1d4ed8;
}

.admin-tab-pane {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#adminAuditLogSection .audit-log-table-container {
    max-height: 52vh;
    overflow: auto;
}


/* Dynamic OPJIT/OPLA Agronomy Field Helper Text */
.field-helper-text {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    line-height: 1.35;
    color: #64748b;
}

.field-helper-text.helper-opjit-active {
    color: #0369a1;
    font-weight: 600;
}


/* ==========================================================
   CASCADING REGION FILTER BAR (PHOTO, POINTS TABLE, POLYGON TABLE)
========================================================== */

.modal-region-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.modal-region-filters-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(130px, 1fr));
    gap: 8px;
    flex: 1;
    width: 100%;
}

.modal-region-filter-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.modal-region-filter-field label {
    font-size: 11px;
    font-weight: 700;
    color: #475569;
}

.modal-region-filter-field select {
    width: 100%;
    padding: 7px 8px;
    font-size: 12px;
    margin-bottom: 0;
}

.modal-region-filter-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.btn-table-export-csv,
.btn-table-export-gis {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 12px;
    border: none;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.16s ease;
}

.btn-table-export-csv {
    background: #0f766e;
    color: #ffffff;
}

.btn-table-export-csv:hover {
    background: #115e59;
}

.btn-table-export-gis {
    background: #1565C0;
    color: #ffffff;
}

.btn-table-export-gis:hover {
    background: #0d47a1;
}

.table-pagination-controls {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-page-nav {
    padding: 4px 10px;
    font-size: 11.5px;
    font-weight: 600;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    color: #334155;
    cursor: pointer;
}

.btn-page-nav:hover:not(:disabled) {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.btn-page-nav:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.page-nav-label {
    font-size: 12px;
    font-weight: 700;
    color: #334155;
}

.photo-geofence-lock-banner {
    margin: 6px 0;
    padding: 7px 10px;
    border-radius: 7px;
    background: #eff6ff;
    border: 1px solid #93c5fd;
    color: #1e40af;
    font-size: 11.5px;
    font-weight: 600;
}

@media (max-width: 780px) {
    .modal-region-filters-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* ==========================================================
   MULTI-SELECT CHECKBOX DROPDOWNS (KELOLA SEMUA TITIK)
========================================================== */

.ms-dropdown {
    position: relative;
    width: 100%;
}

.ms-trigger-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 7px 9px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    background: #ffffff;
    color: #1e293b;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.ms-trigger-btn:hover,
.ms-trigger-btn.is-open {
    border-color: #1565C0;
    box-shadow: 0 0 0 2px rgba(21, 101, 192, 0.14);
}

.ms-trigger-btn.has-selection {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #1d4ed8;
}

.ms-trigger-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.ms-trigger-caret {
    font-size: 11px;
    color: #64748b;
    flex-shrink: 0;
}

.ms-popover {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 100%;
    width: max-content;
    max-width: 290px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
    z-index: 100020;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ms-search-wrap {
    padding: 7px 8px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.ms-search-input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 12px;
    margin-bottom: 0;
    background: #ffffff;
}

.ms-actions-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border-bottom: 1px solid #f1f5f9;
    background: #ffffff;
}

.ms-action-btn {
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #1e293b;
    border-radius: 5px;
    padding: 3px 7px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.ms-action-btn:hover {
    background: #e2e8f0;
}

.ms-selected-meta {
    margin-left: auto;
    font-size: 10.5px;
    font-weight: 700;
    color: #1565C0;
}

.ms-options-list {
    max-height: 220px;
    overflow-y: auto;
    padding: 4px;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.ms-option-item {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 7px;
    border-radius: 5px;
    font-size: 12px;
    color: #1e293b;
    cursor: pointer;
    user-select: none;
}

.ms-option-item:hover {
    background: #eff6ff;
}

.ms-option-item input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: #1565C0;
    flex-shrink: 0;
}

.ms-empty {
    padding: 12px 8px;
    text-align: center;
    font-size: 11.5px;
    color: #94a3b8;
}

/* ==========================================================
   UNIFIED "EXPORT TABLE" (CSV / XLSX) DROPDOWN MENU
========================================================== */

.export-table-dropdown {
    position: relative;
    display: inline-flex;
}

.export-table-dropdown-full {
    width: 100%;
    display: flex;
}

.export-table-dropdown-full .export-table-trigger {
    width: 100%;
}

.export-table-menu {
    display: none;
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    min-width: 215px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
    padding: 5px;
    z-index: 100025;
    flex-direction: column;
    gap: 3px;
}

.export-table-menu-right {
    left: auto;
    right: 0;
}

.export-table-dropdown.is-open .export-table-menu {
    display: flex;
}

.export-table-option {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #0f172a;
    font-size: 12.5px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.14s ease, color 0.14s ease;
}

.export-table-option:hover {
    background: #eff6ff;
    color: #1565C0;
}

/* ==========================================================
   ROLE-AWARE BATCH DELETE (POINTS TABLE & ADMIN REVIEW)
========================================================== */

.points-bulk-action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 10px 14px;
    margin-bottom: 8px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 9px;
}

.points-bulk-left,
.points-bulk-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.points-bulk-count-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    font-size: 12.5px;
    font-weight: 700;
}

.btn-bulk-clear {
    padding: 6px 12px;
    border-radius: 7px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-bulk-clear:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.btn-bulk-delete-admin {
    padding: 7px 14px;
    border-radius: 7px;
    border: none;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.25);
    transition: all 0.15s ease;
}

.btn-bulk-delete-admin:hover:not(:disabled) {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    transform: translateY(-1px);
}

.btn-bulk-delete-admin:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.btn-bulk-propose-delete {
    padding: 7px 14px;
    border-radius: 7px;
    border: none;
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 6px rgba(234, 88, 12, 0.25);
    transition: all 0.15s ease;
}

.btn-bulk-propose-delete:hover:not(:disabled) {
    background: linear-gradient(135deg, #c2410c 0%, #9a3412 100%);
    transform: translateY(-1px);
}

.points-select-all-banner {
    padding: 8px 14px;
    margin-bottom: 8px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    color: #1e3a8a;
    font-size: 12.5px;
    text-align: center;
    font-weight: 500;
}

.btn-select-all-filtered-link {
    background: none;
    border: none;
    color: #1d4ed8;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
    padding: 0 4px;
    font-size: 12.5px;
}

.btn-select-all-filtered-link:hover {
    color: #1e40af;
}

.pt-select-col input[type="checkbox"] {
    width: 15px;
    height: 15px;
    cursor: pointer;
    accent-color: #dc2626;
}

#pointsDirectoryTable tbody tr.pt-row-selected {
    background-color: #fef2f2 !important;
}

.batch-delete-proposal-summary {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 12.5px;
    color: #7f1d1d;
    line-height: 1.5;
}

.batch-delete-proposal-summary ul {
    margin: 6px 0 0 18px;
    padding: 0;
    font-size: 12px;
    color: #991b1b;
}

.sugg-badge-batch-delete {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #f87171;
    font-weight: 800;
}

.btn-sugg-export-xlsx {
    padding: 5px 10px;
    background: #15803d;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.btn-sugg-export-xlsx:hover:not(:disabled) {
    background: #166534;
    transform: translateY(-1px);
}

.btn-sugg-export-xlsx:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.batch-delete-detail-panel {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 12px;
}

.batch-delete-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.batch-delete-inline-table-wrap {
    max-height: 240px;
    overflow: auto;
    border: 1px solid #fecaca;
    border-radius: 6px;
    background: #ffffff;
}

.batch-delete-inline-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11.5px;
}

.batch-delete-inline-table thead {
    position: sticky;
    top: 0;
    background: #fff1f2;
    z-index: 1;
}

.batch-delete-inline-table th,
.batch-delete-inline-table td {
    padding: 6px 9px;
    border-bottom: 1px solid #fee2e2;
    text-align: left;
    white-space: nowrap;
}

.batch-delete-inline-table th {
    color: #991b1b;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
}
