:root{
  --brand:#981108;
  --brandHover:#7a0d06;
  --brandSoft:rgba(152,17,8,.10);
  --brandSoftStrong:rgba(152,17,8,.16);
  --goldSoft:rgba(180,125,36,.14);
  --bg:#f3f5f7;
  --card:#ffffff;
  --text:#1f2937;
  --muted:#6b7280;
  --border:rgba(0,0,0,.06);
  --shadow:0 12px 35px rgba(0,0,0,.06);
  --radius:20px;
  --surfaceSoft:rgba(0,0,0,.02);
  --surfaceSoftHover:rgba(0,0,0,.04);
  --surfacePanel:rgba(0,0,0,.03);
  --surfacePanelStrong:rgba(0,0,0,.05);
}

body.dark{
  --bg:#0f1419;
  --card:#141c25;
  --text:#e5e7eb;
  --muted:#9ca3af;
  --border:rgba(255,255,255,.08);
  --surfaceSoft:rgba(255,255,255,.03);
  --surfaceSoftHover:rgba(255,255,255,.05);
  --surfacePanel:rgba(255,255,255,.04);
  --surfacePanelStrong:rgba(255,255,255,.06);
  --brandSoft:rgba(152,17,8,.20);
  --brandSoftStrong:rgba(152,17,8,.28);
  --goldSoft:rgba(180,125,36,.18);
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
a{color:inherit;text-decoration:none}

body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background:
    radial-gradient(1200px 650px at 18% 0%, rgba(255,255,255,.85) 0%, var(--bg) 55%, rgba(0,0,0,0) 100%),
    linear-gradient(180deg, rgba(152,17,8,.018), rgba(152,17,8,0) 220px),
    var(--bg);
  color:var(--text);
  transition:.25s ease;
}

body.dark{
  background:
    radial-gradient(1200px 650px at 18% 0%, rgba(255,255,255,.06) 0%, var(--bg) 55%, rgba(0,0,0,0) 100%),
    linear-gradient(180deg, rgba(152,17,8,.10), rgba(152,17,8,0) 260px),
    var(--bg);
}

.wrap{
  max-width:1500px;
  margin:70px auto;
  padding:0 40px;
}

.top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:40px;
  background:linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,255,255,.82));
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:32px 40px;
  box-shadow:0 18px 45px rgba(0,0,0,.08);
  position:relative;
  overflow:hidden;
}

body.dark .top{
  background:linear-gradient(180deg, rgba(20,28,37,.96), rgba(20,28,37,.90));
  box-shadow:0 18px 55px rgba(0,0,0,.40);
}

.top::before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:180px;
  background:radial-gradient(circle at left center, rgba(152,17,8,.14), rgba(152,17,8,0) 68%);
  pointer-events:none;
}

.top::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:3px;
  background:linear-gradient(90deg, rgba(152,17,8,.06), var(--brand), rgba(180,125,36,.24), var(--brand), rgba(152,17,8,.06));
}

.brand{
  display:flex;
  align-items:center;
  gap:24px;
}

.logoBox{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:14px 26px;
  border-radius:18px;
  background:linear-gradient(135deg,#981108,#7a0d06);
  box-shadow:0 10px 24px rgba(152,17,8,.35),0 4px 10px rgba(0,0,0,.15);
}

.logoBox img{
  height:42px;
  width:auto;
  display:block;
}

.userBlock strong{
  font-size:22px;
  display:block;
  margin-bottom:4px;
}

.userBlock small{
  font-size:14px;
  color:var(--muted);
}

.actions{
  display:flex;
  gap:16px;
  flex-wrap:wrap;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:44px;
  padding:12px 20px;
  border-radius:14px;
  font-weight:700;
  text-decoration:none;
  cursor:pointer;
  border:none;
  transition:transform .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.btn.primary{
  background:linear-gradient(135deg, var(--brand), var(--brandHover));
  color:#fff;
  box-shadow:0 12px 20px rgba(152,17,8,.22);
}

.btn.primary:hover{
  transform:translateY(-1px);
  box-shadow:0 16px 26px rgba(152,17,8,.28);
}

.btn.secondary{
  background:linear-gradient(180deg, rgba(255,255,255,.70), rgba(255,255,255,.48));
  color:var(--text);
  border:1px solid var(--border);
}

body.dark .btn.secondary{
  background:linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.025));
}

.btn.secondary:hover{
  background:var(--surfaceSoftHover);
  transform:translateY(-1px);
}

.btn.danger{
  background:#991b1b;
  color:#fff;
}

.btn.danger:hover{
  background:#7f1d1d;
}

.cards{
  display:grid;
  grid-template-columns:repeat(3,minmax(300px,1fr));
  gap:34px;
  margin-top:50px;
}

.card{
  background:linear-gradient(180deg, rgba(255,255,255,.94), rgba(255,255,255,.80));
  border:1px solid var(--border);
  border-radius:18px;
  padding:30px;
  box-shadow:0 14px 30px rgba(0,0,0,.08);
  transition:transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  display:flex;
  flex-direction:column;
  min-height:200px;
  animation:eeFadeUp .22s ease both;
  position:relative;
  overflow:hidden;
}

.card::before{
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:0;
  height:3px;
  background:linear-gradient(90deg, rgba(152,17,8,.10), rgba(152,17,8,.55), rgba(180,125,36,.28), rgba(152,17,8,.10));
  opacity:.7;
}

body.dark .card{
  background:linear-gradient(180deg, rgba(20,28,37,.96), rgba(20,28,37,.88));
  box-shadow:0 16px 40px rgba(0,0,0,.42);
}

.card:hover{
  transform:translateY(-4px);
  box-shadow:0 22px 46px rgba(0,0,0,.12);
}

body.dark .card:hover{
  box-shadow:0 24px 56px rgba(0,0,0,.55);
}

.card p{
  color:var(--muted);
  line-height:1.55;
  margin:0 0 10px 0;
}

