/* ============================================================
   ERINNERUNG.DE – Memorial Platform Design System
   Aesthetic: Refined Silence — soft ivory, deep forest green,
   warm gold, generous white space. Cormorant Garamond + DM Sans.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=DM+Sans:wght@300;400;500&display=swap');

/* ── Variables ────────────────────────────────────────────── */
:root {
  --ivory:       #F9F6F0;
  --ivory-dark:  #EDE8DF;
  --cream:       #FAF8F5;
  --gold:        #B8963E;
  --gold-light:  #D4AF6A;
  --gold-pale:   #F0E6C8;
  --forest:      #2D4A3E;
  --forest-mid:  #3D6355;
  --forest-light:#4E7A68;
  --navy:        #1E2D3D;
  --slate:       #5A6472;
  --mist:        #8C97A0;
  --white:       #FFFFFF;
  --shadow-sm:   0 1px 4px rgba(45,74,62,.07);
  --shadow-md:   0 4px 20px rgba(45,74,62,.10);
  --shadow-lg:   0 12px 40px rgba(45,74,62,.14);
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --radius-xl:   32px;
  --transition:  .28s cubic-bezier(.4,0,.2,1);
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--navy);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input, textarea, select { font: inherit; outline: none; border: none; background: none; }

/* ── Typography ──────────────────────────────────────────── */
.serif { font-family: 'Cormorant Garamond', Georgia, serif; }
h1, h2, h3, h4 { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 400; line-height: 1.2; }
h1 { font-size: clamp(2.4rem, 5vw, 4rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
h4 { font-size: 1.15rem; }
p  { font-size: .97rem; color: var(--slate); line-height: 1.7; }
small { font-size: .82rem; color: var(--mist); }

/* ── Layout ──────────────────────────────────────────────── */
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.section    { padding: 80px 0; }
.section-sm { padding: 48px 0; }
.flex { display: flex; }
.flex-center { align-items: center; justify-content: center; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; }

/* ── Navigation ──────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(249,246,240,.95);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--ivory-dark);
  padding: 0;
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; gap: 32px;
}
.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.45rem; font-weight: 500;
  color: var(--forest); letter-spacing: .03em;
  display: flex; align-items: center; gap: 10px;
}
.nav-logo-mark {
  width: 32px; height: 32px;
  background: var(--forest);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.nav-logo-mark svg { width: 16px; height: 16px; fill: var(--gold-light); }
.nav-links {
  display: flex; align-items: center; gap: 28px; flex: 1;
}
.nav-links a {
  font-size: .88rem; font-weight: 400; color: var(--slate);
  transition: color var(--transition);
  letter-spacing: .02em;
}
.nav-links a:hover { color: var(--forest); }
.nav-links a.active { color: var(--forest); font-weight: 500; }
.nav-actions { display: flex; align-items: center; gap: 12px; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-size: .9rem; font-weight: 500;
  cursor: pointer; transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--forest); color: var(--white);
  box-shadow: 0 2px 12px rgba(45,74,62,.22);
}
.btn-primary:hover {
  background: var(--forest-mid);
  box-shadow: 0 4px 20px rgba(45,74,62,.30);
  transform: translateY(-1px);
}
.btn-outline {
  border: 1.5px solid var(--forest); color: var(--forest);
}
.btn-outline:hover {
  background: var(--forest); color: var(--white);
}
.btn-gold {
  background: var(--gold); color: var(--white);
  box-shadow: 0 2px 12px rgba(184,150,62,.25);
}
.btn-gold:hover {
  background: #a0822e;
  box-shadow: 0 4px 20px rgba(184,150,62,.35);
  transform: translateY(-1px);
}
.btn-ghost { color: var(--slate); }
.btn-ghost:hover { color: var(--forest); background: var(--ivory); }
.btn-sm { padding: 7px 16px; font-size: .84rem; }
.btn-lg { padding: 14px 36px; font-size: 1rem; }
.btn-icon { width: 36px; height: 36px; padding: 0; }

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--ivory-dark);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-flat { box-shadow: none; }
.card-flat:hover { box-shadow: var(--shadow-sm); transform: none; }

/* ── Form Elements ───────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: .84rem; font-weight: 500; color: var(--slate); letter-spacing: .02em; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 10px 14px;
  background: var(--white); color: var(--navy);
  border: 1.5px solid var(--ivory-dark);
  border-radius: var(--radius-sm);
  font-size: .92rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--forest-light);
  box-shadow: 0 0 0 3px rgba(78,122,104,.12);
}
.form-textarea { resize: vertical; min-height: 100px; }
.form-hint { font-size: .8rem; color: var(--mist); }

/* ── Badge / Tag ─────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 99px;
  font-size: .78rem; font-weight: 500; letter-spacing: .03em;
}
.badge-forest { background: rgba(45,74,62,.1); color: var(--forest); }
.badge-gold   { background: rgba(184,150,62,.12); color: var(--gold); }
.badge-mist   { background: var(--ivory-dark); color: var(--slate); }
.badge-success{ background: rgba(56,142,97,.12); color: #2e7a55; }
.badge-warn   { background: rgba(209,120,40,.12); color: #b06020; }
.badge-danger { background: rgba(185,62,62,.10); color: #a03030; }

/* ── Dividers & Decorators ───────────────────────────────── */
.divider {
  border: none; border-top: 1px solid var(--ivory-dark); margin: 24px 0;
}
.gold-line {
  width: 48px; height: 2px; background: var(--gold); margin: 16px 0;
}
.section-label {
  font-size: .78rem; font-weight: 500; letter-spacing: .12em;
  text-transform: uppercase; color: var(--gold);
}

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  background: var(--ivory);
  padding: 100px 0 80px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 70% at 70% 30%,
    rgba(184,150,62,.08) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Panel Layout ────────────────────────────────────────── */
.panel-layout {
  display: flex; min-height: 100vh;
}
.sidebar {
  width: 260px; min-width: 260px;
  background: var(--forest);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar-logo {
  padding: 24px 20px 20px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.25rem; font-weight: 500;
  color: var(--ivory); letter-spacing: .04em;
  border-bottom: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; gap: 10px;
}
.sidebar-logo-mark {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(184,150,62,.25);
  border: 1px solid rgba(184,150,62,.4);
  display: flex; align-items: center; justify-content: center;
}
.sidebar-section-label {
  font-size: .7rem; font-weight: 500; letter-spacing: .1em;
  text-transform: uppercase; color: rgba(255,255,255,.35);
  padding: 20px 20px 6px;
}
.sidebar-nav { padding: 8px 12px; flex: 1; }
.sidebar-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  color: rgba(255,255,255,.7); font-size: .88rem;
  cursor: pointer; transition: all var(--transition);
  margin-bottom: 2px;
}
.sidebar-item:hover { background: rgba(255,255,255,.08); color: var(--white); }
.sidebar-item.active {
  background: rgba(184,150,62,.18);
  color: var(--gold-light);
  font-weight: 500;
}
.sidebar-item svg { width: 18px; height: 18px; opacity: .75; flex-shrink: 0; }
.sidebar-item.active svg { opacity: 1; }
.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex; align-items: center; gap: 10px;
}
.panel-content {
  flex: 1; background: #F4F2EE;
  display: flex; flex-direction: column;
  min-width: 0;
}
.panel-topbar {
  background: var(--white);
  border-bottom: 1px solid var(--ivory-dark);
  padding: 0 28px; height: 60px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
}
.panel-main { padding: 32px 28px; }
.panel-title { font-size: 1.6rem; font-weight: 400; font-family: 'Cormorant Garamond', serif; }
.panel-subtitle { font-size: .88rem; color: var(--mist); margin-top: 2px; }

/* ── Stat Cards ──────────────────────────────────────────── */
.stat-card {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--ivory-dark);
  padding: 22px 24px;
  display: flex; flex-direction: column; gap: 6px;
}
.stat-value {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.2rem; color: var(--forest);
}
.stat-label { font-size: .84rem; color: var(--mist); }
.stat-delta { font-size: .8rem; }
.stat-delta.up { color: #2e7a55; }
.stat-delta.dn { color: #a03030; }

/* ── Table ───────────────────────────────────────────────── */
.table-wrap {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--ivory-dark);
  overflow: hidden;
}
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  font-size: .78rem; font-weight: 500; letter-spacing: .06em;
  text-transform: uppercase; color: var(--mist);
  padding: 12px 16px; text-align: left;
  background: var(--ivory); border-bottom: 1px solid var(--ivory-dark);
}
.data-table td {
  padding: 13px 16px; font-size: .9rem; color: var(--navy);
  border-bottom: 1px solid var(--ivory-dark);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--ivory); }

