/* Premium Global GIS Workbench UX Styles */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(152, 162, 179, 0.4);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(152, 162, 179, 0.7);
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(152, 162, 179, 0.4) transparent;
}

/* Force Lucide icons to inherit color globally to prevent them from turning dark in some environments */
.lucide {
    stroke: currentColor !important;
    color: currentColor !important;
}

button {
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-panel {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(234, 236, 240, 0.6);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.attribute-table {
    border-collapse: collapse;
    margin-top: 8px;
    width: 100%;
    max-width: 800px;
}

.attribute-table th,
.attribute-table td {
    border: 1px solid #999;
    padding: 6px;
    text-align: left;
}

.attribute-table th {
    background: #eee;
}

.attribute-table button {
    margin-right: 4px;
}

.attribute-table tr.is-selected {
    background: #fff3cd;
}

.attribute-table tbody tr {
    cursor: pointer;
}

/* Premium styling for editable table cells and safety lock transitions */
.attribute-table td.editable-cell {
    position: relative;
    transition: background 0.15s, box-shadow 0.15s;
}

.attribute-table td.editable-cell:hover {
    background: #fdf3e7 !important;
    box-shadow: inset 0 0 0 1px #ff9800;
}

.safety-toggle-button:hover {
    filter: brightness(1.08);
}

.main-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    margin-bottom: 12px;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.danger-button {
    border: 1px solid #b00020;
    color: #b00020;
    background: #fff5f5;
}

.danger-button:hover {
    background: #ffe0e0;
}

.point-form,
.line-form,
.polygon-form {
    display: grid;
    grid-template-columns: max-content minmax(220px, 360px);
    gap: 8px;
    align-items: center;
    margin-top: 16px;
    margin-bottom: 16px;
    max-width: 560px;
}

.point-form h2,
.line-form h2,
.polygon-form h2 {
    grid-column: 1 / -1;
    margin-bottom: 4px;
}

.point-form button,
.line-form button,
.polygon-form button,
.line-form small,
.polygon-form small {
    grid-column: 2;
}

.line-form textarea,
.polygon-form textarea {
    min-height: 100px;
    font-family: monospace;
}

#spatialInfo {
    max-width: 800px;
    background: transparent;
    padding: 0;
    margin-top: 8px;
    margin-bottom: 16px;
}

.spatial-info-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 8px;
    margin-bottom: 6px;
}

.spatial-info-row span {
    font-family: monospace;
}

#mapView {
    margin-top: 8px;
    margin-bottom: 16px;
    background: #aad3df;
    position: relative;
}

.map-svg {
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    border: none !important;
    background: transparent !important;
}

.map-point,
.map-line,
.map-polygon {
    cursor: pointer;
}

/* Disable pointer events on features when not in select mode or move feature mode to allow drawing/editing clicks to pass through */
.map-svg:not(.is-select-mode):not(.is-move-feature-mode) .map-point,
.map-svg:not(.is-select-mode):not(.is-move-feature-mode) .map-line,
.map-svg:not(.is-select-mode):not(.is-move-feature-mode) .map-polygon {
    pointer-events: none;
}

/* Disable pointer events on draft geometries to prevent blocking clicks when drawing shapes */
.map-draft-line,
.map-draft-point,
.map-draft-polygon,
.map-draft-polygon-line {
    pointer-events: none;
}

.map-point {
    fill: #d32f2f;
    stroke: white;
    stroke-width: 1.5;
}

.map-line {
    fill: none;
    stroke: #1976d2;
    stroke-width: 2;
}

.map-polygon {
    fill: rgba(76, 175, 80, 0.25);
    stroke: #388e3c;
    stroke-width: 2;
}

.map-point.is-selected {
    fill: #ff9800;
    stroke: #111;
    stroke-width: 2;
}

.map-line.is-selected {
    stroke: #ff9800;
    stroke-width: 5;
}

.map-polygon.is-selected {
    fill: rgba(255, 152, 0, 0.35);
    stroke: #ff9800;
    stroke-width: 4;
}

/* Guided cutting flow targets (Green) */
.map-point.is-cutting-target {
    fill: #4caf50 !important;
    stroke: #2e7d32 !important;
    stroke-width: 2.5 !important;
}
.map-line.is-cutting-target {
    stroke: #4caf50 !important;
    stroke-width: 5 !important;
}
.map-polygon.is-cutting-target {
    fill: rgba(76, 175, 80, 0.45) !important;
    stroke: #2e7d32 !important;
    stroke-width: 4.5 !important;
}

/* Guided cutting flow cutters (Red) */
.map-point.is-cutting-cutter {
    fill: #f44336 !important;
    stroke: #c62828 !important;
    stroke-width: 2.5 !important;
}
.map-line.is-cutting-cutter {
    stroke: #f44336 !important;
    stroke-width: 5 !important;
}
.map-polygon.is-cutting-cutter {
    fill: rgba(244, 67, 54, 0.45) !important;
    stroke: #c62828 !important;
    stroke-width: 4.5 !important;
}