.card h3{
  margin:0 0 10px 0;
  letter-spacing:.2px;
}

.cardTitle{
  margin:0 0 8px 0;
  font-size:18px;
}

.cardActions{
  margin-top:auto;
  padding-top:14px;
}

@keyframes eeFadeUp{
  from{opacity:0;transform:translateY(8px)}
  to{opacity:1;transform:translateY(0)}
}

.notice,
.noticeOk,
.noticeErr{
  border-radius:14px;
  padding:12px 14px;
  box-shadow:var(--shadow);
}

.notice{margin-top:24px}
.noticeOk{background:rgba(16,185,129,.10);border:1px solid rgba(16,185,129,.25)}
.noticeErr,.notice{background:rgba(239,68,68,.10);border:1px solid rgba(239,68,68,.25)}

.pageTitle{
  margin:0;
  font-size:28px;
  letter-spacing:.2px;
  line-height:1.15;
}

.mutedLine{
  color:var(--muted);
  font-size:14px;
  margin-top:6px;
  line-height:1.45;
}

.adminHeaderRow{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:16px;
  margin-top:22px;
}

.adminHeaderActions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.grid2{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:24px;
  margin-top:24px;
}

.grid2tight{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}

.formStack{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:12px;
}

.label{
  font-size:13px;
  color:var(--muted);
  font-weight:700;
  margin-top:4px;
}

.input,
.protoTextarea,
.kbTextarea{
  width:100%;
  font:inherit;
  color:var(--text);
  outline:none;
  border-radius:16px;
  border:1px solid var(--border);
  background:linear-gradient(180deg, rgba(255,255,255,.88), rgba(255,255,255,.66));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.38);
}

body.dark .input,
body.dark .protoTextarea,
body.dark .kbTextarea{
  background:linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.025));
  box-shadow:none;
}

.input{
  min-height:46px;
  padding:12px 14px;
}

.protoTextarea,
.kbTextarea{
  padding:14px 16px;
  resize:vertical;
  line-height:1.6;
}

textarea.input{
  min-height:140px;
  resize:vertical;
}

.kbTextarea{min-height:460px}
.protoTextarea{min-height:130px}
.protoTextarea--lg{min-height:220px}

.input:focus,
.kbTextarea:focus,
.protoTextarea:focus{
  border-color:rgba(152,17,8,.35);
  box-shadow:0 0 0 4px rgba(152,17,8,.12);
}

select.input{appearance:none}

.tableWrap{
  overflow:auto;
  border-radius:18px;
  border:1px solid var(--border);
  margin-top:14px;
  background:linear-gradient(180deg, rgba(255,255,255,.74), rgba(255,255,255,.52));
}

body.dark .tableWrap{
  background:linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.02));
}

.table{
  width:100%;
  border-collapse:collapse;
  min-width:1200px;
}

.table th,
.table td{
  padding:12px 12px;
  border-bottom:1px solid var(--border);
  vertical-align:top;
}

.table th{
  text-align:left;
  font-size:12px;
  letter-spacing:.02em;
  text-transform:uppercase;
  color:var(--muted);
  background:linear-gradient(180deg, rgba(152,17,8,.06), rgba(152,17,8,.025));
}

body.dark .table th{
  background:linear-gradient(180deg, rgba(152,17,8,.18), rgba(255,255,255,.02));
}

.tableWrap .table tr + tr td{
  transition:background-color .15s ease;
}

.tableWrap .table tbody tr:hover td,
.table tr:hover td{
  background:rgba(152,17,8,.035);
}

.mutedCell{
  color:var(--muted);
  font-size:13px;
}

.cellWide{min-width:220px}
.cellNarrow{min-width:180px}
.cellTiny{min-width:120px}
.cellActions{min-width:320px}

.rowActions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.rowForm{margin:0}

.pillRow{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  max-width:100%;
  min-height:34px;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid var(--border);
  background:var(--surfacePanel);
  color:var(--text);
  font-size:12px;
  font-weight:800;
  line-height:1.15;
  white-space:nowrap;
}

.pill--info{
  background:rgba(59,130,246,.10);
  border-color:rgba(59,130,246,.24);
  color:#1d4ed8;
}

