:root {
  --bg: #0c0f14;
  --bg-elevated: #141a24;
  --card: #1a2230;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8edf5;
  --text-muted: #8b9bb5;
  --accent: #c41e3a;
  --accent-soft: rgba(196, 30, 58, 0.15);
  --accent-hover: #e02545;
  --gold: #d4a853;
  --success: #2dd4a0;
  --danger: #f87171;
  --radius: 12px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --sidebar-w: 260px;
  --font: "Outfit", system-ui, sans-serif;
  --font-display: "Noto Serif", Georgia, serif;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-color: var(--bg);
  background-image: var(--bg-image, none);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

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

.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #a01830 0%, var(--accent) 40%, #8b1530 100%);
  border-right: 2px solid rgba(255, 255, 255, 0.2);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  height: 100dvh;
  z-index: 100;
  transition: transform 0.25s ease;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.sidebar-brand strong,
.sidebar-brand small {
  color: #fff;
}

.sidebar-brand small {
  opacity: 0.85;
}

.brand-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent), #8b1530);
  border-radius: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

.brand-icon.large { width: 56px; height: 56px; font-size: 1.5rem; }

.sidebar-brand strong { display: block; font-size: 0.95rem; line-height: 1.2; }
.sidebar-brand small { color: var(--text-muted); font-size: 0.75rem; }

.sidebar-nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0.45rem 0.55rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.35) transparent;
}

.sidebar-nav::-webkit-scrollbar {
  width: 5px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.35);
  border-radius: 4px;
}

.nav-section {
  flex-shrink: 0;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.nav-section-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.55rem;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.35) 0%,
    rgba(0, 0, 0, 0.15) 100%
  );
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.nav-section-mark {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.nav-section-titles {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.nav-section-label {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
  line-height: 1.2;
}

.nav-section-sub {
  font-size: 0.65rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.2;
}

/* Zone-accenten — passend bij rood-wit dojo-thema */
.nav-section-club .nav-section-head {
  border-left: 3px solid #fff;
}

.nav-section-club .nav-section-mark {
  background: rgba(255, 255, 255, 0.95);
  color: var(--accent);
  border-color: #fff;
}

.nav-section-leden .nav-section-head {
  border-left: 3px solid var(--gold);
}

.nav-section-leden .nav-section-mark {
  background: rgba(212, 168, 83, 0.22);
  border-color: rgba(212, 168, 83, 0.55);
  color: #ffe8b8;
}

.nav-section-leden .nav-section-label {
  color: #ffe8b8;
}

.nav-section-beheer .nav-section-head {
  border-left: 3px solid rgba(255, 255, 255, 0.55);
}

.nav-section-beheer .nav-section-mark {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
}

.nav-section-systeem .nav-section-head {
  border-left: 3px solid rgba(255, 255, 255, 0.28);
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.45) 0%,
    rgba(0, 0, 0, 0.2) 100%
  );
}

.nav-section-systeem .nav-section-mark {
  background: rgba(0, 0, 0, 0.25);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
}

.nav-section-systeem .nav-section-label {
  color: rgba(255, 255, 255, 0.92);
}

.nav-section-links {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 0.25rem 0.35rem 0.35rem;
}

.nav-section-beheer .nav-link,
.nav-section-systeem .nav-link {
  padding: 0.48rem 0.7rem;
  min-height: 38px;
  font-size: 0.86rem;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 0.52rem 0.7rem;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.88rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
  min-height: 40px;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  text-decoration: none;
}

