/* ===== CSS Variables ===== */
:root {
  /* Maritime Farbpalette - Elegant und professionell */
  --navy: #0C4A6E;
  --navy-dark: #075985;
  --navy-light: #0369a1;
  --ocean: #0891b2;
  --ocean-light: #06b6d4;

  /* Neutrale Business-Farben */
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;

  /* Statusfarben - Dezent */
  --success: #059669;
  --warning: #d97706;
  --danger: #dc2626;
  --info: var(--ocean);

  /* Layout */
  --bg-main: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-card: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border: #e2e8f0;

  /* Spacing & Radius */
  --radius: 6px;
  --radius-lg: 8px;
  --spacing-unit: 0.25rem;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;

  /* Shadows - Sehr subtil */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);

  /* Transitions */
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-main);
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.6;
  padding-bottom: 80px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ===== Container ===== */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ===== Navbar - Maritim & Elegant ===== */
.navbar {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  border-bottom: 3px solid var(--ocean);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(8px);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  gap: 2rem;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: #ffffff;
  text-decoration: none;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.navbar-brand::before {
  content: "";
  display: inline-block;
  width: 40px;        /* Größe anpassen */
  height: 40px;
  background-image: url("../img/favicon.png");
  background-size: contain;
  background-repeat: no-repeat;
  margin-right: 0.5rem;
}


.navbar-brand:hover {
  color: var(--ocean-light);
}

.navbar-nav {
  display: flex;
  list-style: none;
  gap: 0.125rem;
  margin: 0;
  flex: 1;
  margin-left: 2rem;
}

.nav-link {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  transition: var(--transition);
  display: block;
}

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

.d-flex { display: flex; }
.align-items-center { align-items: center; }
.me-auto { margin-right: auto; }
.me-2 { margin-right: 0.5rem; }
.ms-2 { margin-left: 0.5rem; }
.text-light { color: #ffffff; }

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

h1::before {
  content: '';
  width: 4px;
  height: 2rem;
  background: linear-gradient(180deg, var(--ocean) 0%, var(--ocean-light) 100%);
  border-radius: 2px;
}

h2 {
  font-size: 1.5rem;
  color: var(--slate-800);
  margin-bottom: 1rem;
}

h5 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0;
}

.lead {
  font-size: 1.125rem;
  color: var(--text-secondary);
  font-weight: 400;
  margin-bottom: 2rem;
}

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }

/* ===== Spacing ===== */
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }
.mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }
.my-3 { margin-top: 1rem; margin-bottom: 1rem; }
.p-0 { padding: 0; }
.p-3 { padding: 1rem; }

/* ===== Cards - Elegant ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--slate-300);
}

.card-header {
  background: var(--slate-50);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-body {
  padding: 1.5rem;
}

/* ===== Buttons - Funktional & Modern ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.125rem;
  font-size: 0.9375rem;
  font-weight: 500;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  text-align: center;
  justify-content: center;
  white-space: nowrap;
  font-family: inherit;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--navy);
  color: #ffffff;
  border-color: var(--navy);
}

.btn-primary:hover {
  background: var(--navy-dark);
}

.btn-success {
  background: var(--success);
  color: #ffffff;
}

.btn-success:hover {
  background: #047857;
}

.btn-danger {
  background: var(--danger);
  color: #ffffff;
}

.btn-danger:hover {
  background: #b91c1c;
}

.btn-warning {
  background: var(--warning);
  color: #ffffff;
}

.btn-warning:hover {
  background: #b45309;
}

.btn-secondary {
  background: var(--slate-600);
  color: #ffffff;
}

.btn-secondary:hover {
  background: var(--slate-700);
}

.btn-outline-light {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-outline-secondary {
  background: transparent;
  border: 1px solid var(--slate-300);
  color: var(--slate-700);
}

.btn-outline-secondary:hover {
  background: var(--slate-50);
}

.btn-sm {
  padding: 0.25rem 0.625rem;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

/* ===== Forms - Clean & Functional ===== */
.form-control, .form-select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.9375rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  transition: var(--transition);
  font-family: inherit;
  color: var(--text-primary);
}

.form-control:focus, .form-select:focus {
  outline: none;
  border-color: var(--ocean);
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
}

.form-control-sm, .form-select-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.8125rem;
}

.form-label {
  display: block;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.375rem;
  font-size: 0.875rem;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-check-input {
  width: 1.125rem;
  height: 1.125rem;
  border: 1.5px solid var(--slate-300);
  border-radius: 4px;
  cursor: pointer;
  appearance: none;
  position: relative;
  background: var(--bg-card);
  transition: var(--transition);
}

.form-check-input:checked {
  background: var(--navy);
  border-color: var(--navy);
}

.form-check-input:checked::after {
  content: '✓';
  position: absolute;
  color: white;
  font-size: 0.75rem;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: 700;
}

.form-check-label {
  cursor: pointer;
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-primary);
}

