/* Global */
body {
    margin: 0;
    background: linear-gradient(135deg, #f4f6f9 0%, #eef8f0 100%);
    font-family: "Segoe UI", Arial, sans-serif;
    color: #333;
}

/* Brand styles for header */
.header-card .brand-row {
    display: flex;
    align-items: center;
    gap: 0px;
    padding: 20px 20px 14px 28px;
}

.brand-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 8px;
    margin-right: 12px;
}

.brand-text {
    flex: 1;
}

.brand-title {
    font-weight: 800;
    color: #1f6f3f;
}

.brand-sub {
    font-size: 13px;
    color: #6d7a71;
    font-weight: 500;
}

.sidebar-card {
    background: #fff;
    border-radius: 12px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #f0f4f0;
}

.header-card {
    padding: 0;
}

/* Layout */
#main-layout {
    display: flex;
    min-height: 100vh;
    align-items: stretch;
}

/* Sidebar */
#sidebar {
    width: 380px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    font-weight: 800;
    font-size: 24px;
    color: #125d2e;
    padding: 24px 20px 14px 28px;
    letter-spacing: 0.4px;
    background: linear-gradient(90deg, #166d3b 0%, #219150 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.search-panel {
    padding: 0 22px 12px 28px;
}

.search-panel input {
    width: 68%;
    border-radius: 10px;
    border: 2px solid #e0efe1;
    padding: 9px 15px;
    font-size: 15px;
    margin-right: 10px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.search-panel input:focus {
    border-color: #166d3b;
    box-shadow: 0 0 6px rgba(22, 109, 59, 0.15);
    outline: none;
}

.search-panel button {
    background: linear-gradient(135deg, #219150 0%, #166d3b 100%);
    color: #fff;
    border: none;
    font-size: 14px;
    padding: 8px 20px;
    border-radius: 10px;
    cursor: pointer;
}

/* Catalog list */
#catalog-list {
    flex: 1;
    margin: 12px 18px 20px 28px;
    background: #ffffff;
    border-radius: 12px;
    padding: 12px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.03),
        0 6px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f6f0;
    overflow-y: auto;
    max-height: 54vh;
}

