/* Verwaltungsbereich (Gemeindebrief) */
body.vw { font-size: 16px; background: #f5f3f8; }
.vw-wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.vw-header { background: var(--violet); color: #fff; margin-bottom: 20px; }
.vw-header .vw-wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; flex-wrap: wrap; }
.vw-brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; font-weight: 700; }
.vw-brand img { background: #fff; border-radius: 6px; padding: 2px; height: 40px; width: auto; }
.vw-brand:hover { color: #fff; }
.vw-user { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.vw-user .btn-outline { background: transparent; color: #fff; border-color: #fff; }
.vw-user .btn-outline:hover { background: rgba(255,255,255,.15); color: #fff; }
main.vw-wrap { padding-bottom: 48px; }
.vw-title { margin: 8px 0 18px; }

.vw-login { max-width: 460px; margin: 40px auto; }

.vw-gb .card + .card { margin-top: 0; }
.vw-drop { position: relative; border: 2px dashed var(--lilac); border-radius: 10px; padding: 22px 14px; text-align: center; background: var(--lilac-pale); color: var(--muted); font-size: .95rem; }
.vw-drop.over { border-color: var(--violet); background: #ece4f6; }
.vw-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
#gb-progress { width: 100%; height: 10px; accent-color: var(--violet); }

.vw-table-card { padding: 0; overflow: hidden; }
.vw-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.vw-table th { background: var(--lilac-pale); color: var(--violet-dark); text-align: left; padding: 10px 8px; font-size: 13px; white-space: nowrap; border-bottom: 2px solid var(--lilac); }
.vw-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.vw-table .date { font-weight: 700; white-space: nowrap; }
.vw-table .sub { display: block; font-size: 12.5px; color: var(--muted); }
.vw-table .actions { white-space: nowrap; }
.vw-table .actions button { background: none; border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; cursor: pointer; font-size: 13px; color: var(--violet); }
.vw-table .actions button:hover { background: var(--lilac-pale); }

.vw-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #2b2238; color: #fff; padding: 10px 18px; border-radius: 8px; box-shadow: var(--shadow); z-index: 100; font-size: 15px; }
.vw-toast.err { background: var(--danger); }

.vw-tabs { display: flex; gap: 4px; margin-bottom: 18px; border-bottom: 2px solid var(--lilac); }
.vw-tabs button { background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -2px; padding: 10px 16px; font: inherit; font-weight: 700; font-size: 1.05rem; color: var(--muted); cursor: pointer; }
.vw-tabs button:hover { color: var(--violet); }
.vw-tabs button[aria-selected="true"] { color: var(--violet); border-bottom-color: var(--violet); }

/* Werkzeugleiste, Dialoge */
.vw-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.vw-toolbar .field select, .vw-toolbar .field input { padding: 8px 10px; font-size: 15px; }
.vw-search { flex: 1 1 220px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.vw-dialog { width: min(860px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 0; border: 0; border-radius: 14px; box-shadow: 0 20px 60px rgba(30, 10, 60, .35); }
.vw-dialog::backdrop { background: rgba(30, 15, 60, .45); }
.vw-dialog-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.vw-dialog-head h2 { margin: 0; font-size: 1.25rem; }
.vw-close { background: none; border: 0; font-size: 28px; line-height: 1; cursor: pointer; color: var(--muted); }
.vw-dialog-body { padding: 16px 20px 20px; overflow-y: auto; max-height: calc(100vh - 110px); }
.medien-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.medien-item { border: 2px solid var(--line); border-radius: 8px; background: #fff; padding: 4px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; word-break: break-all; min-height: 110px; justify-content: center; }
.medien-item:hover { border-color: var(--violet); }
.medien-item img { width: 100%; height: 100px; object-fit: cover; border-radius: 4px; }
.medien-item .pdf { font-size: 32px; }

/* Beitragsliste */
.bt-listtitel { font-weight: 700; color: var(--violet-dark); text-decoration: none; }
.bt-listtitel:hover { text-decoration: underline; }
.vw-table .actions a { display: inline-block; border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; font-size: 13px; color: var(--violet); text-decoration: none; }
.bt-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.bt-online { background: var(--ok-bg); color: var(--ok); }
.bt-entwurf { background: #eee; color: #555; }
.bt-geplant { background: #e5ecfb; color: #1d4aa5; }
.bt-abgelaufen { background: var(--warn-bg); color: #8a5a00; }

/* Editor */
.bt-ed-top { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.bt-ed-grid { display: grid; gap: 20px; align-items: start; }
@media (min-width: 980px) { .bt-ed-grid { grid-template-columns: minmax(0, 1fr) 320px; } .bt-ed-side { position: sticky; top: 16px; } }
.bt-ed-side .card + .card { margin-top: 16px; }
.bt-ed-side .field { margin-top: 12px; }
.bt-ed-h { font-size: 1.1rem; margin: 24px 0 10px; }
.bt-titel-input { font-size: 1.35rem !important; font-weight: 700; }
.bt-2col { display: grid; gap: 12px; }
@media (min-width: 640px) { .bt-2col { grid-template-columns: 1fr 1fr; align-items: start; } }
.bt-check { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: .95rem; }
.bt-check input { width: 18px; height: 18px; accent-color: var(--violet); }
.bt-status-wahl { display: grid; gap: 6px; padding: 10px; background: var(--lilac-pale); border-radius: 8px; }
.bt-status-wahl label { display: flex; align-items: baseline; gap: 8px; font-weight: 600; }
.bt-status-wahl input { accent-color: var(--violet); }
.bt-mehr summary { cursor: pointer; font-weight: 700; color: var(--violet); }
.bt-ed-side .hint { font-size: .82rem; }

.bt-bloecke { display: grid; gap: 14px; }
.bt-bloecke > .card + .card { margin-top: 0; }
.bt-block { padding: 14px 16px; border-left: 4px solid var(--lilac); transition: box-shadow .3s; }
.bt-block .field { margin-top: 10px; }
.bt-block .field label { font-size: .88rem; }
.bt-moved { box-shadow: 0 0 0 3px var(--lilac); }
.bt-block-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.bt-block-typ { font-weight: 800; color: var(--violet-dark); display: inline-flex; align-items: center; gap: 8px; font-size: .95rem; }
.bt-block-typ .ic, .bt-add-btn .ic { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 6px; background: var(--lilac-pale); font-size: 14px; }
.bt-block-tools { display: flex; gap: 4px; }
.bt-block-tools button { width: 32px; height: 30px; border: 1px solid var(--line); background: #fff; border-radius: 6px; cursor: pointer; font-size: 15px; color: var(--violet); }
.bt-block-tools button:hover:not(:disabled) { background: var(--lilac-pale); }
.bt-block-tools button:disabled { opacity: .3; cursor: default; }
.bt-block-tools .weg { color: var(--danger); }
.bt-block textarea, .bt-block input[type=text], .bt-block input[type=number], .bt-block select { width: 100%; padding: 8px 10px; font: inherit; font-size: 15px; border: 1px solid #b9b2c6; border-radius: 8px; background: #fff; }
.bt-block textarea { resize: vertical; line-height: 1.5; border-top-left-radius: 0; border-top-right-radius: 0; }
.md-bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 4px; background: #f3f0f8; border: 1px solid #b9b2c6; border-bottom: 0; border-radius: 8px 8px 0 0; margin-top: 10px; }
.md-bar button { border: 0; background: none; padding: 4px 10px; border-radius: 5px; cursor: pointer; font-size: 13px; color: var(--violet-dark); }
.md-bar button:hover { background: #fff; }
.bt-add { padding: 14px 16px; margin-top: 14px; }
.bt-add-buttons { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.bt-add-btn { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 8px; text-align: left; padding: 8px 10px; border: 1px dashed var(--lilac); border-radius: 8px; background: #fff; cursor: pointer; font: inherit; }
.bt-add-btn .ic { grid-row: span 2; }
.bt-add-btn strong { font-size: .92rem; color: var(--violet-dark); }
.bt-add-btn span:last-child { font-size: .75rem; color: var(--muted); }
.bt-add-btn:hover { border-style: solid; border-color: var(--violet); background: var(--lilac-pale); }

.bt-picker { display: grid; gap: 8px; }
.bt-pick-img { max-width: 220px; max-height: 160px; border-radius: 6px; border: 1px solid var(--line); object-fit: contain; background: #fafafa; }
.bt-pick-leer { padding: 18px; border: 2px dashed var(--lilac); border-radius: 8px; text-align: center; color: var(--muted); font-size: .9rem; background: var(--lilac-pale); }
.bt-pick-file { font-size: .95rem; }
.bt-pick-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.bt-picker progress { width: 100%; accent-color: var(--violet); }

.bt-ed-bar { position: sticky; bottom: 0; z-index: 20; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 20px; padding: 12px 16px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 -4px 20px rgba(40, 20, 80, .08); }
.bt-ed-bar .spacer { flex: 1; }
.bt-ed-side .bt-2col { grid-template-columns: 1fr; gap: 0; }
.vw-search input { width: 100%; }

/* Zwei-Faktor-Anmeldung */
.zf-code-input { font-size: 1.5rem !important; letter-spacing: .25em; text-align: center; max-width: 240px; }
.zf-hinweis { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; background: var(--lilac-pale); border: 1px solid var(--lilac); border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; font-size: .95rem; }
.zf-dlg { width: min(560px, calc(100vw - 24px)); }
.zf-dlg.erzwungen .vw-close { display: none; }
.zf-ok { color: var(--ok); font-weight: 600; }
.zf-schritte { padding-left: 1.2em; display: grid; gap: 14px; }
.zf-qr { width: 200px; height: 200px; margin: 10px 0; background: #fff; padding: 4px; border: 1px solid var(--line); border-radius: 8px; }
.zf-qr svg { width: 100%; height: 100%; display: block; }
.zf-secret { display: inline-block; font-size: 1rem; letter-spacing: .08em; background: var(--lilac-pale); padding: 6px 10px; border-radius: 6px; word-break: break-all; }
.zf-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.zf-row label { width: 100%; font-size: .92rem; font-weight: 600; }
.zf-row input { padding: 8px 10px; font: inherit; font-size: 1.1rem; border: 1px solid #b9b2c6; border-radius: 8px; max-width: 200px; }
.zf-row input[inputmode=numeric] { letter-spacing: .2em; text-align: center; }
.zf-codes { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 16px; margin: 14px 0; }
.zf-codes code { font-size: 1.1rem; letter-spacing: .06em; }
.zf-aus { margin-top: 16px; }
.zf-aus summary { cursor: pointer; color: var(--danger); font-weight: 600; font-size: .92rem; }
