:root {
  --green-900: #005840;
  --green-800: #0f4f44;
  --green-700: #2f7069;
  --green-500: #5d9098;
  --lime-400: #d1f843;
  --mint-100: #ecf0ef;
  --sand-100: #f5f1eb;
  --sand-200: #ece6de;
  --sand-300: #dfd8d0;
  --ink-900: #143b32;
  --ink-700: #5f756d;
  --white: #ffffff;
  --shadow-lg: 0 30px 70px rgba(0, 42, 31, 0.12);
  --shadow-md: 0 16px 40px rgba(0, 42, 31, 0.08);
  --radius-xl: 36px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --container: 1240px;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}
body {
  margin: 0;
  font-family: "Inter", sans-serif;
  color: var(--ink-900);
  background: linear-gradient(180deg, #f7f3ed 0%, #f2ede6 100%);
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; }

.site-shell {
  width: min(calc(100% - 32px), var(--container));
  margin: 16px auto 2rem;
}

.topbar {
  position: sticky;
  top: 16px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 28px;
  background: rgba(245, 241, 235, 0.88);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(20, 59, 50, 0.08);
  border-radius: 28px;
  box-shadow: 0 10px 30px rgba(20, 59, 50, 0.05);
}

.brand {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--green-800);
}

.brand::after {
  content: ".";
}

.green-dot { color: var(--green-800); }

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav a,
.link-secondary {
  color: var(--ink-700);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, color 180ms ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary,
.nav a.btn-primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--green-700), #4f8f96);
  box-shadow: 0 14px 26px rgba(74, 136, 142, 0.25);
}

.btn-ghost {
  color: var(--ink-900);
  background: rgba(255,255,255,0.7);
  border-color: rgba(20, 59, 50, 0.1);
}

.btn-large {
  min-height: 62px;
  padding: 0 30px;
  font-size: 1.05rem;
}

/* ── Nav toggle (mobile) ────────────────────────────── */
.nav-toggle {
  display: none;
  width: 50px;
  height: 50px;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: rgba(255,255,255,0.74);
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 4px auto;
  background: var(--green-900);
  border-radius: 999px;
}

/* ── Responsive: 920px (nav/topbar only) ───────────── */
@media (max-width: 920px) {
  .topbar {
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: block;
    margin-left: auto;
  }

  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    padding-top: 8px;
  }

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

  .nav-dropdown-menu {
    position: static !important;
    transform: none !important;
    box-shadow: none !important;
    border: none !important;
    background: none !important;
    backdrop-filter: none !important;
    padding: 4px 0 4px 14px !important;
    display: none;
  }

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

  .nav-dropdown:hover .nav-dropdown-menu {
    display: none;
  }

  .header-actions {
    display: none;
  }
}

/* ── Responsive: 640px (shell/topbar/brand only) ─────── */
@media (max-width: 640px) {
  .site-shell {
    width: min(calc(100% - 20px), var(--container));
    margin-bottom: 2rem;
  }

  .topbar {
    top: 10px;
    padding: 14px 16px;
    gap: 14px;
  }

  .brand { font-size: 1.7rem; }
}

/* ── Dropdown Navigation ──────────────────────────── */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--ink-700);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-dropdown-toggle::after {
  content: "▾";
  font-size: 0.65rem;
  transition: transform 0.15s;
  margin-top: 1px;
}

.nav-dropdown:hover .nav-dropdown-toggle::after,
.nav-dropdown-toggle[aria-expanded="true"]::after {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 160px;
  background: rgba(245, 241, 235, 0.98);
  border: 1px solid rgba(20, 59, 50, 0.1);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(20, 59, 50, 0.1);
  backdrop-filter: blur(14px);
  padding: 8px;
  z-index: 100;
  flex-direction: column;
}

/* Unsichtbare Brücke füllt den Gap zwischen Toggle und Menü */
.nav-dropdown-menu::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  height: 12px;
}

.nav-dropdown:hover .nav-dropdown-menu {
  display: flex;
}

.nav-dropdown-menu a {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-700);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: background 0.12s;
  white-space: nowrap;
}