.map-tools {
    max-width: 800px;
    border: 1px solid #ccc;
    background: #fafafa;
    padding: 12px;
    margin-top: 16px;
    margin-bottom: 16px;
}

.map-tools h2 {
    margin-top: 0;
}

.tool-button {
    margin-right: 6px;
    margin-bottom: 6px;
}

.tool-button.is-active {
    border: 2px solid #1976d2;
    background: #e3f2fd;
    font-weight: bold;
}

.interaction-mode-status {
    margin-bottom: 0;
    font-size: 0.95rem;
    color: #444;
}

.map-svg.is-draw-point-mode {
    cursor: crosshair;
}

.map-svg.is-draw-line-mode {
    cursor: crosshair;
}

.map-draft-line {
    fill: none;
    stroke: #8e24aa;
    stroke-width: 3;
    stroke-dasharray: 8 6;
}

.map-draft-point {
    fill: #8e24aa;
    stroke: white;
    stroke-width: 1.5;
}

.map-svg.is-draw-polygon-mode {
    cursor: crosshair;
}

.map-draft-polygon {
    fill: rgba(142, 36, 170, 0.18);
    stroke: #8e24aa;
    stroke-width: 3;
    stroke-dasharray: 8 6;
}

.map-draft-polygon-line {
    fill: none;
    stroke: #8e24aa;
    stroke-width: 3;
    stroke-dasharray: 8 6;
}

.map-svg.is-edit-vertices-mode {
    cursor: crosshair;
}

.map-vertex-handle {
    fill: #ffffff;
    stroke: #6a1b9a;
    stroke-width: 2;
    cursor: pointer;
}

.map-vertex-handle.is-selected {
    fill: #ffeb3b;
    stroke: #111;
    stroke-width: 3;
}

.map-svg.is-add-vertex-mode {
    cursor: copy;
}

.map-svg.is-move-feature-mode {
    cursor: move;
}

.map-vertex-index-label {
    font-size: 11px;
    fill: #111;
    pointer-events: none;
}


.feature-details-list dd {
    margin: 0;
}

.feature-actions {
    margin-bottom: 12px;
}

.feature-actions button {
    margin-right: 6px;
}

.feature-coordinates {
    background: #f0f0f0;
    padding: 8px;
    overflow: auto;
}

.feature-coordinates-editor {
    display: block;
    width: 100%;
    max-width: 760px;
    min-height: 140px;
    margin-bottom: 8px;
    font-family: monospace;
    box-sizing: border-box;
}

.geometry-editor {
    display: block;
    width: 100%;
    max-width: 760px;
    min-height: 90px;
    font-family: monospace;
    margin-bottom: 8px;
}

.geometry-editor-hint {
    font-size: 0.9rem;
    color: #555;
    margin-top: 0;
}

.feature-measurements {
    margin-bottom: 12px;
}

.feature-measurements dl {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 8px;
}

.feature-measurements dt {
    font-weight: bold;
}

.feature-measurements dd {
    margin: 0;
    font-family: monospace;
}

pre {
    background: #f5f5f5;
    padding: 12px;
    max-width: 800px;
    overflow: auto;
}

.save-status {
    max-width: 800px;
    padding: 8px 12px;
    border: 1px solid #ccc;
    background: #f5fff5;
}

.save-status.is-dirty {
    background: #fff8e1;
    border-color: #d6a700;
}

.selection-tool {
    display: grid;
    grid-template-columns: max-content minmax(220px, 360px);
    gap: 8px;
    align-items: center;
    max-width: 620px;
    margin-top: 16px;
    margin-bottom: 16px;
    padding: 12px;
    border: 1px solid #ccc;
    background: #fafafa;
}

.selection-tool h2 {
    grid-column: 1 / -1;
    margin-top: 0;
}

.selection-tool-actions {
    grid-column: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Cartographic graticule border & lines */
.map-grid-border {
    fill: none;
    stroke: #666;
    stroke-width: 1.5;
}
.map-grid-line {
    fill: none;
    stroke: rgba(0, 0, 0, 0.08);
    stroke-dasharray: 4,4;
    stroke-width: 1;
}
.map-grid-label-lon {
    font-size: 10px;
    fill: #555;
    text-anchor: middle;
    font-family: monospace;
}
.map-grid-label-lat {
    font-size: 10px;
    fill: #555;
    text-anchor: end;
    font-family: monospace;
}
.map-grid-label-lat-right {
    font-size: 10px;
    fill: #555;
    text-anchor: start;
    font-family: monospace;
}

/* Floating Zoom controls */
#mapView {
    position: relative;
}

