
:root{
  --drk-red:#e2001a;
  --drk-red-dark:#b50015;
  --drk-dark:#111827;
  --bg:#f3f4f6;
  --card:#ffffff;
  --muted:#6b7280;
  --border:#e5e7eb;
  --ring: rgba(226,0,26,.25);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:var(--bg);
  color:var(--drk-dark);
}

a{color:inherit; text-decoration:none}
a:hover{text-decoration:none}

.container{max-width:1180px; margin:0 auto; padding:18px 20px 28px}

/* TOPBAR like reference */
.topbar{
  background:var(--drk-red);
  color:#fff;
  border-bottom:1px solid rgba(255,255,255,.22);
}
.topbar-inner{
  display:flex; align-items:center; gap:18px;
  padding:12px 18px;
  max-width:1180px; margin:0 auto;
}
.brand{display:flex; align-items:center; gap:12px; min-width:260px}
.brand img{width:44px; height:44px; background:#fff; border-radius:999px; padding:4px}
.brand .brand-title{font-weight:800; line-height:1.1}
.brand .brand-sub{font-size:13px; opacity:.92; margin-top:2px}

/* NAV */
.nav{display:flex; gap:10px; align-items:center; flex-wrap:wrap; flex:1}
.nav a.navlink{
  color:#fff;
  padding:9px 10px;
  border-radius:10px;
  font-weight:650;
  font-size:14px;
}
.nav a.navlink:hover{background:rgba(255,255,255,.14)}
.nav a.navlink.active{background:rgba(255,255,255,.22)}

/* Right user area */
.userbar{display:flex; align-items:center; gap:10px; justify-content:flex-end; min-width:280px}
.userpill{
  font-size:13px;
  background:rgba(255,255,255,.16);
  border:1px solid rgba(255,255,255,.22);
  border-radius:999px;
  padding:7px 10px;
  white-space:nowrap;
}
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:9px 12px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.28);
  background:rgba(255,255,255,.12);
  color:#fff;
  font-weight:750;
  font-size:14px;
}
.btn:hover{background:rgba(255,255,255,.18)}
.btn.primary{background:#fff; color:var(--drk-red); border-color:#fff}
.btn.primary:hover{background:#ffecef}

/* Kleine "Neu"-Markierung im Postfach-Button */
.badge-dot{
  display:inline-block;
  width:10px;
  height:10px;
  border-radius:999px;
  background:var(--drk-red);
  border:2px solid #fff;
  box-shadow:0 0 0 2px rgba(226,0,26,.15);
}

/* Dropdown */
.dropdown{position:relative; display:inline-block}
.dropdown > a{display:inline-flex; align-items:center; gap:6px}
.dropdown-menu{
  display:none;
  position:absolute;
  top:44px;
  right:0;
  min-width:240px;
  background:var(--card);
  border:1px solid var(--border);
  border-radius:14px;
  padding:8px;
  box-shadow:0 12px 30px rgba(0,0,0,.15);
  z-index:50;
}
.dropdown-menu a{
  display:block;
  padding:10px 10px;
  border-radius:10px;
  color:var(--drk-dark);
  font-weight:600;
}
.dropdown-menu a:hover{background:#fff1f3}
.dropdown:hover .dropdown-menu{display:block}

/* Page headings */
.h1{font-size:28px; margin:16px 0 12px; font-weight:850}

/* Cards like reference (red top border) */
.grid{display:grid; grid-template-columns:repeat(12,1fr); gap:14px}
.card{
  background:var(--card);
  border:1px solid var(--border);
  border-top:4px solid var(--drk-red);
  border-radius:14px;
  padding:16px;
  box-shadow:0 1px 2px rgba(0,0,0,.05);
}
.card h3{margin:0 0 6px}
.card p{margin:0; color:var(--muted)}
.card .cta{margin-top:12px; display:inline-block; color:var(--drk-red); font-weight:800}

/* Tables */
.table{width:100%; border-collapse:collapse; background:var(--card); border:1px solid var(--border); border-radius:14px; overflow:hidden}
.table th, .table td{padding:10px 12px; border-bottom:1px solid var(--border); text-align:left; vertical-align:top}
.table th{background:#fafafa; font-size:13px; color:#374151}
.table tr:last-child td{border-bottom:0}

/* Badges */
.badge{display:inline-block; padding:3px 9px; border-radius:999px; background:#fff1f3; color:var(--drk-red); font-size:12px; font-weight:800}

/* Forms */
.form{
  background:var(--card);
  border:1px solid var(--border);
  border-top:4px solid var(--drk-red);
  border-radius:14px;
  padding:16px;
}
label{font-weight:700; font-size:13px}
input, select, textarea{
  width:100%;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:12px;
  font-size:14px;
  outline:none;
  background:#fff;
}
input:focus, select:focus, textarea:focus{
  border-color:var(--drk-red);
  box-shadow:0 0 0 4px var(--ring);
}
textarea{min-height:140px}
button{
  background:var(--drk-red);
  color:white;
  border:0;
  padding:10px 14px;
  border-radius:12px;
  font-weight:850;
  cursor:pointer;
}
button:hover{background:var(--drk-red-dark)}
button.secondary{background:#111827}
button.secondary:hover{background:#0b1220}

/* Flash */
.flash{padding:10px 12px; border-radius:12px; margin:10px 0; border:1px solid transparent}
.flash.error{background:#fee2e2; color:#991b1b; border-color:#fecaca}
.flash.success{background:#dcfce7; color:#166534; border-color:#bbf7d0}

/* Footer */
.footer{
  margin-top:26px;
  padding:18px 0;
  border-top:1px solid var(--border);
  color:var(--muted);
  font-size:14px;
}
.footer a{color:var(--muted)}


/* --- Dashboard & Typography adjustments v10 --- */

body{font-weight:400}
h1,h2,h3,.h1{font-weight:500}
.brand-title{font-weight:600}
.nav a.navlink{font-weight:500}
.userpill strong{font-weight:500}
button{font-weight:600}
.card h3{font-weight:500}

.dashboard-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:18px;
}
.dashboard-grid .card{
  min-height:160px;
  padding:20px;
}

/* --- v11 UI refinements: lighter typography, tabs, dense tables, calendar --- */

.brand-title{font-weight:500 !important;}
.h1, h1, h2, h3{font-weight:500 !important;}
.nav a.navlink{font-weight:500 !important;}
.userpill strong{font-weight:500 !important;}
button{font-weight:600 !important;}
.card h3{font-weight:500 !important;}

/* Tabs */
.tabs{display:flex;gap:8px;margin:10px 0 14px;flex-wrap:wrap}
.tab{display:inline-flex;align-items:center;padding:9px 12px;border-radius:12px;border:1px solid var(--border);background:#fff;color:var(--drk-dark);font-weight:500;font-size:14px}
.tab:hover{background:#fff1f3}
.tab.active{border-color:rgba(226,0,26,.35);box-shadow:0 0 0 4px var(--ring)}

/* Dense tables */
.table th,.table td{padding:8px 10px;font-size:14px}
.table th{font-size:12.5px}

.two-col{display:grid;grid-template-columns:1.3fr .7fr;gap:14px}
@media (max-width: 980px){.dashboard-grid{grid-template-columns:1fr}.two-col{grid-template-columns:1fr}}



/* Searchbar */
.searchbar{display:flex; gap:10px; align-items:center; margin:14px 0}
.searchbar input{flex:1; padding:10px 12px; border:1px solid var(--border); border-radius:12px; background:#fff}
.searchbar .btn.small{padding:9px 12px}

/* WYSIWYG */
.editor-toolbar{display:flex; gap:8px; flex-wrap:wrap; margin:8px 0}
.editor{min-height:220px; border:1px solid var(--border); border-radius:14px; padding:12px; background:#fff}
.btn.small.ghost{background:#fff; border:1px solid var(--border); color:var(--drk-dark)}

/* Mobile polish */
@media (max-width: 768px){
  .topbar-inner{padding:10px 12px}
  .nav{gap:8px; flex-wrap:wrap}
  .userbar{gap:8px}
  .tabs{overflow:auto; -webkit-overflow-scrolling:touch; white-space:nowrap}
  .tabs .tab{display:inline-flex}
}


.btn.ghost{background:rgba(255,255,255,.15); border:1px solid rgba(255,255,255,.25); color:#fff}
.btn.ghost:hover{background:rgba(255,255,255,.22)}


/* Buttons on light backgrounds */
.btn.solid{background:var(--drk-red); border-color:var(--drk-red); color:#fff; font-weight:650}
.btn.solid:hover{filter:brightness(.92)}
.editor-toolbar .btn{background:#fff; border:1px solid var(--border); color:var(--drk-dark); font-weight:600}
.editor-toolbar .btn:hover{background:#f8fafc}
.btn.small{padding:7px 10px; border-radius:10px; font-size:13px}

.editor-toolbar .btn{cursor:pointer}
form[data-wysiwyg][data-editor-ready='1'] .editor-toolbar{opacity:1}


/* WYSIWYG: formatting inside editor must be visible */
.editor strong, .editor b { font-weight: 700; }
.editor em, .editor i { font-style: italic; }
.editor u { text-decoration: underline; }

.editor-toolbar .btn.active{background:var(--drk-red); border-color:var(--drk-red); color:#fff}
.editor-toolbar .sep{display:inline-block;width:1px;height:18px;background:var(--border);margin:0 6px;vertical-align:middle}


/* Quill editor styling to match portal */
.ql-toolbar.ql-snow{border-radius:14px 14px 0 0; border-color:var(--border); background:#fff}
.ql-container.ql-snow{border-radius:0 0 14px 14px; border-color:var(--border); background:#fff}
.ql-editor{font-family:inherit; font-size:15px; color:var(--drk-dark);}

.quill-editor{min-height:320px}


/* Header layout improvements: keep user actions top-right, move main nav into a second row */
.topbar-inner{align-items:center; gap:16px}
.brand{flex:1; min-width:240px}
.userbar{display:flex; align-items:center; gap:10px; flex-wrap:wrap; justify-content:flex-end}
.userpill{white-space:nowrap}

.subnav{background:#fff; border-bottom:1px solid var(--border)}
.subnav-inner{max-width:1100px; margin:0 auto; padding:10px 18px; display:flex; gap:18px; align-items:center; flex-wrap:wrap}
.subnav-link{color:#111827; text-decoration:none; padding:8px 10px; border-radius:999px; font-weight:600}
.subnav-link:hover{background:#f3f4f6}
.subnav-link.active{background:rgba(225,6,0,.10); color:var(--drk-red); border:1px solid rgba(225,6,0,.25)}
@media (max-width: 900px){
  .subnav-inner{gap:10px}
  .subnav-link{padding:8px 9px}
}



/* KB layout: compact categories */
.kb-top{display:flex; gap:12px; align-items:center; justify-content:space-between; flex-wrap:wrap}
.kb-actions{margin-bottom:18px}
.kb-cats{padding:14px 18px}
.kb-cats-title{font-weight:700; margin-bottom:10px}
.kb-cats-chips{display:flex; flex-wrap:wrap; gap:10px}
.chip{display:inline-flex; align-items:center; gap:6px; padding:8px 12px; border-radius:999px; border:1px solid var(--border); text-decoration:none; color:#111827; background:#fff}
.chip:hover{background:#f3f4f6}
.chip.active{background:rgba(225,6,0,.10); color:var(--drk-red); border-color:rgba(225,6,0,.25)}
.pill{display:inline-block; padding:4px 10px; border-radius:999px; background:#f3f4f6; color:#111827; font-size:13px}
.kb-table-head{display:flex; align-items:center; gap:10px}
.badge{display:inline-flex; align-items:center; padding:3px 8px; border-radius:999px; background:rgba(225,6,0,.10); color:var(--drk-red); border:1px solid rgba(225,6,0,.25); font-size:12px}

.dashboard-welcome{border-left:6px solid var(--drk-red); padding:14px 18px; margin-bottom:14px}
.dashboard-welcome-text{font-size:16px; color:#111827}

.btn.danger{border:1px solid #ef4444;color:#b91c1c;background:#fff}
.btn.danger:hover{background:#fee2e2}

.pill{display:inline-block;padding:4px 10px;border-radius:999px;font-size:12px;border:1px solid var(--border);background:#f3f4f6;color:#111827}
.pill-in{background:#eef2ff;border-color:#c7d2fe;color:#1e3a8a}
.pill-proc{background:#e0f2fe;border-color:#bae6fd;color:#075985}
.pill-ok{background:#dcfce7;border-color:#bbf7d0;color:#166534}
.pill-no{background:#fee2e2;border-color:#fecaca;color:#991b1b}

.pill-warn{background:#fff7ed;border:1px solid #fed7aa;color:#9a3412}


/* simple prose rendering for admin-managed HTML */
.prose p{margin:0 0 10px 0;}
.prose ul{margin:0 0 10px 18px;}
.prose ol{margin:0 0 10px 18px;}
.prose a{color:var(--drk);}
.prose h1,.prose h2,.prose h3{margin:12px 0 8px 0;}
.prose strong{font-weight:600;}
.prose em{font-style:italic;}


/* Dashboard refresh */
.dashboard-columns{display:grid;grid-template-columns:1.35fr .85fr;gap:18px;align-items:start}
@media (max-width: 980px){.dashboard-columns{grid-template-columns:1fr}}
.dash-card-head{display:flex;justify-content:space-between;align-items:center;gap:12px}
.dash-list{display:flex;flex-direction:column;gap:8px}
.dash-list-item{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:10px 12px;border:1px solid var(--border);border-radius:12px;background:#fff;text-decoration:none;color:inherit}
.dash-list-item:hover{border-color:#f1a4ad;box-shadow:0 1px 6px rgba(0,0,0,.05)}
.dash-list-title{font-size:14px}
.dash-list-meta{display:flex;gap:10px;align-items:center;white-space:nowrap}
.pill{display:inline-flex;align-items:center;padding:4px 10px;border-radius:999px;background:#fff1f2;border:1px solid #fecdd3;color:#9f1239;font-size:12px}
.muted{color:var(--muted);font-size:12px}
.dash-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:16px}
@media (max-width: 980px){.dash-stats{grid-template-columns:1fr}}
.dash-stat{padding:14px}
.dash-stat-num{font-size:28px;line-height:1.1;margin-bottom:6px}
.dash-stat-label{color:var(--muted);font-size:13px;margin-bottom:8px}
.dash-stat-link{color:var(--drk-red);text-decoration:none;font-weight:650}
.quick-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:10px}
.quick-tile{border:1px solid var(--border);border-radius:14px;padding:12px;background:#fff;text-decoration:none;color:inherit}
.quick-tile:hover{border-color:#f1a4ad;box-shadow:0 1px 6px rgba(0,0,0,.05)}
.quick-tile.admin{background:#fff5f5}
.qt-title{font-size:14px}
.qt-sub{color:var(--muted);font-size:12px;margin-top:2px}

/* Outline button (used for 'Zur Übersicht' on white backgrounds) */
.btn.btn-outline{background:transparent;color:var(--drk-red);border-color:var(--drk-red);}
.btn.btn-outline:hover{background:rgba(226,0,26,.08);}

/* Neuigkeiten – Detailseite (zentral, ohne Inline-Styles) */
.breadcrumb{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:0 0 14px 0;font-size:13px;color:var(--muted)}
.breadcrumb a{color:var(--drk-red);text-decoration:none}
.breadcrumb a:hover{text-decoration:underline}
.breadcrumb .sep{opacity:.6}

.news-detail-header{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;flex-wrap:wrap;margin-bottom:14px}
.news-detail-left{min-width:280px}
.news-detail-title{margin:0 0 8px 0}
.news-detail-meta{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0}
.news-detail-actions{display:flex;justify-content:flex-start;align-items:flex-start;margin-top:12px;margin-bottom:22px;flex-basis:100%}

/* Wissen-Detail: Buttons (Zur Übersicht / Favorit) sauber ausrichten */
.kb-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:10px;margin-bottom:18px}
.kb-actions .btn{margin:0}
.news-back{margin-top:10px}
.news-body{font-size:16px;line-height:1.6;white-space:pre-wrap}

/* Modul-spezifische Styles liegen in /assets/css/modules/* */
