/* ===========================
   FAMILYHUB — Modern Design
   =========================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --bg:          #0b0c10;
  --surface:     #15161d;
  --surface2:    #1e1f28;
  --border:      rgba(255,255,255,0.08);
  --accent:      #72aa60;
  --accent2:     #547f45;
  --accent-glow: rgba(114,170,96,0.18);
  --gold:        #d4ac4a;
  --text:        #f2efe9;
  --text-muted:  #9a9299;
  --text-subtle: #5e5868;
  --radius:      18px;
  --radius-sm:   12px;
  --shadow:      0 12px 40px rgba(0,0,0,0.5);
  --shadow-sm:   0 4px 20px rgba(0,0,0,0.3);
  --shadow-card: 0 2px 12px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.04);
  --nav-height:  68px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse 90% 50% at 15% -5%, rgba(114,170,96,0.09) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 85% 95%, rgba(82,122,69,0.06) 0%, transparent 55%);
}

h1, h2, h3, h4 { font-family: 'Playfair Display', serif; font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); line-height: 1.2; }
h2 { font-size: clamp(1.2rem, 3vw, 1.7rem); line-height: 1.3; }
h3 { font-size: clamp(1rem, 2.5vw, 1.3rem); line-height: 1.4; }
h4 { font-family: 'DM Sans', sans-serif; font-size: 0.95rem; font-weight: 700; letter-spacing: 0; }

/* Typography scale */
.text-xs    { font-size: 0.72rem; }
.text-sm    { font-size: 0.82rem; }
.text-base  { font-size: 0.92rem; }
.text-lg    { font-size: 1.05rem; }
.text-muted { color: var(--text-muted); }
.text-subtle{ color: var(--text-subtle); }
.font-bold  { font-weight: 700; }
.font-semi  { font-weight: 600; }

.container { max-width: 680px; margin: 0 auto; padding: 28px 16px; }
@media (min-width: 600px) { .container { padding: 32px 24px; } }

/* ── NAVBAR ── */
.navbar {
  position: sticky; top: 0; z-index: 999;
  min-height: var(--nav-height);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap;
  padding: 0 28px;
  background: rgba(11,12,16,0.92);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 1px 0 rgba(114,170,96,0.08), 0 4px 24px rgba(0,0,0,0.3);
}

.navbar .logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem; font-weight: 700;
  color: var(--text); letter-spacing: -0.02em;
  display: flex; align-items: center; gap: 8px;
  padding: 16px 0;
}
.navbar .logo::before {
  content: ''; width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 14px var(--accent), 0 0 28px rgba(114,170,96,0.3); display: inline-block;
  animation: dot-pulse 3s ease-in-out infinite;
}

@keyframes dot-pulse {
  0%, 100% { box-shadow: 0 0 14px var(--accent), 0 0 28px rgba(114,170,96,0.3); }
  50%       { box-shadow: 0 0 20px var(--accent), 0 0 40px rgba(114,170,96,0.5); }
}
.navlinks { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }

.navlinks a {
  color: var(--text-muted); text-decoration: none;
  font-size: 0.875rem; font-weight: 500;
  padding: 12px 14px; min-height: 48px;
  display: flex; align-items: center;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
  position: relative;
}
.navlinks a:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.navlinks a.active-link { color: var(--text) !important; }
.navlinks a.active-link::after {
  content: '';
  position: absolute;
  bottom: 4px; left: 50%; transform: translateX(-50%);
  width: 16px; height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.navlinks .logout {
  color: var(--accent) !important;
  border: 1px solid rgba(106,158,90,0.25);
  margin-left: 8px;
}
.navlinks .logout:hover { background: rgba(106,158,90,0.12) !important; border-color: var(--accent); }

.lang-switch {
  display: flex; align-items: center; gap: 4px;
  padding: 0 4px 0 12px; border-left: 1px solid var(--border); margin-left: 8px;
}
.flag-btn {
  font-size: 1.35rem !important;
  padding: 4px 5px !important;
  border-radius: 6px !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  opacity: 0.45;
  transition: opacity 0.2s, transform 0.15s, background 0.2s !important;
  line-height: 1;
  display: flex; align-items: center;
}
.flag-btn:hover  { opacity: 0.85 !important; background: rgba(255,255,255,0.07) !important; transform: scale(1.1); }
.flag-btn.active { opacity: 1 !important; background: rgba(255,255,255,0.1) !important; }

/* ── HAMBURGER ── */
.hamburger {
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  cursor: pointer; border-radius: 12px;
  border: 1.5px solid rgba(114,170,96,0.4);
  background: rgba(114,170,96,0.12);
  color: var(--accent);
  font-size: 1.2rem;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.hamburger:hover { background: rgba(114,170,96,0.22); transform: scale(1.05); }
.hamburger span { display: block; height: 2px; background: var(--accent); border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }
.hamburger span:nth-child(2) { width: 70%; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── PAGE HEADER ── */
.page-header { padding: 24px 0 16px; margin-bottom: 24px; border-bottom: 1px solid var(--border); }
.page-header h1 {
  background: linear-gradient(135deg, var(--text) 30%, var(--gold) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.page-header p { color: var(--text-muted); font-size: 0.95rem; }

/* ── FEED GRID ── */
.feed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.post {
  background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--border); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.28s cubic-bezier(.25,.46,.45,.94), box-shadow 0.28s, border-color 0.28s;
  cursor: pointer;
  box-shadow: var(--shadow-card);
}
.post:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 0 1px rgba(114,170,96,0.15);
  border-color: rgba(114,170,96,0.22);
}

.post-media { position: relative; overflow: hidden; background: var(--surface2); aspect-ratio: 4/3; }
.post img, .post video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s cubic-bezier(.25,.46,.45,.94); }
.post:hover img { transform: scale(1.04); }
.post-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.1) 40%, transparent 65%); pointer-events: none; }