/* Katalog item */
.catalog-item {
    background: linear-gradient(180deg, #ffffff 0%, #fbfffb 100%);
    border-radius: 10px;
    margin-bottom: 12px;
    padding: 12px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(20, 60, 30, 0.03);
    border: 1px solid #eef6ed;
}

.cat-thumb {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 14px;
    background: linear-gradient(135deg, #e8f1e9 0%, #d4edda 100%);
    border: 1px solid #cfe9d3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #3a7a4a;
}

.catalog-meta {
    flex: 1;
    padding-right: 10px;
}

.cat-title {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 4px;
    color: #1f6f3f;
}

.cat-desc {
    font-size: 13px;
    color: #6c757d;
}

.cat-checkbox {
    accent-color: #166d3b;
    width: 20px;
    height: 20px;
    cursor: pointer;
    border-radius: 4px;
}

/* FORM input */
.input-section {
    background: linear-gradient(135deg, #fbfbfb 0%, #f1f3f4 100%);
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    padding: 18px 22px 16px 22px;
    margin: 10px 18px 22px 28px;
    border: 1px solid #eef6ef;
    max-height: 400px;
    overflow-y: auto;
}

.input-section h2 {
    font-size: 17px;
    color: #166d3b;
    margin-bottom: 12px;
    margin-top: 0;
    font-weight: 700;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.form-group input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.25s ease;
}

.form-group input:focus {
    border-color: #166d3b;
    outline: none;
}

/* Small table styling */
.table-xs {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    font-size: 14px;
    margin-bottom: 12px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.table-xs th,
.table-xs td {
    border: 1px solid #e6ece4;
    padding: 9px 10px;
    background: #fbfdfb;
    text-align: left;
}

.table-xs th {
    background: linear-gradient(135deg, #e9f5ec 0%, #dff0df 100%);
    font-weight: 700;
    color: #495057;
}

.table-xs input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    box-sizing: border-box;
    transition: border-color 0.25s ease;
}

.table-xs input:focus {
    border-color: #166d3b;
    outline: none;
}

/* Buttons */
.form-btn-group {
    margin-top: 10px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.baris-btn,
.form-btn {
    background: linear-gradient(135deg, #166d3b 0%, #219150 100%);
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.hapus-btn {
    border: 2px solid #dc3545;
    background: #fff;
    color: #dc3545;
    border-radius: 6px;
    font-size: 13px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.hapus-btn:hover {
    background: #dc3545;
    color: #fff;
}

/* General Button Styles */
.btn {
    display: inline-block;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-sizing: border-box;
}

.btn-primary {
    background: linear-gradient(135deg, #166d3b 0%, #219150 100%);
    color: #fff;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #219150 0%, #166d3b 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(22, 109, 59, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    color: #fff;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #7f8c8d 0%, #95a5a6 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(127, 140, 141, 0.3);
}

.btn-cancel {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    color: #fff;
    text-decoration: none;
}

.btn-cancel:hover {
    background: linear-gradient(135deg, #7f8c8d 0%, #95a5a6 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(127, 140, 141, 0.3);
}

/* MAP AREA & PREVIEW FRAME */
.map-area {
    flex: 1;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.6) 0%,
        rgba(250, 255, 250, 0.6) 100%
    );
}

/* Frame yang memberi batas (border) dan background seperti peta jabar preview */
.map-frame {
    width: calc(100% - 40px);
    height: calc(100vh - 40px);
    background: #ffffff;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 10px 40px rgba(12, 40, 20, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    border: 1px solid #e6f2e8;
    display: flex;
    flex-direction: column;
}

/* Header teks kecil di atas preview */
.map-preview-header {
    font-weight: 700;
    color: #185b36;
    margin-bottom: 12px;
    font-size: 16px;
}

/* Div map canvas: ini yang menjadi leaflet container */
.map-canvas {
    flex: 1;
    min-height: 0; /* Penting untuk flex container agar bisa shrink */
    border-radius: 10px;
    overflow: hidden;
    border: 3px solid #eef7ee; /* batas/padding halus di sekitar tiles */
    box-shadow: 0 8px 24px rgba(32, 80, 44, 0.06);
    background: #f6fbf6;
}

/* Pastikan leaflet container mengikuti ukuran .map-canvas */
#pamekasan-map,
#pamekasan-map .leaflet-container {
    height: 100%;
    width: 100%;
}

/* Styling kontrol Leaflet agar serasi */
.leaflet-control-zoom,
.leaflet-bar {
    box-shadow: 0 6px 18px rgba(20, 60, 30, 0.08);
    border-radius: 6px;
    overflow: hidden;
}

.leaflet-control-zoom a {
    background: #ffffff;
    color: #1f6f3f;
    border: none;
    width: 36px;
    height: 36px;
    line-height: 34px;
}

.leaflet-control-attribution {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 6px;
    padding: 4px 6px;
}

/* Responsive */
@media (max-width: 950px) {
    #main-layout {
        flex-direction: column;
    }

    #sidebar-catalog {
        width: 100vw;
        border: none;
        box-shadow: none;
    }

    .map-frame {
        width: calc(100% - 20px);
        height: 55vh;
        padding: 12px;
        margin-top: 8px;
    }
}
/* Global */
body {
    margin: 0;
    background: linear-gradient(135deg, #f4f6f9 0%, #eef8f0 100%);
    font-family: "Segoe UI", Arial, sans-serif;
    color: #333;
}

/* Layout */
#main-layout {
    display: flex;
    min-height: 100vh;
    align-items: stretch;
}

/* Sidebar */
#sidebar-catalog {
    width: 380px;
    background: linear-gradient(180deg, #ffffff 0%, #f9f9f9 100%);
    border-right: 1px solid #e6ece4;
    box-shadow: 2px 0 30px rgba(18, 52, 30, 0.06);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-bottom: 20px;
    overflow-y: auto;
}

.sidebar-header {
    font-weight: 800;
    font-size: 24px;
    color: #125d2e;
    padding: 24px 20px 14px 28px;
    letter-spacing: 0.4px;
    background: linear-gradient(90deg, #166d3b 0%, #219150 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.search-panel {
    padding: 0 22px 12px 28px;
}

.search-panel input {
    width: 68%;
    border-radius: 10px;
    border: 2px solid #e0efe1;
    padding: 9px 15px;
    font-size: 15px;
    margin-right: 10px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.search-panel input:focus {
    border-color: #166d3b;
    box-shadow: 0 0 6px rgba(22, 109, 59, 0.15);
    outline: none;
}

.search-panel button {
    background: linear-gradient(135deg, #219150 0%, #166d3b 100%);
    color: #fff;
    border: none;
    font-size: 14px;
    padding: 8px 20px;
    border-radius: 10px;
    cursor: pointer;
}

/* Catalog list */
#catalog-list {
    flex: 1;
    margin: 12px 18px 20px 28px;
    background: #ffffff;
    border-radius: 12px;
    padding: 12px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.03),
        0 6px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f6f0;
    overflow-y: auto;
    max-height: 54vh;
}

/* Katalog item */
.catalog-item {
    background: linear-gradient(180deg, #ffffff 0%, #fbfffb 100%);
    border-radius: 10px;
    margin-bottom: 12px;
    padding: 12px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(20, 60, 30, 0.03);
    border: 1px solid #eef6ed;
}

/* ICON (menggantikan thumbnail gambar) */
.cat-icon {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    background: linear-gradient(180deg, #f3fbf4 0%, #eaf7ea 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 14px;
    border: 1px solid #cfe9d3;
    flex: 0 0 52px;
}

/* allow svg to size */
.cat-icon svg {
    display: block;
    width: 28px;
    height: 28px;
}

/* category-specific subtle backgrounds (helps visual grouping) */
.cat-icon--road {
    background: linear-gradient(180deg, #eef6ff, #f7fbff);
    border-color: #cfe6ff;
}
.cat-icon--river {
    background: linear-gradient(180deg, #eef9ff, #f7feff);
    border-color: #d8f2ff;
}
.cat-icon--admin {
    background: linear-gradient(180deg, #fff4f3, #fff9f8);
    border-color: #ffd7d2;
}
.cat-icon--agregat {
    background: linear-gradient(180deg, #fff9f0, #fffef8);
    border-color: #ffeccf;
}
.cat-icon--poi {
    background: linear-gradient(180deg, #f3fbf4, #eefbf0);
    border-color: #d8f1df;
}
.cat-icon--marker {
    background: linear-gradient(180deg, #f4fff7, #f7fff9);
    border-color: #d8f9df;
}

/* Meta and checkbox */
.catalog-meta {
    flex: 1;
    padding-right: 10px;
}

.cat-title {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 4px;
    color: #1f6f3f;
}

.cat-desc {
    font-size: 13px;
    color: #6c757d;
}

.cat-checkbox {
    accent-color: #166d3b;
    width: 20px;
    height: 20px;
    cursor: pointer;
    border-radius: 4px;
}

/* FORM input */
.input-section {
    background: linear-gradient(135deg, #fbfbfb 0%, #f1f3f4 100%);
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    padding: 18px 22px 16px 22px;
    margin: 10px 18px 22px 28px;
    border: 1px solid #eef6ef;
}

.input-section h2 {
    font-size: 17px;
    color: #166d3b;
    margin-bottom: 12px;
    margin-top: 0;
    font-weight: 700;
}

/* Small table styling */
.table-xs {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    font-size: 14px;
    margin-bottom: 12px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.table-xs th,
.table-xs td {
    border: 1px solid #e6ece4;
    padding: 9px 10px;
    background: #fbfdfb;
    text-align: left;
}

.table-xs th {
    background: linear-gradient(135deg, #e9f5ec 0%, #dff0df 100%);
    font-weight: 700;
    color: #495057;
}

/* Buttons */
.form-btn-group {
    margin-top: 10px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.baris-btn,
.form-btn {
    background: linear-gradient(135deg, #166d3b 0%, #219150 100%);
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.hapus-btn {
    border: 2px solid #dc3545;
    background: #fff;
    color: #dc3545;
    border-radius: 6px;
    font-size: 13px;
    padding: 6px 10px;
    cursor: pointer;
}

.delete-btn {
    border: 2px solid #dc3545;
    background: #fff;
    color: #dc3545;
    border-radius: 6px;
    font-size: 13px;
    padding: 6px 10px;
    cursor: pointer;
    margin-left: 8px;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.delete-btn:hover {
    background: #dc3545;
    color: #fff;
}

/* MAP AREA & PREVIEW FRAME */
.map-area {
    flex: 1;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.6) 0%,
        rgba(250, 255, 250, 0.6) 100%
    );
}

/* Frame yang memberi batas (border) dan background seperti peta jabar preview */
.map-frame {
    width: calc(100% - 40px);
    height: calc(100vh - 40px);
    background: #ffffff;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 10px 40px rgba(12, 40, 20, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    border: 1px solid #e6f2e8;
    display: flex;
    flex-direction: column;
}

/* Header teks kecil di atas preview */
.map-preview-header {
    font-weight: 700;
    color: #185b36;
    margin-bottom: 12px;
    font-size: 16px;
}

/* Div map canvas: ini yang menjadi leaflet container */
.map-canvas {
    flex: 1;
    min-height: 0; /* Penting untuk flex container agar bisa shrink */
    border-radius: 10px;
    overflow: hidden;
    border: 3px solid #eef7ee; /* batas/padding halus di sekitar tiles */
    box-shadow: 0 8px 24px rgba(32, 80, 44, 0.06);
    background: #f6fbf6;
}

/* Pastikan leaflet container mengikuti ukuran .map-canvas */
#pamekasan-map,
#pamekasan-map .leaflet-container {
    height: 100%;
    width: 100%;
}

/* Styling kontrol Leaflet agar serasi */
.leaflet-control-zoom,
.leaflet-bar {
    box-shadow: 0 6px 18px rgba(20, 60, 30, 0.08);
    border-radius: 6px;
    overflow: hidden;
}

.leaflet-control-zoom a {
    background: #ffffff;
    color: #1f6f3f;
    border: none;
    width: 36px;
    height: 36px;
    line-height: 34px;
}

.leaflet-control-attribution {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 6px;
    padding: 4px 6px;
}

/* Responsive */
@media (max-width: 950px) {
    #main-layout {
        flex-direction: column;
    }

    #sidebar-catalog {
        width: 100vw;
        border: none;
        box-shadow: none;
    }

    .map-frame {
        width: calc(100% - 20px);
        height: 55vh;
        padding: 12px;
        margin-top: 8px;
    }
}
/* Global */
body {
    margin: 0;
    background: linear-gradient(135deg, #f4f6f9 0%, #eef8f0 100%);
    font-family: "Segoe UI", Arial, sans-serif;
    color: #333;
}

/* Layout */
#main-layout {
    display: flex;
    min-height: 100vh;
    align-items: stretch;
}

/* Sidebar */
#sidebar-catalog {
    width: 380px;
    background: linear-gradient(180deg, #ffffff 0%, #f9f9f9 100%);
    border-right: 1px solid #e6ece4;
    box-shadow: 2px 0 30px rgba(18, 52, 30, 0.06);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-bottom: 20px;
    overflow-y: auto;
}

.sidebar-header {
    font-weight: 800;
    font-size: 24px;
    color: #125d2e;
    padding: 24px 20px 14px 28px;
    letter-spacing: 0.4px;
    background: linear-gradient(90deg, #166d3b 0%, #219150 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.search-panel {
    padding: 0 22px 12px 28px;
}
.search-panel input {
    width: 68%;
    border-radius: 10px;
    border: 2px solid #e0efe1;
    padding: 9px 15px;
    font-size: 15px;
    margin-right: 10px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.search-panel input:focus {
    border-color: #166d3b;
    box-shadow: 0 0 6px rgba(22, 109, 59, 0.15);
    outline: none;
}
.search-panel button {
    background: linear-gradient(135deg, #219150 0%, #166d3b 100%);
    color: #fff;
    border: none;
    font-size: 14px;
    padding: 8px 20px;
    border-radius: 10px;
    cursor: pointer;
}

/* Catalog list */
#catalog-list {
    flex: 1;
    margin: 12px 18px 20px 28px;
    background: #ffffff;
    border-radius: 12px;
    padding: 12px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.03),
        0 6px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f6f0;
    overflow-y: auto;
    max-height: 54vh;
}

/* Katalog item */
.catalog-item {
    background: linear-gradient(180deg, #ffffff 0%, #fbfffb 100%);
    border-radius: 10px;
    margin-bottom: 12px;
    padding: 12px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(20, 60, 30, 0.03);
    border: 1px solid #eef6ed;
}

/* SYMBOL ICON: pin-style glyph (no colored circle background) */
.cat-symbol {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex: 0 0 36px;
    color: #222; /* pin glyph color; adjust if you want colored pins */
}

/* scale svg inside */
.cat-symbol svg {
    width: 20px;
    height: 20px;
    display: block;
}

/* slight visual variants */
.cat-symbol--pin {
    color: #222;
}
.cat-symbol--hollow {
    color: #222;
    opacity: 0.95;
}
.cat-symbol--dot {
    color: #222;
}

/* Meta and checkbox */
.catalog-meta {
    flex: 1;
    padding-right: 10px;
}
.cat-title {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 4px;
    color: #1f6f3f;
}
.cat-desc {
    font-size: 13px;
    color: #6c757d;
}
.cat-checkbox {
    accent-color: #166d3b;
    width: 20px;
    height: 20px;
    cursor: pointer;
    border-radius: 4px;
}

/* FORM input */
.input-section {
    background: linear-gradient(135deg, #fbfbfb 0%, #f1f3f4 100%);
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    padding: 18px 22px 16px 22px;
    margin: 10px 18px 22px 28px;
    border: 1px solid #eef6ef;
}
.input-section h2 {
    font-size: 17px;
    color: #166d3b;
    margin-bottom: 12px;
    margin-top: 0;
    font-weight: 700;
}

/* small table */
.table-xs {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    font-size: 14px;
    margin-bottom: 12px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}
.table-xs th,
.table-xs td {
    border: 1px solid #e6ece4;
    padding: 9px 10px;
    background: #fbfdfb;
    text-align: left;
}
.table-xs th {
    background: linear-gradient(135deg, #e9f5ec 0%, #dff0df 100%);
    font-weight: 700;
    color: #495057;
}

/* Buttons */
.form-btn-group {
    margin-top: 10px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}
.baris-btn,
.form-btn {
    background: linear-gradient(135deg, #166d3b 0%, #219150 100%);
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.hapus-btn {
    border: 2px solid #dc3545;
    background: #fff;
    color: #dc3545;
    border-radius: 6px;
    font-size: 13px;
    padding: 6px 10px;
    cursor: pointer;
}

/* MAP AREA & PREVIEW FRAME */
.map-area {
    flex: 1;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.6) 0%,
        rgba(250, 255, 250, 0.6) 100%
    );
}
.map-frame {
    width: calc(100% - 40px);
    height: calc(100vh - 40px);
    background: #ffffff;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 10px 40px rgba(12, 40, 20, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    border: 1px solid #e6f2e8;
    display: flex;
    flex-direction: column;
}
.map-preview-header {
    font-weight: 700;
    color: #185b36;
    margin-bottom: 12px;
    font-size: 16px;
}
.map-canvas {
    flex: 1;
    min-height: 0; /* Penting untuk flex container agar bisa shrink */
    border-radius: 10px;
    overflow: hidden;
    border: 3px solid #eef7ee; /* batas/padding halus di sekitar tiles */
    box-shadow: 0 8px 24px rgba(32, 80, 44, 0.06);
    background: #f6fbf6;
}
#pamekasan-map,
#pamekasan-map .leaflet-container {
    height: 100%;
    width: 100%;
}
.leaflet-control-zoom,
.leaflet-bar {
    box-shadow: 0 6px 18px rgba(20, 60, 30, 0.08);
    border-radius: 6px;
    overflow: hidden;
}
.leaflet-control-zoom a {
    background: #ffffff;
    color: #1f6f3f;
    border: none;
    width: 36px;
    height: 36px;
    line-height: 34px;
}
.leaflet-control-attribution {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 6px;
    padding: 4px 6px;
}

/* Responsive */
@media (max-width: 950px) {
    #main-layout {
        flex-direction: column;
    }
    #sidebar-catalog {
        width: 100vw;
        border: none;
        box-shadow: none;
    }
    .map-frame {
        width: calc(100% - 20px);
        height: 55vh;
        padding: 12px;
        margin-top: 8px;
    }
}
/* Login Button Styles */
.login-section {
    text-align: center;
}

.login-btn {
    background: linear-gradient(135deg, #166d3b 0%, #219150 100%);
    color: #fff;
    border: none;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(22, 109, 59, 0.3);
}
/* Login Link Styles */
.login-link {
    font-weight: bold;
    font-size: 18px;
    color: #166d3b;
    text-decoration: none;
    transition: color 0.25s ease;
}

.login-link:hover {
    color: #219150;
}

/* ============================================
   CHOROPLETH LEGEND STYLES
   Legend untuk peta agregat di bagian bawah peta
   ============================================ */
.choropleth-legend {
    background: linear-gradient(180deg, #ffffff 0%, #f9faf9 100%);
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 4px 16px rgba(20, 60, 30, 0.08);
    border: 1px solid #e6f2e8;
    position: relative;
    width: 100%;
    margin-top: 10px;
}

/* Map frame positioning for legend overlay */
.map-frame {
    position: relative;
}

.legend-title {
    font-weight: 800;
    font-size: 16px;
    color: #166d3b;
    margin-bottom: 4px;
    letter-spacing: 0.3px;
}

.legend-subtitle {
    font-weight: 600;
    font-size: 14px;
    color: #495057;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e6ece4;
}

.legend-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-top: 12px;
}

.legend-table th,
.legend-table td {
    border: 1px solid #e6ece4;
    padding: 8px 10px;
    text-align: left;
    background: #fbfdfb;
}

.legend-table th {
    background: linear-gradient(135deg, #e9f5ec 0%, #dff0df 100%);
    font-weight: 700;
    color: #495057;
    text-align: center;
}

.legend-color-cell {
    text-align: center;
    width: 50px;
}

.legend-color {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: inline-block;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.legend-label {
    font-weight: 500;
    color: #333;
}

.legend-value {
    font-weight: 700;
    color: #166d3b;
    background: linear-gradient(135deg, #e9f5ec 0%, #dff0df 100%);
    padding: 4px 10px;
    border-radius: 12px;
    text-align: center;
    min-width: 60px;
    display: inline-block;
}

/* Responsive legend */
@media (max-width: 950px) {
    .choropleth-legend {
        max-height: 150px;
        padding: 12px 16px;
    }

    .legend-title {
        font-size: 14px;
    }

    .legend-subtitle {
        font-size: 12px;
    }

    .legend-item {
        padding: 4px 6px;
    }

    .legend-color {
        width: 20px;
        height: 20px;
    }

    .legend-label,
    .legend-value {
        font-size: 12px;
    }
}

/* Delete button styling */
.delete-btn {
    background: #fff;
    border: 2px solid #dc3545;
    color: #dc3545;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.delete-btn:hover {
    background: #dc3545;
    color: #fff;
}

/* Pin symbol styling */
.cat-symbol {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: linear-gradient(180deg, #f3fbf4 0%, #eaf7ea 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    border: 1px solid #cfe9d3;
    flex-shrink: 0;
    color: #166d3b;
}

.cat-symbol svg {
    width: 24px;
    height: 24px;
}

.cat-symbol--pin {
    color: #166d3b;
}
