/* ==== RESET & BASIS ========================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  background: #020617; /* sehr dunkles Blau/Schwarz */
  color: #e5e7eb;
}

/* Links */

a {
  color: #38bdf8;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ==== LAYOUT: SIDEBAR + MAIN ================================ */

.layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */

.sidebar {
  width: 260px;
  background: radial-gradient(circle at top, #0f172a, #020617 55%);
  color: #e5e7eb;
  padding: 1.5rem 1.25rem;
  border-right: 1px solid rgba(15, 23, 42, 0.9);
}

/* Logo / Brand oben links */

.sidebar h1 {
  font-size: 1.2rem;
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.sidebar .brand-sub {
  font-size: 0.8rem;
  color: #9ca3af;
  margin-top: 0.15rem;
  margin-bottom: 1.5rem;
}

/* Menü in der Sidebar */

.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  border-radius: 0.8rem;
  margin-bottom: 0.3rem;
  color: #e5e7eb;
  font-size: 0.9rem;
}

.sidebar nav a .nav-icon {
  width: 1.4rem;
  text-align: center;
  font-size: 1rem;
}

.sidebar nav a.active {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #f9fafb;
  font-weight: 600;
}

.sidebar nav a:hover:not(.active) {
  background: rgba(31, 41, 55, 0.7);
}

/* Main Content */

.main {
  flex: 1;
  padding: 1.5rem 2rem 2rem;
  background: radial-gradient(circle at top left, #0b1120, #020617 55%);
}

/* Topbar */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.topbar strong {
  font-size: 1.2rem;
}

.topbar .user-badge {
  font-size: 0.85rem;
  background: rgba(22, 163, 74, 0.2);
  color: #bbf7d0;
  border-radius: 999px;
  padding: 0.1rem 0.7rem;
  margin-left: 0.4rem;
}

/* ==== DASHBOARD CARDS ======================================= */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.card {
  background: radial-gradient(circle at top left, #1f2937, #020617 80%);
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.7);
}

.cards .card {
  position: relative;
  overflow: hidden;
}

.cards .card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.2), transparent 55%);
  opacity: 0;
  transition: opacity 0.15s ease-out;
}

.cards .card:hover::before {
  opacity: 1;
}

.card-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9ca3af;
  margin-bottom: 0.35rem;
}

.card-value {
  font-size: 1.7rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-value a {
  color: inherit;
  text-decoration: none;
}

.card-icon {
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 0.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.card-icon.new {
  background: rgba(59, 130, 246, 0.2);
}

.card-icon.invited {
  background: rgba(249, 115, 22, 0.2);
}

.card-icon.accepted {
  background: rgba(34, 197, 94, 0.2);
}

.card-icon.rejected {
  background: rgba(248, 113, 113, 0.2);
}

.card-icon.waitinglist {
  background: rgba(129, 140, 248, 0.2);
}

/* ==== TABLES & LISTEN ======================================= */

.table-wrapper {
  background: radial-gradient(circle at top left, #020617, #020617 70%);
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  padding: 1rem 1.25rem 1.25rem;
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.7);
  margin-bottom: 1.5rem;
}

.table-wrapper h2 {
  margin-top: 0;
  margin-bottom: 0.2rem;
  font-size: 1rem;
}

.table-wrapper p {
  margin-top: 0;
  margin-bottom: 0.9rem;
  font-size: 0.8rem;
  color: #9ca3af;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

thead tr {
  background: #020617;
}

th,
td {
  padding: 0.55rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid rgba(55, 65, 81, 0.7);
}

th {
  font-weight: 500;
  color: #9ca3af;
  font-size: 0.8rem;
}

tbody tr {
  background: transparent;
}

tbody tr:hover {
  background: rgba(15, 23, 42, 0.8);
}

.table-wrapper table td a {
  font-size: 0.85rem;
}

/* ==== BUTTONS =============================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.5);
  transition: background 0.1s ease-out, box-shadow 0.1s ease-out,
    transform 0.05s ease-out;
}

.btn:hover {
  background: linear-gradient(135deg, #0ea5e9, #1d4ed8);
  box-shadow: 0 7px 20px rgba(37, 99, 235, 0.7);
  transform: translateY(-1px);
}

.btn.secondary {
  background: transparent;
  color: #e5e7eb;
  border: 1px solid #4b5563;
  box-shadow: none;
}

.btn.secondary:hover {
  background: rgba(15, 23, 42, 0.8);
}

.btn.danger {
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 4px 15px rgba(248, 113, 113, 0.5);
}

.btn.danger:hover {
  background: linear-gradient(135deg, #fb923c, #dc2626);
}

.btn:disabled {
  opacity: 0.5;
  cursor: default;
}

/* ==== STATUS-PILLS ========================================== */

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.status-new {
  background: rgba(59, 130, 246, 0.25);
  color: #bfdbfe;
}

.status-invited {
  background: rgba(249, 115, 22, 0.25);
  color: #fed7aa;
}

.status-accepted {
  background: rgba(34, 197, 94, 0.25);
  color: #bbf7d0;
}

.status-rejected {
  background: rgba(248, 113, 113, 0.25);
  color: #fecaca;
}

/* ==== FORMULARE ============================================= */

.form-group {
  margin-bottom: 0.75rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
  font-weight: 500;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: 0.4rem 0.6rem;
  border-radius: 0.5rem;
  border: 1px solid #4b5563;
  background: #020617;
  color: #e5e7eb;
  font: inherit;
  font-size: 0.9rem;
}

textarea {
  min-height: 5rem;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 1px #38bdf8;
}

.form-actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ==== ALERTS ================================================= */

.alert {
  border-radius: 0.5rem;
  padding: 0.6rem 0.9rem;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.alert-error {
  background: rgba(248, 113, 113, 0.15);
  color: #fecaca;
  border: 1px solid rgba(248, 113, 113, 0.4);
}

.alert-success {
  background: rgba(34, 197, 94, 0.15);
  color: #bbf7d0;
  border: 1px solid rgba(34, 197, 94, 0.4);
}

/* ==== FRONTEND-CONTAINER ==================================== */

.frontend-container {
  max-width: 720px;
  margin: 2rem auto;
  background: #020617;
  border-radius: 0.9rem;
  padding: 1.5rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.8);
  border: 1px solid #1f2937;
}

.frontend-container h1 {
  margin-top: 0;
}

/* Checkbox leicht größer */

input[type="checkbox"] {
  transform: scale(1.1);
  margin-right: 0.25rem;
}