.post-info { padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.post-author { font-weight: 700; font-size: 0.92rem; color: var(--text); letter-spacing: -0.01em; display: flex; align-items: center; gap: 6px; }
.post-date { font-size: 0.76rem; color: var(--text-subtle); margin-top: 1px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.post-title { font-size: 0.9rem; color: var(--text-muted); margin-top: 6px; line-height: 1.5; }

.post-actions { padding: 14px 16px 12px; }
.post-actions button {
  width: 100%; padding: 14px 16px 12px; border-radius: var(--radius-sm);
  border: 1px solid rgba(239,68,68,0.3); background: transparent;
  color: #f87171; font-family: 'DM Sans', sans-serif; font-size: 0.82rem;
  font-weight: 500; cursor: pointer; transition: background 0.2s, border-color 0.2s;
}
.post-actions button:hover { background: rgba(239,68,68,0.12); border-color: #f87171; }

/* ── CUSTOM FILE INPUT ── */
.file-input-wrapper {
  position: relative;
  margin-bottom: 14px;
}
.file-input-wrapper input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  z-index: 2;
}
.file-input-label {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.file-input-wrapper:hover .file-input-label,
.file-input-wrapper:focus-within .file-input-label {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(106,158,90,0.12);
}
.file-input-btn {
  background: var(--accent);
  color: white;
  padding: 12px 18px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  gap: 7px;
}
.file-input-wrapper:hover .file-input-btn { background: var(--accent2); }
.file-input-text {
  padding: 12px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  color: var(--text-subtle);
  background: var(--surface2);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-input-text.has-files { color: var(--text-muted); }

/* Profile avatar compact variant */
.file-input-label.compact .file-input-btn  { padding: 9px 14px; font-size: 0.82rem; }
.file-input-label.compact .file-input-text { padding: 9px 12px; font-size: 0.82rem; }

/* ── UPLOAD BOX ── */
.upload-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 36px 40px; max-width: 520px; box-shadow: var(--shadow);
}
.upload-box h2 {
  margin-bottom: 28px;
  background: linear-gradient(135deg, var(--text) 0%, var(--gold) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.upload-box input, .upload-box select {
  width: 100%; padding: 12px 16px; margin-bottom: 14px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-family: 'DM Sans', sans-serif; font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s; outline: none; display: block;
}
.upload-box input::placeholder { color: var(--text-subtle); }
.upload-box input:focus, .upload-box select:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(106,158,90,0.12);
}
.upload-box input[type="file"] { padding: 10px 14px; cursor: pointer; color: var(--text-muted); }
.upload-box input[type="file"]::file-selector-button {
  background: var(--accent); color: white; border: none; padding: 6px 14px;
  border-radius: 6px; font-family: 'DM Sans', sans-serif; font-size: 0.82rem;
  font-weight: 500; cursor: pointer; margin-right: 12px; transition: background 0.2s;
}
.upload-box input[type="file"]::file-selector-button:hover { background: var(--accent2); }

.btn-primary {
  width: 100%; padding: 13px; border: none; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: white; font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem; font-weight: 600; cursor: pointer;
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(114,170,96,0.35);
  letter-spacing: 0.01em;
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 8px 28px rgba(114,170,96,0.45); }
.btn-primary:active { transform: translateY(0); opacity: 1; }

/* ── LOGIN / REGISTER ── */
.login-wrapper {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
  background-image: radial-gradient(ellipse 70% 60% at 20% 20%, rgba(106,158,90,0.10) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(82,122,69,0.07) 0%, transparent 60%);
}

.login-container, .register-container {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 24px; padding: 48px 44px; width: 100%; max-width: 420px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(114,170,96,0.08), inset 0 1px 0 rgba(255,255,255,0.06);
  position: relative;
  overflow: hidden;
}
.login-container::before, .register-container::before {
  content: '';
  position: absolute;
  top: -60px; left: -60px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(114,170,96,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.login-brand { text-align: center; margin-bottom: 36px; }
.login-brand .brand-dot {
  width: 18px; height: 18px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #8ec87a, var(--accent));
  box-shadow: 0 0 24px var(--accent), 0 0 48px rgba(114,170,96,0.4);
  margin: 0 auto 20px;
  animation: dot-pulse 3s ease-in-out infinite;
}
.login-brand h1 {
  font-size: 2.1rem;
  background: linear-gradient(135deg, var(--text) 20%, var(--gold) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 8px;
  letter-spacing: -0.03em;
}
.login-brand p { color: var(--text-muted); font-size: 0.88rem; }

.login-container h1, .register-container h1 {
  font-size: 1.8rem;
  background: linear-gradient(135deg, var(--text) 0%, var(--gold) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 28px; text-align: center;
}

.login-container input, .register-container input {
  width: 100%; display: block; padding: 14px 16px; margin-bottom: 12px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm); color: var(--text);
  font-family: 'DM Sans', sans-serif; font-size: 0.92rem;
  outline: none; transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.login-container input::placeholder, .register-container input::placeholder { color: var(--text-subtle); }
.login-container input:focus, .register-container input:focus {
  border-color: var(--accent);
  background: rgba(114,170,96,0.04);
  box-shadow: 0 0 0 4px rgba(114,170,96,0.1);
}

.login-container button, .register-container button {
  width: 100%; padding: 14px; border: none; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: white; font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem; font-weight: 600; cursor: pointer; margin-top: 6px;
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 24px rgba(114,170,96,0.35);
  letter-spacing: 0.01em;
}
.login-container button:hover, .register-container button:hover {
  opacity: 0.9; transform: translateY(-1px);
  box-shadow: 0 8px 30px rgba(114,170,96,0.45);
}

.error-msg {
  background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.25);
  border-radius: var(--radius-sm); color: #f87171;
  padding: 11px 14px; font-size: 0.88rem; margin-bottom: 16px; text-align: center;
}
.login-footer { text-align: center; margin-top: 24px; font-size: 0.84rem; color: var(--text-subtle); }
.login-footer a { color: var(--accent); text-decoration: none; }

/* ── PROFILE ── */
.profile-header {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px 36px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; margin-bottom: 40px; flex-wrap: wrap;
}
.profile-info { display: flex; align-items: center; gap: 20px; }
.profile-avatar {
  width: 80px; height: 80px; min-width: 80px; min-height: 80px;
  border-radius: 50%; overflow: hidden;
  background: var(--surface2); border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.profile-avatar img {
  width: 80px; height: 80px; min-width: 80px;
  object-fit: cover; display: block; border-radius: 50%;
}
.profile-avatar i { color: var(--text-muted); font-size: 2rem; }
.profile-name h1 {
  font-size: 1.6rem;
  background: linear-gradient(135deg, var(--text) 0%, var(--gold) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.profile-name p { color: var(--text-muted); font-size: 0.88rem; margin-top: 4px; }
.profile-header form { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.profile-header input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; z-index: 2;
}
.profile-header button {
  all: unset;
  padding: 10px 20px; background: var(--accent); color: white;
  border-radius: var(--radius-sm); font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem; font-weight: 600; cursor: pointer;
  transition: background 0.18s, transform 0.1s; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 7px;
  box-shadow: 0 4px 16px rgba(106,158,90,0.2);
}
.profile-header button:hover  { background: var(--accent2); }
.profile-header button:active { transform: scale(0.97); }

/* ── TIMELINE FILTER ── */
.timeline-filter { display: flex; align-items: center; gap: 14px; margin-bottom: 32px; flex-wrap: wrap; }
.timeline-filter label { color: var(--text-muted); font-size: 0.88rem; font-weight: 500; }
.timeline-filter select {
  all: unset;
  appearance: none; -webkit-appearance: none;
  background: var(--surface2)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239a9099' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E")
    no-repeat right 12px center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 9px 36px 9px 14px;
  font-family: 'DM Sans', sans-serif; font-size: 0.88rem; font-weight: 500;
  outline: none; cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.timeline-filter select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(106,158,90,0.12);
}
.timeline-filter select option { background: var(--surface2); color: var(--text); }

/* ── LIGHTBOX ── */
.lightbox {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 10000;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.lightbox.active { display: flex; }
.lightbox-content {
  padding: 0; background: transparent; border: none; border-radius: 0;
  width: 100vw; height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.lightbox img {
  max-width: 96vw; max-height: 75vh;
  width: auto; height: auto;
  object-fit: contain; border-radius: 0;
  display: block; margin: auto;
}
.lightbox-info { margin-top: 16px; text-align: center; }
.lightbox-info h3 { color: var(--text); font-size: 1.1rem; }
.lightbox-info p  { color: var(--text-muted); font-size: 0.85rem; margin-top: 4px; }
.lb-close {
  position: fixed; top: 18px; right: 20px; font-size: 28px; line-height: 1;
  color: var(--text-muted); cursor: pointer; background: none; border: none;
  transition: color 0.2s; z-index: 10002; padding: 4px 8px;
}
.lb-close:hover { color: var(--text); }
.lb-download {
  position: fixed; top: 18px; right: 64px; font-size: 18px;
  color: var(--text-muted); cursor: pointer; background: none; border: none;
  transition: color 0.2s; z-index: 10002; padding: 6px 8px;
}
.lb-download:hover { color: var(--text); }
.lb-nav {
  position: fixed; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,0.45); border: 1px solid rgba(255,255,255,0.12);
  color: var(--text-muted); font-size: 18px; cursor: pointer;
  border-radius: 50%; width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, color 0.2s; z-index: 10002;
}
.lb-nav:hover { background: rgba(255,255,255,0.15); color: var(--text); }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }
.lb-counter {
  position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%);
  color: var(--text-muted); font-size: 0.78rem; letter-spacing: 0.06em;
  background: rgba(0,0,0,0.4); padding: 4px 12px; border-radius: 20px;
  z-index: 10002; pointer-events: none;
}
@media (max-width: 480px) {
  .lb-nav { width: 38px; height: 38px; font-size: 15px; }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
}

/* ── MAP ── */
#map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); height: 520px; }

/* ── FOOTER ── */
footer {
  margin-top: 80px; padding: 28px 24px;
  border-top: 1px solid var(--border); text-align: center; color: var(--text-subtle); font-size: 0.8rem;
}

/* ── MOBILE ── */
@media (max-width: 768px) {
  .hamburger { display: flex; }

  .navlinks {
    display: none; flex-direction: column; width: 100%; gap: 4px;
    padding: 12px 0 16px; border-top: 1px solid var(--border);
    background: #13131a;
  }
  @keyframes nav-slide { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }
  .navlinks.open { display: flex; animation: nav-slide 0.2s ease; }
  .navlinks a { padding: 11px 12px; font-size: 0.95rem; }
  .lang-switch { border-left: none; border-top: 1px solid var(--border); margin-left: 0; padding: 12px 4px 0; margin-top: 8px; }
  .flag-btn { font-size: 1.5rem !important; }
  .navlinks .logout { margin-left: 0; margin-top: 4px; }

  .container { padding: 20px 16px; }
  .feed-grid { grid-template-columns: 1fr; gap: 16px; }
  .upload-box { padding: 24px 20px; }
  .profile-header { flex-direction: column; align-items: flex-start; padding: 24px; }
  .login-container, .register-container { padding: 32px 28px; }
  .page-header { padding: 24px 0 0; margin-bottom: 24px; }
}

/* ── LOCATION AUTOCOMPLETE ── */
.location-wrapper {
  position: relative;
  margin-bottom: 14px;
}
.location-wrapper input {
  margin-bottom: 0;
  width: 100%;
  padding-right: 40px;
}
.location-spinner {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}
.location-wrapper.loading .location-spinner { display: block; }
@keyframes spin { to { transform: translateY(-50%) rotate(360deg); } }

.location-clear {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-subtle);
  font-size: 1rem;
  cursor: pointer;
  line-height: 1;
  display: none;
  transition: color 0.2s;
  padding: 2px;
}
.location-clear:hover { color: var(--text); }
.location-wrapper.has-selection .location-clear { display: block; }
.location-wrapper.has-selection input { padding-right: 40px; }

.location-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  z-index: 100;
  overflow: hidden;
  display: none;
}
.location-dropdown.open { display: block; }

.location-option {
  padding: 11px 16px;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.location-option:last-child { border-bottom: none; }
.location-option:hover, .location-option.active { background: rgba(106,158,90,0.12); }

.location-option-icon {
  color: var(--accent);
  font-size: 0.85rem;
  margin-top: 2px;
  flex-shrink: 0;
}
.location-option-name {
  font-size: 0.88rem;
  color: var(--text);
  font-weight: 500;
  line-height: 1.3;
}
.location-option-detail {
  font-size: 0.78rem;
  color: var(--text-subtle);
  margin-top: 2px;
}

.location-status {
  padding: 12px 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

.location-badge {
  display: none;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 7px 12px;
  background: rgba(106,158,90,0.1);
  border: 1px solid rgba(106,158,90,0.3);
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--accent);
}
.location-badge.visible { display: flex; }
.location-badge i { font-size: 0.8rem; }

/* ══════════════════════════════
   LIKES & KOMMENTARE
══════════════════════════════ */
.post-footer {
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Like + Kommentar Aktionsleiste */
.post-actions-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px solid var(--border);
}

/* action-btn → siehe unten mit Touch-Targets */

.action-btn.like-btn.liked {
  color: #e05555;
}
.action-btn.like-btn.liked i { animation: heart-pop 0.3s cubic-bezier(.36,.07,.19,.97); }
@keyframes heart-pop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.35); }
  100% { transform: scale(1); }
}

.action-btn.edit-btn  { color: var(--accent); }
.action-btn.edit-btn:hover  { background: rgba(106,158,90,0.1); }

.action-btn.delete-btn { color: #f87171; margin-left: auto; }
.action-btn.delete-btn:hover { background: rgba(239,68,68,0.1); }

/* Kommentar-Bereich */
.comments-section { display: none; flex-direction: column; gap: 0; }
.comments-section.open { display: flex; }

.comment-list { display: flex; flex-direction: column; gap: 1px; margin-bottom: 8px; }

.comment-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  transition: background 0.15s;
}
.comment-item:hover { background: rgba(255,255,255,0.03); }

.comment-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; color: var(--text-muted); flex-shrink: 0;
  font-family: 'Playfair Display', serif; font-weight: 700;
}
.comment-content { flex: 1; min-width: 0; }
.comment-author {
  font-size: 0.78rem; font-weight: 600; color: var(--text);
  display: inline; margin-right: 6px;
}
.comment-body { font-size: 0.82rem; color: var(--text-muted); display: inline; }
.comment-meta {
  font-size: 0.72rem; color: var(--text-subtle);
  margin-top: 3px; display: flex; align-items: center; gap: 8px;
}
.comment-edit, .comment-delete {
  background: none; border: none; color: var(--text-subtle);
  font-size: 0.72rem; cursor: pointer; padding: 0;
  transition: color 0.2s; display: none;
}
.comment-item:hover .comment-edit,
.comment-item:hover .comment-delete { display: inline; }
.comment-edit:hover { color: var(--accent); }
.comment-delete:hover { color: #f87171; }

/* Kommentar Eingabe */
.comment-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.comment-input-row input {
  flex: 1;
  padding: 9px 13px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.83rem;
  outline: none;
  transition: border-color 0.2s;
}
.comment-input-row input:focus { border-color: var(--accent); }
.comment-input-row input::placeholder { color: var(--text-subtle); }
.comment-send-btn { min-width: 48px; min-height: 48px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  color: white;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.15s;
}
.comment-send-btn:hover { background: var(--accent2); transform: scale(1.08); }

/* ══════════════════════════════
   EDIT MODAL
══════════════════════════════ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  z-index: 5000;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
  animation: modal-in 0.2s ease;
}
@keyframes modal-in {
  from { opacity:0; transform: scale(0.96) translateY(8px); }
  to   { opacity:1; transform: scale(1)    translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.modal-header h2 {
  font-size: 1.2rem;
  background: linear-gradient(135deg, var(--text) 0%, var(--gold) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.modal-close {
  background: none; border: none; color: var(--text-muted);
  font-size: 1.3rem; cursor: pointer; padding: 4px;
  border-radius: 6px; transition: color 0.2s, background 0.2s; line-height: 1;
}
.modal-close:hover { color: var(--text); background: rgba(255,255,255,0.06); }

.modal input[type="text"] {
  width: 100%; padding: 12px 16px; margin-bottom: 14px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-family: 'DM Sans', sans-serif; font-size: 0.9rem;
  outline: none; transition: border-color 0.2s, box-shadow 0.2s; display: block;
}
.modal input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(106,158,90,0.12); }
.modal input::placeholder { color: var(--text-subtle); }

.modal-footer {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}
.modal-footer .btn-primary { flex: 1; padding: 11px; }
.btn-secondary {
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem; font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.btn-secondary:hover { background: rgba(255,255,255,0.05); color: var(--text); }

/* ── LOGIN LANG SWITCH ── */
.login-lang-switch {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  margin-bottom: 20px;
}
.login-lang-switch .flag-btn {
  font-size: 1.4rem !important;
  padding: 5px 6px !important;
  border-radius: 8px;
  opacity: 0.4;
  transition: opacity 0.2s, transform 0.15s, background 0.2s !important;
  text-decoration: none;
  display: inline-flex;
}
.login-lang-switch .flag-btn:hover  { opacity: 0.85 !important; background: rgba(255,255,255,0.07) !important; transform: scale(1.1); }
.login-lang-switch .flag-btn.active { opacity: 1 !important; background: rgba(255,255,255,0.1) !important; }

/* ── CUSTOM FILE INPUT ── */
.file-input-wrapper { position: relative; margin-bottom: 14px; }
.file-input-wrapper input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; margin: 0; padding: 0; z-index: 2; }
.file-input-label { display: flex; align-items: center; gap: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; transition: border-color 0.2s, box-shadow 0.2s; cursor: pointer; }
.file-input-wrapper:hover .file-input-label, .file-input-wrapper:focus-within .file-input-label { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(106,158,90,0.12); }
.file-input-btn { background: var(--accent); color: white; padding: 12px 18px; font-family: 'DM Sans',sans-serif; font-size: 0.85rem; font-weight: 600; white-space: nowrap; flex-shrink: 0; transition: background 0.2s; display: flex; align-items: center; gap: 7px; }
.file-input-wrapper:hover .file-input-btn { background: var(--accent2); }
.file-input-text { padding: 12px 14px; font-family: 'DM Sans',sans-serif; font-size: 0.85rem; color: var(--text-subtle); background: var(--surface2); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-input-text.has-files { color: var(--text-muted); }
.file-input-label.compact .file-input-btn { padding: 9px 14px; font-size: 0.82rem; }
.file-input-label.compact .file-input-text { padding: 9px 12px; font-size: 0.82rem; }

/* ── LOCATION AUTOCOMPLETE ── */
.location-wrapper { position: relative; margin-bottom: 14px; }
.location-wrapper input { margin-bottom: 0; width: 100%; padding-right: 40px; }
.location-spinner { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; display: none; }
.location-wrapper.loading .location-spinner { display: block; }
@keyframes spin { to { transform: translateY(-50%) rotate(360deg); } }
.location-clear { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--text-subtle); font-size: 1rem; cursor: pointer; line-height: 1; display: none; transition: color 0.2s; padding: 2px; }
.location-clear:hover { color: var(--text); }
.location-wrapper.has-selection .location-clear { display: block; }
.location-dropdown { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--accent); border-radius: var(--radius-sm); box-shadow: 0 8px 24px rgba(0,0,0,0.4); z-index: 100; overflow: hidden; display: none; }
.location-dropdown.open { display: block; }
.location-option { padding: 11px 16px; cursor: pointer; display: flex; align-items: flex-start; gap: 10px; border-bottom: 1px solid var(--border); transition: background 0.15s; }
.location-option:last-child { border-bottom: none; }
.location-option:hover, .location-option.active { background: rgba(106,158,90,0.12); }
.location-option-icon { color: var(--accent); font-size: 0.85rem; margin-top: 2px; flex-shrink: 0; }
.location-option-name { font-size: 0.88rem; color: var(--text); font-weight: 500; line-height: 1.3; }
.location-option-detail { font-size: 0.78rem; color: var(--text-subtle); margin-top: 2px; }
.location-status { padding: 12px 16px; font-size: 0.85rem; color: var(--text-muted); text-align: center; }
.location-badge { display: none; align-items: center; gap: 6px; margin-top: 8px; padding: 7px 12px; background: rgba(106,158,90,0.1); border: 1px solid rgba(106,158,90,0.3); border-radius: 8px; font-size: 0.82rem; color: var(--accent); }
.location-badge.visible { display: flex; }

/* ── FLAGGEN ── */
.lang-switch { display: flex; align-items: center; gap: 4px; padding: 0 4px 0 12px; border-left: 1px solid var(--border); margin-left: 8px; }
.flag-btn { font-size: 1.35rem !important; padding: 4px 5px !important; border-radius: 6px !important; text-transform: none !important; letter-spacing: 0 !important; opacity: 0.45; transition: opacity 0.2s, transform 0.15s, background 0.2s !important; line-height: 1; display: flex; align-items: center; }
.flag-btn:hover  { opacity: 0.85 !important; background: rgba(255,255,255,0.07) !important; transform: scale(1.1); }
.flag-btn.active { opacity: 1 !important; background: rgba(255,255,255,0.1) !important; }

/* ── LOGIN LANG SWITCH ── */
.login-lang-switch { display: flex; justify-content: flex-end; gap: 4px; margin-bottom: 20px; }
.login-lang-switch .flag-btn { font-size: 1.4rem !important; padding: 5px 6px !important; border-radius: 8px; opacity: 0.4; transition: opacity 0.2s, transform 0.15s, background 0.2s !important; text-decoration: none; display: inline-flex; }
.login-lang-switch .flag-btn:hover  { opacity: 0.85 !important; background: rgba(255,255,255,0.07) !important; transform: scale(1.1); }
.login-lang-switch .flag-btn.active { opacity: 1 !important; background: rgba(255,255,255,0.1) !important; }

/* ── LIKES & KOMMENTARE ── */
.post-footer { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.post-actions-bar { display: flex; align-items: center; gap: 8px; padding-top: 4px; border-top: 1px solid var(--border); }
.action-btn { display: flex; align-items: center; gap: 6px; background: none; border: none; color: var(--text-muted); font-family: 'DM Sans',sans-serif; font-size: 0.85rem; font-weight: 500; cursor: pointer; padding: 10px 12px; min-height: 48px; border-radius: 10px; transition: background 0.2s, color 0.2s; line-height: 1; }
.action-btn:hover { background: rgba(255,255,255,0.06); color: var(--text); }
.action-btn i { font-size: 0.95rem; }
.action-btn.like-btn.liked { color: #e05555; }
.action-btn.like-btn.liked i { animation: heart-pop 0.3s cubic-bezier(.36,.07,.19,.97); }
@keyframes heart-pop { 0% { transform:scale(1); } 40% { transform:scale(1.35); } 100% { transform:scale(1); } }
.action-btn.edit-btn { color: var(--accent); }
.action-btn.edit-btn:hover { background: rgba(106,158,90,0.1); }
.action-btn.delete-btn { color: #f87171; margin-left: auto; }
.action-btn.delete-btn:hover { background: rgba(239,68,68,0.1); }
.comments-section { display: none; flex-direction: column; gap: 0; }
.comments-section.open { display: flex; }
.comment-list { display: flex; flex-direction: column; gap: 1px; margin-bottom: 8px; }
.comment-item { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border-radius: 8px; transition: background 0.15s; }
.comment-item:hover { background: rgba(255,255,255,0.03); }
.comment-avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--surface2); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 0.65rem; color: var(--text-muted); flex-shrink: 0; font-family: 'Playfair Display',serif; font-weight: 700; }
.comment-content { flex: 1; min-width: 0; }
.comment-author { font-size: 0.78rem; font-weight: 600; color: var(--text); display: inline; margin-right: 6px; }
.comment-body { font-size: 0.82rem; color: var(--text-muted); display: inline; }
.comment-meta { font-size: 0.72rem; color: var(--text-subtle); margin-top: 3px; display: flex; align-items: center; gap: 8px; }
.comment-edit, .comment-delete { background: none; border: none; color: var(--text-subtle); font-size: 0.72rem; cursor: pointer; padding: 0; transition: color 0.2s; display: none; }
.comment-item:hover .comment-edit, .comment-item:hover .comment-delete { display: inline; }
.comment-edit:hover { color: var(--accent); }
.comment-delete:hover { color: #f87171; }
@media (pointer: coarse) {
  .comment-edit, .comment-delete { display: inline; }
}
.comment-input-row { display: flex; gap: 8px; align-items: center; }
.comment-input-row input { flex: 1; padding: 9px 13px; background: var(--surface2); border: 1px solid var(--border); border-radius: 20px; color: var(--text); font-family: 'DM Sans',sans-serif; font-size: 0.83rem; outline: none; transition: border-color 0.2s; }
.comment-input-row input:focus { border-color: var(--accent); }
.comment-input-row input::placeholder { color: var(--text-subtle); }
.comment-send-btn { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); border: none; color: white; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; flex-shrink: 0; transition: background 0.2s, transform 0.15s; }
.comment-send-btn:hover { background: var(--accent2); transform: scale(1.08); }

/* ── EDIT MODAL ── */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.75); backdrop-filter: blur(6px); z-index: 5000; align-items: center; justify-content: center; padding: 24px; }
.modal-overlay.open { display: flex; }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; width: 100%; max-width: 460px; box-shadow: 0 24px 60px rgba(0,0,0,0.5); animation: modal-in 0.2s ease; }
@keyframes modal-in { from { opacity:0; transform:scale(0.96) translateY(8px); } to { opacity:1; transform:scale(1) translateY(0); } }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.modal-header h2 { font-size: 1.2rem; background: linear-gradient(135deg, var(--text) 0%, var(--gold) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 1.3rem; cursor: pointer; padding: 4px; border-radius: 6px; transition: color 0.2s, background 0.2s; line-height: 1; }
.modal-close:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.modal input[type="text"] { width: 100%; padding: 12px 16px; margin-bottom: 14px; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font-family: 'DM Sans',sans-serif; font-size: 0.9rem; outline: none; transition: border-color 0.2s, box-shadow 0.2s; display: block; }
.modal input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(106,158,90,0.12); }
.modal input::placeholder { color: var(--text-subtle); }
.modal-footer { display: flex; gap: 10px; margin-top: 8px; }
.modal-footer .btn-primary { flex: 1; padding: 11px; }
.btn-secondary { padding: 11px 20px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: transparent; color: var(--text-muted); font-family: 'DM Sans',sans-serif; font-size: 0.9rem; font-weight: 500; cursor: pointer; transition: background 0.2s, color 0.2s; }
.btn-secondary:hover { background: rgba(255,255,255,0.05); color: var(--text); }

/* ── MOBILE ERGÄNZUNGEN ── */
@media (max-width: 768px) {
  .lang-switch { border-left: none; border-top: 1px solid var(--border); margin-left: 0; padding: 12px 4px 0; margin-top: 8px; }
  .flag-btn { font-size: 1.5rem !important; }
}

/* ══════════════════════════════
   ADMIN DASHBOARD
══════════════════════════════ */

/* Nav Admin-Link */
.nav-admin {
  color: var(--accent) !important;
  border: 1px solid rgba(106,158,90,0.3);
  border-radius: var(--radius-sm);
}
.nav-admin:hover {
  background: rgba(106,158,90,0.12) !important;
  border-color: var(--accent) !important;
}

/* Statistik-Karten */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}
.stat-card:hover {
  border-color: rgba(106,158,90,0.3);
  transform: translateY(-2px);
}
.stat-icon {
  font-size: 1.6rem;
  color: var(--accent);
  margin-bottom: 12px;
  opacity: 0.85;
}
.stat-value {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

/* Admin Section */
.admin-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.admin-section-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.admin-section-header h2 {
  font-size: 1.1rem;
  color: var(--text);
}

/* Tabelle */
.admin-table-wrap { overflow-x: auto; }
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.admin-table thead th {
  padding: 12px 16px;
  text-align: left;
  color: var(--text-subtle);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.admin-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.admin-table tbody tr:last-child { border-bottom: none; }
.admin-table tbody tr:hover { background: rgba(255,255,255,0.025); }
.admin-table td { padding: 14px 16px; color: var(--text-muted); vertical-align: middle; }

.td-id    { color: var(--text-subtle) !important; font-size: 0.78rem; width: 40px; }
.td-center { text-align: center; }
.td-date  { font-size: 0.8rem; white-space: nowrap; }
.td-email { font-size: 0.82rem; }

/* User Cell */
.user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
  overflow: hidden;
}
.user-avatar-sm img { width: 100%; height: 100%; object-fit: cover; }

/* Role Badge */
.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.role-admin {
  background: rgba(106,158,90,0.15);
  color: var(--accent);
  border: 1px solid rgba(106,158,90,0.3);
}
.role-user {
  background: rgba(255,255,255,0.05);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* Table Action Buttons */
.table-actions { display: flex; gap: 6px; align-items: center; }
.tbl-btn {
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.tbl-edit  { color: var(--accent); }
.tbl-edit:hover  { background: rgba(106,158,90,0.12); border-color: var(--accent); }
.tbl-delete { color: #f87171; }
.tbl-delete:hover { background: rgba(239,68,68,0.12); border-color: #f87171; }

/* Modal Select */
.modal-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 6px;
  margin-top: 4px;
}
.modal-select {
  all: unset;
  display: block;
  width: 100%; box-sizing: border-box;
  padding: 12px 36px 12px 14px;
  margin-bottom: 14px;
  appearance: none; -webkit-appearance: none;
  background: var(--surface2)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239a9099' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E")
    no-repeat right 14px center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.modal-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(106,158,90,0.12); }
.modal-select option { background: var(--surface2); color: var(--text); }

/* Toast → siehe unten */

@media (max-width: 768px) {
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .td-email, .td-date { display: none; }
}

/* ── STORAGE STAT CARD ── */
.stat-card-storage { text-align: left; }
.stat-card-storage .stat-icon,
.stat-card-storage .stat-value,
.stat-card-storage .stat-label { text-align: center; }

.storage-bar-wrap {
  height: 6px;
  background: var(--surface2);
  border-radius: 3px;
  margin: 12px 0 6px;
  overflow: hidden;
}
.storage-bar {
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
  transition: width 0.6s ease;
  max-width: 98vw;
}
.storage-bar[data-pct="100"] { background: #f87171; }
.storage-bar[style*="width:8"] { background: #f59e0b; } /* 80%+ = gelb */
.storage-bar[style*="width:9"] { background: #f87171; } /* 90%+ = rot */

.storage-detail {
  font-size: 0.72rem;
  color: var(--text-subtle);
  text-align: center;
}

/* Speicher-Prozent-Label */
.storage-pct {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: right;
  margin-bottom: 4px;
}

/* ── POST LOCATION ── */
.post-location {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 500;
  margin-top: 2px;
}
.post-location i { font-size: 0.72rem; flex-shrink: 0; }




/* ═══════════════════════════════════════════════════
   UPLOAD PAGE — vollständig custom, alle nativen
   Elemente überschrieben
═══════════════════════════════════════════════════ */

.upload-page { max-width: 460px; margin: 0 auto; }

/* Karte */
.ucard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: visible; /* dropdown muss rausragen */
}
.ucard > * { overflow: visible; }

/* ── FELDER: Titel + Ort ── */
.ucard-fields {
  padding: 22px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-bottom: 1px solid var(--border);
}

/* Jedes Feld-Paar: Icon + Input */
.ufield {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.ufield:last-child { border-bottom: none; padding-bottom: 0; }
.ufield:first-child { padding-top: 0; }

.ufield-icon {
  color: var(--text-subtle);
  font-size: 0.88rem;
  width: 16px;
  flex-shrink: 0;
  text-align: center;
  transition: color 0.2s;
}
.ufield:focus-within .ufield-icon { color: var(--accent); }

/* Das eigentliche Input — komplett nativ-frei */
.ufield input[type="text"],
.ufield-loc-input {
  all: unset !important;
  flex: 1 !important;
  font-family: 'DM Sans', sans-serif !important;
  font-size: 0.9rem !important;
  color: var(--text) !important;
  line-height: 1.5 !important;
  caret-color: var(--accent) !important;
  cursor: text !important;
}
.ufield input[type="text"]::placeholder,
.ufield-loc-input::placeholder {
  color: var(--text-subtle) !important;
}

/* Location-wrapper im ucard: Spinner & Clear neu positionieren */
.ufield .location-wrapper {
  flex: 1;
  position: relative;
  margin-bottom: 0 !important;
}
.ufield .location-wrapper input {
  all: unset !important;
  width: 100% !important;
  box-sizing: border-box !important;
  font-family: 'DM Sans', sans-serif !important;
  font-size: 0.9rem !important;
  color: var(--text) !important;
  caret-color: var(--accent) !important;
  padding-right: 28px !important;
  display: block !important;
}
.ufield .location-wrapper input::placeholder { color: var(--text-subtle) !important; }

.ufield .location-spinner {
  right: 0 !important; top: 50% !important;
  transform: translateY(-50%) !important;
}
.ufield .location-clear {
  right: 0 !important; top: 50% !important;
  transform: translateY(-50%) !important;
}
.ufield .location-badge {
  position: absolute !important;
  top: calc(100% + 6px) !important;
  left: 0 !important; right: 0 !important;
  margin-top: 0 !important;
}
.ufield .location-dropdown {
  top: calc(100% + 36px) !important; /* unterhalb badge */
}

/* ── TABS ── */
.ucard-tabs {
  display: grid;
  grid-template-columns: 1fr;
  border-bottom: 1px solid var(--border);
}
.utab {
  all: unset;
  padding: 13px 10px;
  text-align: center;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-subtle);
  display: flex; align-items: center; justify-content: center; gap: 7px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.18s, border-color 0.18s;
  position: relative;
}

.utab.active { color: var(--text); border-bottom-color: var(--accent); }
.utab:not(.active):hover { color: var(--text-muted); }

/* ── PANELS ── */
.upanel { display: none; }
.upanel.active { display: block; }

/* ── DROP ZONE ── */
.udrop {
  padding: 36px 24px;
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: background 0.2s;
}
.udrop:hover, .udrop.drag-over { background: rgba(106,158,90,0.06); }
.udrop input[type="file"] {
  position: absolute; inset: 0;
  opacity: 0; cursor: pointer;
  width: 100%; height: 100%;
  /* reset all native file input styles */
  all: unset;
  position: absolute; inset: 0;
  opacity: 0; cursor: pointer;
}
.udrop-icon {
  width: 50px; height: 50px;
  background: rgba(106,158,90,0.1);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
  color: var(--accent); font-size: 1.2rem;
  transition: transform 0.2s;
}
.udrop:hover .udrop-icon { transform: translateY(-3px); }
.udrop-title {
  font-size: 0.88rem; font-weight: 600;
  color: var(--text); margin-bottom: 3px;
}
.udrop-sub { font-size: 0.76rem; color: var(--text-subtle); }

/* Thumbnails */
.uthumb-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  border-top: 1px solid var(--border);
}
.uthumb {
  aspect-ratio: 1;
  background: var(--surface2);
  overflow: hidden;
  position: relative;
}
.uthumb img { width:100%; height:100%; object-fit:cover; display:block; }
.uthumb-vid-ic {
  width:100%; height:100%;
  display:flex; align-items:center; justify-content:center;
  color: var(--accent); font-size: 1.3rem;
}
.uthumb-del {
  all: unset;
  position: absolute; top: 4px; right: 4px;
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(0,0,0,0.72); color: #fff;
  font-size: 0.6rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
  transition: background 0.15s;
}
.uthumb-del:hover { background: rgba(220,40,40,0.9); }
.uthumb-count {
  padding: 9px 20px;
  font-size: 0.76rem; color: var(--text-subtle);
  border-top: 1px solid var(--border);
  text-align: right;
}

/* ── KAMERA ── */
.ucam-wrap {
  position: relative;
  aspect-ratio: 4/3;
  background: #000;
  overflow: hidden;
}
.ucam-wrap video,
.ucam-wrap canvas { width:100%; height:100%; object-fit:cover; display:block; }
.ucam-wrap canvas { display:none; }

.ucam-top {
  position: absolute; top: 12px; left: 12px; right: 12px;
  display: flex; justify-content: space-between; align-items: center;
  z-index: 10;
}
.ucam-pill {
  display: flex;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.1);
  overflow: hidden;
}
.ucam-pill-btn {
  all: unset;
  padding: 5px 14px;
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  cursor: pointer; font-family: 'DM Sans', sans-serif;
  transition: background 0.2s, color 0.2s;
}
.ucam-pill-btn.active { background: var(--accent); color: #fff; }

.ucam-flip {
  all: unset;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.45); backdrop-filter: blur(10px);
  color: rgba(255,255,255,0.8); font-size: 0.82rem;
  cursor: pointer; display:flex; align-items:center; justify-content:center;
  transition: background 0.18s;
}
.ucam-flip:hover { background: rgba(255,255,255,0.2); }

.ucam-rec {
  display: none;
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,0.55); backdrop-filter: blur(8px);
  border-radius: 20px; padding: 4px 10px;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em;
  color: #f87171; text-transform: uppercase;
  align-items: center; gap: 5px; z-index: 11;
}
.ucam-rec.on { display: flex; }
.ucam-rec::before {
  content:''; width:7px; height:7px; border-radius:50%;
  background:#f87171; animation: rec-blink 1s infinite;
}
@keyframes rec-blink { 0%,100%{opacity:1}50%{opacity:0} }

.ucam-bottom {
  position: absolute; bottom: 16px;
  left:0; right:0; display:flex; justify-content:center; z-index:10;
}
.ucam-shutter {
  all: unset;
  width: 62px; height: 62px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.15); backdrop-filter: blur(6px);
  cursor: pointer; display:flex; align-items:center; justify-content:center;
  transition: transform 0.12s, background 0.18s;
}
.ucam-shutter:hover  { transform: scale(1.06); background: rgba(255,255,255,0.25); }
.ucam-shutter:active { transform: scale(0.93); }
.ucam-shutter.rec    { background: rgba(220,50,50,0.6); border-color: #f87171;
  animation: shutter-pulse 1.2s infinite; }
@keyframes shutter-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(220,50,50,0.5); }
  50%     { box-shadow: 0 0 0 10px rgba(220,50,50,0); }
}
.ucam-shutter-inner {
  width: 38px; height: 38px; border-radius: 50%; background: #fff;
  transition: border-radius 0.18s, width 0.18s, height 0.18s;
}
.ucam-shutter.rec .ucam-shutter-inner { border-radius: 6px; width:22px; height:22px; }

