:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --panel-2: #eef3f8;
  --text: #142033;
  --muted: #64748b;
  --line: #d9e2ec;
  --primary: #0f766e;
  --primary-2: #155e75;
  --danger: #b42318;
  --warn: #b45309;
  --ok: #15803d;
  --shadow: 0 10px 30px rgba(15, 23, 42, .08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button, input, select, textarea { font: inherit; }

button {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  min-height: 36px;
  padding: 7px 11px;
  border-radius: 6px;
  cursor: pointer;
}

button:hover { border-color: #9fb1c4; }
button.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
button.danger { color: #fff; background: var(--danger); border-color: var(--danger); }
button.ghost { background: transparent; }
button.icon { width: 36px; padding: 0; display: inline-grid; place-items: center; }

input, select, textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
}

textarea { min-height: 86px; resize: vertical; }
label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; }

.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 460px) 1fr;
  background: #edf3f7;
}

.login-panel {
  padding: 44px;
  background: var(--panel);
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: var(--shadow);
}

.login-visual {
  background:
    linear-gradient(rgba(12, 28, 44, .24), rgba(12, 28, 44, .18)),
    var(--login-tenant-logo, url("https://api.hevexo.de/uploads/tenants/cargovia/logo.png")) center / min(520px, 70%) no-repeat,
    linear-gradient(135deg, #dfe9f1, #f7fafc 48%, #d4ebe7);
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 28px;
}

.login-brand img {
  max-width: 220px;
  width: 100%;
  max-height: 82px;
  object-fit: contain;
}

.login-brand-subtitle {
  color: var(--muted);
  margin-top: 8px;
}

.hevexo-login-brand {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  user-select: none;
}

.hevexo-login-brand img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  display: block;
}