body.dark .pill--info{color:#93c5fd}

.pill--success{
  background:rgba(16,185,129,.12);
  border-color:rgba(16,185,129,.28);
  color:#047857;
}

body.dark .pill--success{color:#6ee7b7}

.pill--warning{
  background:rgba(245,158,11,.16);
  border-color:rgba(245,158,11,.28);
  color:#b45309;
}

body.dark .pill--warning{color:#fcd34d}

.pill--danger{
  background:rgba(239,68,68,.12);
  border-color:rgba(239,68,68,.28);
  color:#b91c1c;
}

body.dark .pill--danger{color:#fca5a5}

.pill--muted{
  background:rgba(107,114,128,.10);
  border-color:rgba(107,114,128,.20);
  color:var(--muted);
}

.pill--availability{
  max-width:100%;
  white-space:normal;
  line-height:1.25;
  text-align:center;
}

.pill--availability-open{
  background:rgba(16,185,129,.10);
  border-color:rgba(16,185,129,.24);
  color:#047857;
}

body.dark .pill--availability-open{color:#86efac}

.pill--availability-expired{
  background:rgba(107,114,128,.10);
  border-color:rgba(107,114,128,.22);
  color:var(--muted);
}

.choicePill{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:10px 14px;
  border-radius:999px;
  border:1px solid var(--border);
  background:rgba(0,0,0,.03);
  cursor:pointer;
  user-select:none;
  font-weight:700;
}

body.dark .choicePill{
  background:rgba(255,255,255,.04);
}

.choicePill input{
  margin:0;
}

.choicePill--warning{
  background:rgba(245,158,11,.12);
  border-color:rgba(245,158,11,.25);
}

.choicePill--danger{
  background:rgba(239,68,68,.10);
  border-color:rgba(239,68,68,.25);
}

.badgeAdmin{
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin-top:14px;
  padding:8px 12px;
  border-radius:999px;
  background:rgba(152,17,8,.10);
  border:1px solid rgba(152,17,8,.22);
  color:var(--brand);
  font-size:12px;
  font-weight:800;
  line-height:1;
  box-shadow:0 8px 18px rgba(152,17,8,.12);
}

.lockInfo{
  margin-top:12px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background:rgba(0,0,0,.02);
  color:var(--muted);
  font-weight:700;
  font-size:13px;
  display:inline-block;
  box-shadow:0 10px 18px rgba(0,0,0,.06);
}

body.dark .lockInfo{
  background:rgba(255,255,255,.03);
  box-shadow:0 12px 22px rgba(0,0,0,.35);
}

.protoHeaderCard{
  padding:18px 22px;
  background:linear-gradient(135deg, rgba(152,17,8,.10), rgba(255,255,255,.92));
}

body.dark .protoHeaderCard{
  background:linear-gradient(135deg, rgba(152,17,8,.28), rgba(20,28,37,.92));
}

.protoHeaderBar{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:18px;
  align-items:center;
}

.protoHeaderTitle{
  margin:4px 0;
  font-size:22px;
  line-height:1.15;
}

.protoHeaderText{
  margin:0;
  color:var(--muted);
  font-size:14px;
}

.protoHeaderStats{
  display:grid;
  grid-template-columns:repeat(3,minmax(120px,1fr));
  gap:12px;
}

.protoHeaderStat{
  min-width:120px;
  padding:12px 14px;
  border-radius:16px;
  border:1px solid rgba(152,17,8,.12);
  background:linear-gradient(180deg, rgba(255,255,255,.78), rgba(255,255,255,.54));
  box-shadow:0 12px 22px rgba(0,0,0,.04);
}

body.dark .protoHeaderStat{
  background:linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border-color:rgba(255,255,255,.08);
}

.protoHeaderStatValue{
  font-size:28px;
  font-weight:800;
  line-height:1;
  margin-bottom:6px;
}

.protoHeaderStatLabel{
  font-size:13px;
  color:var(--muted);
  font-weight:700;
}

.protoTabs{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

.protoTab{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:10px 16px;
  border-radius:14px;
  text-decoration:none;
  font-weight:800;
  border:1px solid var(--border);
  background:linear-gradient(180deg, rgba(255,255,255,.72), rgba(255,255,255,.48));
  color:var(--text);
}

body.dark .protoTab{
  background:linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.03));
}

.protoTab.is-active{
  background:linear-gradient(135deg, var(--brand), var(--brandHover));
  color:#fff;
  border-color:var(--brand);
  box-shadow:0 12px 20px rgba(152,17,8,.18);
}

.protoEditLayout{
  display:grid;
  grid-template-columns:minmax(0,1.65fr) minmax(320px,.95fr);
  gap:24px;
  margin-top:24px;
  align-items:start;
}

.protoMainCol,
.protoSideCol{
  display:flex;
  flex-direction:column;
  gap:24px;
  min-width:0;
}

.protoCard{
  padding:24px;
  overflow:hidden;
  min-height:unset;
  background:linear-gradient(180deg, rgba(255,255,255,.94), rgba(255,255,255,.82));
}

body.dark .protoCard{
  background:linear-gradient(180deg, rgba(20,28,37,.96), rgba(20,28,37,.90));
}

.protoStickyCard{
  position:sticky;
  top:22px;
}

.protoSectionHead{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:16px;
  padding-bottom:14px;
  border-bottom:1px solid rgba(152,17,8,.10);
}

.protoGrid2{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
}

.protoGrid3{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
}

.protoFull{grid-column:1 / -1}

.protoDivider{
  height:1px;
  margin:20px 0;
  background:linear-gradient(90deg, rgba(152,17,8,.02), rgba(152,17,8,.18), rgba(152,17,8,.02));
}

.protoCheckGrid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin-top:8px;
}

.protoChoicePill{
  width:100%;
  min-height:52px;
  justify-content:flex-start;
  border-radius:16px;
  padding:12px 14px;
  background:linear-gradient(180deg, rgba(255,255,255,.78), rgba(255,255,255,.50));
}

body.dark .protoChoicePill{
  background:linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.03));
}

.protoSummaryCard{
  padding:26px;
  min-height:unset;
  background:linear-gradient(135deg, rgba(152,17,8,.09), rgba(255,255,255,.92));
}

body.dark .protoSummaryCard{
  background:linear-gradient(135deg, rgba(152,17,8,.24), rgba(20,28,37,.94));
}

.protoSummaryHead{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
}

.protoKicker{
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:var(--brand);
  margin-bottom:8px;
}

.protoSummaryTitle{
  margin:0;
  font-size:28px;
  line-height:1.12;
}

.protoMetaGrid{
  display:grid;
  gap:14px;
  margin-top:18px;
}

.protoMetaGrid--4{
  grid-template-columns:repeat(4,minmax(0,1fr));
}

.protoMetaBox{
  border:1px solid rgba(152,17,8,.10);
  border-radius:16px;
  padding:14px 16px;
  background:linear-gradient(180deg, rgba(255,255,255,.76), rgba(255,255,255,.52));
}

body.dark .protoMetaBox{
  background:linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.025));
  border-color:rgba(255,255,255,.08);
}

.protoMetaLabel{
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.05em;
  color:var(--muted);
  margin-bottom:7px;
}

.protoMetaValue{
  font-size:15px;
  font-weight:700;
  line-height:1.45;
}

.protoViewGrid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:24px;
  margin-top:24px;
}

.protoCard--full{grid-column:1 / -1}

