/* ======================================================
   M.H. IMMOBILIEN · Mieterportal
   Design System
   ====================================================== */

:root {
  --navy: #1a2845;
  --navy-dark: #0f1a2e;
  --gold: #b8995c;
  --gold-light: #d4b87a;
  --gold-pale: #f5efe1;
  --paper: #fbf9f4;
  --white: #ffffff;
  --ink: #1a2845;
  --ink-soft: #4a5570;
  --line: #e6e1d4;
  --line-dark: #c8c0a8;
  --danger: #a03030;
  --success: #2d6a4f;

  --font-display: 'Cormorant Garamond', 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --max-w: 1200px;
  --radius: 4px;
  --shadow-sm: 0 2px 8px rgba(26, 40, 69, 0.06);
  --shadow-md: 0 8px 24px rgba(26, 40, 69, 0.08);
  --shadow-lg: 0 20px 60px rgba(26, 40, 69, 0.12);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--navy); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--gold); }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
}

/* ======================================================
   LOGO
   ====================================================== */

.logo, .footer-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: baseline;
  text-decoration: none;
}

.logo-mh   { color: var(--gold); font-weight: 500; }
.logo-immo { color: var(--navy); font-weight: 500; margin-left: 0.15em; }

.footer-logo { font-size: 1.25rem; }

/* ======================================================
   HEADER
   ====================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 249, 244, 0.92);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.main-nav a {
  font-size: 0.92rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}

.main-nav a:hover { color: var(--navy); }

/* ======================================================
   BUTTONS
   ====================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.4rem;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .25s ease;
  text-decoration: none;
}

.btn-lg { padding: 0.95rem 1.8rem; font-size: 0.98rem; }

.btn-primary {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.btn-primary:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-ghost {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--navy);
}
.btn-ghost:hover {
  background: var(--navy);
  color: var(--white);
}

.btn-gold {
  background: var(--gold);
  color: var(--white);
  border-color: var(--gold);
}
.btn-gold:hover { background: var(--gold-light); border-color: var(--gold-light); color: var(--white); }

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
}
.btn-danger:hover { background: var(--danger); color: var(--white); }

.btn-block { width: 100%; }

/* ======================================================
   TYPOGRAPHY
   ====================================================== */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--navy);
  margin: 0 0 1rem;
  line-height: 1.15;
}

h1 { font-size: clamp(2.8rem, 6vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.5rem; }

h1 em, h2 em {
  font-style: italic;
  color: var(--gold);
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--gold);
  margin: 0 0 1rem;
}

.eyebrow.centered, .section-title.centered { text-align: center; }

.lead {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 620px;
  line-height: 1.65;
}

.lead-light { color: rgba(255,255,255,0.85); font-size: 1.1rem; max-width: 480px; }

.section-title { margin-bottom: 3rem; }
.section-title.light { color: var(--white); }

/* ======================================================
   HERO (full-bleed video background, like mhimmobilien.com)
   ====================================================== */

.hero {
  position: relative;
  width: 100%;
  min-height: 88vh;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  isolation: isolate;
  background: var(--navy-dark);
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: -2;
  /* slight zoom + ken-burns feel */
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      105deg,
      rgba(15, 26, 46, 0.85) 0%,
      rgba(15, 26, 46, 0.62) 38%,
      rgba(15, 26, 46, 0.38) 75%,
      rgba(15, 26, 46, 0.55) 100%
    ),
    linear-gradient(
      to bottom,
      rgba(15, 26, 46, 0.15) 0%,
      rgba(15, 26, 46, 0) 30%,
      rgba(15, 26, 46, 0) 70%,
      rgba(15, 26, 46, 0.45) 100%
    );
  z-index: -1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  padding: clamp(5rem, 12vh, 8rem) 2rem;
}

.hero-content .eyebrow {
  color: var(--gold-light);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.hero h1 {
  color: var(--white);
  margin-bottom: 1.5rem;
  max-width: 760px;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

.hero h1 em { color: var(--gold-light); }

.hero .lead {
  color: rgba(255, 255, 255, 0.92);
  max-width: 580px;
  margin-bottom: 2.5rem;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.4);
}

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

.hero .btn-primary {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy-dark);
  box-shadow: 0 8px 28px rgba(184, 153, 92, 0.35);
}
.hero .btn-primary:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  color: var(--navy-dark);
  box-shadow: 0 12px 34px rgba(184, 153, 92, 0.5);
}

