/* =============================================================================
 * Mitgliederbereich
 * Gestaltung passend zur Vereinsseite (abgestimmt auf Avada, funktioniert mit jedem Theme): weiße Kästen mit grauem Rand und
 * grüner Linie oben, Raleway-Überschriften in Großbuchstaben, Lato-Fließtext.
 * ========================================================================== */

.sgm {
    --sgm-accent: var(--awb-color5, #549f97);
    --sgm-accent-dark: #3d7d76;
    --sgm-accent-soft: #eef6f5;
    --sgm-ink: var(--awb-color7, #3b4251);
    --sgm-text: #666666;
    --sgm-muted: #8a9099;
    --sgm-line: #e2e2e2;
    --sgm-line-soft: #eeeeee;
    --sgm-soft: #f7f8f8;
    --sgm-warn: #a86b12;
    --sgm-warn-soft: #fdf6e7;
    --sgm-danger: #b23a32;
    --sgm-danger-soft: #fbecea;
    --sgm-ok: #2f7d4f;
    --sgm-ok-soft: #e9f5ee;
    --sgm-btn-bg: #90c9e8;
    --sgm-btn-bg-hover: #7dbde0;
    --sgm-btn-text: #105378;
    --sgm-gap: 24px;
    --sgm-pad: 28px 36px;
    --sgm-heading: Raleway, Arial, Helvetica, sans-serif;
    --sgm-button-font: "PT Sans", Arial, Helvetica, sans-serif;

    max-width: var(--sgm-max-width, none);
    margin: 0 auto;
    color: var(--sgm-text);
    font-size: 15px;
    line-height: 1.6;
    text-align: left;
}

/* Grüne Linie beginnt direkt unter dem Seitenkopf wie auf den Inhaltsseiten (Avada setzt sonst 60 px) */
body #main { padding-top: 1px; }

.sgm *, .sgm *::before, .sgm *::after { box-sizing: border-box; }
.sgm p { margin: 0 0 .8em; }
.sgm p:last-child { margin-bottom: 0; }
.sgm a { color: var(--sgm-accent-dark); }
.sgm a:hover { color: var(--sgm-ink); }
.sgm ul, .sgm ol { margin: 0; padding: 0; list-style: none; }
.sgm li { margin: 0; }
.sgm .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.sgm.sgm h2, .sgm.sgm h3, .sgm.sgm h4 { font-family: var(--sgm-heading); font-weight: 700; color: var(--sgm-ink); letter-spacing: .02em; margin: 0; line-height: 1.3; }
.sgm.sgm h2 { font-size: 22px; text-transform: uppercase; }
.sgm.sgm h3 { font-size: 15px; text-transform: uppercase; }
.sgm.sgm h4 { font-size: 16px; text-transform: none; letter-spacing: 0; }

.sgm-muted { color: var(--sgm-muted); }
.sgm-small { font-size: 13px; color: var(--sgm-muted); }
.sgm-block { display: block; color: var(--sgm-muted); font-size: 13px; }
.sgm-mt { margin-top: 18px !important; }
.sgm-kicker { display: block; font: 700 11px/1.4 var(--sgm-heading); letter-spacing: .1em; text-transform: uppercase; color: var(--sgm-accent); margin-bottom: 4px; }
.sgm-icon { width: 14px; height: 14px; fill: currentColor; vertical-align: -2px; margin-right: 4px; opacity: .7; }
.sgm-spacer { flex: 1; }

/* -----------------------------------------------------------------------------
 * Kästen
 * -------------------------------------------------------------------------- */
.sgm-box, .sgm-card {
    display: block;
    background: #fff;
    border: 1px solid var(--sgm-line);
    border-top: 5px solid var(--sgm-accent);
    padding: var(--sgm-pad);
    margin: 0 0 var(--sgm-gap);
}
.sgm-box-head, .sgm-card > h3:first-child {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
    margin: -4px 0 20px !important; padding-bottom: 14px; border-bottom: 1px solid var(--sgm-line-soft);
}
.sgm-box-head h3 { display: flex; align-items: center; gap: 8px; }
.sgm-card > h3:first-child { justify-content: flex-start; gap: 8px; }
.sgm-box-head-right { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.sgm-box-head-right a:not(.sgm-btn) { font-weight: 700; text-decoration: none; }
.sgm-box-muted { background: var(--sgm-soft); }
.sgm-box-muted .sgm-item, .sgm-box-muted .sgm-note { opacity: .8; }
.sgm-subbox { background: var(--sgm-soft); border: 1px solid var(--sgm-line-soft); padding: 18px 20px; }
.sgm-subbox h4 { margin-bottom: 4px !important; }

.sgm-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; }
.sgm-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 20px; }
.sgm-grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 20px; }
.sgm-grid-plz { display: grid; grid-template-columns: 140px minmax(0, 1fr); column-gap: 20px; }
.sgm-grid-gap { row-gap: 20px; }
.sgm-grid-top { column-gap: var(--sgm-gap); align-items: stretch; }
.sgm-grid-top > .sgm-box, .sgm-grid-top > .sgm-card { margin-bottom: var(--sgm-gap); }
.sgm-grid-top > div > .sgm-card, .sgm-grid-top > div > .sgm-box { margin-bottom: var(--sgm-gap); }

/* -----------------------------------------------------------------------------
 * Kopf: Begrüßung und Navigation
 * -------------------------------------------------------------------------- */
