:root {
  --bg: #0a0603;
  --bg-glow: radial-gradient(ellipse 90% 60% at 50% 0%, #4a1904 0%, #1f0c02 35%, #0a0603 70%);
  --panel: rgba(20, 11, 6, 0.72);
  --panel-border: rgba(255, 122, 26, 0.28);
  --accent: #ff7a1a;
  --accent-dark: #e05e00;
  --white: #f6f3ef;
  --muted: #c9beb4;
  --footer-bg: #060402;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  background-image: var(--bg-glow);
  background-attachment: fixed;
  color: var(--white);
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

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

/* Navbar */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 3rem;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 5, 2, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 122, 26, 0.15);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: 0.02em;
}

.logo-icon { width: 34px; height: 34px; }

.nav-links {
  display: flex;
  gap: 1.15rem;
  flex-wrap: wrap;
}

.nav-links a {
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 0.4rem;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
  border-color: var(--accent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.btn-outline {
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 0.55rem 1.3rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.btn-outline:hover { background: var(--accent); color: #1a0d02; }

.icon-link {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.icon-link:hover { border-color: var(--accent); background: rgba(255, 122, 26, 0.12); }
.icon-link svg { width: 16px; height: 16px; fill: var(--white); }

/* Hero */
.hero {
  position: relative;
  padding: 5rem 3rem 3rem;
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 2rem;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
}

.hero-tag {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2.6rem, 5.5vw, 4.2rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 1.4rem;
}

.hero h1 .white { color: var(--white); display: block; }
.hero h1 .accent { display: block; }

.hero p.lead {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 46ch;
  margin-bottom: 2rem;
}

.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn-primary {
  background: linear-gradient(135deg, #ff9142 0%, var(--accent) 55%, var(--accent-dark) 100%);
  color: #1a0d02;
  padding: 0.85rem 1.7rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  box-shadow: 0 8px 20px -8px rgba(255, 122, 26, 0.6);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  display: inline-block;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -8px rgba(255, 122, 26, 0.75);
  filter: brightness(1.06);
}

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

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--white);
  padding: 0.85rem 1.7rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(255, 122, 26, 0.06);
  transform: translateY(-2px);
}

/* Floating feature card */
.feature-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 1.8rem;
  backdrop-filter: blur(6px);
}

.feature-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.feature-item:last-child { border-bottom: none; padding-bottom: 0; }
.feature-item:first-child { padding-top: 0; }

.feature-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 122, 26, 0.12);
  border-radius: 10px;
}

.feature-icon svg { width: 20px; height: 20px; fill: var(--accent); }

.feature-item h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.feature-item p {
  font-size: 0.83rem;
  color: var(--muted);
  line-height: 1.4;
}

/* Stats bar */
.stats-bar {
  max-width: 1300px;
  margin: 1rem auto 4rem;
  padding: 2rem 3rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
}

.stat { display: flex; align-items: center; gap: 0.9rem; }
.stat svg { width: 26px; height: 26px; fill: var(--accent); flex-shrink: 0; }
.stat-value { font-size: 1.6rem; font-weight: 800; line-height: 1; }
.stat-label {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.3rem;
}

/* Banner / crossover section (large, legacy) */
.banner-section {
  max-width: 1300px;
  margin: 0 auto 4rem;
  padding: 0 3rem;
}

.banner-section img {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--panel-border);
}

/* Small banner strip, top of page under the navbar */
.banner-top {
  max-width: 1300px;
  margin: 1.2rem auto 0;
  padding: 0 3rem;
}

.banner-top img {
  width: 100%;
  max-height: 56px;
  object-fit: cover;
  object-position: center 30%;
  border-radius: 8px;
  border: 1px solid var(--panel-border);
  display: block;
}

@media (max-width: 900px) {
  .banner-top img { max-height: 40px; }
}