/* ── Avatar ──────────────────────────────────────────────── */
.avatar {
  border-radius: 50%; object-fit: cover;
  background: var(--ivory-dark); flex-shrink: 0;
}
.avatar-sm { width: 32px; height: 32px; }
.avatar-md { width: 48px; height: 48px; }
.avatar-lg { width: 80px; height: 80px; }
.avatar-xl { width: 120px; height: 120px; }
.avatar-placeholder {
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2em; color: var(--mist);
  background: var(--ivory-dark); border-radius: 50%;
}

/* ── Upload Zone ─────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--ivory-dark);
  border-radius: var(--radius-md);
  padding: 48px 24px;
  text-align: center; cursor: pointer;
  transition: all var(--transition);
  background: var(--ivory);
}
.upload-zone:hover {
  border-color: var(--forest-light);
  background: rgba(78,122,104,.04);
}

/* ── Pricing Cards ───────────────────────────────────────── */
.price-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--ivory-dark);
  padding: 36px 28px; position: relative;
  transition: all var(--transition);
}
.price-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.price-card.featured {
  border-color: var(--forest);
  box-shadow: 0 0 0 1px var(--forest), var(--shadow-lg);
}
.price-card.featured::before {
  content: 'Empfohlen';
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--forest); color: var(--white);
  font-size: .75rem; font-weight: 500; letter-spacing: .06em;
  padding: 4px 16px; border-radius: 99px;
}
.price-amount {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3rem; color: var(--forest); line-height: 1;
}
.price-period { font-size: .88rem; color: var(--mist); }
.price-features { display: flex; flex-direction: column; gap: 10px; margin: 20px 0; }
.price-feature {
  display: flex; align-items: center; gap: 9px;
  font-size: .9rem; color: var(--slate);
}
.price-feature::before {
  content: ''; width: 16px; height: 16px; flex-shrink: 0;
  border-radius: 50%; background: rgba(45,74,62,.1);
  display: flex; align-items: center; justify-content: center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%232D4A3E' d='M13 4L6.5 11 3 7.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: 12px;
}

