:root {
  --black: #0a0a0a;
  --black-soft: #151515;
  --card-bg: #1c1c1c;
  --card-border: #2c2c2c;
  --white: #ffffff;
  --gray: #a8a8a8;
  --yellow: #f2c230;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: var(--black);
  color: var(--white);
}

h1, h2, .brand-name, .brand-header {
  font-family: 'Oswald', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Login */

.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--black);
}

.login-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 48px;
  border-radius: 14px;
  width: 100%;
  max-width: 360px;
  text-align: center;
}

.login-card h1 {
  margin: 0 0 4px;
  font-weight: 700;
  font-size: 26px;
  color: var(--yellow);
}

.login-card .subtitle {
  margin: 0 0 24px;
  color: var(--gray);
  font-size: 14px;
  font-family: 'Inter', sans-serif;
}

.login-card form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-card label {
  text-align: left;
  font-size: 13px;
  font-weight: 500;
}

/* Inputs */

input[type='password'],
input[type='text'],
input[type='email'],
input[type='number'],
input[type='date'],
input[type='time'],
select,
textarea {
  font-family: inherit;
  padding: 12px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  font-size: 15px;
  width: 100%;
  background: var(--black-soft);
  color: var(--white);
}

label {
  display: block;
  margin: 14px 0 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--white);
}

.checkbox-label input {
  width: auto;
}

button {
  font-family: inherit;
  cursor: pointer;
}

.login-card button,
.btn-primary {
  background: var(--yellow);
  color: var(--black);
  border: none;
  padding: 14px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.login-card button:hover,
.btn-primary:hover {
  opacity: 0.85;
}

.btn-outline {
  display: inline-block;
  padding: 12px 18px;
  border: 1px solid var(--yellow);
  border-radius: 8px;
  color: var(--yellow);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

.btn-outline:hover {
  background: var(--yellow);
  color: var(--black);
}

.error {
  color: #ff6b6b;
  font-size: 13px;
}

.success-message {
  color: #4ade80;
  font-size: 13px;
}

/* Layout */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--card-border);
  flex-wrap: wrap;
  gap: 12px;
}

.brand-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  color: var(--white);
}

a.brand-header {
  text-decoration: none;
}

a.brand-header:hover .brand-name {
  color: var(--yellow);
}

.brand-logo {
  max-height: 32px;
  max-width: 160px;
}

.topbar-logo-mark {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  color: var(--yellow);
}

.topbar-logo-mark svg,
.topbar-logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.brand-suffix {
  color: var(--gray);
  font-weight: 500;
}

.brand-name {
  color: var(--yellow);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.login-card .brand-header {
  justify-content: center;
  color: var(--yellow);
}

.login-card .brand-logo {
  max-height: 44px;
  max-width: 220px;
}

.login-logo {
  width: 72px;
  height: 72px;
  margin: 0 auto 12px;
  color: var(--yellow);
}

.login-logo svg,
.login-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.link-btn {
  background: none;
  border: none;
  color: var(--gray);
  font-size: 13px;
  text-decoration: underline;
  padding: 0;
}

.back-link {
  color: var(--white);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  display: inline-block;
  margin-bottom: 12px;
}

.back-link.active {
  color: var(--yellow);
}

main {
  padding: 20px 20px 96px;
  max-width: 720px;
  margin: 0 auto;
}

main.main-wide {
  max-width: 1100px;
}

.page-title {
  font-size: 26px;
  margin: 4px 0 16px;
  color: var(--white);
}

.page-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* Home */

.home-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 40px;
}

.home-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
}

.home-logo-mark {
  width: 120px;
  height: 120px;
  color: var(--white);
}

.home-logo-mark svg,
.home-logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.home-wordmark {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 20px;
  line-height: 1.35;
  letter-spacing: 0.06em;
  color: var(--white);
}

.wm-accent {
  color: var(--yellow);
}

.home-welcome {
  font-size: 16px;
  color: var(--gray);
  max-width: 320px;
  margin: 0 0 28px;
}

.home-main .stat-row {
  width: 100%;
  max-width: 360px;
}

.subtitle {
  color: var(--gray);
  font-size: 14px;
  margin: -8px 0 16px;
}

.empty-state {
  color: var(--gray);
  font-size: 14px;
}

/* Events */

.events-block {
  margin-bottom: 24px;
}

.events-heading {
  font-size: 15px;
  color: var(--yellow);
  margin: 0 0 8px;
}

