/* Monio – einheitliches UI, Dunkelgrau-Dark, dezente Light-Farben */

:root {
  --font-sans: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.12);
}

/* Light – Grautöne */
[data-theme="light"],
:root {
  --bg: #f5f5f5;
  --bg-elevated: #fff;
  --bg-sidebar: #fafafa;
  --sidebar-border: #e0e0e0;
  --text: #1a1a1a;
  --text-muted: #6b6b6b;
  --accent: #505050;
  --accent-hover: #333;
  --accent-muted: rgba(0,0,0,.08);
  --border: #e0e0e0;
  --success: #2e7d32;
  --error: #c62828;
  --positive: #2e7d32;
  --negative: #c62828;
}

/* Dark – Dunkelgrau */
[data-theme="dark"] {
  --bg: #1a1a1a;
  --bg-elevated: #252525;
  --bg-sidebar: #212121;
  --sidebar-border: #3a3a3a;
  --text: #e8e8e8;
  --text-muted: #a0a0a0;
  --accent: #b0b0b0;
  --accent-hover: #e0e0e0;
  --accent-muted: rgba(255,255,255,.08);
  --border: #3a3a3a;
  --success: #4caf50;
  --error: #ef5350;
  --positive: #4caf50;
  --negative: #ef5350;
  --shadow: 0 1px 3px rgba(0,0,0,.4);
  --shadow-md: 0 4px 12px rgba(0,0,0,.5);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.6);
}

@media (prefers-color-scheme: dark) {
  [data-theme="system"] {
    --bg: #1a1a1a;
    --bg-elevated: #252525;
    --bg-sidebar: #212121;
    --sidebar-border: #3a3a3a;
    --text: #e8e8e8;
    --text-muted: #a0a0a0;
    --accent: #b0b0b0;
    --accent-hover: #e0e0e0;
    --accent-muted: rgba(255,255,255,.08);
    --border: #3a3a3a;
    --success: #4caf50;
    --error: #ef5350;
    --positive: #4caf50;
    --negative: #ef5350;
    --shadow: 0 1px 3px rgba(0,0,0,.4);
    --shadow-md: 0 4px 12px rgba(0,0,0,.5);
    --shadow-lg: 0 8px 24px rgba(0,0,0,.6);
  }
}

@media (prefers-color-scheme: light) {
  [data-theme="system"] {
    --bg: #f5f5f5;
    --bg-elevated: #fff;
    --bg-sidebar: #fafafa;
    --sidebar-border: #e0e0e0;
    --text: #1a1a1a;
    --text-muted: #6b6b6b;
    --accent: #505050;
    --accent-hover: #333;
    --accent-muted: rgba(0,0,0,.08);
    --border: #e0e0e0;
    --success: #2e7d32;
    --error: #c62828;
    --positive: #2e7d32;
    --negative: #c62828;
    --shadow: 0 1px 3px rgba(0,0,0,.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,.12);
  }
}

* { box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

.app { display: flex; flex-direction: column; min-height: 100vh; --header-height: 116px; }
.app-header { 
  display: flex; position: sticky; top: 0; z-index: 200;
  background: var(--bg-elevated);
  min-height: 72px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
[data-theme="dark"] .app-header,
[data-theme="system"] .app-header { box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.header-logo {
  width: 240px; flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.25rem;
  background: var(--bg-sidebar);
  padding: 0.75rem 1rem;
  border-radius: 0 var(--radius) 0 0;
}
.header-logo-inner {
  display: flex; flex-direction: column; align-items: center; gap: 0.2rem;
  width: 100%;
}
.header-logo .logo {
  display: flex; flex-shrink: 0; justify-content: center; order: 1;
}
.header-logo .logo-subtitle {
  display: block; width: 100%; flex-shrink: 0; order: 2;
}
.header-right {
  flex: 1; display: flex; flex-direction: column; min-width: 0;
}
.header-title-row {
  flex: 1;
  display: flex; align-items: center; gap: 1rem;
  padding: 0 1.5rem;
  min-height: 72px;
}
.app-body {
  display: flex; flex: 1; position: relative;
}
.main { 
  flex: 1; display: flex; flex-direction: column; min-width: 0;
  margin-left: 240px; transition: margin-left .3s ease;
}
.app.sidebar-collapsed .main {
  margin-left: 56px;
}

.drawer-toggle {
  display: none;
  background: none; border: none; cursor: pointer; font-size: 1.25rem; color: var(--text);
  padding: .25rem; line-height: 1; border-radius: var(--radius-sm);
}
.drawer-toggle:hover { background: var(--accent-muted); }
.page-title { margin: 0; font-size: 1.1rem; font-weight: 600; flex: 1; min-width: 0; letter-spacing: -0.01em; }
.header-actions {
  display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; margin-left: auto;
}
.theme-switcher {
  display: inline-flex;
  gap: 0;
  padding: 3px;
  background: var(--bg);
  border-radius: var(--radius);
  width: fit-content;
}
.theme-switcher button {
  padding: .4rem .85rem;
  font-size: .85rem;
  font-weight: 500;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.theme-switcher button:hover { color: var(--text); background: var(--accent-muted); }
.theme-switcher button.active {
  background: var(--text);
  color: var(--bg);
}
.theme-toggle-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; padding: 0;
  background: var(--bg);
  border: none;
  border-radius: var(--radius);
  color: var(--text-muted);
  cursor: pointer;
  transition: background .2s, color .2s, transform .15s;
  position: relative;
}
.theme-toggle-btn:hover { background: var(--accent-muted); color: var(--text); }
.theme-toggle-btn:active { transform: scale(0.96); }
.theme-icon {
  display: none; width: 20px; height: 20px;
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
}
.theme-icon.active { display: block; }
.header-profile { position: relative; }
.profile-trigger {
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer; padding: 2px;
  border-radius: 50%;
  transition: box-shadow .2s, transform .15s;
}
.profile-trigger:hover { transform: scale(1.02); }
.profile-trigger:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--accent); }
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, #606060 0%, #404040 100%);
  color: #fff; font-size: .9rem; font-weight: 600;
  transition: box-shadow .2s;
  border: 2px solid transparent;
}
[data-theme="light"] .avatar { background: linear-gradient(135deg, #6b6b6b 0%, #505050 100%); }
.avatar.avatar-img { background: none; object-fit: cover; }
.profile-trigger:hover .avatar { box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.profile-dropdown {
  position: absolute; top: 100%; right: 0; margin-top: 0.5rem;
  min-width: 200px; padding: 0.5rem;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  z-index: 100;
}
.profile-dropdown a {
  display: block; padding: 0.5rem 0.75rem; color: var(--text); text-decoration: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  transition: background .15s;
}
.profile-dropdown a:hover { background: var(--accent-muted); color: var(--text); }
.profile-dropdown hr { margin: 0.5rem 0; border: none; border-top: 1px solid var(--border); }
.profile-logout { margin: 0.25rem 0 0; padding-top: 0.5rem; border-top: 1px solid var(--border); }

/* Breadcrumb im Header (zweite Zeile) */
.breadcrumb-bar {
  padding: 0.5rem 1.5rem;
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}
.breadcrumb-inner {
  display: flex; align-items: center; flex-wrap: wrap; gap: .3rem;
  font-size: .9rem;
}
.breadcrumb-bar a {
  color: var(--text-muted); text-decoration: none;
  transition: color .15s;
}
.breadcrumb-bar a:hover { color: var(--text); }
.breadcrumb-sep {
  color: var(--text-muted); font-weight: 300; user-select: none; opacity: .7;
}
.breadcrumb-current { color: var(--text); font-weight: 500; }

.main-content { 
  flex: 1;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 1.25rem 2rem;
  box-sizing: border-box;
}

/* Sidebar */
.sidebar {
  width: 240px; background: var(--bg-sidebar); color: var(--text);
  display: flex; flex-direction: column; flex-shrink: 0;
  border-right: 1px solid var(--sidebar-border);
  transition: width .25s ease;
  position: fixed; left: 0; top: var(--header-height, 116px); bottom: 0; z-index: 100;
  overflow: visible;
}
.sidebar.collapsed {
  width: 56px;
}
.logo { 
  font-size: 1.2rem; font-weight: 700; color: var(--text); text-decoration: none;
  display: flex; align-items: center; justify-content: center;
}
.logo:hover { color: var(--accent); }
.logo-img, .logo-text {
  max-height: 50px;
  max-width: 180px;
  object-fit: contain;
}
/* Light/Dark Logo Visibility - Default (Light Mode) */
.logo-light { display: block; }
.logo-dark { display: none; }

/* Dark Mode - über data-theme Attribut */
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }

/* System Theme - wenn dark bevorzugt */
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] .logo-light { display: none; }
  :root[data-theme="system"] .logo-dark { display: block; }
}
.sidebar-toggle-tab {
  position: absolute; right: -24px; top: 50%; transform: translateY(-50%);
  z-index: 150;
  display: flex; align-items: center; justify-content: center;
  width: 24px; height: 60px; padding: 0;
  background: var(--bg-sidebar); 
  border: 1px solid var(--sidebar-border); 
  border-left: none;
  border-radius: 0 8px 8px 0;
  color: var(--text-muted); cursor: pointer; 
  transition: background .15s, color .15s;
  box-shadow: 2px 0 8px rgba(0,0,0,0.15);
}
.sidebar-toggle-tab:hover { background: var(--accent-muted); color: var(--text); }
.sidebar.collapsed .sidebar-toggle-tab svg {
  transform: rotate(180deg);
}
.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: .75rem 0;
  overflow-y: auto;
  min-height: 0;
}
.nav-item {
  display: flex; align-items: center; gap: .75rem; padding: .5rem 1rem; margin: 0 .5rem;
  color: var(--text-muted); text-decoration: none; font-weight: 500; font-size: .95rem;
  border-radius: var(--radius-sm); transition: background .15s, color .15s;
}
.nav-item:hover { background: var(--accent-muted); color: var(--text); }
.nav-item.active { background: var(--accent-muted); color: var(--text); }
.nav-icon { flex-shrink: 0; display: flex; align-items: center; justify-content: center; opacity: .85; }
.nav-icon svg { flex-shrink: 0; }
.nav-text { white-space: nowrap; overflow: hidden; }
.sidebar.collapsed .nav-item { justify-content: center; padding: .5rem; }
.sidebar.collapsed .nav-text { display: none; }
.sidebar.collapsed .sidebar-footer { display: none; }
.sidebar.collapsed .nav-pins-wrap .nav-item { justify-content: center; padding: .5rem; }
.nav-group-wrap {
  margin-top: auto;
  padding-top: .75rem;
  border-top: 1px solid var(--sidebar-border);
}
.nav-group {
  padding: 0 1.25rem .3rem;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
}
.nav-item + .nav-group {
  margin-top: .75rem;
  padding-top: .5rem;
  border-top: 1px solid var(--sidebar-border);
}
.sidebar.collapsed .nav-group { display: none; }

