:root {
  color-scheme: dark;
  --bg: #111111;
  --panel: #1d1d1d;
  --panel-strong: #252525;
  --line: #393939;
  --orange: #ff7900;
  --orange-soft: #ff79001c;
  --text: #fafafa;
  --muted: #b7b7b7;
  --success: #49c98b;
  --danger: #ff6b6b;
  font-family: Inter, Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 10%, #ff790014, transparent 26rem),
    radial-gradient(circle at 88% 72%, #ff79000b, transparent 32rem), var(--bg);
}

button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2,
h3 {
  line-height: 1.08;
  letter-spacing: -0.035em;
}
h1 {
  margin-bottom: 18px;
  font-size: clamp(2.35rem, 5vw, 4.6rem);
}
h2 {
  margin-bottom: 12px;
  font-size: clamp(1.65rem, 3vw, 2.45rem);
}
h3 {
  margin-bottom: 8px;
  font-size: 1.2rem;
}

[hidden] {
  display: none !important;
}

.site-header {
  width: min(1240px, calc(100% - 40px));
  min-height: 82px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}

.brand {
  text-decoration: none;
  font-weight: 900;
  font-size: 1.7rem;
  letter-spacing: -0.06em;
}
.brand-mark {
  color: var(--orange);
  font-style: italic;
}
.brand-domain {
  color: white;
}
.back-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}
.back-link:hover {
  color: var(--orange);
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--orange);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.lead {
  max-width: 650px;
  color: #d2d2d2;
  font-size: 1.15rem;
  line-height: 1.65;
}
.muted {
  color: var(--muted);
}
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.auth-layout {
  width: min(1180px, calc(100% - 40px));
  min-height: calc(100vh - 82px);
  margin: auto;
  padding: 70px 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(390px, 0.75fr);
  align-items: center;
  gap: clamp(50px, 8vw, 110px);
}

.welcome-panel h1 {
  max-width: 650px;
}

.benefits {
  margin: 42px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.benefits li {
  padding: 17px 0;
  display: flex;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  color: #dedede;
}
.benefits span {
  color: var(--orange);
  font-size: 0.78rem;
  font-weight: 800;
}

.auth-card {
  padding: 8px 30px 30px;
  box-shadow: 0 30px 70px #00000050;
}
.auth-tabs {
  margin: 0 -30px 30px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line);
}
.auth-tab {
  padding: 19px;
  border: 0;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-weight: 800;
}
.auth-tab.active {
  color: white;
  border-bottom-color: var(--orange);
}

.auth-form,
.profile-form {
  display: grid;
  gap: 18px;
}
label {
  display: grid;
  gap: 7px;
  color: #e4e4e4;
  font-size: 0.88rem;
  font-weight: 700;
}
input,
select {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid #515151;
  border-radius: 5px;
  color: white;
  background: #121212;
}
input:disabled {
  color: #9f9f9f;
  background: #181818;
}
input::placeholder {
  color: #7d7d7d;
}
label small {
  color: var(--muted);
  font-weight: 400;
}

.form-grid {
  display: grid;
  gap: 18px;
}
.two-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.check-row {
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 11px;
  font-weight: 400;
  line-height: 1.45;
}
.check-row input {
  width: 18px;
  min-height: 18px;
  margin-top: 2px;
  accent-color: var(--orange);
}
.check-row a {
  color: var(--orange);
}

.button {
  min-height: 48px;
  padding: 12px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 5px;
  text-decoration: none;
  cursor: pointer;
  font-weight: 800;
}
.button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.button-primary {
  border-color: var(--orange);
  color: #171717;
  background: var(--orange);
}
.button-primary:hover {
  background: #ff9638;
}
.button-secondary {
  border-color: #666;
  color: white;
  background: transparent;
}
.button-secondary:hover {
  border-color: #aaa;
  background: #2a2a2a;
}
.button.compact {
  min-height: 40px;
  padding: 8px 15px;
  font-size: 0.85rem;
}
.text-button {
  padding: 5px;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.text-button:hover {
  color: var(--orange);
}

.message {
  margin: 0;
  padding: 11px 13px;
  border: 1px solid #6f612e;
  border-radius: 5px;
  color: #ffe7a5;
  background: #4b3b122e;
  font-size: 0.9rem;
  line-height: 1.45;
}
.message.error {
  border-color: #833e3e;
  color: #ffc0c0;
  background: #5b19192e;
}
.message.success {
  border-color: #2f7152;
  color: #a8f0cb;
  background: #174c342e;
}
.page-message {
  margin: 22px 0;
}

.centered-view {
  width: min(560px, calc(100% - 40px));
  min-height: calc(100vh - 82px);
  margin: auto;
  display: grid;
  place-items: center;
  padding: 55px 0;
}
.verification-card {
  padding: clamp(28px, 5vw, 52px);
  text-align: center;
}
.verification-card h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
}
.verification-card p {
  color: #d3d3d3;
  line-height: 1.6;
}
.mail-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #171717;
  background: var(--orange);
  font-size: 1.8rem;
}
.stack-actions {
  display: grid;
  gap: 11px;
  margin-top: 27px;
}