.ucam-err {
  display:none; flex-direction:column; align-items:center; justify-content:center; gap:8px;
  position:absolute; inset:0; background:#080810; z-index:20;
  color: var(--text-subtle); font-size: 0.82rem; text-align:center; padding:20px;
}
.ucam-err i { font-size: 2rem; margin-bottom:4px; }

/* Vorschau */
.ucam-preview { display:none; flex-direction:column; }
.ucam-preview.on { display:flex; }
.ucam-preview img,
.ucam-preview video {
  width:100%; aspect-ratio:4/3; object-fit:cover; display:block;
}
.ucam-preview-btns {
  display: grid; grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--border);
}
.ucam-preview-btns button {
  all: unset;
  padding: 13px; cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem; font-weight: 600;
  display:flex; align-items:center; justify-content:center; gap:7px;
  transition: background 0.15s;
}
.ucam-retake { background: var(--surface2); color: var(--text-muted); border-right: 1px solid var(--border) !important; }
.ucam-retake:hover { background: var(--surface); }
.ucam-use { background: var(--accent); color:#fff; }
.ucam-use:hover { background: var(--accent2); }

/* ── SUBMIT ── */
.ucard-submit { padding: 16px 22px 22px; }
.ucard-submit button {
  all: unset;
  width: 100%; box-sizing: border-box;
  padding: 13px;
  background: var(--accent); color: #fff;
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem; font-weight: 700;
  letter-spacing: 0.02em; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background 0.18s, transform 0.1s;
  box-shadow: 0 4px 20px rgba(106,158,90,0.25);
}
.ucard-submit button:hover  { background: var(--accent2); }
.ucard-submit button:active { transform: scale(0.98); }

/* Mobile */
@media (max-width: 480px) {
  .ucard { border-radius: var(--radius-sm); }
  .ucard-fields { padding: 18px 16px 14px; }
  .ucard-submit { padding: 14px 16px 18px; }
  .udrop { padding: 28px 16px; }
}

/* ── PROFILE AVATAR UPLOAD — custom file picker ── */
.avatar-upload-area {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.avatar-file-wrap {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.84rem;
  color: var(--text-muted);
  transition: border-color 0.18s, color 0.18s;
  max-width: 220px;
}
.avatar-file-wrap:hover { border-color: rgba(255,255,255,0.2); color: var(--text); }
.avatar-file-wrap.chosen { border-color: var(--accent); color: var(--accent); }
.avatar-file-wrap input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
  width: 100%; height: 100%; z-index: 2;
}
.avatar-file-icon { font-size: 0.82rem; flex-shrink: 0; }
.avatar-file-name {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  flex: 1; min-width: 0;
}

/* ── MODAL INPUTS — alle custom ── */
.modal input[type="text"],
.modal input[type="email"],
.modal input[type="password"] {
  all: unset;
  display: block;
  width: 100%; box-sizing: border-box;
  padding: 12px 14px;
  margin-bottom: 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  caret-color: var(--accent);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.modal input[type="text"]:focus,
.modal input[type="email"]:focus,
.modal input[type="password"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(106,158,90,0.12);
}
.modal input::placeholder { color: var(--text-subtle); }

/* ── BTN-PRIMARY / BTN-SECONDARY — all: unset base ── */
.btn-primary {
  all: unset;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; box-sizing: border-box;
  padding: 13px; border-radius: var(--radius-sm);
  background: var(--accent); color: white;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem; font-weight: 600;
  cursor: pointer; text-align: center;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(106,158,90,0.30);
}
.btn-primary:hover  { background: var(--accent2); transform: translateY(-1px); box-shadow: 0 6px 24px rgba(106,158,90,0.40); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  all: unset;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border) !important;
  background: transparent; color: var(--text-muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem; font-weight: 500;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.btn-secondary:hover { background: rgba(255,255,255,0.05); color: var(--text); }

.modal-footer .btn-primary { flex: 1; padding: 11px; }

/* ── TIMELINE FILTER — custom wrapper ── */
.timeline-filter-label {
  font-size: 0.82rem; font-weight: 600;
  color: var(--text-subtle);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.tfilter-select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.tfilter-icon {
  position: absolute; left: 12px;
  color: var(--text-subtle); font-size: 0.82rem;
  pointer-events: none; z-index: 1;
}
.tfilter-select-wrap select {
  all: unset;
  appearance: none; -webkit-appearance: none;
  background: var(--surface2)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%239a9099' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E")
    no-repeat right 12px center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 9px 34px 9px 32px;
  font-family: 'DM Sans', sans-serif; font-size: 0.88rem; font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.tfilter-select-wrap select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(106,158,90,0.12);
}
.tfilter-select-wrap select option { background: var(--surface2); color: var(--text); }

/* ── APPROVED BADGE ── */
.approved-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 20px;
  font-size: 0.75rem; font-weight: 600;
  white-space: nowrap;
}
.approved-badge.approved {
  background: rgba(106,158,90,0.12);
  border: 1px solid rgba(106,158,90,0.3);
  color: var(--accent);
}
.approved-badge.pending {
  background: rgba(212,172,74,0.1);
  border: 1px solid rgba(212,172,74,0.3);
  color: var(--gold);
}

/* ── PENDING BANNER ── */
.pending-banner {
  display: flex; align-items: center; gap: 10px;
  background: rgba(212,172,74,0.08);
  border: 1px solid rgba(212,172,74,0.25);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  font-size: 0.88rem;
  color: var(--gold);
  margin-bottom: 24px;
}
.pending-banner i { font-size: 0.9rem; }
.pending-link {
  margin-left: auto; color: var(--gold);
  text-decoration: none; font-weight: 600;
  transition: opacity 0.2s;
}
.pending-link:hover { opacity: 0.75; }

/* ── APPROVE BUTTON ── */
.tbl-btn.tbl-approve {
  color: var(--accent);
  border-color: rgba(106,158,90,0.25);
}
.tbl-btn.tbl-approve:hover {
  background: rgba(106,158,90,0.12);
  color: var(--accent);
}

/* ── PWA INSTALL BANNER ── */
.pwa-banner {
  position: fixed;
  bottom: 20px; left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px); max-width: 480px;
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 9999;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 0 1px rgba(106,158,90,0.15);
  animation: pwa-slide-up 0.35s ease;
}
@keyframes pwa-slide-up {
  from { opacity:0; transform: translateX(-50%) translateY(20px); }
  to   { opacity:1; transform: translateX(-50%) translateY(0); }
}
.pwa-banner-icon {
  width: 42px; height: 42px;
  background: rgba(106,158,90,0.15);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: var(--accent);
  flex-shrink: 0;
}
.pwa-banner-text {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.pwa-banner-text strong { font-size: 0.88rem; color: var(--text); font-weight: 600; }
.pwa-banner-text span   { font-size: 0.76rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pwa-banner-btn {
  all: unset;
  padding: 8px 14px;
  background: var(--accent); color: white;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  transition: background 0.18s; flex-shrink: 0;
}
.pwa-banner-btn:hover { background: var(--accent2); }
.pwa-banner-close {
  all: unset; color: var(--text-subtle); cursor: pointer;
  padding: 4px; border-radius: 6px; font-size: 0.9rem; flex-shrink: 0;
  transition: color 0.15s;
}
.pwa-banner-close:hover { color: var(--text); }

/* ── PWA iOS MODAL ── */
.pwa-ios-modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(6px);
  z-index: 10000;
  display: flex; align-items: flex-end; justify-content: center;
  padding: 16px;
}
.pwa-ios-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px 24px 32px;
  width: 100%; max-width: 380px;
  position: relative;
  animation: pwa-slide-up 0.3s ease;
  text-align: center;
}
.pwa-ios-close {
  all: unset; position: absolute; top: 14px; right: 16px;
  color: var(--text-muted); cursor: pointer; font-size: 1.1rem;
  transition: color 0.15s;
}
.pwa-ios-close:hover { color: var(--text); }
.pwa-ios-icon { margin-bottom: 12px; }
.pwa-ios-icon img { width: 64px; height: 64px; border-radius: 14px; }
.pwa-ios-box h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem; color: var(--text); margin-bottom: 8px;
}
.pwa-ios-box > p { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 20px; }
.pwa-ios-steps {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 12px; text-align: left;
}
.pwa-ios-steps li {
  display: flex; align-items: center; gap: 12px;
  font-size: 0.88rem; color: var(--text-muted);
  background: var(--surface2); border-radius: 10px; padding: 10px 14px;
}
.pwa-ios-steps li i {
  color: var(--accent); width: 18px; text-align: center; flex-shrink: 0;
}
.pwa-ios-steps li strong { color: var(--text); }

/* ══════════════════════════════════════════
   ALBEN
══════════════════════════════════════════ */
.albums-toolbar { display: flex; justify-content: flex-end; margin-bottom: 24px; }

.albums-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.album-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  text-decoration: none; color: inherit;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.album-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: rgba(106,158,90,0.25); }

