/*
 * Pavitra Portal — page-overrides.css
 * =====================================
 * All page-specific CSS classes consolidated from individual view pages.
 * This replaces all internal <style> tags that were in individual .cshtml files.
 * Uses CSS variables for full light/dark theme compatibility.
 *
 * Included in _Layout.cshtml after pavitra-theme.css and shared-views.css.
 */

/* ── Common page layout ──────────────────────────────── */
.form-container {
    max-width: 700px;
    margin: 20px auto;
    padding: 20px;
    background: var(--pv-surface);
    border-radius: var(--pv-radius);
    box-shadow: var(--pv-shadow);
}

.form-wrapper,
.upload-form-wrapper,
.shala-form-wrapper,
.edit-container {
    /*padding: 16px 20px;*/
    /*background: var(--pv-surface);*/
    border-radius: var(--pv-radius);
    /*border: 1px solid var(--pv-border);*/
    /*margin-bottom: 16px;*/
}

.form-title, .edit-title, .section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--pv-text);
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--pv-primary);
}

.form-inline-row, .form-group-inline, .btn-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.form-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 16px;
    padding-top: 12px;
    /*border-top: 1px solid var(--pv-border);*/
}

/* ── Grid layouts ────────────────────────────────────── */
.grid-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px 20px;
}

.grid-three {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.grid-full { grid-column: 1 / -1; }

.edit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}
/* 2025-08-11: Fix search placeholder not visible on light mode theme switch */
#gatSurveyNoSearch::placeholder {
    color: var(--pv-text-muted, #718096) !important;
    opacity: 1 !important;
}

[data-theme="light"] #gatSurveyNoSearch::placeholder {
    color: #718096 !important;
    opacity: 1 !important;
}

[data-theme="dark"] #gatSurveyNoSearch::placeholder {
    color: #6480A0 !important;
    opacity: 1 !important;
}
/* ── Input helpers ───────────────────────────────────── */
.edit-input, .input-box, .search-input {
    width: 100%;
    padding: 7px 10px;
    font-size: 0.875rem;
    border: 1px solid var(--pv-border);
    border-radius: var(--pv-radius-sm);
    background: var(--pv-surface);
    color: var(--pv-text);
    transition: border-color 0.2s ease;
}

.edit-input:focus, .input-box:focus, .search-input:focus {
    outline: none;
    border-color: var(--pv-primary);
    box-shadow: 0 0 0 3px rgba(27,58,107,0.12);
}

.cell-input {
    width: 110px;
    padding: 4px 6px;
    font-size: 0.82rem;
    border: 1px solid var(--pv-border);
    border-radius: 4px;
    background: var(--pv-surface);
    color: var(--pv-text);
}

.inline-label {
    display: block;
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--pv-text-secondary);
    margin-bottom: 4px;
}

.bold-label {
    font-weight: 700;
    color: var(--pv-text);
}

.same-height { height: 38px; }
.hidden { display: none; }

/* ── Buttons ─────────────────────────────────────────── */
.custom-save-btn, .submit-btn, .update-btn {
    background-color: var(--pv-primary);
    color: #fff;
    border: none;
    padding: 7px 20px;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--pv-radius-sm);
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.custom-save-btn:hover, .submit-btn:hover, .update-btn:hover {
    background-color: var(--pv-primary-dark);
    transform: translateY(-1px);
}

.custom-search-btn, .search-btn {
    background-color: var(--pv-info);
    color: #fff;
    border: none;
    padding: 7px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--pv-radius-sm);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.custom-upload-btn, .upload-btn {
    background-color: var(--pv-success);
    color: #fff;
    border: none;
    padding: 7px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--pv-radius-sm);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.custom-reset-btn {
    background-color: var(--pv-surface-raised);
    color: var(--pv-text-secondary);
    border: 1px solid var(--pv-border);
    padding: 7px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--pv-radius-sm);
    cursor: pointer;
}

.cancel-btn {
    background-color: transparent;
    color: var(--pv-danger);
    border: 1px solid var(--pv-danger);
    padding: 7px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--pv-radius-sm);
    cursor: pointer;
}

.cancel-btn:hover {
    background-color: var(--pv-danger);
    color: #fff;
}