.map-zoom-controls {
    position: absolute;
    top: 40px;
    right: 40px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    background: rgba(31, 41, 55, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 4px;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 400;
    user-select: none;
    transition: all 0.2s;
}

.map-zoom-controls:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.map-zoom-controls .zoom-drag-handle {
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    transition: colors 0.2s;
    color: #98a2b3;
}

.map-zoom-controls .zoom-drag-handle svg {
    stroke: currentColor;
    color: currentColor;
}

.map-zoom-controls .zoom-drag-handle:hover i,
.map-zoom-controls .zoom-drag-handle:hover svg {
    color: #ffffff !important;
    stroke: #ffffff !important;
}

.zoom-drag-handle:active {
    cursor: grabbing !important;
}

.zoom-divider {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 2px;
}

.zoom-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #9ca3af;
    transition: all 0.2s;
}

.zoom-btn svg {
    stroke: currentColor;
    color: currentColor;
}

.zoom-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.zoom-btn:active {
    background: rgba(255, 255, 255, 0.15);
}

.zoom-scale-label {
    color: #9ca3af;
}

.zoom-scale-input {
    background: rgba(0, 0, 0, 0.2) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Interaction Mode styles for active tools */
.tool-button.is-active {
    background-color: #2196F3 !important;
    color: white !important;
    border-color: #0b7dda !important;
}

/* Hide legacy measure button since it moved to zoom controls overlay */
#measureModeButton {
    display: none !important;
}

.tool-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Premium Zoom scale input styles */
.zoom-scale-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    border-top: 1px solid #eee;
    margin-top: 4px;
    padding-top: 6px;
    gap: 2px;
}

.zoom-scale-label {
    font-size: 9px;
    color: #666;
    text-transform: uppercase;
    font-weight: bold;
    font-family: sans-serif;
}

.zoom-scale-input {
    width: 48px;
    padding: 2px 4px;
    font-size: 11px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 3px;
    outline: none;
    font-family: monospace;
}

.zoom-scale-input:focus {
    border-color: #2196F3;
    box-shadow: 0 0 3px rgba(33, 150, 243, 0.4);
}

.map-box-select-overlay {
    fill: rgba(33, 150, 243, 0.15);
    stroke: #2196f3;
    stroke-width: 1.5;
    stroke-dasharray: 4 4;
    pointer-events: none;
}

.map-box-select-overlay.is-flashing {
    animation: select-flash-fade 0.3s ease-out forwards;
}

@keyframes select-flash-fade {
    0% {
        fill: rgba(33, 150, 243, 0.4);
        stroke: #2196f3;
        stroke-width: 2.5;
    }
    100% {
        fill: rgba(33, 150, 243, 0);
        stroke: rgba(33, 150, 243, 0);
        stroke-width: 1;
    }
}

/* Premium styling for Field Schema Manager */
.field-manager-table th,
.field-manager-table td {
    padding: 8px;
    border: 1px solid #ccc;
    font-size: 0.9rem;
}

.field-manager-table th {
    background: #f1f3f5;
    color: #495057;
    font-weight: 600;
}

.field-manager-table tbody tr:hover {
    background: #f8f9fa;
}

.field-manager-table button {
    border-radius: 4px;
    transition: background 0.15s, color 0.15s;
}

.field-manager-table button:hover {
    filter: brightness(0.92);
}

/* Global GIS Workbench Desktop Layout Overrides */
body {
    margin: 0;
    padding: 0;
    height: 100dvh !important;
    overflow: hidden !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    display: flex;
    flex-direction: column;
    background-color: #f4f5f7;
}

#app {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    width: 100vw;
    overflow: hidden;
}

/* Top Menubar Styles */
.app-menubar {
    display: flex;
    align-items: center;
    height: 42px;
    background-color: #ffffff;
    border-bottom: 1px solid #d0d5dd;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 0 16px;
    z-index: 1000;
    user-select: none;
    flex-shrink: 0;
}

.menubar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: #101828;
    margin-right: 28px;
    font-size: 1rem;
}

.menubar-brand .brand-icon {
    font-size: 1.2rem;
}

.menubar-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 4px;
    height: 100%;
    align-items: center;
}

.menubar-item {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
}

.menubar-trigger {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #344054;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.menubar-trigger:hover,
.menubar-item.is-open .menubar-trigger {
    background-color: #f2f4f7;
    color: #101828;
}

/* Vertical Dropdown Panels */
.menubar-dropdown {
    display: none;
    position: absolute;
    top: calc(100% - 2px);
    left: 0;
    background-color: #ffffff;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    padding: 6px 0;
    min-width: 260px;
    z-index: 1100;
    animation: menu-appear 0.12s cubic-bezier(0.16, 1, 0.3, 1);
}

.menubar-item.is-open .menubar-dropdown {
    display: block;
}

@keyframes menu-appear {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    padding: 8px 16px;
    font-size: 0.85rem;
    color: #344054;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background-color 0.1s, color 0.1s;
    font-weight: 500;
}

.dropdown-item:hover {
    background-color: #1570ef;
    color: #ffffff !important;
}

.dropdown-item.is-active {
    font-weight: 700;
    background-color: #f2f4f7;
    color: #175cd3;
    border-left: 3px solid #1570ef;
}

.dropdown-item.is-active:hover {
    background-color: #1570ef;
    color: #ffffff;
}

.dropdown-divider {
    height: 1px;
    background-color: #eaecf0;
    margin: 6px 0;
}

/* Modern Layout Workspace */
.app-workspace {
    display: flex;
    flex: 1;
    height: calc(100vh - 42px - 28px);
    width: 100vw;
    overflow: hidden;
    flex-shrink: 0;
}

/* Bottom Statusbar Styles */
.app-statusbar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    min-height: 28px !important;
    height: auto !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    padding: 6px 16px !important;
    background-color: #ffffff !important;
    border-top: 1px solid #d0d5dd !important;
    box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.03) !important;
    z-index: 1000 !important;
    user-select: none !important;
    flex-shrink: 0 !important;
    font-size: 0.8rem !important;
    color: #475467 !important;
    font-weight: 500 !important;
    width: 100vw !important;
    box-sizing: border-box !important;
}