.brand-row { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.brand-row img { max-width: 170px; max-height: 62px; object-fit: contain; }
.brand-title { font-size: 22px; font-weight: 760; }
.brand-subtitle { color: var(--muted); margin-top: 2px; }
.login form { display: grid; gap: 14px; }
.login-error { min-height: 22px; color: var(--danger); font-size: 13px; }

.shell { min-height: 100vh; display: grid; grid-template-columns: 250px 1fr; }
.sidebar {
  background: #173149;
  color: #d8e5ee;
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sidebar .brand-row {
  margin: 0;
  padding: 12px 10px 18px;
  border-bottom: 1px solid rgba(255,255,255,.14);
  justify-content: center;
  background: rgba(255,255,255,.08);
  border-radius: 8px;
}
.sidebar .brand-title { font-size: 16px; color: #fff; }
.sidebar .brand-subtitle { font-size: 12px; color: #9fb1c4; }
.sidebar img { max-width: 178px; max-height: 68px; width: 100%; }

.nav { display: grid; gap: 4px; }
.nav button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  background: transparent;
  color: #c9d8e4;
  border-color: transparent;
  width: 100%;
}
.nav button.active { background: rgba(255,255,255,.16); color: #fff; }
.nav .mark { width: 22px; text-align: center; color: #9ee6d4; }

.sidebar-foot {
  margin-top: auto;
  display: grid;
  gap: 10px;
  padding: 10px 8px 4px;
  color: #d8e5ee;
  font-size: 12px;
}
.sidebar-user {
  color: #d8e5ee;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-foot .ghost {
  color: #fff;
  border-color: rgba(255,255,255,.72);
  background: rgba(255,255,255,.04);
}
.sidebar-foot .ghost:hover {
  background: rgba(255,255,255,.14);
  border-color: #fff;
}

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 22px;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
}

.topbar h1 { margin: 0; font-size: 21px; line-height: 1.2; }
.topbar .meta { color: var(--muted); font-size: 13px; margin-top: 3px; }
.content { padding: 22px; display: grid; gap: 18px; }

.band {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.band-head {
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfe;
}
.band-head h2 { margin: 0; font-size: 16px; }
.band-body { padding: 16px; }

.grid { display: grid; gap: 12px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}
.stat .value { font-size: 28px; font-weight: 780; }
.stat .label { color: var(--muted); font-size: 13px; margin-top: 3px; }
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.task-list { display: grid; gap: 8px; }
.task-item {
  display: grid;
  text-align: left;
  width: 100%;
  border-left: 4px solid var(--line);
  background: #fff;
  padding: 12px;
}
.task-item.warn { border-left-color: var(--warn); background: #fff7ed; }
.task-item.ok { border-left-color: var(--ok); background: #f0fdf4; }
.task-item small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}

/* HEVEXO_DASHBOARD_TASK_ARROW_ALIGN_FIX_20260614_START */
.task-item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 12px;
}
.task-item > span:first-child {
  min-width: 0;
}
.task-arrow {
  justify-self: end;
  align-self: center;
}
/* HEVEXO_DASHBOARD_TASK_ARROW_ALIGN_FIX_20260614_END */
.dashboard-news {
  display: grid;
  gap: 10px;
}
.dashboard-news article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}
.dashboard-news span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}
.dashboard-news p {
  margin: 8px 0 0;
  color: #334155;
  font-size: 13px;
}

.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-size: 12px; color: var(--muted); background: #f8fafc; position: sticky; top: 0; z-index: 1; }
td { font-size: 13px; }
.compact-table { min-width: 560px; }
.compact-table input { min-width: 80px; }

.pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 8px; font-size: 12px; border: 1px solid var(--line); background: #f8fafc; }
.pill.ok { color: var(--ok); border-color: #bbf7d0; background: #f0fdf4; }
.pill.warn { color: var(--warn); border-color: #fed7aa; background: #fff7ed; }
.pill.danger { color: var(--danger); border-color: #fecaca; background: #fef2f2; }

.empty { color: var(--muted); padding: 22px; text-align: center; }
.notice { color: var(--muted); font-size: 13px; }
.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.summary-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fbfcfe;
}
.summary-item strong { display: block; font-size: 20px; }
.summary-item span { color: var(--muted); font-size: 12px; }
.kv {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 8px 12px;
  font-size: 13px;
}
.kv div:nth-child(odd) { color: var(--muted); }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.tabs button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.detail-section { display: grid; gap: 12px; }
.file-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: end;
}
.pre {
  white-space: pre-wrap;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  min-height: 80px;
  max-height: 260px;
  overflow: auto;
}
.plan-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}
.plan-tools label { min-width: 180px; }
.plan-matrix {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.plan-matrix table { min-width: 920px; }
.plan-matrix th:first-child,
.plan-matrix td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #f8fafc;
  width: 110px;
}
.plan-cell {
  min-width: 150px;
  min-height: 70px;
  display: grid;
  gap: 5px;
}
.plan-cell button {
  width: 100%;
  text-align: left;
  min-height: 58px;
}
.plan-name { font-weight: 760; }
.plan-time, .plan-note { color: var(--muted); font-size: 12px; }
.plan-empty {
  color: var(--muted);
  border-style: dashed;
  background: #fbfdff;
}
.news-grid, .role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.news-card, .role-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  display: grid;
  gap: 12px;
  align-content: space-between;
  background: #fff;
}
.news-card h3, .role-card h3 { margin: 3px 0 8px; font-size: 15px; }
.news-card p { margin: 0; color: #334155; white-space: pre-wrap; font-size: 13px; }
.news-date { color: var(--muted); font-size: 12px; }
.permission-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.permission-tags span {
  border: 1px solid var(--line);
  background: #f8fafc;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  color: #334155;
}
.permission-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.permission-picker label {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  background: #fbfcfe;
}
.permission-picker code {
  grid-column: 2;
  color: var(--muted);
  font-size: 11px;
  white-space: normal;
}
.file-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chat-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  min-height: 560px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.chat-list {
  border-right: 1px solid var(--line);
  background: #fbfcfe;
  padding: 12px;
  display: grid;
  gap: 10px;
  align-content: start;
}
.chat-contacts { display: grid; gap: 6px; }
.chat-contact {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  text-align: left;
  align-items: center;
  background: #fff;
}
.chat-contact.active { border-color: var(--primary); box-shadow: inset 3px 0 0 var(--primary); }
.chat-contact small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-contact em {
  background: var(--primary);
  color: #fff;
  border-radius: 999px;
  padding: 2px 7px;
  font-style: normal;
  font-size: 12px;
}
.chat-panel { display: grid; grid-template-rows: auto 1fr auto; min-width: 0; }
.chat-head {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.chat-messages {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
  background: #f8fafc;
}
.chat-message { display: flex; }
.chat-message.own { justify-content: flex-end; }
.chat-bubble {
  max-width: min(620px, 82%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  white-space: pre-wrap;
  font-size: 13px;
}
.chat-message.own .chat-bubble { background: #ecfeff; border-color: #a5f3fc; }
.chat-meta { color: var(--muted); font-size: 11px; margin-bottom: 5px; }
.chat-attachment { margin-top: 8px; }
.chat-compose {
  padding: 12px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 220px auto;
  gap: 8px;
  align-items: end;
}
.chat-compose textarea { min-height: 44px; max-height: 130px; }

.wa-chat-shell {
  display: grid;
  grid-template-columns: minmax(280px, 340px) 1fr;
  min-height: 640px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.wa-chat-sidebar {
  min-width: 0;
  border-right: 1px solid var(--line);
  background: #f8fbff;
  display: grid;
  grid-template-rows: auto auto auto 1fr;
}

.wa-chat-sidebar-head,
.wa-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.wa-chat-sidebar-head h3 { margin: 0; }

.wa-chat-search-wrap {
  margin: 12px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 10px;
  background: #fff;
}

.wa-chat-search-wrap input {
  border: 0;
  box-shadow: none;
  padding-left: 0;
}

.wa-chat-filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 0 12px 10px;
}

.chat-mode-tab {
  min-height: 34px;
  padding: 6px 10px;
}

.wa-chat-contacts,
.chat-recent-list {
  display: grid;
  gap: 6px;
  align-content: start;
  overflow: auto;
  padding: 0 12px 12px;
}

.wa-chat-contact {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 8px;
}

.wa-chat-contact.active {
  border-color: var(--primary);
  box-shadow: inset 3px 0 0 var(--primary);
  background: #eef7ff;
}

.wa-chat-contact-text,
.wa-chat-contact-meta { min-width: 0; }

.wa-chat-contact-text strong,
.wa-chat-contact-text small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wa-chat-contact-text small,
.wa-chat-contact-meta {
  color: var(--muted);
  font-size: 12px;
}

.wa-chat-contact-meta {
  display: grid;
  justify-items: end;
  gap: 4px;
}

.wa-chat-contact-meta em {
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-style: normal;
  font-size: 11px;
  padding: 0 6px;
}

.wa-chat-avatar {
  position: relative;
  width: 42px;
  height: 42px;
  min-width: 42px;
  max-width: 42px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #dbeafe;
  color: var(--primary);
  font-weight: 800;
  line-height: 1;
}

.wa-chat-avatar-head {
  width: 44px;
  height: 44px;
  min-width: 44px;
  max-width: 44px;
}

.wa-chat-avatar img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  display: block;
  object-fit: cover;
}

.wa-chat-avatar img + span { display: none; }
.wa-chat-avatar.fallback span { display: block; }

.wa-chat-avatar i {
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 10px;
  height: 10px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #94a3b8;
}

.wa-chat-avatar i.online { background: #10b981; }

.wa-chat-main {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.wa-chat-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.wa-chat-title > div { min-width: 0; }

.wa-chat-title strong,
.wa-chat-title small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wa-chat-title small {
  color: var(--muted);
  font-size: 12px;
}

.wa-chat-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.wa-icon-button {
  width: 34px;
  height: 34px;
  padding: 0;
  display: grid;
  place-items: center;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  background: #102033;
  color: #fff;
  padding: 10px 12px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  z-index: 20;
}

dialog {
  border: 0;
  border-radius: 8px;
  width: min(760px, calc(100vw - 28px));
  padding: 0;
  box-shadow: 0 28px 90px rgba(15, 23, 42, .28);
}
dialog::backdrop { background: rgba(15, 23, 42, .45); }

.modal-head, .modal-foot {
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}
.modal-foot { border-top: 1px solid var(--line); border-bottom: 0; justify-content: flex-end; }
.modal-body { padding: 16px; display: grid; gap: 12px; max-height: 70vh; overflow: auto; }

@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; }
  .login-visual { min-height: 180px; order: -1; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.two, .grid.three, .grid.four, .dashboard-grid { grid-template-columns: 1fr; }
  .summary-strip, .permission-picker { grid-template-columns: 1fr; }
  .chat-layout, .wa-chat-shell { grid-template-columns: 1fr; }
  .chat-list { border-right: 0; border-bottom: 1px solid var(--line); }
  .chat-compose { grid-template-columns: 1fr; }
  .wa-chat-sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
  .topbar { align-items: flex-start; flex-direction: column; }
}


/* Hevexo/Cargovia Dashboard polish */
.sidebar {
  background: linear-gradient(180deg, #173149 0%, #122b42 100%);
}

.sidebar .brand-row {
  background: #ffffff;
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 10px 24px rgba(2, 12, 27, .18);
}

.sidebar .brand-row img {
  filter: none;
}

.nav button {
  border-radius: 8px;
  min-height: 40px;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}

.nav button:hover {
  background: rgba(255,255,255,.10);
  border-color: transparent;
  transform: translateX(2px);
}

.nav button.active {
  background: rgba(255,255,255,.18);
  box-shadow: inset 3px 0 0 #7dd3fc;
}

.nav .mark {
  width: 26px;
  min-width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  background: rgba(125, 211, 252, .12);
  color: #a7f3d0;
  font-size: 15px;
  line-height: 1;
}

.sidebar-foot {
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 14px;
}

.powered-by-hevexo {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.10);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #9fb1c4;
  font-size: 11px;
}

.powered-by-hevexo img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
  border-radius: 6px;
}

.topbar {
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
}

.card {
  border-radius: 10px;
}

.news-card p,
.news-item p,
.card p {
  overflow-wrap: anywhere;
}

.news-card .muted,
.news-item .muted {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}



/* Clean sidebar revision */
.shell {
  grid-template-columns: 248px 1fr;
}

.sidebar {
  background: #16324a;
  padding: 18px 14px;
  gap: 16px;
}

.sidebar .brand-row {
  background: rgba(255,255,255,.07) !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  box-shadow: none !important;
  border-radius: 10px;
  padding: 14px 12px;
  margin-bottom: 2px;
}

.sidebar .brand-row img {
  max-width: 168px;
  max-height: 58px;
  width: 100%;
  object-fit: contain;
}

.nav {
  gap: 3px;
}

.nav button {
  min-height: 38px;
  padding: 8px 12px 8px 14px;
  gap: 0;
  border-radius: 8px;
  font-weight: 520;
  letter-spacing: .01em;
  color: #d7e6f2;
  transition: background .15s ease, color .15s ease, padding-left .15s ease;
}

.nav button:hover {
  background: rgba(255,255,255,.08);
  transform: none;
  padding-left: 17px;
}

.nav button.active {
  background: rgba(255,255,255,.14);
  box-shadow: inset 3px 0 0 #1fb6ff;
  color: #fff;
}

.nav .mark {
  display: none !important;
}

.sidebar-foot {
  border-top: 1px solid rgba(255,255,255,.12);
  padding: 14px 4px 0;
  gap: 9px;
}

.sidebar-foot .ghost {
  min-height: 36px;
  border-radius: 8px;
  border-color: rgba(255,255,255,.45);
  background: transparent;
}

.powered-by-hevexo {
  display: none !important;
}

.topbar {
  min-height: 70px;
  border-bottom: 1px solid var(--line);
}

.band,
.stat {
  border-radius: 10px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .05);
}

.band-head button {
  border-radius: 8px;
  padding-left: 13px;
  padding-right: 13px;
}

.dashboard-news article p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}



/* Final clean modern sidebar + icons + real profile photo */
:root {
  --sidebar-bg: #f3f8fe;
  --sidebar-bg-2: #fbfdff;
  --sidebar-text: #233b58;
  --sidebar-muted: #6e8299;
  --accent-blue: #0b79e5;
  --accent-blue-soft: #e8f3ff;
  --accent-blue-line: #c9e2ff;
}

.shell {
  grid-template-columns: 260px 1fr !important;
  background: #f4f8fc;
}

.sidebar {
  background: linear-gradient(180deg, var(--sidebar-bg-2) 0%, var(--sidebar-bg) 100%) !important;
  color: var(--sidebar-text) !important;
  border-right: 1px solid #dbe8f5;
  box-shadow: 8px 0 28px rgba(20, 55, 90, .05);
  padding: 18px 16px !important;
}

.sidebar .brand-row {
  background: #fff !important;
  border: 1px solid #d7e7f7 !important;
  border-radius: 13px !important;
  padding: 15px 13px !important;
  margin: 0 0 20px !important;
  box-shadow: 0 12px 28px rgba(20, 55, 90, .10) !important;
  justify-content: center !important;
}

.sidebar .brand-row img {
  max-width: 205px !important;
  max-height: 66px !important;
  width: 100%;
  object-fit: contain;
  opacity: 1 !important;
}

.nav {
  gap: 7px !important;
}

.nav button {
  min-height: 44px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px !important;
  padding: 9px 12px !important;
  border-radius: 11px !important;
  background: transparent !important;
  border-color: transparent !important;
  color: var(--sidebar-text) !important;
  font-weight: 650 !important;
  letter-spacing: 0 !important;
  transition: background .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.nav button:hover {
  background: rgba(11, 121, 229, .08) !important;
  color: #0759bf !important;
  transform: translateX(2px);
}

.nav button.active {
  background: #e8f3ff !important;
  color: #0759bf !important;
  border-color: var(--accent-blue-line) !important;
  box-shadow: inset 4px 0 0 var(--accent-blue), 0 8px 20px rgba(11, 121, 229, .08) !important;
}

.nav .mark {
  width: 26px !important;
  min-width: 26px !important;
  height: 26px !important;
  display: inline-grid !important;
  place-items: center !important;
  color: currentColor !important;
  background: transparent !important;
  border-radius: 0 !important;
}

.nav .mark svg {
  width: 22px;
  height: 22px;
  display: block;
  fill: currentColor;
}

.nav-label {
  display: inline-block;
  line-height: 1;
}

.sidebar-foot {
  border-top: 1px solid #d6e4f2 !important;
  padding: 16px 4px 0 !important;
  gap: 12px !important;
  color: var(--sidebar-text) !important;
}

.sidebar-account {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.sidebar-avatar {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #0b84ff, #084aa1);
  color: #fff;
  font-weight: 800;
  border: 2px solid #fff;
  box-shadow: 0 8px 18px rgba(11, 99, 206, .18);
}

.sidebar-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.sidebar-avatar img.loaded {
  display: block;
}

.sidebar-avatar img.loaded + span {
  display: none;
}

.sidebar-avatar.fallback span {
  display: block;
}

.sidebar-account-meta {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.sidebar-user {
  color: var(--sidebar-text) !important;
  font-weight: 720;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-role {
  color: var(--sidebar-muted);
  font-size: 11px;
}

.logout-btn {
  width: 100%;
  border-color: #aacaf1 !important;
  color: #0759bf !important;
  background: #fff !important;
  font-weight: 700;
  min-height: 42px;
  border-radius: 10px;
}

.logout-btn:hover {
  background: #e8f3ff !important;
}

.main {
  background: #f4f8fc;
}

.topbar {
  background: rgba(255,255,255,.94) !important;
  border-bottom: 1px solid #dce8f4;
  min-height: 84px;
  backdrop-filter: blur(10px);
}

.topbar h1 {
  font-size: 25px;
  letter-spacing: -0.02em;
}

.stat {
  display: flex !important;
  align-items: center !important;
  gap: 18px !important;
  border-radius: 13px !important;
  box-shadow: 0 10px 28px rgba(20, 55, 90, .07);
  padding: 22px 22px !important;
}

.stat-icon {
  width: 54px;
  height: 54px;
  min-width: 54px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #e8f3ff;
  color: #0b6fd3;
}

.stat-icon svg {
  width: 27px;
  height: 27px;
  fill: currentColor;
}

.stat strong {
  font-size: 31px !important;
  line-height: 1;
}

.stat span:not(.stat-icon) {
  display: block;
  margin-top: 6px;
}

.band,
.card {
  border-radius: 13px !important;
  box-shadow: 0 12px 30px rgba(20, 55, 90, .06);
  border-color: #dce8f4 !important;
}

.band-head {
  min-height: 58px;
}

.band-head h2 {
  font-size: 18px;
}

.band-head .actions button,
.actions button {
  border-radius: 9px;
}

table th {
  background: #f5f8fc;
  color: #50657d;
}

.status,
.pill {
  border-radius: 999px;
}


/* Profilbild fix final */
.sidebar-avatar {
  position: relative;
}

.sidebar-avatar img.loaded {
  display: block !important;
}

.sidebar-avatar img.loaded + span {
  display: none !important;
}

.sidebar-avatar.fallback img {
  display: none !important;
}

.sidebar-avatar.fallback span {
  display: block !important;
}


/* Profile picture manager */
.profile-action {
  width: 100%;
  border: 0 !important;
  background: transparent !important;
  padding: 0 !important;
  text-align: left;
  cursor: pointer;
}

.profile-action:hover .sidebar-avatar {
  transform: scale(1.03);
}

.profile-action:hover .sidebar-user {
  color: #0759bf !important;
}

.sidebar-avatar {
  transition: transform .16s ease, box-shadow .16s ease;
}

.profile-dialog {
  max-width: 680px;
}

.profile-picture-modal {
  display: grid;
  gap: 18px;
}

.profile-large-preview {
  width: 190px;
  height: 190px;
  margin: 0 auto;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #e8f3ff;
  border: 4px solid #fff;
  box-shadow: 0 16px 42px rgba(20, 55, 90, .18);
}

.profile-large-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-large-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #0b84ff, #084aa1);
  color: #fff;
  font-size: 46px;
  font-weight: 850;
}

.profile-modal-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.file-pick-button {
  width: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
}

.file-pick-button:hover {
  border-color: #9fb1c4;
}

.file-pick-button input {
  display: none;
}

.profile-adjust-panel {
  display: grid;
  gap: 14px;
  justify-items: center;
  padding: 16px;
  border: 1px solid #dce8f4;
  background: #f8fbff;
  border-radius: 12px;
}

.profile-adjust-panel[hidden] {
  display: none;
}

.profile-adjust-title {
  font-weight: 760;
  color: var(--text);
}

.profile-crop-preview {
  width: 230px;
  height: 230px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  background: #dbe8f4;
  border: 4px solid #fff;
  box-shadow: inset 0 0 0 1px rgba(15, 45, 80, .10), 0 12px 28px rgba(20, 55, 90, .12);
}

.profile-crop-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(11, 121, 229, .35);
  pointer-events: none;
}

.profile-crop-preview img {
  position: absolute;
  left: 50%;
  top: 50%;
  min-width: 100%;
  min-height: 100%;
  max-width: none;
  transform: translate(-50%, -50%) scale(1);
  transform-origin: center;
  will-change: transform;
}

.profile-sliders {
  width: min(100%, 430px);
  display: grid;
  gap: 10px;
}

.profile-sliders label {
  color: #50657d;
}

.profile-sliders input[type="range"] {
  min-height: auto;
  padding: 0;
}



/* Meine Dienste Monats-/Jahresfilter */
.my-shifts-filter {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}

.my-shifts-filter label {
  min-width: 150px;
  color: #50657d;
  font-size: 12px;
  font-weight: 650;
}

.my-shifts-filter select {
  min-height: 36px;
  background: #fff;
  border-color: #cfe0f1;
  border-radius: 9px;
}

@media (max-width: 700px) {
  .my-shifts-filter {
    width: 100%;
  }

  .my-shifts-filter label {
    flex: 1;
    min-width: 120px;
  }
}



/* Dienste Admin-Filter */
.admin-shifts-filter {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-shifts-filter label {
  min-width: 150px;
  color: #50657d;
  font-size: 12px;
  font-weight: 650;
}

.admin-shifts-filter label:last-child {
  min-width: 220px;
}

.admin-shifts-filter select {
  min-height: 36px;
  background: #fff;
  border-color: #cfe0f1;
  border-radius: 9px;
}

@media (max-width: 800px) {
  .admin-shifts-filter {
    width: 100%;
  }

  .admin-shifts-filter label {
    flex: 1;
    min-width: 130px;
  }

  .admin-shifts-filter label:last-child {
    min-width: 180px;
  }
}



/* Kalender in Dienste und Meine Dienste */
.planning-calendar-wrap {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid #dce8f4;
  border-radius: 13px;
  background: #f8fbff;
}

.absence-calendar-panel {
  margin: 14px 0 18px;
}

.absence-calendar-filter {
  justify-content: flex-end;
  margin-bottom: 10px;
}

.absence-calendar-panel .planning-calendar-title .notice {
  font-size: 12px;
}

.planning-calendar-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.planning-calendar-title h3 {
  margin: 0;
}

.planning-calendar-weekdays,
.planning-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(105px, 1fr));
  gap: 6px;
}

.planning-calendar-weekdays div {
  text-align: center;
  color: #60758d;
  font-size: 12px;
  font-weight: 750;
  padding: 4px;
}

.planning-calendar-day {
  min-height: 112px;
  border: 1px solid #d8e5f2;
  background: #fff;
  border-radius: 10px;
  padding: 8px;
  overflow: hidden;
}

.planning-calendar-day.muted {
  background: transparent;
  border-color: transparent;
}

.planning-calendar-day.today {
  border-color: #0b79e5;
  box-shadow: inset 0 0 0 1px rgba(11, 121, 229, .28);
}

.planning-calendar-date {
  font-size: 12px;
  font-weight: 850;
  color: #233b58;
  margin-bottom: 6px;
}

.planning-calendar-events {
  display: grid;
  gap: 4px;
}

.planning-calendar-event {
  border-radius: 7px;
  padding: 5px 6px;
  font-size: 11px;
  line-height: 1.15;
  border: 1px solid transparent;
  display: grid;
  gap: 2px;
}

.planning-calendar-event strong {
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.planning-calendar-event span {
  font-size: 10px;
  opacity: .84;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.planning-calendar-event.shift {
  background: #e8f8ee;
  border-color: #bdeacb;
  color: #166534;
}

.planning-calendar-event.vacation {
  background: #fff7d6;
  border-color: #f2da75;
  color: #854d0e;
}

.planning-calendar-event.sick {
  background: #fee8e8;
  border-color: #f7b9b9;
  color: #991b1b;
}

@media (max-width: 1120px) {
  .planning-calendar-weekdays,
  .planning-calendar-grid {
    grid-template-columns: repeat(7, minmax(78px, 1fr));
  }

  .planning-calendar-day {
    min-height: 96px;
    padding: 6px;
  }
}

@media (max-width: 760px) {
  .planning-calendar-weekdays,
  .planning-calendar-grid {
    grid-template-columns: repeat(1, 1fr);
  }

  .planning-calendar-weekdays,
  .planning-calendar-day.muted {
    display: none;
  }
}



/* Wochenende und hessische Feiertage im Kalender */
.planning-calendar-day.weekend {
  background: #fffbe8;
  border-color: #f1e2a8;
}

.planning-calendar-day.holiday {
  background: #fff0b8;
  border-color: #d9a900;
  box-shadow: inset 0 0 0 1px rgba(217, 169, 0, .22);
}

.planning-calendar-day.today.holiday {
  border-color: #b8860b;
  box-shadow: inset 0 0 0 2px rgba(184, 134, 11, .35);
}

.planning-calendar-date {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
}

.planning-calendar-date em {
  font-style: normal;
  color: #7a4b00;
  background: rgba(255, 204, 51, .55);
  border: 1px solid rgba(184, 134, 11, .28);
  border-radius: 999px;
  padding: 2px 5px;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.1;
  max-width: 78%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}



/* PDF Export Meine Dienste */
.my-shifts-filter #myShiftsPdfExport {
  min-height: 36px;
  align-self: end;
  border-radius: 9px;
  padding-left: 14px;
  padding-right: 14px;
  white-space: nowrap;
}



/* PDF Export Button im Dienste-Filter */
.admin-shifts-filter .primary {
  min-height: 36px;
  align-self: end;
  white-space: nowrap;
}



/* Tagesplan PDF Export */
.plan-tools .primary {
  min-height: 36px;
  align-self: end;
  white-space: nowrap;
}


/* Tagesplanung Quick-Add */
.plan-quick-add-row td {
  background: #f8fbff;
}

.plan-add-button {
  width: 100%;
  min-height: 34px;
  border: 1px dashed #b7c9dc;
  border-radius: 8px;
  background: #ffffff;
  color: #0759bf;
  font-weight: 760;
  cursor: pointer;
}

.plan-add-button:hover,
.plan-empty:hover {
  background: #e8f3ff;
  border-color: #0b79e5;
}

.plan-empty {
  font-size: 18px;
  font-weight: 850;
  line-height: 1;
}

#shiftTemplateHint {
  margin: 4px 0 10px;
}



/* Tagesplanung: Entfernen und Einsatzort ändern */
.plan-cell-filled {
  position: relative;
  display: grid;
  gap: 5px;
}

.plan-cell .plan-main {
  width: 100%;
  text-align: left;
}

.plan-remove {
  position: absolute;
  right: 6px;
  top: 6px;
  width: 22px;
  height: 22px;
  min-height: 22px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid #efb6b6;
  background: #fff4f4;
  color: #b42318;
  font-weight: 850;
  line-height: 1;
  z-index: 2;
}

.plan-remove:hover {
  background: #fee2e2;
  border-color: #dc2626;
}

.plan-location-button {
  width: 100%;
  min-height: 27px;
  padding: 4px 7px;
  border: 1px solid #cfe0f1;
  border-radius: 7px;
  background: #fff;
  color: #0759bf;
  font-size: 11px;
  font-weight: 720;
}

.plan-location-button:hover {
  background: #e8f3ff;
  border-color: #0b79e5;
}



/* Fix Tagesplanung: kleines dezentes x neben Mitarbeitername */
.plan-cell-filled {
  position: static !important;
  display: grid !important;
  gap: 5px !important;
}

.plan-person-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px;
  align-items: start;
  gap: 6px;
}

.plan-cell .plan-main {
  width: 100% !important;
  min-height: 44px;
  text-align: left !important;
  padding-right: 6px !important;
  background: #ffffff !important;
  border: 1px solid #d7e3f0 !important;
  color: var(--text) !important;
}

.plan-cell .plan-main:hover {
  background: #f8fbff !important;
  border-color: #9fc4ef !important;
}

.plan-remove {
  position: static !important;
  width: 20px !important;
  height: 20px !important;
  min-height: 20px !important;
  padding: 0 !important;
  margin-top: 2px !important;
  display: inline-grid !important;
  place-items: center !important;
  border-radius: 999px !important;
  border: 1px solid #efb6b6 !important;
  background: #fffafa !important;
  color: #b42318 !important;
  font-size: 13px !important;
  font-weight: 850 !important;
  line-height: 1 !important;
  z-index: auto !important;
}

.plan-remove:hover {
  background: #fee2e2 !important;
  border-color: #dc2626 !important;
}

.plan-publish-button {
  width: 100% !important;
  min-height: 28px !important;
  padding: 4px 7px !important;
  border: 1px solid #f2c76b !important;
  border-radius: 7px !important;
  background: #fff8e6 !important;
  color: #8a5a00 !important;
  font-size: 11px !important;
  font-weight: 780 !important;
  text-align: center !important;
}

.plan-publish-button:hover {
  background: #ffefc2 !important;
  border-color: #d99918 !important;
}


.plan-location-button {
  width: 100% !important;
  min-height: 27px !important;
  padding: 4px 7px !important;
  border: 1px solid #cfe0f1 !important;
  border-radius: 7px !important;
  background: #fff !important;
  color: #0759bf !important;
  font-size: 11px !important;
  font-weight: 720 !important;
}

.plan-location-button:hover {
  background: #e8f3ff !important;
  border-color: #0b79e5 !important;
}



/* Einsatzort Dropdown + neuer Einsatzort */
[data-location-custom-wrap][hidden] {
  display: none !important;
}

#modal select[name="departmentSelect"] {
  background: #fff;
}



/* Dienste-Kalender: Tage anklickbar für Schichtzuweisung */
.planning-calendar-day.assignable {
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.planning-calendar-day.assignable:hover {
  transform: translateY(-1px);
  border-color: #0b79e5;
  box-shadow: 0 8px 18px rgba(11, 121, 229, .12);
}

.planning-calendar-day.assignable::after {
  content: "+";
  position: absolute;
  right: 8px;
  bottom: 6px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #e8f3ff;
  color: #0759bf;
  font-weight: 850;
  opacity: .0;
  pointer-events: none;
}

.planning-calendar-day.assignable:hover::after {
  opacity: 1;
}

.planning-calendar-day {
  position: relative;
}



/* Dienste-Kalender Mehrfachauswahl */
.planning-calendar-day.selected-for-assignment {
  border-color: #0b79e5 !important;
  background: #e8f3ff !important;
  box-shadow: inset 0 0 0 2px rgba(11, 121, 229, .28), 0 8px 18px rgba(11, 121, 229, .10);
}

.planning-calendar-badges {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: wrap;
  max-width: 82%;
}

.planning-calendar-badges b {
  font-size: 9px;
  line-height: 1.1;
  border-radius: 999px;
  padding: 2px 5px;
  color: #0759bf;
  background: #dbeafe;
  border: 1px solid #93c5fd;
}

.planning-calendar-date em {
  max-width: 100%;
}

.admin-shifts-filter button[disabled] {
  opacity: .55;
  cursor: not-allowed;
}



/* Kalender: Schicht direkt löschen */
.planning-calendar-event.shift {
  position: relative;
  grid-template-columns: minmax(0, 1fr) 18px;
  align-items: start;
  column-gap: 4px;
}

.planning-calendar-event-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.calendar-shift-remove {
  width: 17px;
  height: 17px;
  min-height: 17px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(22, 101, 52, .25);
  background: rgba(255,255,255,.78);
  color: #166534;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.calendar-shift-remove:hover {
  background: #fee2e2;
  border-color: #dc2626;
  color: #b42318;
}



/* Verwaltung Untermenü */
.nav-group {
  display: grid;
  gap: 5px;
}

.nav-parent {
  position: relative;
}

.nav-caret {
  margin-left: auto;
  font-size: 12px;
  opacity: .7;
  transition: transform .16s ease;
}

.nav-group.open .nav-caret {
  transform: rotate(180deg);
}

.nav-sub {
  display: grid;
  gap: 4px;
  margin: 2px 0 5px 38px;
  padding-left: 12px;
  border-left: 1px solid #d5e5f6;
}

.nav-subitem {
  min-height: 34px !important;
  padding: 7px 10px !important;
  font-size: 13px !important;
  border-radius: 9px !important;
  gap: 8px !important;
}

.nav-subitem.active {
  background: #eff7ff !important;
  color: #0759bf !important;
  border-color: #d5e9ff !important;
  box-shadow: inset 3px 0 0 #0b84ff !important;
}

.nav-sub-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  opacity: .65;
}



/* OPS Hauptpunkt und Übersicht */
.ops-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0;
}

.ops-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 16px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  box-shadow: 0 10px 24px rgba(18, 45, 77, .05);
}