.event-card {
  border-color: var(--yellow);
}

.event-price {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  color: var(--yellow);
  white-space: nowrap;
}

/* Wochen-Umschalter */

.week-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.week-toggle-btn {
  flex: 1;
  text-align: center;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--card-border);
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

.week-toggle-btn.active {
  background: var(--yellow);
  color: var(--black);
  border-color: var(--yellow);
}

/* Trainingswoche */

.day-block {
  margin-bottom: 24px;
}

.day-heading {
  font-size: 15px;
  color: var(--yellow);
  margin: 0 0 8px;
}

.session-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.session-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 14px 16px;
  text-decoration: none;
  color: var(--white);
}

.session-card:hover {
  border-color: var(--yellow);
}

.session-time {
  font-family: 'Oswald', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--yellow);
  min-width: 56px;
}

.session-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.session-title {
  font-weight: 600;
  font-size: 15px;
}

.session-meta {
  font-size: 13px;
  color: var(--gray);
}

.external-links {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

/* Trainings-Detail */

.training-meta-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
}

.training-meta-table th,
.training-meta-table td {
  text-align: left;
  padding: 10px 0;
  border-bottom: 1px solid var(--card-border);
  font-size: 14px;
}

.training-meta-table th {
  width: 140px;
  color: var(--gray);
  font-weight: 500;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

/* Historie */

.stat-row {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.stat-tile {
  flex: 1;
  min-width: 100px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}

.stat-value {
  display: block;
  font-family: 'Oswald', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--yellow);
}

.stat-label {
  display: block;
  font-size: 12px;
  color: var(--gray);
  margin-top: 4px;
}

/* Rangliste */

.leaderboard {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.leaderboard-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 12px 16px;
}

.leaderboard-row.is-you {
  border-color: var(--yellow);
}

.leaderboard-rank {
  font-family: 'Oswald', sans-serif;
  color: var(--yellow);
  font-weight: 700;
  min-width: 32px;
}

.leaderboard-name {
  flex: 1;
  font-weight: 500;
}

.leaderboard-count {
  color: var(--gray);
  font-size: 14px;
}

/* Avatar */

.avatar {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: var(--black);
  border: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-initials {
  color: var(--yellow);
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
}

.avatar-fallback {
  width: 60%;
  height: 60%;
  color: var(--yellow);
}

.avatar-lg {
  width: 88px;
  height: 88px;
  min-width: 88px;
}

.avatar-lg .avatar-initials {
  font-size: 30px;
}

.avatar-account-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}

.avatar-account-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.avatar-account-actions input[type='file'] {
  font-size: 13px;
  color: var(--gray);
}

.roster-member-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Umfrage */

.survey-form {
  display: flex;
  flex-direction: column;
}

/* Tabellen (Historie, Feedback, Nutzerverwaltung) */

.table-wrapper {
  overflow-x: auto;
}

.leads-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.leads-table th,
.leads-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--card-border);
}

.leads-table th {
  font-weight: 600;
  color: var(--gray);
}

/* Trennt Wochentag-Gruppen in der Trainings-Übersicht deutlich sichtbar. */
.leads-table tr.day-boundary td {
  border-top: 3px solid var(--yellow);
  padding-top: 16px;
}

.leads-table tbody tr:first-child td {
  border-top: none;
}

.leads-table tr.day-boundary td:first-child {
  font-weight: 700;
  color: var(--yellow);
}

.password-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.password-form input {
  width: 160px;
  padding: 6px 8px;
  font-size: 13px;
}

.begruendung,
.crm-section {
  margin-top: 32px;
}

.begruendung h2,
.crm-section h2 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--yellow);
}

/* Bottom Nav */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  background: var(--black-soft);
  border-top: 1px solid var(--card-border);
  padding: 6px 0 max(6px, env(safe-area-inset-bottom));
  z-index: 10;
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-decoration: none;
  color: var(--gray);
  font-size: 11px;
  padding: 6px 0;
  min-height: 48px;
  justify-content: center;
}

.bottom-nav-item.active {
  color: var(--yellow);
}

.bottom-nav-icon {
  font-size: 20px;
}

main.has-bottom-nav {
  padding-bottom: 96px;
}

/* Responsive (Mobile) */

@media (max-width: 640px) {
  .topbar {
    padding: 14px 16px;
  }

  main {
    padding: 16px 16px 96px;
  }

  .login-card {
    padding: 28px;
  }
}