.statusbar-item {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.statusbar-icon {
    font-size: 0.9rem !important;
}

.app-statusbar #saveStatus {
    font-weight: 600 !important;
    padding: 2px 8px !important;
    border-radius: 4px !important;
    font-size: 0.75rem !important;
    border: 1px solid #eaecf0 !important;
    background: #f9fafb !important;
    transition: all 0.15s ease;
    max-width: none !important;
    display: inline-block !important;
}

.app-statusbar #saveStatus.is-dirty {
    background: #fffaeb !important;
    border-color: #fec84b !important;
    color: #b54708 !important;
}

/* Left Sidebar with Tab Nav */
.app-sidebar {
    width: 340px;
    background-color: #ffffff;
    border-right: 1px solid #d0d5dd;
    display: flex;
    flex-direction: row; /* Arranges tabs on left, content on right! */
    flex-shrink: 0;
    height: 100%;
    overflow: hidden;
}

.sidebar-tabs {
    width: 48px;
    background-color: #f8f9fa;
    border-right: 1px solid #eaecf0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 12px;
    gap: 8px;
    flex-shrink: 0;
    overflow-y: auto; /* Allow scrolling if many tabs */
    -webkit-overflow-scrolling: touch;
}

.sidebar-tab-btn {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s, box-shadow 0.15s, color 0.15s;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #475467;
}

.sidebar-tab-btn:hover {
    background-color: #eaecf0;
    color: #101828;
}

.sidebar-tab-btn.is-active {
    background-color: #1570ef;
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.1);
}

.sidebar-content {
    flex: 1;
    min-width: 0; /* Fix flexbox shrink issue */
    height: 100%; /* Fix flexbox scroll issue */
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
    background-color: #ffffff;
    word-break: break-word;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
}

.sidebar-resizer {
    width: 6px;
    cursor: col-resize;
    background-color: #eaecf0;
    transition: background-color 0.2s;
    flex-shrink: 0;
    z-index: 10;
}
.sidebar-resizer:hover {
    background-color: #1570ef;
}

.sidebar-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
}

/* Main Map + Attributes Pane */
.app-main-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* Map Pane wrapper occupying maximum vertical height */
.map-pane-wrapper {
    flex: 3;
    position: relative;
    background-color: #f9fafb;
    border-bottom: 1px solid #d0d5dd;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#mapView {
    flex: 1;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

/* Bottom Console for Table of Attributes */
.app-bottom-pane {
    flex: 2;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Selected row highlighting in Attributes Table */
.app-bottom-pane tbody tr.is-selected-row {
    background-color: #f0f9ff !important;
    border-left: 3px solid #0086c9 !important;
    font-weight: 500;
}

.bottom-pane-resizer {
    height: 6px;
    cursor: row-resize;
    background-color: #eaecf0;
    transition: background-color 0.2s;
    flex-shrink: 0;
    z-index: 10;
}
.bottom-pane-resizer:hover {
    background-color: #1570ef;
}

.header-action-btn {
    height: 32px;
    box-sizing: border-box;
    padding: 0 12px;
    background-color: #ffffff;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #344054;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: inherit;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}
.header-action-btn:hover:not(:disabled) {
    background-color: #eff8ff;
    border-color: #84caff;
    color: #175cd3;
}
.header-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f2f4f7;
    border-color: #d0d5dd;
    color: #98a2b3;
    box-shadow: none;
}
.header-danger-btn:hover:not(:disabled) {
    background-color: #fef3f2;
    border-color: #fda29b;
    color: #b42318;
}

.header-close-btn {
    height: 32px;
    width: 32px;
    box-sizing: border-box;
    background: transparent;
    border: none;
    font-size: 1.1rem;
    color: #667085;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.header-close-btn:hover {
    background-color: #f2f4f7;
    color: #344054;
}

.bottom-pane-header {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    background-color: #f9fafb;
    border-bottom: 1px solid #eaecf0;
    flex-shrink: 0;
    overflow-x: auto;
    white-space: nowrap;
}

.bottom-pane-header h3 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #344054;
}

#attributeTable {
    flex: 1;
    overflow: auto;
    padding: 12px;
}