.ops-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #e8f3ff;
  color: #0759bf;
}

.ops-card-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.ops-card h3 {
  margin: 0 0 6px;
}

.ops-card p {
  margin: 0;
  color: #60758d;
  line-height: 1.4;
}

.ops-card button {
  grid-column: 1 / -1;
  justify-self: start;
}

@media (max-width: 1050px) {
  .ops-overview-grid {
    grid-template-columns: 1fr;
  }
}



/* Hauptmenüs auf-/zuklappen */
.nav-parent-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: center;
  gap: 4px;
}

.nav-parent-main {
  width: 100%;
}

.nav-toggle {
  min-height: 34px !important;
  width: 34px !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 9px !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  color: #254663 !important;
  font-size: 14px !important;
  font-weight: 850 !important;
  transition: transform .16s ease, background .16s ease;
}

.nav-toggle:hover {
  background: #e8f3ff !important;
  border-color: #cfe0f1 !important;
}

.nav-group.open .nav-toggle {
  transform: rotate(180deg);
}

.nav-group.collapsed .nav-sub {
  display: none !important;
}

.nav-group.collapsed {
  gap: 0;
}

.nav-group .nav-parent {
  display: none !important;
}



/* Protokoll Filter */
.log-filter {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}

.log-filter label {
  min-width: 150px;
  color: #50657d;
  font-size: 12px;
  font-weight: 650;
}

.log-filter label:first-child {
  min-width: 260px;
  flex: 1;
}

.log-filter input,
.log-filter select {
  min-height: 36px;
  background: #fff;
  border-color: #cfe0f1;
  border-radius: 9px;
}

.log-filter button {
  min-height: 36px;
  white-space: nowrap;
}

.log-summary {
  color: #60758d;
  font-size: 12px;
  font-weight: 700;
  margin: 0 0 10px;
}

@media (max-width: 900px) {
  .log-filter label,
  .log-filter label:first-child {
    min-width: 100%;
  }
}



/* Protokoll CSV Export und Mitarbeiterfilter */
.log-filter .primary {
  min-height: 36px;
  white-space: nowrap;
}

.log-filter label {
  min-width: 145px;
}

.log-filter label:first-child {
  min-width: 240px;
}



/* Mitarbeiterdetails / HR */
.employee-detail-modal {
  width: min(1180px, calc(100vw - 32px));
  max-width: 1180px;
}

.employee-detail-modal .modal-body {
  overflow-x: hidden;
  max-height: min(76vh, 820px);
}

.employee-detail {
  display: grid;
  gap: 16px;
}