.nav-link.active {
  background: #fff;
  color: var(--accent);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.sidebar-close {
  display: none;
  margin-left: auto;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}

body.sidebar-open {
  overflow: hidden;
}

body.sidebar-open .sidebar-backdrop {
  display: block;
}

.sidebar-scroll-hint {
  flex-shrink: 0;
  margin: 0;
  padding: 0.15rem 0.75rem 0.35rem;
  text-align: center;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  pointer-events: none;
}

.sidebar-scroll-hint:not([hidden]) {
  animation: sidebar-hint-pulse 2s ease-in-out infinite;
}

@keyframes sidebar-hint-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

.sidebar-footer {
  padding: 0.85rem 1rem;
  padding-bottom: max(0.85rem, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(139, 21, 48, 0.85) 0%, #8b1530 100%);
}

.btn-sidebar-login,
.btn-sidebar-logout {
  background: #fff;
  color: var(--accent);
  border: none;
  font-weight: 600;
}

.btn-sidebar-login:hover,
.btn-sidebar-logout:hover {
  background: rgba(255, 255, 255, 0.9);
  text-decoration: none;
}

.sidebar-extra {
  margin-bottom: 0.5rem;
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
}

.sidebar-footer .user-chip strong,
.sidebar-footer .user-chip small {
  color: #fff;
}

.sidebar-footer .user-chip small {
  opacity: 0.85;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
}

.sidebar-footer .btn { width: 100%; }

.sidebar-toggle {
  display: none;
  position: fixed;
  top: max(1rem, env(safe-area-inset-top));
  left: max(1rem, env(safe-area-inset-left));
  z-index: 101;
  background: var(--accent);
  border: 2px solid #fff;
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  font-size: 1.25rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  padding: 2rem 2.5rem;
  max-width: 1200px;
}

.main-full { margin-left: 0; max-width: none; padding: 0; }

.page-header { margin-bottom: 2rem; }
.page-header h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.page-header p { color: var(--text-muted); margin-top: 0.35rem; }

.page-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.dashboard-tool-card {
  margin-bottom: 1.5rem;
}

.member-preview-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.65rem 1rem;
  background: rgba(25, 118, 210, 0.15);
  border: 1px solid rgba(66, 165, 245, 0.35);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: #bbdefb;
}

.content-card {
  background: rgba(26, 34, 48, 0.88);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.cms-block {
  margin-bottom: 1.5rem;
}

.cms-block:last-child {
  margin-bottom: 0;
}

.cms-media {
  max-width: 100%;
}

.cms-media img,
.cms-media video {
  width: 100%;
  border-radius: var(--radius);
  display: block;
}

.cms-media--full {
  width: 100%;
}

.cms-media--large {
  width: 75%;
}

.cms-media--medium {
  width: 50%;
}

.cms-media--small {
  width: 33%;
  min-width: 140px;
}

.cms-media--align-left {
  margin-left: 0;
  margin-right: auto;
}

.cms-media--align-center {
  margin-left: auto;
  margin-right: auto;
}

.cms-media--align-right {
  margin-left: auto;
  margin-right: 0;
}

.cms-media audio {
  width: 100%;
}

.cms-media figcaption {
  margin-top: 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.cms-block-caption {
  margin-top: 1rem;
  color: var(--text);
}

.cms-block-caption ul {
  margin: 0.5rem 0 0.75rem 1.25rem;
}

.cms-block-caption p {
  margin-bottom: 0.75rem;
}

.cms-block-caption p:last-child,
.cms-block-caption ul:last-child {
  margin-bottom: 0;
}

.cms-admin-block {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
  background: rgba(12, 15, 20, 0.5);
}

.cms-admin-block-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.cms-form label {
  display: block;
  margin-bottom: 1rem;
}

.cms-form label span,
.cms-form select,
.cms-form textarea,
.cms-form input[type="file"] {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
}

.cms-form textarea,
.cms-form select,
.cms-form input[type="file"] {
  padding: 0.65rem 0.85rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
}

.cms-form select {
  max-width: 240px;
}

.cms-media-layout-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.cms-admin-preview {
  margin: 0.75rem 0 1rem;
  max-width: 100%;
}

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

.bg-preview {
  height: 200px;
  border-radius: var(--radius);
  background-color: var(--bg);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  border: 1px solid var(--border);
  margin-bottom: 1rem;
}

.alert-success {
  background: rgba(45, 212, 160, 0.12);
  border: 1px solid rgba(45, 212, 160, 0.3);
  color: var(--success);
}

.prose p { margin-bottom: 1rem; }
.prose ul, .prose ol { margin: 0 0 1rem 1.25rem; }
.prose li { margin-bottom: 0.35rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.1rem;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #8b1530);
  color: #fff;
}
.btn-primary:hover { filter: brightness(1.1); text-decoration: none; }

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.btn-danger { background: rgba(248, 113, 113, 0.15); color: var(--danger); border: 1px solid rgba(248, 113, 113, 0.3); }
.btn-sm { padding: 0.35rem 0.7rem; font-size: 0.8rem; }
.btn-block { width: 100%; }
.btn-icon { background: none; border: none; color: var(--danger); cursor: pointer; font-size: 1.1rem; padding: 0 0.25rem; }

.login-hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.login-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem;
  max-width: 440px;
  margin: 0 auto;
}

.login-header { text-align: center; margin-bottom: 2rem; }
.login-header h1 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0.75rem 0 0.25rem;
}

.login-header p { color: var(--text-muted); font-size: 0.9rem; }

.login-form label {
  display: block;
  margin-bottom: 1rem;
}

.login-form label span {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.login-form input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
}

.login-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.login-demo {
  margin-top: 2rem;
  padding: 1rem;
  background: var(--card);
  border-radius: var(--radius);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.login-demo ul { margin: 0.5rem 0 0 1rem; }
.login-demo code { color: var(--gold); font-size: 0.75rem; }

.login-back {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.9rem;
}

.login-dashboard-panel h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
}

.login-role-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 1.25rem 0;
}

.login-role-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 1rem;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  background: rgba(12, 15, 20, 0.5);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
}

.login-role-tab:hover {
  border-color: rgba(196, 30, 58, 0.5);
  text-decoration: none;
}

.login-role-tab.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: #fff;
}

.login-role-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.login-role-label {
  font-size: 0.9rem;
}

.login-form-dashboard {
  max-width: 420px;
}

.login-form-dashboard label {
  display: block;
  margin-bottom: 1rem;
}

.login-form-dashboard label span {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.login-form-dashboard input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
}

.login-form-dashboard input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.login-hint {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.login-hint code,
.login-alt {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.login-alt {
  margin-top: 1rem;
}

.login-status-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.login-status-card p {
  margin: 0;
}

.login-role-tabs-page {
  margin-top: 0;
}

.location-module {
  margin-bottom: 1.5rem;
}

.location-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 800px) {
  .location-grid {
    grid-template-columns: 1fr;
  }
}

.location-venue {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--gold);
}