/* Hide legacy title blocks to keep workbench extremely clean */
h1, p {
    margin-top: 4px;
    margin-bottom: 4px;
}

/* Adjust general panels styles to align nicely in sidebar */
.selection-tool {
    margin-top: 0 !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    max-width: 100% !important;
}

/* Scrollbar Customization for GIS Workbench */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f9fafb;
}

::-webkit-scrollbar-thumb {
    background: #d0d5dd;
    border-radius: 100px;
}

::-webkit-scrollbar-thumb:hover {
    background: #98a2b3;
}

/* Premium Map Toolbar styles */
.map-toolbar {
    display: flex;
    align-items: center;
    background-color: #ffffff;
    border-bottom: 1px solid #d0d5dd;
    padding: 4px 12px;
    gap: 6px;
    flex-shrink: 0;
    z-index: 100;
}

.map-toolbar .toolbar-btn {
    padding: 4px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #344054;
    background-color: #ffffff;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0 !important; /* Reset legacy margins! */
    flex-shrink: 0; /* Impede que os botões espremam no mobile, forçando o scroll horizontal */
}

.map-toolbar .toolbar-btn:hover {
    background-color: #f2f4f7;
    border-color: #98a2b3;
}

.map-toolbar .toolbar-btn.is-active {
    background-color: #eff8ff;
    color: #175cd3;
    border-color: #1570ef;
    box-shadow: 0 0 0 2px rgba(21, 112, 239, 0.15);
}

.toolbar-separator {
    width: 1px;
    height: 20px;
    background-color: #eaecf0;
    margin: 0 6px;
}

.toolbar-draft-group {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: #fffaeb;
    border: 1px solid #fec84b;
    padding: 4px 10px;
    border-radius: 6px;
    margin-left: auto;
}

.draft-indicator {
    font-size: 0.75rem;
    font-weight: 700;
    color: #b54708;
}

.toolbar-action-btn {
    padding: 4px 8px;
    font-size: 0.75rem;
    background-color: #ffffff;
    border: 1px solid #d0d5dd;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    color: #344054;
}

.toolbar-action-btn:hover {
    background-color: #f2f4f7;
}

.toolbar-danger-btn {
    color: #b42318;
    border-color: #fda29b;
    background-color: #fef3f2;
}

.toolbar-danger-btn:hover {
    background-color: #fee4e2;
    border-color: #f89687;
    color: #912018;
}

/* Sidebar Forms Visual Consolidation */
.point-form,
.line-form,
.polygon-form {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    align-items: stretch !important;
    margin-top: 12px !important;
    margin-bottom: 12px !important;
    max-width: 100% !important;
    border: 1px solid #eaecf0;
    background-color: #f9fafb;
    padding: 12px;
    border-radius: 8px;
}

.point-form *,
.line-form *,
.polygon-form * {
    grid-column: auto !important; /* Reset layout grids */
    width: 100% !important;
    box-sizing: border-box;
}

.point-form label,
.line-form label,
.polygon-form label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #344054;
    margin-bottom: -4px;
}

.point-form input,
.line-form textarea,
.polygon-form textarea {
    padding: 8px;
    font-size: 0.85rem;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    background-color: #ffffff;
}

.point-form button,
.line-form button,
.polygon-form button {
    margin-top: 6px;
    padding: 8px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    background-color: #1570ef;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s;
}

.point-form button:hover,
.line-form button:hover,
.polygon-form button:hover {
    background-color: #175cd3;
}

.line-form small,
.polygon-form small {
    display: block;
    margin-top: -2px;
    color: #667085;
    font-size: 0.75rem;
    line-height: 1.3;
}

.sidebar-panel .selection-tool h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #101828;
    margin-bottom: 6px;
}

/* Premium Layers Tree View List */
.layers-tree-view {
    border: 1px solid #eaecf0;
    border-radius: 8px;
    background-color: #f9fafb;
    padding: 8px;
    max-height: 250px;
    overflow-y: auto;
    width: 100%;
    box-sizing: border-box;
    margin-top: 8px;
}

.tree-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tree-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    background-color: #ffffff;
    border: 1px solid #eaecf0;
    transition: all 0.15s ease;
    user-select: none;
}

.tree-item:hover {
    border-color: #d0d5dd;
    background-color: #f2f4f7;
    transform: translateY(-1px);
}