.employee-detail-hero {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid #dce8f4;
  border-radius: 16px;
  background: linear-gradient(135deg, #f8fbff, #eef7ff);
}

.employee-detail-avatar {
  width: 74px;
  height: 74px;
  border-radius: 18px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #0b79e5;
  color: #fff;
  font-size: 22px;
  font-weight: 850;
  box-shadow: 0 8px 20px rgba(11, 121, 229, .18);
}

.employee-detail-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.employee-detail-title h2 {
  margin: 0 0 5px;
  font-size: 24px;
}

.employee-detail-title div {
  color: #60758d;
  font-weight: 650;
}

.employee-detail-status {
  justify-self: end;
}

.employee-tabs {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #fff;
  padding: 8px 0;
  border-bottom: 1px solid #dce8f4;
}

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

.employee-card {
  border: 1px solid #dce8f4;
  border-radius: 14px;
  background: #fff;
  padding: 16px;
  display: grid;
  gap: 12px;
}

.employee-card h3,
.employee-upload-card h4 {
  margin: 0;
}

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

.detail-field {
  display: grid;
  gap: 3px;
  padding: 10px;
  border-radius: 10px;
  background: #f8fbff;
  border: 1px solid #edf3fa;
}

.detail-field span {
  color: #60758d;
  font-size: 12px;
  font-weight: 700;
}

.detail-field strong {
  color: #10233a;
  font-weight: 760;
  overflow-wrap: anywhere;
}

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

.grid.compact {
  gap: 8px;
}

.employee-detail-actions,
.sticky-actions {
  justify-content: flex-end;
}

.sticky-actions {
  position: sticky;
  bottom: 0;
  padding: 12px 0 0;
  background: linear-gradient(to top, #fff 75%, rgba(255,255,255,0));
}

.employee-upload-card {
  border: 1px solid #dce8f4;
  border-radius: 14px;
  background: #fff;
  padding: 16px;
  display: grid;
  gap: 12px;
}

.employee-upload-card p {
  margin: 4px 0 0;
  color: #60758d;
}

.employee-upload-card .file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.employee-upload-card input[type="file"] {
  min-height: 36px;
  padding: 7px;
  border: 1px solid #cfe0f1;
  border-radius: 9px;
  background: #f8fbff;
}

.employee-raw-data {
  max-height: 220px;
  overflow: auto;
  white-space: pre-wrap;
}

@media (max-width: 920px) {
  .employee-detail-hero {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .employee-detail-status {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .employee-card-grid,
  .employee-doc-grid,
  .detail-grid,
  .grid.three {
    grid-template-columns: 1fr;
  }

  .employee-upload-card .file-row {
    grid-template-columns: 1fr;
  }
}



/* Mitarbeiterdetails: Tabs korrekt ein-/ausblenden */
.detail-section[hidden] {
  display: none !important;
}

.employee-tabs button {
  cursor: pointer;
}

.employee-tabs button.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}



/* Mitarbeiterübersicht: Suche und Personalnummer */
.employee-list-tools {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.employee-list-tools label {
  flex: 1;
  min-width: 320px;
  color: #50657d;
  font-size: 12px;
  font-weight: 650;
}

.employee-list-tools input {
  min-height: 38px;
  background: #fff;
  border-color: #cfe0f1;
  border-radius: 9px;
}

.employee-list-summary {
  color: #60758d;
  font-size: 12px;
  font-weight: 750;
  padding-bottom: 9px;
  white-space: nowrap;
}



/* Mitarbeiter Filter & CSV Export */
.employee-filter-tools {
  align-items: end;
}

.employee-filter-tools label {
  min-width: 155px;
}

.employee-filter-tools .employee-search-wide {
  min-width: 320px;
  flex: 1.4;
}

.employee-filter-tools select,
.employee-filter-tools input {
  min-height: 38px;
  background: #fff;
  border-color: #cfe0f1;
  border-radius: 9px;
}

.employee-filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  padding-bottom: 0;
}

.employee-filter-actions button {
  min-height: 38px;
  white-space: nowrap;
}

@media (max-width: 1050px) {
  .employee-filter-tools label,
  .employee-filter-tools .employee-search-wide,
  .employee-filter-actions {
    min-width: 100%;
    width: 100%;
  }

  .employee-filter-actions {
    justify-content: stretch;
  }

  .employee-filter-actions button {
    flex: 1;
  }
}



/* HR Arbeitnehmerüberlassung */
.employee-card-wide {
  grid-column: 1 / -1;
}

.employee-card textarea {
  min-height: 92px;
  resize: vertical;
}



/* Mitarbeiterdetails Fehlerfallback */
.danger-text {
  color: #b42318;
  background: #fff4f4;
  border: 1px solid #ffd0d0;
  border-radius: 10px;
  padding: 10px;
}



/* Krankheit / eAU Erinnerung */
.task-item.danger {
  border-left-color: #dc2626;
  background: #fff4f4;
}

.eau-reminder-text {
  color: #b42318;
  font-weight: 750;
}

#sickEauStatus {
  min-width: 190px;
}



/* Krankheit: doppelte Bestätigung beim Bestätigen */
.task-item.danger {
  border-left-color: #dc2626;
}



/* eAU Status separat ändern */
.eau-status-select {
  min-width: 165px;
  min-height: 32px;
  border-radius: 999px;
  border: 1px solid #cfe0f1;
  background: #fff;
  padding: 4px 10px;
  font-weight: 700;
  color: #10233a;
}

.eau-status-select:focus {
  outline: 2px solid rgba(11, 121, 229, .18);
  border-color: #0b79e5;
}



/* Krankheit: klickbare Statistikfelder und stabile Suche */
.summary-button {
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}

.summary-button:hover {
  border-color: #9ccaff;
  background: #f5fbff;
  transform: translateY(-1px);
}

.summary-button.active {
  border-color: #0b79e5;
  background: #eaf4ff;
  box-shadow: inset 4px 0 0 #0b79e5;
}

.summary-button:focus-visible {
  outline: 3px solid rgba(11, 121, 229, .2);
  outline-offset: 2px;
}



/* Dashboard eAU-Aufgaben besser lesbar */
.task-item.danger {
  color: #10233a !important;
  background: #fff7f7 !important;
  border-color: #ef4444 !important;
  border-left-color: #dc2626 !important;
}

.task-item.danger strong,
.task-item.danger small,
.task-item.danger span {
  color: #10233a !important;
}

.task-item.danger:hover {
  background: #fff1f1 !important;
  border-color: #dc2626 !important;
}



/* Dashboard Stats: fünf Kacheln */
.dashboard-stats-five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

/* Dashboard eAU-Aufgabe: rote Karte, aber lesbare schwarze Schrift */
.task-item.danger {
  background: #b91c1c !important;
  border-color: #b91c1c !important;
  border-left-color: #7f1d1d !important;
}

.task-item.danger strong,
.task-item.danger small,
.task-item.danger span,
.task-item.danger * {
  color: #111827 !important;
}

.task-item.danger small {
  opacity: 1 !important;
  font-weight: 650;
}

.task-item.danger:hover {
  background: #dc2626 !important;
  border-color: #991b1b !important;
}

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

@media (max-width: 700px) {
  .dashboard-stats-five {
    grid-template-columns: 1fr;
  }
}



/* Krankheit: eAU Keine Rückmeldung entfernt Eintrag nach Bestätigung */
.eau-status-select option[value="no_response"] {
  color: #b42318;
}



/* Krankheit: Krank ohne AU bleibt als HR-relevanter Eintrag sichtbar */
.pill.danger {
  font-weight: 800;
}



/* Kalender: Krank ohne AU sichtbar kennzeichnen */
.planning-calendar-event.sick-no-au {
  border-style: dashed;
}

.planning-calendar-event.sick-no-au strong {
  font-weight: 850;
}



/* Mitarbeiterdetails: Arbeitszeitabrechnung */
.employee-worktime-export {
  align-items: end;
}

.employee-worktime-export button {
  min-height: 38px;
  align-self: end;
}



/* Mitarbeiterdetails: eigener Tab Arbeitszeitabrechnung */
.employee-detail-tabs {
  flex-wrap: wrap;
}

.employee-detail-tabs button {
  white-space: nowrap;
}



/* Mitarbeiter Self-Service Dashboard */
.employee-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.employee-dashboard-grid > section:first-child,
.employee-dashboard-grid > section:last-child {
  grid-column: span 1;
}

.employee-next-shift {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid #d8e7f6;
  background: #f7fbff;
  border-radius: 14px;
}

.employee-next-shift strong {
  font-size: 18px;
  color: #10233a;
}

.employee-next-shift span {
  font-weight: 800;
}

.employee-dashboard-mini {
  margin-bottom: 12px;
}

.employee-dashboard-actions {
  justify-content: flex-start;
}

.self-service-form {
  display: grid;
  gap: 14px;
}

.self-service-form textarea {
  min-height: 90px;
}

@media (max-width: 1000px) {
  .employee-dashboard-grid {
    grid-template-columns: 1fr;
  }
}



/* Urlaubsantrag: reale Urlaubstage */
.vacation-days-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 6px 0 4px;
}

.vacation-days-preview-four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.vacation-days-preview > div {
  border: 1px solid #d8e7f6;
  background: #f7fbff;
  border-radius: 14px;
  padding: 12px 14px;
  display: grid;
  gap: 4px;
}

.vacation-days-preview strong {
  font-size: 24px;
  color: #10233a;
}

.vacation-days-preview span {
  color: #60738e;
  font-weight: 700;
}

.vacation-days-hint {
  font-size: 13px;
  color: #60738e;
  margin-bottom: 8px;
}

@media (max-width: 800px) {
  .vacation-days-preview {
    grid-template-columns: 1fr;
  }
}



/* Mitarbeiter-Menü/Self-Service: keine doppelten Topbar-Aktionsbuttons */
.self-service-form .actions {
  margin-top: 4px;
}



/* Mitarbeiter-Dashboard: Arbeitszeitabrechnung */
.employee-dashboard-worktime {
  display: grid;
  gap: 12px;
}

.employee-dashboard-worktime .employee-worktime-export {
  align-items: end;
}

.employee-dashboard-worktime .employee-worktime-export button {
  min-height: 38px;
}

@media (min-width: 1001px) {
  .employee-dashboard-grid {
    grid-template-columns: 1fr 1fr;
  }
}



/* Mitarbeiterdetails: HR-Fristen und Zertifikate zusammen */
.hr-proof-upload {
  margin-top: 16px;
}

.hr-proof-upload .employee-upload-card {
  background: #f7fbff;
  border-style: solid;
}

.employee-upload-card .grid.compact {
  gap: 10px;
}

.employee-detail-modal .employee-card-wide {
  grid-column: 1 / -1;
}



/* HR Zertifikate/Nachweise sichtbar anzeigen */
.hr-proof-list {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.hr-proof-list h4 {
  margin: 0;
  color: #10233a;
  font-size: 15px;
}

.hr-proof-list .table-wrap,
.employee-card .table-wrap {
  overflow-x: auto;
}



/* HR Zertifikatsliste: viele Einträge sauber scrollbar */
.certificate-list-scroll {
  max-height: 290px;
  overflow-y: auto;
  overflow-x: auto;
  border: 1px solid #d8e7f6;
  border-radius: 12px;
  background: #fff;
}

.certificate-list-scroll .table-wrap {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
}

.certificate-list-scroll table {
  margin: 0;
}

.certificate-list-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f3f7fb;
}

.certificate-list-scroll td,
.certificate-list-scroll th {
  padding-top: 9px;
  padding-bottom: 9px;
}

.hr-proof-list {
  min-height: 0;
}



/* Dashboard: HR-Reminder und HR-Prüfung */
.dashboard-stats-six {
  grid-template-columns: repeat(8, minmax(0, 1fr));
}

.hr-reminder-text {
  font-weight: 800;
  color: #991b1b;
}

.dashboard-grid .band .table-wrap {
  max-width: 100%;
}

@media (max-width: 1500px) {
  .dashboard-stats-six {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .dashboard-stats-six {
    grid-template-columns: 1fr;
  }
}



/* HR-Reminder/HR-Prüfung eigene Screens */
.hr-percent {
  position: relative;
  height: 10px;
  min-width: 120px;
  background: #e8f0f8;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 4px;
}

.hr-percent span {
  display: block;
  height: 100%;
  background: #0f766e;
  border-radius: 999px;
}

.hr-reminder-text {
  font-weight: 800;
}

[data-edit-certificate] {
  white-space: nowrap;
}



/* Mitarbeiter: Adresse sauber pflegen */
.employee-detail .detail-field strong {
  overflow-wrap: anywhere;
}



/* HR-Daten: Nationalität/Aufenthalt-Regel und sauberer Speicherbereich */
.field-disabled {
  opacity: 0.55;
}

.field-disabled input,
.field-disabled select {
  background: #eef3f8;
  cursor: not-allowed;
}

.employee-detail-modal .modal-body {
  padding-bottom: 92px;
}

.employee-detail-modal .sticky-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  background: linear-gradient(180deg, rgba(255,255,255,0.72), #fff 38%);
  border-top: 1px solid #d8e7f6;
  padding: 18px 0 8px;
  margin-top: 18px;
  justify-content: flex-end;
}



/* Mitarbeiterdetails: eigener Tab Abmahnungen */
.warning-list-scroll {
  max-height: 360px;
}



/* Mitarbeiterdetails: eigener Tab Pfändung */
.garnishment-list-scroll {
  max-height: 360px;
}

[data-detail-panel="garnishments"] textarea {
  min-height: 90px;
}



/* Mitarbeiterdetail: Speichern fest in der unteren Fensterleiste */
.employee-detail-modal .modal-foot {
  position: sticky;
  bottom: 0;
  z-index: 20;
  background: #fff;
  border-top: 1px solid #d8e7f6;
  padding: 12px 16px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.employee-detail-modal .modal-body {
  padding-bottom: 18px;
}

.employee-detail-modal .sticky-actions {
  display: none !important;
}



/* HR-Daten: Adresse in Straße, PLZ und Stadt getrennt */
[data-detail-panel="hr"] input[name="hrPostalCode"] {
  max-width: 100%;
}



/* Mitarbeiterdetail: HR speichern fest im Footer */
.employee-detail-modal .modal-foot {
  position: sticky;
  bottom: 0;
  z-index: 20;
  background: #fff;
  border-top: 1px solid #d8e7f6;
  padding: 12px 16px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.employee-detail-modal .modal-body {
  padding-bottom: 18px;
}

.employee-detail-modal .sticky-actions {
  display: none !important;
}



/* HR-Daten: Fristenblock entfernt, Nachweise sind alleinige Quelle */
.hr-proof-list {
  margin-top: 18px;
}



/* Mitarbeiterdetails: eigener Tab Ausweise */
.id-document-list-scroll {
  max-height: 360px;
}

[data-detail-panel="ids"] textarea {
  min-height: 90px;
}



/* Mitarbeiterdetails: Finanzen und Darlehen */
.loan-list-scroll {
  max-height: 360px;
}

[data-detail-panel="loans"] textarea {
  min-height: 90px;
}

[data-detail-panel="loans"] input[readonly] {
  background: #eef3f8;
  cursor: not-allowed;
  font-weight: 800;
}


/* Darlehen: automatische Felder */
[data-detail-panel="loans"] input[name="loanGrossAmount"],
[data-detail-panel="loans"] input[name="loanLastRateDate"],
[data-detail-panel="loans"] input[name="loanLastRateAmount"] {
  color: #0f172a;
}


/* OPS/Dienste: Dienstvorlagen verwalten */
.shift-template-admin {
  margin-bottom: 18px;
}

.shift-template-admin .section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.shift-template-admin .section-head h3 {
  margin: 0 0 4px;
}

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



/* OPS/Dienste: Dienstvorlagen einklappbar */
.shift-template-admin.collapsed {
  padding-bottom: 14px;
}

.shift-template-admin.collapsed .section-head {
  margin-bottom: 0;
}

/* Kalender: bestehende Schichten markieren und gesammelt löschen */
.planning-calendar-event.shift {
  position: relative;
  padding-right: 52px;
}

.calendar-shift-select {
  position: absolute;
  right: 25px;
  top: 6px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid #a8d5ba;
  background: #fff;
  color: #0f766e;
  font-weight: 900;
  font-size: 11px;
  line-height: 16px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.calendar-shift-select.selected {
  background: #0f766e;
  color: #fff;
  border-color: #0f766e;
}

.planning-calendar-event.selected-for-deletion {
  outline: 2px solid #0f766e;
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.14);
}



/* OPS/Dienste: Kalender optisch ruhiger und moderner */
.planning-calendar {
  gap: 8px;
}

.planning-calendar-header {
  padding: 0 6px 6px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.planning-calendar-day {
  min-height: 126px;
  border-radius: 13px;
  border: 1px solid #d7e7f6;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.planning-calendar-day:hover {
  border-color: #9dc7f3;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.07);
}

.planning-calendar-day.weekend {
  background: linear-gradient(180deg, #fffdf1 0%, #fff9db 100%);
  border-color: #f3d88a;
}

.planning-calendar-day.selected-day {
  border-color: #0f766e;
  box-shadow: inset 0 0 0 2px rgba(15, 118, 110, 0.16);
}

.planning-calendar-day-number {
  font-size: 13px;
  font-weight: 900;
  color: #0f2747;
  margin-bottom: 7px;
}

.planning-calendar-event {
  border-radius: 9px;
  padding: 7px 58px 7px 8px;
  min-height: 38px;
  display: flex;
  align-items: center;
  position: relative;
  border: 1px solid transparent;
}

.planning-calendar-event.shift {
  background: #e9f9ef;
  border-color: #bce9ce;
  box-shadow: 0 1px 0 rgba(15, 118, 110, 0.06);
}

.planning-calendar-event.shift:hover {
  border-color: #7fd7a5;
}

.planning-calendar-event-main {
  min-width: 0;
  line-height: 1.15;
}

.planning-calendar-event-main strong {
  display: block;
  font-size: 12px;
  font-weight: 900;
  color: #047857;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.planning-calendar-event-main span {
  display: block;
  margin-top: 2px;
  font-size: 10.5px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar-shift-actions {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.calendar-shift-select,
.calendar-shift-remove {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  padding: 0;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  background: #ffffff;
  border: 1px solid #b8dfc7;
  color: #0f766e;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.calendar-shift-remove {
  color: #64748b;
}

.calendar-shift-remove:hover {
  color: #b91c1c;
  border-color: #fecaca;
  background: #fff5f5;
}

.calendar-shift-select:hover {
  border-color: #0f766e;
}

.calendar-shift-select.selected {
  background: #0f766e;
  color: #ffffff;
  border-color: #0f766e;
}

.planning-calendar-event.selected-for-deletion {
  background: #dff8eb;
  border-color: #0f766e;
  outline: 2px solid rgba(15, 118, 110, 0.22);
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.14);
}

.planning-calendar-event.vacation {
  background: #fff2bc;
  border-color: #f3d36c;
}

.planning-calendar-event.sick {
  background: #fee2e2;
  border-color: #fecaca;
}

.admin-shifts-filter {
  align-items: end;
  gap: 10px;
}

.admin-shifts-filter button {
  white-space: nowrap;
}

@media (max-width: 1300px) {
  .planning-calendar-day {
    min-height: 112px;
  }

  .planning-calendar-event-main strong {
    font-size: 11px;
  }
}



/* Kalender: Schicht selbst anklicken zum Markieren, kein extra Markierbutton */
.planning-calendar-event.shift {
  cursor: pointer;
  padding-right: 34px;
}

.planning-calendar-event.shift::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.calendar-shift-actions {
  right: 7px;
}

.calendar-shift-select {
  display: none !important;
}

.calendar-shift-remove {
  width: 19px;
  height: 19px;
  opacity: 0.72;
}

.planning-calendar-event.shift:hover .calendar-shift-remove {
  opacity: 1;
}

.planning-calendar-event.selected-for-deletion {
  background: #d8f3e5;
  border-color: #0f766e;
  box-shadow: inset 4px 0 0 #0f766e, 0 4px 12px rgba(15, 118, 110, 0.12);
}

.planning-calendar-event.selected-for-deletion .planning-calendar-event-main strong::after {
  content: " · markiert";
  font-weight: 800;
  color: #0f766e;
}



/* Kalender: markierte Schichten nur blau umranden, kein Zusatztext */
.planning-calendar-event.selected-for-deletion {
  background: #eef6ff !important;
  border-color: #2563eb !important;
  outline: 2px solid rgba(37, 99, 235, 0.45) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12), 0 4px 12px rgba(37, 99, 235, 0.10) !important;
}

.planning-calendar-event.selected-for-deletion .planning-calendar-event-main strong::after {
  content: "" !important;
}



/* Mitarbeiter: Position/Funktion editierbar */
.employee-detail-modal input[name="hrJobTitle"],
#modal input[name="jobTitle"] {
  font-weight: 700;
}



/* Mitarbeiter CSV Export: Feldauswahl */
.csv-export-dialog .modal-body {
  max-height: 72vh;
  overflow: auto;
}

.csv-export-actions {
  margin: 10px 0 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.csv-field-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 14px;
}

.csv-field-group {
  border: 1px solid #d8e7f6;
  border-radius: 14px;
  padding: 14px;
  background: #f8fbff;
}

.csv-field-group h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.csv-field-grid {
  display: grid;
  gap: 8px;
}

.csv-field-option {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 30px;
  font-weight: 700;
  color: #14233b;
}

.csv-field-option input {
  width: 16px;
  height: 16px;
}

@media (max-width: 900px) {
  .csv-field-groups {
    grid-template-columns: 1fr;
  }
}



/* HR-Reminder: sichtbare Notizen */
.hr-reminder-note {
  display: inline-block;
  max-width: 360px;
  padding: 6px 9px;
  border-radius: 10px;
  background: #eef6ff;
  border: 1px solid #bfdbfe;
  color: #0f2747;
  font-weight: 700;
  line-height: 1.25;
  white-space: normal;
}

.employee-detail-modal textarea[name="certReminderNote"],
#modal textarea[name="certReminderNote"] {
  min-height: 90px;
}

/* Chat hotfix: kompakte Nachrichtenblasen wie in der App */
.wa-chat-messages.chat-messages {
  padding: 18px 20px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  align-items: stretch !important;
  overflow-y: auto !important;
  background: #f3f7fb !important;
}

.wa-chat-messages .chat-message {
  width: 100% !important;
  display: flex !important;
  align-items: flex-end !important;
  margin: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
}

.wa-chat-messages .chat-message.own {
  justify-content: flex-end !important;
}

.wa-chat-messages .chat-message:not(.own) {
  justify-content: flex-start !important;
}

.wa-chat-messages .chat-bubble {
  width: fit-content !important;
  min-width: 0 !important;
  max-width: min(520px, 72%) !important;
  min-height: 0 !important;
  height: auto !important;
  display: block !important;
  padding: 8px 10px 6px !important;
  border: 1px solid #d7e4f1 !important;
  border-radius: 10px !important;
  background: #fff !important;
  box-shadow: 0 1px 4px rgba(15, 23, 42, .06) !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  line-height: 1.35 !important;
}

.wa-chat-messages .chat-message.own .chat-bubble {
  background: #e6fbff !important;
  border-color: #79dff0 !important;
}

.wa-chat-messages .chat-text {
  margin: 0 !important;
  padding: 0 !important;
  font-size: 13px !important;
  color: #0f172a !important;
  white-space: pre-wrap !important;
}

.wa-chat-messages .wa-chat-author {
  margin: 0 0 3px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  color: #0f4c81 !important;
}

.wa-chat-messages .chat-meta {
  margin: 4px 0 0 !important;
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 4px !important;
  color: #64748b !important;
  font-size: 10.5px !important;
  line-height: 1 !important;
}

.wa-chat-messages .chat-read-state {
  font-size: 11px !important;
  letter-spacing: -1px !important;
}

.wa-chat-messages .chat-read-state.read {
  color: #0ea5e9 !important;
}

.wa-chat-messages .chat-attachment {
  max-width: 100% !important;
}

@media (max-width: 900px) {
  .wa-chat-messages .chat-bubble {
    max-width: 86% !important;
  }
}

/* Chat hotfix: feste Fensterhoehe, Verlauf scrollt innen */
.wa-chat-shell {
  height: clamp(560px, calc(100vh - 170px), 820px) !important;
  max-height: calc(100vh - 170px) !important;
  min-height: 520px !important;
  overflow: hidden !important;
  display: grid !important;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr) !important;
}

.wa-chat-sidebar,
.wa-chat-main {
  min-height: 0 !important;
  height: 100% !important;
  overflow: hidden !important;
}

.wa-chat-sidebar {
  grid-template-rows: auto auto auto minmax(0, 1fr) !important;
}

.wa-chat-contacts,
.chat-recent-list {
  min-height: 0 !important;
  max-height: none !important;
  overflow-y: auto !important;
}

.wa-chat-main {
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) auto !important;
}

.wa-chat-messages.chat-messages {
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior: contain !important;
}

.wa-chat-compose.chat-compose {
  flex-shrink: 0 !important;
  align-self: end !important;
  background: #fff !important;
  border-top: 1px solid #d8e5f2 !important;
}

@media (max-width: 900px) {
  .wa-chat-shell {
    height: calc(100vh - 135px) !important;
    max-height: calc(100vh - 135px) !important;
    min-height: 520px !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: minmax(170px, 34%) minmax(0, 1fr) !important;
  }
}

/* Chat final hotfix: stabile App-Ansicht, interne Scrollflaeche und kompakte Aktionen */
.wa-chat-shell {
  height: calc(100vh - 150px) !important;
  min-height: 560px !important;
  max-height: calc(100vh - 150px) !important;
  overflow: hidden !important;
  display: grid !important;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr) !important;
}
.wa-chat-sidebar,
.wa-chat-main {
  min-height: 0 !important;
  height: 100% !important;
  overflow: hidden !important;
}
.wa-chat-main {
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) auto !important;
}
.wa-chat-head {
  min-height: 64px !important;
  flex-shrink: 0 !important;
}
.wa-chat-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 6px !important;
  flex-wrap: wrap !important;
}
.wa-chat-actions .chat-action {
  width: auto !important;
  min-width: 0 !important;
  min-height: 30px !important;
  height: 30px !important;
  padding: 0 10px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  line-height: 1 !important;
}
.wa-chat-messages.chat-messages {
  position: relative !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  padding: 16px 18px !important;
  overscroll-behavior: contain !important;
}
.wa-chat-messages .chat-message {
  position: relative !important;
  flex: 0 0 auto !important;
  display: flex !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 0 !important;
  height: auto !important;
  clear: both !important;
  z-index: auto !important;
}
.wa-chat-messages .chat-message.own {
  justify-content: flex-end !important;
}
.wa-chat-messages .chat-message:not(.own) {
  justify-content: flex-start !important;
}
.wa-chat-messages .chat-bubble {
  position: relative !important;
  box-sizing: border-box !important;
  width: auto !important;
  max-width: min(560px, 74%) !important;
  min-width: 54px !important;
  min-height: 0 !important;
  height: auto !important;
  display: block !important;
  overflow: visible !important;
  padding: 9px 12px !important;
}
.wa-chat-messages .chat-text {
  white-space: pre-wrap !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}
