:root {
  --bg: #e6e8ed;
  --card: #111827;
  --muted: #94a3b8;
  --text: #e5e7eb;
  --acc: #3b82f6;
  --acc-2: #22c55e;
  --danger: #ef4444;
  --warn: #f59e0b;
  --shadow: 0 10px 25px rgba(0, 0, 0, .25);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Inter, Ubuntu, Cantarell, "Helvetica Neue", Arial;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg), #758b85);
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center top;
}

a {
  color: var(--acc);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(17, 24, 39, .8);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.header-wrap {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: .3px;
}

.brand .logo {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  background: transparent !important;
  box-shadow: none !important;
}

.dot {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
  animation: wander 2s ease-in-out infinite alternate;
}

.dot1 {
  background: #36A2EB;
  animation-delay: 0s;
}

.dot2 {
  background: #FF6384;
  animation-delay: 0.3s;
}

.dot3 {
  background: #ffffff;
  animation-delay: 0.6s;
}

@keyframes wander {
  0% { left: 10%; }
  50% { left: 40%; }
  100% { left: 70%; }
}

nav {
  margin-left: auto;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

nav a {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .03);
}

/* Logout-Button */
nav a.logout-btn {
  background-color: #ff4d4f;
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-weight: bold;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background-color 0.2s;
}

nav a.logout-btn:hover {
  background-color: #d9363e;
}

.container {
  max-width: 1100px;
  margin: 24px auto;
  padding: 0 18px 40px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

.card {
  grid-column: span 12;
  background: radial-gradient(1000px 300px at -10% -20%, rgba(59,130,246,.08), transparent 60%),
              radial-gradient(700px 240px at 120% -20%, rgba(34,197,94,.07), transparent 60%),
              rgba(17,24,39,.7);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

@media (min-width:800px) {
  .card.half { grid-column: span 6; }
  .card.third { grid-column: span 4; }
}

h1, h2, h3 {
  margin: 0 0 10px;
}

h1 { font-size: 22px; }
h2 { font-size: 18px; }

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  background: rgba(17,24,39,.5);
  border-radius: 12px;
  overflow: hidden;
}

th, td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  text-align: left;
}

tr:hover {
  background: rgba(255,255,255,.03);
}

.btn, button, input[type="submit"] {
  appearance: none;
  border: 1px solid rgba(255,255,255,.1);
  background: linear-gradient(180deg, rgba(59,130,246,.9), rgba(59,130,246,.8));
  color: #fff;
  padding: 9px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  box-shadow: var(--shadow);
}

.btn.secondary {
  background: linear-gradient(180deg, rgba(148,163,184,.25), rgba(100,116,139,.25));
  color: #e2e8f0;
}

.btn.success {
  background: linear-gradient(180deg, rgba(34,197,94,.9), rgba(34,197,94,.8));
}

.btn.warn {
  background: linear-gradient(180deg, rgba(245,158,11,.9), rgba(245,158,11,.8));
}

.btn.danger {
  background: linear-gradient(180deg, rgba(239,68,68,.9), rgba(239,68,68,.8));
}

input[type="text"], input[type="number"], input[type="date"], textarea, select, input[type="password"], input[type="email"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(2,6,23,.6);
  color: #e5e7eb;
  outline: none;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-row > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid rgba(255,255,255,.15);
}

.badge.open { background: rgba(59,130,246,.15); }
.badge.paid { background: rgba(34,197,94,.15); }
.badge.canceled { background: rgba(239,68,68,.15); }

footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px;
  color: var(--muted);
  opacity: .8;
}

hr {
  border: none;
  border-top: 1px solid rgba(255,255,255,.08);
  margin: 14px 0;
}

.small { font-size: 12px; color: var(--muted); }
.help { color: var(--muted); font-size: 13px; }

.empty {
  border: 1px dashed rgba(255,255,255,.2);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  color: var(--muted);
}

.actions-container {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* --- Responsive Tabellen --- */
@media(max-width:800px){
  table.responsive-table tr {
      display: block;
      margin-bottom: 16px;
      border: 1px solid rgba(255,255,255,.1);
      border-radius: 12px;
      padding: 12px;
      background: rgba(17,24,39,.7);
  }
  table.responsive-table td {
      display: flex;
      justify-content: space-between;
      padding: 6px 0;
  }
  table.responsive-table td::before {
      content: attr(data-label);
      font-weight: bold;
      color: var(--muted);
      margin-right: 8px;
  }
  table.responsive-table th {
      display: none;
  }
}

/* --- Details-Bereich Desktop --- */
.details-row {
  display: none;
  background: rgba(59,130,246,.05);
}
.details-content {
  padding: 12px;
  font-size: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.details-content strong {
  min-width: 100px;
  font-weight: 600;
  text-align: left;
}

@media (max-width: 768px) {
  .details-content {
    flex-direction: column;
    gap: 6px;
    font-size: 15px;
    text-align: left;
  }
  .details-content strong {
    min-width: auto;
    text-align: left;
  }
}

/* --- Vollbild-Hamburger-Menü --- */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 101;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: white;
  border-radius: 2px;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(17, 24, 39, 0.95);
  z-index: 100;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  animation: fadeIn 0.3s ease;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu .logo {
  margin-bottom: 20px;
}

.mobile-menu a {
  font-size: 20px;
  color: white;
  text-decoration: none;
  padding: 10px;
}

.mobile-menu a:hover {
  text-decoration: underline;
}

.close-menu {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 30px;
  color: white;
  cursor: pointer;
}

/* Responsive Umschaltung */
@media (max-width: 768px) {
  nav { display: none !important; }
  .hamburger { display: flex !important; }
}

@media (min-width: 769px) {
  nav { display: flex !important; }
  .hamburger { display: none !important; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* --- Filter-Buttons --- */
.filter-buttons .btn {
  background: linear-gradient(180deg, rgba(148,163,184,.25), rgba(100,116,139,.25));
  color: #e2e8f0;
  border-color: rgba(255,255,255,.15);
  transition: transform .08s ease, filter .12s ease, background .12s ease;
}

.filter-buttons .btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.filter-buttons .btn.active {
  background: linear-gradient(180deg, var(--acc), #2563eb);
  color: #fff;
  border-color: rgba(255,255,255,.15);
}

.filter-buttons .btn.active:hover {
  filter: brightness(0.95);
  transform: translateY(-1px);
}

/* --- Button Hover (generisch, falls gewünscht) --- */
.btn:hover,
button:hover,
input[type="submit"]:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
}

/* --- Alerts (Flash-Meldungen) --- */
.alert {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: var(--shadow);
}

.alert.success {
  background: #111827;            /* Wunschfarbe */
  color: var(--text);             /* #e5e7eb – passt zum Dark-Theme */
  border-color: rgba(255,255,255,.12);
}

/* Optional (falls du später andere Typen nutzt):
.alert.warn   { background: var(--warn);   color: #111; }
.alert.danger { background: var(--danger); color: #111; }
*/