.tree-item.is-selected {
    background-color: #f0f9ff;
    border-color: #84caff;
    color: #0040c1;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}

.tree-item-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.tree-item-label {
    font-size: 0.8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
}

.tree-item-label small {
    color: #667085;
    font-weight: normal;
}

/* Premium Map Coordinates Overlay */
.map-coordinates-overlay {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(8px) saturate(180%);
    -webkit-backdrop-filter: blur(8px) saturate(180%);
    border: 1px solid rgba(208, 213, 221, 0.7);
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 0.74rem;
    font-weight: 600;
    color: #344054;
    font-family: 'Outfit', monospace;
    pointer-events: auto; /* Changed to allow clicking buttons */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    z-index: 9;
    letter-spacing: 0.02em;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.coord-prec-btn {
    background: #f2f4f7;
    border: 1px solid #d0d5dd;
    border-radius: 4px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    color: #475467;
    transition: all 0.2s;
}

.coord-prec-btn:hover {
    background: #e4e7ec;
    color: #101828;
}

.coord-copy-btn {
    background: transparent;
    border: none;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #667085;
    transition: all 0.2s;
    margin-left: 2px;
}

.coord-copy-btn:hover {
    background: #e4e7ec;
    color: #101828;
}
/* Toast Notifications System */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast-message {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 12px 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    color: #344054;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
    border-left: 4px solid #d0d5dd;
    max-width: 350px;
    word-break: break-word;
}

.toast-message.toast-show {
    transform: translateX(0);
    opacity: 1;
}

.toast-message.toast-hide {
    transform: translateX(120%);
    opacity: 0;
}

.toast-success { border-left-color: #12b76a; }
.toast-error { border-left-color: #f04438; }
.toast-warning { border-left-color: #f79009; }
.toast-info { border-left-color: #2e90fa; }

.toast-icon {
    font-size: 1.1rem;
}

/* Print Layout Manager CSS */
@media print {
    /* Hide everything that is not the layout paper */
    body * {
        visibility: hidden;
    }
    
    #layoutManagerView, #layoutManagerView * {
        visibility: visible;
    }
    
    #layoutManagerView {
        position: absolute;
        left: 0;
        top: 0;
        margin: 0;
        padding: 0;
        background: white !important;
        overflow: visible;
    }

    #layoutManagerCanvasArea {
        padding: 0 !important;
        margin: 0 !important;
    }

    .layout-paper {
        box-shadow: none !important;
        margin: 0 !important;
        padding: 0 !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        height: 100% !important;
    }
    
    /* Remove print margins globally */
    @page {
        margin: 0;
    }
}

/* ====== DARK MODE SIDEBAR REFACTOR ====== */

.app-sidebar {
    background-color: #111827 !important;
    border-right: 1px solid #1f2937 !important;
}

.sidebar-tabs {
    background-color: #1f2937 !important;
    border-right: 1px solid #374151 !important;
}

.sidebar-tab-btn {
    color: #9ca3af !important;
}

.sidebar-tab-btn:hover {
    background-color: #374151 !important;
    color: #f3f4f6 !important;
}

.sidebar-tab-btn.is-active {
    background-color: #2563eb !important;
    color: #ffffff !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

.sidebar-content {
    background-color: #111827 !important;
    color: #e5e7eb !important;
}

.sidebar-resizer {
    background-color: #374151 !important;
}

.sidebar-resizer:hover {
    background-color: #3b82f6 !important;
}

/* Sidebar Specific Elements */
.sidebar-panel h2 {
    color: #f3f4f6 !important;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.sidebar-card {
    border: 1px solid #374151 !important;
    border-radius: 8px !important;
    padding: 12px !important;
    background-color: #1f2937 !important;
    margin-bottom: 12px !important;
}

.sidebar-h3 {
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: #e5e7eb !important;
    margin-top: 0 !important;
    margin-bottom: 8px !important;
    display: flex;
    align-items: center;
}

.sidebar-p {
    font-size: 0.8rem !important;
    color: #9ca3af !important;
    line-height: 1.4 !important;
    margin-top: -4px !important;
    margin-bottom: 12px !important;
}

.sidebar-panel .toolbar-btn {
    border: 1px solid #374151 !important;
    background-color: #374151 !important;
    color: #d1d5db !important;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    justify-content: center;
}

.sidebar-panel .toolbar-btn:hover {
    background-color: #4b5563 !important;
    color: #ffffff !important;
    border-color: #4b5563 !important;
}

.sidebar-panel .span-2 {
    grid-column: span 2;
}

/* Form inputs inside sidebar */
.sidebar-panel input, .sidebar-panel select, .sidebar-panel textarea {
    background-color: #374151;
    border: 1px solid #4b5563;
    color: #f3f4f6;
    border-radius: 6px;
    padding: 8px 10px;
    width: 100%;
    box-sizing: border-box;
    outline: none;
    font-size: 0.8rem;
}

.sidebar-panel input:focus, .sidebar-panel select:focus, .sidebar-panel textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.sidebar-panel label {
    font-size: 0.8rem;
    color: #d1d5db;
    margin-bottom: 4px;
    display: block;
}

/* Fix for icons inside inputs/buttons */
.sidebar-panel i {
    display: inline-block;
    vertical-align: middle;
}

/* ====== DARK MODE MODALS ====== */

.modal-overlay-dark {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 24, 39, 0.7) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content-dark {
    background: #1f2937 !important;
    border: 1px solid #374151 !important;
    padding: 24px;
    border-radius: 12px;
    width: 500px;
    max-width: 90vw;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.2) !important;
    display: flex;
    flex-direction: column;
    gap: 16px;
    color: #e5e7eb !important;
}

.modal-content-dark h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #f9fafb !important;
    border-bottom: 1px solid #374151;
    padding-bottom: 12px;
    display: flex;
    align-items: center;
}

.modal-content-dark p {
    font-size: 0.9rem;
    color: #9ca3af !important;
    margin: 0;
    line-height: 1.5;
}

.modal-content-dark label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.85rem;
    color: #d1d5db !important;
}

.modal-content-dark input,
.modal-content-dark select,
.modal-content-dark textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #4b5563 !important;
    background: #374151 !important;
    color: #f3f4f6 !important;
    box-sizing: border-box;
    font-size: 0.9rem;
    transition: border-color 0.2s;
    outline: none;
}