.nav-dropdown-menu a:hover {
  background: rgba(20, 59, 50, 0.06);
  color: var(--ink-900);
}

/* ── Footer ───────────────────────────────────────── */
.footer {
  margin-top: 5rem;
  padding: 2rem 0 1rem;
  border-top: 1px solid rgba(20, 59, 50, 0.1);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-inner .brand {
  font-size: 1.4rem;
}

.footer-inner p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-700);
}

/* ── Auth Pages (login / register) ───────────────────── */
.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(20,59,50,0.1);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(12px);
}

.auth-card .brand {
  display: block;
  text-align: center;
  margin-bottom: 2rem;
}

.auth-card h1 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-align: center;
  margin: 0 0 .4rem;
}

.auth-sub {
  text-align: center;
  color: var(--ink-700);
  font-size: .9rem;
  margin: 0 0 2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  margin-bottom: 1.1rem;
}

.form-group label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink-700);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: .72rem 1rem;
  border: 1.5px solid rgba(20,59,50,0.15);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.7);
  font-family: inherit;
  font-size: .95rem;
  color: var(--ink-900);
  outline: none;
  transition: border-color .15s;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--green-700);
}

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

.auth-submit {
  width: 100%;
  padding: .8rem 1rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--green-700), #4f8f96);
  color: var(--white);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: .25rem;
  box-shadow: 0 8px 20px rgba(47,112,105,.22);
  transition: transform .18s, box-shadow .18s;
}

.auth-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(47,112,105,.3);
}

.auth-links {
  text-align: center;
  margin-top: 1.5rem;
  font-size: .875rem;
  color: var(--ink-700);
}

.auth-links a { color: var(--green-700); text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }

.consent-line {
  font-size: .78rem;
  color: var(--ink-700);
  margin-top: 1rem;
  text-align: center;
  line-height: 1.5;
}

@media (max-width: 480px) {
  .auth-card { padding: 2rem 1.25rem; }
  .form-row { grid-template-columns: 1fr; }
}

/* ── Account Pages (konto / bestellungen / rechnungen) ── */
.account-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
  max-width: 1080px;
  margin: 6rem auto 4rem;
  padding: 0 1.5rem;
}

.account-sidebar {
  display: flex;
  flex-direction: column;
  gap: .3rem;
}

.account-sidebar a {
  display: block;
  padding: .6rem 1rem;
  border-radius: var(--radius-md);
  font-size: .88rem;
  font-weight: 600;
  color: var(--ink-700);
  text-decoration: none;
  transition: background .12s, color .12s;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.account-sidebar a:hover { background: rgba(20,59,50,0.06); color: var(--ink-900); }

.account-sidebar a.active {
  background: rgba(47,112,105,0.1);
  color: var(--green-700);
}

.account-main h1 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 1.5rem;
}

.account-section {
  background: rgba(255,255,255,0.65);
  border: 1px solid rgba(20,59,50,0.1);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  backdrop-filter: blur(8px);
}

.account-section h2 {
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-700);
  margin: 0 0 1.25rem;
}

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

.btn-save {
  padding: 0 1.5rem;
  min-height: 46px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--green-700), #4f8f96);
  color: var(--white);
  font-family: inherit;
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(47,112,105,.2);
  transition: transform .18s, box-shadow .18s;
}

.btn-save:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(47,112,105,.28); }

/* Order cards */
.order-card {
  background: rgba(255,255,255,0.65);
  border: 1px solid rgba(20,59,50,0.1);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  backdrop-filter: blur(8px);
}

.order-info strong { display: block; font-weight: 700; margin-bottom: .2rem; }
.order-info span { font-size: .85rem; color: var(--ink-700); }

.order-status {
  display: inline-flex;
  align-items: center;
  padding: .3rem .85rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.order-status.delivered { background: rgba(47,112,105,0.12); color: var(--green-700); }
.order-status.in-transit { background: #e3f2fd; color: #1565c0; }
.order-status.processing { background: #fff8e1; color: #b06000; }

/* Invoice table */
.invoice-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255,255,255,0.65);
  border: 1px solid rgba(20,59,50,0.1);
  border-radius: var(--radius-lg);
  overflow: hidden;
  backdrop-filter: blur(8px);
}

.invoice-table th {
  text-align: left;
  padding: .85rem 1.25rem;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-700);
  border-bottom: 1px solid rgba(20,59,50,0.1);
  background: rgba(20,59,50,0.03);
}