.wa-chat-messages .chat-attachment,
.wa-chat-messages .chat-image-attachment,
.wa-chat-messages .chat-document-attachment,
.wa-chat-messages .chat-voice {
  box-sizing: border-box !important;
  width: min(360px, 100%) !important;
  max-width: 100% !important;
  height: auto !important;
  overflow: hidden !important;
}
.wa-chat-messages .chat-image-preview {
  width: 100% !important;
  max-width: 360px !important;
  height: auto !important;
  display: block !important;
  overflow: hidden !important;
  border-radius: 8px !important;
}
.wa-chat-messages .chat-image-preview img {
  width: 100% !important;
  max-width: 360px !important;
  max-height: 240px !important;
  object-fit: contain !important;
  display: block !important;
}
.chat-message-menu {
  position: absolute !important;
  top: 5px !important;
  right: 6px !important;
  z-index: 5 !important;
}
.chat-message:not(.own) .chat-message-menu {
  right: auto !important;
  left: 6px !important;
}
.chat-message-menu summary {
  width: 22px !important;
  height: 22px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 999px !important;
  border: 1px solid #d6e3f3 !important;
  background: rgba(255,255,255,.9) !important;
  color: #17365d !important;
  cursor: pointer !important;
  list-style: none !important;
  font-size: 14px !important;
}
.chat-message-menu summary::-webkit-details-marker {
  display: none !important;
}
.chat-message-menu-panel {
  position: absolute !important;
  top: 26px !important;
  right: 0 !important;
  min-width: 150px !important;
  padding: 6px !important;
  border: 1px solid #d6e3f3 !important;
  border-radius: 10px !important;
  background: #fff !important;
  box-shadow: 0 14px 30px rgba(15, 35, 65, .16) !important;
}
.chat-message:not(.own) .chat-message-menu-panel {
  right: auto !important;
  left: 0 !important;
}
.chat-message-menu-panel button {
  width: 100% !important;
  min-height: 30px !important;
  padding: 6px 8px !important;
  border: 0 !important;
  border-radius: 7px !important;
  background: transparent !important;
  color: #0f2341 !important;
  text-align: left !important;
  font-size: 12px !important;
  cursor: pointer !important;
}
.chat-message-menu-panel button:hover {
  background: #eef6ff !important;
}
.wa-chat-compose.chat-compose {
  flex-shrink: 0 !important;
  position: relative !important;
  z-index: 2 !important;
}
@media (max-width: 900px) {
  .wa-chat-shell {
    height: calc(100vh - 118px) !important;
    max-height: calc(100vh - 118px) !important;
    min-height: 520px !important;
    grid-template-columns: 1fr !important;
  }
  .wa-chat-messages .chat-bubble {
    max-width: 86% !important;
  }
}

/* Support tickets: moderne Kartenansicht fuer Meine Tickets */
.support-tickets-page {
  padding: 22px !important;
}
.support-page-head {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 18px !important;
  margin-bottom: 18px !important;
}
.support-page-head h2 {
  margin: 3px 0 6px !important;
  font-size: 24px !important;
  letter-spacing: 0 !important;
}
.support-page-head .eyebrow {
  margin: 0 !important;
  color: #0f766e !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
}
.support-page-actions {
  display: flex !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
  justify-content: flex-end !important;
}
.support-ticket-stats.summary-strip {
  margin: 0 0 18px !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}