/* ── Memorial Page Specific ──────────────────────────────── */
.memorial-hero {
  background: linear-gradient(160deg, var(--forest) 0%, var(--navy) 100%);
  color: var(--white); padding: 64px 0;
  position: relative; overflow: hidden;
}
.memorial-hero::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 80px;
  background: linear-gradient(to top, var(--cream), transparent);
}
.memorial-photo {
  width: 140px; height: 140px; border-radius: 50%;
  border: 4px solid rgba(184,150,62,.5);
  box-shadow: 0 8px 32px rgba(0,0,0,.25);
  object-fit: cover;
}
.memorial-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 300; letter-spacing: .02em;
  color: var(--white);
}
.memorial-dates {
  font-size: .95rem; color: rgba(255,255,255,.65);
  letter-spacing: .08em;
}
.candle-btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 24px; border-radius: 99px;
  border: 1.5px solid rgba(184,150,62,.6);
  color: var(--gold-light); font-size: .9rem;
  cursor: pointer; transition: all var(--transition);
  background: rgba(184,150,62,.08);
}
.candle-btn:hover {
  background: rgba(184,150,62,.18);
  border-color: var(--gold-light);
}
.condolence-entry {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--ivory-dark);
  padding: 20px;
}
.condolence-author { font-weight: 500; font-size: .95rem; color: var(--forest); }
.condolence-date   { font-size: .8rem; color: var(--mist); }
.condolence-text   { font-size: .9rem; color: var(--slate); margin-top: 8px; font-style: italic; }

/* ── Footer ──────────────────────────────────────────────── */
.footer {
  background: var(--forest);
  color: rgba(255,255,255,.65);
  padding: 56px 0 32px;
}
.footer-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem; color: var(--ivory); margin-bottom: 8px;
}
.footer-links { display: flex; flex-direction: column; gap: 7px; }
.footer-links a { font-size: .88rem; transition: color var(--transition); }
.footer-links a:hover { color: var(--gold-light); }
.footer-heading {
  font-size: .78rem; font-weight: 500; letter-spacing: .1em;
  text-transform: uppercase; color: rgba(255,255,255,.4);
  margin-bottom: 14px;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 24px; margin-top: 40px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: .82rem;
}