.invoice-table td {
  padding: .9rem 1.25rem;
  font-size: .9rem;
  border-bottom: 1px solid rgba(20,59,50,0.07);
}

.invoice-table tr:last-child td { border-bottom: none; }
.invoice-table tbody tr:hover { background: rgba(20,59,50,0.025); }

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .85rem;
  border: 1.5px solid rgba(20,59,50,0.15);
  border-radius: 999px;
  font-family: inherit;
  font-size: .78rem;
  font-weight: 600;
  background: transparent;
  color: var(--ink-700);
  cursor: pointer;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .04em;
  transition: border-color .12s, color .12s;
}

.btn-download:hover { border-color: var(--green-700); color: var(--green-700); }

/* Responsive table: stack on small screens */
@media (max-width: 700px) {
  .account-layout {
    grid-template-columns: 1fr;
    margin-top: 5rem;
    padding: 0 1rem;
  }

  .account-sidebar {
    flex-direction: row;
    flex-wrap: wrap;
    gap: .5rem;
  }

  .account-sidebar a {
    padding: .45rem .85rem;
    border: 1px solid rgba(20,59,50,0.12);
    border-radius: 999px;
    font-size: .78rem;
  }

  .account-sidebar a.active {
    background: rgba(47,112,105,0.12);
  }

  .name-row { grid-template-columns: 1fr; }

  .invoice-table thead { display: none; }

  .invoice-table,
  .invoice-table tbody,
  .invoice-table tr,
  .invoice-table td {
    display: block;
    width: 100%;
  }

  .invoice-table tr {
    border: 1px solid rgba(20,59,50,0.1);
    border-radius: var(--radius-md);
    margin-bottom: .75rem;
    padding: .75rem 1rem;
  }

  .invoice-table td {
    border: none;
    padding: .25rem 0;
    font-size: .88rem;
  }

  .invoice-table td::before {
    content: attr(data-label) " ";
    font-weight: 700;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--ink-700);
    margin-right: .4rem;
  }
}

/* ── Mobile nav actions (hidden on desktop) ───────────── */
.nav-mobile-actions {
  display: none;
}

@media (max-width: 920px) {
  .nav-mobile-actions {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
    padding-top: 1rem;
    margin-top: 0.5rem;
    border-top: 1px solid rgba(20, 59, 50, 0.1);
  }

  .nav-mobile-actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 48px;
  }

  .nav-mobile-actions .link-secondary {
    text-align: center;
    font-size: 0.95rem;
  }
}

/* ── Site Footer ──────────────────────────────────────── */
.site-footer {
  background: linear-gradient(135deg, var(--green-700) 0%, #4f8f96 100%);
  color: var(--white);
  padding: 4rem 2rem 0;
  margin-top: 0;
}

.site-footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3rem;
  max-width: var(--container);
  margin: 0 auto;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

@media (max-width: 680px) {
  .site-footer-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

.site-footer-left {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.site-footer-logo {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--white);
  text-decoration: none;
  line-height: 1;
  transition: opacity 0.15s;
}

.site-footer-logo:hover {
  opacity: 0.8;
}

.site-footer-address {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-style: normal;
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.65);
}

.site-footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.site-footer-legal a {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: color 0.15s;
}

.site-footer-legal a:hover {
  color: var(--white);
}

.site-footer-right {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.site-footer-heading {
  margin: 0;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--lime-400);
}

.site-footer-pages {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.site-footer-pages a {
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  width: fit-content;
  transition: color 0.15s, padding-left 0.15s;
}

.site-footer-pages a:hover {
  color: var(--white);
  padding-left: 4px;
}

.site-footer-bottom {
  max-width: var(--container);
  margin: 0 auto;
  padding: 1.25rem 0 1.5rem;
}

.site-footer-bottom p {
  margin: 0;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
}