.album-cover { aspect-ratio: 4/3; background: var(--surface2); overflow: hidden; }
.album-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.album-card:hover .album-cover img { transform: scale(1.05); }
.album-cover-empty { width:100%; height:100%; display:flex; align-items:center; justify-content:center; font-size:2.5rem; color:var(--text-subtle); }

.album-info { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.album-name { font-weight: 700; font-size: 0.95rem; color: var(--text); }
.album-meta { font-size: 0.75rem; color: var(--text-subtle); }
.album-desc { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Album-Detailseite */
.album-page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.album-page-header h1 { margin-top: 8px; }
.album-header-actions { display: flex; gap: 10px; align-items: center; flex-shrink: 0; padding-top: 8px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text-subtle); font-size: 0.82rem; text-decoration: none; margin-bottom: 6px; }
.back-link:hover { color: var(--accent); }

.btn-danger {
  all: unset; cursor: pointer; padding: 9px 14px; border-radius: var(--radius-sm);
  background: rgba(239,68,68,0.1); color: #f87171; border: 1px solid rgba(239,68,68,0.2);
  font-size: 0.85rem; transition: background 0.2s;
}
.btn-danger:hover { background: rgba(239,68,68,0.2); }

/* Posts zum Album hinzufügen Modal */
.modal-wide { max-width: 700px !important; width: 95vw !important; }
.add-posts-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px; max-height: 55vh; overflow-y: auto; padding: 4px;
}
.add-post-item {
  position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden;
  cursor: pointer; border: 2px solid transparent; transition: border-color 0.15s;
  background: var(--surface2);
}
.add-post-item img { width:100%; height:100%; object-fit:cover; }
.add-post-vid { width:100%; height:100%; display:flex; align-items:center; justify-content:center; color:var(--text-subtle); font-size:1.4rem; }
.add-post-check {
  position: absolute; inset: 0; background: rgba(106,158,90,0.6);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.4rem; opacity: 0; transition: opacity 0.15s;
}
.add-post-item.in-album { border-color: var(--accent); }
.add-post-item.in-album .add-post-check { opacity: 1; }