.support-ticket-list {
  display: grid !important;
  gap: 12px !important;
}
.support-ticket.support-ticket-compact {
  border: 1px solid #d6e3f3 !important;
  border-radius: 12px !important;
  background: #fff !important;
  box-shadow: 0 12px 26px rgba(15, 35, 65, .07) !important;
  overflow: hidden !important;
}
.support-ticket-details {
  display: block !important;
}
.support-ticket-summary {
  display: grid !important;
  grid-template-columns: 46px minmax(0, 1fr) auto !important;
  gap: 14px !important;
  align-items: center !important;
  padding: 16px 18px !important;
  cursor: pointer !important;
  list-style: none !important;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
}
.support-ticket-summary::-webkit-details-marker {
  display: none !important;
}
.support-ticket-summary::marker {
  content: "" !important;
}
.support-ticket-summary:hover {
  background: #f4f9ff !important;
}
.support-ticket-summary-icon {
  width: 46px !important;
  height: 46px !important;
  border-radius: 12px !important;
  display: grid !important;
  place-items: center !important;
  background: #e8f2ff !important;
  color: #0b4a86 !important;
  font-size: 13px !important;
  font-weight: 900 !important;
}
.support-ticket-summary-main {
  min-width: 0 !important;
}
.support-ticket-kicker {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
  margin-bottom: 5px !important;
  color: #17365d !important;
  font-size: 12px !important;
}
.support-ticket-summary-main h3 {
  margin: 0 !important;
  color: #0f2341 !important;
  font-size: 16px !important;
  line-height: 1.25 !important;
  overflow-wrap: anywhere !important;
}
.support-ticket-tags {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  margin-top: 8px !important;
}
.support-ticket-tags span {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 24px !important;
  padding: 0 9px !important;
  border: 1px solid #dbe8f6 !important;
  border-radius: 999px !important;
  background: #f6faff !important;
  color: #456179 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}
.support-ticket-preview {
  margin: 9px 0 0 !important;
  max-width: 920px !important;
  color: #536b84 !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
  overflow-wrap: anywhere !important;
}
.support-ticket-summary-meta {
  display: grid !important;
  gap: 4px !important;
  justify-items: end !important;
  color: #64748b !important;
  font-size: 12px !important;
  white-space: nowrap !important;
}
.support-details-hint {
  margin-top: 4px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  min-height: 30px !important;
  padding: 0 10px !important;
  border: 1px solid #cfe0f3 !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #17365d !important;
  font-weight: 800 !important;
}
.support-ticket-details[open] .support-details-hint {
  background: #0f766e !important;
  border-color: #0f766e !important;
  color: #fff !important;
}
.support-ticket-details[open] .support-details-hint b {
  transform: rotate(180deg) !important;
}
.support-ticket-body {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 280px !important;
  gap: 18px !important;
  padding: 18px !important;
  border-top: 1px solid #dbe8f6 !important;
  background: #fbfdff !important;
}
.support-ticket-section,
.support-ticket-comment,
.support-thread,
.support-attachments {
  border: 1px solid #dbe8f6 !important;
  border-radius: 12px !important;
  background: #fff !important;
  padding: 14px !important;
  margin: 0 0 12px !important;
}
.support-section-label {
  display: block !important;
  margin-bottom: 8px !important;
  color: #64748b !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
}
.support-ticket-description {
  margin: 0 !important;
  color: #0f2341 !important;
  line-height: 1.55 !important;
  overflow-wrap: anywhere !important;
  white-space: pre-wrap !important;
}
.support-ticket-meta {
  align-self: start !important;
  display: grid !important;
  gap: 8px !important;
  padding: 14px !important;
  border: 1px solid #dbe8f6 !important;
  border-radius: 12px !important;
  background: #fff !important;
  color: #536b84 !important;
  font-size: 12px !important;
}
.support-ticket-meta strong {
  color: #0f2341 !important;
  font-size: 13px !important;
}
.support-ticket-actions {
  margin-top: 8px !important;
  gap: 7px !important;
}
.support-ticket-actions .tiny {
  width: 100% !important;
  min-height: 32px !important;
  justify-content: center !important;
}
.support-reply-compact {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 8px !important;
  align-items: end !important;
  margin-top: 12px !important;
}
.support-reply-compact textarea {
  min-height: 58px !important;
  resize: vertical !important;
}
@media (max-width: 980px) {
  .support-page-head,
  .support-ticket-summary {
    grid-template-columns: 1fr !important;
  }
  .support-page-head {
    display: grid !important;
  }
  .support-page-actions,
  .support-ticket-summary-meta {
    justify-items: start !important;
    justify-content: flex-start !important;
    white-space: normal !important;
  }
  .support-ticket-summary {
    grid-template-columns: 42px minmax(0, 1fr) !important;
  }
  .support-ticket-summary-meta {
    grid-column: 1 / -1 !important;
  }
  .support-ticket-body {
    grid-template-columns: 1fr !important;
  }
  .support-ticket-stats.summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 560px) {
  .support-tickets-page {
    padding: 14px !important;
  }
  .support-ticket-summary {
    padding: 14px !important;
  }
  .support-ticket-body {
    padding: 14px !important;
  }
  .support-reply-compact {
    grid-template-columns: 1fr !important;
  }
  .support-ticket-stats.summary-strip {
    grid-template-columns: 1fr !important;
  }
}

/* Support tickets: Anhaenge nie in Originalgroesse anzeigen */
.support-ticket-body .support-attachments {
  overflow: hidden !important;
}
.support-ticket-body .support-attachment-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(160px, 220px)) !important;
  gap: 12px !important;
  align-items: start !important;
}
.support-ticket-body .support-attachment-item {
  width: 100% !important;
  max-width: 220px !important;
  min-width: 0 !important;
  border: 1px solid #dbe8f6 !important;
  border-radius: 10px !important;
  background: #f8fbff !important;
  padding: 8px !important;
  overflow: hidden !important;
}
.support-ticket-body .support-attachment-thumb {
  width: 100% !important;
  max-width: 204px !important;
  height: 128px !important;
  min-height: 128px !important;
  max-height: 128px !important;
  display: block !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: #eaf2fb !important;
  overflow: hidden !important;
  cursor: pointer !important;
}
.support-ticket-body .support-attachment-thumb img,
.support-ticket-body .support-attachment-item img[data-protected-img] {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 128px !important;
  display: block !important;
  object-fit: cover !important;
  object-position: center !important;
}
.support-ticket-body .support-attachment-file {
  width: 100% !important;
  height: 128px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 8px !important;
  background: #eef6ff !important;
  color: #0b4a86 !important;
  font-weight: 900 !important;
}
.support-ticket-body .support-attachment-name {
  margin-top: 8px !important;
  color: #17365d !important;
  font-size: 12px !important;
  line-height: 1.3 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
@media (max-width: 560px) {
  .support-ticket-body .support-attachment-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .support-ticket-body .support-attachment-item {
    max-width: none !important;
  }
  .support-ticket-body .support-attachment-thumb,
  .support-ticket-body .support-attachment-file {
    max-width: none !important;
    height: 112px !important;
    min-height: 112px !important;
    max-height: 112px !important;
  }
}

/* Arbeitszeit: eigener Mitarbeiter-Screen */
.employee-worktime-tools {
  display: flex !important;
  align-items: end !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
}
.employee-worktime-tools label {
  display: grid !important;
  gap: 5px !important;
  min-width: 160px !important;
  color: #536b84 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}
.employee-worktime-tools select {
  min-height: 36px !important;
}
.employee-worktime-screen .section-head {
  margin-bottom: 14px !important;
}
.employee-worktime-screen .section-head h2 {
  margin: 0 0 5px !important;
  font-size: 22px !important;
}
.employee-worktime-summary.summary-strip {
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  margin-bottom: 16px !important;
}
.employee-worktime-table {
  overflow-x: auto !important;
}
.employee-worktime-table table {
  min-width: 980px !important;
}
.employee-worktime-table td,
.employee-worktime-table th {
  white-space: nowrap !important;
}
.employee-worktime-table td:first-child,
.employee-worktime-table th:first-child,
.employee-worktime-table td:last-child,
.employee-worktime-table th:last-child {
  white-space: normal !important;
}
@media (max-width: 1100px) {
  .employee-worktime-summary.summary-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 640px) {
  .employee-worktime-tools {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }
  .employee-worktime-tools label,
  .employee-worktime-tools button {
    width: 100% !important;
  }
  .employee-worktime-summary.summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* Chat compose final: kompaktere Hoehe, Textfeld links breit, Datei rechts */
.wa-chat-shell {
  height: calc(100vh - 205px) !important;
  max-height: calc(100vh - 205px) !important;
  min-height: 480px !important;
}
.wa-chat-main {
  grid-template-rows: auto minmax(0, 1fr) 54px !important;
}
.wa-chat-messages.chat-messages {
  padding-bottom: 12px !important;
}
.wa-chat-compose.chat-compose {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 230px 48px !important;
  gap: 8px !important;
  align-items: center !important;
  min-height: 54px !important;
  height: 54px !important;
  padding: 8px 12px !important;
  background: #fff !important;
  border-top: 1px solid #d8e5f2 !important;
  box-sizing: border-box !important;
}
.wa-chat-compose textarea[name="message"] {
  order: 1 !important;
  grid-column: 1 !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 38px !important;
  height: 38px !important;
  max-height: 38px !important;
  resize: none !important;
  overflow-y: auto !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}
.wa-chat-compose .wa-attach-button,
.wa-chat-compose .chat-file-button {
  order: 2 !important;
  grid-column: 2 !important;
  width: 230px !important;
  max-width: 230px !important;
  min-width: 0 !important;
  height: 38px !important;
  min-height: 38px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 8px !important;
  border: 1px solid #d6e3f3 !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #0f2341 !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}
.wa-chat-compose .wa-attach-button span,
.wa-chat-compose .chat-file-button span {
  display: none !important;
}
.wa-chat-compose input[type="file"] {
  width: 100% !important;
  max-width: 210px !important;
  min-width: 0 !important;
  font-size: 12px !important;
  line-height: 1 !important;
  color: #0f2341 !important;
}
.wa-chat-compose .wa-send-button {
  order: 3 !important;
  grid-column: 3 !important;
  width: 48px !important;
  min-width: 48px !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
}
@media (max-width: 900px) {
  .wa-chat-shell {
    height: calc(100vh - 150px) !important;
    max-height: calc(100vh - 150px) !important;
    min-height: 470px !important;
  }
  .wa-chat-main {
    grid-template-rows: auto minmax(0, 1fr) auto !important;
  }
  .wa-chat-compose.chat-compose {
    height: auto !important;
    min-height: 96px !important;
    grid-template-columns: minmax(0, 1fr) 48px !important;
    grid-template-rows: 38px 38px !important;
  }
  .wa-chat-compose textarea[name="message"] {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
  }
  .wa-chat-compose .wa-attach-button,
  .wa-chat-compose .chat-file-button {
    grid-column: 1 !important;
    grid-row: 2 !important;
    width: 100% !important;
    max-width: none !important;
  }
  .wa-chat-compose .wa-send-button {
    grid-column: 2 !important;
    grid-row: 2 !important;
  }
}

/* Chat message selection: Bubble-Menue raus, Markieren per Klick */
.wa-chat-messages .chat-message[data-chat-message-select] {
  cursor: pointer !important;
}
.wa-chat-messages .chat-message.selected .chat-bubble {
  outline: 2px solid #0f766e !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, .12), 0 8px 18px rgba(15, 35, 65, .12) !important;
}
.chat-message-menu {
  display: none !important;
}
.chat-selected-check {
  position: absolute !important;
  top: -8px !important;
  right: -8px !important;
  width: 20px !important;
  height: 20px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 999px !important;
  background: #0f766e !important;
  color: #fff !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  box-shadow: 0 4px 10px rgba(15, 35, 65, .22) !important;
}
.chat-message:not(.own) .chat-selected-check {
  right: auto !important;
  left: -8px !important;
}
.chat-selection-count {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 30px !important;
  padding: 0 9px !important;
  border-radius: 999px !important;
  background: #e8f7f4 !important;
  color: #0f766e !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}
.wa-chat-actions [data-chat-selected-delete] {
  border-color: #0f766e !important;
  background: #fff !important;
  color: #0f766e !important;
}
.wa-chat-actions [data-chat-selected-delete].danger {
  border-color: #c91f18 !important;
  background: #c91f18 !important;
  color: #fff !important;
}
@media (max-width: 900px) {
  .chat-selection-count {
    min-height: 28px !important;
    font-size: 11px !important;
  }
  .wa-chat-actions [data-chat-selected-delete] {
    min-height: 28px !important;
    height: 28px !important;
    padding: 0 8px !important;
    font-size: 11px !important;
  }
}

/* Wunschfrei im Dienstkalender */
.planning-calendar-event.wishfree {
  background: #e8f1ff;
  border-color: #7fb0ff;
  color: #0f376d;
}
.planning-calendar-event.wishfree.pending {
  background: #f1f6ff;
  border-style: dashed;
  color: #31506f;
}
.planning-calendar-event.wishfree strong {
  color: inherit;
}

.planning-calendar-event.shift.draft {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}

.planning-calendar-event.shift.draft .planning-calendar-event-main strong {
  color: #9a3412;
}


/* Wunschfrei: mehr Platz, kein unnötiges Scrollen und sauberer Zeilenumbruch */
#modal.timeoff-wish-modal {
  width: min(1180px, calc(100vw - 48px));
}
#modal.timeoff-wish-modal .modal-body {
  max-height: calc(100vh - 170px);
  overflow: visible;
}
.timeoff-wish-dialog .notice {
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.timeoff-wish-dialog .table-wrap {
  overflow-x: visible;
}
.timeoff-wish-dialog table {
  min-width: 0;
  width: 100%;
  table-layout: fixed;
}
.timeoff-wish-dialog th,
.timeoff-wish-dialog td {
  white-space: normal;
  overflow-wrap: anywhere;
  vertical-align: top;
}
.timeoff-wish-dialog td:nth-child(1) { width: 18%; }
.timeoff-wish-dialog td:nth-child(2) { width: 16%; }
.timeoff-wish-dialog td:nth-child(3) { width: 30%; }
.timeoff-wish-dialog td:nth-child(4) { width: 36%; }
.timeoff-wish-overview td:nth-child(1) { width: 15%; }
.timeoff-wish-overview td:nth-child(2) { width: 13%; }
.timeoff-wish-overview td:nth-child(3) { width: 10%; }
.timeoff-wish-overview td:nth-child(4) { width: 18%; }
.timeoff-wish-overview td:nth-child(5) { width: 22%; }
.timeoff-wish-overview td:nth-child(6) { width: 16%; }
.timeoff-wish-overview td:nth-child(7) { width: 6%; }
@media (max-width: 760px) {
  #modal.timeoff-wish-modal {
    width: min(98vw, calc(100vw - 12px));
  }
  #modal.timeoff-wish-modal .modal-body {
    max-height: 78vh;
    overflow: auto;
  }
}


/* Wunschfrei: Badge und Dienst-Konfliktanzeige */
.badge-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.button-badge {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}
.timeoff-conflict-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 3px 7px;
  border-radius: 999px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 4px;
}
.timeoff-conflict-text {
  color: #334155;
  font-size: 12px;
  line-height: 1.35;
}

/* Dashboard: dringliche Aufgaben dezenter, aber weiterhin klar als kritisch erkennbar */
.task-item.danger {
  background: #fff1f2 !important;
  border-color: #fecdd3 !important;
  border-left-color: #dc2626 !important;
  border-left-width: 6px !important;
  color: #7f1d1d !important;
  box-shadow: 0 1px 0 rgba(127, 29, 29, .04);
}

.task-item.danger strong,
.task-item.danger span,
.task-item.danger * {
  color: #7f1d1d !important;
}

.task-item.danger small {
  color: #991b1b !important;
  opacity: .92 !important;
  font-weight: 650;
}

.task-item.danger:hover {
  background: #ffe4e6 !important;
  border-color: #fda4af !important;
  border-left-color: #b91c1c !important;
}

/* HEVEXO_PROFILE_MENU_DROPDOWN_START */
.sidebar-account-wrap {
  position: relative;
  width: 100%;
}

.sidebar-account {
  width: 100% !important;
  min-height: 56px !important;
  padding: 9px 10px !important;
  border: 1px solid #d4e5f6 !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  color: var(--sidebar-text, #233b58) !important;
  box-shadow: 0 8px 20px rgba(20, 55, 90, .06) !important;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.sidebar-account:hover,
.sidebar-account[aria-expanded="true"] {
  border-color: #b9d7f5 !important;
  box-shadow: 0 12px 26px rgba(20, 55, 90, .11) !important;
  transform: translateY(-1px);
}

.account-menu-caret {
  margin-left: auto;
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  color: #244363;
  background: #f2f7fc;
  transition: transform .16s ease, background .16s ease;
}

.sidebar-account[aria-expanded="true"] .account-menu-caret {
  transform: rotate(180deg);
  background: #e8f3ff;
}

.account-menu[hidden] {
  display: none !important;
}

.account-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  z-index: 50;
  width: min(238px, calc(100vw - 28px));
  padding: 8px;
  display: grid;
  gap: 4px;
  background: rgba(255, 255, 255, .98);
  border: 1px solid #d6e4f2;
  border-radius: 14px;
  box-shadow: 0 22px 55px rgba(15, 35, 60, .18);
  backdrop-filter: blur(12px);
}

.account-menu::after {
  content: "";
  position: absolute;
  left: 24px;
  bottom: -7px;
  width: 12px;
  height: 12px;
  background: #fff;
  border-right: 1px solid #d6e4f2;
  border-bottom: 1px solid #d6e4f2;
  transform: rotate(45deg);
}

.account-menu button {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  padding: 8px 10px;
  border: 0 !important;
  border-radius: 10px;
  background: transparent !important;
  color: #243b55 !important;
  font-size: 13px;
  font-weight: 650;
  text-align: left;
  white-space: nowrap;
  box-shadow: none !important;
}

.account-menu button:hover {
  background: #eef6ff !important;
  color: #0759bf !important;
}

.account-menu button::before {
  width: 20px;
  height: 20px;
  min-width: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  background: #e8f3ff;
  color: #0b79e5;
  font-size: 12px;
  line-height: 1;
}

.account-menu button[data-profile-action]::before { content: "👤"; }
.account-menu button[data-change-own-password]::before { content: "🔒"; }
.account-menu button[data-company-settings]::before { content: "⚙"; }
.account-menu button[data-status-report]::before { content: "📊"; }
.account-menu button[data-logout-action] {
  color: #9f1d1d !important;
}
.account-menu button[data-logout-action]::before {
  content: "↪";
  background: #fff1f1;
  color: #b42318;
}
.account-menu button[data-logout-action]:hover {
  background: #fff1f1 !important;
  color: #9f1d1d !important;
}

@media (max-width: 760px) {
  .account-menu {
    left: 0;
    right: auto;
    bottom: calc(100% + 8px);
    width: min(245px, calc(100vw - 24px));
  }
}
/* HEVEXO_PROFILE_MENU_DROPDOWN_END */

/* Hevexo Profile Menu Topbar Fix */
.sidebar-foot:empty {
  display: none !important;
}

.topbar .actions {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.topbar-account-wrap {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
}

.topbar-account {
  height: 44px !important;
  min-width: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 5px 10px 5px 6px !important;
  border: 1px solid #d6e4f2 !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, .92) !important;
  color: #0f2544 !important;
  cursor: pointer !important;
  box-shadow: 0 8px 22px rgba(15, 37, 68, .06) !important;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease !important;
}

.topbar-account:hover,
.topbar-account[aria-expanded="true"] {
  background: #f6fbff !important;
  border-color: #aacaf1 !important;
  box-shadow: 0 12px 28px rgba(11, 99, 206, .12) !important;
}

.topbar-account .sidebar-avatar {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  box-shadow: none !important;
}

.topbar-account-meta {
  display: grid !important;
  gap: 1px !important;
  min-width: 0 !important;
  text-align: left !important;
}

.topbar-account-name {
  max-width: 160px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 13px !important;
  font-weight: 750 !important;
  line-height: 1.15 !important;
}

.topbar-account-role {
  font-size: 11px !important;
  color: #5f7491 !important;
  line-height: 1.15 !important;
}

.account-menu-caret {
  margin-left: 2px !important;
  color: #526b8d !important;
  font-size: 12px !important;
  transition: transform .16s ease !important;
}

.topbar-account[aria-expanded="true"] .account-menu-caret,
.sidebar-account[aria-expanded="true"] .account-menu-caret {
  transform: rotate(180deg) !important;
}

.account-menu[hidden] {
  display: none !important;
}

.account-menu {
  position: absolute !important;
  z-index: 1000 !important;
  width: 238px !important;
  display: grid !important;
  gap: 4px !important;
  padding: 8px !important;
  border: 1px solid #d6e4f2 !important;
  border-radius: 16px !important;
  background: #fff !important;
  box-shadow: 0 18px 45px rgba(15, 37, 68, .18) !important;
}

.topbar-account-menu {
  top: calc(100% + 10px) !important;
  right: 0 !important;
}

.account-menu::after {
  content: "" !important;
  position: absolute !important;
  top: -7px !important;
  right: 26px !important;
  width: 12px !important;
  height: 12px !important;
  background: #fff !important;
  border-left: 1px solid #d6e4f2 !important;
  border-top: 1px solid #d6e4f2 !important;
  transform: rotate(45deg) !important;
}

.account-menu button {
  width: 100% !important;
  min-height: 38px !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 8px 10px !important;
  border: 0 !important;
  border-radius: 11px !important;
  background: transparent !important;
  color: #10233f !important;
  font-weight: 650 !important;
  text-align: left !important;
  cursor: pointer !important;
}

.account-menu button:hover {
  background: #eef6ff !important;
  color: #0759bf !important;
}

.account-menu button::before {
  width: 20px !important;
  min-width: 20px !important;
  display: inline-grid !important;
  place-items: center !important;
  color: #3976c6 !important;
}

.account-menu button[data-profile-action]::before { content: "👤"; }
.account-menu button[data-change-own-password]::before { content: "🔒"; }
.account-menu button[data-company-settings]::before { content: "⚙"; }
.account-menu button[data-status-report]::before { content: "📊"; }
.account-menu button[data-logout-action] {
  color: #991b1b !important;
}
.account-menu button[data-logout-action]::before {
  content: "⎋";
  color: #991b1b !important;
}
.account-menu button[data-logout-action]:hover {
  background: #fff1f2 !important;
  color: #991b1b !important;
}

@media (max-width: 780px) {
  .topbar-account-meta {
    display: none !important;
  }
  .topbar-account {
    padding: 5px 8px 5px 5px !important;
  }
  .account-menu {
    right: 0 !important;
    width: min(238px, calc(100vw - 28px)) !important;
  }
}

/* HEVEXO_PROFILE_TOPBAR_POSITION_FIX_START */
.topbar {
  overflow: visible !important;
}

.topbar .actions,
.topbar-account-wrap {
  overflow: visible !important;
}

.topbar-account-wrap {
  position: relative !important;
  isolation: isolate !important;
}

.topbar-account-menu,
.account-menu.topbar-account-menu {
  position: absolute !important;
  top: calc(100% + 14px) !important;
  right: 0 !important;
  left: auto !important;
  bottom: auto !important;
  width: 260px !important;
  max-width: min(260px, calc(100vw - 24px)) !important;
  padding: 8px !important;
  z-index: 99999 !important;
  transform: none !important;
  border-radius: 16px !important;
  background: #ffffff !important;
  box-shadow: 0 22px 55px rgba(15, 37, 68, .22) !important;
}

.topbar-account-menu::after,
.account-menu.topbar-account-menu::after {
  top: -7px !important;
  right: 34px !important;
  left: auto !important;
  bottom: auto !important;
  border-left: 1px solid #d6e4f2 !important;
  border-top: 1px solid #d6e4f2 !important;
  border-right: 0 !important;
  border-bottom: 0 !important;
  transform: rotate(45deg) !important;
}

.topbar-account-menu button,
.account-menu.topbar-account-menu button {
  min-height: 40px !important;
  font-size: 13px !important;
  white-space: nowrap !important;
}

.sidebar-foot .account-menu,
.sidebar-account-wrap .account-menu:not(.topbar-account-menu) {
  bottom: calc(100% + 10px) !important;
  top: auto !important;
  left: 0 !important;
  right: auto !important;
}

.sidebar-foot .account-menu::after,
.sidebar-account-wrap .account-menu:not(.topbar-account-menu)::after {
  bottom: -7px !important;
  top: auto !important;
  left: 24px !important;
  right: auto !important;
  border-right: 1px solid #d6e4f2 !important;
  border-bottom: 1px solid #d6e4f2 !important;
  border-left: 0 !important;
  border-top: 0 !important;
}

@media (max-width: 780px) {
  .topbar-account-menu,
  .account-menu.topbar-account-menu {
    right: 0 !important;
    width: min(250px, calc(100vw - 20px)) !important;
  }
}
/* HEVEXO_PROFILE_TOPBAR_POSITION_FIX_END */

/* HEVEXO_DASHBOARD_COMPACT_CARDS_FIX_START */
/* Dashboard KPI-Kacheln kompakter: weniger Tablet-Optik, mehr Admin-Dashboard */
.grid.dashboard-stats-six,
.grid.dashboard-stats-five {
  grid-template-columns: repeat(auto-fit, minmax(190px, 235px)) !important;
  justify-content: start !important;
  align-items: stretch !important;
  gap: 12px !important;
}

.grid.dashboard-stats-six .stat,
.grid.dashboard-stats-five .stat,
.dashboard-stats-six .stat,
.dashboard-stats-five .stat {
  min-height: 82px !important;
  padding: 14px 16px !important;
  gap: 12px !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 22px rgba(20, 55, 90, .055) !important;
}

.dashboard-stats-six .stat-icon,
.dashboard-stats-five .stat-icon {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
}

.dashboard-stats-six .stat-icon svg,
.dashboard-stats-five .stat-icon svg {
  width: 21px !important;
  height: 21px !important;
}

.dashboard-stats-six .stat strong,
.dashboard-stats-five .stat strong {
  font-size: 25px !important;
  line-height: 1 !important;
}

.dashboard-stats-six .stat span:not(.stat-icon):not(.stat-arrow),
.dashboard-stats-five .stat span:not(.stat-icon):not(.stat-arrow) {
  margin-top: 4px !important;
  font-size: 14px !important;
  line-height: 1.15 !important;
}

.dashboard-stats-six .stat-arrow,
.dashboard-stats-five .stat-arrow {
  margin-left: auto !important;
  font-size: 15px !important;
  opacity: .85 !important;
}

@media (max-width: 1500px) {
  .grid.dashboard-stats-six,
  .grid.dashboard-stats-five {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) !important;
  }
}

@media (max-width: 700px) {
  .grid.dashboard-stats-six,
  .grid.dashboard-stats-five {
    grid-template-columns: 1fr !important;
  }

  .dashboard-stats-six .stat,
  .dashboard-stats-five .stat {
    min-height: 76px !important;
    padding: 13px 14px !important;
  }
}
/* HEVEXO_DASHBOARD_COMPACT_CARDS_FIX_END */

/* HEVEXO DASHBOARD KLARE LINE-ICONS START */
/* Dashboard-Kacheln: klarere Line-Icons statt kleiner gefüllter Symbole */
.stat-icon {
  width: 46px !important;
  height: 46px !important;
  min-width: 46px !important;
  border-radius: 14px !important;
  background: linear-gradient(180deg, #eef7ff 0%, #e7f2ff 100%) !important;
  color: var(--primary, #0b6fd3) !important;
  box-shadow: inset 0 0 0 1px rgba(11, 111, 211, .08) !important;
}
.stat-icon svg.dashboard-line-icon {
  width: 25px !important;
  height: 25px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}
.stat-icon svg.dashboard-line-icon * {
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}
.stat strong {
  font-size: 26px !important;
}
.stat span:not(.stat-icon) {
  margin-top: 3px !important;
}
/* HEVEXO DASHBOARD KLARE LINE-ICONS END */

/* Hevexo System-Screens: Firmeneinstellungen & Statusreport als eigene Seiten */
.system-screen-card {
  background: #fff;
  border: 1px solid #d8e4f2;
  border-radius: 18px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .06);
  padding: 22px;
}
.screen-headline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e3edf8;
}
.screen-headline h2 {
  margin: 0 0 6px;
  font-size: 1.28rem;
  color: #0f172a;
}
.screen-headline .notice {
  margin: 0;
  max-width: 900px;
}
.company-settings-screen .company-settings,
.system-screen-card .status-report-groups {
  max-width: none;
}
.company-settings-screen .employee-card,
.system-screen-card .csv-field-group {
  box-shadow: none;
}
@media (max-width: 900px) {
  .screen-headline { flex-direction: column; }
  .screen-headline .actions { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
}

/* Hevexo: Firmeneinstellungen bereinigt, Modulrechte sauber im Rollen-Screen */
.roles-screen-headline { margin-bottom: 16px; }
.role-module-settings {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #d8e4f2;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .05);
}
.role-module-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e3edf8;
}
.role-module-head h3 { margin: 0 0 5px; color: #0f172a; }
.role-module-head .notice { margin: 0; max-width: 780px; }
.role-module-settings .company-module-grid { margin-top: 10px; }
@media (max-width: 980px) {
  .role-module-head { flex-direction: column; }
  .role-module-head .actions { width: 100%; justify-content: flex-start; }
}

/* Hevexo Fix: Modulrechte in Rollen als saubere Matrix statt zerfallener Liste */
.role-module-settings {
  overflow: hidden;
}
.role-module-settings .company-module-grid,
.company-module-grid.role-permission-matrix {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(120px, 150px));
  align-items: stretch;
  border: 1px solid #dbe7f5;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.65);
}
.company-module-head {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 800;
  color: #17365d;
  background: #f4f8fd;
  border-bottom: 1px solid #dbe7f5;
}
.company-module-head-main {
  justify-content: flex-start;
}
.company-module-name {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 650;
  color: #0f172a;
  border-bottom: 1px solid #edf3fa;
  background: #fff;
}
.company-module-check {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin: 0;
  padding: 8px 10px;
  border-bottom: 1px solid #edf3fa;
  border-left: 1px solid #edf3fa;
  background: #fff;
  cursor: pointer;
}
.company-module-check:hover,
.company-module-name:hover + .company-module-check {
  background: #f8fbff;
}
.company-module-check input[type="checkbox"] {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  margin: 0 !important;
  padding: 0 !important;
  accent-color: var(--tenant-primary, #0f6bdc);
  cursor: pointer;
}
.role-permission-note {
  margin-top: 10px;
}
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
@media (max-width: 900px) {
  .role-module-settings .company-module-grid,
  .company-module-grid.role-permission-matrix {
    grid-template-columns: minmax(160px, 1fr) repeat(3, 88px);
    overflow-x: auto;
  }
  .company-module-head,
  .company-module-name,
  .company-module-check {
    font-size: 12px;
    padding: 8px;
  }
}

/* Hevexo Fix: Rollen-Screen entdoppelt + eigene Rollenverwaltung */
.roles-management-section,
.role-module-settings {
  margin-bottom: 18px;
}
.roles-management-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.roles-management-head h3,
.role-module-settings h3 {
  margin: 0 0 4px;
}
.roles-management-table-wrap,
.role-permission-matrix-wrap {
  width: 100%;
  overflow-x: auto;
}
.roles-management-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #dbe7f5;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}
.roles-management-table th,
.roles-management-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #edf3fa;
  text-align: left;
  vertical-align: middle;
}
.roles-management-table th {
  background: #f4f8fd;
  color: #17365d;
  font-size: 13px;
  font-weight: 800;
}
.roles-management-table tr:last-child td {
  border-bottom: 0;
}
.role-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}
.role-actions button[disabled] {
  opacity: .45;
  cursor: not-allowed;
}
.pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid #dbe7f5;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  background: #f8fbff;
}
.notice.small {
  font-size: 11px;
  margin-top: 3px;
}
.role-module-settings .company-module-grid,
.company-module-grid.role-permission-matrix {
  width: max-content;
  min-width: 100%;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) repeat(var(--role-count, 3), minmax(120px, 150px));
  align-items: stretch;
  border: 1px solid #dbe7f5;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}