/* Sidebar-Footer: Branding + Version */
.sidebar-footer {
  margin-top: auto; padding: 1rem 1.25rem;
  border-top: 1px solid var(--sidebar-border);
  text-align: center;
}
.footer-brand {
  font-size: .8rem; color: var(--text-muted);
}
.footer-brand a {
  color: var(--accent); text-decoration: none;
  transition: color .15s;
}
.footer-brand a:hover { color: var(--text); text-decoration: underline; }
.footer-version {
  font-size: .7rem; color: var(--text-muted); opacity: .7;
  margin-top: .25rem;
}

.drawer-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 40;
}
@media (max-width: 768px) {
  .main, .app.sidebar-collapsed .main { margin-left: 0 !important; }
  .main-content { padding: 1rem; max-width: none; }
  .drawer-toggle { display: block; }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 50; transform: translateX(-100%);
    transition: transform .2s; box-shadow: var(--shadow-lg); width: 240px;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar.open.collapsed { width: 240px; }
  .sidebar.open .nav-text { display: inline !important; }
  .sidebar.open .sidebar-footer { display: block !important; }
  .sidebar.open .nav-item,
  .sidebar.open .nav-pins-wrap .nav-item { justify-content: flex-start; padding: .5rem 1rem; }
  .drawer-overlay:not([hidden]) { display: block; }
  .open-month-fields { grid-template-columns: 1fr; }
  .year-tiles { grid-template-columns: repeat(auto-fill, 140px); }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  padding: .5rem 1rem; font: inherit; font-weight: 500; border-radius: var(--radius-sm);
  cursor: pointer; text-decoration: none; border: 1px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
}
.btn-sm { padding: .35rem .65rem; font-size: .875rem; }
.btn-block { width: 100%; }
.btn-primary { background: #505050; color: #fff; border-color: #505050; }
.btn-primary:hover { background: #333; border-color: #333; color: #fff; }
.btn-secondary { background: var(--bg-elevated); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--accent-muted); color: var(--text); }
.btn.danger, .btn-danger { color: var(--error); border-color: var(--error); }
.btn.danger:hover, .btn-danger:hover { background: rgba(231,76,60,.12); color: var(--error); border-color: var(--error); }
.btn-delete-subtle { color: var(--text-muted); }
.btn-delete-subtle:hover { color: var(--error); background: rgba(231,76,60,.08); }
.btn-danger-subtle { background: var(--bg-elevated); color: var(--text-muted); border: 1px solid var(--border); }
.btn-danger-subtle:hover { color: var(--error); border-color: rgba(231,76,60,.5); background: rgba(231,76,60,.06); }
.board-delete-section { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }

/* Forms */
.form { max-width: 420px; }
.form-inline { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; max-width: none; }
.form .input, .form select, .form textarea, .form .form-control { width: 100%; margin-bottom: 1rem; }
.form-actions { display: flex; gap: .5rem; margin-top: 1.25rem; }
.label { display: block; font-weight: 500; margin-bottom: .25rem; font-size: .9rem; }
.form-hint { font-size: .8rem; color: var(--text-muted); margin: -.5rem 0 1rem; }
.form-row { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.form-row > div { flex: 1; min-width: 120px; }
.form-section .form-row { margin-bottom: 0; }
.custom-months-wrap { margin-bottom: 0; }

/* Strukturiertes Formular mit Sektionen */
.form-structured { max-width: none; width: 100%; }
.form-sections-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 720px) {
  .form-sections-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .form-section.form-section-span-2 { grid-column: span 2; }
}
.form-section {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.form-section-title {
  margin: 0;
  padding: .85rem 1.25rem;
  font-size: .95rem;
  font-weight: 600;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.form-section-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.form-section-body .form-field {
  margin-bottom: 0;
}
.form-section .checkbox-label { margin-bottom: 0; }
.form-section .form-field .input,
.form-section .form-field .form-control,
.form-section .form-field select,
.form-section .form-field textarea {
  margin-bottom: .25rem;
}
.form-section .form-hint {
  margin: .25rem 0 0;
}
.form-section .form-row { margin-top: .5rem; }
.form-section .form-row + .form-hint,
.form-section .form-row ~ .form-hint { margin-top: .5rem; }
.form-structured .form-actions {
  margin-top: 1.5rem;
  padding-top: 0;
}
.custom-months-grid { display: flex; flex-wrap: wrap; gap: .5rem .75rem; margin-top: .5rem; }
.custom-month-cb { margin: 0 !important; font-size: .9rem; white-space: nowrap; }
.label-inline { margin-right: .35rem; }
.input-inline { width: auto; display: inline-block; margin-right: .5rem; margin-bottom: 0; }
/* Formularfelder – einheitliches Design (Board-Form, Settings, etc.) */
.input, select, textarea, .form-control {
  padding: .5rem .75rem; font: inherit; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-elevated); color: var(--text);
  box-sizing: border-box;
}
input.form-control:not([type="color"]), textarea.form-control, select.form-control { width: 100%; }
input[type="color"].form-control { width: auto; padding: .2rem; min-width: 60px; height: 2.5rem; cursor: pointer; }
.form-control-sm, .input-sm { padding: .25rem .5rem; font-size: .875rem; }
select, select.form-control { -webkit-appearance: none; appearance: none; }
input::placeholder, textarea::placeholder { color: var(--text-muted); opacity: .8; }
.input:focus, select:focus, textarea:focus, .form-control:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-muted);
}
/* Select/Dropdown – modernes Design */
select, select.form-control {
  padding-right: 2.25rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none' stroke='%23a0a0a0' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4.5l3 3 3-3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .65rem center;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
select:hover, select.form-control:hover { border-color: var(--accent); }
select option { background: var(--bg-elevated); color: var(--text); padding: .5rem; }
.checkbox-label { display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.checkbox-label input { width: auto; }

/* Styled Checkbox */
.checkbox-styled {
  position: relative;
  cursor: pointer;
  user-select: none;
  padding-left: 0;
}
.checkbox-styled input {
  position: absolute;
  left: 0;
  top: .1em;
  opacity: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  cursor: pointer;
  z-index: 1;
}
.checkbox-custom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  margin-right: .5rem;
  border: 2px solid var(--border);
  border-radius: 6px;
  background: var(--bg-elevated);
  transition: border-color .15s, background .15s;
}
.checkbox-styled:hover .checkbox-custom { border-color: var(--accent); }
.checkbox-styled input:focus + .checkbox-custom { box-shadow: 0 0 0 2px var(--accent-muted); }
.checkbox-styled input:checked + .checkbox-custom {
  background: var(--accent);
  border-color: var(--accent);
}
.checkbox-styled input:checked + .checkbox-custom::after {
  content: '';
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-bottom: 2px;
}
.custom-month-cb .checkbox-custom { margin-right: .35rem; }

/* Notiz-Textarea grösser */
.input-note { min-height: 140px; resize: vertical; }

/* Alerts */
.alert { padding: .75rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; }
.alert-error { background: rgba(231,76,60,.1); color: var(--error); border: 1px solid rgba(231,76,60,.25); }
.alert-success { background: rgba(49,167,76,.1); color: var(--success); border: 1px solid rgba(49,167,76,.25); }

/* Kacheln – einheitlich */
.card {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow);
  transition: box-shadow .2s, border-color .2s;
}
.card:hover { box-shadow: var(--shadow-md); border-color: var(--accent); }
.card-title { font-weight: 600; display: block; }
.card-meta { font-size: .875rem; color: var(--text-muted); margin-top: .25rem; }
.card-body { flex: 1; }
.card-actions { display: flex; gap: .35rem; flex-wrap: wrap; margin-top: .5rem; }