.portal {
  width: min(1180px, calc(100% - 40px));
  margin: auto;
  padding: 55px 0 90px;
}
.portal-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 25px;
}
.portal-header h1 {
  margin-bottom: 0;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
}
.account-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  font-size: 0.9rem;
}

.portal-nav {
  margin: 35px 0 42px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}
.nav-item {
  padding: 14px 18px;
  border: 0;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  font-weight: 800;
}
.nav-item.active {
  color: white;
  border-bottom-color: var(--orange);
}

.content-section {
  display: grid;
  gap: 26px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.stat-card {
  min-height: 160px;
  padding: 24px;
  display: flex;
  flex-direction: column;
}
.stat-card span {
  color: var(--muted);
}
.stat-card strong {
  margin: auto 0 8px;
  font-size: 2.7rem;
}
.stat-card small {
  color: #8d8d8d;
}
.stat-card.accent-card {
  border-color: #8b4e18;
  background: linear-gradient(145deg, #301e10, #1d1d1d 70%);
}
.stat-card.accent-card strong {
  color: var(--orange);
}

.next-step-card {
  padding: clamp(25px, 4vw, 42px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  background: linear-gradient(120deg, #252525, #191919);
}
.next-step-card h2 {
  max-width: 640px;
  margin-bottom: 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}
.section-heading h2 {
  margin-bottom: 0;
}
.card-list {
  display: grid;
  gap: 14px;
}
.rental-card {
  padding: 22px;
  display: grid;
  grid-template-columns: 1.25fr 1fr auto;
  align-items: center;
  gap: 25px;
}
.rental-card p,
.rental-card small {
  margin: 0;
  color: var(--muted);
}
.rental-card h3 {
  margin-bottom: 7px;
}
.rental-meta {
  display: grid;
  gap: 5px;
}
.rental-price {
  text-align: right;
}
.rental-price strong {
  display: block;
  margin-bottom: 5px;
  font-size: 1.15rem;
}

.status-chip {
  width: fit-content;
  padding: 5px 9px;
  border: 1px solid #5e5e5e;
  border-radius: 999px;
  color: #ddd;
  background: #2a2a2a;
  font-size: 0.76rem;
  font-weight: 800;
}
.status-chip.status-positive {
  border-color: #347a57;
  color: #a5ecc7;
  background: #153b29;
}
.status-chip.status-warning {
  border-color: #89621e;
  color: #ffd98d;
  background: #49340f;
}
.status-chip.status-neutral {
  color: #c9c9c9;
}
.icon-button {
  width: 43px;
  height: 43px;
  border: 1px solid #666;
  border-radius: 50%;
  color: white;
  background: transparent;
  cursor: pointer;
  font-size: 1.3rem;
}
.icon-button:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.empty-state {
  padding: 42px;
  text-align: center;
  color: var(--muted);
}
.empty-state .button {
  margin-top: 12px;
}
.profile-form {
  padding: clamp(22px, 4vw, 38px);
}
.profile-form .form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.profile-form .wide-field {
  grid-column: span 2;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.loading {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  color: white;
  background: #090909b8;
  backdrop-filter: blur(3px);
}
.spinner {
  width: 22px;
  height: 22px;
  border: 3px solid #ffffff45;
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 900px) {
  .auth-layout {
    grid-template-columns: 1fr;
    padding-top: 45px;
  }
  .welcome-panel {
    max-width: 680px;
  }
  .auth-card {
    max-width: 620px;
    width: 100%;
  }
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  .profile-form .form-grid {
    grid-template-columns: 1fr 1fr;
  }
  .rental-card {
    grid-template-columns: 1fr auto;
  }
  .rental-meta {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (max-width: 620px) {
  .site-header {
    width: min(100% - 28px, 1180px);
  }
  .back-link {
    font-size: 0;
  }
  .back-link::after {
    content: '← fahrmal.de';
    font-size: 0.85rem;
  }
  .auth-layout,
  .portal {
    width: min(100% - 28px, 1180px);
  }
  .auth-layout {
    padding: 38px 0 60px;
    gap: 38px;
  }
  .welcome-panel h1 {
    font-size: 2.65rem;
  }
  .auth-card {
    padding: 8px 20px 24px;
  }
  .auth-tabs {
    margin-left: -20px;
    margin-right: -20px;
  }
  .two-columns,
  .stats-grid,
  .profile-form .form-grid {
    grid-template-columns: 1fr;
  }
  .profile-form .wide-field {
    grid-column: auto;
  }
  .portal {
    padding-top: 35px;
  }
  .portal-header {
    align-items: start;
    flex-direction: column;
  }
  .account-actions {
    width: 100%;
    justify-content: space-between;
  }
  .next-step-card {
    align-items: stretch;
    flex-direction: column;
  }
  .rental-card {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .rental-meta {
    grid-column: auto;
    grid-row: auto;
  }
  .rental-price {
    text-align: left;
  }
  .section-heading {
    align-items: start;
  }
}
