/* App.css - gemeinsame Oberflaechen- und Markenstile */

:root {
  --brand-green: #248a3d;
  --brand-green-dark: #17652e;
  --brand-green-soft: #edf7ed;
  --brand-orange: #f6a51b;
  --brand-ink: #39424e;
  --brand-surface: #f4f8f1;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background-color: var(--brand-surface);
  margin: 0;
  padding: 0;
}

.foodsharing-login {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: var(--brand-surface);
}

.foodsharing-login__card {
  display: grid;
  gap: 1.5rem;
  width: 100%;
  max-width: 28rem;
  padding: 2.25rem;
  border: 1px solid #d8e7d6;
  border-top: 4px solid var(--brand-green);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(36, 80, 39, 0.12);
}

.foodsharing-login__logo {
  display: block;
  width: min(100%, 21rem);
  height: auto;
  margin: 0 auto 1.5rem;
}

.foodsharing-login__title {
  margin: 0 0 0.45rem;
  color: var(--brand-ink);
  font-size: 1.35rem;
  font-weight: 700;
  text-align: center;
}

.foodsharing-login__intro {
  margin: 0 0 1.5rem;
  color: #64706a;
  font-size: 0.875rem;
  line-height: 1.5;
  text-align: center;
}

.foodsharing-login__label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--brand-ink);
  font-size: 0.875rem;
  font-weight: 600;
}

.foodsharing-login__input {
  box-sizing: border-box;
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid #cddacb;
  border-radius: 5px;
  color: var(--brand-ink);
  background: #fff;
}

.foodsharing-login__input:focus {
  border-color: var(--brand-green);
  outline: none;
  box-shadow: 0 0 0 3px rgba(36, 138, 61, 0.18);
}

.foodsharing-login__submit {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 0;
  border-radius: 5px;
  color: #fff;
  background: var(--brand-green);
  font-weight: 700;
}

.foodsharing-login__submit:hover {
  background: var(--brand-green-dark);
}

.foodsharing-login__error {
  margin-bottom: 1.25rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid #edb4a8;
  border-radius: 5px;
  color: #9b2c1f;
  background: #fff1ed;
  font-size: 0.875rem;
}

/* Keep the existing Tailwind-based views on the same brand palette. */
*[class~="bg-blue-50"] { background-color: var(--brand-green-soft) !important; }
*[class~="bg-gray-100"] { background-color: var(--brand-surface) !important; }
*[class~="bg-blue-100"] { background-color: #dcefdc !important; }
*[class~="bg-blue-500"], *[class~="bg-blue-600"] { background-color: var(--brand-green) !important; }
*[class~="text-blue-600"], *[class~="text-blue-700"], *[class~="text-blue-800"], *[class~="text-blue-900"] { color: var(--brand-green-dark) !important; }
*[class~="border-blue-100"], *[class~="border-blue-200"] { border-color: #cce2ca !important; }
*[class~="border-blue-500"], *[class~="border-blue-600"] { border-color: var(--brand-green) !important; }
*[class~="hover:bg-blue-600"]:hover, *[class~="hover:bg-blue-700"]:hover { background-color: var(--brand-green-dark) !important; }
*[class~="hover:bg-blue-50"]:hover, *[class~="hover:bg-blue-100"]:hover { background-color: var(--brand-green-soft) !important; }
*[class~="hover:text-blue-600"]:hover, *[class~="hover:text-blue-700"]:hover, *[class~="hover:text-blue-800"]:hover { color: var(--brand-green-dark) !important; }
*[class~="hover:border-blue-400"]:hover, *[class~="hover:border-blue-500"]:hover { border-color: var(--brand-green) !important; }
*[class~="focus:border-blue-500"]:focus { border-color: var(--brand-green) !important; }
*[class~="focus:ring-blue-500"]:focus, *[class~="focus:ring-blue-400"]:focus, *[class~="focus:ring-blue-300"]:focus, *[class~="focus:ring-blue-200"]:focus { --tw-ring-color: rgba(36, 138, 61, 0.35) !important; }

.App {
  min-height: 100vh;
  padding: 1rem;
}

/* Verbesserte Tabellen-Styles */
table {
  border-collapse: collapse;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

th {
  background-color: #f3f4f6;
  font-weight: 600;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 2px solid #e5e7eb;
}

td {
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
}

tr:last-child td {
  border-bottom: none;
}

/* Button-Styles */
button {
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

button:focus {
  outline: none;
}

/* Verbesserte Input-Styles */
input[type="checkbox"] {
  cursor: pointer;
}

select, input[type="date"] {
  padding: 8px 12px;
  border-radius: 4px;
  border: 1px solid #d1d5db;
  font-size: 14px;
  transition: all 0.2s ease;
}

select:focus, input[type="date"]:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
  outline: none;
}

/* Status-Banner */
.status-banner {
  padding: 12px 16px;
  margin-bottom: 16px;
  border-radius: 6px;
  position: relative;
}

.status-banner.success {
  background-color: #d1fae5;
  border: 1px solid #10b981;
  color: #065f46;
}

.status-banner.error {
  background-color: #fee2e2;
  border: 1px solid #ef4444;
  color: #991b1b;
}

/* JSON-Vorschau */
pre {
  background-color: #f3f4f6;
  padding: 16px;
  border-radius: 6px;
  overflow-x: auto;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 14px;
  line-height: 1.5;
}

/* Responsive Design */
.dashboard-summary-card {
  position: sticky;
  top: 1rem;
  z-index: 10;
}

@media (max-width: 768px) {
  table {
    font-size: 14px;
  }
  
  th, td {
    padding: 8px 12px;
  }
  
  .button-container {
    flex-direction: column;
    gap: 12px;
  }
  
  .button-container button {
    width: 100%;
  }

  .dashboard-summary-card {
    position: static;
    top: auto;
  }
}

.range-picker-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.4);
}

.range-picker-modal {
  width: 100%;
  max-width: 32rem;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.25);
}

@media (max-width: 767px) {
  .range-picker-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .range-picker-modal {
    max-height: calc(100dvh - 1rem);
    border-radius: 8px 8px 0 0;
    overflow-y: auto;
  }
}

@keyframes dashboard-row-glow {
  0% {
    background-color: rgba(59, 130, 246, 0.25);
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.45);
  }
  60% {
    background-color: rgba(59, 130, 246, 0.15);
    box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.15);
  }
  100% {
    background-color: transparent;
    box-shadow: 0 0 0 0 transparent;
  }
}

.dashboard-row-highlight {
  animation: dashboard-row-glow 2.5s ease forwards;
}