.sgm-shell { padding: 0; margin-bottom: 0 !important; }
.sgm-topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 20px; padding: 22px 36px 18px; }
.sgm-hello { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.sgm-hello .sgm-kicker { width: 100%; margin: 0; }
.sgm-hello strong { font: 700 20px/1.3 var(--sgm-heading); color: var(--sgm-ink); text-transform: uppercase; letter-spacing: .02em; }
.sgm-topbar-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.sgm-nav { display: flex; flex-wrap: wrap; gap: 2px; padding: 0 28px; border-top: 1px solid var(--sgm-line-soft); }
.sgm-nav a { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 14px 12px 13px; color: var(--sgm-ink); font-weight: 700; font-size: 14px; text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.sgm-nav a:hover { color: var(--sgm-accent-dark); }
.sgm-nav a.is-active { color: var(--sgm-accent-dark); border-bottom-color: var(--sgm-accent); }
.sgm-nav a.sgm-nav-manage { color: var(--sgm-muted); }
.sgm-nav a.sgm-nav-manage.is-active { color: var(--sgm-accent-dark); }
.sgm-nav a.sgm-nav-manage:not(.sgm-nav-manage ~ .sgm-nav-manage) { margin-left: auto; }

.sgm-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--sgm-danger); color: #fff; font: 700 11px/1 Arial, Helvetica, sans-serif; }

/* -----------------------------------------------------------------------------
 * Kopf-Kasten eines Bereichs mit Reitern
 * -------------------------------------------------------------------------- */
.sgm-page-head { padding-bottom: 0; }
.sgm-page-head-main { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px 32px; padding-bottom: 22px; }
.sgm-page-head-text { flex: 1 1 420px; min-width: 0; }
.sgm-page-head h2 { display: flex; align-items: center; gap: 10px; margin-bottom: 8px !important; }
.sgm-page-head h2 { flex-wrap: nowrap; min-width: 0; }
.sgm-h2-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.sgm-page-head-text > p.sgm-subline { margin: 0 !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sgm-page-head .sgm-page-head-main { flex-wrap: nowrap; align-items: center; padding-bottom: 0; }
.sgm-page-head { padding-bottom: 24px !important; }
.sgm-head-extra { padding-top: 18px !important; padding-bottom: 18px !important; }
.sgm-head-extra .sgm-stat { text-align: left; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; background: none; padding: 0; }
.sgm-box.sgm-views { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 12px 36px !important; border-top-width: 1px; }
.sgm-views a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; font-weight: 700; font-size: 13px; color: var(--sgm-muted); text-decoration: none; border: 1px solid var(--sgm-line); background: #fff; }
.sgm-views a:hover { color: var(--sgm-ink); border-color: var(--sgm-accent); }
.sgm-views a.is-active { background: var(--sgm-accent); border-color: var(--sgm-accent); color: #fff; }
.sgm-views a.is-active .sgm-badge { background: #fff; color: var(--sgm-accent-dark); }
.sgm-page-head-aside { flex: 0 0 auto; }

.sgm-page-head-aside { display: flex; align-items: center; gap: 10px; }
/* Hilfe-Aufklappliste rechts im Seitenkopf (liegt über dem Inhalt, nichts verschiebt sich) */
.sgm-hilfe-dd { position: relative; }
.sgm-hilfe-dd > summary { display: inline-flex; align-items: center; gap: 8px; list-style: none; cursor: pointer; padding: 6px 10px 6px 6px; border: 1px solid var(--sgm-line); background: #fff; font-size: 14px; font-weight: 600; color: var(--sgm-ink); user-select: none; }
.sgm-hilfe-dd > summary::-webkit-details-marker { display: none; }
.sgm-hilfe-dd > summary:hover, .sgm-hilfe-dd[open] > summary { border-color: var(--sgm-accent); }
.sgm-hilfe-dd > summary .sgm-icon { width: 18px; height: 18px; transition: transform .15s; }
.sgm-hilfe-dd[open] > summary .sgm-icon { transform: rotate(180deg); }
.sgm-hilfe-dd-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; width: 340px; max-width: calc(100vw - 40px); max-height: min(70vh, 560px); overflow-y: auto; overscroll-behavior: contain; background: #fff; border: 1px solid var(--sgm-line); box-shadow: 0 10px 30px rgba(0,0,0,.14); padding: 6px 0; text-align: left; }
.sgm-hilfe-dd-panel ul { list-style: none; margin: 0 !important; padding: 0 !important; }
.sgm-hilfe-dd-panel li { margin: 0 !important; }
.sgm-hilfe-dd-panel a { display: block; padding: 6px 16px; font-size: 14px; color: var(--sgm-text); text-decoration: none; line-height: 1.35; }
.sgm-hilfe-dd-panel a:hover, .sgm-hilfe-dd-panel a:focus { background: var(--sgm-soft); color: var(--sgm-accent); }
.sgm-hilfe-dd-alle ul a { padding-left: 30px; font-size: 13px; }
.sgm-hilfe-dd-panel a.is-kapitel { font-weight: 700; color: var(--sgm-ink); }
.sgm-hilfe-dd-head { margin: 8px 16px 4px !important; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--sgm-muted); }
.sgm-hilfe-dd-foot { margin: 6px 0 0 !important; border-top: 1px solid var(--sgm-line-soft); padding-top: 4px; }
@media (max-width: 640px) { .sgm-hilfe-dd > summary > span:not(.sgm-help-link) { display: none; } .sgm-hilfe-dd-panel { width: calc(100vw - 32px); } .sgm-box.sgm-views { padding: 10px 16px !important; } }

.sgm-tabs { display: flex; flex-wrap: wrap; gap: 2px; margin: 0 -36px; padding: 0 24px; border-top: 1px solid var(--sgm-line-soft); }
.sgm-tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 13px 12px 12px; font-weight: 700; font-size: 14px; color: var(--sgm-muted); text-decoration: none; border-bottom: 3px solid transparent; }
.sgm-tabs a:hover { color: var(--sgm-ink); }
.sgm-tabs a.is-active { color: var(--sgm-accent-dark); border-bottom-color: var(--sgm-accent); }
.sgm-views-label { font-size: 12px; font-weight: 700; color: var(--sgm-muted); text-transform: uppercase; letter-spacing: .05em; margin-right: 6px; }

.sgm-stat { text-align: right; min-width: 150px; padding: 12px 18px; background: var(--sgm-accent-soft); }
.sgm-stat span { display: block; font-size: 12px; color: var(--sgm-muted); text-transform: uppercase; letter-spacing: .05em; }
.sgm-stat strong { display: block; font: 700 26px/1.2 var(--sgm-heading); color: var(--sgm-accent-dark); }

/* -----------------------------------------------------------------------------
 * Listen (Zeilen innerhalb eines Kastens)
 * -------------------------------------------------------------------------- */
.sgm-list > .sgm-item, .sgm-list > .sgm-note { border-top: 1px solid var(--sgm-line-soft); }
.sgm-list > :first-child { border-top: 0; padding-top: 0; }
.sgm-list > :last-child { padding-bottom: 0; }
.sgm-item { display: flex; gap: 20px; padding: 20px 0; }
.sgm-item.is-mine .sgm-datebox { background: var(--sgm-accent); }
.sgm-item.is-mine .sgm-datebox strong, .sgm-item.is-mine .sgm-datebox span { color: #fff; }
.sgm-item-body { flex: 1; min-width: 0; }
.sgm-item-body h4 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 4px !important; }
.sgm-meta { color: var(--sgm-muted); font-size: 13px; margin: 0 0 8px !important; }
.sgm-text { margin-bottom: 10px; }
.sgm-text p { margin-bottom: .6em; }
.sgm-item-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }

.sgm-datebox { flex: 0 0 64px; align-self: flex-start; padding: 8px 0 7px; text-align: center; background: var(--sgm-accent-soft); line-height: 1.15; }
.sgm-datebox span { display: block; font: 700 11px/1.3 var(--sgm-heading); text-transform: uppercase; letter-spacing: .05em; color: var(--sgm-accent-dark); }
.sgm-datebox strong { display: block; font: 700 24px/1.15 var(--sgm-heading); color: var(--sgm-ink); }

.sgm-chip { display: inline-block; padding: 3px 8px; background: var(--sgm-accent); color: #fff; font: 700 11px/1.2 Arial, Helvetica, sans-serif; text-transform: uppercase; letter-spacing: .04em; vertical-align: middle; }
.sgm-chip-light { background: var(--sgm-accent-soft); color: var(--sgm-accent-dark); }
.sgm-chip-warn { background: var(--sgm-warn-soft); color: var(--sgm-warn); }
.sgm-topbar .sgm-chip { background: var(--sgm-accent-soft); color: var(--sgm-accent-dark); }

.sgm-slots { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 13px; color: var(--sgm-muted); }
.sgm-bar { flex: 0 0 140px; height: 6px; background: var(--sgm-line-soft); overflow: hidden; }
.sgm-bar span { display: block; height: 100%; background: var(--sgm-accent); }
.sgm-names { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px !important; }
.sgm-names li, .sgm-person { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; background: var(--sgm-soft); border: 1px solid var(--sgm-line-soft); font-size: 13px; color: var(--sgm-text); }
.sgm-person { margin: 2px 4px 2px 0; }
.sgm-person-open { background: var(--sgm-warn-soft); border-color: #f2e2bd; color: var(--sgm-warn); font-style: italic; }

/* Mitteilungen */
.sgm-note { padding: 20px 0; }
.sgm-note h4 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px !important; }
.sgm-note.is-important h4::before { content: ""; width: 4px; align-self: stretch; background: var(--sgm-warn); }

/* Pinnwand */
.sgm-posts > .sgm-post { border-top: 1px solid var(--sgm-line-soft); }
.sgm-posts > .sgm-post:first-child { border-top: 0; padding-top: 0; }
.sgm-post { display: flex; gap: 16px; padding: 18px 0; }
.sgm-avatar { flex: 0 0 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: var(--sgm-accent-soft); color: var(--sgm-accent-dark); font: 700 16px/1 var(--sgm-heading); }
.sgm-post-body { flex: 1; min-width: 0; }
.sgm-post .sgm-meta { margin-bottom: 4px !important; }
.sgm-post .sgm-meta strong { color: var(--sgm-ink); }
.sgm-pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--sgm-line-soft); color: var(--sgm-muted); font-size: 13px; }

/* Dokumente */
.sgm-docs > li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px 0; border-top: 1px solid var(--sgm-line-soft); }
.sgm-docs > li:first-child { border-top: 0; padding-top: 0; }
.sgm-docs > li:last-child { padding-bottom: 0; }
.sgm-doc { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 240px; text-decoration: none; }
.sgm-doc strong { display: block; color: var(--sgm-ink); font-weight: 700; }
.sgm-doc:hover strong { color: var(--sgm-accent-dark); text-decoration: underline; }
.sgm-doc small { color: var(--sgm-muted); font-size: 12px; }
.sgm-doc-ext { flex: 0 0 46px; height: 46px; display: flex; align-items: center; justify-content: center; background: var(--sgm-accent-soft); color: var(--sgm-accent-dark); font: 700 11px/1 Arial, Helvetica, sans-serif; letter-spacing: .04em; }
.sgm-doc-actions { display: flex; gap: 8px; }

