/*
Theme Name: Account
Author: Barsbütteler Rundfunk
Version: 0.1.0
Text Domain: account
*/


:root {
  --bg: #f5f6f7;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --primary: #ca0019;
  --card: #ffffff;
}

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

body {
  margin: 0;
  font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

a {
  color: var(--primary);
}

/* ── Split Auth Layout ───────────────────────────────────────────────────── */
.split-auth {
  display: flex;
  min-height: 100vh;
}

.split-auth__left {
  flex: 0 0 42%;
  background: #1a1a2e;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  flex-direction: column;
}

.split-auth__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

.split-auth__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(0, 0, 0, 0.72) 0%,
    rgba(0, 0, 0, 0.88) 100%
  );
  z-index: 1;
}

.split-auth__left-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 2rem 2.5rem;
}

.split-auth__logo {
  margin-bottom: auto;
}

.split-auth__logo img {
  max-height: 36px;
  width: auto;
  filter: brightness(0) invert(1);
}

.split-auth__logo-text {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
}

.split-auth__tagline {
  margin: auto 0 3rem;
}

.split-auth__tagline h1 {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.15;
  color: #fff;
  margin: 0 0 1rem;
}

.split-auth__tagline p {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  margin: 0;
  max-width: 340px;
}

.split-auth__left-footer {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.45);
}

.split-auth__right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  padding: 2.5rem 2rem;
  overflow-y: auto;
}

.split-auth__form-wrap {
  width: 100%;
  max-width: 460px;
}

/* Keep old .auth-container for reset-view */
.auth-container {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: var(--bg);
  position: relative;
}

.dashboard-layout {
  padding: 0;
}

.auth-form-wrapper {
  width: 100%;
  max-width: 440px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  padding: 2.5rem;
  position: relative;
  z-index: 1;
}

/* Auth heading in split layout */
.split-auth__form-wrap .auth-header {
  margin-bottom: 1.75rem;
  text-align: left;
}

.split-auth__form-wrap .auth-header h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.split-auth__form-wrap .auth-header p {
  font-size: 0.925rem;
  color: var(--muted);
}

/* Step indicator */
.auth-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 2rem;
}

.auth-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  flex: 1;
}

.auth-step__num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f3f4f6;
  color: #9ca3af;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  position: relative;
  z-index: 1;
}

.auth-step--active .auth-step__num {
  background: var(--primary);
  color: #fff;
}

.auth-step__label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9ca3af;
}

.auth-step--active .auth-step__label {
  color: var(--primary);
}

.auth-step-line {
  flex: 1;
  height: 2px;
  background: #e5e7eb;
  margin-bottom: 20px;
}

/* Auth checkbox */
.auth-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 0.875rem;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text);
  line-height: 1.5;
}

.auth-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: 4px;
  accent-color: var(--primary);
  flex-shrink: 0;
  margin-top: 1px;
  cursor: pointer;
}

.auth-checkbox a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.auth-checkbox a:hover {
  text-decoration: underline;
}

/* Password hint */
.input-hint {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 5px;
}

/* Split auth responsive */
@media (max-width: 860px) {
  .split-auth {
    flex-direction: column;
  }

  .split-auth__left {
    flex: 0 0 auto;
    min-height: 220px;
  }

  .split-auth__left-inner {
    padding: 1.5rem;
    min-height: 220px;
  }

  .split-auth__tagline {
    margin: 1rem 0 0.5rem;
  }

  .split-auth__tagline h1 {
    font-size: 1.75rem;
  }

  .split-auth__left-footer {
    display: none;
  }

  .split-auth__right {
    padding: 2rem 1.25rem;
    align-items: flex-start;
  }

  .split-auth__form-wrap .auth-header h2 {
    font-size: 1.6rem;
  }
}

.auth-logo {
  margin-bottom: 2rem;
  text-align: center;
}

.auth-logo img {
  max-height: 48px;
  width: auto;
  transition: transform 0.2s ease;
}

.auth-logo img:hover {
  transform: scale(1.05);
}

.auth-logo-text {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.auth-logo-text:hover {
  color: #a00014;
}

.content-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.auth-header {
  margin-bottom: 2rem;
  text-align: center;
}

.auth-header h2 {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.auth-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.card-header h3 {
  margin: 0 0 6px;
  font-size: 22px;
}

.purchase-meta {
  margin: 0 0 16px;
  color: var(--muted);
}

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

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: var(--text);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  width: 20px;
  height: 20px;
  color: var(--muted);
  pointer-events: none;
  z-index: 1;
  flex-shrink: 0;
}

input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.95rem;
  background: #ffffff;
  transition: all 0.2s ease;
  color: var(--text);
}