.modal-content-dark input:focus,
.modal-content-dark select:focus,
.modal-content-dark textarea:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25) !important;
}

.modal-content-dark input:disabled,
.modal-content-dark select:disabled {
    background: rgba(0,0,0,0.2) !important;
    color: #6b7280 !important;
    cursor: not-allowed;
}

.modal-content-dark .btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s;
    font-size: 0.9rem;
}

.modal-content-dark .btn-secondary {
    background: #374151 !important;
    color: #f3f4f6 !important;
    border: 1px solid #4b5563 !important;
}

.modal-content-dark .btn-secondary:hover {
    background: #4b5563 !important;
}

.modal-content-dark .btn-primary {
    background: #2563eb !important;
    color: #ffffff !important;
}

.modal-content-dark .btn-primary:hover {
    background: #1d4ed8 !important;
}

.modal-content-dark .btn-danger {
    background: #dc2626 !important;
    color: white !important;
}

.modal-content-dark .btn-danger:hover {
    background: #b91c1c !important;
}

.modal-content-dark .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #374151;
}

/* ==========================================================================
   Mobile Responsiveness (Smartphones & Tablets)
   ========================================================================== */
@media (max-width: 768px) {
    /* Menubar Adjustments */
    .app-menubar {
        padding: 0 8px !important;
        position: relative;
    }

    .menubar-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 42px;
        left: 0;
        right: 0;
        background: #ffffff;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        z-index: 3000;
        padding: 8px 0;
    }

    .app-menubar.is-mobile-open .menubar-menu {
        display: flex;
    }

    .menubar-item {
        margin: 0 !important;
    }

    .menubar-trigger {
        padding: 12px 16px !important;
        width: 100%;
        border-radius: 0 !important;
    }

    .menubar-dropdown {
        position: relative;
        top: 0;
        box-shadow: none;
        border: none;
        border-left: 2px solid #eaecf0;
        margin-left: 16px;
        width: auto;
        display: none; /* Can be toggled by JS later, but for now we rely on hover/click */
    }
    
    .menubar-item:hover .menubar-dropdown {
        display: block;
    }

    .mobile-menu-toggle {
        display: flex !important;
        background: transparent;
        border: none;
        color: #475467;
        padding: 6px;
        cursor: pointer;
        margin-left: auto;
        align-items: center;
        justify-content: center;
    }

    /* Main Workspace Layout */
    .app-workspace {
        position: relative;
        flex-direction: column !important; /* Stack vertically if needed, but sidebar is off-canvas */
    }

    /* Sidebar becomes off-canvas drawer */
    .app-sidebar {
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        z-index: 2000;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: 4px 0 16px rgba(0,0,0,0.2);
    }
    
    .app-workspace.is-sidebar-open .app-sidebar {
        transform: translateX(0);
    }

    .mobile-overlay {
        position: absolute;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1999;
        display: none;
        backdrop-filter: blur(2px);
    }
    
    .app-workspace.is-sidebar-open .mobile-overlay {
        display: block;
    }

    .sidebar-resizer {
        display: none; /* Disable resizing on mobile */
    }

    /* Attribute Table Bottom Pane */
    .app-bottom-pane {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 50dvh !important;
        z-index: 1500;
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: 0 -4px 16px rgba(0,0,0,0.1);
    }
    
    .attribute-table button {
        min-height: 44px;
        min-width: 44px;
        padding: 8px;
    }

    .app-bottom-pane.is-open {
        transform: translateY(0);
    }
    
    .bottom-pane-resizer {
        display: none; /* Disable resizer on mobile */
    }
    
    /* Geocoder */
    #geocoderContainer {
        width: calc(100% - 32px) !important;
        left: 16px !important;
        max-width: none !important;
    }

    .mobile-tools-fab {
        display: flex !important;
        position: absolute;
        bottom: 32px; /* Acima da statusbar */
        right: 16px;
        width: 56px;
        height: 56px;
        border-radius: 28px;
        background-color: #1570ef;
        color: white;
        border: none;
        box-shadow: 0 4px 12px rgba(21, 112, 239, 0.4);
        align-items: center;
        justify-content: center;
        z-index: 500;
        cursor: pointer;
        transition: transform 0.2s, background-color 0.2s;
    }
    .mobile-tools-fab:active {
        transform: scale(0.95);
    }
    
    /* Bottom Sheet Toolbar */
    .map-toolbar {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
        display: flex;
        flex-wrap: wrap; /* Grid-like */
        justify-content: flex-start !important;
        padding: 28px 4px 12px 4px !important; /* Top space for close button */
        gap: 4px; /* Space between buttons */
        background-color: #1f2937 !important; /* Dark Mode */
        border-top-left-radius: 16px;
        border-top-right-radius: 16px;
        box-shadow: 0 -8px 24px rgba(0,0,0,0.4) !important;
        z-index: 3000 !important; /* Guarantee it sits on top of statusbar */
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        border: none !important;
    }
    
    .map-toolbar.is-bottom-sheet-open {
        transform: translateY(0);
    }

    .map-toolbar .toolbar-btn {
        flex: 1 1 calc(25% - 4px); /* 4 columns precisely considering gap */
        min-width: 0; 
        min-height: 44px; /* Reduced to save screen space */
        padding: 4px !important;
        margin: 0 !important; /* Relying on parent gap instead */
        flex-direction: column;
        justify-content: center;
        gap: 4px;
        border-radius: 6px;
        font-size: 0.6rem; /* Slightly smaller text */
        background: #374151 !important; /* Dark Button */
        color: #f3f4f6 !important;
        border: 1px solid #4b5563 !important;
        box-sizing: border-box; /* Crucial to include border in width */
    }
    
    .map-toolbar .toolbar-btn:hover {
        background: #4b5563 !important;
    }
    
    .map-toolbar .toolbar-btn i {
        color: #9ca3af;
    }
    
    .map-toolbar .toolbar-btn.is-active {
        background: #2563eb !important;
        color: #ffffff !important;
        border-color: #3b82f6 !important;
    }
    
    .toolbar-separator {
        display: none !important;
    }

    /* Active Drafting Controls Flutuando no Topo no Celular */
    .toolbar-draft-group {
        position: absolute !important;
        top: 80px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        margin: 0 !important;
        z-index: 700 !important;
        background: rgba(255, 250, 235, 0.95) !important;
        backdrop-filter: blur(10px);
        box-shadow: 0 4px 16px rgba(0,0,0,0.15);
        flex-wrap: wrap;
        justify-content: center;
    }
    
    /* Wider scrollbar for touch */
    ::-webkit-scrollbar {
        width: 10px;
        height: 10px;
    }
    ::-webkit-scrollbar-thumb {
        border-radius: 5px;
        border: 2px solid transparent;
        background-clip: padding-box;
    }
    
    .sidebar-content {
        padding: 8px !important;
    }
    
    /* Workspace adjustment for taller statusbar on mobile */
    .app-workspace {
        height: calc(100dvh - 42px - 44px) !important; /* 42px menu + 44px statusbar */
    }

    /* Statusbar adjustments for mobile */
    .app-statusbar {
        min-height: 44px !important;
        padding: 8px 12px !important;
    }
    
    /* Coordinates overlay adjustment to avoid overlapping OSM attribution */
    .map-coordinates-overlay {
        top: 36px !important; /* Raised by 12px */
        left: 8px !important;
        transform: none !important; /* Remove horizontal centering */
        padding: 2px 6px !important;
        font-size: 0.65rem !important;
    }
    
    .mobile-tools-fab {
        width: 44px;
        height: 44px;
        padding: 4px !important;
        bottom: 16px;
    }
}