/* Kleine Listen in der Übersicht */
.sgm-mini > li { border-top: 1px solid var(--sgm-line-soft); }
.sgm-mini > li:first-child { border-top: 0; }
.sgm-mini a { display: block; padding: 10px 0; color: var(--sgm-text); text-decoration: none; }
.sgm-mini > li:first-child a { padding-top: 0; }
.sgm-mini a:hover strong { color: var(--sgm-accent-dark); }
.sgm-mini strong { display: block; color: var(--sgm-ink); font-size: 14px; }
.sgm-mini span { font-size: 14px; }
.sgm-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sgm-kpis > div { padding: 14px 16px; background: var(--sgm-soft); border: 1px solid var(--sgm-line-soft); }
.sgm-kpis strong { display: block; font: 700 26px/1.2 var(--sgm-heading); color: var(--sgm-accent-dark); }
.sgm-kpis span { font-size: 13px; color: var(--sgm-muted); }
.sgm-box-todo { border-top-color: var(--sgm-warn); }
.sgm-todo-list > li { padding: 8px 0 8px 22px; position: relative; border-top: 1px solid var(--sgm-line-soft); }
.sgm-todo-list > li:first-child { border-top: 0; padding-top: 0; }
.sgm-todo-list > li:first-child::before { top: 0; }
.sgm-todo-list > li::before { content: "!"; position: absolute; left: 0; top: 8px; width: 15px; height: 15px; border-radius: 50%; background: var(--sgm-warn); color: #fff; font: 700 10px/15px Arial, sans-serif; text-align: center; }
.sgm-todo-list a { font-weight: 700; text-decoration: none; }

.sgm-approval { flex-wrap: wrap; justify-content: space-between; }
.sgm-dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; font-size: 14px; }
.sgm-dl dt { color: var(--sgm-muted); }
.sgm-dl dd { margin: 0; color: var(--sgm-ink); }
.sgm-danger-zone { border-top-color: var(--sgm-danger); }
.sgm-empty { margin: 0; padding: 22px; text-align: center; color: var(--sgm-muted); background: var(--sgm-soft); border: 1px dashed var(--sgm-line); }
.sgm-box > .sgm-empty:only-child { margin: 0; }

/* -----------------------------------------------------------------------------
 * Tabellen
 * -------------------------------------------------------------------------- */
.sgm-table-wrap { overflow-x: auto; margin: 0; }
.sgm-table { width: 100%; border-collapse: collapse; margin: 0 !important; border: 0 !important; font-size: 14px; }
.sgm-table th, .sgm-table td { padding: 11px 12px !important; border: 0 !important; border-bottom: 1px solid var(--sgm-line-soft) !important; text-align: left; vertical-align: middle; background: none; }
.sgm-table th { color: var(--sgm-ink); font: 700 12px/1.4 var(--sgm-heading); text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; border-bottom: 2px solid var(--sgm-line) !important; }
.sgm-table th:first-child, .sgm-table td:first-child { padding-left: 0 !important; }
.sgm-table th:last-child, .sgm-table td:last-child { padding-right: 0 !important; }
.sgm-table tbody tr:last-child td { border-bottom: 0 !important; }
.sgm-table tbody tr:hover td { background: var(--sgm-soft); }
.sgm-table tr.is-locked td { opacity: .55; }
.sgm-td-actions { white-space: nowrap; text-align: right !important; }
.sgm-td-actions > * { margin: 2px 0 2px 6px; }
.sgm-dienste tr.is-newday td { border-top: 2px solid var(--sgm-line) !important; }
.sgm-dienste tbody tr:first-child td { border-top: 0 !important; }
.sgm-dienste tr.is-mine td { background: var(--sgm-accent-soft); }
.sgm-dienste td:first-child strong { color: var(--sgm-ink); white-space: nowrap; }

.sgm-status { display: inline-block; padding: 3px 8px; font: 700 11px/1.2 Arial, Helvetica, sans-serif; text-transform: uppercase; letter-spacing: .03em; }
.sgm-status-offen { background: var(--sgm-warn-soft); color: var(--sgm-warn); }
.sgm-status-bestaetigt { background: var(--sgm-ok-soft); color: var(--sgm-ok); }
.sgm-status-abgelehnt { background: var(--sgm-danger-soft); color: var(--sgm-danger); }