/* ===== Grid System ===== */
.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -0.5rem;
}

.row.g-2 { margin: 0 -0.25rem; }
.row.g-2 > * { padding: 0.25rem; }
.row.g-3 { margin: 0 -0.5rem; }
.row.g-3 > * { padding: 0.5rem; }

.col, .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6,
.col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {
  padding: 0 0.5rem;
  flex: 1;
}

.col-md-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
.col-md-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
.col-md-3 { flex: 0 0 25%; max-width: 25%; }
.col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-md-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
.col-md-6 { flex: 0 0 50%; max-width: 50%; }
.col-md-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
.col-md-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
.col-md-9 { flex: 0 0 75%; max-width: 75%; }
.col-md-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
.col-md-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
.col-md-12 { flex: 0 0 100%; max-width: 100%; }

/* ===== Tables - KOMPAKT & EFFIZIENT ===== */
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  font-size: 0.875rem;
}

.table-responsive {
  overflow-x: auto;
  border-radius: var(--radius-lg);
}

.table thead {
  background: var(--slate-50);
}

.table thead th {
  color: var(--slate-700);
  font-weight: 600;
  font-size: 0.75rem;
  padding: 0.5rem 0.75rem;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.table tbody tr {
  transition: var(--transition);
  border-bottom: 1px solid var(--slate-100);
}

.table tbody tr:hover {
  background: var(--slate-50);
}

.table tbody tr:last-child {
  border-bottom: none;
}

.table tbody td {
  padding: 0.5rem 0.75rem;
  vertical-align: middle;
  color: var(--text-primary);
  font-size: 0.875rem;
  line-height: 1.4;
}

/* Spezielle Spalten-Optimierungen */
.table tbody td:first-child {
  font-weight: 500;
  color: var(--slate-600);
}

/* Inputs in Tabellen - extra kompakt */
.table .form-control,
.table .form-select {
  padding: 0.25rem 0.5rem;
  font-size: 0.8125rem;
  min-height: auto;
}

.table .form-control-sm,
.table .form-select-sm {
  padding: 0.1875rem 0.375rem;
  font-size: 0.75rem;
}

/* Buttons in Tabellen - kompakt */
.table .btn {
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  line-height: 1.2;
}

.table .btn-sm {
  padding: 0.1875rem 0.5rem;
  font-size: 0.6875rem;
}

/* Checkboxen in Tabellen */
.table .form-check {
  margin: 0;
  padding: 0;
}

.table .form-check-input {
  width: 1rem;
  height: 1rem;
  margin: 0;
}

.table-striped tbody tr:nth-of-type(odd) {
  background: var(--slate-50);
}

.table-dark thead {
  background: var(--navy);
}

.table-dark thead th {
  color: #ffffff;
}

.table-warning {
  background: rgba(217, 119, 6, 0.05);
}

.align-middle {
  vertical-align: middle !important;
}

/* Button Groups in Tabellen */
.table .btn-group {
  gap: 0.25rem;
}

.table .btn-group .btn {
  padding: 0.1875rem 0.5rem;
}

/* ===== Alerts - Informativ ===== */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  border: 1px solid;
  font-size: 0.9375rem;
  display: flex;
  gap: 0.75rem;
}

.alert::before {
  font-size: 1.125rem;
}

.alert-success {
  background: #ecfdf5;
  color: #065f46;
  border-color: #6ee7b7;
}

.alert-success::before { content: '✓'; }

.alert-danger {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fca5a5;
}

.alert-danger::before { content: '⚠'; }

.alert-warning {
  background: #fffbeb;
  color: #92400e;
  border-color: #fcd34d;
}

.alert-warning::before { content: '⚡'; }

.alert-info {
  background: #ecfeff;
  color: #155e75;
  border-color: #67e8f9;
}

.alert-info::before { content: 'ℹ'; }

