/* Gemeinsame CSS-Variablen - konsolidiert */
:root {
    /* Layout Variablen */
    --header-height: 70px;
    --sidebar-width: 250px;
    --container-padding: 20px;
    --border-radius: 8px;
    --export-radius: 16px;
    --transition-speed: 0.3s;
    
    /* Farbvariablen */
    --primary-color: #072c64;
    --secondary-color: #2a5a9c;
    --accent-color: #0d6efd;
    --light-gray: #f8f9fa;
    --dark-gray: #6c757d;
    --text-color: #333;
    
    /* Export-Loader Variablen */
    --export-primary: #6c757d;
    --export-secondary: #007bff;
    --export-accent: #0056b3;
    --export-text: #495057;
    --export-muted: #6c757d;
    --export-bg: #ffffff;
    --export-border: #e9ecef;
    --export-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    --export-padding: 1.5rem;
    
    /* Glas-Effekt Variablen */
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: 1px solid rgba(255, 255, 255, 0.2);
    
    /* Control Positionierung */
    --control-offset-top: 5px;
    
    /* Mobile Panel Variablen */
    --mobile-panel-width: 75vw;
    --mobile-toggle-size: 44px;
}

/* Basis-Styles */
* {
    box-sizing: border-box;
    font-family: "Inria Sans", 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 300;
    font-style: normal;
}

html, body {
    height: 100%;
    overflow: hidden;
    margin: 0;
    background: linear-gradient(135deg, #f3f3f3 0%, #d1d1d1 100%);
    background-color: #f8f9fa;
}

body {
    display: flex;
    flex-direction: column;
}

/* Hauptcontainer mit modernem Glas-Effekt */
.main_wrapper {
    display: flex;
    flex-direction: column;
    width: 97%;
    height: calc(100vh - var(--header-height) - 25px);
    margin: 15px auto 20px auto;
    background: transparent;
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow), 0px -2px 5px rgba(0, 0, 0, 0.2);
    border: var(--glass-border);
    overflow: hidden;
    z-index: 1;
}

/* Top-Container für linke und rechte Container */
.top-containers {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    border-radius: var(--border-radius);
    position: relative;
}

/* ============================ */
/* AKKORDEON DESIGN */
/* ============================ */

/* Linker Container */
.main_left_container {
    width: 25%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    overflow-y: auto;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f0f0f0;
    transition: transform 0.3s ease-in-out;
    z-index: 10;
    position: relative;
    padding: 15px;
}

/* Details Container */
.main_left_container details {
    margin-bottom: 12px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

.main_left_container details:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* Summary Styling */
.main_left_container summary {
    font-size: 1rem;
    cursor: pointer;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 249, 250, 0.95) 100%);
    backdrop-filter: blur(15px);
    color: #2c3e50;
    outline: none;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    transition: all 0.3s ease;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    margin: 0;
}