.location-address {
  font-style: normal;
  margin-bottom: 1rem;
  line-height: 1.7;
}

.location-line {
  display: block;
  font-size: 1.05rem;
}

.location-country {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.location-extra {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  line-height: 1.65;
}

.location-extra p {
  margin-bottom: 0.75rem;
}

.location-extra p:last-child,
.location-extra ul:last-child {
  margin-bottom: 0;
}

.location-extra ul,
.location-extra ol {
  margin: 0.5rem 0 0.75rem 1.25rem;
}

.location-nav-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.location-nav-buttons .btn {
  flex: 1 1 auto;
  min-width: 140px;
}

.location-map-title,
.location-extra-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: 1rem;
}

.location-map {
  height: 360px;
  width: 100%;
  border-radius: 8px;
  z-index: 1;
}

.location-map-hint {
  margin-top: 0.75rem;
  margin-bottom: 0;
  font-size: 0.8rem;
}

.location-map-card {
  padding-bottom: 1rem;
}

.form-grid textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  resize: vertical;
}

.login-visual {
  background: linear-gradient(160deg, #1a0a0e 0%, var(--bg-elevated) 50%, var(--bg) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.kanji-bg {
  font-size: clamp(4rem, 12vw, 8rem);
  opacity: 0.15;
  font-family: var(--font-display);
  letter-spacing: 0.2em;
}

.login-visual p {
  color: var(--gold);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-top: 1rem;
}

.alert {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.alert-error {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: var(--danger);
}

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

.dash-card {
  background: rgba(26, 34, 48, 0.88);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s, border-color 0.15s;
}

.dash-card:hover {
  transform: translateY(-2px);
  border-color: rgba(196, 30, 58, 0.4);
  text-decoration: none;
}

.dash-card-admin { border-color: rgba(212, 168, 83, 0.25); }

.dash-icon { font-size: 1.75rem; display: block; margin-bottom: 0.5rem; }
.dash-card h3 { font-size: 1rem; margin-bottom: 0.25rem; }
.dash-card p { font-size: 0.8rem; color: var(--text-muted); }

.schedule-table {
  width: 100%;
  border-collapse: collapse;
}

.schedule-table th,
.schedule-table td {
  padding: 0.65rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.schedule-table th { color: var(--gold); font-weight: 500; font-size: 0.85rem; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.gallery-placeholder {
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--bg-elevated), var(--card));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  border: 1px dashed var(--border);
}

.contact-cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.contact-card {
  background: var(--bg-elevated);
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.contact-card h3 { color: var(--gold); font-size: 0.95rem; margin-bottom: 0.5rem; }

.event-list { list-style: none; margin: 0 !important; padding: 0 !important; }
.event-list li {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.event-date {
  background: var(--accent-soft);
  color: var(--accent-hover);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  min-width: 4rem;
  text-align: center;
}

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

.data-table th,
.data-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.data-table tr:hover td { background: rgba(255, 255, 255, 0.02); }

.table-wrap { overflow-x: auto; }

.actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.actions form { display: inline; }

.empty { color: var(--text-muted); text-align: center; padding: 2rem !important; }

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.form-grid label {
  display: block;
  margin-bottom: 1rem;
}

.form-grid label span {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.form-grid input,
.form-grid select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
}

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

.flex-2 { grid-column: span 1; }

fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

legend {
  padding: 0 0.5rem;
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 500;
}

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

.inline-form {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  margin: 1rem 0;
}

.inline-form input {
  flex: 1;
  min-width: 180px;
  padding: 0.6rem 0.85rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
}

.field-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.field-tags li {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--bg);
  padding: 0.35rem 0.6rem;
  border-radius: 20px;
  font-size: 0.85rem;
  border: 1px solid var(--border);
}

.back-link { color: var(--text-muted); font-size: 0.9rem; display: inline-block; margin-top: 0.5rem; }

.month-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.month-label {
  font-weight: 600;
  min-width: 140px;
  text-align: center;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.stat-label { display: block; font-size: 0.8rem; color: var(--text-muted); }
.stat-value { font-size: 1.75rem; font-weight: 600; color: var(--gold); }

.badge {
  background: var(--accent-soft);
  color: var(--accent-hover);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
}

.amount-pos { color: var(--success); }
.amount-neg { color: var(--danger); }

.inline-finance-form {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  align-items: end;
}

.save-hint { margin-bottom: 1rem; }

@media (max-width: 900px) {
  .login-hero { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .sidebar {
    transform: translateX(-100%);
    width: min(88vw, 300px);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close { display: inline-flex; align-items: center; justify-content: center; }
  .sidebar-toggle { display: flex; align-items: center; justify-content: center; }
  .main-content {
    margin-left: 0;
    padding: calc(4.5rem + env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right))
      calc(2rem + env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  }
  .form-row { grid-template-columns: 1fr; }
  .page-header-row { flex-direction: column; align-items: flex-start; }
}