/* ── Notification / Alert ────────────────────────────────── */
.alert {
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: .9rem; display: flex; align-items: flex-start; gap: 10px;
}
.alert-info { background: rgba(45,74,62,.07); color: var(--forest); border: 1px solid rgba(45,74,62,.15); }
.alert-warn { background: rgba(209,120,40,.08); color: #8c5000; border: 1px solid rgba(209,120,40,.2); }
.alert-danger { background: rgba(185,62,62,.07); color: #7a2020; border: 1px solid rgba(185,62,62,.18); }

/* ── QR Code Display ─────────────────────────────────────── */
.qr-display {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--ivory-dark);
  padding: 24px; text-align: center;
  display: inline-flex; flex-direction: column; align-items: center; gap: 14px;
}
.qr-frame {
  width: 160px; height: 160px;
  border: 2px solid var(--ivory-dark);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--ivory);
}
.qr-frame svg { width: 130px; height: 130px; }

/* ── Progress / Step ─────────────────────────────────────── */
.steps { display: flex; align-items: center; gap: 0; }
.step {
  display: flex; align-items: center; gap: 10px;
  font-size: .88rem; color: var(--mist);
}
.step.active { color: var(--forest); }
.step.done   { color: var(--gold); }
.step-num {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 500;
  border: 1.5px solid var(--ivory-dark);
  color: var(--mist);
}
.step.active .step-num { border-color: var(--forest); color: var(--forest); }
.step.done   .step-num { background: var(--gold); border-color: var(--gold); color: var(--white); }
.step-line { flex: 1; height: 1px; background: var(--ivory-dark); min-width: 32px; }

/* ── Tabs ────────────────────────────────────────────────── */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--ivory-dark); margin-bottom: 24px; }
.tab {
  padding: 10px 18px; font-size: .9rem; color: var(--mist);
  cursor: pointer; border-bottom: 2px solid transparent;
  transition: all var(--transition); margin-bottom: -1px;
}
.tab:hover { color: var(--forest); }
.tab.active { color: var(--forest); font-weight: 500; border-bottom-color: var(--forest); }

/* ── Toggle / Switch ─────────────────────────────────────── */
.toggle {
  position: relative; width: 40px; height: 22px; cursor: pointer;
}
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-track {
  position: absolute; inset: 0; border-radius: 99px;
  background: var(--ivory-dark); transition: background var(--transition);
}
.toggle input:checked + .toggle-track { background: var(--forest); }
.toggle-thumb {
  position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--white); transition: transform var(--transition);
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.toggle input:checked ~ .toggle-thumb { transform: translateX(18px); }

/* ── Gallery Grid ────────────────────────────────────────── */
.photo-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.photo-thumb {
  aspect-ratio: 1; border-radius: var(--radius-sm);
  overflow: hidden; cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}
.photo-thumb:hover { transform: scale(1.03); box-shadow: var(--shadow-md); }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .panel-layout { flex-direction: column; }
  .sidebar { width: 100%; min-width: unset; height: auto; position: relative; }
  .nav-links { display: none; }
}
@media (max-width: 600px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .panel-main { padding: 20px 16px; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
}

/* ── Utility ─────────────────────────────────────────────── */
.mt-4  { margin-top: 4px;  }
.mt-8  { margin-top: 8px;  }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-40 { margin-top: 40px; }
.mb-4  { margin-bottom: 4px;  }
.mb-8  { margin-bottom: 8px;  }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.gap-8  { gap: 8px;  }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.gap-24 { gap: 24px; }
.gap-32 { gap: 32px; }
.text-center { text-align: center; }
.text-forest { color: var(--forest); }
.text-gold   { color: var(--gold);   }
.text-mist   { color: var(--mist);   }
.text-slate  { color: var(--slate);  }
.fw-400 { font-weight: 400; }
.fw-500 { font-weight: 500; }
.italic { font-style: italic; }
.w-full { width: 100%; }