.hero .btn-ghost {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(4px);
  background: rgba(255, 255, 255, 0.05);
}
.hero .btn-ghost:hover {
  background: var(--white);
  color: var(--navy);
  border-color: var(--white);
}

/* Mobile hero */
@media (max-width: 768px) {
  .hero { min-height: 75vh; }
  .hero-content { padding: 4rem 1.25rem; }
}

/* ======================================================
   SERVICES
   ====================================================== */

.services {
  background: var(--white);
  padding: clamp(4rem, 8vw, 7rem) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

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

.service-card {
  position: relative;
  padding: 2.5rem 1.8rem 2rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: all .3s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--gold);
}

.card-num {
  font-family: var(--font-display);
  font-size: 0.92rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.service-card h3 { margin-bottom: 0.6rem; }
.service-card p { color: var(--ink-soft); margin: 0; font-size: 0.96rem; }

/* ======================================================
   SECURITY
   ====================================================== */

.security {
  background: var(--navy);
  color: var(--white);
  padding: clamp(4rem, 8vw, 7rem) 0;
  position: relative;
  overflow: hidden;
}

.security::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(184,153,92,0.18) 0%, transparent 70%);
  pointer-events: none;
}

.security-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.security-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1.25rem;
}

.security-list li {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.5rem;
  padding: 1.25rem 0;
  border-top: 1px solid rgba(255,255,255,0.12);
}

.security-list li:last-child { border-bottom: 1px solid rgba(255,255,255,0.12); }

.security-list strong {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--gold-light);
}

.security-list span { color: rgba(255,255,255,0.75); font-size: 0.94rem; }

@media (max-width: 800px) {
  .security-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .security-list li { grid-template-columns: 1fr; gap: 0.3rem; }
}

/* ======================================================
   CONTACT
   ====================================================== */

.contact {
  background: var(--white);
  padding: clamp(4rem, 8vw, 7rem) 0;
  text-align: center;
}

.contact-card {
  font-style: normal;
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--ink);
  margin-top: 1rem;
  line-height: 1.7;
}

.contact-card a { color: var(--gold); }

/* ======================================================
   FOOTER
   ====================================================== */

.site-footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.7);
  padding: 3rem 0 2rem;
}

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

.footer-logo .logo-immo { color: var(--white); }

.footer-nav {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-nav a { color: rgba(255,255,255,0.65); font-size: 0.88rem; }
.footer-nav a:hover { color: var(--gold); }

.footer-copy {
  width: 100%;
  text-align: center;
  font-size: 0.82rem;
  margin: 2rem 0 0;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* ======================================================
   LOGIN PAGE
   ====================================================== */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: linear-gradient(135deg, var(--paper) 0%, var(--gold-pale) 100%);
  position: relative;
  overflow: hidden;
}

.auth-page::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  opacity: 0.1;
  pointer-events: none;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 3rem 2.5rem;
  position: relative;
  z-index: 2;
  border-top: 4px solid var(--gold);
}

.auth-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.auth-card h1 {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 0.4rem;
}

.auth-subtitle {
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin: 0 0 2rem;
}

.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

.form-control {
  width: 100%;
  padding: 0.8rem 1rem;
  font-family: var(--font-body);
  font-size: 0.98rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  transition: all .2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--gold);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(184, 153, 92, 0.15);
}

.form-control[readonly] { background: var(--line); color: var(--ink-soft); cursor: not-allowed; }

textarea.form-control { resize: vertical; min-height: 80px; font-family: var(--font-body); }