.protoInfoList{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.protoInfoRow{
  display:flex;
  justify-content:space-between;
  gap:14px;
  padding:10px 0;
  border-bottom:1px solid var(--border);
}

.protoInfoRow:last-child{border-bottom:none}

.protoInfoRow span{
  color:var(--muted);
  font-weight:700;
}

.protoInfoRow strong{
  text-align:right;
}

.protoReadBox{
  border:1px solid var(--border);
  border-radius:16px;
  padding:16px 18px;
  background:linear-gradient(180deg, rgba(255,255,255,.74), rgba(255,255,255,.52));
  line-height:1.65;
  white-space:pre-wrap;
  min-height:120px;
}

body.dark .protoReadBox{
  background:linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.025));
}

.protoTagList{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.protoEmptyBox{
  border:1px dashed var(--border);
  border-radius:16px;
  padding:16px;
  color:var(--muted);
  background:rgba(152,17,8,.03);
}

body.dark .protoEmptyBox{
  background:rgba(255,255,255,.02);
}

.footer{
  margin-top:80px;
  padding:30px 40px;
  border-top:1px solid var(--border);
  background:linear-gradient(180deg, rgba(255,255,255,.94), rgba(255,255,255,.82));
}

body.dark .footer{
  background:linear-gradient(180deg, rgba(20,28,37,.96), rgba(20,28,37,.90));
}

.footer-inner{
  max-width:1500px;
  margin:0 auto;
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
  gap:20px;
  font-size:14px;
  color:var(--muted);
}

/* ===== Dashboard ===== */

.dashboardToolbar{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:16px;
  flex-wrap:wrap;
  margin-top:28px;
}

.dashboardToolbarLeft{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.dashboardToolbarRight{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.dashboardCards{
  margin-top:26px;
}

.dashboardCard{
  position:relative;
}

.dashboardCardDefault{
  display:flex;
  flex-direction:column;
  height:100%;
}

.dashboardCardCompact{
  display:none;
}

.dashboardCardInner{
  display:flex;
  flex-direction:column;
  gap:10px;
  height:100%;
}

.dashboardCardHead{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.dashboardCardTitleRow{
  display:flex;
  align-items:flex-start;
  gap:10px;
  flex-wrap:wrap;
}

.dashboardCard h3{
  margin:0;
  font-size:22px;
  line-height:1.2;
}

.dashboardCardText{
  color:var(--muted);
  line-height:1.5;
  margin:0;
}

.dashboardCardActions{
  display:flex;
  align-items:flex-end;
  justify-content:flex-start;
  gap:12px;
}

.dashboardCard.isClickable .btn{
  min-width:130px;
}

.dashboardStateBadge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:30px;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
  line-height:1;
  white-space:nowrap;
}

.dashboardStateBadge--work{
  background:rgba(245,158,11,.14);
  border:1px solid rgba(245,158,11,.24);
  color:#b45309;
}

body.dark .dashboardStateBadge--work{
  color:#fcd34d;
}

.cards.adminView .card{
  outline:2px dashed rgba(152,17,8,.22);
  outline-offset:3px;
}

body.dark .cards.adminView .card{
  outline-color:rgba(152,17,8,.35);
}

/* ===== Dashboard Kompaktansicht ===== */

.dashboardCards.compactView{
  display:grid;
  grid-template-columns:repeat(4,minmax(220px,1fr));
  gap:18px;
  margin-top:26px;
}

.dashboardCards.compactView .dashboardCard{
  min-height:150px;
  padding:18px;
  border-radius:18px;
}

.dashboardCards.compactView .dashboardCardDefault{
  display:none;
}

.dashboardCards.compactView .dashboardCardCompact{
  display:flex;
  flex-direction:column;
  height:100%;
}

.dashboardCompactTileTop{
  flex:1 1 auto;
  min-width:0;
}

.dashboardCompactTitleWrap{
  display:flex;
  align-items:flex-start;
  gap:9px;
  flex-wrap:wrap;
  min-width:0;
}

.dashboardCards.compactView h3{
  font-size:17px;
  margin:0;
  font-weight:800;
  line-height:1.25;
}

.dashboardCompactActions{
  display:flex;
  align-items:center;
  gap:9px;
  flex-wrap:wrap;
  margin-top:16px;
}

.dashboardCards.compactView .btn{
  min-height:38px;
  padding:8px 12px;
  border-radius:11px;
  font-size:12px;
  min-width:96px;
}

.dashboardCards.compactView .lockInfo{
  margin-top:0;
  padding:7px 10px;
  border-radius:11px;
  font-size:12px;
  box-shadow:none;
}

.dashboardCards.compactView .badgeAdmin{
  margin-top:0;
  padding:5px 8px;
  font-size:10px;
  box-shadow:none;
}

.dashboardCards.compactView .dashboardStateBadge{
  min-height:24px;
  padding:5px 8px;
  font-size:10px;
}

.dashboardCards.compactView .dashboardCard:hover{
  transform:translateY(-2px);
}

.dashboardCards.compactView .dashboardCard.isClickable{
  border-left:0;
}

.dashboardCards.compactView .dashboardCard.isClickable::after{
  content:"";
  position:absolute;
  left:18px;
  right:18px;
  bottom:0;
  height:3px;
  background:linear-gradient(90deg, var(--brand), rgba(180,125,36,.28));
  border-radius:999px 999px 0 0;
  opacity:.55;
}

.dashboardCards.compactView .dashboardCard.isLocked{
  opacity:.94;
}

@media (max-width:1200px){
  .dashboardCards.compactView{
    grid-template-columns:repeat(3,minmax(210px,1fr));
  }
}

@media (max-width:900px){
  .dashboardCards.compactView{
    grid-template-columns:repeat(2,minmax(220px,1fr));
  }
}

@media (max-width:650px){
  .dashboardCards.compactView{
    grid-template-columns:1fr;
  }

  .dashboardCompactActions .btn,
  .dashboardCompactActions .lockInfo{
    width:100%;
    justify-content:center;
    text-align:center;
  }
}

/* ===== Wissensdatenbank ===== */

.kbPage{
  display:flex;
  flex-direction:column;
  gap:24px;
}

.kbPageHead{
  margin-top:24px;
}

.kbHero{
  display:grid;
  grid-template-columns:minmax(0,1.5fr) minmax(320px,.95fr);
  gap:22px;
  padding:28px 30px;
  border:1px solid var(--border);
  border-radius:24px;
  background:
    linear-gradient(135deg, rgba(152,17,8,.10), rgba(255,255,255,.92)),
    var(--card);
  box-shadow:0 18px 40px rgba(0,0,0,.07);
  position:relative;
  overflow:hidden;
}

body.dark .kbHero{
  background:
    linear-gradient(135deg, rgba(152,17,8,.24), rgba(20,28,37,.94)),
    var(--card);
  box-shadow:0 18px 48px rgba(0,0,0,.36);
}

.kbHero::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:3px;
  background:linear-gradient(90deg, rgba(152,17,8,.08), var(--brand), rgba(180,125,36,.22), var(--brand), rgba(152,17,8,.08));
}

.kbHeroText{
  position:relative;
  z-index:1;
}

.kbHeroEyebrow{
  font-size:12px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--brand);
  margin-bottom:10px;
}

.kbHeroTitle{
  margin:0;
  font-size:34px;
  line-height:1.08;
  letter-spacing:.01em;
}

.kbHeroDesc{
  margin:14px 0 0;
  max-width:760px;
  color:var(--muted);
  font-size:15px;
  line-height:1.65;
}

.kbHeroStats{
  display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  gap:14px;
  align-self:stretch;
}

.kbStatCard{
  display:flex;
  flex-direction:column;
  justify-content:center;
  min-height:120px;
  padding:18px 18px;
  border-radius:18px;
  border:1px solid rgba(152,17,8,.12);
  background:linear-gradient(180deg, rgba(255,255,255,.78), rgba(255,255,255,.56));
  box-shadow:0 12px 24px rgba(0,0,0,.05);
}

body.dark .kbStatCard{
  background:linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border-color:rgba(255,255,255,.08);
  box-shadow:0 14px 28px rgba(0,0,0,.28);
}

.kbStatValue{
  font-size:32px;
  font-weight:800;
  line-height:1;
  margin-bottom:8px;
}

.kbStatLabel{
  color:var(--muted);
  font-size:13px;
  font-weight:700;
}

.kbLayout{
  display:grid;
  grid-template-columns:minmax(0,1.6fr) minmax(320px,.85fr);
  gap:24px;
  align-items:start;
}

.kbMain,
.kbSide{
  min-width:0;
}

.kbBox,
.kbSideCard,
.kbCard,
.kbArticleCard,
.kbArticleMetaCard,
.kbTagCard{
  min-height:unset;
}

.kbBox{
  padding:26px;
}

.kbSearch{
  display:grid;
  grid-template-columns:minmax(0,1.35fr) minmax(220px,.8fr) auto;
  gap:14px;
  align-items:end;
}

.kbSearchField{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.kbSearchField--select{
  min-width:0;
}

.kbSearchLabel{
  font-size:12px;
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:var(--muted);
}

.kbSearchInput,
.kbSearchSelect{
  min-height:50px;
}

.kbSearchActions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-start;
}

.kbSearchBtn{
  min-width:120px;
}

.kbSectionHead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:26px 0 14px;
  padding-bottom:10px;
  border-bottom:1px solid rgba(152,17,8,.10);
  font-weight:800;
}