/* Schießbuch-Auswertung */
.sgm-months { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 3px; margin: 10px 0 14px; }
.sgm-months span { display: flex; flex-direction: column; align-items: center; padding: 5px 0; background: #fff; border: 1px solid var(--sgm-line-soft); font-size: 10px; color: var(--sgm-muted); text-transform: uppercase; }
.sgm-months span b { font-size: 15px; color: var(--sgm-muted); }
.sgm-months span.is-ok { background: var(--sgm-accent); border-color: var(--sgm-accent); color: #e5f3f1; }
.sgm-months span.is-ok b { color: #fff; }
.sgm-criteria { display: grid; gap: 6px; font-size: 13px; }
.sgm-criteria li { position: relative; padding: 8px 10px 8px 34px; background: #fff; border: 1px solid var(--sgm-line-soft); }
.sgm-criteria li::before { position: absolute; left: 11px; top: 8px; font-weight: 800; }
.sgm-criteria li.is-ok { background: var(--sgm-ok-soft); border-color: #cfe7d8; }
.sgm-criteria li.is-ok::before { content: "✓"; color: var(--sgm-ok); }
.sgm-criteria li.is-missing::before { content: "○"; color: var(--sgm-muted); }
.sgm-yearnav { display: flex; gap: 4px; }
.sgm-yearnav a { padding: 4px 10px; border: 1px solid var(--sgm-line); font-weight: 700; font-size: 13px; text-decoration: none; color: var(--sgm-ink); }
.sgm-yearnav a.is-active { background: var(--sgm-accent); border-color: var(--sgm-accent); color: #fff; }

/* -----------------------------------------------------------------------------
 * Meldungen
 * -------------------------------------------------------------------------- */
.sgm-alert { padding: 14px 18px; margin: 0 0 var(--sgm-gap); border: 1px solid; border-left-width: 5px; font-weight: 700; font-size: 14px; background: #fff; }
.sgm-alert-ok { border-color: #cfe7d8; border-left-color: var(--sgm-ok); color: var(--sgm-ok); background: var(--sgm-ok-soft); }
.sgm-alert-fehler { border-color: #efcfcb; border-left-color: var(--sgm-danger); color: var(--sgm-danger); background: var(--sgm-danger-soft); }
.sgm-alert-hinweis { border-color: #f2e2bd; border-left-color: var(--sgm-warn); color: var(--sgm-warn); background: var(--sgm-warn-soft); }

/* -----------------------------------------------------------------------------
 * Formulare
 * -------------------------------------------------------------------------- */
.sgm-form { margin: 0; }
.sgm-field { margin: 0 0 16px; border: 0; padding: 0; min-width: 0; }
.sgm-field > label, .sgm-field > legend { display: flex; align-items: center; gap: 4px; margin-bottom: 6px; padding: 0; font-weight: 700; font-size: 13px; color: var(--sgm-ink); }
.sgm-req { color: var(--sgm-danger); }
.sgm .sgm-field input:not([type=checkbox]):not([type=radio]),
.sgm .sgm-field select,
.sgm .sgm-field textarea,
.sgm .sgm-toolbar input[type=search],
.sgm .sgm-assign select,
.sgm .sgm-assign input[type=text] {
    width: 100%; height: 44px; min-height: 0; padding: 0 12px; margin: 0;
    border: 1px solid #d5d9dd; border-radius: 0; background: #fff; color: var(--sgm-ink);
    font: inherit; font-size: 15px; line-height: 1.4; box-shadow: none;
}
.sgm .sgm-field textarea { height: auto; min-height: 110px; padding: 10px 12px; resize: vertical; }
.sgm .sgm-field input[type=file] { padding: 9px 10px; height: auto; }
.sgm .sgm-field input:focus, .sgm .sgm-field select:focus, .sgm .sgm-field textarea:focus,
.sgm .sgm-toolbar input:focus, .sgm .sgm-assign select:focus, .sgm .sgm-assign input:focus { outline: 2px solid var(--sgm-accent); outline-offset: -1px; border-color: var(--sgm-accent); }
.sgm-help { display: block; margin-top: 5px; color: var(--sgm-muted); font-size: 12px; }
.sgm-check { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 10px; font-size: 14px; color: var(--sgm-ink); cursor: pointer; }
.sgm-check input { width: 16px; height: 16px; margin: 3px 0 0; accent-color: var(--sgm-accent); flex: 0 0 auto; }
.sgm-field-checks { padding-top: 26px; }
.sgm-field-checks .sgm-help-link { margin: -4px 0 10px 26px; }
.sgm-days { display: flex; flex-wrap: wrap; gap: 6px; }
.sgm-day input { position: absolute; opacity: 0; }
.sgm-day span { display: inline-block; min-width: 46px; padding: 10px 6px; border: 1px solid #d5d9dd; text-align: center; font-weight: 700; font-size: 14px; color: var(--sgm-ink); cursor: pointer; }
.sgm-day input:checked + span { background: var(--sgm-accent); border-color: var(--sgm-accent); color: #fff; }
.sgm-day input:focus-visible + span { outline: 2px solid var(--sgm-ink); }
.sgm-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 8px; }
.sgm-actions > a:not(.sgm-btn) { font-size: 14px; }
.sgm-hp { position: absolute !important; left: -9999px !important; height: 1px; overflow: hidden; }
.sgm-inline-form { display: inline-flex; margin: 0; vertical-align: middle; }
.sgm-assign { gap: 6px; align-items: center; flex-wrap: wrap; max-width: 100%; }
.sgm .sgm-assign select, .sgm .sgm-assign input[type=text] { width: auto; min-width: 150px; height: 32px; padding: 0 8px; font-size: 13px; }
.sgm-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 16px; }
.sgm .sgm-toolbar input[type=search] { width: 280px; max-width: 100%; height: 36px; font-size: 14px; }

/* Ausklappbare Verwaltungsformulare */
.sgm-panel { padding: 0; }
.sgm-panel > summary { display: flex; align-items: center; gap: 10px; padding: 18px 36px; cursor: pointer; list-style: none; font: 700 14px/1.3 var(--sgm-heading); text-transform: uppercase; letter-spacing: .03em; color: var(--sgm-accent-dark); }
.sgm-panel > summary::-webkit-details-marker { display: none; }
.sgm-panel > summary::before { content: "+"; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; background: var(--sgm-accent); color: #fff; font: 700 16px/1 Arial, sans-serif; }
.sgm-panel[open] > summary::before { content: "–"; }
.sgm-panel[open] > summary { border-bottom: 1px solid var(--sgm-line-soft); }
.sgm-panel-body { padding: 24px 36px 28px; }

/* -----------------------------------------------------------------------------
 * Schaltflächen (wie „Mehr Informationen“ auf der Startseite)
 * -------------------------------------------------------------------------- */
.sgm .sgm-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: auto; width: auto; margin: 0; padding: 11px 20px;
    border: 1px solid transparent; border-radius: 0; box-shadow: none;
    font: 700 13px/1.2 var(--sgm-button-font); text-transform: uppercase; letter-spacing: .04em; text-decoration: none;
    white-space: nowrap; cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.sgm .sgm-btn-small { padding: 7px 12px; font-size: 11.5px; }
.sgm .sgm-btn-primary { background: var(--sgm-btn-bg); color: var(--sgm-btn-text); }
.sgm .sgm-btn-primary:hover { background: var(--sgm-btn-bg-hover); color: var(--sgm-btn-text); }
.sgm .sgm-btn-secondary, .sgm .sgm-btn-ghost { background: #fff; color: var(--sgm-ink); border-color: #cfd5da; }
.sgm .sgm-btn-secondary:hover, .sgm .sgm-btn-ghost:hover { border-color: var(--sgm-accent); color: var(--sgm-accent-dark); background: #fff; }
.sgm .sgm-btn-danger { background: #fff; color: var(--sgm-danger); border-color: #efcfcb; }
.sgm .sgm-btn-danger:hover { background: var(--sgm-danger); border-color: var(--sgm-danger); color: #fff; }
.sgm .sgm-x { border: 0; background: transparent; color: var(--sgm-muted); cursor: pointer; padding: 0 2px; font-size: 15px; line-height: 1; height: auto; min-height: 0; box-shadow: none; }
.sgm .sgm-x:hover { color: var(--sgm-danger); background: transparent; }
.sgm .sgm-link-danger { border: 0; background: none; padding: 0; margin-top: 6px; color: var(--sgm-danger); font-size: 12px; cursor: pointer; text-decoration: underline; height: auto; min-height: 0; box-shadow: none; }

/* Hilfe-Links (?) zum Handbuch */
.sgm .sgm-help-link { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 20px; height: 20px; margin: 0 2px; border: 1.5px solid var(--sgm-accent); border-radius: 50%; background: #fff; color: var(--sgm-accent-dark); font: 700 11px/1 Arial, Helvetica, sans-serif; text-decoration: none; text-transform: none; letter-spacing: 0; vertical-align: middle; cursor: help; }
.sgm .sgm-help-link:hover, .sgm .sgm-help-link:focus-visible { background: var(--sgm-accent); color: #fff; }
.sgm h2 .sgm-help-link { width: 22px; height: 22px; font-size: 12px; }
.sgm .sgm-panel > summary .sgm-help-link { margin-left: 0; }

/* -----------------------------------------------------------------------------
 * Anmeldung
 * -------------------------------------------------------------------------- */
.sgm-login-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: var(--sgm-gap); align-items: stretch; }
.sgm-login-layout > .sgm-card { margin: 0 0 var(--sgm-gap); }
.sgm-login-card { padding: 36px 44px; }
.sgm-login-card h2 { display: flex; align-items: center; gap: 10px; margin-bottom: 22px !important; }
.sgm-login-info { background: var(--sgm-soft); }
.sgm-login-info > h3:first-child { margin-bottom: 16px !important; }
.sgm-checklist > li { position: relative; padding: 7px 0 7px 26px; color: var(--sgm-ink); }
.sgm-checklist > li::before { content: "✓"; position: absolute; left: 0; top: 7px; color: var(--sgm-accent); font-weight: 800; }
.sgm-login-info .sgm-muted { margin-top: 16px; font-size: 13px; }

/* -----------------------------------------------------------------------------
 * Responsiv
 * -------------------------------------------------------------------------- */
@media (max-width: 980px) {
    .sgm { --sgm-pad: 22px 24px; }
    .sgm-topbar { padding: 20px 24px 16px; }
    .sgm-nav { padding: 0 16px; }
    .sgm-tabs { margin: 0 -24px; padding: 0 12px; }
    .sgm-panel > summary { padding: 16px 24px; }
    .sgm-panel-body { padding: 20px 24px 24px; }
    .sgm-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sgm-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sgm-login-layout { grid-template-columns: 1fr; }
    .sgm-nav a.sgm-nav-manage:not(.sgm-nav-manage ~ .sgm-nav-manage) { margin-left: 0; }
}
@media (max-width: 680px) {
    .sgm { --sgm-pad: 18px 16px; --sgm-gap: 16px; font-size: 14.5px; }
    .sgm.sgm h2 { font-size: 19px; }
    .sgm-topbar { padding: 16px; }
    .sgm-nav { padding: 0 6px; }
    .sgm-nav a { padding: 11px 8px 10px; font-size: 13px; }
    .sgm-tabs { margin: 0 -16px; padding: 0 6px; }
    .sgm-tabs a { padding: 11px 8px 10px; font-size: 13px; }
    .sgm-panel > summary { padding: 14px 16px; }
    .sgm-panel-body { padding: 16px; }
    .sgm-grid-2, .sgm-grid-3, .sgm-grid-4, .sgm-grid-plz { grid-template-columns: 1fr; }
    .sgm-field-checks { padding-top: 0; }
    .sgm-login-card { padding: 24px 18px; }
    .sgm-item { gap: 14px; padding: 16px 0; }
    .sgm-datebox { flex-basis: 54px; }
    .sgm-months { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .sgm-stat { text-align: left; }
    .sgm-kpis { grid-template-columns: 1fr 1fr; }
    /* Tabellen als Zeilenblöcke */
    .sgm-table thead { display: none; }
    .sgm-table, .sgm-table tbody, .sgm-table tr, .sgm-table td { display: block; width: 100%; }
    .sgm-table tr { padding: 10px 0; border-bottom: 1px solid var(--sgm-line-soft); }
    .sgm-table td { padding: 3px 0 !important; border: 0 !important; text-align: left !important; }
    .sgm-table td[data-label]::before { content: attr(data-label) ": "; font-weight: 700; color: var(--sgm-muted); font-size: 12px; }
    .sgm-table td:empty { display: none; }
    .sgm-td-actions { white-space: normal; padding-top: 8px !important; }
    .sgm-td-actions > * { margin: 3px 6px 3px 0; }
    .sgm-dienste tr.is-newday td { border-top: 0 !important; }
    .sgm-dienste tr.is-newday { border-top: 2px solid var(--sgm-line); }
    .sgm .sgm-assign select, .sgm .sgm-assign input[type=text] { min-width: 0; flex: 1 1 140px; }
    .sgm-topbar-actions .sgm-btn { padding: 9px 12px; }
}

/* ===== Version 2: neue Funktionen ===== */
.sgm-progress p { margin: 8px 0 0 !important; }
.sgm-progress-bar { height: 10px; background: var(--sgm-line-soft); overflow: hidden; }
.sgm-progress-bar span { display: block; height: 100%; background: var(--sgm-accent); }
.sgm-table tr.is-ok td { background: var(--sgm-ok-soft); }
.sgm-table tr.is-warn td { background: var(--sgm-warn-soft); }
.sgm-table tr.is-mine td { background: var(--sgm-accent-soft); }
.sgm-table tr.sgm-row-form td { background: var(--sgm-soft); border-top: 0; }
.sgm-mini > li > span { display: block; padding: 10px 0; }
.sgm-mini > li:first-child > span { padding-top: 0; }
.sgm-mini > li:has(form) { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sgm-mini > li:has(form) > span { flex: 1 1 auto; }
.sgm-poll-options { list-style: none; margin: 12px 0 0 !important; padding: 0 !important; display: grid; gap: 8px; }
.sgm-poll-options > li { display: grid; grid-template-columns: minmax(0, 1fr) 200px; align-items: center; gap: 4px 16px; padding: 10px 14px; background: var(--sgm-soft); border: 1px solid var(--sgm-line-soft); }
.sgm-poll-options > li.is-mine { border-color: var(--sgm-accent); background: var(--sgm-accent-soft); }
.sgm-poll-options > li > small { grid-column: 1 / -1; }
.sgm-poll-options .sgm-check { margin: 0; }
.sgm-poll-label { color: var(--sgm-ink); }
.sgm-poll-result { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.sgm-poll-result .sgm-bar { flex: 1 1 auto; height: 8px; }
.sgm-poll-result strong { min-width: 2em; text-align: right; color: var(--sgm-ink); }
.sgm-rsvp { margin-top: 10px; padding: 10px 14px; background: var(--sgm-soft); border-left: 3px solid var(--sgm-accent); }
.sgm-rsvp p { margin: 0 0 6px !important; }
.sgm-rsvp-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sgm-rsvp-form input[type=text] { flex: 1 1 180px; }
.sgm-rsvp-list { margin-top: 8px; }
.sgm-rsvp-list summary { cursor: pointer; font-weight: 700; color: var(--sgm-accent-dark); font-size: 13px; }
.sgm-switch { display: flex; flex-wrap: wrap; gap: 6px; }
.sgm-switch .sgm-day span { padding: 8px 14px; min-width: 0; }
.sgm-toggle-part[hidden] { display: none !important; }
.sgm-box-crown .sgm-kpis { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.sgm-box-crown .sgm-kpis strong { font-size: 18px; }
.sgm-widgets { margin-bottom: var(--sgm-gap); display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--sgm-gap); align-items: start; }
.sgm-widgets > .sgm-box { margin: 0 !important; }
@media (max-width: 700px) {
    .sgm-poll-options > li { grid-template-columns: 1fr; }
}

/* ===== Version 2.1: Administration, Gastzugang ===== */
.sgm-gastlogin { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--sgm-line-soft); }
.sgm-gastlogin h3 { margin: 0 0 4px !important; font-size: 15px !important; }
.sgm-gastlogin .sgm-inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sgm-rechte th, .sgm-rechte td { text-align: center; vertical-align: middle; }
.sgm-rechte th:first-child, .sgm-rechte td:first-child { text-align: left; }
.sgm-rechte tr.sgm-rechte-gruppe th { text-align: left; background: var(--sgm-soft); color: var(--sgm-accent-dark); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.sgm-rechte tr.is-sub td:first-child { padding-left: 28px; }
.sgm-rechte input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--sgm-accent); }

/* ===== Version 2.2: Menü mit Gruppen ===== */
/* Menü: eine Navigation in zwei Zeilen – oben die Gruppen, darunter die Punkte der aktiven Gruppe */
.sgm-menu { border: 1px solid var(--sgm-line); border-top: 1px solid var(--sgm-line-soft); margin: -1px 0 var(--sgm-gap); }
.sgm-menu-l1, .sgm-menu-l2 { display: flex; align-items: stretch; padding: 0 24px; overflow-x: auto; scrollbar-width: none; }
.sgm-menu-l1::-webkit-scrollbar, .sgm-menu-l2::-webkit-scrollbar { display: none; }
.sgm-menu-top { display: inline-flex; align-items: center; gap: 9px; padding: 15px 15px 14px; color: var(--sgm-ink) !important; font: 700 15px/1.2 var(--sgm-body, inherit); text-decoration: none !important; white-space: nowrap; flex: none; }
.sgm-menu-top:hover { color: var(--sgm-accent-dark) !important; background: var(--sgm-soft); }
.sgm-menu-top.is-active { background: var(--sgm-accent-soft); color: var(--sgm-accent-dark) !important; }
.sgm-menu-top.sgm-menu-right { margin-left: auto; }
.sgm-micon { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--sgm-accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sgm-menu-top.is-active .sgm-micon { stroke: var(--sgm-accent-dark); }
.sgm-menu-l2 { gap: 2px; background: var(--sgm-accent-soft); }
.sgm-menu-l2 a { display: inline-flex; align-items: center; gap: 6px; padding: 12px 14px 11px; font-weight: 700; font-size: 14px; color: #627471 !important; text-decoration: none !important; border-bottom: 3px solid transparent; white-space: nowrap; flex: none; }
.sgm-menu-l2 a:hover { color: var(--sgm-ink) !important; }
.sgm-menu-l2 a.is-active { color: var(--sgm-accent-dark) !important; border-bottom-color: var(--sgm-accent); }
.sgm-menu-top:focus-visible, .sgm-menu-l2 a:focus-visible { outline: 2px solid var(--sgm-accent); outline-offset: -2px; }
.sgm-menu .sgm-badge { margin-left: 2px; }
@media (min-width: 861px) and (max-width: 1200px) {
    .sgm-menu-l1, .sgm-menu-l2 { padding: 0 14px; }
    .sgm-menu-top { padding: 15px 10px 14px; gap: 7px; font-size: 14px; }
    .sgm-menu-l2 a { padding: 12px 10px 11px; font-size: 13.5px; }
}
@media (max-width: 860px) {
    .sgm-menu-l1, .sgm-menu-l2 { padding: 0 8px; }
    .sgm-menu-top { padding: 13px 10px 12px; gap: 7px; font-size: 14px; }
    .sgm-menu-top.sgm-menu-right { margin-left: 0; }
    .sgm-menu-l2 a { padding: 11px 10px 10px; font-size: 13px; }
}

/* ===== Version 2.2: Übersicht als Dashboard ===== */
.sgm-dash { --sgm-dash-gap: 24px; }
.sgm-dash-grid { display: grid; gap: var(--sgm-dash-gap); grid-auto-rows: auto; align-items: stretch; }
.sgm-dash-1 { grid-template-columns: minmax(0, 1fr); }
.sgm-dash-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sgm-dash-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sgm-widget { position: relative; min-width: 0; display: flex; flex-direction: column; }
.sgm-widget > .sgm-box { flex: 1 1 auto; }
.sgm-widget.is-zu { align-self: start; }
.sgm-widget > .sgm-box, .sgm-widget > .sgm-card { margin: 0 !important; }
.sgm-dash .sgm-kpis { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.sgm-empty-ok { color: var(--sgm-ok) !important; }
/* Einklappen */
.sgm-widget-collapse { position: absolute; z-index: 2; top: 20px; right: 14px; width: 26px; height: 26px; padding: 0; border: 1px solid transparent; background: transparent; cursor: pointer; border-radius: 50%; }
.sgm-widget-collapse::before { content: ""; position: absolute; left: 8px; top: 7px; width: 8px; height: 8px; border-right: 2px solid var(--sgm-muted); border-bottom: 2px solid var(--sgm-muted); transform: rotate(45deg); transition: transform .15s; }
.sgm-widget.is-zu .sgm-widget-collapse::before { transform: rotate(-45deg); top: 9px; left: 6px; }
.sgm-widget-collapse:hover, .sgm-widget-collapse:focus-visible { border-color: var(--sgm-line); background: var(--sgm-soft); }
.sgm-widget .sgm-box-head { padding-right: 34px; }
.sgm-widget.is-zu .sgm-box > :not(.sgm-box-head) { display: none !important; }
.sgm-widget.is-zu .sgm-box-head { margin-bottom: 0 !important; padding-bottom: 0 !important; border-bottom: 0 !important; }
.sgm-dash.is-editing .sgm-widget-collapse { display: none; }
/* Bearbeiten */
.sgm-dash-toolbar { margin-bottom: var(--sgm-gap) !important; padding: 16px 24px !important; position: sticky; top: calc(var(--sgm-sticky-top, 0px) + var(--sgm-menu-h, 0px) + 8px); z-index: 30; box-shadow: 0 6px 18px rgba(40, 50, 60, .10); }
.sgm-dash-toolbar[hidden] { display: none !important; }
.sgm-dash-toolbar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.sgm-dash-toolbar-row + .sgm-dash-toolbar-row { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--sgm-line-soft); }
.sgm-dash-admin select { padding: 6px 10px; }
.sgm-dash-toolbar p { margin: 8px 0 0 !important; }
.sgm-dash-cols { display: inline-flex; align-items: center; gap: 4px; }
.sgm-dash-cols .sgm-btn.is-active { background: var(--sgm-accent) !important; border-color: var(--sgm-accent) !important; color: #fff !important; }
.sgm-dash.is-editing .sgm-dash-grid { outline: 2px dashed #cfd8d7; outline-offset: 10px; min-height: 160px; }
.sgm-widget-tools { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--sgm-accent); color: #fff; font-size: 13px; user-select: none; }
.sgm-widget-tools[hidden] { display: none !important; }
.sgm-widget-handle, .sgm-widget-name { cursor: grab; touch-action: none; }
.sgm-widget-handle { font-size: 18px; line-height: 1; }
.sgm-widget-name { font-weight: 700; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sgm-widget-buttons { display: inline-flex; align-items: center; gap: 3px; flex: none; }
.sgm-widget-size { min-width: 14px; text-align: center; font-weight: 700; }
.sgm-widget-buttons button { min-width: 26px; height: 26px; padding: 0 6px; border: 1px solid rgba(255, 255, 255, .55); background: rgba(255, 255, 255, .12); color: #fff; font: 700 13px/1 Arial, sans-serif; cursor: pointer; }
.sgm-widget-buttons button:hover, .sgm-widget-buttons button:focus-visible { background: #fff; color: var(--sgm-accent-dark); }
.sgm-dash-grid .sgm-widget-show, .sgm-dash-tray [data-move]:not([data-move=show]), .sgm-dash-tray .sgm-widget-size { display: none; }
.sgm-dash.is-editing .sgm-widget > .sgm-box { pointer-events: none; opacity: .92; }
.sgm-widget.is-dragging { position: fixed; z-index: 9999; pointer-events: none; opacity: .92; box-shadow: 0 16px 40px rgba(40, 50, 60, .3); }
.sgm-widget-placeholder { border: 2px dashed var(--sgm-accent); background: var(--sgm-accent-soft); }
.sgm-dash-tray { margin-top: var(--sgm-gap); padding: 18px 24px; background: var(--sgm-soft); border: 1px dashed var(--sgm-line); }
.sgm-dash-tray[hidden] { display: none !important; }
.sgm-dash-tray h3 { margin: 0 0 4px !important; }
.sgm-dash-tray-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; min-height: 60px; margin-top: 10px; }
.sgm-dash-tray-list .sgm-widget > .sgm-box, .sgm-dash-tray-list .sgm-widget-collapse { display: none; }
.sgm-dash-tray-list .sgm-widget-placeholder { height: 40px !important; }
@media (max-width: 1000px) { .sgm-dash-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .sgm-dash-2, .sgm-dash-3 { grid-template-columns: minmax(0, 1fr); } }
/* Kästen */
.sgm-quick { display: flex; flex-wrap: wrap; gap: 8px; }
.sgm-today { list-style: none; margin: 0 !important; padding: 0 !important; display: grid; gap: 8px; }
.sgm-today li { padding: 10px 12px; background: var(--sgm-soft); border-left: 3px solid var(--sgm-ok); }
.sgm-today li.is-open { border-left-color: var(--sgm-warn); }
.sgm-kpis-wide { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) !important; }
.sgm-mini-neu strong { display: inline !important; }
.sgm-cal-head, .sgm-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; }
.sgm-cal-head span { font-size: 11px; font-weight: 700; color: var(--sgm-muted); text-transform: uppercase; padding-bottom: 4px; }
.sgm-cal-grid span { position: relative; padding: 7px 0; font-size: 13px; color: var(--sgm-text); background: var(--sgm-soft); }
.sgm-cal-grid span.is-leer { background: transparent; }
.sgm-cal-grid span.has-entry { background: var(--sgm-accent-soft); color: var(--sgm-accent-dark); font-weight: 700; cursor: default; }
.sgm-cal-grid span.has-entry::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--sgm-accent); }
.sgm-cal-grid span.is-heute { outline: 2px solid var(--sgm-ink); outline-offset: -2px; }
.sgm-cal-list { list-style: none; margin: 12px 0 0 !important; padding: 0 !important; font-size: 13px; }
.sgm-cal-list li { padding: 5px 0; border-top: 1px solid var(--sgm-line-soft); }
[data-tip] { position: relative; }
[data-tip]:hover::before, [data-tip]:focus-visible::before { content: attr(data-tip); position: absolute; z-index: 20; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); white-space: pre; padding: 6px 9px; background: var(--sgm-ink); color: #fff; font: 400 12px/1.4 Arial, sans-serif; text-align: left; pointer-events: none; }
.sgm-bars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2px; align-items: end; height: 120px; padding-top: 18px; border-bottom: 1px solid var(--sgm-line); }
.sgm-bar-col { display: flex; flex-direction: column; align-items: center; height: 100%; outline: none; }
.sgm-bar-track { position: relative; flex: 1 1 auto; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.sgm-bar-fill { display: block; width: min(24px, 70%); background: var(--sgm-accent); border-radius: 4px 4px 0 0; }
.sgm-bar-col:hover .sgm-bar-fill, .sgm-bar-col:focus-visible .sgm-bar-fill { background: var(--sgm-accent-dark); }
.sgm-bar-val { position: absolute; top: -16px; font-size: 11px; font-weight: 700; color: var(--sgm-ink); }
.sgm-bar-label { margin-top: 4px; margin-bottom: -20px; font-size: 10.5px; color: var(--sgm-muted); }
.sgm-bars + * { margin-top: 26px !important; }
.sgm-box-info .sgm-info-bild { display: block; max-width: 100%; height: auto; margin-bottom: 12px; }
.sgm-mini .is-heute strong { color: var(--sgm-accent-dark); }
.sgm-widget.is-dragging .sgm-widget-show { display: none; }

/* ===== Nichts springt: Einblendungen statt verschiebender Meldungen ===== */
.sgm-toasts { position: fixed; z-index: 10000; top: 16px; right: 16px; display: grid; gap: 8px; max-width: min(440px, calc(100vw - 32px)); transition: opacity .4s; cursor: pointer; }
.sgm-toasts .sgm-alert { margin: 0 !important; box-shadow: 0 8px 24px rgba(40, 50, 60, .18); background-clip: padding-box; }
.sgm-toasts.is-weg { opacity: 0; pointer-events: none; }
.sgm .is-loading { opacity: .6; transition: opacity .15s; }
.sgm .is-hidden { visibility: hidden; }
html { overflow-anchor: auto; }

/* ===== Mitgliedsausweis ===== */
.sgm-ausweis-mini { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.sgm-ausweis-mini .sgm-qr { width: 140px; height: 140px; flex: none; }
.sgm-ausweis-mini .sgm-qr svg { width: 100%; height: 100%; }
.sgm-ausweis-mini > div:last-child { flex: 1 1 240px; }
.sgm-ausweis-code strong { font: 700 20px/1.2 'Courier New', monospace; letter-spacing: .1em; color: var(--sgm-ink); margin-left: 6px; }
.sgm-scan { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 14px; margin-bottom: 18px; background: var(--sgm-accent-soft); }
.sgm-scan input { width: 9em; font: 700 16px 'Courier New', monospace; letter-spacing: .08em; }
.sgm-scan-info { font-weight: 700; min-height: 1.4em; }
.sgm-scan-info.is-ok { color: var(--sgm-ok); } .sgm-scan-info.is-warn { color: var(--sgm-warn); } .sgm-scan-info.is-fehler { color: var(--sgm-danger); }
.sgm-scan-overlay { position: fixed; inset: 0; z-index: 10001; background: rgba(20, 25, 30, .85); display: flex; align-items: center; justify-content: center; }
.sgm-scan-box { position: relative; width: min(420px, 92vw); text-align: center; color: #fff; }
.sgm-scan-box video { width: 100%; display: block; background: #000; }
.sgm-scan-rahmen { position: absolute; left: 20%; right: 20%; top: 12%; aspect-ratio: 1; border: 3px solid #fff; box-shadow: 0 0 0 2000px rgba(0, 0, 0, .25); pointer-events: none; }
.sgm-scan-box p { margin: 12px 0 !important; }

.sgm-push-status { font-weight: 700; color: var(--sgm-accent-dark); min-height: 1.4em; }

/* Jugend: Anwesenheitsliste, Eltern */
.sgm-checklist .sgm-check { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 7px 0; border-bottom: 1px solid var(--sgm-line, #e5e7eb); }
.sgm-checklist .sgm-check:last-child { border-bottom: 0; }
.sgm-fieldset { border: 1px solid var(--sgm-line, #e5e7eb); padding: 10px 14px 4px; margin: 0 0 12px; }
.sgm-fieldset legend { font-weight: 700; padding: 0 6px; }

/* Lange Schaltflächentexte dürfen auf schmalen Bildschirmen umbrechen */
@media (max-width: 640px) {
    .sgm .sgm-actions .sgm-btn { white-space: normal; text-align: center; max-width: 100%; }
    .sgm-actions .sgm-inline-form { max-width: 100%; }
}

/* Protokoll-Assistent */
.sgm-steps a b { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: var(--sgm-soft); color: var(--sgm-ink); font-size: 12px; margin-right: 4px; }
.sgm-steps a.is-active b { background: #fff; color: var(--sgm-accent-dark); }
.sgm-views a.sgm-steps-zurueck { margin-left: auto; border-color: transparent; background: none; }
.sgm-beschluss { border-left: 3px solid var(--sgm-accent); background: var(--sgm-accent-soft); padding: 10px 14px; margin: 12px 0; }
.sgm-beschluss-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sgm-beschluss-head .sgm-inline-form { margin-left: auto; }
.sgm-beschluss p { margin: 6px 0 !important; }
.sgm-mini-panel { margin: 10px 0 0; }
.sgm-mini-panel > summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--sgm-accent-dark); list-style: none; padding: 4px 0; }
.sgm-mini-panel > summary::-webkit-details-marker { display: none; }
.sgm-mini-panel[open] > summary { margin-bottom: 8px; }
.sgm-checklist-warn { list-style: none; margin: 0 !important; padding: 0 !important; }
.sgm-checklist-warn li { padding: 4px 0 4px 22px; position: relative; color: #8a5a00; }
.sgm-checklist-warn li::before { content: "!"; position: absolute; left: 4px; font-weight: 800; }
.sgm-box.sgm-rueckgabe { border-top-color: var(--sgm-danger); color: var(--sgm-danger); font-weight: 700; padding: 14px 36px !important; }
.sgm-table-compact td, .sgm-table-compact th { padding-top: 6px !important; padding-bottom: 6px !important; }
.sgm-table-compact input[type=radio] { width: 18px; height: 18px; accent-color: var(--sgm-accent); }

/* Filter beim gefilterten Inhalt (Kopf des Inhaltskastens) */
.sgm-filter { display: inline-flex; border: 1px solid var(--sgm-line); background: #fff; }
.sgm-filter a { padding: 6px 12px; font-size: 13px; font-weight: 700; color: var(--sgm-muted) !important; text-decoration: none !important; border-left: 1px solid var(--sgm-line); white-space: nowrap; }
.sgm-filter a:first-child { border-left: 0; }
.sgm-filter a:hover { color: var(--sgm-ink) !important; background: var(--sgm-soft); }
.sgm-filter a.is-active { background: var(--sgm-accent); color: #fff !important; }
.sgm-filter-kopf .sgm-box-head { margin-bottom: 0 !important; padding-bottom: 0 !important; border-bottom: 0 !important; }

/* Navigation bleibt beim Scrollen oben stehen */
.sgm-menu { position: sticky; top: var(--sgm-sticky-top, 0px); z-index: 40; background: #fff; }
.sgm-menu.is-stuck { box-shadow: 0 6px 16px rgba(40, 50, 60, .10); }
.sgm [id] { scroll-margin-top: calc(var(--sgm-sticky-top, 0px) + var(--sgm-menu-h, 110px) + 12px); }

/* Ehrentafel */
.sgm-tafel { list-style: none; margin: 6px 0 0 !important; padding: 0 !important; }
.sgm-tafel li { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 2fr) minmax(0, 1.4fr); gap: 4px 16px; padding: 8px 0; border-bottom: 1px solid var(--sgm-line-soft); margin: 0 !important; }
.sgm-tafel li:last-child { border-bottom: 0; }
.sgm-ehrentafel h4 { margin: 0 0 2px !important; color: var(--sgm-accent-dark); }
@media (max-width: 640px) { .sgm-tafel li { grid-template-columns: 1fr; gap: 0; } }
.sgm-public { max-width: 900px; }

/* Rollengruppen rechts im Menü */
.sgm-menu-trenner { flex: none; width: 1px; margin: 12px 8px 12px auto; background: var(--sgm-line); }
.sgm-menu-top.sgm-menu-right { margin-left: 0; }
.sgm-menu-top.is-rolle span:not(.sgm-badge) { font-weight: 700; }
.sgm-menu.is-kompakt .sgm-menu-top.is-rolle > span:not(.sgm-badge) { display: none; }
.sgm-menu.is-kompakt .sgm-menu-top.is-rolle { padding-left: 11px; padding-right: 11px; }
@media (min-width: 861px) { .sgm-menu-l2 { flex-wrap: wrap; overflow: visible; } }
@media (max-width: 860px) { .sgm-menu-trenner { margin-left: 8px; } }

/* Kacheln „Inhalte anlegen“ */
.sgm-kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.sgm-kachel { display: flex; flex-direction: column; gap: 6px; padding: 18px 18px 16px; border: 1px solid var(--sgm-line); border-top: 3px solid var(--sgm-accent); text-decoration: none !important; color: var(--sgm-text) !important; background: #fff; transition: background .15s; }
.sgm-kachel:hover, .sgm-kachel:focus { background: var(--sgm-accent-soft); }
.sgm-kachel strong { color: var(--sgm-accent-dark); font-size: 15px; }
.sgm-kachel span { font-size: 13px; }

/* Einrichtung: Farbwahl, Funktionen, Code */
.sgm-farbwahl { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 4px; }
.sgm-farbe { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border: 1px solid var(--sgm-line); cursor: pointer; font-size: 13px; }
.sgm-farbe input[type=radio] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sgm-farbe.is-active, .sgm-farbe:has(input:checked) { border-color: var(--sgm-ink); box-shadow: inset 0 0 0 1px var(--sgm-ink); }
.sgm-farbe-punkt { width: 18px; height: 18px; border-radius: 50%; display: inline-block; }
.sgm-farbe-theme { background: conic-gradient(#549f97, #1e5aa8, #b3261e, #b8860b, #549f97); }
.sgm-farbe input[type=color] { width: 28px; height: 22px; padding: 0; border: 0; background: none; }
.sgm-label { display: block; font-weight: 700; font-size: 14px; color: var(--sgm-ink); margin-bottom: 4px; }
.sgm-funktionswahl .sgm-check { align-items: flex-start; padding: 6px 0; }
.sgm-code { background: var(--sgm-soft); border: 1px solid var(--sgm-line-soft); padding: 10px 12px; font-size: 12.5px; white-space: pre-wrap; overflow-x: auto; }
.sgm-todo-rolle { margin: 12px 0 2px !important; font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--sgm-muted); }
.sgm-todo-rolle:first-child { margin-top: 0 !important; }