.company-module-head {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 800;
  color: #17365d;
  background: #f4f8fd;
  border-bottom: 1px solid #dbe7f5;
}
.company-module-head-main {
  justify-content: flex-start;
}
.company-module-name {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 650;
  color: #0f172a;
  border-bottom: 1px solid #edf3fa;
  background: #fff;
}
.company-module-check {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin: 0;
  padding: 8px 10px;
  border-bottom: 1px solid #edf3fa;
  border-left: 1px solid #edf3fa;
  background: #fff;
  cursor: pointer;
}
.company-module-check:hover {
  background: #f8fbff;
}
.company-module-check input[type="checkbox"] {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  margin: 0 !important;
  accent-color: var(--tenant-primary, #0f6bdc);
  cursor: pointer;
}
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
@media (max-width: 900px) {
  .roles-management-head {
    flex-direction: column;
  }
  .role-module-settings .company-module-grid,
  .company-module-grid.role-permission-matrix {
    grid-template-columns: minmax(170px, 1fr) repeat(var(--role-count, 3), minmax(94px, 110px));
  }
}


/* Mitarbeiterdetails: feste Modal-Groeße ohne Springen beim Reiterwechsel */
#modal.employee-detail-modal {
  width: min(1180px, calc(100vw - 32px)) !important;
  max-width: 1180px !important;
  height: min(930px, calc(100vh - 48px)) !important;
  max-height: calc(100vh - 48px) !important;
  overflow: hidden !important;
}

#modal.employee-detail-modal form {
  height: 100% !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

#modal.employee-detail-modal .modal-head,
#modal.employee-detail-modal .modal-foot {
  flex: 0 0 auto !important;
}

#modal.employee-detail-modal .modal-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

#modal.employee-detail-modal .detail-section {
  min-height: 100% !important;
}

@media (max-width: 900px) {
  #modal.employee-detail-modal {
    width: calc(100vw - 16px) !important;
    height: calc(100vh - 16px) !important;
    max-height: calc(100vh - 16px) !important;
  }
}

/* FINAL-FIX Mitarbeiterdetails: feste Pop-up-Groeße ohne Stretch-/Huepf-Effekt */
#modal.employee-detail-modal {
  width: min(1180px, calc(100vw - 32px)) !important;
  max-width: 1180px !important;
  height: min(930px, calc(100vh - 48px)) !important;
  max-height: calc(100vh - 48px) !important;
  overflow: hidden !important;
}

#modal.employee-detail-modal form {
  height: 100% !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

#modal.employee-detail-modal .modal-head,
#modal.employee-detail-modal .modal-foot {
  flex: 0 0 auto !important;
}

#modal.employee-detail-modal .modal-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  display: block !important;
  padding: 16px !important;
}

#modal.employee-detail-modal .employee-detail {
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
  align-items: stretch !important;
  align-content: flex-start !important;
  min-height: 0 !important;
  height: auto !important;
}

#modal.employee-detail-modal .employee-detail-hero {
  flex: 0 0 auto !important;
  min-height: 0 !important;
}

#modal.employee-detail-modal .employee-tabs {
  flex: 0 0 auto !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  align-content: flex-start !important;
  gap: 6px !important;
  min-height: 0 !important;
  height: auto !important;
}

#modal.employee-detail-modal .employee-tabs button {
  flex: 0 0 auto !important;
  width: auto !important;
  height: auto !important;
  min-height: 36px !important;
  min-width: 0 !important;
  padding: 8px 12px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
}

#modal.employee-detail-modal .detail-section {
  flex: 0 0 auto !important;
  min-height: 0 !important;
  height: auto !important;
  align-self: stretch !important;
}

#modal.employee-detail-modal .detail-section[hidden] {
  display: none !important;
}

@media (max-width: 900px) {
  #modal.employee-detail-modal {
    width: calc(100vw - 16px) !important;
    height: calc(100vh - 16px) !important;
    max-height: calc(100vh - 16px) !important;
  }
}

/* HEVEXO HARD FIX 20260612: Firmeneinstellungen Layout global + Modal/Screen */
.company-settings {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 18px !important;
  max-width: none !important;
}
.company-settings > .employee-card,
.company-settings > .employee-card-wide,
.company-settings .employee-card.employee-card-wide {
  margin: 0 !important;
  padding: 20px !important;
  border: 1px solid #d8e4f2 !important;
  border-radius: 18px !important;
  background: #fff !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .045) !important;
}
.company-settings > .employee-card > h3,
.company-settings > .employee-card-wide > h3,
.company-settings .employee-card.employee-card-wide > h3 {
  margin: 0 0 16px !important;
  font-size: 18px !important;
  line-height: 1.25 !important;
  color: #0f172a !important;
}
.company-settings .employee-card label,
.company-settings .employee-card-wide label {
  display: block !important;
  margin: 0 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  color: #60708a !important;
}
.company-settings .employee-card input,
.company-settings .employee-card select,
.company-settings .employee-card textarea,
.company-settings .employee-card-wide input,
.company-settings .employee-card-wide select,
.company-settings .employee-card-wide textarea {
  margin-top: 6px !important;
}
.company-settings .company-list {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)) !important;
  gap: 10px !important;
  margin: 0 0 14px !important;
}
.company-settings .company-list-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  min-height: 44px !important;
  padding: 8px 10px 8px 14px !important;
  border: 1px solid #d8e4f2 !important;
  border-radius: 14px !important;
  background: #f8fbff !important;
}
.company-settings .company-list-row span {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-weight: 700 !important;
  color: #24354d !important;
}
.company-settings .company-list-row button.danger,
.company-settings .company-template-row button.danger {
  width: auto !important;
  min-width: 0 !important;
  min-height: 34px !important;
  padding: 7px 12px !important;
  border-radius: 10px !important;
  flex: 0 0 auto !important;
}
.company-settings .company-inline-form {
  display: grid !important;
  grid-template-columns: minmax(260px, 1fr) auto !important;
  gap: 10px !important;
  align-items: center !important;
  padding-top: 12px !important;
  border-top: 1px solid #e7eff8 !important;
}
.company-settings .company-inline-form input {
  width: 100% !important;
  min-height: 40px !important;
}
.company-settings .company-inline-form button {
  width: auto !important;
  min-height: 40px !important;
  padding: 9px 16px !important;
  border-radius: 10px !important;
}
.company-settings .company-template-list {
  display: grid !important;
  gap: 12px !important;
  margin: 0 !important;
}
.company-settings .company-template-row {
  display: grid !important;
  grid-template-columns: minmax(180px, 1.45fr) minmax(110px, .75fr) minmax(110px, .75fr) minmax(120px, .75fr) minmax(85px, .55fr) minmax(90px, auto) auto auto !important;
  gap: 12px !important;
  align-items: end !important;
  padding: 14px !important;
  border: 1px solid #d8e4f2 !important;
  border-radius: 16px !important;
  background: #f8fbff !important;
}
.company-settings .company-template-row.company-template-new {
  margin-top: 16px !important;
  background: #fff !important;
  border-style: dashed !important;
}
.company-settings .company-template-row label {
  display: block !important;
  min-width: 0 !important;
  margin: 0 !important;
}
.company-settings .company-template-row input:not([type="checkbox"]),
.company-settings .company-template-row select,
.company-settings .company-template-row textarea {
  width: 100% !important;
  min-height: 40px !important;
}
.company-settings .company-template-row button {
  width: auto !important;
  min-width: 0 !important;
  min-height: 40px !important;
  padding: 9px 14px !important;
  border-radius: 10px !important;
  white-space: nowrap !important;
}
.company-settings .company-template-row .notice {
  align-self: center !important;
  margin: 0 !important;
  padding: 8px 10px !important;
  border-radius: 999px !important;
  background: #eef6ff !important;
  color: #4e6281 !important;
  text-align: center !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
}
.company-settings .inline-check,
.company-settings .template-active-check,
.company-settings label.inline-check.template-active-check {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  min-height: 40px !important;
  padding: 8px 10px !important;
  border: 1px solid #d8e4f2 !important;
  border-radius: 12px !important;
  background: #fff !important;
  color: #24354d !important;
  cursor: pointer !important;
  line-height: 1.1 !important;
}
.company-settings input[type="checkbox"] {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  max-width: 18px !important;
  max-height: 18px !important;
  margin: 0 !important;
  padding: 0 !important;
  flex: 0 0 18px !important;
  transform: none !important;
  accent-color: #111827 !important;
}
.company-settings .company-brand-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(240px, 1fr)) !important;
  gap: 16px !important;
}
.company-settings .company-brand-grid > div {
  padding: 14px !important;
  border: 1px solid #d8e4f2 !important;
  border-radius: 16px !important;
  background: #f8fbff !important;
}
.company-settings .company-brand-grid button {
  width: auto !important;
  margin-top: 10px !important;
  padding: 9px 14px !important;
  border-radius: 10px !important;
}
.company-settings .company-logo-preview {
  min-height: 86px !important;
  border-radius: 14px !important;
  background: #fff !important;
}
@media (max-width: 1400px) {
  .company-settings .company-template-row {
    grid-template-columns: repeat(4, minmax(160px, 1fr)) !important;
  }
  .company-settings .inline-check,
  .company-settings .template-active-check {
    justify-content: flex-start !important;
  }
}
@media (max-width: 900px) {
  .company-settings .company-inline-form,
  .company-settings .company-brand-grid,
  .company-settings .company-template-row {
    grid-template-columns: 1fr !important;
  }
  .company-settings .company-list {
    grid-template-columns: 1fr !important;
  }
}
/* HEVEXO HARD FIX 20260612 END */

/* HEVEXO FIX 20260612: Firmeneinstellungen Logo Preview Size */
.company-settings .company-brand-grid,
.company-settings-screen .company-brand-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.company-settings .company-brand-grid > div,
.company-settings-screen .company-brand-grid > div {
  min-width: 0;
  overflow: hidden;
}

.company-settings .company-logo-preview,
.company-settings-screen .company-logo-preview {
  height: 150px !important;
  max-height: 150px !important;
  min-height: 150px !important;
  width: 100%;
  box-sizing: border-box;
  padding: 14px 18px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  border: 1px solid var(--border, #d7e3f3);
  border-radius: 14px;
  background: #fff;
}

.company-settings .company-logo-preview img,
.company-settings-screen .company-logo-preview img {
  display: block !important;
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 116px !important;
  object-fit: contain !important;
}

.company-settings .company-brand-grid label,
.company-settings-screen .company-brand-grid label {
  margin-top: 8px;
}

@media (max-width: 900px) {
  .company-settings .company-brand-grid,
  .company-settings-screen .company-brand-grid {
    grid-template-columns: 1fr;
  }
  .company-settings .company-logo-preview,
  .company-settings-screen .company-logo-preview {
    height: 120px !important;
    min-height: 120px !important;
    max-height: 120px !important;
  }
  .company-settings .company-logo-preview img,
  .company-settings-screen .company-logo-preview img {
    max-height: 92px !important;
  }
}

/* HEVEXO FIX: Statusreport Checkboxen + Informationsauswahl 20260612 */
.status-report-settings-dialog input[type="checkbox"],
.status-report-settings-dialog .csv-field-option input[type="checkbox"],
.status-report-settings-dialog .employee-profile-field-option input[type="checkbox"],
.status-report-settings-dialog .status-report-switch input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  min-height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  flex: 0 0 16px !important;
  margin: 2px 8px 0 0 !important;
  padding: 0 !important;
  appearance: auto !important;
  -webkit-appearance: checkbox !important;
  transform: none !important;
}
.status-report-settings-dialog .status-report-switch,
.status-report-settings-dialog .csv-field-option,
.status-report-settings-dialog .employee-profile-field-option,
.status-report-settings-dialog .status-report-info-option {
  display: flex !important;
  align-items: flex-start !important;
  gap: 10px !important;
  min-height: auto !important;
  line-height: 1.25 !important;
}
.status-report-settings-dialog .employee-profile-field-option span,
.status-report-settings-dialog .status-report-info-option span {
  display: grid !important;
  gap: 3px !important;
}
.status-report-settings-dialog .employee-profile-field-option small,
.status-report-settings-dialog .status-report-info-option small {
  display: block !important;
  font-weight: 500 !important;
  color: #64748b !important;
}

/* HEVEXO FIX 20260612: Statusreport Informationsauswahl sichtbar + Checkbox normal */
.status-report-settings-dialog .status-report-info-option {
  display: flex !important;
  align-items: flex-start !important;
  gap: 10px !important;
  min-height: auto !important;
  padding: 8px 0 !important;
}
.status-report-settings-dialog input[type="checkbox"],
.status-report-settings-dialog .status-report-info-option input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  min-height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  flex: 0 0 16px !important;
  margin: 2px 8px 0 0 !important;
  padding: 0 !important;
  appearance: auto !important;
  -webkit-appearance: checkbox !important;
  transform: none !important;
}
.status-report-settings-dialog .status-report-info-option span {
  display: grid !important;
  gap: 3px !important;
}
.status-report-settings-dialog .status-report-info-option small {
  display: block !important;
  font-weight: 500 !important;
  color: #64748b !important;
}

/* HEVEXO FIX 20260612: Zeitstempel automatischer Statusreport-Versand */
.status-report-settings-dialog .status-report-last-sent {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  width: 100% !important;
  margin-top: 8px !important;
  padding: 10px 12px !important;
  border: 1px solid #d8e4f2 !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  color: #64748b !important;
  font-size: 0.9rem !important;
}
.status-report-settings-dialog .status-report-last-sent strong {
  color: #0f172a !important;
  font-weight: 800 !important;
}
@media (max-width: 700px) {
  .status-report-settings-dialog .status-report-last-sent {
    align-items: flex-start !important;
    flex-direction: column !important;
  }
}