.kbSectionHead small{
  color:var(--muted);
  font-size:12px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.04em;
}

.kbCategoryGrid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:14px;
}

.kbCategoryCard{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:16px 18px;
  border:1px solid var(--border);
  border-radius:18px;
  background:linear-gradient(180deg, rgba(255,255,255,.82), rgba(255,255,255,.62));
  transition:transform .16s ease, border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
  box-shadow:0 10px 20px rgba(0,0,0,.04);
}

body.dark .kbCategoryCard{
  background:linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.025));
  box-shadow:0 12px 24px rgba(0,0,0,.24);
}

.kbCategoryCard:hover{
  transform:translateY(-2px);
  border-color:rgba(152,17,8,.24);
  box-shadow:0 16px 28px rgba(0,0,0,.08);
}

.kbCategoryCard.isActive{
  border-color:rgba(152,17,8,.34);
  background:linear-gradient(135deg, rgba(152,17,8,.11), rgba(255,255,255,.86));
  box-shadow:0 18px 32px rgba(152,17,8,.10);
}

body.dark .kbCategoryCard.isActive{
  background:linear-gradient(135deg, rgba(152,17,8,.22), rgba(255,255,255,.05));
}

.kbCategoryLeft{
  min-width:0;
  flex:1 1 auto;
}

.kbCategoryTitle{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
  font-weight:800;
  font-size:15px;
  line-height:1.35;
}

.kbCategoryIcon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  border-radius:12px;
  background:rgba(152,17,8,.09);
  flex:0 0 auto;
}

.kbCategoryRight{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.kbOpenBtn{
  font-size:12px;
  font-weight:800;
  color:var(--brand);
  text-transform:uppercase;
  letter-spacing:.04em;
}

.kbList{
  display:flex;
  flex-direction:column;
  gap:14px;
}

.kbItem{
  display:flex;
  align-items:stretch;
  justify-content:space-between;
  gap:16px;
  padding:18px 20px;
  border:1px solid var(--border);
  border-radius:20px;
  background:linear-gradient(180deg, rgba(255,255,255,.84), rgba(255,255,255,.64));
  box-shadow:0 12px 24px rgba(0,0,0,.05);
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

body.dark .kbItem{
  background:linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.025));
  box-shadow:0 14px 28px rgba(0,0,0,.26);
}

.kbItem:hover{
  transform:translateY(-2px);
  border-color:rgba(152,17,8,.24);
  box-shadow:0 18px 30px rgba(0,0,0,.09);
}