/* ══════════════════════════════════════════
   SUCHE
══════════════════════════════════════════ */
.nav-search-btn {
  color: var(--text-muted); font-size: 1.05rem; padding: 6px 10px;
  text-decoration: none; transition: color 0.2s; display: flex; align-items: center;
}
.nav-search-btn:hover { color: var(--accent); }

.search-form { display: flex; gap: 10px; margin-bottom: 28px; }
.search-input-wrap {
  flex: 1; position: relative; display: flex; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 0 14px; transition: border-color 0.2s;
}
.search-input-wrap:focus-within { border-color: var(--accent); }
.search-icon { color: var(--text-subtle); font-size: 0.9rem; flex-shrink: 0; margin-right: 10px; }
.search-input-wrap input {
  flex: 1; all: unset; padding: 13px 0; font-size: 0.95rem; color: var(--text);
  font-family: 'DM Sans', sans-serif;
}
.search-input-wrap input::placeholder { color: var(--text-subtle); }
.search-clear { color: var(--text-subtle); text-decoration: none; padding: 4px; font-size: 0.9rem; }
.search-clear:hover { color: var(--text); }

.search-results-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--border);
  font-size: 0.88rem; color: var(--text-muted);
}
.search-count { font-size: 0.78rem; color: var(--text-subtle); }
mark { background: rgba(106,158,90,0.25); color: var(--text); border-radius: 2px; padding: 0 2px; }