.btn-remove {
    background-color: var(--pv-danger);
    color: #fff;
    border: none;
    padding: 5px 12px;
    font-size: 0.8rem;
    border-radius: var(--pv-radius-sm);
    cursor: pointer;
}

.export-excel-btn, .exportBtn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--pv-success);
    color: #fff;
    border: none;
    padding: 6px 8px;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: var(--pv-radius-sm);
    cursor: pointer;
    float: right;
    margin-right: 8px;
    transition: background 0.2s ease;
}

.export-excel-btn:hover, .exportBtn:hover {
    background: #155e36;
}

.export-pdf-btn {
    background: var(--pv-danger) !important;
    color: #fff;
    border: none;
    padding: 6px 16px;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: var(--pv-radius-sm);
    cursor: pointer;
    float: right;
    margin-right: 8px;
}

.top-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: var(--pv-radius-sm);
    cursor: pointer;
    border: 1px solid var(--pv-border);
    background: var(--pv-surface);
    color: var(--pv-text);
    transition: all 0.2s ease;
}

.dots-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--pv-text-muted);
    padding: 4px 8px;
    border-radius: 4px;
}

.affected-area-btn, .map-action-btn {
    background: var(--pv-primary);
    color: #fff;
    border: none;
    padding: 3px 4px;
    font-size: 0.82rem;
    /*font-weight: 600;*/
    border-radius: var(--pv-radius-sm);
    cursor: pointer;
}

.download-dxf-kml-btn {
    background: var(--pv-info);
    color: #fff;
    border: none;
    padding: 5px 12px;
    font-size: 0.8rem;
    border-radius: var(--pv-radius-sm);
    cursor: pointer;
}

/* ── Table enhancements ──────────────────────────────── */
.table-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 10px;
}

.table-wrapper,
.govt-table-wrapper,
.school-table-wrapper,
.class2-table-wrapper {
    border-radius: var(--pv-radius);
    border: 1px solid var(--pv-border);
    overflow: hidden;
    box-shadow: var(--pv-shadow-sm);
    background: var(--pv-surface);
    max-height: 450px;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--pv-border) transparent;
}

.table-wrapper::-webkit-scrollbar { width: 5px; }
.table-wrapper::-webkit-scrollbar-thumb { background: var(--pv-border); border-radius: 5px; }

.fixed-table {
    width: 100%;
    border-collapse: collapse;
}

.fixed-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--pv-primary);
    color: #fff;
    padding: 10px 12px;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}

.fixed-table tbody td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--pv-border-light);
    color: var(--pv-text);
    font-size: 0.85rem;
}

.ellipsis-cell {
    max-width: 150px;
   /* white-space: nowrap;*/
    overflow: hidden;
    text-overflow: ellipsis;
    /*display: inline-block;*/
    vertical-align: middle;
    cursor: pointer;
}

.action-cell, .action-icon {
    cursor: pointer;
    color: var(--pv-primary);
    border: none;
    background: none;
    font-size: 1.1rem;
    padding: 2px 4px;
    transition: color 0.15s ease;
}

.action-icon:hover { color: var(--pv-primary-dark); }

.delete-icon {
    cursor: pointer;
    color: var(--pv-danger);
    border: none;
    background: none;
    font-size: 1.1rem;
}

.col-srno { width: 50px; }
.col-type { width: 120px; }
.col-date { width: 140px; }
.col-action { width: 120px; }

/* ── Search components ───────────────────────────────── */
.search-container, .search-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--pv-surface);
    border: 1px solid var(--pv-border);
    border-radius: var(--pv-radius-pill);
    padding: 5px 14px;
    min-width: 200px;
}

.search-box input {
    border: none;
    background: transparent;
    color: var(--pv-text);
    font-size: 0.875rem;
    outline: none;
    flex: 1;
}

/* ── Dropdowns ───────────────────────────────────────── */
.typesDrop, .dropdown-select, .dropdown-input {
    width: 100%;
    padding: 8px 10px;
    font-size: 0.875rem;
    border: 1px solid var(--pv-border);
    border-radius: var(--pv-radius-sm);
    background: var(--pv-surface);
    color: var(--pv-text);
    box-sizing: border-box;
    cursor: pointer;
    outline: none;
    appearance: none;
    -moz-appearance: none;
    -webkit-appearance: none;
}