.kbItemBody{
  flex:1 1 auto;
  min-width:0;
}

.kbItemTop{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}

.kbTitle{
  font-size:18px;
  font-weight:800;
  line-height:1.3;
}

.kbExcerpt{
  color:var(--muted);
  line-height:1.6;
  margin-bottom:12px;
}

.kbMeta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  color:var(--muted);
  font-size:13px;
}

.kbMeta .sep,
.kbSideMeta .sep{
  opacity:.55;
}

.kbItemArrow{
  display:flex;
  align-items:center;
  justify-content:center;
  min-width:42px;
  font-size:22px;
  font-weight:800;
  color:var(--brand);
  opacity:.85;
}

.kbSide{
  display:flex;
  flex-direction:column;
  gap:24px;
}

.kbSideCard{
  padding:22px;
}

.kbSideTitle{
  margin:0 0 14px;
  font-size:18px;
}

.kbSideList{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.kbSideItem{
  display:block;
  padding:14px 15px;
  border:1px solid var(--border);
  border-radius:16px;
  background:linear-gradient(180deg, rgba(255,255,255,.74), rgba(255,255,255,.56));
  transition:transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

body.dark .kbSideItem{
  background:linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.025));
}

.kbSideItem:hover{
  transform:translateY(-1px);
  border-color:rgba(152,17,8,.22);
  box-shadow:0 12px 22px rgba(0,0,0,.08);
}

.kbSideItemTitle{
  font-weight:800;
  line-height:1.35;
  margin-bottom:6px;
}

.kbSideMeta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  color:var(--muted);
  font-size:12px;
}

.kbSideEmpty{
  color:var(--muted);
  font-size:14px;
  padding:12px 0 4px;
}

.kbEmpty{
  padding:22px;
  border:1px dashed var(--border);
  border-radius:18px;
  background:rgba(152,17,8,.03);
}

body.dark .kbEmpty{
  background:rgba(255,255,255,.025);
}

.kbEmptyTitle{
  font-size:18px;
  font-weight:800;
  margin-bottom:8px;
}

.kbEmptyText{
  color:var(--muted);
  line-height:1.55;
}

.kbArticlePage{
  display:flex;
  flex-direction:column;
  gap:18px;
}

.kbBreadcrumbs{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom:10px;
  color:var(--muted);
  font-size:13px;
  font-weight:700;
}

.kbBreadcrumbs a{color:var(--brand)}

.kbArticleTitle{margin-bottom:2px}

.kbArticleSubline{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
}

.kbTagCard{padding:18px 20px}

.kbTagWrap{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.kbArticleMetaCard{padding:22px}

.kbArticleMetaGrid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0,1fr));
  gap:14px;
}

.kbMetaBox{
  border:1px solid rgba(152,17,8,.10);
  border-radius:16px;
  padding:14px 16px;
  background:linear-gradient(180deg, rgba(255,255,255,.76), rgba(255,255,255,.54));
}

body.dark .kbMetaBox{
  background:linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.025));
  border-color:rgba(255,255,255,.08);
}

.kbMetaLabel{
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.05em;
  color:var(--muted);
  margin-bottom:7px;
}

.kbMetaValue{
  font-size:15px;
  font-weight:700;
  line-height:1.45;
}

.kbVersionNote{
  margin-top:16px;
  padding:14px 16px;
  border-radius:16px;
  background:rgba(152,17,8,.06);
  border:1px solid rgba(152,17,8,.12);
  line-height:1.55;
}

.kbArticleCard{padding:28px}

.kbArticleContent{
  line-height:1.75;
  font-size:15px;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3{
  line-height:1.2;
  margin:1.4em 0 .7em;
}

.markdown-body h1:first-child,
.markdown-body h2:first-child,
.markdown-body h3:first-child{
  margin-top:0;
}

.markdown-body p{
  margin:.85em 0;
}

.markdown-body ul,
.markdown-body ol{
  margin:.8em 0 1em 1.3em;
  padding:0;
}

.markdown-body li{
  margin:.35em 0;
}

.markdown-body code{
  padding:.18em .42em;
  border-radius:8px;
  background:rgba(0,0,0,.06);
  font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size:.92em;
}

body.dark .markdown-body code{
  background:rgba(255,255,255,.08);
}

.kbEditPage{
  display:flex;
  flex-direction:column;
  gap:20px;
}

.kbEditGrid{
  display:grid;
  grid-template-columns:minmax(320px,.9fr) minmax(0,1.4fr);
  gap:24px;
  align-items:start;
}

.kbEditorHead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:16px;
}

.kbPreview{
  min-height:260px;
  padding:18px 18px;
  border-radius:18px;
  border:1px solid var(--border);
  background:linear-gradient(180deg, rgba(255,255,255,.76), rgba(255,255,255,.58));
}

body.dark .kbPreview{
  background:linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.025));
}

@media (max-width:1200px){
  .protoEditLayout{grid-template-columns:1fr}
  .protoStickyCard{position:static}
  .protoMetaGrid--4{grid-template-columns:repeat(2,minmax(0,1fr))}
  .kbLayout,
  .kbEditGrid,
  .kbHero{grid-template-columns:1fr}
  .kbHeroStats{grid-template-columns:repeat(3, minmax(0,1fr))}
  .kbArticleMetaGrid{grid-template-columns:repeat(2, minmax(0,1fr))}
}

@media (max-width:1000px){
  .cards{grid-template-columns:repeat(2,1fr)}
}

@media (max-width:980px){
  .wrap{padding:0 20px;margin:30px auto}
  .top{padding:24px;flex-direction:column;align-items:flex-start}
  .brand,.actions{width:100%}
  .grid2,.grid2tight{grid-template-columns:1fr}
  .adminHeaderRow{flex-direction:column;align-items:flex-start}
  .protoHeaderBar{grid-template-columns:1fr}
  .protoHeaderStats{grid-template-columns:repeat(3,minmax(100px,1fr))}
}