/* Grid-Views – Kacheln */
.grid-view { display: grid; gap: 1rem; width: 100%; }
.board-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.year-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 150px);
  gap: 1rem;
  max-width: 100%;
}
.month-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.recurring-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.board-card, .year-card, .month-card {
  text-decoration: none; color: inherit; display: flex; flex-direction: column;
  padding: 1.25rem; min-height: 120px; justify-content: center;
  transition: transform .15s, box-shadow .2s, border-color .2s;
}
.year-card {
  min-height: 130px; width: 100%; min-width: 0;
  align-items: center; text-align: center;
}
.board-card { min-height: auto; position: relative; overflow: visible; padding: 0; }
.board-card-link {
  display: flex; flex-direction: column; justify-content: flex-start; gap: 0;
  text-decoration: none; color: inherit; flex: 1; padding: 1rem 1rem 2.25rem;
}

/* Modern board card variant */
.board-card--modern { border-left: 4px solid var(--accent); }
.board-card--modern .board-card-link {
  display: flex; flex-direction: row; align-items: stretch; padding: 1rem 1.25rem 1rem 1rem;
  gap: 1rem;
}
.board-card--modern .board-card-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .35rem; }
.board-card--modern .board-card-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.board-card--modern .board-card-title {
  font-size: 1.15rem; font-weight: 700; margin: 0; color: var(--text); letter-spacing: -0.02em;
}
.board-card--modern .board-card-hero {
  font-size: 1.1rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text);
  flex-shrink: 0;
}
.board-card--modern .board-card-sub {
  font-size: .82rem; color: var(--text-muted); margin: 0; line-height: 1.4;
}
.board-card--modern .board-card-sub--hint { font-style: italic; }
.board-card-assigned {
  display: flex; flex-direction: column; gap: .1rem; margin-top: .25rem;
}
.board-card-assigned-title {
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-bottom: .15rem;
}
.board-card-assigned-line {
  font-size: .75rem; color: var(--text-muted); line-height: 1.35;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.board-card--modern .board-card-badges {
  display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .2rem;
}
.board-card--modern .board-badge {
  display: inline-flex; align-items: center;
  padding: .25rem .5rem; font-size: .72rem; font-weight: 600;
  background: var(--accent-muted); color: var(--text);
  border-radius: 6px; font-variant-numeric: tabular-nums;
}
.board-card--modern .board-badge--persons { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-card--modern .board-card-chevron {
  font-size: 1.5rem; font-weight: 300; color: var(--text-muted); opacity: .5;
  align-self: center; flex-shrink: 0; transition: transform .2s, opacity .2s;
}
.board-card--modern:hover .board-card-chevron { transform: translateX(2px); opacity: .9; }
.board-card--add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 140px;
  padding: 1.5rem;
  text-decoration: none;
  color: var(--text-muted);
  border: 2px dashed var(--border);
  background: var(--bg-elevated);
  transition: border-color .2s, color .2s, background .2s;
}
.board-card--add:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-muted);
}
.board-card-add-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  font-size: 2rem;
  font-weight: 300;
  line-height: 1;
  margin-bottom: 0.5rem;
  border: 2px solid currentColor;
  border-radius: 50%;
  opacity: 0.8;
}
.board-card--add:hover .board-card-add-icon { opacity: 1; }
.board-card-add-text {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.favorites-section { margin-bottom: 2rem; }
.favorites-grid {
  display: flex; flex-wrap: wrap; gap: .75rem;
}
.favorite-card {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .6rem 1rem;
  text-decoration: none; color: inherit;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .9rem;
  transition: box-shadow .2s, border-color .2s;
}
.favorite-card:hover { box-shadow: var(--shadow-md); border-color: var(--accent); }
.favorite-card .favorite-icon { color: #eab308; flex-shrink: 0; }
.month-card { min-height: 120px; position: relative; overflow: visible; padding: 0; }
.month-card-link {
  padding: 1rem 1.25rem 2.25rem;
}
.month-card .month-card-ribbon {
  position: absolute;
  top: auto !important;
  right: auto !important;
  bottom: 0;
  left: 0;
  width: 100%;
  max-width: none;
  text-align: center;
  padding: .4rem .75rem;
  clip-path: none;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: none;
}
.month-card .month-card-ribbon.card-ribbon-board {
  --ribbon-color: #6b7280;
  font-size: .75rem;
}
.board-card:hover, .year-card:hover, .month-card:hover {
  transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--accent);
}
.board-card .card-title, .year-card .card-title, .month-card .card-title { font-size: 1.1rem; font-weight: 600; }
.year-card .card-title { font-size: 1.4rem; font-weight: 700; display: block; }
.board-card .card-desc { font-size: .82rem; color: var(--text-muted); margin-top: .25rem; line-height: 1.3; }
.board-card .card-desc-hint { font-style: italic; }
.board-card-stats { display: flex; gap: .75rem; margin-top: .4rem; flex-wrap: wrap; align-items: center; }
.board-stat { font-size: .85rem; font-weight: 600; color: var(--text); }
.board-stat-amount { font-variant-numeric: tabular-nums; }
.board-card-meta-lines { display: flex; flex-direction: column; gap: .15rem; margin-top: .4rem; }
.board-meta-line { font-size: .78rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-card-footer { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .4rem; min-height: 1.2em; }
.board-card-footer .board-card-persons { flex: 1; min-width: 0; }
.board-card-persons { font-size: .78rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; margin-top: .35rem; }
.board-card-footer .board-card-persons { margin-top: 0; }
.board-card-arrow { font-size: 1rem; color: var(--text-muted); opacity: .6; transition: transform .15s; flex-shrink: 0; }
.board-card:hover .board-card-arrow { transform: translateX(4px); opacity: 1; }
.board-card .card-meta, .month-card .card-meta {
  font-size: .875rem; color: var(--text-muted); margin-top: .5rem;
}
.month-card .card-meta { font-variant-numeric: tabular-nums; }
.year-card .card-meta { font-size: .8rem; color: var(--text-muted); margin-top: .35rem; text-transform: uppercase; letter-spacing: .04em; }

.recurring-card {
  display: flex; flex-direction: column; padding: 1rem 1.25rem;
  transition: box-shadow .2s, border-color .2s;
  position: relative;
  overflow: hidden;
}
.recurring-card:hover { box-shadow: var(--shadow-md); border-color: var(--accent); }
.recurring-card.inactive { opacity: .7; }
.recurring-card .card-body { display: flex; flex-direction: column; gap: .25rem; flex: 1; }
.recurring-card:has(.card-ribbon) .card-body { padding-top: 1.75rem; }
.recurring-card .card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: .75rem;
  padding-top: .75rem;
  border-top: 1px solid var(--border);
}
.recurring-delete-form { margin-left: auto; }
.recurring-card .btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .4rem;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-muted);
  transition: color .15s, background .15s;
}
.recurring-card .btn-icon:hover { background: var(--accent-muted); color: var(--text); }
.recurring-card .btn-icon-trash { color: var(--error); }
.recurring-card .btn-icon-trash:hover { background: rgba(239, 83, 80, .15); color: var(--error); }
/* Ribbon oben rechts */
.card-ribbon {
  position: absolute;
  top: 0;
  right: 0;
  font-size: .7rem;
  font-weight: 600;
  padding: .4rem .85rem .4rem 1.5rem;
  background: var(--ribbon-color, #6b7280);
  color: #fff;
  box-shadow: -2px 2px 8px rgba(0,0,0,.25);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  letter-spacing: .02em;
  max-width: 75%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.badge { font-size: .75rem; padding: .2rem .5rem; border-radius: 999px; background: var(--badge-color, #6b7280); color: #fff; }

/* KPIs */
.kpis { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem; }
.kpi-card {
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem 1.25rem; min-width: 130px; box-shadow: var(--shadow);
}
.kpi-value { font-size: 1.2rem; font-weight: 700; font-variant-numeric: tabular-nums; display: block; }
.kpi-label { font-size: .8rem; color: var(--text-muted); }
.kpi-card.positive .kpi-value { color: var(--positive); }
.kpi-card.negative .kpi-value { color: var(--negative); }
.month-kpis { gap: .75rem; }
.month-kpis .kpi-card { min-width: 110px; padding: .75rem 1rem; }
.month-kpis .kpi-value { font-size: 1.05rem; }
.month-header-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.month-subtitle { font-size: .95rem; color: var(--text-muted); margin: 0; }
.icon-pdf { font-weight: 600; font-size: .8em; }

/* Sections */
.section { margin-bottom: 2rem; }
.section h2 { margin: 0 0 1rem; font-size: 1.05rem; }
.section-header { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.section-header h2 { margin: 0; }
.section-header-actions { display: flex; align-items: center; gap: .5rem; margin-left: auto; flex-wrap: wrap; }
.empty-state { color: var(--text-muted); }
.board-detail .grid-view, .board-year .grid-view { display: grid; }

/* Jahre-View – überarbeitet */
.years-view { }
.years-open-section { margin-bottom: 2rem; }
.years-open-card { max-width: 480px; padding: 1.5rem; }
.years-open-title { margin: 0 0 .35rem; font-size: 1.1rem; }
.years-open-desc { margin: 0 0 1rem; font-size: .9rem; color: var(--text-muted); }
.years-open-section .open-month-form { margin: 0; }
.open-month-fields {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr;
  align-items: end;
  gap: .5rem .75rem;
}
.open-month-fields .label { margin-bottom: 0; }
.open-month-actions { grid-column: 1 / -1; margin-top: .75rem; }
.open-month-fields .input, .open-month-fields .form-control, .open-month-fields select { margin-bottom: 0; min-width: 0; }
.years-grid-section { }
.years-grid-title { margin: 0 0 1rem; font-size: 1.05rem; }
.years-empty { padding: 2rem; text-align: center; color: var(--text-muted); }
.years-empty .text-muted { margin-top: .5rem; }
.year-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.25rem;
}
.year-tile {
  position: relative;
  overflow: visible;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 1.5rem 1rem;
  min-height: 120px; transition: transform .15s, box-shadow .2s, border-color .2s;
}
.year-tile-link {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-decoration: none; color: inherit; flex: 1; width: 100%;
  padding: 1rem 1rem 2.25rem;
}
.year-tile-ribbon {
  position: absolute;
  top: auto;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: none;
  text-align: center;
  padding: .4rem .75rem;
  clip-path: none;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: none;
}
.year-tile .year-tile-ribbon.card-ribbon-board {
  --ribbon-color: #6b7280;
  font-size: .75rem;
}
/* Card menu (Dreipunkte-Menü für Boards/Jahre) */
.card-menu {
  position: absolute;
  top: .5rem;
  right: .5rem;
  z-index: 10;
}
.card-menu-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-muted);
  transition: color .15s, background .15s, border-color .15s;
}
.card-menu-trigger:hover {
  background: var(--accent-muted);
  color: var(--text);
  border-color: var(--text-muted);
}
.card-menu-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: .25rem;
  min-width: 220px;
  padding: .35rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  z-index: 100;
}
.card-menu-dropdown[hidden] { display: none; }
.card-menu-form { display: block; }
.card-menu-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  width: 100%;
  padding: .5rem .75rem;
  font: inherit;
  font-size: .9rem;
  text-align: left;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text);
  transition: background .15s, color .15s;
}
.card-menu-item:hover { background: var(--accent-muted); }
.card-menu-item .icon-svg,
.card-menu-item svg { flex-shrink: 0; color: var(--text-muted); }
.card-menu-item:hover .icon-svg,
.card-menu-item:hover svg { color: var(--accent); }