.main_left_container summary:hover {
    background: linear-gradient(135deg, rgba(7, 44, 100, 0.08) 0%, rgba(42, 90, 156, 0.08) 100%);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.main_left_container details[open] summary {
    background: linear-gradient(135deg, rgba(7, 44, 100, 0.12) 0%, rgba(42, 90, 156, 0.12) 100%);
    color: var(--primary-color);
    border-radius: 12px 12px 0 0;
    border-bottom: 1px solid rgba(7, 44, 100, 0.1);
}

/* Entfernt den Standard-Marker */
.main_left_container summary::marker,
.main_left_container summary::-webkit-details-marker {
    display: none;
}

/* Icons */
.main_left_container .summary-icon {
    margin-right: 12px;
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.main_left_container .icon {
    transition: transform 0.3s ease;
    font-size: 1.1rem;
    color: var(--dark-gray);
    margin-left: auto;
    padding-left: 10px;
}

.main_left_container details[open] .icon {
    transform: rotate(90deg);
    color: var(--primary-color);
}

/* Content Bereich */
.main_left_container .content {
    padding: 20px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
    color: #555;
    font-size: 0.9rem;
    line-height: 1.6;
    border-radius: 0 0 12px 12px;
    transition: all 0.3s ease;
}

.main_left_container details:not([open]) .content {
    display: none;
}

.main_left_container details[open] {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(7, 44, 100, 0.2);
}

/* Rechter Container */
.main_right_container {
    width: 75%;
    height: 100%;
    position: relative;
    background: rgba(255, 255, 255, 0.9);
    overflow: hidden;
    transition: all 0.3s ease-in-out;
}

/* ============================ */
/* MOBILE PANEL DESIGN */
/* ============================ */

/* Mobile Toggle Button */
.mobile-panel-toggle {
    display: none;
    position: fixed;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: var(--mobile-toggle-size);
    height: var(--mobile-toggle-size);
    background: var(--primary-color);
    border: none;
    border-radius: 0 50% 50% 0;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
    box-shadow: 2px 0 5px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
}

.mobile-panel-toggle:hover {
    background: var(--secondary-color);
    transform: translateY(-50%) scale(1.1);
}

.mobile-panel-toggle::before {
    content: "›";
    transition: transform 0.3s ease;
    display: inline-block;
    font-size: 1.5em;
    line-height: 1;
}

.mobile-panel-toggle.active::before {
    transform: rotate(180deg);
}

/* Mobile Overlay */
.mobile-panel-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    backdrop-filter: blur(2px);
}

/* Unterer Container */
.main_bottom_container {
    height: 25px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    padding: 0 15px;
    justify-content: space-between;
    font-size: 12px;
    box-shadow: 0px -2px 5px rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius);
    margin-top: 15px;
    flex-shrink: 0;
}

/* Footer */
.footer_wrapper {
    display: flex;
    width: 100%;
    height: 100%;
}

.footer_left_container {
    width: 20%;
    display: flex;
    align-items: center;
    padding-left: 10px;
}

.footer_right_container {
    width: 80%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-right: 10px;
}

/* Footer Navigation */
.navlistfooter {
    margin: 10px;
}

.navlistfooter li {
    display: inline-block;
}

.navlistfooter li a {
    color: #000;
    margin: 0 10px;
    text-decoration: none;
}

.navlistfooter li a:hover {
    color: #0C529E;
    text-decoration: underline;
}

/* Coordinate Display */
.coordinate {
    display: flex;
    gap: 1rem;
    align-items: center;
    font-family: system-ui, sans-serif;
    font-size: 12px;
    color: #333;
}

.coord-label {
    font-weight: 600;
    color: #555;
    margin-right: 3px;
}

.coord-field {
    font-family: monospace;
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    color: #111;
    min-width: 70px;
    text-align: center;
}

/* Coordinate Notification */
.coord-notification {
    position: fixed;
    background: #0077cc;
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-family: system-ui, sans-serif;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 10000;
    white-space: nowrap;
}

.coord-notification.visible {
    opacity: 1;
    transform: translateY(-12px);
}

/* Scala Container */
.ScalaContainer {
    display: flex;
    justify-content: center;
    width: auto;
    margin-left: 20px;
}

/* Map Styling */
#map {
    height: 100vh;
    width: 100%;
}

/* Leaflet Controls */
.leaflet-control.search-lat-lng {
    top: 10px;
    left: 10px;
}

#geocoderContainer {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    height: 100%;
    padding: 0 10px;
}

.leaflet-control-geocoder ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: absolute;
    z-index: 3;
}