.typesDrop:hover, .dropdown-select:hover { border-color: var(--pv-primary); }
.typesDrop:focus, .dropdown-select:focus {
    border-color: var(--pv-primary);
    box-shadow: 0 0 0 3px rgba(27,58,107,0.12);
}

.dropdown-container, .dropdown-panel,
.multi-dropdown, .shapefile-dropdown-container,
.map-dropdown-container {
    position: relative;
}

.checkbox-dropdown, .dropdown-checkbox {
    position: relative;
    display: inline-block;
}

.checkbox-dropdown-toggle, .dropdown-checkbox-toggle {
    padding: 7px 12px;
    font-size: 0.875rem;
    border: 1px solid var(--pv-border);
    border-radius: var(--pv-radius-sm);
    background: var(--pv-surface);
    color: var(--pv-text);
    cursor: pointer;
}

.checkbox-dropdown-menu, .dropdown-checkbox-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 200;
    background: var(--pv-surface);
    border: 1px solid var(--pv-border);
    border-radius: var(--pv-radius);
    box-shadow: var(--pv-shadow-lg);
    min-width: 200px;
    max-height: 240px;
    overflow-y: auto;
    padding: 6px;
}

.checkbox-dropdown-menu.show,
.dropdown-checkbox-menu.show { display: block; }

.checkbox-group, .dropdown-group {
    padding: 5px 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--pv-text);
    cursor: pointer;
    border-radius: var(--pv-radius-sm);
    transition: background 0.15s;
}

.checkbox-group:hover, .dropdown-group:hover {
    background: var(--pv-surface-raised);
}

/* ── Status badges ───────────────────────────────────── */
.status-completed {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    background: var(--pv-success-light);
    color: var(--pv-success);
}

.status-pending {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    background: var(--pv-warning-light);
    color: var(--pv-warning);
}

.status-issue {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    background: var(--pv-danger-light);
    color: var(--pv-danger);
}

/* ── Survey / Stepper ────────────────────────────────── */
.stepper-container, .stepper { display: flex; gap: 0; margin-bottom: 20px; }

.step {
    flex: 1;
    text-align: center;
    padding: 10px;
    background: var(--pv-surface-raised);
    border-bottom: 3px solid var(--pv-border);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--pv-text-muted);
    transition: all 0.2s ease;
}

.step.active-step {
    border-bottom-color: var(--pv-primary);
    color: var(--pv-primary);
    background: var(--pv-primary-light);
}

.survey, .survey-container {
    background: var(--pv-surface);
    border: 1px solid var(--pv-border);
    border-radius: var(--pv-radius);
    padding: 20px;
    margin-bottom: 16px;
}

.survey-line, .summary-line {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid var(--pv-border-light);
    font-size: 0.875rem;
    color: var(--pv-text);
}

/* ── File upload UI ──────────────────────────────────── */
.file-upload-wrapper {
    position: relative;
    display: inline-block;
}

.file-list, .existing-file-list, .existing-image-list {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.file-item, .existing-file-item, .existing-image-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--pv-surface-raised);
    border: 1px solid var(--pv-border);
    border-radius: var(--pv-radius-sm);
    font-size: 0.8rem;
    color: var(--pv-text);
}

.remove-image-btn {
    background: none;
    border: none;
    color: var(--pv-danger);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0 2px;
}

.file-name {
    font-size: 0.8rem;
    color: var(--pv-text-secondary);
    word-break: break-all;
}

.dxf-file-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--pv-text-muted);
    display: block;
    margin-bottom: 4px;
}

/* ── Map info panels ─────────────────────────────────── */
.left-panel, .right-panel {
    background: var(--pv-surface);
    border: 1px solid var(--pv-border);
    border-radius: var(--pv-radius);
    padding: 14px;
    height: 100%;
}

.info-container, .info-line {
    font-size: 0.85rem;
    color: var(--pv-text);
    padding: 4px 0;
    border-bottom: 1px solid var(--pv-border-light);
}