/* Nav-Pins (Schnellzugriff in Sidebar) */
.nav-pins-wrap { padding: 0 .5rem; margin-bottom: .25rem; }
.nav-item-pin .nav-text { font-size: .875rem; }

.favorite-form {
  position: absolute;
  bottom: .5rem;
  right: .5rem;
  z-index: 2;
}
.favorite-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: .35rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-muted);
  transition: color .15s, background .15s, border-color .15s;
}
.favorite-btn:hover { color: #eab308; border-color: #eab308; background: rgba(234,179,8,.08); }
.favorite-btn.is-favorite { color: #eab308; }
.favorite-form.favorite-inline { position: static; display: inline-flex; }
.month-card-link {
  display: flex; flex-direction: column; justify-content: center;
  text-decoration: none; color: inherit; flex: 1; min-height: 120px;
}
.month-card { display: flex; flex-direction: column; }
.year-tile:hover {
  transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--accent);
}
.year-tile-value { font-size: 1.5rem; font-weight: 700; display: block; }
.year-tile-meta { font-size: .85rem; color: var(--text-muted); margin-top: .35rem; }

.month-links, .month-list { list-style: none; padding: 0; margin: 0; }
.month-links li, .month-list li { margin-bottom: .5rem; }
.month-link { font-weight: 500; color: var(--accent); text-decoration: none; }
.month-link:hover { text-decoration: underline; }
.months-by-year { display: flex; flex-direction: column; gap: 1.5rem; }
.year-group { }
.year-heading { font-size: 1rem; font-weight: 600; color: var(--text-muted); margin: 0 0 .5rem; }

/* Payers */
.payer-list { list-style: none; padding: 0; margin: 0; }
.payer-row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; padding: .75rem 0; border-bottom: 1px solid var(--border); }
.payer-row.inactive { opacity: .6; }
.payer-name { font-weight: 500; flex: 1; min-width: 120px; }
.payer-status { font-size: .875rem; color: var(--text-muted); }
.inline-form { display: inline; }

