
/* === GLASMORPHISM V5 – 100% RESPONSIV UND PROFESSIONELL === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

:root {
  --font-main: 'Inter', sans-serif;
  --bg-gradient: linear-gradient(135deg, #c9d6ff, #e2e2e2);
  --glass: rgba(255, 255, 255, 0.15);
  --glass-strong: rgba(255, 255, 255, 0.25);
  --text-dark: #111;
  --text-light: #fff;
  --blue: #0056b3;
  --green: #2e7d32;
  --red: #c62828;
  --radius: 18px;
  --blur: 12px;
  --max-width: 960px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  
  /* Touch-Optimierung */
  --touch-target: 36px;
  --touch-spacing: 6px;
}

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

/* Touch-Optimierung für alle interaktiven Elemente */
button, .btn, input, select, textarea, a, [role="button"] {
  min-height: var(--touch-target);
  min-width: var(--touch-target);
}

/* Smooth Scrolling für bessere Mobile-Erfahrung */
html {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

body {
  font-family: var(--font-main);
  font-size: 14px;
  background: var(--bg-gradient);
  background-image:
    var(--bg-gradient),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='rgba(46,125,50,0.08)' stroke-width='1'%3E%3Cpath d='M60 10c15 20 15 40 0 60c-15-20-15-40 0-60z'/%3E%3Cpath d='M20 40c10 12 10 24 0 36c-10-12-10-24 0-36z'/%3E%3Cpath d='M100 40c10 12 10 24 0 36c-10-12-10-24 0-36z'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat, repeat;
  background-size: cover, 240px 240px;
  background-attachment: fixed, fixed;
  color: var(--text-dark);
  min-height: 100vh;
  
  /* Touch-Optimierung */
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

/* Text-Selektion für Inhalte erlauben */
p, h1, h2, h3, h4, h5, h6, span, div {
  -webkit-user-select: text;
  user-select: text;
}

/* Entferne alle Layout-spezifischen Regeln, die mit Tailwind kollidieren */
/* .container, body display: flex, etc. wurden entfernt */

h1, h2, h3 {
  font-weight: 600;
  margin-bottom: 1.5rem;
  text-align: center;
}

/* Garten-Akzent unter Überschriften */
h1::after, h2::after {
  content: "";
  display: block;
  width: 72px;
  height: 8px;
  margin: 8px auto 0 auto;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(46,125,50,0.9), rgba(139,195,74,0.8));
}

form {
  margin-bottom: 2rem;
}

input[type="text"],
input[type="password"],
input[type="date"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 18px;
  border-radius: 12px;
  border: 1px solid rgba(46,125,50,0.18);
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(5px);
  color: var(--text-dark);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.08);
  
  /* Touch-Optimierung */
  min-height: var(--touch-target);
  -webkit-appearance: none;
  appearance: none;
}

/* Mobile-spezifische Eingabefeld-Verbesserungen */
@media (max-width: 768px) {
  input[type="text"],
  input[type="password"],
  input[type="date"],
  input[type="number"],
  select,
  textarea {
    /* Verstärkter Kontrast für Mobile */
    background: #ffffff !important;
    color: #111111 !important;
    border: 2px solid #10b981 !important;
    font-size: 16px !important; /* Verhindert Zoom auf iOS */
    font-weight: 500;
    
    /* Bessere Sichtbarkeit */
    -webkit-text-fill-color: #111111;
    -webkit-opacity: 1;
    opacity: 1;
  }
  
  /* Placeholder-Text deutlicher machen */
  input::placeholder,
  select::placeholder {
    color: #6b7280 !important;
    opacity: 1;
    -webkit-text-fill-color: #6b7280;
  }
  
  /* Option-Text sichtbar machen */
  option {
    background: #ffffff !important;
    color: #111111 !important;
  }
  
  /* Labels deutlicher machen */
  label {
    color: #111827 !important;
    font-weight: 600;
  }
}

/* Focus-States für bessere Accessibility */
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(46,125,50,0.5);
  outline-offset: 2px;
  border-color: rgba(46,125,50,0.8);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(46,125,50,0.15);
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg fill='black' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 20px;
  padding-right: 3rem;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

button,
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 12px;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  backdrop-filter: blur(5px);
  
  /* Touch-Optimierung */
  min-height: var(--touch-target);
  min-width: var(--touch-target);
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

/* Touch-Feedback für Buttons */
button:active,
.btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.btn-primary {
  background: linear-gradient(135deg, var(--green), #4caf50);
  color: var(--text-light);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(46,125,50,0.3);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--blue), #2196f3);
  color: var(--text-light);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,86,179,0.3);
}

.btn-danger {
  background: linear-gradient(135deg, var(--red), #f44336);
  color: var(--text-light);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(198,40,40,0.3);
}

.btn-outline {
  background: transparent;
  color: var(--green);
  border: 2px solid var(--green);
}

.btn-outline:hover {
  background: var(--green);
  color: var(--text-light);
}

/* Tabellen */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  background: var(--glass);
  border-radius: var(--radius);
  overflow: hidden;
  backdrop-filter: blur(var(--blur));
  box-shadow: var(--shadow);
}

th, td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid rgba(46,125,50,0.1);
}

th {
  background: rgba(46,125,50,0.1);
  font-weight: 600;
  color: var(--green);
}

tr:hover {
  background: rgba(255,255,255,0.1);
}

/* Karten */
.card {
  background: var(--glass);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1rem 0;
  backdrop-filter: blur(var(--blur));
  box-shadow: var(--shadow);
  border: 1px solid rgba(46,125,50,0.12);
}

.card-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(46,125,50,0.1);
}

.card-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--green);
  margin: 0;
}