/* Flash messages */
.flash-wrap {
  max-width: 1300px;
  margin: 1rem auto 0;
  padding: 0 3rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.flash-message {
  padding: 0.85rem 1.1rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.flash-message.success {
  background: rgba(87, 242, 135, 0.1);
  border-color: rgba(87, 242, 135, 0.35);
  color: #57f287;
}

.flash-message.error {
  background: rgba(255, 90, 90, 0.1);
  border-color: rgba(255, 90, 90, 0.35);
  color: #ff8080;
}

@media (max-width: 900px) {
  .flash-wrap { padding: 0 1.5rem; }
}

/* Generic page header (subpages) */
.page-header {
  max-width: 1300px;
  margin: 0 auto;
  padding: 5rem 3rem 2rem;
  text-align: center;
}

.page-header .hero-tag { justify-content: center; display: flex; }

.page-header h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  margin-bottom: 1rem;
}

.page-header p {
  color: var(--muted);
  max-width: 60ch;
  margin: 0 auto;
  line-height: 1.6;
}

/* Content grid for subpages */
.content-section {
  max-width: 1300px;
  margin: 0 auto;
  padding: 2rem 3rem 5rem;
  flex: 1;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.info-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 1.8rem;
}

.info-card h3 { font-size: 1.05rem; margin-bottom: 0.6rem; color: var(--accent); }
.info-card p { color: var(--muted); font-size: 0.9rem; line-height: 1.6; }

/* Footer */
.site-footer {
  margin-top: auto;
  background: var(--footer-bg);
  border-top: 1px solid rgba(255, 122, 26, 0.12);
  padding: 1.5rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-social { display: flex; gap: 0.7rem; }

.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { font-size: 0.8rem; color: var(--muted); }
.footer-links a:hover { color: var(--accent); }

.footer-copy { font-size: 0.8rem; color: var(--muted); }

/* Login / Register nav actions */
.link-muted {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.link-muted:hover, .link-muted.active { color: var(--white); }

.btn-primary.small {
  padding: 0.5rem 1.1rem;
  font-size: 0.8rem;
}

.btn-primary.full {
  width: 100%;
  text-align: center;
  border: none;
  cursor: pointer;
  margin-top: 0.5rem;
}

/* Auth pages */
.auth-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
}

.auth-card {
  width: 100%;
  max-width: 860px;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
  transition: box-shadow 0.3s ease;
}

.auth-card:hover {
  box-shadow: 0 34px 70px -18px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 122, 26, 0.15);
}

.auth-brand {
  position: relative;
  padding: 2.6rem 2.2rem;
  background:
    radial-gradient(ellipse 120% 80% at 20% 0%, rgba(255, 122, 26, 0.35) 0%, transparent 55%),
    linear-gradient(160deg, #2a0f04 0%, #120701 100%);
  border-right: 1px solid var(--panel-border);
  display: flex;
  flex-direction: column;
}

.auth-brand-icon { width: 16px; height: 16px; margin-bottom: 1.5rem; }

.auth-brand-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}

.auth-brand h2 {
  font-size: 1.5rem;
  line-height: 1.25;
  font-weight: 800;
  margin-bottom: 0.9rem;
}

.auth-brand p {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
  margin-top: auto;
}

.auth-form-side { padding: 2.6rem 2.4rem; }

.auth-card h1 { font-size: 1.6rem; margin-bottom: 0.4rem; }
.auth-sub { color: var(--muted); font-size: 0.88rem; margin-bottom: 1.6rem; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group { margin-bottom: 1.1rem; }
.form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.04);
  color: var(--white);
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.2s ease, background 0.2s ease;
  resize: vertical;
}

.form-group select { cursor: pointer; }

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 122, 26, 0.05);
  box-shadow: 0 0 0 3px rgba(255, 122, 26, 0.15);
}

.captcha-box {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1rem;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.captcha-box:has(input:checked) { border-color: var(--accent); color: var(--white); }

.captcha-box input {
  position: absolute;
  opacity: 0;
  width: 18px;
  height: 18px;
  margin: 0;
}

.captcha-check {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  position: relative;
}

.captcha-box input:checked ~ .captcha-check {
  background: var(--accent);
  border-color: var(--accent);
}

.captcha-box input:checked ~ .captcha-check::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid #1a0d02;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.auth-switch {
  margin-top: 1.4rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}
.auth-switch a { color: var(--accent); font-weight: 600; }
.auth-switch a:hover { text-decoration: underline; }

.forgot-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
}
.forgot-link:hover { text-decoration: underline; }