/* HEVEXO GOOGLE CALENDAR SYNC 20260612 */
.google-calendar-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  margin: 14px 0;
  border: 1px solid rgba(var(--primary-rgb, 15, 118, 110), 0.22);
  border-radius: 16px;
  background: rgba(var(--primary-rgb, 15, 118, 110), 0.055);
}
.google-calendar-card-warning {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.08);
}
.google-calendar-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.google-calendar-main strong {
  font-size: 15px;
}
.google-calendar-main span {
  color: var(--muted, #64748b);
  font-size: 13px;
}
.google-calendar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.google-calendar-actions button.ghost {
  background: #fff;
  color: var(--text, #0f172a);
  border: 1px solid var(--border, #dbe3ef);
}
@media (max-width: 720px) {
  .google-calendar-card {
    align-items: stretch;
    flex-direction: column;
  }
  .google-calendar-actions {
    justify-content: flex-start;
  }
}

/* HEVEXO GOOGLE CALENDAR SYNC 20260612 */
.google-calendar-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  margin: 14px 0;
  border: 1px solid rgba(var(--primary-rgb, 15, 118, 110), 0.22);
  border-radius: 16px;
  background: rgba(var(--primary-rgb, 15, 118, 110), 0.055);
}
.google-calendar-card-warning {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.08);
}
.google-calendar-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.google-calendar-main strong {
  font-size: 15px;
}
.google-calendar-main span {
  color: var(--muted, #64748b);
  font-size: 13px;
}
.google-calendar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.google-calendar-actions button.ghost {
  background: #fff;
  color: var(--text, #0f172a);
  border: 1px solid var(--border, #dbe3ef);
}
@media (max-width: 720px) {
  .google-calendar-card {
    align-items: stretch;
    flex-direction: column;
  }
  .google-calendar-actions {
    justify-content: flex-start;
  }
}

/* Arbeitsunfall als Untergruppe innerhalb OPS */
.nav-sub-group {
  display: grid;
  gap: 4px;
}

.nav-sub.nested {
  margin: -2px 0 4px 18px;
  padding-left: 10px;
  border-left: 1px dashed #d5e5f6;
}

.nav-subitem-nested {
  min-height: 30px !important;
  padding: 6px 10px !important;
  font-size: 12.5px !important;
}

/* Arbeitsunfall Übersicht: Status und Aktionsleiste */
.actions.actions-wrap {
  flex-wrap: wrap;
  gap: 8px;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid var(--border);
  background: #f8fafc;
  color: var(--muted);
}
.status-pill.pending {
  background: #fff7ed;
  color: #9a3412;
  border-color: #fed7aa;
}

/* Hevexo Rollen-UI Cleanup */
.role-module-settings > h3 { margin-bottom: 6px; }
.role-permission-ui {
  display: grid;
  gap: 14px;
}
.role-permission-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(15, 23, 42, .10);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,250,252,.96));
  box-shadow: 0 14px 35px rgba(15, 23, 42, .06);
}
.role-permission-search {
  flex: 1;
  display: grid;
  gap: 6px;
  font-weight: 700;
  color: #172033;
}
.role-permission-search input {
  width: 100%;
  min-height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, .14);
  padding: 0 14px;
  background: #fff;
}
.role-permission-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.role-permission-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: .86rem;
}
.role-permission-legend .muted { color: #64748b; }
.role-permission-groups {
  display: grid;
  gap: 12px;
}
.role-permission-group {
  border: 1px solid rgba(15, 23, 42, .12);
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 14px 35px rgba(15, 23, 42, .055);
}
.role-permission-group.permission-group-hidden { display: none; }
.role-permission-group > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}
.role-permission-group > summary::-webkit-details-marker { display: none; }
.role-permission-group > summary strong {
  display: block;
  font-size: 1rem;
  color: #0f172a;
}
.role-permission-group > summary small {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-weight: 500;
}
.role-permission-group > summary em {
  white-space: nowrap;
  font-style: normal;
  font-weight: 800;
  color: var(--tenant-primary, #1f6feb);
  background: rgba(31, 111, 235, .08);
  padding: 6px 10px;
  border-radius: 999px;
}
.role-permission-group-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 18px 14px;
  border-bottom: 1px solid rgba(15, 23, 42, .08);
}
.role-permission-grid {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) repeat(var(--role-count), minmax(110px, 1fr));
  overflow-x: auto;
}
.role-permission-head,
.role-permission-name,
.role-permission-check {
  min-height: 48px;
  border-bottom: 1px solid rgba(15, 23, 42, .08);
  border-right: 1px solid rgba(15, 23, 42, .06);
}
.role-permission-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background: #f8fafc;
  color: #334155;
  font-weight: 800;
  text-align: center;
}
.role-permission-head-main {
  justify-content: flex-start;
  left: 0;
  z-index: 2;
}
.role-permission-name {
  position: sticky;
  left: 0;
  z-index: 1;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 10px 14px;
  background: #fff;
}
.role-permission-name strong {
  color: #0f172a;
  font-size: .94rem;
}
.role-permission-name span {
  color: #94a3b8;
  font-size: .76rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.role-permission-name.legacy-permission {
  background: #fffbeb;
}
.role-permission-name.legacy-permission strong::after {
  content: "Fallback";
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #fde68a;
  color: #92400e;
  font-size: .68rem;
  vertical-align: middle;
}
.role-permission-check {
  display: grid;
  place-items: center;
  background: #fff;
}
.role-permission-check input {
  width: 20px;
  height: 20px;
  accent-color: var(--tenant-primary, #1f6feb);
  cursor: pointer;
}
.permission-row-hidden { display: none !important; }

@media (max-width: 820px) {
  .role-permission-toolbar { align-items: stretch; flex-direction: column; }
  .role-permission-toolbar .actions { width: 100%; }
  .role-permission-toolbar .actions button { flex: 1; }
  .role-permission-grid { grid-template-columns: minmax(230px, 1.8fr) repeat(var(--role-count), minmax(96px, 1fr)); }
  .role-permission-group > summary { align-items: flex-start; flex-direction: column; }
}

/* Payroll / Steuerberater-Export Restore */
.payroll-readiness-screen,
.payroll-monthly-screen,
.payroll-settings-card { width: 100%; }
.payroll-readiness-summary,
.payroll-monthly-summary { align-items: stretch; }
.payroll-readiness-card .badge,
.payroll-monthly-screen .badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 700; background: #eef2ff; color: #334155; }
.payroll-readiness-card .badge.ok { background: #dcfce7; color: #166534; }
.payroll-readiness-card .badge.warn { background: #fef3c7; color: #92400e; }
.payroll-readiness-card .badge.danger { background: #fee2e2; color: #991b1b; }
.payroll-readiness-issues { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.payroll-readiness-issues li small { display: block; color: var(--muted, #64748b); margin-top: 2px; }
.payroll-readiness-table td,
.payroll-readiness-table th,
.payroll-monthly-table td,
.payroll-monthly-table th,
.payroll-settings-table td,
.payroll-settings-table th { vertical-align: top; }
.payroll-settings-grid label,
.payroll-settings-table label.inline-check { min-width: 0; }
.payroll-settings-table input,
.payroll-settings-table select { min-width: 90px; }
.payroll-settings-table input[type="number"] { max-width: 95px; }
.payroll-settings-card .section-head { gap: 12px; }
.payroll-export-status-card { border: 1px solid var(--border, #e2e8f0); border-radius: 16px; padding: 14px; background: #fff; }
.payroll-export-status-card.is-locked { border-color: #bbf7d0; background: #f0fdf4; }
.payroll-export-status-card.is-open { border-color: #fde68a; background: #fffbeb; }
.payroll-export-status-card strong { display: block; margin-bottom: 6px; }
@media (max-width: 900px) {
  .payroll-settings-table { min-width: 900px; }
  .payroll-readiness-table,
  .payroll-monthly-table { min-width: 980px; }
}

/* HEVEXO FIX 20260614: Aktuellen Tag in allen Planungskalendern deutlicher markieren */
.planning-calendar-day.today:not(.muted) {
  position: relative;
  border-color: #0b79e5 !important;
  background: linear-gradient(180deg, #eef7ff 0%, #ffffff 58%, #f8fbff 100%);
  box-shadow:
    0 0 0 3px rgba(11, 121, 229, 0.18),
    inset 0 0 0 2px rgba(11, 121, 229, 0.88),
    0 10px 24px rgba(11, 121, 229, 0.12);
}

.planning-calendar-day.today:not(.muted)::before {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: 0;
  height: 4px;
  border-radius: 0 0 999px 999px;
  background: #0b79e5;
}

.planning-calendar-day.today.weekend:not(.muted) {
  background: linear-gradient(180deg, #eef7ff 0%, #fffdf1 56%, #fff9db 100%);
}

.planning-calendar-day.today.holiday:not(.muted) {
  border-color: #0b79e5 !important;
  background: linear-gradient(180deg, #eef7ff 0%, #fff6cc 58%, #fff0b8 100%);
  box-shadow:
    0 0 0 3px rgba(11, 121, 229, 0.18),
    inset 0 0 0 2px rgba(11, 121, 229, 0.9),
    0 10px 24px rgba(11, 121, 229, 0.12);
}

.planning-calendar-day.today .planning-calendar-date > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #0b79e5;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(11, 121, 229, 0.22);
}

.planning-calendar-day.today .planning-calendar-date > span::after {
  content: "Heute";
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

@media (max-width: 760px) {
  .planning-calendar-day.today:not(.muted) {
    box-shadow:
      0 0 0 2px rgba(11, 121, 229, 0.2),
      inset 0 0 0 2px rgba(11, 121, 229, 0.9),
      0 8px 18px rgba(11, 121, 229, 0.1);
  }
}

/* Sidebar-Badges: Chat und Wunschfrei */
.nav-badge {
  margin-left: auto;
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}
.nav-badge.is-hidden {
  display: none !important;
}
.nav-subitem .nav-badge {
  min-width: 18px;
  height: 18px;
  font-size: 10px;
  padding: 0 5px;
}


/* OPS-Untergruppen: Schichtberichte / Arbeitsunfall einklappbar */
.nav-sub-parent-row {
  grid-template-columns: minmax(0, 1fr) 30px;
  gap: 4px;
}
.nav-sub-toggle {
  min-height: 30px !important;
  width: 30px !important;
  font-size: 12px !important;
}
.nav-sub-group.open > .nav-sub-parent-row .nav-sub-toggle {
  transform: rotate(180deg);
}
.nav-sub-group.collapsed > .nav-sub.nested {
  display: none !important;
}
.nav-sub-group.collapsed {
  gap: 0;
}


/* OPS-Untergruppen: Pfeilrichtung offen = nach unten */
.nav-group.open .nav-sub-toggle {
  transform: rotate(0deg) !important;
}
.nav-sub-group.open > .nav-sub-parent-row .nav-sub-toggle {
  transform: rotate(0deg) !important;
}
.nav-sub-group.collapsed > .nav-sub-parent-row .nav-sub-toggle {
  transform: rotate(-90deg) !important;
}


/* Hevexo Notification Center */
.notification-center-wrap { position: relative; display: inline-flex; align-items: center; }
.notification-center-toggle { position: relative; }
.notification-center-toggle [data-notification-count] {
  position: absolute; top: -6px; right: -7px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: #ef4444; color: #fff; font-size: 11px; line-height: 18px;
  font-weight: 800; box-shadow: 0 0 0 2px #fff;
}
.notification-center-panel {
  position: absolute; right: 0; top: calc(100% + 10px); width: min(420px, calc(100vw - 32px));
  background: #fff; border: 1px solid rgba(15, 23, 42, .12); border-radius: 18px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .18); z-index: 80; overflow: hidden;
}
.notification-center-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid rgba(15, 23, 42, .08); }
.notification-center-head button { border: 0; background: transparent; color: var(--primary, #2563eb); font-weight: 700; cursor: pointer; }
.notification-center-list { max-height: 460px; overflow: auto; }
.notification-center-item { width: 100%; display: flex; gap: 10px; padding: 13px 16px; border: 0; border-bottom: 1px solid rgba(15, 23, 42, .07); background: #fff; text-align: left; cursor: pointer; }
.notification-center-item:hover { background: rgba(37, 99, 235, .06); }
.notification-center-item.is-unread { background: rgba(37, 99, 235, .08); }
.notification-center-dot { width: 9px; height: 9px; border-radius: 99px; margin-top: 5px; background: transparent; flex: 0 0 auto; }
.notification-center-item.is-unread .notification-center-dot { background: #2563eb; }
.notification-center-body { display: grid; gap: 3px; min-width: 0; }
.notification-center-body strong { color: #0f172a; font-size: 14px; }
.notification-center-body span { color: #475569; font-size: 13px; line-height: 1.35; }
.notification-center-body small { color: #94a3b8; font-size: 12px; }
.notification-center-empty, .notification-center-loading { padding: 24px 16px; color: #64748b; text-align: center; }
@media (max-width: 720px) { .notification-center-panel { right: -72px; width: calc(100vw - 24px); } }


/* notification-bell-toggle-fix-v1 */
.notification-center-wrap { position: relative; z-index: 2000; }
.notification-center-panel { z-index: 3000; }
.notification-center-panel.is-open { display: block !important; }
.notification-center-panel[hidden] { display: none !important; }
.notification-center-toggle { pointer-events: auto; }
.notification-center-toggle [data-notification-count] { pointer-events: none; }


/* notification-center-stage4-v1 */
.notification-center-filters {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 10px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, .22);
}
.notification-filter-chip {
  border: 1px solid rgba(148, 163, 184, .28);
  background: #fff;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
}
.notification-filter-chip.active {
  background: #111827;
  color: #fff;
  border-color: #111827;
}
.notification-filter-chip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin-left: 4px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(148, 163, 184, .18);
  font-size: 11px;
}
.notification-filter-chip.active span { background: rgba(255,255,255,.2); }
.notification-date-group { padding: 4px 0; }
.notification-date-heading {
  padding: 9px 12px 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #64748b;
}
.notification-center-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.notification-center-meta em {
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  background: rgba(148, 163, 184, .14);
  border-radius: 999px;
  padding: 2px 7px;
}
.notification-center-item.is-priority .notification-center-meta em {
  background: rgba(239, 68, 68, .12);
  color: #991b1b;
}
.notification-center-item.is-priority {
  border-left: 3px solid rgba(239, 68, 68, .8);
}

/* Hevexo: News-Bilder im Webinterface */
.news-card.has-image { overflow: hidden; }
.news-card-content { min-width: 0; }
.news-image-button {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0 0 14px;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  overflow: hidden;
  border-radius: 12px;
}
.news-card-image {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  background: #eef3f9;
}
.news-image-preview-wrap {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--line, #d8e2ef);
  border-radius: 12px;
  background: #f8fbff;
}
.news-image-preview-wrap[hidden] { display: none !important; }
.news-image-preview {
  display: block;
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
}
.news-image-remove {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.news-image-lightbox {
  display: block;
  max-width: 100%;
  max-height: 70vh;
  margin: 0 auto;
  object-fit: contain;
  border-radius: 12px;
}

/* HEVEXO NEWS IMAGE CHECKBOX FIX */
.news-image-remove {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin-top: 10px;
  cursor: pointer;
  width: auto;
}
.news-image-remove input[type="checkbox"] {
  appearance: auto !important;
  -webkit-appearance: checkbox !important;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  max-width: 18px !important;
  max-height: 18px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: initial !important;
  border-radius: 3px !important;
  box-shadow: none !important;
  transform: none !important;
  flex: 0 0 18px;
}


.dashboard-customize-bar {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 12px;
}

.dashboard-widget-picker {
  display: grid;
  gap: 10px;
}

.dashboard-widget-picker label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line, #dbe5f4);
  border-radius: 12px;
  background: #fff;
}

.dashboard-widget-picker input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

/* Hevexo: Icon im Benutzer-Dropdown für Dashboard anpassen */
.account-menu-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-right: 10px;
  border-radius: 8px;
  background: #eef5ff;
  color: #0b3b8f;
  font-size: 14px;
  line-height: 1;
  flex: 0 0 auto;
}

/* Hevexo: Dashboard-anpassen im Benutzer-Dropdown an Icon-Abstände der anderen Einträge angleichen.
   Der Eintrag hat ein echtes .account-menu-icon; die globale ::before-Spalte darf dafür nicht zusätzlich Platz verbrauchen. */
.account-menu button:has(.account-menu-icon)::before,
.account-menu a:has(.account-menu-icon)::before,
.account-menu div:has(.account-menu-icon)::before {
  content: none !important;
  display: none !important;
  width: 0 !important;
  min-width: 0 !important;
  margin: 0 !important;
}

.account-menu button:has(.account-menu-icon),
.account-menu a:has(.account-menu-icon),
.account-menu div:has(.account-menu-icon) {
  gap: 10px !important;
}

.account-menu .account-menu-icon {
  width: 20px !important;
  min-width: 20px !important;
  height: 20px !important;
  margin-right: 0 !important;
  border-radius: 7px !important;
  font-size: 12px !important;
  flex: 0 0 20px !important;
}

/* Hevexo: biometrisches Passbild in Mitarbeiterdetails kompakt anzeigen */
.pass-photo-preview {
  width: min(220px, 100%);
  flex: 0 0 220px;
  align-self: flex-start;
}

.pass-photo-preview img {
  display: block;
  width: 100%;
  max-width: 220px;
  height: 280px;
  object-fit: cover;
  object-position: center top;
  border-radius: 14px;
}