/* Status-Badges */
.status {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-success {
  background: rgba(76,175,80,0.2);
  color: #2e7d32;
  border: 1px solid rgba(76,175,80,0.3);
}

.status-warning {
  background: rgba(255,152,0,0.2);
  color: #f57c00;
  border: 1px solid rgba(255,152,0,0.3);
}

.status-error {
  background: rgba(244,67,54,0.2);
  color: #c62828;
  border: 1px solid rgba(244,67,54,0.3);
}

.status-info {
  background: rgba(33,150,243,0.2);
  color: #1976d2;
  border: 1px solid rgba(33,150,243,0.3);
}

/* Alerts */
.alert {
  padding: 1rem 1.5rem;
  border-radius: 12px;
  margin: 1rem 0;
  border-left: 4px solid;
  backdrop-filter: blur(5px);
}

.alert-success {
  background: rgba(76,175,80,0.1);
  border-left-color: var(--green);
  color: #2e7d32;
}

.alert-warning {
  background: rgba(255,152,0,0.1);
  border-left-color: #f57c00;
  color: #f57c00;
}

.alert-error {
  background: rgba(244,67,54,0.1);
  border-left-color: var(--red);
  color: var(--red);
}

.alert-info {
  background: rgba(33,150,243,0.1);
  border-left-color: #1976d2;
  color: #1976d2;
}

/* Modals */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(5px);
}

.modal-content {
  background: var(--glass);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  backdrop-filter: blur(var(--blur));
  box-shadow: var(--shadow);
  border: 1px solid rgba(46,125,50,0.12);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(46,125,50,0.1);
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--green);
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-dark);
  padding: 0.5rem;
  border-radius: 50%;
  transition: background 0.3s ease;
  
  /* Touch-Optimierung */
  min-height: var(--touch-target);
  min-width: var(--touch-target);
}

.modal-close:hover {
  background: rgba(0,0,0,0.1);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.rounded { border-radius: 8px; }
.rounded-lg { border-radius: 12px; }
.rounded-xl { border-radius: 16px; }

.shadow { box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.shadow-lg { box-shadow: 0 8px 25px rgba(0,0,0,0.15); }

/* Mobile-spezifische Optimierungen */
@media (max-width: 1024px) {
  /* Tablet-Optimierungen */
  .card {
    padding: 1.5rem;
    margin: 1rem 0;
  }
  
  .modal-content {
    padding: 1.5rem;
    margin: 1rem;
  }
  
  button, .btn {
    padding: 14px 24px;
    font-size: 0.9rem;
  }
  
  /* Touch-Targets für Tablet */
  :root {
    --touch-target: 40px;
  }
}

@media (max-width: 768px) {
  /* Mobile-Optimierungen */
  body {
    font-size: 16px;
    padding: 2vh 3vw;
  }
  
  .card {
    padding: 1.5rem;
    margin: 1rem 0;
  }
  
  .modal-content {
    padding: 1.5rem;
    margin: 1rem;
  }
  
  button, .btn {
    padding: 14px 24px;
    font-size: 0.9rem;
  }
  
  /* Touch-Targets für Mobile */
  :root {
    --touch-target: 44px;
  }
  
  /* Mobile-spezifische Abstände */
  h1, h2, h3 {
    margin-bottom: 1rem;
  }
  
  /* Mobile-optimierte Tabellen */
  table {
    font-size: 0.9rem;
  }
  
  th, td {
    padding: 12px 8px;
  }
  
  /* Mobile-optimierte Formulare */
  input[type="text"],
  input[type="password"],
  input[type="date"],
  input[type="number"],
  select,
  textarea {
    padding: 14px;
    font-size: 16px; /* Verhindert Zoom auf iOS */
  }
}

@media (max-width: 480px) {
  /* Small Mobile Optimierungen */
  body {
    font-size: 14px;
    padding: 1vh 2vw;
  }
  
  .card {
    padding: 1rem;
  }
  
  .modal-content {
    padding: 1rem;
  }
  
  button, .btn {
    padding: 12px 20px;
    font-size: 0.85rem;
  }
  
  /* Touch-Targets für Small Mobile */
  :root {
    --touch-target: 48px;
  }
  
  /* Mobile-optimierte Abstände */
  .card {
    margin: 0.5rem 0;
  }
  
  /* Mobile-optimierte Typografie */
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
  h3 { font-size: 1.1rem; }
}

/* Touch-Geräte spezifische Optimierungen */
@media (hover: none) and (pointer: coarse) {
  /* Touch-spezifische Hover-Effekte deaktivieren */
  button:hover,
  .btn:hover,
  a:hover {
    transform: none;
    box-shadow: none;
  }
  
  /* Touch-Feedback verstärken */
  button:active,
  .btn:active,
  a:active {
    transform: scale(0.98);
    opacity: 0.8;
  }
  
  /* Touch-Targets vergrößern */
  :root {
    --touch-target: 48px;
  }
}

/* High-DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  /* Schärfere Schatten und Borders */
  .shadow {
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  }
  
  .shadow-lg {
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  }
}

/* Dark Mode Support (optional) */
@media (prefers-color-scheme: dark) {
  :root {
    --text-dark: #fff;
    --text-light: #111;
    --glass: rgba(0, 0, 0, 0.3);
    --glass-strong: rgba(0, 0, 0, 0.5);
  }
  
  body {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
  }
}

/* Print Styles */
@media print {
  .no-print { display: none !important; }
  
  body {
    background: white !important;
    color: black !important;
  }
  
  .card {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
  }
  
  /* Touch-Elemente für Print optimieren */
  button, .btn {
    border: 1px solid #000 !important;
    background: white !important;
    color: black !important;
  }
}