.input-wrapper input[type="email"],
.input-wrapper input[type="password"],
.input-wrapper input[type="text"] {
  padding-left: 46px !important;
}

input[type="email"]:focus,
input[type="password"]:focus,
input[type="text"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(202, 0, 25, 0.1);
}

.input-wrapper:focus-within .input-icon {
  color: var(--primary);
}

input[type="email"]::placeholder,
input[type="password"]::placeholder,
input[type="text"]::placeholder {
  color: #9ca3af;
}

.btn,
button.btn,
.btn-primary,
.login-form button,
.bbr-account-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 8px;
  border: none;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn:hover,
button.btn:hover {
  background: #a00014;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(202, 0, 25, 0.2);
}

.btn:active {
  transform: translateY(0);
}

.alert {
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 16px;
}

/* Auth form submit button */
.btn-auth-submit {
  width: 100%;
  padding: 14px 20px;
  font-size: 1rem;
  font-weight: 600;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-auth-submit svg {
  width: 18px;
  height: 18px;
  transition: transform 0.2s ease;
}

.btn-auth-submit:hover svg {
  transform: translateX(4px);
}

/* Auth footer */
.auth-footer {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.auth-footer-text {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.auth-footer-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  margin-left: 4px;
  transition: color 0.2s ease;
}

.auth-footer-link:hover {
  color: #a00014;
  text-decoration: underline;
}

.auth-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  margin-bottom: 24px;
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: #fff;
  transition: border-color 0.15s, color 0.15s, box-shadow 0.15s;
}
.auth-back-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(202,0,25,.1);
}