/* ===== Badges ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  border-radius: calc(var(--radius) - 2px);
  font-weight: 500;
  font-size: 0.8125rem;
  line-height: 1.2;
}

.bg-primary {
  background: var(--navy);
  color: #ffffff;
}

.bg-secondary {
  background: var(--slate-500);
  color: #ffffff;
}

/* ===== Spinner ===== */
.spinner-border {
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  border: 2px solid var(--ocean);
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.text-primary { color: var(--navy); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ===== Input Groups ===== */
.input-group {
  display: flex;
  border-radius: var(--radius);
  overflow: hidden;
}

.input-group .form-control,
.input-group .form-select {
  border-radius: 0;
  flex: 1;
}

.input-group .btn {
  border-radius: 0;
}

/* ===== Button Groups ===== */
.btn-group {
  display: inline-flex;
}

.btn-group .btn {
  margin: 0;
  border-radius: 0;
}

.btn-group .btn:first-child {
  border-radius: var(--radius) 0 0 var(--radius);
}

.btn-group .btn:last-child {
  border-radius: 0 var(--radius) var(--radius) 0;
}

.btn-group .btn:not(:last-child) {
  border-right: none;
}

.d-inline { display: inline; }
.d-inline-flex { display: inline-flex; }
.d-grid { display: grid; }
.d-block { display: block; }
.d-none { display: none; }
.gap-3 { gap: 1rem; }
.col-8 { width: 66.666667%; }
.mx-auto { margin-left: auto; margin-right: auto; }
.w-100 { width: 100%; }
.justify-content-center { justify-content: center; }
.border { border: 1px solid var(--border); }

/* ===== Dashboard ===== */
.text-center .d-grid .btn-lg {
  text-align: left;
  justify-content: flex-start;
  font-weight: 500;
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}

.text-center .d-grid .btn-lg:hover {
  background: var(--slate-50);
  border-color: var(--ocean);
  box-shadow: var(--shadow-sm);
  transform: translateX(4px) translateY(-1px);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  h1 { font-size: 1.5rem; }

  .navbar .container {
    flex-direction: column;
    gap: 0.75rem;
  }

  .me-auto {
    margin-right: 0;
  }

  .navbar-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    margin-left: 0;
  }

  .nav-link {
    flex: 0 0 33.333%;
    text-align: center;
    padding: 0.75rem 0.5rem;
  }

  .card-body { padding: 1rem; }

  .table {
    font-size: 0.8125rem;
  }

  .table thead th {
    padding: 0.375rem 0.5rem;
    font-size: 0.6875rem;
  }

  .table tbody td {
    padding: 0.375rem 0.5rem;
    font-size: 0.8125rem;
  }

  .table .btn {
    padding: 0.1875rem 0.5rem;
    font-size: 0.6875rem;
  }

  .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6,
  .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--slate-100);
}

::-webkit-scrollbar-thumb {
  background: var(--slate-400);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--slate-500);
}

/* ===== Special ===== */
.edit-row {
  background: var(--slate-50);
}

.edit-row td {
  padding: 0.75rem !important;
}

.leaflet-container {
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* ===== Print Styles ===== */
@media print {
  .navbar,
  .btn,
  .form-control,
  .form-select {
    display: none;
  }

  .card {
    box-shadow: none;
    border: 1px solid #000;
  }

  .table thead th,
  .table tbody td {
    padding: 0.375rem 0.5rem;
    font-size: 0.75rem;
  }
}

/* Minimale zusätzliche Styles für Landing-Page-spezifische Elemente */
.landing-header {
  padding: 60px 20px 40px;
  text-align: center;
  background: linear-gradient(180deg, var(--bg-main) 0%, var(--slate-50) 100%);
}

.landing-header .app-icon {
  width: 150px;
  height: 150px;
  border-radius: 26px;
  margin: 0 auto 20px;
  display: block;
  box-shadow: var(--shadow-md);
}

.landing-title {
  font-size: 42px;
  margin: 0 0 10px;
  color: var(--navy);
  font-weight: 700;
}

.landing-subtitle {
  font-size: 20px;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto 30px;
  line-height: 1.5;
}

.landing-cta {
  display: inline-block;
  background: var(--ocean);
  color: white;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 500;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.landing-cta:hover {
  background: var(--ocean-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.section-spacing {
  margin: 60px 0;
}

.section-title {
  font-size: 32px;
  margin-bottom: 20px;
  color: var(--slate-800);
  font-weight: 700;
}

.section-description {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 800px;
  margin-bottom: 30px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
}

.feature-card:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--slate-300);
  transform: translateY(-2px);
}

.feature-card h3 {
  margin: 0 0 12px 0;
  font-size: 22px;
  color: var(--navy);
  font-weight: 600;
}

.feature-card p {
  margin: 0;
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.screenshots-grid img {
  width: 100%;
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.screenshots-grid img:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-md);
}

@media (max-width: 600px) {
  .landing-title { font-size: 32px; }
  .section-title { font-size: 26px; }
  .landing-subtitle { font-size: 18px; }
}