.legend, .legend-item, .category-legend {
    font-size: 0.78rem;
    color: var(--pv-text-secondary);
}

.result-container, .intersection-results, .no-result-box {
    background: var(--pv-surface-raised);
    border: 1px solid var(--pv-border);
    border-radius: var(--pv-radius);
    padding: 12px;
    margin-top: 10px;
}

.result-item {
    padding: 6px 0;
    border-bottom: 1px solid var(--pv-border-light);
    font-size: 0.85rem;
    color: var(--pv-text);
}

.no-data-message {
    text-align: center;
    padding: 30px;
    color: var(--pv-text-muted);
    font-size: 0.875rem;
}

/* ── Popover menu ────────────────────────────────────── */
.popover-menu, .file-menu {
    position: absolute;
    z-index: 500;
    background: var(--pv-surface);
    border: 1px solid var(--pv-border);
    border-radius: var(--pv-radius);
    box-shadow: var(--pv-shadow-lg);
    min-width: 160px;
    padding: 6px;
    display: none;
}

.popover-menu.show, .file-menu.show { display: block; }

.popover-item {
    padding: 7px 12px;
    font-size: 0.84rem;
    color: var(--pv-text-secondary);
    cursor: pointer;
    border-radius: var(--pv-radius-sm);
    transition: background 0.15s ease;
}

.popover-item:hover {
    background: var(--pv-primary-light);
    color: var(--pv-primary);
}

/* ── Card variants ───────────────────────────────────── */
.class2-card, .hospital-card {
    background: var(--pv-surface);
    border: 1px solid var(--pv-border);
    border-radius: var(--pv-radius);
    padding: 16px;
    box-shadow: var(--pv-shadow-sm);
}

.class2-map-card, .class2-map-placeholder {
    background: var(--pv-surface-raised);
    border: 1px solid var(--pv-border);
    border-radius: var(--pv-radius);
    overflow: hidden;
}

.hospital-info { font-size: 0.85rem; color: var(--pv-text-secondary); }
.hospital-title { font-size: 0.95rem; font-weight: 700; color: var(--pv-text); }

.feature-box, .impact-box {
    background: var(--pv-surface);
    border: 1px solid var(--pv-border);
    border-radius: var(--pv-radius);
    padding: 14px;
}

.feature-title, .impact-title {
    font-weight: 700;
    color: var(--pv-primary);
    margin-bottom: 6px;
}

/* ── Road line styles ────────────────────────────────── */
.road-line { stroke: var(--pv-primary); stroke-width: 3; }
.road-outline { stroke: rgba(0,0,0,0.3); stroke-width: 5; }

/* ── Video / Slideshow ───────────────────────────────── */
.video-container, .video-popup {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: var(--pv-radius);
    overflow: hidden;
}

.video-popup-content {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
}

.slideshow-container { position: relative; overflow: hidden; }
.mySlides { display: none; }
.mySlides.active { display: block; }
.scroll-btn { background: transparent; border: none; cursor: pointer; }
.img-arrow { width: 32px; height: 32px; }