.auth-legal-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}
.auth-legal-links a {
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
}
.auth-legal-links a:hover { color: var(--primary); text-decoration: underline; }
.auth-legal-links span { font-size: 12px; color: #d1d5db; }

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

.sidebar {
  width: 260px;
  background: #ffffff;
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
}

.sidebar-logo {
  margin-bottom: 24px;
}

.sidebar-logo img {
  max-height: 32px;
  width: auto;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.nav-item:hover,
.nav-item.active {
  background: #fef2f2;
  color: var(--primary);
}

.nav-item-button {
  width: 100%;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.sidebar-website-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 14px;
  margin-bottom: 12px;
  background: var(--primary, #ad0018);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  transition: background .15s, opacity .15s;
  box-sizing: border-box;
}
.sidebar-website-btn:hover { opacity: .88; color: #fff; }
.sidebar-website-btn svg { flex-shrink: 0; }

.sidebar-legal {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.sidebar-legal a {
  font-size: 11px;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}
.sidebar-legal a:hover { color: var(--primary); text-decoration: underline; }
.sidebar-legal span { font-size: 11px; color: #d1d5db; }

.logout-form {
  width: 100%;
}

.btn-logout {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-logout:hover {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.1);
}

.btn-logout:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.1);
}

.btn-logout .logout-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-logout span {
  flex: 1;
  text-align: left;
}

.main-content {
  flex: 1;
  padding: 24px 16px;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.top-bar-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.top-bar-website-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: flex-start;
  padding: 5px 12px 5px 10px;
  background: var(--primary, #ad0018);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .03em;
  text-decoration: none;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(173,0,24,.25);
  transition: opacity .15s, box-shadow .15s, transform .15s;
}
.top-bar-website-link:hover {
  opacity: .88;
  box-shadow: 0 4px 14px rgba(173,0,24,.35);
  transform: translateY(-1px);
  color: #fff;
  text-decoration: none;
}
.top-bar-website-link svg { flex-shrink: 0; }

.page-title {
  font-size: 1.4rem;
  font-weight: 700;
}

.user-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #ffffff;
  transition: background 0.15s, border-color 0.15s;
}

.user-badge-initials {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--primary);
  font-size: 0.8rem;
}

.purchase-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.purchase-title {
  font-weight: 600;
}

.purchase-price {
  font-weight: 700;
}

.content-card {
  margin-bottom: 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.card-header {
  margin-bottom: 1rem;
}

.card-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}

/* Dashboard Grid Layout */
.dashboard-grid-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 1024px) {
  .dashboard-grid-layout {
    grid-template-columns: 1fr;
  }
}

/* Red Card (Subscription Card) */
.red-card {
  background: linear-gradient(135deg, var(--primary) 0%, #a00014 100%);
  border-radius: 16px;
  padding: 2rem;
  color: white;
  margin-bottom: 1.5rem;
  box-shadow: 0 10px 25px -5px rgba(202, 0, 25, 0.3);
}

.red-card h2 {
  margin: 0.5rem 0;
  font-size: 1.75rem;
  font-weight: 800;
}

.red-card p {
  margin: 0.5rem 0;
  opacity: 0.95;
}

.badge-pill {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.red-card-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.red-card-actions .btn {
  flex: 1;
  min-width: 120px;
}

.btn-white {
  background: #ffffff;
  color: var(--primary);
}

.btn-white:hover {
  background: #f9fafb;
}

.btn-translucent {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-translucent:hover {
  background: rgba(255, 255, 255, 0.3);
}

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

.btn-outline:hover {
  background: #f9fafb;
  border-color: var(--primary);
  color: var(--primary);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* Engagement Box */
.engagement-box {
  text-align: center;
  padding: 2rem;
}

.engagement-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.engagement-box h3 {
  margin: 0.5rem 0;
  font-size: 1.25rem;
}

/* Stats */
.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.stat-row:last-child {
  border-bottom: none;
}

.stat-label {
  color: var(--muted);
  font-size: 0.9rem;
}

.stat-value {
  font-weight: 700;
  font-size: 1.1rem;
}

/* Form Groups */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"] {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  background-color: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(202, 0, 25, 0.1);
}

/* Purchase Items */
.purchase-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.purchase-item:last-child,
.purchase-item.no-border {
  border-bottom: none;
}

.purchase-title {
  font-weight: 600;
  display: block;
  margin-bottom: 0.25rem;
}

.purchase-meta {
  color: var(--muted);
  font-size: 0.85rem;
}

.purchase-price {
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
  margin-left: 1rem;
}

/* Table-like Layout */
.table-like {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.table-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.table-row:last-child {
  border-bottom: none;
}

/* Settings Grid */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.settings-grid h4 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.settings-grid hr {
  margin: 1.5rem 0;
  border: none;
  border-top: 1px solid var(--border);
}

hr {
  margin: 1.5rem 0;
  border: none;
  border-top: 1px solid var(--border);
}

/* Donation Form */
.donation-form {
  max-width: 420px;
}

.donation-form .form-group {
  margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
  .dashboard-layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    position: static !important;
    height: auto !important;
    overflow-y: visible !important;
    padding: 10px 16px;
  }

  .sidebar-logo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0;
  }

  .sidebar-logo img {
    max-height: 28px;
  }

  .nav-menu {
    display: none;
    flex-direction: column;
    gap: 4px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
  }

  .nav-menu.is-open {
    display: flex;
  }

  .sidebar-footer {
    display: none;
    padding-top: 12px;
    margin-top: 8px;
  }

  .sidebar-footer.is-open {
    display: block;
  }

  .hamburger-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    color: var(--muted);
    width: 38px;
    height: 38px;
    flex-shrink: 0;
  }

  .hamburger-btn:hover {
    background: #fef2f2;
    border-color: #fecaca;
    color: var(--primary);
  }

  .hamburger-btn svg {
    width: 18px;
    height: 18px;
  }

  .main-content {
    padding: 1rem;
  }

  .dashboard-grid-layout {
    grid-template-columns: 1fr;
  }

  .red-card {
    padding: 1.5rem;
  }

  .red-card h2 {
    font-size: 1.4rem;
  }

  .red-card-actions {
    flex-direction: column;
  }

  .red-card-actions .btn {
    width: 100%;
  }

  .top-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .user-badge .user-badge-name {
    display: block !important;
    max-width: 110px;
    font-size: 0.78rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .page-title {
    font-size: 1.2rem;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .table-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .table-row > div:last-child {
    display: flex;
    gap: 0.5rem;
    width: 100%;
  }

  .purchase-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .purchase-price {
    margin-left: 0;
  }

  .content-card {
    padding: 1rem;
  }

  .auth-form-wrapper {
    padding: 1.5rem;
  }

  .auth-header h2 {
    font-size: 1.4rem;
  }
}

/* Prevent iOS input zoom */
@media (max-width: 768px) {
  input[type="email"],
  input[type="password"],
  input[type="text"],
  input[type="number"],
  .form-group input[type="text"],
  .form-group input[type="email"],
  .form-group input[type="password"],
  .form-group input[type="number"] {
    font-size: 16px;
  }
}

/* Hamburger hidden on desktop */
.hamburger-btn {
  display: none;
}

/* Offene Rechnungen Banner */
.alert-banner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
}

.alert-banner--warning {
  background: #fffbeb;
  border: 1.5px solid #fcd34d;
  color: #92400e;
}

.alert-banner__icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  line-height: 1.4;
}

.alert-banner__body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  line-height: 1.5;
}

.alert-banner__body strong {
  font-weight: 700;
}

.alert-banner__link {
  color: #b45309;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.alert-banner__link:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .alert-banner {
    flex-direction: column;
    gap: 8px;
  }

  .alert-banner__body {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

/* Additional Utilities */
.text-light {
  color: var(--muted);
}

.mb-1 {
  margin-bottom: 0.5rem;
}

.mb-1:last-child {
  margin-bottom: 0;
}

.mb-2 {
  margin-bottom: 1rem;
}

.mt-1 {
  margin-top: 0.5rem;
}

.mt-2 {
  margin-top: 1rem;
}

/* Button States */
.btn:disabled,
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Loading States */
.btn.loading {
  position: relative;
  color: transparent;
}

.btn.loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Improved Sidebar — Desktop only */
@media (min-width: 769px) {
  .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
  }

  /* Better spacing */
  .main-content {
    max-width: 1400px;
    margin: 0 auto;
  }
}

.sidebar-logo a,
.sidebar-logo-link {
  display: inline-block;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--primary);
  text-decoration: none;
}

/* Improved alerts */
.alert {
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 4px solid;
}

.alert-error {
  background: #fef2f2;
  color: #991b1b;
  border-color: #dc2626;
}

.alert-success {
  background: #f0fdf4;
  color: #166534;
  border-color: #22c55e;
}

/* Better form styling */
input[type="number"] {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
  font-size: 1rem;
  background-color: #fff;
}

input[type="number"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(202, 0, 25, 0.1);
}

/* Donation preset buttons */
.donation-presets {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.donation-amount-input {
  max-width: 200px;
}

[data-donation-preset] {
  cursor: pointer;
}

[data-donation-preset]:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Hide footer on auth pages */
.split-auth ~ .site-footer {
  display: none;
}

/* Footer improvements */
.site-footer {
  margin-top: 0;
}

.site-footer nav a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.site-footer nav a:hover {
  color: var(--primary);
}

/* Inline form */
.inline-form {
  display: inline-block;
  margin-right: 0.5rem;
}

/* Account badge */
.account-badge {
  background: #fee2e2;
  color: #991b1b;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
}

/* Card spacing */
.content-card.mb-1 {
  margin-bottom: 1rem;
}

/* Stat row improvements */
.stat-row.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Link styles */
.link-primary {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.link-primary:hover {
  text-decoration: underline;
}

/* Full width button */
.btn-full-width {
  width: 100%;
}

/* Section header */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.section-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
}

.section-header-link {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
}

.section-header-link:hover {
  text-decoration: underline;
}

/* ── User Badge Link ─────────────────────────────────────────────────────── */
.user-badge--link {
  text-decoration: none;
  color: inherit;
  transition: background 0.15s, box-shadow 0.15s;
  cursor: pointer;
}
.user-badge--link:hover {
  background: #fef2f2;
  border-color: #fecaca;
  box-shadow: 0 2px 8px rgba(202,0,25,0.08);
}
.user-badge-name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Profil Page ─────────────────────────────────────────────────────────── */
.profile-hero {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, #a00014 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 800;
  flex-shrink: 0;
}
.profile-hero-info { flex: 1; min-width: 0; }
.profile-name { font-size: 1.4rem; font-weight: 800; margin: 0 0 0.2rem; }
.profile-email { color: var(--muted); font-size: 0.9rem; margin: 0 0 0.2rem; }
.profile-since { color: var(--muted); font-size: 0.8rem; margin: 0; }
.profile-edit-btn { margin-left: auto; flex-shrink: 0; }

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.profile-stat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.profile-stat-icon { font-size: 1.4rem; margin-bottom: 0.4rem; }
.profile-stat-value { font-size: 1rem; font-weight: 700; color: var(--text); }
.profile-stat-label { font-size: 0.75rem; color: var(--muted); margin-top: 0.2rem; }

.profile-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.profile-data-list { display: flex; flex-direction: column; }
.profile-data-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}
.profile-data-row:last-child { border-bottom: none; }
.profile-data-label { color: var(--muted); font-size: 0.875rem; flex-shrink: 0; }
.profile-data-value { font-size: 0.875rem; font-weight: 600; text-align: right; word-break: break-word; }

.profile-quick-links { display: flex; flex-direction: column; gap: 2px; }
.profile-quick-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.5rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.15s;
}
.profile-quick-link:hover { background: #fef2f2; color: var(--primary); }
.profile-quick-link svg { margin-left: auto; flex-shrink: 0; opacity: 0.4; }
.pql-icon { font-size: 1.1rem; flex-shrink: 0; }

/* ── Abonnements Page ────────────────────────────────────────────────────── */
.abo-hero-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
}
.abo-hero-left h2 { margin-bottom: 0.25rem; }
.abo-hero-price {
  text-align: right;
  flex-shrink: 0;
}
.abo-price-amount {
  display: block;
  font-size: 2.2rem;
  font-weight: 900;
  color: #fff;
  line-height: 1;
}
.abo-price-cycle {
  font-size: 0.9rem;
  opacity: 0.8;
}

