html, body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
.np-main { max-width: 1600px; }
.np-nowrap { white-space: nowrap; }
.np-logout-form { margin: 0; }
.np-menu-button { background: none; border: 0; padding: 8px 16px; width: 100%; text-align: left; font: inherit; cursor: pointer; }
.np-menu-button:hover { background: rgba(0,0,0,.05); }
.np-user-button { text-transform: none; }

/* Rich-Text-Editor */
.np-editor { border: 1px solid #c7c7c7; border-radius: 4px; background: #fff; }
.np-editor.np-focus { border-color: var(--mud-palette-primary); }
.np-editor-toolbar { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid #e0e0e0; padding: 2px 4px; background: #fafafa; }
.np-editor-area { padding: 8px 12px; min-height: 120px; }
.np-richtext { outline: none; min-height: 100px; }
.np-richtext p { margin: 0 0 .6em; }
.np-richtext h2, .np-richtext h3 { margin: .8em 0 .3em; }
.np-richtext ul, .np-richtext ol { padding-left: 1.4em; }
.np-richtext a { color: var(--mud-palette-primary); text-decoration: underline; }

/* Originalansicht von E-Mails */
.np-original { border: 1px solid #e0e0e0; border-radius: 4px; padding: 12px; background: #fff; max-height: 520px; overflow: auto; overflow-wrap: anywhere; }
.np-pre { white-space: pre-wrap; overflow-wrap: anywhere; font-family: inherit; margin: 0; }

/* Newsletter-Editor */
.np-block { border: 1px solid transparent; border-radius: 6px; padding: 8px 12px; margin-bottom: 8px; background: #fff; position: relative; }
.np-block.np-selected { border-color: var(--mud-palette-primary); box-shadow: 0 0 0 2px rgba(31,95,63,.12); }
.np-block-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.np-block-nav-item { cursor: pointer; padding: 4px 8px; border-radius: 4px; display: flex; gap: 6px; align-items: center; overflow: hidden; }
.np-block-nav-item.np-active { background: rgba(31,95,63,.10); font-weight: 600; }
.np-block-nav-item span.np-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-doc { background: #f2f2ef; padding: 12px; border-radius: 6px; }
.np-diff { border: 1px solid #e0e0e0; border-radius: 4px; padding: 8px; background: #fff; max-height: 300px; overflow: auto; }
.np-diff.np-before { background: #fff6f6; }
.np-diff.np-after { background: #f4fbf5; }
.np-image-thumb { width: 100%; max-height: 180px; object-fit: contain; background: #eee; border-radius: 4px; }
.np-crop-frame { position: relative; display: inline-block; max-width: 100%; }
.np-crop-frame img { max-width: 100%; display: block; }
.np-crop-rect { position: absolute; border: 2px dashed #fff; outline: 2000px solid rgba(0,0,0,.45); pointer-events: none; }
.np-crop-wrap { overflow: hidden; display: inline-block; max-width: 100%; }

/* Vorschau */
.np-preview-frame { width: 100%; border: 1px solid #ddd; background: #fff; border-radius: 4px; }
.np-preview-mobile { width: 390px; max-width: 100%; margin: 0 auto; display: block; }

/* Karten statt Tabellen auf kleinen Bildschirmen */
.np-card-list .mud-card { margin-bottom: 8px; }
.np-break { overflow-wrap: anywhere; }

#blazor-error-ui { background: #ffe0b2; bottom: 0; box-shadow: 0 -1px 2px rgba(0,0,0,.2); display: none; left: 0; padding: .6rem 1.25rem .7rem 1.25rem; position: fixed; width: 100%; z-index: 2000; }
#blazor-error-ui .reload { margin-left: 8px; }

/* Anmeldeseiten (statisch gerendert) */
.np-auth { max-width: 420px; margin: 8vh auto; background: #fff; padding: 28px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.np-auth h1 { font-size: 1.5rem; margin: 0 0 1rem; color: #1f5f3f; }
.np-auth label { display: block; font-size: .9rem; margin: .8rem 0 .25rem; }
.np-auth input[type=email], .np-auth input[type=password], .np-auth input[type=text] { width: 100%; padding: .6rem; border: 1px solid #bbb; border-radius: 4px; font: inherit; box-sizing: border-box; }
.np-auth button { margin-top: 1.2rem; width: 100%; padding: .7rem; background: #1f5f3f; color: #fff; border: 0; border-radius: 4px; font: inherit; cursor: pointer; }
.np-auth .np-error { color: #b00020; margin: .5rem 0; }
.np-auth .np-ok { color: #1f5f3f; margin: .5rem 0; }
.np-auth .np-check { display: flex; gap: .4rem; align-items: center; margin-top: .8rem; }
.validation-message { color: #b00020; font-size: .85rem; }

h1:focus, h1:focus-visible { outline: none; }
.np-mono textarea { font-family: Consolas, "Courier New", monospace; font-size: 0.85rem; }
.np-pdf-frame { width: 100%; height: 78vh; min-height: 420px; border: 1px solid #ddd; border-radius: 4px; background: #fff; }
.np-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.np-summe td { background: var(--mud-palette-background-gray); }
.np-zahl-link { background: none; border: 0; padding: 0; font: inherit; color: var(--mud-palette-primary); cursor: pointer; font-variant-numeric: tabular-nums; }
.np-zahl-link:hover, .np-zahl-link:focus-visible { text-decoration: underline; }
.np-detail th { text-align: left; font-weight: 500; white-space: nowrap; vertical-align: top; width: 1%; padding-right: 16px; }
.np-detail td { overflow-wrap: anywhere; }
.np-neg { color: #b3261e; }
.np-pos { color: #1b6e20; }
@media (max-width: 960px) { .np-pdf-frame { height: 60vh; } }

/* Vorgabe für alle Listentabellen: FixedHeader="true" – die Kopfzeile bleibt stehen, die Tabelle scrollt in sich.
   Ohne eigene Height begrenzt diese Regel die Höhe auf den sichtbaren Bereich. */
.mud-table-sticky-header > .mud-table-container { max-height: max(320px, calc(100vh - 190px)); }