/* ── Government land specific ────────────────────────── */
.govtLandForm, .govt-header, .govt-logo-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.govt-type-cell {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.district-label, .district-name, .district-text {
    font-weight: 700;
    color: var(--pv-primary);
}

/* ── Dropdown / Leaders (About page) ─────────────────── */
.leaders {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.hero {
    text-align: center;
    padding: 24px;
    background: linear-gradient(135deg, var(--pv-primary), var(--pv-primary-mid));
    color: #fff;
    border-radius: var(--pv-radius);
    margin-bottom: 20px;
}

.title, .subtitle {
    color: var(--pv-text);
    font-weight: 700;
}

.subtitle { color: var(--pv-text-secondary); font-weight: 400; }

/* ── Ekatrikaran form ────────────────────────────────── */
.ektrikaranForm, .gatAkarbandform {
    /*display: flex;*/
    flex-direction: column;
    gap: 12px;
    /*background: var(--pv-surface);*/
    /*padding: 16px;*/
    border-radius: var(--pv-radius);
    /*border: 1px solid var(--pv-border);*/
}

/* ── GIS / Shapefile panel ───────────────────────────── */
.main-layout {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.main-container { flex: 1; min-width: 0; }

.right-control {
    /*position: absolute;*/
    top: 10px;
    right: 10px;
    z-index: 400;
}

.option6-container {
    background: var(--pv-surface);
    border: 1px solid var(--pv-border);
    border-radius: var(--pv-radius);
    padding: 12px;
    margin-top: 8px;
}

/* ── Dashboard layout helpers ────────────────────────── */
.dashboard-container, .report-container {
    width: 100%;
    padding: 0;
}

.chart-card {
    background: var(--pv-surface);
    border: 1px solid var(--pv-border);
    border-radius: var(--pv-radius);
    padding: 16px;
    box-shadow: var(--pv-shadow-sm);
}

.chart-row { display: flex; gap: 16px; flex-wrap: wrap; }

.chart-container, .chart-container-bar, .chart-container-govt {
    position: relative;
    width: 100%;
    min-height: 250px;
}

.impact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

/* ── Download/action link styling ────────────────────── */
.download-link {
    color: var(--pv-primary);
    text-decoration: underline;
    cursor: pointer;
    font-weight: 500;
}

.download-link:hover { color: var(--pv-primary-dark); }

.no-underline { text-decoration: none !important; }

/* ── Sticky button bar ───────────────────────────────── */
.sticky-button-bar {
    position: sticky;
    bottom: 0;
    background: var(--pv-surface);
    border-top: 1px solid var(--pv-border);
    padding: 10px 16px;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    z-index: 10;
}

/* ── Logo/govt image ─────────────────────────────────── */
.logo-img-govt {
    height: 50px;
    width: auto;
}

/* ── Sidebar class used on Dashboard pages (not our sidebar) ─── */
.sidebar {
    min-height: 100vh;
    background: linear-gradient(45deg, #85d2e9 0%, #4cc4e6 0%, #104f71 80%, #043751 100%);
}

.sidebar .nav-link { color: #fff; font-weight: 400; }
.sidebar .nav-link.active, .sidebar .nav-link:hover {
    color: #000;
    background-color: #85d2e9;
}

/* ── Show class toggle ────────────────────────────────── */
.show { display: block !important; }

/* ── Left/Right layout panels ────────────────────────── */
.left { float: left; }
.right { float: right; }

/* ── Active nav override (Bootstrap) ─────────────────── */
.active { font-weight: 700; }

/* ── Road tooltip ────────────────────────────────────── */
.road-tooltip {
    background: var(--pv-surface);
    border: 1px solid var(--pv-border);
    border-radius: var(--pv-radius-sm);
    padding: 6px 10px;
    font-size: 0.8rem;
    color: var(--pv-text);
    box-shadow: var(--pv-shadow);
}
/* ════════════════════════════════════════════════════════
   FIX: Index.css redefines .row as display:grid
   which breaks Bootstrap's flex-based grid system.
   This restores Bootstrap .row behaviour on all pages.
   ════════════════════════════════════════════════════════ */

.pv-content .row,
form .row,
.col-lg-12 .row {
    display: flex !important;
    flex-wrap: wrap !important;
    grid-template-columns: unset !important;
    gap: 0 !important;
    margin-right: -12px;
    margin-left: -12px;
}

/* ── Fix: Index.css body {display:flex} breaks page layout ── */
body {
    display: block !important;
    justify-content: unset !important;
}

/* ── Fix: .smaller-font width:200px is too narrow inside grid cols ── */
.smaller-font {
    width: 100% !important;
    max-width: 100%;
}

select.smaller-font,
input.smaller-font {
    width: 100% !important;
}

/* ── Fix: inline margin-left:100px on upload forms ── */
.pv-content form {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* ── Fix: table overflow div has margin-left:-40px inline ── */
.pv-content > div[style*="overflow-y"] {
    margin-left: 0 !important;
    width: 100% !important;
}

/* ── Fix: table should use full width ── */
.pv-content table {
    width: 100%;
}
/* ── Print page overrides ────────────────────────────── */
@media print {
    .form-actions, .sticky-button-bar,
    .search-container, .table-actions { display: none !important; }
    .table-wrapper, .govt-table-wrapper { max-height: none !important; overflow: visible !important; }
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 768px) {
    .grid-form { grid-template-columns: 1fr 1fr; }
    .grid-three { grid-template-columns: 1fr; }
    .main-layout { flex-direction: column; }
    .export-excel-btn, .exportBtn { float: none; width: 100%; }
    .chart-row { flex-direction: column; }
}

@media (max-width: 480px) {
    .grid-form { grid-template-columns: 1fr; }
    .form-inline-row { flex-direction: column; align-items: stretch; }
}
/* ════════════════════════════════════════════════════════
   FIX: GovernmentLand pages — internal <style> conflicts
   ════════════════════════════════════════════════════════ */

/* Fix 1: Internal style has `form { text-align: center }`
   which centers Bootstrap column labels and breaks the grid */
.govtLandForm,
.govtLandForm form,
.govtLandForm .row,
.govtLandForm label,
.govtLandForm .bold-label {
    text-align: left !important;
}

/* Fix 2: Internal style has `button { background:#0b1036 }`
   which overrides ALL Bootstrap .btn classes globally */
.btn-success {
    background-color: #1A7F4B !important;
    border-color: #1A7F4B !important;
}

.btn-primary {
    background-color: var(--pv-primary, #1B3A6B) !important;
    border-color: var(--pv-primary, #1B3A6B) !important;
}

.btn-danger {
    background-color: #B91C1C !important;
    border-color: #B91C1C !important;
}

.btn-outline-danger {
    background-color: transparent !important;
    color: #B91C1C !important;
    border-color: #B91C1C !important;
}

/* Fix 3: Submit button has inline style="margin-left:600px"
   which pushes it off-screen on smaller viewports */
.govtLandForm div[style*="margin-left"] {
    margin-left: 0 !important;
    display: flex;
    justify-content: flex-end;
}

/* Fix 4: .checkbox-dropdown-menu goes behind other elements
   and the .checkbox-dropdown-toggle needs proper width */
.checkbox-dropdown {
    position: relative;
    z-index: 100;
}

.checkbox-dropdown-menu {
    z-index: 1060 !important;
    width: 100% !important;
    max-height: 260px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.checkbox-dropdown-toggle {
    width: 100%;
    border-radius: 6px;
    background: var(--pv-surface, #fff) !important;
    color: var(--pv-text, #333) !important;
    border: 1px solid var(--pv-border, #ccc) !important;
    padding: 6px 10px;
    cursor: pointer;
    text-align: left;
}

.checkbox-dropdown-menu label {
    color: var(--pv-text, #333) !important;
    background: var(--pv-surface, #fff) !important;
}

    .checkbox-dropdown-menu label:hover {
        background: var(--pv-surface-raised, #f2f2f2) !important;
    }

/* Fix: .table-container has padding-left:20px which shifts table */
.table-container {
    padding-left: 0 !important;
    overflow-x: auto !important;
}

/* Fix: #surveySearch has margin-left:30px from internal style */
#surveySearch {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 300px;
}

/* Fix: .exportBtn has float:right + margin-right:50px
   which pushes it outside container on small screens */


/* Fix: AddGovtLandType page — input is too small */
.pv-content input[type="text"]:not(.smaller-font):not(.smaller-height),
.pv-content select:not(.smaller-font):not(.smaller-height) {
   /* width: 100%;*/
    box-sizing: border-box;
}

/* Dark mode: govtLandForm inputs and selects */
[data-theme="dark"] .govtLandForm input,
[data-theme="dark"] .govtLandForm select,
[data-theme="dark"] .checkbox-dropdown-toggle,
[data-theme="dark"] .checkbox-dropdown-menu,
[data-theme="dark"] .checkbox-dropdown-menu label {
    background: var(--pv-surface, #162032) !important;
    color: var(--pv-text, #E2EAF8) !important;
    border-color: var(--pv-border, #2A3A52) !important;
}

[data-theme="dark"] .typesDrop {
    background: var(--pv-surface, #162032) !important;
    color: var(--pv-text, #E2EAF8) !important;
    border-color: var(--pv-border, #2A3A52) !important;
}