.leaflet-control-geocoder li {
    padding: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.leaflet-control-geocoder li:hover {
    background-color: #528bc7;
    color: #fff;
}

.leaflet-control-geocoder button:hover {
    background-color: #D5D5D5;
}

/* Custom Layer Control */
.custom-layer-control {
    position: absolute;
    top: var(--control-offset-top);
    right: 10px;
    z-index: 1000;
    background-color: white;
    padding: 2px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    max-width: 200px;
    max-height: 400px;
    overflow-y: auto;
}

.custom-layer-control ul {
    width: 200px;
}

.custom-layer-control label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.custom-layer-control .leaflet-control-layers-list {
    font-family: Arial, sans-serif;
    font-size: 14px;
}

.custom-layer-control .leaflet-control-layers-base label,
.custom-layer-control .leaflet-control-layers-overlays label {
    margin: 5px 0;
    padding: 3px 0;
}

.custom-layer-control .leaflet-control-layers-separator {
    margin: 8px 0;
    border-top: 1px solid #072c64;
}

/* Leaflet Control Positions */
.leaflet-control-measure {
    top: calc(var(--control-offset-top) + 53px);
    right: 12px;
    z-index: 2;
}

.leaflet-control-locate {
    position: absolute;
    top: calc(var(--control-offset-top) + 103px);
    right: 18px;
    z-index: 2;
}

.leaflet-control-zoom {
    position: absolute;
    top: calc(var(--control-offset-top) + 140px);
    right: 18px;
    z-index: 2;
}

/* Search Controls */
.leaflet-touch .leaflet-control-geocoder-icon {
    display: none;
}

.search-lat-lng {
    display: flex;
}

#search_dropdown {
    padding: 6px 12px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 0;
    background-color: #fff;
    color: #333;
    cursor: pointer;
}

.leaflet-control-geocoder input {
    padding: 6px 12px;
    font-size: 14px;
    color: #333;
    outline: none;
    min-width: 246px;
    border-radius: 8px;
}

#search-lat-lng {
    border: 2px solid #ccc;
    background-color: #f9f9f9;
    margin-left: 10px;
    padding: 6px 12px;
    font-size: 14px;
    color: #333;
    outline: none;
    min-width: 246px;
    border-radius: 4px;
}

/* Logo */
#logo {
    width: 100px;
    height: auto;
}

/* Utility Classes */
.d-flex { display: flex; }
.justify-content-space-between { justify-content: space-between; }
.hidden { display: none; }
.display-inline-flex { 
    display: inline-flex; 
    align-items: center; 
    vertical-align: middle; 
}

.display-inline-flex img {
    vertical-align: middle;
    margin-right: 8px;
}

.display-inline-flex span {
    vertical-align: middle;
}

/* ============================ */
/* NAVBAR OPTIMIERUNGEN */
/* ============================ */

.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    height: var(--header-height);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1030;
    position: relative;
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.2rem;
}

.navbar-toggler {
    border: 1px solid rgba(255,255,255,0.3);
    padding: 0.25rem 0.5rem;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(255,255,255,0.25);
}

.nav-link {
    transition: all var(--transition-speed) ease;
}

.nav-link:hover {
    color: #a8c6f8 !important;
}

.navbar-nav .nav-link {
    position: relative;
    padding: 0.5rem 1.2rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    margin: 0 0.3rem;
}

.navbar-nav .nav-link:hover {
    background: linear-gradient(135deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0.35) 100%);
    backdrop-filter: blur(10px);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    color: #ffffff !important;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
    font-weight: 600;
}

.dropdown-menu {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    padding: 10px;
    z-index: 1040;
}

.dropdown-item {
    border-radius: 5px;
    padding: 8px 15px;
    transition: all var(--transition-speed) ease;
}

.dropdown-item:hover {
    background-color: var(--light-gray);
    color: var(--primary-color);
}

/* Sidebar */
.sidebar {
    background: white;
    height: calc(100vh - var(--header-height));
    position: fixed;
    width: var(--sidebar-width);
    padding: 20px 0;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    border-right: 1px solid #dee2e6;
    background-color: #f8f9fa;
    color: #343a40;
}

.sidebar a {
    color: #2c3e50;
    padding: 15px 25px;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: all var(--transition-speed) ease;
    border-left: 4px solid transparent;
    font-weight: 500;
    margin: 5px 10px;
    border-radius: var(--border-radius);
}

.sidebar a:hover,
.sidebar a.active {
    background: #c1c1c1;
    border-left: 4px solid var(--primary-color);
    color: #072c64;
    background-color: #d8d8d8;
    color: #ffffff;
    padding-left: 28px;
    border-left: 4px solid #ffc107;
    font-weight: 500;
}

.sidebar a.active {
    background: #e6effc;
    border-left: 4px solid var(--accent-color);
    color: var(--primary-color);
}