/* ══════════════════════════════════════════
   PUSH BUTTON
══════════════════════════════════════════ */
.push-toggle-btn {
  all: unset; cursor: pointer;
  display: flex; align-items: center; gap: 7px; justify-content: center;
  margin: 14px auto 0; padding: 9px 20px;
  border: 1px solid var(--border); border-radius: 20px;
  font-size: 0.78rem; font-family: 'DM Sans', sans-serif;
  color: var(--text-subtle); transition: all 0.2s;
}
.push-toggle-btn:hover { border-color: var(--accent); color: var(--accent); }
.push-toggle-btn.push-active { border-color: var(--accent); color: var(--accent); }
.push-toggle-btn.push-denied { opacity: 0.4; cursor: default; }

/* ══════════════════════════════════════════
   MODAL open-Klasse (ergänzend)
══════════════════════════════════════════ */
.modal-overlay.open { display: flex; }

/* ══════════════════════════════════════════
   ERINNERUNGEN
══════════════════════════════════════════ */
.memories-section {
  margin-bottom: 32px;
  background: linear-gradient(135deg, rgba(106,158,90,0.06) 0%, rgba(106,158,90,0.02) 100%);
  border: 1px solid rgba(106,158,90,0.18);
  border-radius: var(--radius);
  padding: 20px 20px 16px;
}

.memories-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px; flex-wrap: wrap;
}
.memories-header > i {
  color: var(--accent); font-size: 1rem; flex-shrink: 0;
}
.memories-header > span:first-of-type {
  font-weight: 700; font-size: 0.95rem; color: var(--text);
}
.memories-sub {
  font-size: 0.78rem; color: var(--text-subtle); margin-left: 2px;
}