/* Feature Details Dark Mode Enhancements */
#featureDetails {
    color: #e2e8f0;
}

#featureDetails p {
    color: #94a3b8;
    line-height: 1.5;
}

.feature-details-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #f8fafc;
    margin-top: 24px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 6px;
}

.feature-details-list {
    background: rgba(15, 23, 42, 0.4);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px;
    display: grid;
    grid-template-columns: 1fr 2fr;
    row-gap: 8px;
    column-gap: 16px;
    margin-top: 0;
}

.feature-details-list dt {
    font-weight: 500;
    color: #94a3b8;
    word-break: break-all;
}

.feature-details-list dd {
    margin: 0;
    color: #e2e8f0;
    word-break: break-all;
}

.feature-coordinates {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #a5b4fc;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.85rem;
    overflow-x: auto;
    margin-top: 0;
}

.geometry-editor {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 12px;
    color: #e2e8f0;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.85rem;
    resize: vertical;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.geometry-editor:focus {
    outline: none;
    border-color: #38bdf8;
}

.geometry-editor-hint {
    font-size: 0.8rem !important;
    color: #64748b !important;
    margin-top: 6px;
}

#featureDetails button {
    padding: 8px 16px;
    background: linear-gradient(135deg, #4f46e5, #4338ca);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
}

#featureDetails button:hover {
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
    transform: translateY(-1px);
}

.mobile-only-close-btn {
    display: none;
}
.mobile-tools-fab {
    display: none !important;
}
@media (max-width: 768px) {
    .mobile-only-close-btn {
        display: block !important;
    }
    .mobile-tools-fab {
        display: flex !important;
    }
}