.recurring-cards { display: flex; flex-direction: column; gap: .75rem; }
.open-month-form { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }

/* Tabs */
.tabs { display: flex; gap: .25rem; margin-bottom: 1rem; flex-wrap: wrap; }
.tab {
  padding: .5rem 1rem; border-radius: var(--radius-sm); font-weight: 500; text-decoration: none;
  color: var(--text-muted); background: transparent; transition: background .15s, color .15s;
}
.tab:hover { background: var(--accent-muted); color: var(--text); }
.tab.active { background: #505050; color: #fff; }
.tab.active:hover { color: #fff; background: #333; }
.quick-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.quick-add summary { cursor: pointer; }
.quick-add .form { margin-top: .5rem; padding: 1rem; background: var(--bg); border-radius: var(--radius-sm); }

/* Board layout: main + right sidebar (Jahre, Jahr-Detail, Personen, Kategorien) */
.board-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  align-items: start;
}
/* ========== Admin-Bereich – Redesign ========== */
.admin-layout {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 2rem;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
}
.admin-main { min-width: 0; }
.admin-page {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.admin-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}
.admin-page-header--actions-right { justify-content: flex-end; }
.admin-page-header h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.admin-sidebar {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  position: sticky;
  top: 5rem;
}
.admin-nav { display: flex; flex-direction: column; gap: 1.5rem; }
.admin-nav-group { display: flex; flex-direction: column; gap: 0.25rem; }
.admin-nav-group-title {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 0 0.75rem 0.5rem;
}
.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  transition: background 0.15s, color 0.15s;
}
.admin-nav-link:hover { background: var(--accent-muted); color: var(--text); }
.admin-nav-link.active { background: var(--accent-muted); color: var(--accent); font-weight: 600; }
.admin-nav-icon { font-size: 1.1em; }
.admin-section {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.admin-section h2 { margin: 0 0 0.5rem; font-size: 1.1rem; }
.admin-section-desc { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1rem; line-height: 1.5; }
.admin-section .label { display: block; margin-bottom: 0.25rem; font-size: 0.9rem; }
.admin-section .form-group { margin-bottom: 1rem; }
.admin-section .form-group:last-of-type { margin-bottom: 0; }
.admin-section .form-actions { margin-top: 1.25rem; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.admin-section .form-control { width: 100%; box-sizing: border-box; }
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.admin-logo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.admin-logo-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
}
.admin-logo-box h3 { margin: 0 0 0.75rem; font-size: 0.95rem; }
.admin-logo-preview {
  margin-bottom: 1rem;
  padding: 1rem;
  border-radius: var(--radius-sm);
  text-align: center;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.admin-logo-preview.light { background: #f5f5f5; }
.admin-logo-preview.dark { background: #1a1a1a; }
.admin-logo-preview.dark .logo-placeholder { background: #2a2a2a; color: #fff; }
.admin-logo-preview.dark .no-logo { color: #888; }
.admin-logo-preview .logo-preview { max-width: 180px; max-height: 60px; object-fit: contain; }
.admin-logo-preview .logo-placeholder { display: inline-block; font-size: 1.2rem; font-weight: 700; padding: 0.4rem 0.8rem; background: var(--bg-sidebar); border-radius: var(--radius-sm); }
.admin-logo-preview .hint { font-size: 0.75rem; margin-top: 0.5rem; opacity: 0.7; }

/* Erscheinungsbild – vertikale Einstellungsliste (wie Ausgleich, Custom CSS) */
.appearance-settings { display: flex; flex-direction: column; gap: 0; }
.appearance-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.appearance-row:first-child { padding-top: 0; }
.appearance-row:last-child { border-bottom: none; padding-bottom: 0; }
.appearance-label {
  flex-shrink: 0;
  width: 140px;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.appearance-label-text { font-weight: 500; font-size: 0.95rem; color: var(--text); }
.appearance-label-hint { font-size: 0.8rem; color: var(--text-muted); }
.appearance-label-format { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.15rem; line-height: 1.3; }
.appearance-label-hint code { font-size: 0.75rem; padding: 0.1rem 0.3rem; background: var(--accent-muted); border-radius: 3px; }
.appearance-controls {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.appearance-controls--single { flex-wrap: wrap; }
.appearance-preview {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.appearance-preview--light { background: #f5f5f5; }
.appearance-preview--dark { background: #1a1a1a; }
.appearance-preview--dark span { color: #fff; font-size: 0.8rem; font-weight: 600; }
.appearance-preview--favicon {
  background: var(--bg);
  border: 1px dashed var(--border);
}
.appearance-preview--favicon span { color: var(--text-muted); font-size: 1.2rem; }
.appearance-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.appearance-preview--favicon img { width: 28px; height: 28px; }
.appearance-form {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}
.appearance-form .form-control { width: auto; min-width: 180px; flex: 1; }
.appearance-form .btn { flex-shrink: 0; }
.appearance-divider { height: 1px; background: var(--border); margin: 0.5rem 0 1rem; }
.appearance-text-form .appearance-row:last-of-type { padding-bottom: 0; }
.appearance-input-flex { flex: 1; min-width: 180px; }
.appearance-select-size { width: auto; min-width: 120px; flex-shrink: 0; }
.appearance-controls--single .form-control { min-width: 200px; }
.appearance-controls--single .btn { flex-shrink: 0; }
@media (max-width: 640px) {
  .appearance-row { flex-direction: column; align-items: flex-start; gap: 0.75rem; padding: 1.25rem 0; }
  .appearance-label { width: 100%; }
  .appearance-form .form-control { min-width: 100%; }
}
.admin-settlement-options { display: flex; flex-direction: column; gap: 0.75rem; }
.admin-settlement-option { display: flex; align-items: flex-start; gap: 0.75rem; cursor: pointer; padding: 0.5rem 0; }
.admin-settlement-option input { margin-top: 0.25rem; flex-shrink: 0; }
.admin-settlement-option .option-label { line-height: 1.4; }
.admin-css-textarea { font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, monospace; font-size: 0.9rem; }
.admin-users-table { margin-top: 0; }
.admin-users-table .table { margin-top: 0; }
@media (max-width: 768px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; }
}

/* Admin layout: schmalere Sidebar (legacy board-layout) */
.admin-layout.board-layout {
  grid-template-columns: 1fr 220px;
}
.board-main { min-width: 0; }
.board-sidebar {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  position: sticky;
  top: 5rem;
}
.board-settings-block { margin-bottom: 1.5rem; }
.board-settings-block h2 { margin: 0 0 .5rem; font-size: 1rem; }
.board-settings-desc { margin: 0 0 .75rem; font-size: .875rem; color: var(--text-muted); }
.board-settings-buttons { display: flex; flex-direction: column; gap: .5rem; }
.board-settings-buttons .btn-block { width: 100%; text-align: center; }
.board-settings-buttons .btn.active { background: #505050; color: #fff; }

.sidebar-open-section .sidebar-open-form { display: flex; flex-direction: column; gap: .5rem; }
.sidebar-open-section .label { margin: 0; font-size: .875rem; }
.sidebar-open-section .input, .sidebar-open-section .form-control, .sidebar-open-section select { margin-bottom: 0; }
.sidebar-open-section .checkbox-wrap { margin: .25rem 0; }
.sidebar-open-section .checkbox-wrap .checkbox-label { margin: 0; }

/* Ganzes-Jahr-Ansicht – scrollbare Liste Jan–Dez */
.year-full-view { }
.year-full-header { margin-bottom: .5rem; }
.year-full-desc { font-size: .9rem; color: var(--text-muted); margin: 0 0 1.5rem; }
.year-full-scroll {
  max-height: calc(100vh - 260px);
  overflow-y: auto;
  padding-right: .5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.year-full-month {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  break-inside: avoid;
}
.year-full-month-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--border);
}
.year-full-month-header h3 { margin: 0; font-size: 1.1rem; }
.year-full-month-content { display: flex; flex-direction: column; gap: 1.25rem; }
.year-full-block h4 { margin: 0 0 .5rem; font-size: .9rem; color: var(--text-muted); }
.year-full-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.year-full-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem .75rem;
  padding: .5rem .75rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  font-size: .9rem;
}
.year-full-list.year-full-items li { flex-wrap: wrap; }
.year-full-list .item-title { font-weight: 500; flex: 1 1 140px; min-width: 0; }
.year-full-list .item-payee { flex: 0 0 auto; }
.year-full-list .item-amount { font-variant-numeric: tabular-nums; font-weight: 600; margin-left: auto; }
.year-full-list .item-status {
  font-size: .75rem;
  padding: .15rem .45rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.year-full-list .status-paid { background: rgba(76, 175, 80, .2); color: var(--success); }
.year-full-list .status-planned { background: rgba(33, 150, 243, .2); color: #2196f3; }
.year-full-list .status-open { background: var(--accent-muted); color: var(--text-muted); }
.year-full-list .muted { color: var(--text-muted); font-size: .85rem; }
.year-full-total {
  margin: .75rem 0 0;
  padding-top: .5rem;
  border-top: 1px solid var(--border);
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-muted);
}
.badge-sm { font-size: .7rem; padding: .12rem .4rem; }

/* Category list (Kategorien-Seite) */
.category-list { list-style: none; padding: 0; margin: 0; }
.category-row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; padding: .75rem 0; border-bottom: 1px solid var(--border); }
.category-swatch { width: 14px; height: 14px; border-radius: 4px; flex-shrink: 0; }
.category-name { font-weight: 500; flex: 1; min-width: 120px; }

/* Month view: main (left) + RIGHT sidebar (immer rechts) */
.month-detail .month-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  align-items: start;
  margin-top: 0;
}
.month-detail .month-main { min-width: 0; }
.month-detail .month-sidebar {
  display: flex; flex-direction: column; gap: 1rem;
  position: sticky; top: 5rem;
}
.sidebar-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}
.sidebar-box-provisional { background: rgba(245, 158, 11, 0.15); border-color: rgba(245, 158, 11, 0.4); }
.sidebar-box-title { margin: 0 0 .75rem; font-size: .95rem; font-weight: 600; }
.sidebar-box-desc { margin: -0.5rem 0 .75rem; font-size: .8rem; color: var(--text-muted); }
.sidebar-box-empty { margin: 0; font-size: .875rem; color: var(--text-muted); }
.sidebar-box-buttons { display: flex; flex-direction: column; gap: .5rem; }
.sidebar-box-list { list-style: none; padding: 0; margin: 0; }
.sidebar-box-list li {
  display: flex; justify-content: space-between; align-items: center; gap: .5rem;
  padding: .5rem 0; border-bottom: 1px solid var(--border); font-size: .9rem;
}
.sidebar-box-list li:last-child { border-bottom: none; }
.sidebar-box-list li span:last-child { font-variant-numeric: tabular-nums; font-weight: 500; }
.sidebar-box-incomes li { flex-wrap: wrap; gap: .5rem .75rem; align-items: center; }
.sidebar-box-incomes .income-text { flex: 1; min-width: 0; }
.sidebar-box-incomes .income-desc { font-weight: 500; }
.sidebar-box-incomes .income-person { font-size: .8rem; color: var(--text-muted); }
.sidebar-box-incomes .income-amount { font-variant-numeric: tabular-nums; font-weight: 500; }
.sidebar-box-incomes .item-action-icon { flex-shrink: 0; }
.sidebar-box-list .positive { color: var(--positive); }
.sidebar-box-list .negative { color: var(--negative); }
.sidebar-box-suggestions { list-style: none; padding: 0; margin: 0; }
.sidebar-box-suggestions li {
  padding: .5rem 0; border-bottom: 1px solid var(--border); font-size: .9rem;
}
.sidebar-box-suggestions li:last-child { border-bottom: none; }
.sidebar-add .form { margin-top: .5rem; display: flex; flex-direction: column; gap: .35rem; }
.sidebar-add .form .label { margin: 0; }
.month-sidebar-block { margin-bottom: 1.5rem; }
.month-sidebar-block:last-child { margin-bottom: 0; }
.month-sidebar-block h2 { margin: 0 0 .75rem; font-size: 1rem; }

/* Item cards */
.month-items { display: flex; flex-direction: column; gap: .75rem; margin-bottom: 0; }
.item-card {
  display: flex; flex-direction: column; gap: 0;
  position: relative; overflow: hidden;
}
.item-card.item-paid { background: rgba(76, 175, 80, 0.15); border-color: rgba(76, 175, 80, 0.4); }
.item-card.item-provisional { background: rgba(245, 158, 11, 0.15); border-color: rgba(245, 158, 11, 0.4); }
.item-view {
  display: flex; justify-content: space-between; align-items: stretch; gap: 1rem;
  width: 100%;
}
.item-card-left { flex: 1; min-width: 0; }
.item-card-line1 { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem; }
.item-card-line1 .item-title { font-weight: 600; }
.item-card-line1 .item-payee { font-weight: 400; font-size: .9rem; color: var(--text-muted); }
.item-note-icon { display: inline-flex; align-items: center; color: var(--text-muted); cursor: help; }
.item-note-icon:hover { color: var(--text); }
.item-card-line2 { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; font-size: .875rem; color: var(--text-muted); margin-top: .2rem; }
.item-card-line2 .item-amount { font-variant-numeric: tabular-nums; font-weight: 500; color: var(--text); }
.item-card-line2 .item-sep { opacity: .6; }
.item-card-right {
  display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between;
  flex-shrink: 0;
}
.item-card-ribbon-row { line-height: 1; }
.item-card .item-card-ribbon {
  display: inline-block; font-size: .65rem; padding: .25rem .5rem .25rem .8rem;
  box-shadow: none;
}
.item-payer-assign { display: inline-flex; align-items: center; gap: .25rem; }
.item-payer-assign .input-sm, .item-payer-assign .form-control-sm { min-width: 90px; font-size: .8rem; padding: .2rem .4rem; }
.item-actions { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.item-action-icon.item-edit-trigger { background: none; border: none; cursor: pointer; padding: 0; }
.item-quick-edit { padding: .75rem 0 0; border-top: 1px solid var(--border); margin-top: .5rem; }
.item-quick-edit-form .label { display: block; margin: 0 0 .2rem; font-size: .8rem; color: var(--text-muted); }
.item-quick-edit-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem .75rem; margin-bottom: .75rem; }
.item-quick-edit-grid .item-qe-row-full { grid-column: 1 / -1; }
.item-quick-edit-grid input, .item-quick-edit-grid select, .item-quick-edit-grid .form-control { width: 100%; box-sizing: border-box; }
.item-quick-edit-actions { display: flex; gap: .5rem; }
@media (max-width: 500px) {
  .item-quick-edit-grid { grid-template-columns: 1fr; }
}
/* Nur Icon, kein Button – Bearbeiten = Schriftfarbe, Löschen = rot */
.item-action-icon {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0; margin: 0; background: none; border: none; border-radius: 0;
  cursor: pointer; transition: opacity .15s;
}
.item-action-icon .icon-svg { display: block; }
.item-action-icon[title="Bearbeiten"],
.item-action-icon[aria-label="Bearbeiten"],
a.item-action-icon { color: var(--text-muted); }
.item-action-icon:hover { opacity: .85; }
a.item-action-icon:hover { color: var(--text); }
.item-action-icon.icon-delete,
.item-action-icon[title="Löschen"],
.item-action-icon[aria-label="Löschen"] { color: var(--error); }
.item-action-icon.icon-delete:hover { opacity: .9; }
.item-action-icon-wrap { display: inline-flex; }
.icon-svg { display: block; }
.reschedule-details summary { cursor: pointer; }
.pay-details summary { cursor: pointer; }
.pay-details .pay-quick-form { margin-top: .75rem; padding-top: .75rem; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: .5rem; max-width: 260px; }
.pay-quick-form .form-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.edit-item-unpay { margin-bottom: 1rem; }
.provisional-list li { flex-direction: row; align-items: center; justify-content: space-between; }
.reschedule-details .form { margin-top: .5rem; display: flex; gap: .5rem; flex-wrap: wrap; }

/* Incomes */
.income-list { list-style: none; padding: 0; margin: 0; }
.income-list li { display: flex; gap: 1rem; padding: .5rem 0; border-bottom: 1px solid var(--border); }
.income-list-header { font-weight: 600; color: var(--text-muted); font-size: .85rem; padding-bottom: .35rem; }
.income-list-header span:nth-child(1), .income-list li:not(.income-list-header) span:nth-child(1) { flex: 1; }
.income-list-header span:nth-child(2), .income-list-header span:nth-child(3) { min-width: 5.5rem; }
.income-list li:not(.income-list-header) span:nth-child(2) { min-width: 5.5rem; font-variant-numeric: tabular-nums; }
.income-list li:not(.income-list-header) span:nth-child(3) { min-width: 5.5rem; color: var(--text-muted); }

/* Settlement */
.settlement-desc { margin-bottom: .75rem; color: var(--text-muted); }
.settlement-list { list-style: none; padding: 0; margin: 0; }
.settlement-list li { display: flex; gap: 1rem; flex-wrap: wrap; padding: .5rem 0; border-bottom: 1px solid var(--border); }
.settlement-list .positive { color: var(--positive); }
.settlement-list .negative { color: var(--negative); }
.settlement-suggestions { list-style: none; padding: 0; margin: .5rem 0 0; }
.settlement-suggestions li { padding: .35rem 0; border-bottom: 1px solid var(--border); }
.settlement-suggestions li:last-child { border-bottom: none; }
.month-sidebar .settlement-list li { flex-direction: column; align-items: flex-start; gap: .2rem; }
.month-sidebar .income-list-header { display: none; }
.month-sidebar .income-list li { display: grid; grid-template-columns: 1fr auto auto; gap: .5rem; }

@media (max-width: 900px) {
  .board-layout { grid-template-columns: 1fr; }
  .board-sidebar { position: static; }
  .month-detail .month-layout { grid-template-columns: 1fr; }
  .month-detail .month-sidebar { position: static; }
}

/* Auth */
.auth-page {
  min-height: 100vh; padding: 1.5rem; background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  position: relative;
}
.auth-wrapper {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  flex: 1; width: 100%; max-width: 420px;
}
.auth-card {
  width: 100%; background: var(--bg-elevated);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 2rem; box-shadow: var(--shadow-lg);
}
.auth-logo {
  display: flex; align-items: center; justify-content: center;
  margin-bottom: .5rem; text-decoration: none; color: inherit;
}
.auth-logo:hover { opacity: .9; }
.auth-logo-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 0.35rem;
}
.auth-logo-wrap .logo { display: flex; flex-direction: column; align-items: center; }
.auth-logo-wrap .logo-subtitle { order: 2; }
.auth-logo .logo-img { max-height: 48px; max-width: 160px; object-fit: contain; }
.auth-logo .logo-text { font-size: 1.5rem; font-weight: 700; }
.logo-subtitle {
  color: var(--text-muted); text-align: center; line-height: 1.3;
  display: block; margin-top: 0.15rem; white-space: normal;
}
.logo-subtitle--small { font-size: 0.65rem; }
.logo-subtitle--medium { font-size: 0.75rem; }
.logo-subtitle--large { font-size: 0.85rem; }
.auth-logo-wrap .logo-subtitle { margin-top: 0.25rem; }
.auth-card .auth-form { margin-top: 1.5rem; }
.auth-form .label { margin-top: .5rem; }
.auth-form .label:first-of-type { margin-top: 0; }
.auth-form .input, .auth-form .form-control { width: 100%; max-width: 100%; box-sizing: border-box; margin-bottom: 1rem; }
.auth-form .label { display: block; }
.auth-form .btn { margin-top: 1rem; width: 100%; box-sizing: border-box; }

.auth-footer {
  margin-top: 2rem; padding-top: 1rem;
  text-align: center; font-size: .8rem; color: var(--text-muted);
}
.auth-footer a { color: var(--text-muted); text-decoration: none; }
.auth-footer a:hover { color: var(--accent); text-decoration: underline; }
.auth-footer-version { margin-top: .25rem; }

.theme-toggle-auth {
  position: fixed; bottom: 1.25rem; right: 1.25rem;
  margin: 0; box-shadow: var(--shadow-md);
}

.dashboard .kpis { margin-bottom: 1.5rem; }

/* Dashboard Redesign */
.dashboard-page { padding-bottom: 2rem; max-width: 1400px; }
.dashboard-header { margin-bottom: 1.5rem; }
.dashboard-title { margin: 0; font-size: 1.75rem; font-weight: 700; }
.dashboard-subtitle { margin: .4rem 0 0; font-size: 1rem; color: var(--text-muted); }

.dashboard-kpis {
  display: flex; flex-wrap: wrap; gap: 1.25rem; margin-bottom: 2.5rem;
}
.dashboard-kpi {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  min-width: 130px;
  flex: 1;
  max-width: 200px;
}
.dashboard-kpi-value { font-size: 1.4rem; font-weight: 700; font-variant-numeric: tabular-nums; display: block; }
.dashboard-kpi-label { font-size: .85rem; color: var(--text-muted); }
.dashboard-kpi-amount .dashboard-kpi-value { color: var(--text-muted); }
.dashboard-kpi-amount.has-open .dashboard-kpi-value { color: var(--negative); }

.dashboard-sections {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .dashboard-sections { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1100px) {
  .dashboard-sections { grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
}

.dashboard-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  min-width: 0;
}
.dashboard-card h2 { margin: 0 0 1rem; font-size: 1.05rem; font-weight: 600; }
.dashboard-card-favorites,
.dashboard-card-boards { grid-column: 1 / -1; }
@media (min-width: 1100px) {
  .dashboard-card-notifications,
  .dashboard-card-upcoming,
  .dashboard-card-activities { max-height: 380px; overflow-y: auto; }
}

.favorites-grouped { display: flex; flex-direction: column; gap: 1.25rem; }
.favorites-type-label {
  font-size: .75rem; font-weight: 600; color: var(--text-muted);
  letter-spacing: .05em; margin: 0 0 .5rem;
  text-transform: uppercase;
}
.favorites-list { display: flex; flex-wrap: wrap; gap: .5rem; }
.favorite-chip {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem .85rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: .9rem;
  text-decoration: none; color: inherit;
  transition: box-shadow .2s, border-color .2s, background .2s;
}
.favorite-chip:hover { border-color: var(--accent); box-shadow: var(--shadow); background: var(--accent-muted); }
.favorite-chip-icon { color: #eab308; flex-shrink: 0; }

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

.dashboard-item-list { list-style: none; padding: 0; margin: 0; }
.dashboard-item { border-bottom: 1px solid var(--border); }
.dashboard-item:last-child { border-bottom: none; }
.dashboard-item.item-overdue .dashboard-item-title { color: var(--negative); }
.dashboard-item-link {
  display: block; padding: .75rem 0;
  text-decoration: none; color: inherit;
  transition: background .15s; border-radius: var(--radius-sm);
  margin: 0 -0.5rem; padding-left: .5rem; padding-right: .5rem;
}
.dashboard-item-link:hover { background: var(--accent-muted); }
.dashboard-item-title { font-weight: 500; font-size: .9rem; display: block; }
.dashboard-item-meta { font-size: .8rem; color: var(--text-muted); margin-top: .2rem; }
.dashboard-item-amount { font-size: .9rem; font-weight: 600; font-variant-numeric: tabular-nums; margin-top: .25rem; display: block; }
/* Einstellungsseiten (User + Admin) – einheitliche Box-Struktur */
.settings-page h2 { margin-bottom: 1.5rem; }
.settings-sections { display: flex; flex-direction: column; gap: 2rem; }
.settings-sections--grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}
.settings-section {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}
.settings-section h3 { margin: 0 0 .5rem; font-size: 1.1rem; }
.section-desc { color: var(--text-muted); font-size: .9rem; margin-bottom: 1rem; }
.settings-section .label { display: block; margin-bottom: .25rem; }
.settings-section .input,
.settings-section .form-control,
.settings-section select { width: 100%; box-sizing: border-box; padding: .5rem .75rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-elevated); color: var(--text); margin-bottom: 0; }
.settings-section .form-group { margin-bottom: .75rem; }
.settings-section .form-group:last-of-type { margin-bottom: 0; }
.settings-section .form-actions { margin-top: 1rem; }
.text-muted { color: var(--text-muted); font-size: .9rem; margin-bottom: .5rem; }

.table-wrap { overflow-x: auto; margin-top: 1rem; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: .5rem .75rem; text-align: left; border-bottom: 1px solid var(--border); }
.table th { font-weight: 600; color: var(--text-muted); font-size: .85rem; }
.table tbody tr:hover { background: var(--bg); }
.table .inline-form { display: inline; margin-left: .25rem; }

/* Recurring nach Board gruppiert */
/* Board-Formular (Erstellen) */
.board-form-page .settings-sections--grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.board-form-page .settings-section-span-2 { grid-column: 1 / -1; }
.board-form-page .form-actions-bottom { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.person-names-list { display: flex; flex-direction: column; gap: .5rem; margin-bottom: .75rem; }

/* Admin Benutzerformular */
.admin-user-form .admin-section { margin-bottom: 1.5rem; }
.admin-user-form .admin-section:last-of-type { margin-bottom: 0; }
.user-form-fields { display: flex; flex-direction: column; gap: 1rem; max-width: 400px; }
.user-form-fields .form-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.25rem; }
.admin-form-actions {
  display: flex;
  gap: 0.75rem;
  padding-top: 1.5rem;
  margin-top: 1rem;
  border-top: 1px solid var(--border);
}
.admin-empty-hint { color: var(--text-muted); font-size: 0.9rem; margin: 0.5rem 0 0; }
.admin-section--secondary { margin-top: 1.5rem; }

/* Admin Statistik */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}
.admin-stat-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: border-color .15s, box-shadow .15s;
}
.admin-stat-card:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.admin-stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  line-height: 1.2;
}
.admin-stat-label {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
}
.admin-stat-table {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.user-password-form .user-password-fields {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem;
  max-width: 400px;
}
.user-password-fields .form-group { margin-bottom: 0; }
.user-password-fields .form-actions { margin-top: 0; margin-bottom: 0.25rem; }

/* Board-Zuweisungen */
.board-assignments-list { display: flex; flex-direction: column; gap: 0; margin-bottom: 1rem; }
.board-assignment-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.board-assignment-row:last-child { border-bottom: none; }
.board-assignment-name { flex: 1; min-width: 0; font-weight: 500; }
.board-assignment-row .form-control { width: auto; min-width: 180px; flex-shrink: 0; }
.board-assignment-row .board-assignment-remove { flex-shrink: 0; padding: 0.35rem 0.5rem; font-size: 1.2rem; line-height: 1; color: var(--text-muted); }
.board-assignment-row .board-assignment-remove:hover { color: var(--error); }
.board-assignment-add {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-top: 0.75rem;
  margin-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.board-assignment-add .form-control { width: auto; min-width: 160px; }
.person-name-row { display: flex; gap: .5rem; align-items: center; }
.person-name-row .form-control { flex: 1; }
.person-name-row .btn-remove-person { flex-shrink: 0; padding: .35rem .5rem; font-size: 1.2rem; line-height: 1; }
.recurring-quick-add { display: flex; flex-direction: column; gap: .75rem; }
.recurring-quick-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.recurring-quick-row .form-control { flex: 1; min-width: 120px; }
.recurring-quick-row .form-control-narrow { flex: 0 1 120px; min-width: 100px; }

.recurring-by-board { }
.recurring-board-section { margin-bottom: 2rem; }
.recurring-board-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; margin-bottom: .75rem; }
.recurring-board-header h3 { font-size: 1rem; margin: 0; color: var(--text-muted); }
.recurring-board-section .recurring-cards { margin-top: .5rem; }
