/* === Variables === */
:root {
  --bg: #0D1117;
  --surface: #161B22;
  --border: #30363D;
  --accent: #FF6B2B;
  --accent-hover: #E85A1A;
  --text: #E6EDF3;
  --muted: #8B949E;
  --radius: 8px;
  --max-w: 1100px;
  --navbar-h: 64px;
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

/* === Base === */
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
  font-size: 0.9em;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1em 0.35em;
  /* Long unbreakable tokens (config symbols, paths) must wrap rather than
     force the page wider than the viewport on phones. Code inside pre is
     exempt: there the block itself scrolls to preserve line structure. */
  overflow-wrap: anywhere;
}

/* Anchor navigation (/#services etc.) must not land targets under the
   sticky navbar. */
[id] {
  scroll-margin-top: calc(var(--navbar-h) + 0.75rem);
}

h1, h2, h3, h4 {
  color: var(--text);
  line-height: 1.2;
  font-weight: 700;
}

/* === Layout === */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

main { flex: 1; }

/* === Buttons === */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
}
.btn:hover { background: var(--accent-hover); color: #fff; text-decoration: none; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* === Navbar === */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--navbar-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.brand:hover { color: var(--accent); text-decoration: none; }
.brand-accent { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-link {
  padding: 0.45rem 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius);
  transition: color 0.15s;
  text-decoration: none;
  cursor: pointer;
}
.nav-link:hover { color: var(--text); text-decoration: none; }

.nav-cta {
  background: var(--accent);
  color: #fff !important;
  padding: 0.45rem 1rem;
  margin-left: 0.5rem;
}
.nav-cta:hover { background: var(--accent-hover); color: #fff !important; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1.2rem;
  padding: 0.55rem 0.85rem;
  cursor: pointer;
  line-height: 1;
  min-height: 44px;
  min-width: 44px;
}

/* === Nav dropdown === */
.nav-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: none;
  font: inherit;
}

.nav-dropdown-toggle::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.7;
  transition: transform 0.15s;
}

.nav-dropdown.open .nav-dropdown-toggle::after {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.4rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.nav-dropdown.open .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-link {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
}

.nav-dropdown-link:hover {
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
}

/* Hover-reveal only above the mobile breakpoint — on touch, :hover is
   unreliable (sticky or absent), so touch relies solely on the JS-driven
   .open class handled above. */
@media (min-width: 769px) {
  .nav-dropdown:hover .nav-dropdown-menu {
    display: block;
  }

  .nav-dropdown:hover .nav-dropdown-toggle::after {
    transform: rotate(180deg);
  }
}

/* === Divider === */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* === Sections === */
.section {
  padding: 5rem 0;
}

@media (max-width: 768px) and (min-width: 481px) {
  .section { padding: 3.5rem 0; }
}

.section-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 1rem;
}

.section-sub {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 600px;
  margin-bottom: 2.5rem;
}

/* === Hero === */
.hero {
  min-height: calc(100vh - var(--navbar-h));
  display: flex;
  align-items: center;
}

.hero-content { max-width: 700px; }

/* === Hero Banner (with background photo) === */
.hero-banner {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  display: flex;
  align-items: center;
  padding: 0;
}

.hero-banner-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  opacity: 0.18;
  pointer-events: none;
  user-select: none;
}

.hero-banner-content {
  position: relative;
  z-index: 1;
  /* Vertical only — shares its element with .container, see .prose-wrap. */
  padding-top: 5rem;
  padding-bottom: 5rem;
  max-width: 700px;
}

.hero-eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: 1.1;
  margin-bottom: 1.25rem;
  letter-spacing: -0.03em;
}

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

.hero-sub {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 2.5rem;
  max-width: 560px;
  line-height: 1.7;
}

/* === Cards === */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.card-list {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
  padding-left: 1.1rem;
  margin-top: 0.5rem;
}

.card-list li { margin-bottom: 0.4rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color 0.2s;
}

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