.memories-scroll {
  display: flex; gap: 14px;
  overflow-x: auto; padding-bottom: 8px;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.memories-scroll::-webkit-scrollbar { height: 4px; }
.memories-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.memory-card {
  flex: 0 0 160px; cursor: pointer;
  border-radius: var(--radius-sm); overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}
.memory-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.memory-media { aspect-ratio: 3/4; overflow: hidden; background: var(--surface2); }
.memory-media img,
.memory-media video { width:100%; height:100%; object-fit:cover; display:block; transition: transform 0.4s; }
.memory-card:hover .memory-media img { transform: scale(1.05); }

.memory-label {
  padding: 10px 11px 11px;
  display: flex; flex-direction: column; gap: 3px;
}
.memory-years {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--accent);
}
.memory-title {
  font-size: 0.82rem; color: var(--text); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.memory-author { font-size: 0.72rem; color: var(--text-subtle); }

@media (max-width: 480px) {
  .memory-card { flex: 0 0 130px; }
}

/* ══════════════════════════════════════════
   ÖFFENTLICHES NUTZERPROFIL
══════════════════════════════════════════ */
.uprofile-header {
  display: flex; align-items: center; gap: 24px;
  padding: 28px 0 32px; border-bottom: 1px solid var(--border); margin-bottom: 28px;
}

.uprofile-avatar {
  width: 88px; height: 88px; border-radius: 50%;
  overflow: hidden; flex-shrink: 0;
  background: var(--surface2); border: 2px solid var(--border);
}
.uprofile-avatar img { width:100%; height:100%; object-fit:cover; }
.uprofile-avatar-placeholder {
  width:100%; height:100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; font-weight: 700; color: var(--accent);
  background: linear-gradient(135deg, rgba(106,158,90,0.15), rgba(106,158,90,0.05));
}

.uprofile-name {
  font-size: 1.4rem; font-weight: 800; color: var(--text); margin-bottom: 10px;
}

.uprofile-stats { display: flex; gap: 24px; }
.uprofile-stat  { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.uprofile-stat-val { font-size: 1.2rem; font-weight: 700; color: var(--text); }
.uprofile-stat-lbl { font-size: 0.72rem; color: var(--text-subtle); text-transform: uppercase; letter-spacing: 0.05em; }

/* Autorenname als Link im Feed */
a.post-author {
  text-decoration: none; color: var(--text);
  font-weight: 600; font-size: 0.9rem;
  transition: color 0.15s;
}
a.post-author:hover { color: var(--accent); }

@media (max-width: 480px) {
  .uprofile-header { gap: 16px; padding: 20px 0 24px; }
  .uprofile-avatar { width: 70px; height: 70px; }
  .uprofile-name   { font-size: 1.15rem; }
}

/* ══════════════════════════════════════════
   GEBURTSTAGS-BANNER
══════════════════════════════════════════ */
.birthday-banner {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(135deg, rgba(251,191,36,0.12), rgba(251,191,36,0.04));
  border: 1px solid rgba(251,191,36,0.3);
  border-radius: var(--radius); padding: 16px 20px; margin-bottom: 24px;
  animation: bday-pulse 2s ease-in-out infinite;
}
@keyframes bday-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(251,191,36,0); }
  50%      { box-shadow: 0 0 0 6px rgba(251,191,36,0.08); }
}
.birthday-banner-icon { font-size: 1.8rem; flex-shrink: 0; }
.birthday-banner-text { display: flex; flex-direction: column; gap: 2px; }
.birthday-banner-text span { font-size: 0.95rem; font-weight: 600; color: var(--text); }

/* ══════════════════════════════════════════
   GEBURTSTAGS-LISTE
══════════════════════════════════════════ */
.bday-list { display: flex; flex-direction: column; gap: 10px; }
.bday-item {
  display: flex; align-items: center; gap: 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 16px;
  transition: border-color 0.2s;
}
.bday-item.bday-today {
  border-color: rgba(251,191,36,0.4);
  background: linear-gradient(135deg, rgba(251,191,36,0.07), transparent);
}
.bday-date-badge {
  display: flex; flex-direction: column; align-items: center;
  background: var(--surface2); border-radius: 8px; padding: 8px 12px;
  min-width: 48px; flex-shrink: 0;
}
.bday-today .bday-date-badge { background: rgba(251,191,36,0.15); }
.bday-day   { font-size: 1.2rem; font-weight: 800; color: var(--text); line-height: 1; }
.bday-month { font-size: 0.65rem; text-transform: uppercase; color: var(--text-subtle); letter-spacing: 0.06em; }
.bday-info  { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.bday-name  { font-weight: 700; color: var(--text); font-size: 0.95rem; }
.bday-today-badge {
  display: inline-block; background: rgba(251,191,36,0.2); color: #f59e0b;
  font-size: 0.7rem; padding: 2px 8px; border-radius: 20px; margin-left: 8px;
  font-weight: 700; vertical-align: middle;
}
.bday-meta      { font-size: 0.78rem; color: var(--text-muted); }
.bday-countdown { font-size: 0.72rem; color: var(--accent); font-weight: 600; }
.bday-delete {
  all: unset; cursor: pointer; color: var(--text-subtle); padding: 6px;
  border-radius: 6px; transition: color 0.15s, background 0.15s; flex-shrink: 0;
}
.bday-delete:hover { color: #f87171; background: rgba(239,68,68,0.1); }

/* ══════════════════════════════════════════
   VIDEO THUMBNAIL
══════════════════════════════════════════ */
.video-thumb-wrap {
  position: relative; width: 100%; height: 100%;
  cursor: pointer; display: block;
}
.video-thumb-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-play-btn {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.3); transition: background 0.2s;
}
.video-play-btn i {
  font-size: 2.2rem; color: #fff;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
  transition: transform 0.2s;
}
.video-thumb-wrap:hover .video-play-btn { background: rgba(0,0,0,0.45); }
.video-thumb-wrap:hover .video-play-btn i { transform: scale(1.1); }

/* ══════════════════════════════════════════
   ALBUM DROPDOWN IM FEED
══════════════════════════════════════════ */
.post-album-wrap { position: relative; }
.album-drop {
  display: none; position: absolute; bottom: calc(100% + 6px); left: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); min-width: 180px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3); z-index: 200;
  overflow: hidden;
}
.album-drop.open { display: block; }
.album-drop-item {
  padding: 10px 14px; font-size: 0.85rem; color: var(--text-muted);
  cursor: pointer; transition: background 0.15s, color 0.15s;
  display: flex; align-items: center; gap: 8px; white-space: nowrap;
}
.album-drop-item:hover { background: var(--surface2); color: var(--text); }
.album-drop-item.in-album { color: var(--accent); }
.album-drop-item.in-album i::before { content: "\f058"; }

/* ══════════════════════════════════════════
   LAZY KOMMENTARE
══════════════════════════════════════════ */
.comments-show-all-btn {
  all: unset; cursor: pointer; display: block; width: 100%;
  text-align: center; padding: 7px; font-size: 0.78rem;
  color: var(--text-subtle); border-top: 1px solid var(--border);
  transition: color 0.15s, background 0.15s;
}
.comments-show-all-btn:hover { color: var(--accent); background: var(--surface2); }
.comments-show-all-btn i { margin-right: 5px; }

/* ══════════════════════════════════════════
   HEIC WARNUNG
══════════════════════════════════════════ */
.heic-warning {
  display: flex; align-items: center; gap: 10px;
  background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.3);
  border-radius: var(--radius-sm); padding: 10px 14px;
  font-size: 0.82rem; color: #f59e0b; margin-top: 8px;
}
.heic-warning i { flex-shrink: 0; }

/* ══════════════════════════════════════════
   KARTEN CLUSTER
══════════════════════════════════════════ */
.map-cluster {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent); border: 3px solid rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 12px rgba(106,158,90,0.4);
}
.map-cluster span { color: #fff; font-weight: 700; font-size: 0.85rem; }
.map-popup { min-width: 160px; }
.map-popup img {
  width: 100%; max-height: 130px; object-fit: cover;
  border-radius: 6px; margin-bottom: 8px; cursor: pointer; display: block;
}
.map-popup-info { display: flex; flex-direction: column; gap: 3px; }
.map-popup-info strong { font-size: 0.88rem; color: #111; }
.map-popup-info span   { font-size: 0.75rem; color: #666; }

/* ══════════════════════════════════════════
   GESICHTSERKENNUNG
══════════════════════════════════════════ */

/* ── Face Tags im Feed ── */
.post-faces {
  display: flex; flex-wrap: wrap; gap: 5px;
  padding: 4px 0 2px;
}
.face-tag {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(106,158,90,0.1); color: var(--accent);
  border: 1px solid rgba(106,158,90,0.2);
  border-radius: 20px; padding: 3px 10px;
  font-size: 0.73rem; font-weight: 600;
  text-decoration: none; transition: background 0.15s;
  cursor: pointer;
}
.face-tag:hover { background: rgba(106,158,90,0.2); }
.face-tag-unknown {
  background: rgba(156,163,175,0.08);
  color: var(--text-subtle);
  border-color: rgba(156,163,175,0.15);
}
.face-tag-unknown:hover { background: rgba(156,163,175,0.15); color: var(--text); }

/* page-header → siehe oben */

/* ── Toolbar ── */
.faces-toolbar {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 24px;
}
.faces-tool-btn {
  all: unset; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  font-weight: 600; font-size: 0.83rem;
  padding: 9px 16px; border-radius: var(--radius-sm);
  transition: background 0.15s, transform 0.1s;
}
.faces-tool-btn:active { transform: scale(0.97); }
.faces-tool-btn:not(.secondary) {
  background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff;
  box-shadow: 0 4px 16px rgba(114,170,96,0.3);
}
.faces-tool-btn:not(.secondary):hover { opacity: 0.9; }
.faces-tool-btn.secondary {
  background: var(--surface2); color: var(--text);
  border: 1px solid var(--border);
}
.faces-tool-btn.secondary:hover { background: var(--surface); border-color: var(--accent); color: var(--accent); }

/* ── Section Titles ── */
.faces-section { margin-bottom: 32px; }
.faces-section-title {
  font-size: 0.88rem; font-weight: 700; color: var(--text);
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.faces-section-title i { color: var(--accent); }

/* ── Bekannte Personen Grid ── */
.persons-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (min-width: 600px) {
  .persons-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  .persons-grid { grid-template-columns: repeat(4, 1fr); }
}
.person-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
  box-shadow: var(--shadow-card);
}
.person-card:hover {
  border-color: rgba(114,170,96,0.35);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.4), 0 0 0 1px rgba(114,170,96,0.12);
}
.person-preview {
  height: 140px; overflow: hidden; background: var(--surface2);
  position: relative;
}
.person-preview::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 40px;
  background: linear-gradient(to top, rgba(21,22,29,0.7), transparent);
  pointer-events: none;
}
.person-preview img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
  display: block;
}
.person-preview-empty {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-subtle); font-size: 1.8rem;
}
.person-info {
  padding: 8px 10px 4px;
}
.person-name  { font-weight: 700; font-size: 0.83rem; color: var(--text); display: block; }
.person-count { font-size: 0.7rem; color: var(--text-subtle); margin-top: 1px; display: block; }
.person-actions {
  display: flex; gap: 2px; padding: 5px 6px 7px;
  border-top: 1px solid var(--border);
}
.person-btn {
  all: unset; cursor: pointer; flex: 1; text-align: center;
  padding: 5px 2px; border-radius: 6px;
  font-size: 0.78rem; color: var(--text-subtle);
  transition: background 0.15s, color 0.15s;
}
.person-btn:hover { background: var(--surface2); color: var(--text); }
.person-btn.danger:hover { background: rgba(239,68,68,0.1); color: #f87171; }

/* ── Unbekannte Gesichter Grid ── */
.unknown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
@media (max-width: 480px) {
  .unknown-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}
.unknown-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden;
  transition: border-color 0.2s;
}
.unknown-card:hover { border-color: rgba(106,158,90,0.25); }
.unknown-img-wrap {
  position: relative; height: 150px;
  background: var(--surface2); cursor: pointer; overflow: hidden;
}
@media (max-width: 480px) {
  .unknown-img-wrap { height: 130px; }
}
.unknown-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
  display: block; transition: transform 0.2s;
}
.unknown-img-wrap:hover img { transform: scale(1.04); }
.unknown-badge {
  position: absolute; top: 7px; right: 7px;
  background: rgba(0,0,0,0.6); color: #fff;
  border-radius: 50%; width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; backdrop-filter: blur(4px);
}