.sidebar a i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
    color: #072c64;
    font-size: 1.1rem;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 25px;
    min-height: calc(100vh - var(--header-height));
    background-color: #f8f9fa;
}

/* Card Styling */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 25px;
}

.card-header {
    background: white;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
    padding: 18px 25px;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

/* Table Styling */
.table-container {
    overflow-x: auto;
    max-height: 500px;
    overflow-y: auto;
    border-radius: var(--border-radius);
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.table th {
    background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
    position: sticky;
    top: 0;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 14px 16px;
    border-bottom: 2px solid #dee2e6;
    color: var(--text-color);
}

.table td {
    padding: 12px 16px;
    vertical-align: middle;
    font-size: 0.9rem;
    border-color: #f1f1f1;
}

.table tr:hover {
    background-color: #f8f9fa;
}

.filter-row th {
    background: #e9ecef;
    padding: 10px;
}

.filter-row input {
    font-size: 0.8rem;
    padding: 7px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    width: 100%;
    transition: border-color 0.2s ease;
}

.filter-row input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* Buttons */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
}

.btn-sm {
    padding: 0.5rem 0.9rem;
    font-size: 0.85rem;
}

.icon-btn {
    padding: 0.4rem 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    min-height: 34px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.icon-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Badge */
.badge {
    font-size: 0.75rem;
    padding: 0.5em 0.7em;
    border-radius: 20px;
    font-weight: 500;
}

/* Loading Indicator */
#loadingIndicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    display: none;
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 6px 25px rgba(0,0,0,0.25);
}

/* Alert */
.alert {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 15px 20px;
    margin-bottom: 20px;
}

/* DataTables */
.dataTables_wrapper {
    padding: 0;
}

.dataTables_length,
.dataTables_filter {
    margin-bottom: 18px;
}

.dataTables_info {
    padding: 12px 0;
    color: var(--dark-gray);
    font-size: 0.9rem;
}

/* Form Controls */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 15px;
    height: 15px;
    border: 2px solid #bbb;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    position: relative;
    margin-right: 10px;
    transition: all 0.3s ease;
    vertical-align: middle;
}

input[type="checkbox"]:checked {
    border-color: #072c64;
    background-color: #072c64;
}

input[type="checkbox"]:checked::before {
    content: "";
    position: absolute;
    top: 1px;
    left: 4px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Radio Buttons */
.custom-layer-control input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #bbb;
    border-radius: 50%;
    outline: none;
    cursor: pointer;
    position: relative;
    margin-right: 12px;
    transition: all 0.3s ease;
}

.custom-layer-control input[type="radio"]:checked {
    border-color: #072c64;
    background-color: #072c64;
}

.custom-layer-control input[type="radio"]:checked::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
}

.custom-layer-control .leaflet-control-layers-base {
    margin-bottom: 15px;
}

.custom-layer-control .leaflet-control-layers-overlays {
    margin-top: 15px;
}

/* Export Loader */
.export-loader {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--export-bg);
    padding: var(--export-padding);
    border: 1px solid var(--export-border);
    border-radius: var(--export-radius);
    z-index: 1000;
    text-align: center;
    box-shadow: var(--export-shadow);
    min-width: min(90vw, 380px);
    backdrop-filter: blur(10px);
}

.export-loader__content {
    display: grid;
    gap: 0.75rem;
}

.export-loader__title {
    margin: 0 0 0.5rem 0;
    color: var(--export-primary);
    font-size: 1.25rem;
    font-weight: 600;
}

.export-loader__page-info {
    margin-bottom: 0.5rem;
}

.export-loader__page-count {
    font-weight: 600;
    color: var(--export-text);
    font-size: 0.95rem;
}

.export-loader__progress {
    width: 100%;
    height: 0.5rem;
    background: #f0f0f0;
    border-radius: 1rem;
    overflow: hidden;
    margin: 0.5rem 0;
}

.export-loader__progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--export-secondary), var(--export-accent));
    border-radius: 1rem;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.export-loader__stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0.25rem 0;
}