@media (max-width: 760px) {
  .auth-card { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
}

/* Legal pages */
.legal-content { max-width: 900px; }
.legal-content h2 { font-size: 1.2rem; margin: 2rem 0 0.8rem; color: var(--accent); }
.legal-content h2:first-child { margin-top: 0; }
.legal-content p { color: var(--muted); line-height: 1.7; margin-bottom: 0.5rem; }
.legal-content a { color: var(--accent); }

.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0 1.5rem;
  font-size: 0.88rem;
}

.legal-table th, .legal-table td {
  text-align: left;
  padding: 0.7rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted);
}

.legal-table th {
  background: rgba(255, 122, 26, 0.08);
  color: var(--white);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.legal-table td:first-child { color: var(--white); font-weight: 600; }

.ip-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 1rem 1.2rem;
  margin: -0.5rem 0 1.5rem;
  background: rgba(255, 122, 26, 0.06);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
}

.ip-label { font-size: 0.85rem; color: var(--muted); }
.ip-value {
  font-family: "Consolas", "SFMono-Regular", Menlo, monospace;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(0, 0, 0, 0.25);
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
}

.legal-note {
  margin-top: 2rem;
  padding: 1rem;
  border-radius: 8px;
  background: rgba(255, 122, 26, 0.08);
  border: 1px solid var(--panel-border);
  font-size: 0.82rem;
}

/* Role badge */
.role-badge {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.1rem 0.5rem;
  border-radius: 5px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: rgba(255, 122, 26, 0.15);
  color: var(--accent);
  border: 1px solid var(--panel-border);
}

/* Status badges (tickets) */
.status-badge {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-Offen { background: rgba(87, 242, 135, 0.12); color: #57f287; }
.status-In-Bearbeitung { background: rgba(255, 122, 26, 0.15); color: var(--accent); }
.status-Wartet-auf-Nutzer { background: rgba(255, 205, 90, 0.15); color: #ffcd5a; }
.status-Eskaliert { background: rgba(255, 90, 90, 0.15); color: #ff8080; }
.status-Gelöst { background: rgba(120, 170, 255, 0.15); color: #78aaff; }
.status-Geschlossen { background: rgba(255, 255, 255, 0.1); color: var(--muted); }

/* Tables (tickets, admin lists) */
.table-wrap { overflow-x: auto; }
.section-subtitle {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--white);
}
.legal-table tr[onclick]:hover { background: rgba(255, 122, 26, 0.06); }

/* Filter bar (admin tickets) */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.filter-bar a {
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--muted);
}
.filter-bar a.active, .filter-bar a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(255, 122, 26, 0.08);
}

/* Ticket detail */
.ticket-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.status-form {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 1.5rem;
}
.status-form select {
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.04);
  color: var(--white);
}
.btn-ghost.small { padding: 0.5rem 1rem; font-size: 0.78rem; }

.ticket-thread {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-bottom: 2rem;
}

.ticket-message {
  padding: 1rem 1.2rem;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
}

.ticket-message.own {
  background: rgba(255, 122, 26, 0.06);
  border-color: rgba(255, 122, 26, 0.3);
}

.ticket-message.internal {
  background: rgba(255, 205, 90, 0.06);
  border-color: rgba(255, 205, 90, 0.3);
}

.ticket-message-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.internal-tag {
  background: rgba(255, 205, 90, 0.2);
  color: #ffcd5a;
  padding: 0.1rem 0.5rem;
  border-radius: 5px;
  font-weight: 700;
  font-size: 0.68rem;
  text-transform: uppercase;
}

.ticket-message-body {
  font-size: 0.92rem;
  line-height: 1.6;
  white-space: pre-wrap;
}

.ticket-form { margin-top: 1rem; }

@media (max-width: 900px) {
  .navbar { flex-wrap: wrap; gap: 1rem; padding: 1rem 1.5rem; }
  .nav-links { order: 3; width: 100%; justify-content: center; flex-wrap: wrap; gap: 1.2rem; }
  .hero { grid-template-columns: 1fr; padding: 3rem 1.5rem; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); padding: 1.5rem; }
  .banner-section, .banner-top, .page-header, .content-section { padding-left: 1.5rem; padding-right: 1.5rem; }
  .site-footer { flex-direction: column; text-align: center; }
  .legal-table { display: block; overflow-x: auto; }
}