/* ── Input Row ── */
.unknown-name-row {
  display: flex; gap: 5px; padding: 7px;
}
.face-name-input {
  flex: 1; all: unset;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 0.8rem; color: var(--text);
  font-family: 'DM Sans', sans-serif;
  transition: border-color 0.15s;
  min-width: 0; box-sizing: border-box;
}
.face-name-input::placeholder { color: var(--text-subtle); }
.face-name-input:focus { border-color: var(--accent); outline: none; }
.face-save-btn {
  all: unset; cursor: pointer;
  background: var(--accent); color: #fff;
  border-radius: 8px; padding: 7px 11px;
  font-size: 0.8rem; flex-shrink: 0;
  display: flex; align-items: center;
  transition: background 0.15s, transform 0.1s;
  box-shadow: 0 2px 8px rgba(106,158,90,0.25);
}
.face-save-btn:hover  { background: var(--accent2); }
.face-save-btn:active { transform: scale(0.95); }

/* ── Autocomplete Suggestions ── */
.face-autocomplete-wrap { position: relative; z-index: 10; }
.face-suggestions {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--surface); border: 1.5px solid var(--accent);
    border-radius: 8px; box-shadow: 0 6px 24px rgba(0,0,0,0.25);
    z-index: 99999; max-height: 220px; overflow-y: auto; margin-top: 4px;
}
.sugg-item {
    padding: 10px 14px; cursor: pointer; font-size: 0.85rem; color: var(--text);
    transition: background 0.15s; border-bottom: 1px solid var(--border);
}
.sugg-item:last-child { border-bottom: none; }
.sugg-item:hover, .sugg-item.active {
    background: rgba(106,158,90,0.15); color: var(--text);
}
.sugg-item strong { color: var(--accent); font-weight: 700; }

/* ── Empty State ── */
.empty-state {
  text-align: center; padding: 40px 20px;
  color: var(--text-subtle); font-size: 0.9rem;
}
.empty-state i { font-size: 2.5rem; display: block; margin-bottom: 12px; }

/* ── Modal ── */
.modal-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  width: 90%; max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.modal-box h3 {
  font-size: 1rem; font-weight: 700; color: var(--text);
  margin-bottom: 8px;
}
.modal-input {
  all: unset; display: block; width: 100%; box-sizing: border-box;
  background: var(--surface2); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 14px;
  font-size: 0.9rem; color: var(--text);
  font-family: 'DM Sans', sans-serif; margin-bottom: 14px;
  transition: border-color 0.15s;
}
.modal-input:focus { border-color: var(--accent); outline: none; }
.modal-input::placeholder { color: var(--text-subtle); }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; }
.modal-btn {
  all: unset; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; font-size: 0.83rem;
  padding: 9px 18px; border-radius: var(--radius-sm);
  transition: background 0.15s, transform 0.1s;
}
.modal-btn:active { transform: scale(0.97); }
.modal-btn.primary {
  background: var(--accent); color: #fff;
  box-shadow: 0 4px 16px rgba(106,158,90,0.25);
}
.modal-btn.primary:hover  { background: var(--accent2); }
.modal-btn.secondary {
  background: var(--surface2); color: var(--text);
  border: 1px solid var(--border);
}
.modal-btn.secondary:hover { border-color: var(--accent); color: var(--accent); }

/* ── Unscanned foto inline scan ── */
.unscanned-card {
  cursor: pointer;
}
.unscanned-badge {
  background: rgba(59,130,246,0.7) !important;
}
.unscanned-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.55); color: #fff;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 5px; font-size: 1rem; font-weight: 600;
  opacity: 0; transition: opacity 0.15s;
}
.unscanned-overlay span { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.05em; }
.unscanned-card:hover .unscanned-overlay { opacity: 1; }

/* ── Subsection labels ── */
.faces-subsection-label {
  font-size: 0.8rem; font-weight: 600;
  color: var(--text-subtle); margin-bottom: 10px;
  display: flex; align-items: center; gap: 7px;
}
.faces-subsection-label i { color: var(--accent); }

/* ── Todo badge ── */
.faces-todo-badge {
  background: var(--accent); color: #fff;
  border-radius: 20px; padding: 1px 8px;
  font-size: 0.72rem; font-weight: 700;
}

/* ── Scan All Progress Bar ── */
.scan-progress-bar-wrap {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px 18px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
}
.scan-progress-info {
  display: flex; justify-content: space-between;
  font-size: 0.83rem; margin-bottom: 10px; color: var(--text);
}
.scan-progress-track {
  height: 6px; background: var(--surface2);
  border-radius: 99px; overflow: hidden;
}
.scan-progress-fill {
  height: 100%; background: linear-gradient(90deg, var(--accent), #8ec87a);
  border-radius: 99px;
  transition: width 0.4s ease;
  width: 0%;
  box-shadow: 0 0 8px rgba(114,170,96,0.5);
}

/* ── Scan All Badge ── */
.scan-all-badge {
  background: rgba(255,255,255,0.2);
  border-radius: 20px; padding: 1px 7px;
  font-size: 0.72rem; font-weight: 700;
}

/* ── Unscanned overlay always visible during scan ── */
.unscanned-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.55); color: #fff;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 5px; font-size: 1rem; font-weight: 600;
  opacity: 0; transition: opacity 0.2s;
  pointer-events: none;
}
.unscanned-overlay span { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; }
.unscanned-card .unknown-img-wrap:hover .unscanned-overlay { opacity: 1; }
.face-tag-more {
  background: rgba(100,116,139,0.1); color: var(--text-subtle);
  border: 1px solid rgba(100,116,139,0.2);
  border-radius: 20px; padding: 3px 10px;
  font-size: 0.73rem; font-weight: 600;
}


/* ── Rotate Buttons ── */
.rotate-btn { color: var(--text-subtle); }
.rotate-btn:hover { background: rgba(106,158,90,0.1); color: var(--accent); }

/* ── Face tag more badge ── */
.face-tag-more {
  background: rgba(100,116,139,0.1); color: var(--text-subtle);
  border: 1px solid rgba(100,116,139,0.2);
  border-radius: 20px; padding: 3px 10px;
  font-size: 0.73rem; font-weight: 600;
}

/* ── Unknown Posts Feed Layout ── */
.unknown-posts-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.unknown-post-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex; flex-direction: column;
  overflow: visible;
}
.unknown-post-img {
  position: relative; cursor: pointer;
  width: 100%;
  overflow: hidden; background: var(--surface2);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.unknown-post-img img {
  width: 100%; max-height: 280px; object-fit: cover;
  transition: transform 0.3s; display: block;
}
.unknown-post-img:hover img { transform: scale(1.03); }
.unknown-post-badge {
  position: absolute; bottom: 8px; left: 8px;
  background: rgba(0,0,0,0.75); color: #fff;
  border-radius: 20px; padding: 4px 10px;
  font-size: 0.72rem; font-weight: 600;
  backdrop-filter: blur(4px);
}
.unknown-post-faces {
  padding: 12px 14px; display: flex; flex-direction: column;
  gap: 8px; position: relative;
}
.unknown-face-row {
  display: flex; align-items: center; gap: 8px;
  position: relative;
}

/* ── Face Boxes on Photos ── */
.face-box {
  position: absolute;
  border: 2px solid rgba(114,170,96,0.85);
  border-radius: 5px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.3), inset 0 0 0 1px rgba(255,255,255,0.05);
}
.face-box:hover, .face-box.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(114,170,96,0.3), 0 0 12px rgba(114,170,96,0.2);
}
.face-box-num {
  position: absolute;
  top: -10px; left: 2px;
  background: var(--accent);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  line-height: 1.4;
}

/* ── Toast Notifications ── */
#toast-container {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%);
  z-index: 99999; display: flex;
  flex-direction: column; gap: 8px;
  align-items: center; pointer-events: none;
}
.toast {
  background: rgba(21,22,29,0.96); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 28px; padding: 11px 22px;
  font-size: 0.85rem; font-weight: 600; color: var(--text);
  font-family: 'DM Sans', sans-serif;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04);
  backdrop-filter: blur(20px);
  animation: toast-in 0.35s cubic-bezier(0.34,1.56,0.64,1);
  pointer-events: auto;
  display: flex; align-items: center; gap: 8px;
}
.toast.success { border-color: var(--accent); color: var(--accent); }
.toast.error   { border-color: #f87171; color: #f87171; }
.toast.out { animation: toast-out 0.25s ease forwards; }
@keyframes toast-in  { from { opacity:0; transform:translateY(16px) scale(0.95); } to { opacity:1; transform:none; } }
@keyframes toast-out { to   { opacity:0; transform:translateY(8px) scale(0.95); } }