.export-loader__percentage {
    font-weight: 700;
    color: var(--export-secondary);
    font-size: 1rem;
}

.export-loader__time {
    color: var(--export-muted);
    font-size: 0.875rem;
}

.export-loader__action {
    font-size: 0.875rem;
    color: var(--export-muted);
    min-height: 1.25rem;
    margin: 0.25rem 0;
    font-weight: 500;
}

.export-loader__meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--export-muted);
    margin-top: 0.5rem;
}

.export-loader__processed,
.export-loader__eta {
    opacity: 0.9;
}

/* Scrollbar */
.table-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.table-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Layout des Login Container */
.login-container {
    min-height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.shadow-card {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: none;
}

/* Layout des Registrieren Container */
.register-container {
    min-height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.shadow-card {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: none;
}

/* Layout des Passwort Anzeigen */
.password-input-group {
    position: relative;
}
.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #6c757d;
}
.password-toggle:hover {
    color: #495057;
}

/* Logo in Registrieren und Anmelden Karten + Checkbox */

.text-box {
    border: 1px solid #ccc;
    padding: 1rem;
    border-radius: 5px;
    background-color: #f9f9f9;
    margin-bottom: 1.5rem;
}
.form-check-input:invalid {
    border-color: #dc3545;
}
.checkbox-inline {
    display: flex;
    align-items: center;
    gap: 8px;
}
.checkbox-small {
    font-size: 0.875rem; /* Kleinere Schriftgröße für beide */
}
.checkbox-group {
    margin-bottom: 0.5rem; /* Reduzierter Abstand zwischen den Zeilen */
}
.header-logo {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}
.header-logo:hover {
    opacity: 1;
}

/* Logo im Admin-Dashbord */
.sidebar-logo {
    margin-top: auto; /* Push logo to bottom */
    padding: 20px;
    text-align: center;
    border-top: 1px solid rgba(0,0,0,0.1);
}
.sidebar-logo img {
    max-width: 120px;
    height: auto;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}
.sidebar-logo img:hover {
    opacity: 1;
}

/* ============================ */
/* RESPONSIVE DESIGN */
/* ============================ */

@media (max-width: 1220px) {
    .main_left_container summary {
        font-size: 0.75rem;
        padding: 0 10px;
        margin-bottom: 0px;
    }

    .main_left_container .content {
        padding: 0 10px;
        font-size: 0.7rem;
    }

    .main_left_container details {
        margin-bottom: 0px;
    }

    .main_left_container .icon {
        font-size: 0.9rem;
    }
    
    .navlistfooter {
        font-size: 8px;
    }
}

@media (max-width: 992px) {
    :root {
        --sidebar-width: 220px;
    }
    
    .sidebar {
        width: var(--sidebar-width);
    }
    
    .main-content {
        margin-left: var(--sidebar-width);
        padding: 20px;
    }
}

/* Mobile Ansicht (max-width: 965px) */
@media (max-width: 965px) {
    :root {
        --mobile-panel-width: 320px;
        --control-offset-top: 35px;
    }

    .navlistfooter {
        display: none;
    }

    .mobile-panel-toggle {
        display: flex;
        z-index: 1025;
    }

    .main_left_container {
        position: fixed;
        top: 0;
        left: -100%;
        width: var(--mobile-panel-width);
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        z-index: 1000;
        transition: left 0.3s ease-in-out;
        box-shadow: 2px 0 10px rgba(0,0,0,0.3);
        overflow-y: auto;
        backdrop-filter: blur(10px);
        -webkit-overflow-scrolling: touch;
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }

    .main_left_container.mobile-open {
        left: 0;
    }

    .main_left_container.mobile-open ~ .main_right_container {
        filter: brightness(0.7) blur(2px);
        transition: filter 0.3s ease-in-out;
        pointer-events: none;
    }

    .main_left_container.mobile-open ~ .mobile-panel-toggle {
        left: var(--mobile-panel-width);
        border-radius: 50% 0 0 50%;
        z-index: 1001;
    }

    .main_right_container {
        width: 100%;
        transition: filter 0.3s ease-in-out;
    }

    .mobile-panel-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.4);
        z-index: 999;
        backdrop-filter: blur(1px);
    }

    .main_left_container.mobile-open ~ .mobile-panel-overlay {
        display: block;
    }

    /* Optimierte Größen für Mobile */
    .coordinate {
        gap: 0;
        font-size: 10px;
    }

    .coord-label {
        margin-right: 5px;
        font-size: 10px;
    }

    .coord-field {
        padding: 2px 4px;
        border-radius: 3px;
        min-width: 40px;
        font-size: 10px;
    }

    .leaflet-control-geocoder input,
    #search-lat-lng {
        min-width: 180px;
        font-size: 12px;
    }

    .custom-layer-control {
        max-width: 160px;
        font-size: 12px;
    }

    /* Navbar Mobile */
    .navbar-collapse {
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
        padding: 1rem;
        margin-top: 10px;
        border-radius: var(--border-radius);
        box-shadow: 0 4px 15px rgba(0,0,0,0.2);
        z-index: 1035;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        margin: 0.25rem 0;
        border-radius: var(--border-radius);
        text-align: center;
    }
    
    .navbar-nav .nav-link:hover {
        background: rgba(255,255,255,0.15);
    }
    
    .dropdown-menu {
        background: rgba(255,255,255,0.95);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255,255,255,0.2);
        text-align: center;
        z-index: 1040;
    }
    
    .dropdown-item {
        padding: 0.75rem 1rem;
    }
}

