/* Version: v8.10 | Erstellt: 24.05.2026 - 11:30 UTC */
* { box-sizing: border-box; }
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; margin: 0; padding: 0; background: #f0f2f5; color: #333; }
.container { display: flex; height: 100vh; }
.sidebar { width: 400px; background: white; padding: 20px; overflow-y: auto; box-shadow: 2px 0 5px rgba(0,0,0,0.1); z-index: 10; display: flex; flex-direction: column; }
.main-content { flex-grow: 1; display: flex; flex-direction: column; position: relative; }
#map { flex-grow: 1; width: 100%; }
.dashboard { height: 400px; background: #f0f2f5; border-top: 2px solid #0078A8; padding: 20px; overflow-y: auto; }
.hidden { display: none !important; }
.panel { background: #f8f9fa; padding: 15px; border-radius: 8px; margin-bottom: 15px; border: 1px solid #e9ecef; }
h2 { margin-top: 0; color: #0078A8; font-size: 1.2rem; }
h3 { margin-top: 0; font-size: 1rem; color: #495057; border-bottom: 1px solid #dee2e6; padding-bottom: 5px; }
input, select { width: 100%; padding: 8px; margin-bottom: 10px; border: 1px solid #ccc; border-radius: 4px; }
label { font-size: 0.8rem; font-weight: bold; color: #666; display: block; margin-bottom: 2px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.col-flex { display: flex; flex-direction: column; height: 100%; }
.flex-row { display: flex; gap: 10px; margin-bottom: 10px; }
.flex-row input { margin-bottom: 0; }
button { width: 100%; padding: 10px; border: none; border-radius: 4px; cursor: pointer; font-weight: bold; transition: 0.2s; }
.btn-primary { background: #0078A8; color: white; }
.btn-primary:hover:not(:disabled) { background: #005f85; }
.btn-primary:disabled { background: #ccc; cursor: not-allowed; }
.btn-success { background: #28a745; color: white; }
.btn-success:hover:not(:disabled) { background: #218838; }
.btn-success:disabled { background: #ccc; cursor: not-allowed; }
.btn-small { background: #28a745; color: white; width: auto; white-space: nowrap; }
.btn-small:disabled { background: #ccc; cursor: not-allowed; }
.btn-dataloy { background: #d9534f; color: white; }
.btn-dataloy:hover:not(:disabled) { background: #c9302c; }
.btn-dataloy:disabled { background: #ccc; cursor: not-allowed; }
.btn-copy { background: #e9ecef; border: 1px solid #ccc; padding: 2px 6px; font-size: 0.7rem; border-radius: 3px; cursor: pointer; margin-left: 5px; }
.btn-copy:hover { background: #d4d4d4; }

/* Tooltip */
.tooltip-container { position: relative; display: inline-block; cursor: help; }
.info-icon { background: #0078A8; color: white; border-radius: 50%; width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: bold; }
.tooltip-text { visibility: hidden; width: 250px; background-color: #333; color: #fff; text-align: left; border-radius: 6px; padding: 10px; position: absolute; z-index: 1000; bottom: 125%; left: 50%; margin-left: -125px; opacity: 0; transition: opacity 0.3s; font-size: 11px; font-weight: normal; line-height: 1.4; box-shadow: 0 4px 8px rgba(0,0,0,0.3); }
.tooltip-container:hover .tooltip-text { visibility: visible; opacity: 1; }

/* Layer Control */
.layer-control { position: absolute; top: 10px; right: 10px; background: rgba(255,255,255,0.95); padding: 10px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.2); z-index: 1000; width: 220px; font-size: 12px; }
.layer-control h4 { margin: 0 0 10px 0; border-bottom: 1px solid #ccc; padding-bottom: 5px; }
.layer-item { display: flex; align-items: center; margin-bottom: 5px; cursor: pointer; padding: 4px; border-radius: 4px; transition: 0.2s; }
.layer-item:hover { background: #f0f0f0; }
.layer-item.active { font-weight: bold; }
.layer-box { width: 14px; height: 14px; border-radius: 3px; margin-right: 8px; border: 1px solid #999; background: #ccc; transition: 0.2s; }
.layer-item.active .layer-box { border-color: #333; }

/* Terminals & Modals */
.terminal-popup { position: absolute; top: 20px; right: 250px; width: 400px; height: 300px; background: rgba(30, 30, 30, 0.95); color: #00ff00; font-family: monospace; border-radius: 8px; z-index: 2000; display: flex; flex-direction: column; box-shadow: 0 4px 15px rgba(0,0,0,0.5); border: 1px solid #555; }
.terminal-header { display: flex; justify-content: space-between; align-items: center; padding: 5px 10px; background: #333; border-top-left-radius: 8px; border-top-right-radius: 8px; color: #fff; font-weight: bold; font-family: sans-serif; font-size: 12px; }
.terminal-header button { background: none; border: none; color: white; font-size: 16px; cursor: pointer; padding: 0; width: auto; }
.terminal-content { padding: 10px; overflow-y: auto; flex-grow: 1; font-size: 0.85rem; white-space: pre-wrap; }

/* Polar Table */
.polar-table { width: 100%; border-collapse: collapse; font-size: 12px; text-align: center; }
.polar-table th, .polar-table td { border: 1px solid #ccc; padding: 6px; }
.polar-table th { background: #f0f0f0; font-weight: bold; }
.polar-table tr:nth-child(even) { background: #f9f9f9; }

/* API Inspector Tabs */
.api-tabs { display: flex; gap: 5px; margin-bottom: 10px; border-bottom: 2px solid #ccc; padding-bottom: 5px; }
.api-tab { background: #e9ecef; color: #333; padding: 5px 10px; border-radius: 4px; font-size: 12px; width: auto; }
.api-tab.active { background: #6c757d; color: white; }
.log-area { flex-grow: 1; resize: none; font-family: monospace; font-size: 11px; padding: 8px; border: 1px solid #ccc; border-radius: 4px; background: #f8f9fa; }

/* Map Markers & Labels */
.custom-marker { border-radius: 50%; border: 2px solid white; box-shadow: 0 0 4px rgba(0,0,0,0.5); }
.marker-hazard { background-color: rgba(217, 83, 79, 0.5); border: 2px solid #d9534f; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.route-label { background: rgba(255,255,255,0.95); border: 1px solid #0078A8; border-radius: 4px; padding: 2px 4px; font-size: 10px; font-weight: bold; color: #0078A8; white-space: nowrap; box-shadow: 0 2px 4px rgba(0,0,0,0.3); pointer-events: none; width: auto !important; min-width: 80px; text-align: center; line-height: 1.2; }
.leg-label { background: #ffc107; border: 1px solid #d39e00; border-radius: 10px; padding: 2px 6px; font-size: 10px; font-weight: bold; color: #000; white-space: nowrap; box-shadow: 0 2px 4px rgba(0,0,0,0.3); pointer-events: none; text-align: center; }

/* Weather Cluster */
.weather-cluster { display: flex; gap: 5px; align-items: center; background: rgba(255,255,255,0.85); padding: 2px 6px; border-radius: 12px; border: 1px solid #ccc; box-shadow: 0 2px 4px rgba(0,0,0,0.2); font-size: 11px; font-weight: bold; white-space: nowrap; }
.weather-item { display: flex; align-items: center; gap: 2px; }

/* Live Boat Marker */
.boat-marker { font-size: 28px; text-shadow: 2px 2px 4px rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; }

/* Card Design for Report */
.card-container { display: flex; flex-direction: column; gap: 15px; }
.card { background: white; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); overflow: hidden; border-left: 5px solid #0078A8; }
.card.hazard { border-left-color: #d9534f; }
.card-header { background: #f8f9fa; padding: 10px 15px; border-bottom: 1px solid #e9ecef; display: flex; justify-content: space-between; align-items: center; }
.card-header h4 { margin: 0; font-size: 1.1rem; color: #333; }
.card-body { padding: 15px; font-size: 0.9rem; line-height: 1.5; }
.card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.info-box { background: #f1f3f5; padding: 10px; border-radius: 6px; }
.info-box h5 { margin: 0 0 5px 0; font-size: 0.85rem; color: #666; text-transform: uppercase; }
.gas-station { font-size: 0.85em; background: #fff3cd; padding: 8px; border-radius: 4px; margin-top: 10px; border-left: 3px solid #ffc107; }

.type-selector { display: flex; flex-direction: column; gap: 5px; margin-top: 10px; }
.type-btn { padding: 5px; font-size: 0.8rem; border: 1px solid #ccc; background: #f8f9fa; cursor: pointer; border-radius: 3px; }
.type-btn:hover { background: #e2e6ea; }
.type-btn.hafen { border-left: 4px solid #0078A8; }
.type-btn.anker { border-left: 4px solid #28a745; }
.type-btn.lenkpunkt { border-left: 4px solid #6c757d; }
.type-btn.delete { border-left: 4px solid #d9534f; color: #d9534f; font-weight: bold; }