@media (max-width:900px){
  .adminHeaderActions{width:100%}
  .adminHeaderActions .btn{width:100%}
  .protoGrid3,.protoViewGrid,.protoCheckGrid,.protoGrid2{grid-template-columns:1fr}
  .kbSearch{grid-template-columns:1fr}
  .kbCategoryGrid{grid-template-columns:1fr}
  .kbItemTop{flex-direction:column;align-items:flex-start}
  .kbItem{padding:16px 16px}
  .kbHeroTitle{font-size:28px}
}

@media (max-width:760px){
  .dashboardRow{
    flex-direction:column;
    align-items:flex-start;
  }

  .dashboardRowRight{
    width:100%;
  }

  .dashboardRowRight .btn,
  .dashboardRowRight .lockInfo{
    width:100%;
    justify-content:center;
    text-align:center;
  }

  .dashboardCompactTitleWrap{
    width:100%;
  }
}

@media (max-width:700px){
  .protoHeaderCard{padding:16px}
  .protoHeaderStats{grid-template-columns:1fr}
}

@media (max-width:650px){
  .cards{grid-template-columns:1fr}
}

@media (max-width:640px){
  .pageTitle{font-size:24px}
  .protoCard,.protoSummaryCard{padding:18px}
  .protoSummaryHead,.protoInfoRow{flex-direction:column;align-items:flex-start}
  .protoInfoRow strong{text-align:left}
  .protoMetaGrid--4{grid-template-columns:1fr}
  .kbHero{padding:20px}
  .kbBox,
  .kbSideCard,
  .kbCard,
  .kbArticleCard,
  .kbArticleMetaCard{padding:18px}
  .kbHeroStats{grid-template-columns:1fr}
  .kbArticleMetaGrid{grid-template-columns:1fr}
  .kbCategoryCard,
  .kbItem{flex-direction:column;align-items:flex-start}
  .kbCategoryRight{width:100%;justify-content:space-between}
  .kbItemArrow{min-width:0;align-self:flex-end}
  .kbEditorHead{flex-direction:column;align-items:flex-start}
}

@media print{
  .print-header{
    border-bottom:3px solid #981108;
    padding-bottom:10px;
    margin-bottom:20px;
  }

  .print-title{
    font-size:22px;
    font-weight:800;
    color:#981108;
    margin:0;
  }

  .print-subtitle{
    font-size:12px;
    color:#666;
  }
}

/* ===== Materialbestellung ===== */

.materialTabs{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top:24px;
}

.materialTab{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:10px 16px;
  border-radius:14px;
  text-decoration:none;
  font-weight:800;
  border:1px solid var(--border);
  background:linear-gradient(180deg, rgba(255,255,255,.72), rgba(255,255,255,.48));
  color:var(--text);
  transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease, background-color .15s ease;
}

body.dark .materialTab{
  background:linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.03));
}

.materialTab:hover{
  transform:translateY(-1px);
  border-color:rgba(152,17,8,.24);
  box-shadow:0 12px 20px rgba(0,0,0,.08);
}

.materialTab.is-active{
  background:linear-gradient(135deg, var(--brand), var(--brandHover));
  color:#fff;
  border-color:var(--brand);
  box-shadow:0 12px 20px rgba(152,17,8,.18);
}

.materialStatsRow{
  display:grid;
  grid-template-columns:repeat(4, minmax(0,1fr));
  gap:16px;
  margin-top:24px;
}

.materialStatCard{
  padding:18px 18px;
  border-radius:18px;
  border:1px solid rgba(152,17,8,.12);
  background:linear-gradient(180deg, rgba(255,255,255,.86), rgba(255,255,255,.64));
  box-shadow:0 12px 22px rgba(0,0,0,.05);
}

body.dark .materialStatCard{
  background:linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border-color:rgba(255,255,255,.08);
  box-shadow:0 14px 26px rgba(0,0,0,.28);
}

.materialStatValue{
  font-size:28px;
  font-weight:800;
  line-height:1.05;
  margin-bottom:8px;
}

.materialStatLabel{
  color:var(--muted);
  font-size:13px;
  font-weight:700;
}

.materialFilterGrid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0,1fr));
  gap:14px;
}

.materialAdminActions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:8px;
}

.materialAdminTable .table{
  min-width:1400px;
}

.materialAdminNote{
  min-width:280px;
}

.materialTextareaAdmin{
  min-height:90px;
  resize:vertical;
}

.materialChoiceGrid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:12px;
  margin-top:4px;
}

.materialChoiceCard{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:56px;
  padding:14px 16px;
  border-radius:16px;
  border:1px solid var(--border);
  background:linear-gradient(180deg, rgba(255,255,255,.82), rgba(255,255,255,.60));
  cursor:pointer;
  transition:transform .15s ease, border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
  font-weight:700;
}

body.dark .materialChoiceCard{
  background:linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.025));
}

.materialChoiceCard:hover{
  transform:translateY(-1px);
  border-color:rgba(152,17,8,.22);
  box-shadow:0 12px 20px rgba(0,0,0,.08);
}

.materialChoiceCard input{
  margin:0;
  accent-color:var(--brand);
}

.materialOrderList{
  display:flex;
  flex-direction:column;
  gap:14px;
  margin-top:14px;
}

.materialOrderItem{
  border:1px solid var(--border);
  border-radius:18px;
  padding:16px 18px;
  background:linear-gradient(180deg, rgba(255,255,255,.84), rgba(255,255,255,.66));
  box-shadow:0 10px 20px rgba(0,0,0,.04);
}

body.dark .materialOrderItem{
  background:linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.025));
  box-shadow:0 12px 22px rgba(0,0,0,.26);
}

.materialOrderTop{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
}

.materialInfoBlock{
  margin-top:12px;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid var(--border);
  background:rgba(0,0,0,.02);
  line-height:1.55;
}