/* Sehr kleine Displays */
@media (max-width: 380px) {
    :root {
        --mobile-panel-width: 300px;
        --mobile-toggle-size: 40px;
    }

    .mobile-panel-toggle {
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
    }

    .main_left_container summary {
        font-size: 0.7rem;
        padding: 15px 10px;
    }

    .main_left_container .content {
        padding: 0 8px;
        font-size: 0.65rem;
    }

    .leaflet-control-geocoder input,
    #search-lat-lng {
        min-width: 150px;
        font-size: 11px;
    }

    .main_wrapper {
        width: 100%;
        margin: 10px 0;
        height: calc(100vh - var(--header-height) - 20px);
    }

    .navbar-brand {
        font-size: 1rem;
    }
    
    .navbar-toggler {
        padding: 0.2rem 0.4rem;
    }
    
    .navbar-collapse {
        padding: 0.75rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }

    .ScalaContainer {
        transform: scale(0.5);
    }
}

/* iPhone 15 Optimierungen */
@media only screen 
    and (max-width: 430px) 
    and (max-height: 932px) 
    and (-webkit-device-pixel-ratio: 3) {
    
    :root {
        --mobile-panel-width: 340px;
        --control-offset-top: 45px;
    }
    
    .main_left_container {
        padding-top: calc(env(safe-area-inset-top) + 10px);
    }
    
    .mobile-panel-toggle {
        top: calc(50% + env(safe-area-inset-top) / 2);
    }
    
    .custom-layer-control {
        top: calc(var(--control-offset-top) + 5px);
    }
    
    .leaflet-control-measure {
        top: calc(var(--control-offset-top) + 60px);
    }
    
    .leaflet-control-locate {
        top: calc(var(--control-offset-top) + 110px);
    }
    
    .leaflet-control-zoom {
        top: calc(var(--control-offset-top) + 150px);
    }
}

/* Höhenanpassungen für Notch */
@media (max-width: 965px) and (max-height: 850px) {
    .mobile-panel-toggle {
        top: calc(50% + env(safe-area-inset-top) / 2);
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
        margin-bottom: 20px;
    }
    
    .main-content {
        margin-left: 0;
        padding: 15px;
    }
    
    .col-md-3.col-lg-2,
    .col-md-9.col-lg-10 {
        width: 100%;
    }
    
    .sidebar a {
        padding: 12px 20px;
        margin: 3px 5px;
    }
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    .export-loader {
        --export-bg: #1a1a1a;
        --export-border: #404040;
        --export-text: #e0e0e0;
        --export-muted: #a0a0a0;
        --export-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    }
    
    .export-loader__progress {
        background: #2d2d2d;
    }
}