.card-icon {
  font-size: 1.6rem;
  margin-bottom: 1rem;
  display: block;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.card-body {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.card-wide {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
}

.card-wide .card-icon { margin-bottom: 0; flex-shrink: 0; }

/* === Server showcase === */
.server-block {
  margin-top: 2rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  position: relative;
}

.server-photo {
  width: 100%;
  display: block;
  max-height: 340px;
  object-fit: cover;
  object-position: center 40%;
}

.server-caption {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 0.75rem 1.25rem;
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
}

/* === About === */
.about-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3rem;
  align-items: start;
}

.about-photo-wrap { text-align: center; }

.about-photo {
  width: 100%;
  border-radius: 12px;
  border: 2px solid var(--border);
  display: block;
}

.about-photo-caption {
  margin-top: 0.6rem;
  font-size: 0.78rem;
  color: var(--muted);
  font-style: italic;
}

.about-text { color: var(--muted); margin-bottom: 1rem; }

.region-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.tag {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.3rem 0.9rem;
  font-size: 0.82rem;
  color: var(--muted);
}

/* === Contact === */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  max-width: 580px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}

.contact-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.contact-icon { font-size: 1.1rem; flex-shrink: 0; }

/* === Shop === */
.page-wrap {
  padding: 4rem 0;
}

.page-title-area {
  margin-bottom: 3rem;
}

.sold-out-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 3rem;
}