body.dark .materialInfoBlock{
  background:rgba(255,255,255,.03);
}

.materialInfoBlock--admin{
  background:rgba(152,17,8,.06);
  border-color:rgba(152,17,8,.14);
}

.materialEmptyState{
  margin-top:12px;
  padding:18px 18px;
  border-radius:16px;
  border:1px dashed var(--border);
  background:rgba(152,17,8,.03);
  color:var(--muted);
}

body.dark .materialEmptyState{
  background:rgba(255,255,255,.02);
}

.inlineForm{
  display:grid;
  grid-template-columns:1fr 120px auto;
  gap:8px;
  align-items:center;
}

.inlineForm .input{
  min-width:0;
}

@media (max-width:1200px){
  .materialStatsRow{
    grid-template-columns:repeat(2, minmax(0,1fr));
  }

  .materialFilterGrid{
    grid-template-columns:repeat(2, minmax(0,1fr));
  }

  .materialChoiceGrid{
    grid-template-columns:1fr;
  }

  .inlineForm{
    grid-template-columns:1fr 120px;
  }

  .inlineForm .btn{
    grid-column:1 / -1;
  }
}

@media (max-width:760px){
  .materialStatsRow,
  .materialFilterGrid{
    grid-template-columns:1fr;
  }

  .materialOrderTop{
    flex-direction:column;
    align-items:flex-start;
  }

  .materialTabs{
    flex-direction:column;
  }

  .materialTabs .materialTab{
    width:100%;
  }

  .materialAdminActions{
    width:100%;
  }

  .materialAdminActions .btn{
    width:100%;
  }

  .inlineForm{
    grid-template-columns:1fr;
  }
}
/* ===== Dashboard Refresh 2026 ===== */
.dashboardKicker{
  display:inline-flex;
  align-items:center;
  gap:8px;
  width:max-content;
  min-height:28px;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(152,17,8,.09);
  border:1px solid rgba(152,17,8,.18);
  color:var(--brand);
  font-size:12px;
  font-weight:900;
  letter-spacing:.06em;
  text-transform:uppercase;
}

.dashboardCards:not(.compactView){
  align-items:stretch;
}

.dashboardCard{
  border-radius:22px;
  min-height:220px;
  isolation:isolate;
}

.dashboardCard::after{
  content:"";
  position:absolute;
  right:-46px;
  top:-46px;
  width:130px;
  height:130px;
  border-radius:999px;
  background:radial-gradient(circle, rgba(152,17,8,.10), rgba(152,17,8,0) 68%);
  pointer-events:none;
  z-index:-1;
}

.dashboardCardTitleRow h3{
  max-width:100%;
}

.dashboardCardActions{
  flex-wrap:wrap;
  align-items:center;
  padding-top:18px;
}

.dashboardCardActions .btn,
.dashboardCompactActions .btn{
  min-width:128px;
}

.dashboardAdminBtn{
  border-color:rgba(152,17,8,.18);
  color:var(--brand);
  font-weight:900;
}

body.dark .dashboardAdminBtn{
  color:#fca5a5;
  border-color:rgba(152,17,8,.34);
}

.dashboardCard.hasAdminAction::before{
  height:4px;
  background:linear-gradient(90deg, var(--brand), rgba(180,125,36,.55), rgba(152,17,8,.16));
}

.dashboardCard.hasAdminAction .dashboardAdminBtn::before{
  content:"⚙";
  font-size:13px;
  line-height:1;
}

/* Kompaktansicht jetzt wieder als reduzierte Kachelansicht */
.dashboardCards.compactView{
  display:grid;
  grid-template-columns:repeat(4,minmax(220px,1fr));
  gap:18px;
  margin-top:26px;
}

.dashboardCards.compactView .dashboardCard{
  min-height:148px;
  padding:18px;
  border-radius:20px;
}

.dashboardCards.compactView .dashboardCardDefault{
  display:none;
}

.dashboardCards.compactView .dashboardCardCompact{
  display:flex;
  flex-direction:column;
  height:100%;
  gap:14px;
}

.dashboardCompactTileTop{
  min-width:0;
}

.dashboardCards.compactView .dashboardCompactTitleWrap{
  display:flex;
  align-items:flex-start;
  gap:8px;
  flex-wrap:wrap;
  min-width:0;
}

.dashboardCards.compactView h3{
  font-size:17px;
  margin:0;
  font-weight:900;
  line-height:1.22;
}

.dashboardCompactActions{
  margin-top:auto;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}

.dashboardCards.compactView .btn{
  min-height:38px;
  padding:8px 12px;
  border-radius:12px;
  font-size:12px;
  min-width:96px;
  flex:1 1 auto;
}

.dashboardCards.compactView .lockInfo{
  width:100%;
  margin-top:0;
  padding:8px 10px;
  border-radius:12px;
  font-size:12px;
  box-shadow:none;
  text-align:center;
}

.dashboardCards.compactView .badgeAdmin{
  margin-top:0;
  padding:5px 8px;
  font-size:10px;
  box-shadow:none;
}

.dashboardCards.compactView .dashboardStateBadge{
  min-height:24px;
  padding:5px 8px;
  font-size:10px;
}

.dashboardCards.compactView .dashboardCard:hover{
  transform:translateY(-3px);
}

.dashboardCards.compactView .dashboardCard.isClickable{
  border-left:0;
}

.dashboardCards.compactView .dashboardCard.isLocked{
  opacity:.94;
}

@media (max-width:1200px){
  .dashboardCards.compactView{
    grid-template-columns:repeat(3,minmax(220px,1fr));
  }
}

@media (max-width:900px){
  .dashboardCards.compactView{
    grid-template-columns:repeat(2,minmax(220px,1fr));
  }
}

@media (max-width:650px){
  .dashboardCards.compactView{
    grid-template-columns:1fr;
  }

  .dashboardCompactActions .btn,
  .dashboardCompactActions .lockInfo{
    width:100%;
  }
}