.form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.form-help {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.form-error {
  background: #fdf2f2;
  border: 1px solid #f8d4d4;
  color: var(--danger);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.form-success {
  background: #f0f7f2;
  border: 1px solid #cfe5d6;
  color: var(--success);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* ======================================================
   APP / DASHBOARD
   ====================================================== */

.app-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.app-sidebar {
  background: var(--navy);
  color: rgba(255,255,255,0.8);
  padding: 2rem 0;
  display: flex;
  flex-direction: column;
}

.app-sidebar .logo {
  font-size: 1.3rem;
  padding: 0 1.8rem 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 1.5rem;
}

.app-sidebar .logo-immo { color: var(--white); }

.sidebar-nav { flex: 1; display: flex; flex-direction: column; }

.sidebar-nav a {
  padding: 0.85rem 1.8rem;
  color: rgba(255,255,255,0.7);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  border-left: 3px solid transparent;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-nav a:hover { color: var(--white); background: rgba(255,255,255,0.04); }
.sidebar-nav a.active {
  color: var(--gold-light);
  border-left-color: var(--gold);
  background: rgba(184, 153, 92, 0.08);
}

.sidebar-nav .nav-icon { width: 18px; height: 18px; opacity: 0.7; }

.sidebar-footer {
  padding: 1.5rem 1.8rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.85rem;
}

.sidebar-footer button {
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  padding: 0;
  font-family: var(--font-body);
  font-size: 0.85rem;
}
.sidebar-footer button:hover { color: var(--gold); }

.app-main {
  background: var(--paper);
  padding: 2.5rem 3rem;
  overflow-x: auto;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.app-header h1 {
  font-size: 2.2rem;
  margin: 0 0 0.3rem;
}

.app-header .subtitle {
  color: var(--ink-soft);
  margin: 0;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.9rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.88rem;
}

.user-chip-dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem;
  box-shadow: var(--shadow-sm);
}

.card h2, .card h3 { color: var(--navy); }
.card h2 { font-size: 1.6rem; margin-bottom: 1rem; }
.card h3 { font-size: 1.15rem; margin-bottom: 0.4rem; font-family: var(--font-body); font-weight: 600; letter-spacing: 0.01em; }

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

.action-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  color: var(--ink);
  transition: all .25s ease;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  cursor: pointer;
}

.action-card:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
  box-shadow: var(--shadow-md);
  color: var(--ink);
}

.action-card .card-num {
  margin-bottom: 0.5rem;
}

.action-card .card-desc {
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin: 0;
}

.action-card .card-cta {
  margin-top: auto;
  padding-top: 1rem;
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

/* Profile / stammdaten table */
.profile-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.profile-table td {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

.profile-table td:first-child {
  color: var(--ink-soft);
  width: 220px;
  font-weight: 500;
}

/* Admin table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.9rem;
}

.data-table th {
  background: var(--gold-pale);
  text-align: left;
  padding: 0.85rem 1rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
  font-weight: 600;
  border-bottom: 1px solid var(--line-dark);
}

.data-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--paper); }

.actions-inline {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.82rem;
}

/* badges */
.badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  border-radius: 999px;
  background: var(--gold-pale);
  color: var(--navy);
}

.badge-success { background: #e6f1ea; color: var(--success); }
.badge-warn { background: #fbf2dc; color: #8a6500; }

/* ======================================================
   MODAL
   ====================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 26, 46, 0.55);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.modal {
  background: var(--white);
  border-radius: var(--radius);
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  border-top: 4px solid var(--gold);
  box-shadow: var(--shadow-lg);
}

.modal-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--navy);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--ink-soft);
  cursor: pointer;
  line-height: 1;
}

.modal-body { padding: 2rem; }

/* ======================================================
   COOKIE BANNER
   ====================================================== */

.cookie-banner {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  right: 1.5rem;
  max-width: 520px;
  background: var(--navy);
  color: var(--white);
  padding: 1.5rem;
  border-radius: var(--radius);
  border-top: 3px solid var(--gold);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  display: none;
}

.cookie-banner.visible { display: block; }

.cookie-banner p {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.85);
}

.cookie-banner a { color: var(--gold-light); text-decoration: underline; }

.cookie-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.cookie-actions .btn { font-size: 0.85rem; padding: 0.5rem 1rem; }

/* ======================================================
   LEGAL PAGES
   ====================================================== */

.legal-page {
  background: var(--paper);
  padding: 4rem 2rem;
}

.legal-content {
  max-width: 800px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 3rem 3.5rem;
  border-radius: var(--radius);
}

.legal-content h1 {
  font-size: 2.2rem;
  border-bottom: 2px solid var(--gold);
  padding-bottom: 1rem;
  margin-bottom: 2rem;
}

.legal-content h2 {
  font-size: 1.3rem;
  margin-top: 2.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--navy);
}

.legal-content p, .legal-content li {
  font-size: 0.96rem;
  color: var(--ink);
  line-height: 1.75;
}

.legal-content ul { padding-left: 1.5rem; }

.legal-content .back-link {
  display: inline-block;
  margin-bottom: 2rem;
  font-size: 0.9rem;
  color: var(--gold);
}

/* ======================================================
   RESPONSIVE
   ====================================================== */

@media (max-width: 900px) {
  .main-nav { gap: 1rem; }
  .main-nav a:not(.btn) { display: none; }
  .hero-ornament { display: none; }
  .app-shell { grid-template-columns: 1fr; }
  .app-sidebar {
    flex-direction: row;
    padding: 1rem;
    overflow-x: auto;
  }
  .app-sidebar .logo { padding: 0 1rem 0 0; border-bottom: none; border-right: 1px solid rgba(255,255,255,0.1); margin: 0 1rem 0 0; }
  .sidebar-nav { flex-direction: row; gap: 0.5rem; }
  .sidebar-nav a { padding: 0.5rem 1rem; white-space: nowrap; border-left: none; border-bottom: 3px solid transparent; }
  .sidebar-nav a.active { border-left: none; border-bottom-color: var(--gold); }
  .sidebar-footer { border-top: none; border-left: 1px solid rgba(255,255,255,0.1); padding: 0 1rem; }
  .app-main { padding: 1.5rem; }
  .legal-content { padding: 2rem 1.5rem; }
}

@media (max-width: 540px) {
  .auth-card { padding: 2rem 1.5rem; }
  h1 { font-size: 2.2rem; }
  .form-actions { flex-direction: column; }
}

/* ======================================================
   ANIMATIONS
   ====================================================== */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-content > * { animation: fadeUp 0.8s ease-out backwards; }
.hero-content > *:nth-child(1) { animation-delay: 0.1s; }
.hero-content > *:nth-child(2) { animation-delay: 0.2s; }
.hero-content > *:nth-child(3) { animation-delay: 0.3s; }
.hero-content > *:nth-child(4) { animation-delay: 0.4s; }

.service-card { animation: fadeUp 0.6s ease-out backwards; }
.service-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2) { animation-delay: 0.2s; }
.service-card:nth-child(3) { animation-delay: 0.3s; }
.service-card:nth-child(4) { animation-delay: 0.4s; }

/* ======================================================
   PRINT
   ====================================================== */

@media print {
  .app-sidebar, .site-header, .site-footer, .cookie-banner, .btn { display: none !important; }
  .app-main { padding: 0; }
  body { background: white; }
}

/* ======================================================
   FIX & FLIP RECHNER
   ====================================================== */

.fixflip-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.ff-result { padding: 0; }

.ff-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 0.96rem;
}

.ff-row.ff-sub {
  padding-left: 1.5rem;
  color: rgba(255,255,255,0.7);
  font-size: 0.88rem;
}

.ff-row.ff-total {
  background: rgba(184,153,92,0.12);
  margin: 0.5rem -1rem 0.5rem;
  padding: 0.8rem 1rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 1.05rem;
  border-bottom: none;
}

.ff-row.ff-highlight {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: var(--navy-dark);
  margin: 0.8rem -1rem 0.3rem;
  padding: 1rem 1rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 1.15rem;
  border-bottom: none;
}

.ff-row.ff-highlight strong { color: var(--navy-dark); font-size: 1.4rem; }

.ff-row.ff-highlight-net {
  background: rgba(184, 153, 92, 0.18);
  margin: 0 -1rem 0.8rem;
  padding: 0.7rem 1rem;
  border-radius: 4px;
  font-weight: 500;
  font-size: 0.95rem;
  border-bottom: none;
  color: var(--gold-light);
}

.ff-row.ff-highlight-net strong { color: var(--white); font-size: 1.1rem; }

.ff-row strong { font-family: var(--font-display); font-size: 1.05rem; }

.ff-divider {
  height: 1px;
  background: rgba(255,255,255,0.15);
  margin: 1rem 0;
}

.ff-breakdown {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
}

.ff-breakdown td {
  padding: 0.35rem 0;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.85);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.ff-breakdown td:last-child { text-align: right; font-weight: 500; }

/* ======================================================
   NOTIZEN
   ====================================================== */

.notizen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.notiz-card {
  background: linear-gradient(135deg, #fff9e6 0%, #fef3c7 100%);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: all .2s ease;
  display: flex;
  flex-direction: column;
  min-height: 180px;
}

.notiz-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.notiz-card.color-blue   { background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%); }
.notiz-card.color-green  { background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%); }
.notiz-card.color-pink   { background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%); }
.notiz-card.color-purple { background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%); }