.sold-out-badge {
  display: inline-block;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.25rem 0.9rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.sold-out-wrap h2 { margin-bottom: 0.5rem; }
.sold-out-wrap p { color: var(--muted); }

/* === Auth / Login === */
.auth-wrap {
  min-height: calc(100vh - var(--navbar-h) - 70px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
}

.auth-card h2 { margin-bottom: 0.5rem; }

.auth-desc {
  color: var(--muted);
  font-size: 0.875rem;
  margin-bottom: 2rem;
  line-height: 1.55;
}

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

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.form-group input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.65rem 0.875rem;
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}

.form-group input:focus { border-color: var(--accent); }
.form-group input::placeholder { color: var(--muted); }

.form-actions { margin-top: 1.5rem; }
.form-actions .btn { width: 100%; text-align: center; }

.auth-error {
  color: #F85149;
  font-size: 0.85rem;
  margin-top: 0.65rem;
}

.logout-info {
  color: var(--muted);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

/* === Datenschutz === */
/* Vertical only: .prose-wrap shares its element with .container
   (class="container prose-wrap"), and a shorthand `padding: 4rem 0` here
   would zero the container's horizontal padding — on phones that puts the
   text flush against the screen edge. */
.prose-wrap {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.prose {
  max-width: 780px;
}

.prose .page-date {
  color: var(--muted);
  font-size: 0.875rem;
  margin-bottom: 3rem;
  display: block;
}

.prose h1 { margin-bottom: 0.5rem; }

.prose h2 {
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  font-size: 1.3rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.prose h3 {
  margin-top: 1.25rem;
  margin-bottom: 0.4rem;
  font-size: 1rem;
  color: var(--muted);
  font-weight: 600;
}

.prose p {
  color: var(--muted);
  margin-bottom: 0.9rem;
}

.prose strong { color: var(--text); }

.prose ul {
  margin-bottom: 0.9rem;
  padding-left: 1.5rem;
}

.prose ul li {
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.prose a { color: var(--accent); }
.prose a:hover { color: var(--accent-hover); }

.prose .address-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 1rem 0 1.5rem;
}

.prose .address-block p { margin-bottom: 0.15rem; }

.prose ol {
  margin-bottom: 0.9rem;
  padding-left: 1.5rem;
}

.prose ol > li {
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.prose pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1rem 0 1.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  line-height: 1.55;
}

.prose pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: 0.85rem;
  color: var(--text);
}

.prose figure {
  margin: 1rem 0 1.5rem;
}

.prose figure img {
  max-width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.prose figcaption {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.prose .table-scroll {
  overflow-x: auto;
  margin: 1rem 0 1.5rem;
}

.prose table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9rem;
}

.prose th,
.prose td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  text-align: left;
  color: var(--muted);
  vertical-align: top;
}

.prose th {
  color: var(--text);
  background: var(--surface);
}

/* === Footer === */
.footer {
  border-top: 1px solid var(--border);
  padding: 1.25rem 0;
  margin-top: auto;
}

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

.footer p { color: var(--muted); font-size: 0.82rem; }

.footer-link {
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
}
.footer-link:hover { color: var(--accent); text-decoration: none; }

/* === Portal / Dashboard === */
.portal-section {
  margin-bottom: 3rem;
}

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

.portal-section-title {
  font-size: 1.1rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  flex: 1;
}

.portal-loading, .portal-empty { color: var(--muted); font-size: 0.9rem; }
.portal-error { color: #F85149; font-size: 0.9rem; }
.portal-hint { color: var(--muted); font-size: 0.9rem; margin-bottom: 1rem; }

.portal-table {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  font-size: 0.9rem;
}

.portal-table-head {
  display: grid;
  grid-template-columns: var(--portal-cols, 1fr 1fr 1fr 1fr);
  background: var(--surface);
  padding: 0.6rem 1rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}

.portal-table-row {
  display: grid;
  grid-template-columns: var(--portal-cols, 1fr 1fr 1fr 1fr);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  align-items: center;
  transition: background 0.15s;
}

.portal-table-row:last-child { border-bottom: none; }
.portal-table-row:hover { background: var(--surface); }

.status-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--border);
}

.status-badge.active {
  background: rgba(63, 185, 80, 0.1);
  color: #3fb950;
  border-color: rgba(63, 185, 80, 0.3);
}

.sub-name { font-weight: 500; }
.sub-dates { color: var(--muted); font-size: 0.85rem; }
.sub-price { color: var(--text); }

.email-form {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.form-input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 0.875rem;
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
  flex: 1;
  min-width: 200px;
}

.form-input:focus { border-color: var(--accent); }
.form-input::placeholder { color: var(--muted); }

.reminder-status { font-size: 0.85rem; color: var(--accent); }

/* === Buttons small === */
.btn-sm {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}
.btn-sm:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.btn-danger { border-color: #F85149; color: #F85149; }
.btn-danger:hover { background: rgba(248, 81, 73, 0.1); color: #F85149; }

/* === Admin panel === */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2rem;
}

.admin-create-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.admin-create-card h3 { margin-bottom: 1.25rem; font-size: 1rem; }

.tab-toggle {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
}
.tab-btn {
  padding: 0.4rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
}
.tab-btn:hover { border-color: var(--accent); color: var(--text); }
.tab-btn--active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

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

.form-group-full { grid-column: 1 / -1; }

.form-actions-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.25rem;
}

.form-status { font-size: 0.875rem; color: var(--accent); }

.admin-client-list {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.admin-list-head {
  display: grid;
  grid-template-columns: 100px 1fr 1fr 1fr 90px;
  background: var(--surface);
  padding: 0.6rem 1rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}

.admin-list-row {
  display: grid;
  grid-template-columns: 100px 1fr 1fr 1fr 90px;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  align-items: center;
  font-size: 0.9rem;
  transition: background 0.15s;
}

.admin-list-row:last-child { border-bottom: none; }
.admin-list-row:hover { background: var(--surface); }

.admin-cn { font-weight: 600; color: var(--accent); }
.admin-username { color: var(--muted); font-size: 0.85rem; }

.admin-back { margin-bottom: 1.5rem; }
.back-link { color: var(--muted); font-size: 0.9rem; text-decoration: none; }
.back-link:hover { color: var(--accent); text-decoration: none; }

.admin-client-header {
  margin-bottom: 1.5rem;
}

.admin-client-meta { color: var(--muted); font-size: 0.875rem; margin-top: 0.25rem; }

.admin-filename { color: var(--muted); font-size: 0.8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-selected { font-size: 0.8rem; color: var(--muted); margin-top: 0.25rem; }

.status-select {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
  cursor: pointer;
}

.admin-access-denied {
  text-align: center;
  padding: 4rem;
  color: var(--muted);
}

/* === Admin nav cards === */
.admin-nav-cards {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.admin-nav-card {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.65rem 1.1rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.admin-nav-card:hover { border-color: var(--accent); color: var(--text); text-decoration: none; }

.admin-nav-card--active {
  border-color: var(--accent);
  color: var(--text);
  cursor: default;
}

.admin-nav-icon { font-size: 1rem; }

/* === Asset list === */
.asset-list {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.asset-list-head,
.asset-list-row {
  display: grid;
  grid-template-columns: 1fr 55px 110px 110px 110px 95px 75px;
  padding: 0.65rem 1rem;
  align-items: center;
  min-width: 700px;
}

.asset-list-head {
  background: var(--surface);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}

.asset-list-row {
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  transition: background 0.15s;
}

.asset-list-row:last-child { border-bottom: none; }
.asset-list-row:hover { background: var(--surface); }

.asset-name-cell { display: flex; flex-direction: column; gap: 0.15rem; }
.asset-name { font-weight: 500; }
.asset-desc { color: var(--muted); font-size: 0.8rem; }
.asset-stat { color: var(--muted); font-size: 0.88rem; }

.asset-profit { font-weight: 600; color: var(--muted); }
.asset-profit.positive { color: #3fb950; }
.asset-profit.negative { color: #F85149; }

/* === Profit summary card === */
.profit-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  max-width: 460px;
}

.profit-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.3rem 0;
}

.profit-label { color: var(--muted); font-size: 0.9rem; }
.profit-value { font-weight: 600; font-size: 0.95rem; }
.profit-value.positive { color: #3fb950; }
.profit-value.negative { color: #F85149; }

.profit-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0.6rem 0;
}

.profit-total .profit-label { color: var(--text); font-weight: 600; }
.profit-total .profit-value { font-size: 1.05rem; }

/* === Asset detail header === */
.asset-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* === File row === */
.file-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* === Danger zone === */
.asset-danger-zone {
  border-top: 1px solid var(--border);
  padding-top: 2rem;
  margin-top: 1rem;
}

/* === Year filter bar === */
.year-filter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.year-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  padding: 0.3rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  font-family: inherit;
}

.year-btn:hover { border-color: var(--accent); color: var(--text); }

.year-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(255, 107, 43, 0.08);
}

.year-report-btn { margin-left: auto; white-space: nowrap; }

/* === Tax report page === */
.print-report {
  padding: 2rem 0 4rem;
  max-width: 900px;
}

.report-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.report-header {
  margin-bottom: 1.5rem;
}

.report-logo {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.report-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.report-meta {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.report-rule {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.75rem 0;
}

.report-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.report-empty { color: var(--muted); font-size: 0.9rem; }

.report-asset {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px dashed var(--border);
}

.report-asset:last-of-type { border-bottom: none; }

.report-asset-header {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
}

.report-asset-num {
  font-weight: 700;
  color: var(--muted);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.report-asset-name { font-weight: 600; font-size: 1.05rem; }

.report-asset-desc { color: var(--muted); font-size: 0.875rem; }

.report-asset-date {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.report-table th {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  padding: 0.4rem 0.5rem;
}

.report-table td {
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.report-table tr:last-child td { border-bottom: none; }

.report-table .col-date { width: 120px; color: var(--muted); }
.report-table .col-price { width: 120px; text-align: right; font-variant-numeric: tabular-nums; }
.report-table th.col-price { text-align: right; }

.report-no-comps { color: var(--muted); font-size: 0.85rem; margin-bottom: 0.75rem; }

.report-asset-totals {
  border-top: 1px solid var(--border);
  padding-top: 0.5rem;
  max-width: 420px;
  margin-left: auto;
}

.report-total-row {
  display: flex;
  justify-content: space-between;
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.report-profit {
  font-weight: 700;
  border-top: 1px solid var(--border);
  margin-top: 0.25rem;
  padding-top: 0.4rem;
  color: var(--text) !important;
}

.report-profit.positive span:last-child { color: #3fb950; }
.report-profit.negative span:last-child { color: #F85149; }

/* Summary block */
.report-summary { max-width: 460px; }

.report-summary-grid { font-size: 0.9rem; }

.report-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 0.3rem 0;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.summary-total {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text) !important;
  padding-top: 0.5rem;
}

.summary-total.positive span:last-child { color: #3fb950; }
.summary-total.negative span:last-child { color: #F85149; }

/* === Receipts summary bar === */
.receipts-summary {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.summary-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  min-width: 140px;
}

.summary-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.summary-value {
  font-size: 1.4rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.summary-income { color: #3fb950; }
.summary-expense { color: #F85149; }
.summary-profit { color: #3fb950; }
.summary-loss { color: #F85149; }

/* === Receipt paid/unpaid toggle === */
.status-badge-btn {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid;
  transition: opacity 0.15s;
  font-family: inherit;
}

.status-badge-btn:hover { opacity: 0.75; }

.status-badge-btn.paid {
  background: rgba(63, 185, 80, 0.1);
  color: #3fb950;
  border-color: rgba(63, 185, 80, 0.3);
}

.status-badge-btn.unpaid {
  background: rgba(248, 81, 73, 0.1);
  color: #F85149;
  border-color: rgba(248, 81, 73, 0.3);
}

/* === Paid badge (read-only, customer view) === */
.paid-badge {
  background: rgba(63, 185, 80, 0.1);
  color: #3fb950;
  border-color: rgba(63, 185, 80, 0.3);
}

.unpaid-badge {
  background: rgba(248, 81, 73, 0.1);
  color: #F85149;
  border-color: rgba(248, 81, 73, 0.3);
}

/* === Table actions cell === */
.table-actions {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  flex-wrap: wrap;
}

/* === Settings section (dashboard) === */
.settings-field {
  margin-bottom: 1.75rem;
}

.settings-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.settings-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.settings-row .form-input { flex: 1; min-width: 200px; }

.form-textarea {
  resize: vertical;
  min-height: 160px;
  line-height: 1.5;
}

/* === Reminder opt-in toggle === */
.optin-row { margin-top: 0.25rem; }

.optin-btn {
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  font-family: inherit;
}

.optin-btn.optin-on {
  background: rgba(63, 185, 80, 0.1);
  color: #3fb950;
  border-color: rgba(63, 185, 80, 0.3);
}

.optin-btn.optin-off {
  background: rgba(139, 148, 158, 0.1);
  color: var(--muted);
  border-color: var(--border);
}

.report-footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

/* === Domain Sale Page === */
.domain-hero {
  text-align: center;
  padding-top: 6rem;
  padding-bottom: 5rem;
}

.domain-hero-inner { max-width: 700px; margin: 0 auto; }

.domain-badge {
  display: inline-block;
  background: rgba(255, 107, 43, 0.1);
  border: 1px solid rgba(255, 107, 43, 0.35);
  border-radius: 20px;
  padding: 0.35rem 1.1rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2rem;
}

.domain-name-title {
  font-size: clamp(2rem, 7vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--accent);
  margin-bottom: 1.25rem;
  word-break: break-all;
}

.domain-sub {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.domain-cta { font-size: 1.05rem; padding: 0.85rem 2.25rem; }

.btn-outline {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  text-decoration: none;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

.domain-hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.domain-it-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.domain-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.domain-seller-address {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.8;
}

.domain-seller-address a { color: var(--muted); }
.domain-seller-address a:hover { color: var(--accent); }

@media (max-width: 768px) {
  .domain-info-grid { grid-template-columns: 1fr; }
  .domain-hero { padding-top: 4rem; padding-bottom: 3rem; }
}

/* === Print styles === */
@media print {
  .no-print { display: none !important; }

  body {
    background: white !important;
    color: black !important;
    font-size: 11pt;
    line-height: 1.5;
  }

  .navbar, .footer { display: none !important; }

  .print-report {
    max-width: 100%;
    padding: 0;
  }

  :root {
    --text: #000;
    --muted: #555;
    --border: #ccc;
    --accent: #c44b0a;
    --surface: #f5f5f5;
    --bg: #fff;
  }

  .report-title { font-size: 18pt; }
  .report-section-title { font-size: 8pt; }

  .report-asset { page-break-inside: avoid; }
  .report-summary { page-break-inside: avoid; }

  .report-table th,
  .report-table td { border-bottom-color: #ccc; }

  .report-profit.positive span:last-child { color: #1a7a2e !important; }
  .report-profit.negative span:last-child { color: #b91c1c !important; }
  .summary-total.positive span:last-child { color: #1a7a2e !important; }
  .summary-total.negative span:last-child { color: #b91c1c !important; }

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

/* === Responsive === */
@media (max-width: 768px) {
  /* Layout */
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .card-wide { flex-direction: column; }
  .contact-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .about-photo-wrap { max-width: 200px; }
  .hero-banner { min-height: 420px; }
  .footer-inner { flex-direction: column; text-align: center; gap: 0.5rem; }

  /* Spacing */
  .page-wrap { padding: 2.5rem 0; }
  .page-title-area { margin-bottom: 2rem; }

  /* Navbar hamburger — keep navbar sticky so it stays visible while scrolling */
  .nav-toggle { display: flex; align-items: center; }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--navbar-h);
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem;
    gap: 0.15rem;
    z-index: 99;
  }

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

  .nav-link {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
  }

  .nav-cta { margin-left: 0; text-align: center; }

  /* Nav dropdown on mobile — nested accordion instead of a flyout, since a
     hover flyout doesn't work on touch and would float off-screen inside
     the already-scrollable mobile menu. */
  .nav-dropdown {
    display: block;
    width: 100%;
  }

  .nav-dropdown-toggle {
    width: 100%;
    justify-content: space-between;
  }

  .nav-dropdown-menu {
    display: none;
    position: static;
    background: none;
    border: none;
    box-shadow: none;
    padding: 0 0 0 1rem;
  }

  .nav-dropdown.open .nav-dropdown-menu { display: block; }

  /* Forms */
  .form-grid-2 { grid-template-columns: 1fr; }

  /* Admin header — stack title and button */
  .admin-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .admin-header > .btn { width: 100%; text-align: center; }

  /* Admin client detail header — stack info and edit fields */
  .admin-client-header {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  /* Admin client list — horizontal scroll on small screens */
  .admin-client-list { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .admin-list-head,
  .admin-list-row { min-width: 580px; }

  /* Portal tables — fixed-col tables scroll automatically; all-fr tables shrink gracefully */
  .portal-table-head,
  .portal-table-row { min-width: 0; }

  /* Email settings form */
  .email-form { flex-direction: column; align-items: stretch; }
  .email-form .btn { width: 100%; text-align: center; }
  .form-input { min-width: 0; }

  /* Asset detail header */
  .asset-detail-header { flex-direction: column; }
  .profit-card { max-width: 100%; }
}

@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .hero { min-height: 80vh; }
  .hero-title { font-size: 2rem; }
  .section { padding: 3rem 0; }

  /* Long-form pages (flash guide): tighter frame, code blocks keep more
     usable columns before they have to scroll. */
  .prose-wrap { padding-top: 2.5rem; padding-bottom: 2.5rem; }
  .prose pre { padding: 0.75rem 0.9rem; }
  .prose pre code { font-size: 0.8rem; }
  .card { padding: 1.25rem; }

  /* Full-width tap targets for the hero CTAs. */
  .domain-it-cta .btn,
  .domain-it-cta .btn-outline {
    width: 100%;
    text-align: center;
  }
  .auth-card { padding: 1.75rem 1.25rem; }
  .admin-create-card { padding: 1.25rem; }
  .admin-client-edit-fields { flex-direction: column; }
  .admin-client-edit-fields .form-group { min-width: 0; width: 100%; }
}
