/* JustizBot – individuelle Arbeitsplatzdarstellung, nur im angemeldeten Bereich */
body[data-accent="blue"] { --accent:#3188e8; --accent-2:#93c9ff; }
body[data-accent="green"] { --accent:#259b73; --accent-2:#82dfb0; }
body[data-accent="violet"] { --accent:#9969de; --accent-2:#c6a5fa; }
body[data-theme="light"][data-accent="gold"] { --accent:#0876e8; --accent-2:#005fc0; }
body[data-theme="light"][data-accent="blue"] { --accent:#0876e8; --accent-2:#005fc0; }
body[data-theme="light"][data-accent="green"] { --accent:#0e8656; --accent-2:#087247; }
body[data-theme="light"][data-accent="violet"] { --accent:#7d3bb7; --accent-2:#6a2a9d; }
body[data-density="compact"] .panel { padding: 12px 16px; }
body[data-density="compact"] .app-nav a { padding-block: 6px; }
body[data-density="compact"] .table-wrap td, body[data-density="compact"] .table-wrap th { padding-block: 7px; }
body[data-density="compact"] .main { padding-top: 14px; }
body[data-font-size="large"] .main,body[data-font-size="large"] .app-nav,body[data-font-size="large"] .profile-menu {font-size:1.08rem}
body[data-font-size="large"] .main input,body[data-font-size="large"] .main select,body[data-font-size="large"] .main textarea,body[data-font-size="large"] .main button,body[data-font-size="large"] .main td {font-size:1.04em}
/* Dashboard Studio 2.0. Spezifische Selektoren übersteuern bestehende Dashboard-Raster
   in app.css und justiz-features.css, ohne beide Bestandsdateien anzufassen. */
body .dashboard-cockpit {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-areas: none;
  gap: 16px;
  align-items: start;
}
body .dashboard-cockpit > section[data-widget] {
  grid-area: auto;
  grid-column: 1 / -1;
  min-width: 0;
  margin: 0 !important;
  height: auto;
  transition: border-color .17s ease, box-shadow .17s ease;
}
body .dashboard-cockpit > section[data-widget][data-size="full"] { grid-column: span 12; }
body .dashboard-cockpit > section[data-widget][data-size="half"] { grid-column: span 6; }
body .dashboard-cockpit > section[data-widget][data-size="compact"] { grid-column: span 4; }
body .dashboard-cockpit > section[data-widget][hidden] { display: none !important; }
.dashboard-studio[hidden], .dashboard-studio-backdrop[hidden],
.dashboard-widget-tools[hidden] { display: none !important; }
.dashboard-head [data-dashboard-config-toggle].is-active {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  background: color-mix(in srgb, var(--accent) 10%, var(--panel));
}
.dashboard-studio {
  position: fixed;
  z-index: 260;
  inset: 0 0 0 auto;
  width: 355px;
  max-width: 92vw;
  display: flex;
  flex-direction: column;
  background: var(--panel, #1c2431);
  color: var(--text, #edf2f9);
  border-left: 1px solid var(--line, #344155);
  box-shadow: -24px 0 56px rgba(0,0,0,.26);
  animation: dashboard-slide-in .2s ease-out;
}
@keyframes dashboard-slide-in { from { transform: translateX(20px); opacity: .6; } to { transform: translateX(0); opacity: 1; } }
.dashboard-studio-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 25px 21px 19px;
  border-bottom: 1px solid var(--line);
}
.dashboard-studio-eyebrow { color: var(--accent-2); font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.dashboard-studio-head h2 { font-size: 20px; margin: 7px 0 4px; line-height: 1.2; }
.dashboard-studio-head p { font-size: 12px; line-height: 1.5; color: var(--muted); margin: 0; }
.dashboard-studio-close {
  flex: 0 0 auto; width: 32px; height: 32px; min-height: 0; padding: 0;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2);
  color: var(--text); font-size: 23px; font-weight: 400; line-height: 1;
}
.dashboard-studio-close:hover, .dashboard-studio-move button:hover { border-color: var(--accent); }
.dashboard-studio-body { flex: 1; min-height: 0; overflow-y: auto; padding: 20px 16px 25px; scrollbar-width: thin; }
.dashboard-studio-note {
  display: flex; align-items: flex-start; gap: 10px; border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
  background: color-mix(in srgb, var(--accent) 7%, var(--panel)); padding: 12px 14px;
  border-radius: 13px; font-size: 12px; color: var(--muted); line-height: 1.5;
}
.dashboard-studio-note > span:first-child { font-size: 22px; color: var(--accent-2); line-height: 1.1; }
.dashboard-studio-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 24px 5px 12px; }
.dashboard-studio-section-head h3 { font-size: 13px; letter-spacing: .01em; margin: 0; }
.dashboard-studio-count { color: var(--muted); font-size: 11px; }
.dashboard-studio-list { display: flex; flex-direction: column; gap: 8px; }
.dashboard-studio-item {
  border: 1px solid var(--line); border-radius: 13px; background: var(--panel-2);
  padding: 12px 13px; transition: opacity .15s ease, border-color .15s ease;
}
.dashboard-studio-item:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.dashboard-studio-item.is-muted { opacity: .68; }
.dashboard-studio-item-top, .dashboard-studio-item-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dashboard-studio-item-bottom { padding-top: 10px; }
.dashboard-studio-name { font-size: 13px; line-height: 1.35; font-weight: 650; min-width: 0; }
.dashboard-studio-switch {
  width: 38px; height: 22px; min-height: 0; border: 1px solid var(--line); border-radius: 99px;
  padding: 2px; background: color-mix(in srgb, var(--muted) 30%, var(--panel));
  flex: 0 0 38px; display: inline-flex; align-items: center; justify-content: flex-start;
  transition: background .15s ease;
}
.dashboard-studio-switch[aria-checked="true"] { background: var(--accent); border-color: var(--accent); }
.dashboard-studio-switch > span { display: block; width: 16px; height: 16px; border-radius: 99px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.23); transition: transform .15s ease; }
.dashboard-studio-switch[aria-checked="true"] > span { transform: translateX(16px); }
.dashboard-studio-size-label { display:flex; align-items:center; justify-content:space-between; gap:7px; min-width:0; flex:1; }
.dashboard-studio-size-label > span { font-size: 11px; color: var(--muted); }
.dashboard-studio-size-label select {
  font-family: inherit; width: 115px; max-width: 100%; min-width: 0; min-height: 31px;
  font-size: 11px; border: 1px solid var(--line); background: var(--panel); color: var(--text);
  border-radius: 8px; padding: 5px 6px;
}
.dashboard-studio-move { display: none; gap: 3px; }
.dashboard-studio-move button {
  min-width: 29px; height: 30px; min-height:0; padding: 0; color: var(--text);
  background: var(--panel); border:1px solid var(--line); border-radius: 8px; font-size: 15px;
}
.dashboard-studio-move button:disabled { opacity: .25; cursor: default; }
.dashboard-studio-footer { padding: 14px 17px max(17px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--panel); }
.dashboard-studio-feedback { display:block; min-height:18px; font-size:11px; color: var(--muted); margin:0 0 10px 2px; }
.dashboard-studio-feedback.is-error { color: #f28b82; }
.dashboard-studio-actions { display:flex; gap: 9px; }
.dashboard-studio-actions button { flex:1; min-width:0; font-size: 12px; }
.dashboard-studio-actions .dashboard-studio-reset { flex: 1.15; }
.dashboard-widget-tools {
  display: flex; align-items:center; gap:8px; margin:-4px 0 14px;
  padding: 0 0 11px; border-bottom: 1px dashed var(--line); min-height: 28px;
}
.dashboard-widget-handle {
  display:inline-flex; align-items:center; gap:9px; padding:5px 10px; min-height:28px;
  border:1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  color:var(--text); background:color-mix(in srgb, var(--accent) 6%, var(--panel-2));
  border-radius:8px; font-size:11px; cursor:grab; user-select:none;
}
.dashboard-widget-handle:active { cursor:grabbing; }
.dashboard-widget-handle > span:first-child { font-size:17px; color:var(--accent-2); }
.dashboard-widget-hide, .dashboard-widget-move {
  border: 1px solid var(--line); background: var(--panel-2); border-radius: 8px;
  font-size: 16px; color: var(--muted); min-width:28px; height:28px; min-height:0; padding:0;
}
.dashboard-widget-hide { margin-left:auto; }
.dashboard-widget-hide:hover { color: #f3a3a3; border-color: #f3a3a3; }
.dashboard-widget-move { display:none; }
.dashboard-widget-move:disabled { opacity:.25; }
body .dashboard-cockpit.is-editing > section[data-widget]:not([hidden]) {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 12%, transparent);
}
body .dashboard-cockpit.is-editing > section[data-widget].dash-dragging { opacity:.53; }
body .dashboard-cockpit.is-editing > section[data-widget].dash-drop-before { box-shadow: 0 -4px 0 var(--accent), 0 0 0 1px var(--accent); }
body .dashboard-cockpit.is-editing > section[data-widget].dash-drop-after { box-shadow: 0 4px 0 var(--accent), 0 0 0 1px var(--accent); }
/* Nur während des Editierens Platz für den Drawer reservieren. */
@media (min-width: 1210px) {
  body.dashboard-studio-open .app-workspace .main { padding-right: 374px; }
}
@media (max-width: 1360px) {
  body .dashboard-cockpit > section[data-widget][data-size="compact"] { grid-column: span 6; }
}
@media (max-width: 1040px) {
  body .dashboard-cockpit > section[data-widget][data-size="half"],
  body .dashboard-cockpit > section[data-widget][data-size="compact"] { grid-column: span 12; }
  .dashboard-studio-backdrop:not([hidden]) { position:fixed; z-index:259; inset:0; background:rgba(0,0,0,.54); }
  .dashboard-widget-move { display: inline-block; }
  .dashboard-studio-move { display: inline-flex; }
}
@media (max-width: 640px) {
  .dashboard-studio { width: min(355px, 94vw); }
  .dashboard-studio-head { padding: 20px 17px 16px; }
  .dashboard-studio-body { padding: 16px 12px; }
  body .dashboard-cockpit { grid-template-columns: minmax(0,1fr); }
  body .dashboard-cockpit > section[data-widget] { grid-column: 1 / -1 !important; }
}
@media (prefers-reduced-motion:reduce) { .dashboard-studio, .dashboard-studio-switch > span { animation:none; transition:none; } }
:where(.dashboard-studio, .dashboard-widget-tools) button:focus-visible,
.dashboard-studio-size-label select:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.dashboard-favorites { grid-column:1/-1; }
.dashboard-favorites .table-wrap {overflow-x:auto;}
.case-favorite-button {white-space:nowrap;}
.case-favorite-button.is-favorite {border-color:var(--accent);color:var(--accent-2);}
.personal-push-choices {display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:10px;margin:14px 0;}
.personal-toggle {display:flex;align-items:center;gap:10px;background:var(--panel-2);border:1px solid var(--line);border-radius:10px;padding:12px;cursor:pointer;}
.dashboard-head .toolbar {gap:10px;}
@media (max-width:640px) { .dashboard-config-list {grid-template-columns:1fr} }