.notiz-card textarea {
  background: transparent;
  border: none;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
  resize: none;
  flex: 1;
  outline: none;
  line-height: 1.5;
}

.notiz-card .notiz-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(0,0,0,0.08);
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.notiz-card .notiz-delete {
  background: none;
  border: none;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 1rem;
  padding: 0;
  opacity: 0.5;
  transition: opacity .2s ease;
}

.notiz-card .notiz-delete:hover { opacity: 1; color: var(--danger); }

.notiz-card .notiz-colors {
  display: flex;
  gap: 4px;
}

.notiz-card .color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  cursor: pointer;
  border: 1px solid rgba(0,0,0,0.15);
}

/* ======================================================
   MOBILE OPTIMIERUNGEN — VERBESSERT
   ====================================================== */

@media (max-width: 768px) {
  /* Allgemein */
  body { font-size: 15px; }
  .container { padding: 0 1rem; }

  /* Header */
  .header-inner { padding: 0.8rem 1rem; }
  .logo { font-size: 1.2rem; }

  /* Hero */
  .hero { padding: 3rem 1rem 4rem; }
  .hero h1 { font-size: clamp(2rem, 8vw, 3rem); }
  .hero .lead { font-size: 1rem; }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; justify-content: center; }

  /* Sections */
  .services, .security, .contact { padding: 3rem 0; }
  .section-title { margin-bottom: 2rem; font-size: 1.8rem; }

  /* Service Grid */
  .service-grid { grid-template-columns: 1fr; gap: 1rem; }
  .service-card { padding: 1.5rem 1.25rem; }

  /* Footer */
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-nav { justify-content: center; }

  /* Fix & Flip mobile */
  .fixflip-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .fixflip-grid .card[style*="sticky"] { position: static !important; }

  /* Forms im Dashboard */
  .form-control { font-size: 16px; /* prevents iOS zoom */ }

  /* Tables responsive */
  .data-table { font-size: 0.82rem; }
  .data-table th, .data-table td { padding: 0.6rem 0.5rem; }

  /* Cards */
  .card { padding: 1.25rem; }

  /* App-Header */
  .app-header { flex-direction: column; align-items: flex-start; }
  .app-header h1 { font-size: 1.6rem; }

  /* Modal */
  .modal-backdrop { padding: 1rem; }
  .modal-body { padding: 1.25rem; }

  /* Card grids */
  .card-grid { grid-template-columns: 1fr; gap: 1rem; }
}