.abo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.abo-details-list { display: flex; flex-direction: column; margin-bottom: 1.25rem; }
.abo-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}
.abo-detail-row:last-child { border-bottom: none; }
.abo-detail-label { color: var(--muted); font-size: 0.875rem; flex-shrink: 0; }
.abo-detail-value { font-size: 0.875rem; font-weight: 600; text-align: right; }

.abo-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.btn-danger-outline {
  background: transparent;
  border: 1px solid #fca5a5;
  color: #b91c1c;
}
.btn-danger-outline:hover {
  background: #fef2f2;
  border-color: #b91c1c;
  color: #b91c1c;
}

.abo-features-card { }
.abo-features-list {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.abo-features-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--text);
}
.abo-feature-check {
  width: 20px;
  height: 20px;
  background: #dcfce7;
  color: #16a34a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 900;
  flex-shrink: 0;
}
.abo-support-note {
  background: #fef2f2;
  border-radius: 10px;
  padding: 0.875rem 1rem;
  font-size: 0.85rem;
  color: #7f1d1d;
  line-height: 1.5;
}

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}
.status-badge--active { background: #dcfce7; color: #16a34a; }
.status-badge--pending { background: #fef9c3; color: #854d0e; }
.status-badge--cancelled { background: #fee2e2; color: #b91c1c; }

/* ── Mobile Bottom Navigation ────────────────────────────────────────────── */
.mobile-bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid var(--border);
    z-index: 100;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  .mbn-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 10px 4px;
    text-decoration: none;
    color: var(--muted);
    font-size: 0.65rem;
    font-weight: 600;
    transition: color 0.15s;
  }

  .mbn-item--active {
    color: var(--primary);
  }

  .mbn-item svg {
    stroke-width: 1.75;
  }

  /* Platz für Bottom Nav */
  .main-content {
    padding-bottom: 80px;
  }

  /* Sidebar nav ausblenden auf mobile – Bottom Nav übernimmt */
  .nav-menu,
  .sidebar-footer {
    display: none !important;
  }

  /* Hamburger nicht mehr nötig */
  .hamburger-btn {
    display: none !important;
  }

  /* Abos Grid auf Mobile */
  .abo-grid {
    grid-template-columns: 1fr;
  }

  .abo-hero-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .abo-hero-price {
    text-align: left;
  }

  /* Profil */
  .profile-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .profile-sections {
    grid-template-columns: 1fr;
  }

  .profile-hero {
    gap: 1rem;
  }

  .profile-edit-btn {
    width: 100%;
    justify-content: center;
    margin-left: 0;
  }

  /* User Badge auf Mobile – Name + ID anzeigen */
  .user-badge-name {
    display: block !important;
    max-width: 110px;
    font-size: 0.78rem;
  }

  .account-badge {
    font-size: 0.68rem;
  }

  /* Top Bar auf Mobile */
  .top-bar {
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1rem;
  }
}

/* Print styles */
@media print {
  .sidebar,
  .top-bar,
  .btn,
  .site-footer {
    display: none;
  }

  .main-content {
    padding: 0;
  }
}