@media (max-width: 480px) {
  /* Hero */
  .hero h1 { font-size: 2rem; }
  .hero { padding: 2rem 1rem 3rem; }

  /* Auth */
  .auth-card { padding: 1.5rem 1.25rem; }
  .auth-card h1 { font-size: 1.6rem; }

  /* Buttons */
  .btn { padding: 0.7rem 1.1rem; font-size: 0.88rem; }
  .btn-lg { padding: 0.85rem 1.3rem; font-size: 0.95rem; }

  /* Sidebar (mobile horizontal) */
  .app-sidebar { padding: 0.6rem; }
  .sidebar-nav a { padding: 0.5rem 0.75rem; font-size: 0.85rem; }
  .app-sidebar .logo { font-size: 1rem; }

  /* Data table — tighter */
  .data-table th, .data-table td { padding: 0.5rem 0.4rem; font-size: 0.78rem; }

  /* Notizen grid */
  .notizen-grid { grid-template-columns: 1fr; }
}

/* ======================================================
   HERO VIDEO
   ====================================================== */

.hero {
  position: relative;
  overflow: hidden;
}

.hero-video-wrap {
  position: absolute;
  top: 50%;
  right: -6rem;
  transform: translateY(-50%);
  width: 520px;
  height: 520px;
  border-radius: 50%;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
  box-shadow:
    0 0 0 1px var(--gold),
    0 0 0 21px transparent,
    0 0 0 22px rgba(184,153,92,0.4),
    0 0 0 43px transparent,
    0 0 0 44px rgba(26,40,69,0.15),
    var(--shadow-lg);
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-video-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(251,249,244,0) 30%, rgba(251,249,244,0.5) 100%);
  pointer-events: none;
}

/* hide on mobile - video too distracting on small screens */
@media (max-width: 900px) {
  .hero-video-wrap { display: none; }
}

/* Netto-Gewinn (50% vom Brutto) */
.ff-row.ff-highlight-net {
  background: rgba(184,153,92,0.15);
  border: 1px solid rgba(184,153,92,0.3);
  margin: 0.4rem -1rem;
  padding: 0.7rem 1rem;
  border-radius: 4px;
  font-size: 1rem;
  border-bottom: none;
  color: var(--gold-light);
}
.ff-row.ff-highlight-net strong {
  color: var(--gold-light);
  font-size: 1.2rem;
}
