/**
 * Component Styles
 * Cards, KPIs, badges, buttons, tables, forms, tabs, filters,
 * workflow steps, alerts, release cards, comments, Power BI placeholder.
 */

/* =========================================================================
 * CARDS
 * ========================================================================= */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 14px;
}

.card-header {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: .85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-title svg {
  width: 15px;
  height: 15px;
  color: var(--mm-topas);
}

.card-body {
  padding: 14px 16px;
}

.card-body.no-pad {
  padding: 0;
}

.redmine-rendered-content img.redmine-inline-image {
  display: block;
  max-width: 100%;
  max-height: 420px;
  height: auto;
  margin: 8px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.redmine-rendered-content .redmine-attachment-link {
  font-weight: 600;
}

/* Markdown tables (GFM pipe tables) in rendered Redmine content */
.redmine-rendered-content table {
  border-collapse: collapse;
  margin: 8px 0;
  font-size: .85rem;
}

.redmine-rendered-content th,
.redmine-rendered-content td {
  border: 1px solid var(--border, #e0e0e0);
  padding: 4px 8px;
}

.redmine-rendered-content th {
  background: var(--surface-2, #f4f4f4);
  font-weight: 600;
}

/* Markdown table column alignment (from GFM delimiter row :--- / ---: / :---:) */
.md-align-left { text-align: left; }
.md-align-right { text-align: right; }
.md-align-center { text-align: center; }

/* =========================================================================
 * KPI CARDS
 * ========================================================================= */

.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
}

.kpi-card.navy::before { background: var(--mm-navy); }
.kpi-card.topas::before { background: var(--mm-topas); }
.kpi-card.smaragd::before { background: var(--mm-smaragd); }
.kpi-card.chartreuse::before { background: var(--mm-chartreuse); }
.kpi-card.kpi-review::before { background: #4A5568; }
.kpi-card.kpi-review { color: inherit; }
.kpi-card.kpi-review:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); transform: translateY(-1px); transition: all 0.15s ease; }
.kpi-card.kpi-card-disabled { opacity: 0.6; cursor: not-allowed; }
.kpi-card.kpi-card-disabled .kpi-value { color: var(--text-light); }

.kpi-label {
  font-size: .68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--text-secondary);
  margin-bottom: 3px;
}

.kpi-value {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.1;
}

.kpi-change {
  font-size: .65rem;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 3px;
}

.kpi-change.up { color: var(--color-success); }
.kpi-change.down { color: var(--color-danger); }

/* =========================================================================
 * BUTTONS
 * ========================================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 14px;
  font-size: .75rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
  white-space: nowrap;
}

.btn svg {
  width: 13px;
  height: 13px;
}

.btn-primary {
  background: var(--mm-navy);
  color: #fff;
}

.btn-primary:hover {
  background: #042744;
  transform: translateY(-1px);
}

.btn-topas {
  background: var(--mm-topas);
  color: #fff;
}

.btn-topas:hover {
  background: #007680;
}

.btn-success {
  background: var(--color-success);
  color: #fff;
}

.btn-danger {
  background: var(--color-danger);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--mm-navy);
  border: 1.5px solid var(--mm-navy);
}

.btn-outline:hover {
  background: rgba(3, 46, 82, .05);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 4px 7px;
}

.btn-ghost:hover {
  background: var(--mm-lichtgrau);
  color: var(--text);
}

.btn-sm {
  padding: 3px 8px;
  font-size: .68rem;
}

.btn-lg {
  padding: 10px 20px;
  font-size: .82rem;
}

.btn-chartreuse {
  background: var(--mm-chartreuse);
  color: var(--mm-navy);
  font-weight: 700;
}

.btn-chartreuse:hover {
  background: #8ed015;
}

/* =========================================================================
 * BADGES
 * ========================================================================= */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: .65rem;
  font-weight: 600;
}

.badge-success { background: var(--color-success-light); color: var(--color-success); }
.badge-warning { background: var(--color-warning-light); color: var(--color-warning); }
.badge-danger  { background: var(--color-danger-light);  color: var(--color-danger);  }
.badge-info    { background: var(--color-info-light);    color: var(--color-info);    }
.badge-neutral { background: var(--mm-lichtgrau);        color: var(--mm-fossil);     }
.badge-navy    { background: rgba(3, 46, 82, .08);      color: var(--mm-navy);       }

.badge-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.badge-dot.pulse {
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .3; }
}

/* =========================================================================
 * DATA TABLE
 * ========================================================================= */

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .75rem;
}

.data-table th {
  background: var(--mm-lichtgrau);
  padding: 8px 12px;
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 2px solid var(--border);
  font-size: .67rem;
  text-transform: uppercase;
  letter-spacing: .2px;
  white-space: nowrap;
}

.data-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table tr:hover td {
  background: var(--surface-hover);
}

.ticket-id {
  font-weight: 700;
  color: var(--mm-topas);
  cursor: pointer;
  text-decoration: none;
}

.ticket-id:hover {
  text-decoration: underline;
}

.ticket-id-disabled,
.ticket-id-disabled:hover {
  color: var(--text-light);
  cursor: default;
  text-decoration: none;
}

.ticket-pr {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  background: rgba(3, 46, 82, .05);
  color: var(--mm-navy);
  font-size: .67rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.ticket-pr:hover {
  background: rgba(3, 46, 82, .10);
}

.assignee {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.assignee-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--mm-petrol);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .5rem;
  font-weight: 700;
}

.inline-select {
  padding: 2px 5px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: .75rem;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
}

.inline-select:hover,
.inline-select:focus {
  border-color: var(--border-strong);
  background: var(--surface);
}

.pr-action-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 8px;
  font-size: .65rem;
  font-weight: 600;
}

.pr-action-badge.running { background: var(--color-warning-light); color: #f57f17; }
.pr-action-badge.success { background: var(--color-success-light); color: var(--color-success); }
.pr-action-badge.failed  { background: var(--color-danger-light); color: var(--color-danger); }

/* Clickable CI badge — works on <a> or <span> with onclick */
.ci-badge-link {
  text-decoration: none;
  cursor: pointer;
  transition: opacity .15s;
}

.ci-badge-link:hover {
  opacity: .7;
  text-decoration: none;
}

/* =========================================================================
 * FORMS
 * ========================================================================= */

.form-group {
  margin-bottom: 12px;
  text-align: left;
}

.form-label {
  display: block;
  font-size: .72rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: .3px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 9px 12px;
  font-size: .85rem;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
  font-family: inherit;
}

.form-textarea {
  resize: vertical;
  min-height: 70px;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--mm-topas);
  box-shadow: 0 0 0 3px rgba(0, 136, 146, .12);
}

/* =========================================================================
 * FILTER BAR
 * ========================================================================= */

.filter-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.filter-bar .form-input,
.filter-bar .form-select {
  width: auto;
  min-width: 150px;
  padding: 5px 9px;
  font-size: .75rem;
}

/* =========================================================================
 * ACTIVITIES FILTER (Planning -> Activities)
 * ========================================================================= */

.activities-filter {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 180px auto;
  gap: 1rem;
  align-items: flex-start;
}

.activities-filter .activities-load-wrap {
  padding-top: 1.5rem; /* align with bottom of inputs on desktop */
}

/* =========================================================================
 * DATA TABLE SCROLL WRAPPER
 * Used to wrap wide data tables so they become horizontally scrollable
 * on narrow viewports without breaking the surrounding layout.
 * ========================================================================= */

.data-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table-scroll > .data-table {
  min-width: 100%;
}

/* =========================================================================
 * TABS
 * ========================================================================= */

.tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 14px;
}

.tab-item {
  padding: 8px 16px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-family: inherit;
}

.tab-item:hover {
  color: var(--text);
}

.tab-item.active {
  color: var(--mm-topas);
  border-bottom-color: var(--mm-topas);
}

/* =========================================================================
 * WORKFLOW STEPS
 * ========================================================================= */

.workflow-steps {
  display: flex;
  gap: 3px;
  margin-bottom: 12px;
}

.workflow-step {
  flex: 1;
  padding: 8px 10px;
  background: var(--mm-lichtgrau);
  text-align: center;
  font-size: .7rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.workflow-step:first-child {
  border-radius: var(--radius) 0 0 var(--radius);
}

.workflow-step:last-child {
  border-radius: 0 var(--radius) var(--radius) 0;
}

.workflow-step.active {
  background: var(--mm-topas);
  color: #fff;
}

.workflow-step.done {
  background: var(--color-success);
  color: #fff;
}

/* =========================================================================
 * RELEASE CARDS
 * ========================================================================= */

.release-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin-bottom: 12px;
  overflow: hidden;
}

.release-header {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.release-header:hover {
  background: var(--surface-hover);
}

.release-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.release-version {
  font-size: .95rem;
  font-weight: 700;
  color: var(--mm-navy);
  font-family: 'Consolas', monospace;
}

.release-name {
  font-size: .78rem;
  color: var(--text-secondary);
}

.release-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.release-date {
  font-size: .72rem;
  color: var(--text-secondary);
}

.release-progress-bar {
  width: 90px;
  height: 5px;
  background: var(--mm-lichtgrau);
  border-radius: 3px;
  overflow: hidden;
}

.release-progress-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--gradient-primary);
}

.release-tickets {
  display: none;
}

.release-tickets.open {
  display: block;
}

.gradient-bar {
  height: 3px;
  background: var(--gradient-primary);
}

/* =========================================================================
 * ALERTS
 * ========================================================================= */

.alert {
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: .75rem;
  margin-bottom: 10px;
}

.alert-warning {
  background: var(--color-warning-light);
  color: var(--color-warning);
}

.alert-info {
  background: var(--color-info-light);
  color: var(--color-info);
}

/* =========================================================================
 * COMMENTS
 * ========================================================================= */

.comment-box {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px;
  margin-bottom: 7px;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 3px;
}

.comment-author {
  font-weight: 600;
  font-size: .75rem;
}

.comment-date {
  font-size: .65rem;
  color: var(--text-light);
}

.comment-text {
  font-size: .75rem;
  color: var(--text-secondary);
}

/* =========================================================================
 * TOKEN STATUS
 * ========================================================================= */

.token-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .72rem;
  margin-top: 3px;
}

.token-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.token-dot.ok   { background: var(--color-success); }
.token-dot.bad  { background: var(--color-danger);  }
.token-dot.none { background: var(--mm-grau);        }

/* =========================================================================
 * POWER BI PLACEHOLDER
 * ========================================================================= */

.powerbi-placeholder {
  width: 100%;
  min-height: 420px;
  background: var(--surface);
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  gap: 8px;
}

.powerbi-placeholder svg {
  width: 40px;
  height: 40px;
  color: var(--mm-topas);
}

/* =============================================================================
   Project Classification — Kanban Board with Sidebar Layout
   ============================================================================= */

/* Wrapper: sidebar (left) + board (right) side by side */
.classification-wrapper {
  display: flex;
  gap: 16px;
  height: calc(100vh - 160px);
  min-height: 500px;
}

/* Left sidebar — scrollable project list */
.classification-sidebar {
  width: 260px;
  min-width: 220px;
  max-width: 300px;
  flex-shrink: 0;
  background: var(--card-bg, #fff);
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.classification-sidebar-header {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color, #e0e0e0);
  flex-shrink: 0;
}

.classification-sidebar-header h3 {
  margin: 0 0 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary, #6c757d);
}

.classification-sidebar-search {
  padding: 6px 10px !important;
  font-size: 0.78rem !important;
}

.classification-sidebar-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.classification-sidebar-list.drag-over {
  background: rgba(0,155,141,0.04);
}

.classification-sidebar-count {
  padding: 6px 12px;
  border-top: 1px solid var(--border-color, #e0e0e0);
  font-size: 0.68rem;
  color: var(--text-secondary, #adb5bd);
  text-align: center;
  flex-shrink: 0;
}

/* Board wrapper: contains global search + columns area */
.classification-board-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

/* Global search bar above the board */
.classification-global-search {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.classification-global-search-input {
  flex: 1;
  max-width: 400px;
  padding: 7px 12px !important;
  font-size: 0.82rem !important;
  border-radius: 6px;
}

.classification-global-search-count {
  font-size: 0.72rem;
  color: var(--text-secondary, #6c757d);
  white-space: nowrap;
}

/* Search highlight / dim states */
.classification-card.search-dimmed {
  opacity: 0.15;
  transition: opacity 0.25s ease;
}

.classification-card.search-highlight {
  box-shadow: 0 0 0 3px var(--mm-topas, #009B8D), 0 2px 12px rgba(0,155,141,0.25);
  border-color: var(--mm-topas, #009B8D);
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
  z-index: 1;
  position: relative;
}

/* Board layout: horizontal scroll of columns, fills remaining space */
.classification-board {
  display: flex;
  gap: 12px;
  flex: 1;
  overflow-x: auto;
  align-items: stretch;
  padding-bottom: 4px;
}

/* Single priority column */
.classification-column {
  flex: 1 1 200px;
  min-width: 200px;
  max-width: 340px;
  background: var(--card-bg, #fff);
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s;
}

.classification-column.drag-over {
  box-shadow: 0 0 0 2px var(--mm-topas, #009B8D), 0 4px 12px rgba(0,155,141,0.15);
}

/* Column header — sticky at top */
.classification-column-header {
  padding: 10px 14px;
  border-radius: 8px 8px 0 0;
  color: #fff;
  font-weight: 600;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  position: sticky;
  top: 0;
  z-index: 2;
}

.classification-column-header .column-count {
  background: rgba(255,255,255,0.25);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 700;
}

/* Column body — cards container, scrollable */
.classification-column-body {
  padding: 8px;
  flex: 1;
  min-height: 60px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}

.classification-column-body.drag-over {
  background: rgba(0,155,141,0.06);
  border-radius: 0 0 8px 8px;
}

/* Project card */
.classification-card {
  background: var(--card-bg, #fff);
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 6px;
  padding: 8px 10px;
  cursor: grab;
  transition: box-shadow 0.15s, opacity 0.15s, transform 0.15s;
  user-select: none;
}

.classification-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.classification-card.dragging {
  opacity: 0.4;
  transform: scale(0.97);
}

.classification-card.selected {
  outline: 2px solid var(--mm-topas, #009B8D);
  outline-offset: -2px;
  box-shadow: 0 0 0 3px rgba(0,155,141,0.18);
}

/* Bestandsprojekt toggle on cards */
.classification-card-bestand {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-secondary, #6b6b78);
  cursor: pointer;
  user-select: none;
}
.classification-card-bestand input[type="checkbox"] {
  width: 13px;
  height: 13px;
  cursor: pointer;
  margin: 0;
}
.classification-card.is-bestandsprojekt {
  background: linear-gradient(90deg, rgba(255,243,224,0.55), transparent 60%);
  border-left: 3px solid #b26a00;
}
.classification-card.is-bestandsprojekt .classification-card-bestand {
  color: #b26a00;
  font-weight: 600;
}

/* Card in sidebar — compact style */
.classification-sidebar-list .classification-card {
  padding: 6px 10px;
}

.classification-sidebar-list .classification-card-name {
  font-size: 0.78rem;
  margin-bottom: 0;
}

.classification-card-name {
  font-weight: 600;
  font-size: 0.82rem;
  margin-bottom: 4px;
  color: var(--text-primary, #1a1a2e);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.classification-card-name .card-edit-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary, #6c757d);
  padding: 2px 4px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s;
  flex-shrink: 0;
}

.classification-card:hover .card-edit-btn {
  opacity: 1;
}

.classification-card-name .card-edit-btn:hover {
  color: var(--mm-topas, #009B8D);
  background: var(--hover-bg, rgba(0,155,141,0.08));
}

/* Collapsible area toggle button */
.classification-card-areas-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.65rem;
  color: var(--text-secondary, #adb5bd);
  padding: 1px 4px;
  border-radius: 3px;
  transition: color 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.classification-card-areas-toggle:hover {
  color: var(--mm-topas, #009B8D);
}

/* Area sections within a card */
.classification-card-areas {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
}

.classification-card-areas.collapsed {
  display: none;
}

.classification-card-area {
  font-size: 0.72rem;
  padding: 3px 6px;
  border-radius: 3px;
  display: flex;
  flex-direction: column;
  gap: 0;
  line-height: 1.3;
}

.classification-card-area .area-label {
  color: var(--text-secondary, #6c757d);
  font-size: 0.65rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.classification-card-area .area-users {
  color: var(--text-primary, #1a1a2e);
  font-weight: 600;
  font-size: 0.75rem;
  padding-left: 2px;
}

.classification-card-area .area-users .user-inactive {
  text-decoration: line-through;
  opacity: 0.5;
}

/* Highlight levels for areas */
.classification-card-area.highlight-1 {
  border-left: 3px solid var(--mm-topas, #009B8D);
  background: rgba(0,155,141,0.06);
  font-weight: 600;
}

.classification-card-area.highlight-1 .area-label {
  color: var(--mm-topas, #009B8D);
  font-weight: 700;
}

.classification-card-area.highlight-2 {
  border-left: 3px solid #fd7e14;
  background: rgba(253,126,20,0.05);
  font-weight: 500;
}

.classification-card-area.highlight-2 .area-label {
  color: #e67312;
  font-weight: 600;
}

.classification-card-area.highlight-3 {
  border-left: 2px solid var(--border-color, #dee2e6);
  background: rgba(0,0,0,0.015);
}

.classification-card-area.highlight-4 {
  /* Normal/standard — no special styling */
  padding-left: 9px;
}

/* Priority color classes (for column headers and badges) */
.priority-red { background: #dc3545; }
.priority-orange { background: #fd7e14; }
.priority-grey { background: #6c757d; }
.priority-green { background: #28a745; }
.priority-blue { background: #007bff; }
.priority-purple { background: #6f42c1; }
.priority-yellow { background: #ffc107; color: var(--text); }

/* Flashing/pulsing effects */
.priority-flash-red {
  background: #dc3545;
  animation: priorityFlash 1.5s ease-in-out infinite;
}

.priority-flash-orange {
  background: #fd7e14;
  animation: priorityFlash 1.5s ease-in-out infinite;
}

@keyframes priorityFlash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}

/* Responsive: stack on small screens */

/* Priority badge (for dashboard widget and small displays) */
.priority-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
}

.priority-badge.priority-flash-red,
.priority-badge.priority-flash-orange {
  animation: priorityFlash 1.5s ease-in-out infinite;
}

/* Dashboard classification widget (read-only) */
.classification-widget {
  background: var(--card-bg, #fff);
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 8px;
  padding: 16px;
}

.classification-widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.classification-widget-header h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.classification-widget-areas {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.classification-widget-area {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 0.82rem;
  padding: 4px 8px;
  border-radius: 4px;
}

.classification-widget-area .widget-area-label {
  color: var(--text-secondary, #6c757d);
  min-width: 180px;
}

.classification-widget-area .widget-area-users {
  color: var(--text-primary, #1a1a2e);
  font-weight: 600;
}

/* Widget highlight levels (reuse card highlight styles) */
.classification-widget-area.highlight-1 {
  border-left: 3px solid var(--mm-topas, #009B8D);
  background: rgba(0,155,141,0.06);
}
.classification-widget-area.highlight-1 .widget-area-label {
  color: var(--mm-topas, #009B8D);
  font-weight: 700;
}
.classification-widget-area.highlight-2 {
  border-left: 3px solid #fd7e14;
  background: rgba(253,126,20,0.05);
}
.classification-widget-area.highlight-2 .widget-area-label {
  color: #e67312;
  font-weight: 600;
}
.classification-widget-area.highlight-3 {
  border-left: 2px solid var(--border-color, #dee2e6);
  background: rgba(0,0,0,0.015);
}
.classification-widget-area.highlight-4 {
  padding-left: 11px;
}

/* Settings modals for priorities and areas */
.classification-settings-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 12px 0;
}

.classification-settings-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--card-bg, #f8f9fa);
  border: 1px solid var(--border-color, #dee2e6);
  border-radius: 6px;
}

.classification-settings-item .drag-handle {
  cursor: grab;
  color: var(--text-secondary, #adb5bd);
  padding: 0 4px;
  font-size: 1.1rem;
  line-height: 1;
}

.classification-settings-item[draggable="true"] {
  cursor: grab;
}

.classification-settings-item[draggable="true"]:active {
  cursor: grabbing;
}

.classification-settings-item .item-name {
  flex: 1;
  font-weight: 500;
}

.classification-settings-item .item-preview {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 4px;
}

.classification-settings-item .item-actions {
  display: flex;
  gap: 4px;
}

.classification-settings-item .item-actions button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-secondary, #6c757d);
  font-size: 0.82rem;
}

.classification-settings-item .item-actions button:hover {
  background: var(--hover-bg, rgba(0,0,0,0.05));
  color: var(--text-primary, #1a1a2e);
}

.classification-settings-item .item-actions button.btn-delete:hover {
  color: #dc3545;
  background: rgba(220,53,69,0.08);
}

/* Responsive: stack wrapper vertically on small screens */
@media (max-width: 900px) {
  .classification-wrapper {
    flex-direction: column;
    height: auto;
  }
  .classification-sidebar {
    width: 100%;
    max-width: 100%;
    max-height: 250px;
  }
  .classification-global-search-input {
    max-width: 100%;
  }
  .classification-board {
    flex-direction: column;
    overflow-x: visible;
  }
  .classification-column {
    max-width: 100%;
    min-width: 0;
  }
  .classification-widget-area .widget-area-label {
    min-width: 120px;
  }
}

/* =============================================================================
   Project Overview — Accordion List (read-only)
   ============================================================================= */

/* Accordion chevron rotation */
.accordion-chevron {
  transition: transform 0.2s ease;
  display: inline-block;
  flex-shrink: 0;
}

.accordion-chevron.rotated {
  transform: rotate(90deg);
}

/* Accordion header button */
.project-overview-accordion-header {
  width: 100%;
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: background 0.15s;
  border-radius: 8px;
}

.project-overview-accordion-header:hover {
  background: var(--surface-hover, rgba(0, 0, 0, 0.02));
}

.project-overview-accordion-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Accordion content */
.project-overview-accordion-content {
  border-top: 1px solid var(--border, #e0e0e0);
}

/* Project row in accordion */
.project-overview-row {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border, #e0e0e0);
  transition: background 0.1s;
}

.project-overview-row:last-child {
  border-bottom: none;
}

.project-overview-row:hover {
  background: var(--surface-hover, rgba(0, 0, 0, 0.02));
}

.project-overview-row-header {
  display: flex;
  align-items: center;
  margin-bottom: 4px;
}

.project-overview-name {
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--mm-topas, #009B8D);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: opacity 0.15s;
}

.project-overview-name:hover {
  opacity: 0.7;
}

/* Area badges within a project row */
.project-overview-areas {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 4px;
}

.project-overview-area {
  font-size: 0.72rem;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.project-overview-area-label {
  color: var(--text-secondary, #6c757d);
  font-weight: 500;
}

.project-overview-area-users {
  color: var(--text, #1a1a2e);
  font-weight: 600;
}

/* ============================================
   SUPPORT GROUP ASSIGNMENT PAGE
   ============================================ */

/* Back link */
.sga-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  text-decoration: none;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  transition: opacity 0.2s;
}
.sga-back-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* Main wrapper — two-panel layout */
.sga-wrapper {
  display: flex;
  gap: 1.5rem;
  height: calc(100vh - 200px);
  min-height: 400px;
}

/* Left panel: Project Pool */
.sga-project-pool {
  width: 320px;
  min-width: 280px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.sga-pool-header {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sga-pool-count {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 400;
}

.sga-search-wrapper {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.sga-search-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.875rem;
  background: var(--bg-main);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s;
}
.sga-search-input:focus {
  border-color: var(--primary);
}

.sga-project-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
}

/* Individual project card in pool */
.sga-project-card {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.25rem;
  border: 2px solid transparent;
  border-radius: 6px;
  cursor: grab;
  font-size: 0.85rem;
  color: var(--text-primary);
  background: var(--bg-main);
  transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
  user-select: none;
}
.sga-project-card:hover {
  background: var(--bg-hover, rgba(0,0,0,0.03));
  border-color: var(--border-color);
}
.sga-project-card.sga-selected {
  border-color: var(--primary);
  background: rgba(var(--primary-rgb, 59, 130, 246), 0.08);
  box-shadow: 0 0 0 1px rgba(var(--primary-rgb, 59, 130, 246), 0.2);
}
.sga-project-card:active {
  cursor: grabbing;
}

.sga-project-checkbox {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

.sga-project-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sga-assignment-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 5px;
  background: var(--primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 10px;
}

/* Drag ghost */
.sga-drag-ghost {
  position: fixed;
  top: -1000px;
  left: -1000px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--primary);
  color: #fff;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 9999;
  pointer-events: none;
}

/* Right panel: Group Columns */
.sga-group-columns {
  flex: 1;
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

/* Individual group column */
.sga-group-column {
  min-width: 260px;
  width: 280px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.sga-group-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sga-group-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sga-group-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.sga-member-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: var(--bg-main);
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
}

.sga-threshold-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  font-weight: 500;
}
.sga-threshold-badge[data-threshold="Niedrig"] { background: #d1fae5; color: #065f46; }
.sga-threshold-badge[data-threshold="Normal"] { background: #dbeafe; color: #1e40af; }
.sga-threshold-badge[data-threshold="Hoch"] { background: #fef3c7; color: #92400e; }
.sga-threshold-badge[data-threshold="Dringend"] { background: #fed7aa; color: #9a3412; }
.sga-threshold-badge[data-threshold="Notfall"] { background: #fecaca; color: #991b1b; }

.sga-project-count {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-left: auto;
}

/* Drop zone inside each group column */
.sga-group-dropzone {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
  min-height: 80px;
  transition: background-color 0.2s;
}
.sga-group-dropzone.sga-drop-hover {
  background-color: rgba(var(--primary-rgb, 59, 130, 246), 0.08);
}

/* Pool drop zone highlight for remove drag-back */
.sga-project-list.sga-drop-hover {
  background-color: rgba(239, 68, 68, 0.06);
}

/* Assigned project card inside a group column */
.sga-assigned-card {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem;
  margin-bottom: 0.25rem;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  font-size: 0.82rem;
  color: var(--text-primary);
  cursor: grab;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.sga-assigned-card:hover {
  border-color: var(--primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.sga-assigned-card:active {
  cursor: grabbing;
}

.sga-assigned-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sga-remove-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 4px;
  font-size: 1rem;
  line-height: 1;
  transition: background-color 0.15s, color 0.15s;
}
.sga-remove-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

/* Empty states */
.sga-empty-state {
  padding: 1.5rem 1rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-style: italic;
}

.sga-no-results {
  padding: 1rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* Selection count bar */
.sga-selection-bar {
  padding: 0.5rem 1rem;
  background: var(--primary);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}
.sga-selection-bar button {
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.78rem;
}
.sga-selection-bar button:hover {
  background: rgba(255,255,255,0.3);
}

/* No groups state */
.sga-no-groups {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  color: var(--text-secondary);
  font-size: 1rem;
  font-style: italic;
  padding: 2rem;
}

/* Redmine sync status indicator */
.sga-sync-status {
  font-size: 0.78rem;
  padding: 0.3rem 0.75rem;
  border-radius: 6px;
  font-weight: 500;
  white-space: nowrap;
}
.sga-sync-status.sga-sync-running {
  color: #92400e;
  background: #fef3c7;
}
.sga-sync-status.sga-sync-done {
  color: #065f46;
  background: #d1fae5;
}
.sga-sync-status.sga-sync-error {
  color: #991b1b;
  background: #fecaca;
}

/* Responsive: stack on smaller screens */
@media (max-width: 900px) {
  .sga-wrapper {
    flex-direction: column;
    height: auto;
  }
  .sga-project-pool {
    width: 100%;
    max-height: 300px;
  }
  .sga-group-columns {
    flex-direction: column;
  }
  .sga-group-column {
    width: 100%;
    min-width: auto;
  }
}


/* =========================================================================
   Admin notification deep-link highlight � applied for ~4s when an admin
   clicks a bell entry that deep-links to a specific setting input.
   ========================================================================= */
.setting-highlight {
  outline: 3px solid var(--mm-zitronengelb, #ffc107) !important;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(255, 193, 7, 0.18) !important;
  transition: outline-color 0.3s ease, box-shadow 0.3s ease;
  border-radius: 6px;
}

/* Notification panel hover feedback for individual items */
#notificationDropdown .notif-item:hover {
  background: rgba(0, 0, 0, 0.04);
}

/* =========================================================================
 * THEME TOGGLE (Light/Dark Switch � used on the Profile page)
 * ========================================================================= */
.theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.theme-toggle input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.theme-toggle-slider {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
  background: var(--mm-grau);
  border-radius: 14px;
  transition: background var(--transition);
  flex: 0 0 auto;
}
.theme-toggle-slider::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  background: var(--surface);
  border-radius: 50%;
  box-shadow: var(--shadow);
  transition: transform var(--transition);
}
.theme-toggle input:checked + .theme-toggle-slider {
  background: var(--mm-topas);
}
.theme-toggle input:checked + .theme-toggle-slider::before {
  transform: translateX(24px);
}
.theme-toggle input:focus-visible + .theme-toggle-slider {
  outline: 2px solid var(--mm-topas);
  outline-offset: 2px;
}
.theme-toggle-label {
  font-size: .82rem;
  color: var(--text);
}
.theme-toggle-label-light { display: inline; }
.theme-toggle-label-dark { display: none; }
html[data-theme="dark"] .theme-toggle-label-light { display: none; }
html[data-theme="dark"] .theme-toggle-label-dark { display: inline; }

/* =========================================================================
 * Dark-Mode-Overrides � Status-Pillen (Light-Pastel ? Dark-Tint)
 * ========================================================================= */
html[data-theme="dark"] .pr-action-badge.running { background: #3d2e0d; color: #fde68a; }

html[data-theme="dark"] .sga-threshold-badge[data-threshold="Niedrig"]  { background: #0d4a2a; color: #6ee7b7; }
html[data-theme="dark"] .sga-threshold-badge[data-threshold="Normal"]   { background: #0d2e4d; color: #93c5fd; }
html[data-theme="dark"] .sga-threshold-badge[data-threshold="Hoch"]     { background: #3d2e0d; color: #fde68a; }
html[data-theme="dark"] .sga-threshold-badge[data-threshold="Dringend"] { background: #3d2010; color: #fdba74; }
html[data-theme="dark"] .sga-threshold-badge[data-threshold="Notfall"]  { background: #3d1518; color: #fca5a5; }

html[data-theme="dark"] .sga-sync-status.sga-sync-running { background: #3d2e0d; color: #fde68a; }
html[data-theme="dark"] .sga-sync-status.sga-sync-done    { background: #0d4a2a; color: #6ee7b7; }
html[data-theme="dark"] .sga-sync-status.sga-sync-error   { background: #3d1518; color: #fca5a5; }

/* =========================================================================
 * Header User-Dropdown � Theme Toggle Row
 * Klickbarer Eintrag zwischen Sprachflaggen und Profil-Link.
 * Zeigt im Light-Mode "?? Dunkler Modus" (= Aktion: switch to dark)
 * und im Dark-Mode "?? Heller Modus" (= Aktion: switch to light).
 * ========================================================================= */
.header-theme-toggle:hover { background: var(--surface-hover); }
.header-theme-toggle-label-light,
.header-theme-toggle-label-dark { flex: 1; }
/* Default (light mode): show the "switch to dark" label, hide the other. */
.header-theme-toggle-label-light { display: none; }
.header-theme-toggle-label-dark { display: inline; }
/* In dark mode, swap labels � show "switch to light". */
html[data-theme="dark"] .header-theme-toggle-label-light { display: inline; }
html[data-theme="dark"] .header-theme-toggle-label-dark { display: none; }

/* Slider/pill rechts neben dem Label, visualisiert aktuellen State. */
.header-theme-toggle-switch {
  position: relative;
  display: inline-block;
  width: 32px;
  height: 18px;
  border-radius: 9px;
  background: var(--mm-lichtgrau);
  border: 1px solid var(--border);
  flex-shrink: 0;
  transition: background-color .2s ease;
}
.header-theme-toggle-switch::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 1px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--mm-card);
  box-shadow: 0 1px 2px rgba(0,0,0,.25);
  transition: transform .2s ease, background-color .2s ease;
}
html[data-theme="dark"] .header-theme-toggle-switch {
  background: var(--mm-petrol);
  border-color: var(--mm-topas);
}
html[data-theme="dark"] .header-theme-toggle-switch::after {
  transform: translateX(14px);
  background: var(--mm-topas);
}

/* =============================================================================
   Dashboard async-hydration skeleton (plan PR 3 / C1)
   Themable shimmer for skeleton tiles emitted by DashboardPage.tsx.
   ============================================================================= */
.skeleton {
  position: relative;
  overflow: hidden;
  pointer-events: none;
}
.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--skeleton-shimmer, rgba(255, 255, 255, 0.45)) 50%,
    transparent 100%
  );
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}
@keyframes skeleton-shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
html[data-theme="dark"] .skeleton::after {
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--skeleton-shimmer, rgba(255, 255, 255, 0.08)) 50%,
    transparent 100%
  );
}
.tile-error {
  position: relative;
}
.tile-error::before {
  content: '\26A0';
  position: absolute;
  top: 6px;
  right: 8px;
  color: var(--color-warning, #e2a503);
  font-size: 0.85rem;
  opacity: 0.85;
  pointer-events: none;
}
.dashboard-loading {
  margin: 0;
}

/* ===========================================================================
   Push Notifications � pulsierender gelber Glow um die Header-Glocke,
   solange mindestens eine aktive Notification mit category='wartung' laeuft.
   =========================================================================== */

.header-notification.bell-pulse-warning {
  position: relative;
}

.header-notification.bell-pulse-warning::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  pointer-events: none;
  box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7);
  animation: bell-pulse-warning-anim 1.6s ease-out infinite;
}

.header-notification.bell-pulse-warning svg {
  color: var(--color-warning, #ffc107);
}

@keyframes bell-pulse-warning-anim {
  0%   { box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.55); }
  70%  { box-shadow: 0 0 0 12px rgba(255, 193, 7, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 193, 7, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .header-notification.bell-pulse-warning::after {
    animation: none;
    box-shadow: 0 0 0 4px rgba(255, 193, 7, 0.6);
  }
}

/* ============ Geschaeftsvorfaelle (Beraterdashboard) - Phase F ============ */


/* Inline mirror of the bc-* + nav-group classes from portal.css so the
   internal beraterdashboard layout (which does not load portal.css) can
   render the same overview UI. */
.bc-info-list { margin: 8px 0 0; padding-left: 0; list-style: none; }
.bc-info-list li { margin: 6px 0; display: flex; gap: 8px; align-items: flex-start; }
.bc-info-check {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; background: var(--color-success, #00b677);
  color: #fff; border-radius: 50%; flex-shrink: 0; margin-top: 1px;
}
.bc-info-check svg { width: 11px; height: 11px; }

.bc-section {
  background: var(--surface, #fff); border: 1px solid var(--border, #e8e8ec);
  border-radius: 8px; box-shadow: var(--shadow, 0 2px 8px rgba(3,46,82,.06));
  margin-bottom: 14px; overflow: hidden;
}
.bc-section-head {
  padding: 10px 14px; display: flex; align-items: center; gap: 10px;
  cursor: pointer; border-bottom: 1px solid var(--border, #e8e8ec);
  background: var(--surface-hover, #fafbfc); user-select: none;
}
.bc-section[data-collapsed="1"] .bc-section-head { border-bottom: none; }
.bc-section-chev {
  width: 16px; height: 16px; color: var(--text-secondary, #6b6b78);
  transition: transform .15s; flex-shrink: 0;
}
.bc-section[data-collapsed="1"] .bc-section-chev { transform: rotate(-90deg); }
.bc-section-title { font-size: .88rem; font-weight: 700; color: var(--mm-navy, #032e52); margin: 0; }
.bc-section-meta { margin-left: auto; font-size: .7rem; color: var(--text-light, #b0afb0); }
.bc-section-body { padding: 12px 14px; display: block; }
.bc-section[data-collapsed="1"] .bc-section-body { display: none; }

.bc-tiles-row {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 0;
  border: 1px solid var(--border, #e8e8ec); border-radius: 6px; overflow: hidden;
}
.bc-tile { padding: 0; text-align: center; }
.bc-tile-label {
  padding: 14px 8px; font-size: .72rem; font-weight: 700; color: #fff; line-height: 1.2;
}
.bc-tile-value {
  font-size: 1.7rem; font-weight: 700; color: var(--mm-navy, #032e52);
  background: var(--mm-card); padding: 12px 0; border-top: 1px solid var(--border, #e8e8ec);
}
.bc-tile.bc-t-navy .bc-tile-label { background: var(--mm-navy, #032e52); }
.bc-tile.bc-t-success .bc-tile-label { background: var(--color-success, #00b677); }
.bc-tile.bc-t-grey .bc-tile-label { background: var(--mm-fossil, #6b6b78); }
.bc-tile.bc-t-danger .bc-tile-label { background: var(--color-danger, #d13438); }
.bc-tile.bc-t-topas .bc-tile-label { background: var(--mm-topas, #008892); }

.bc-dept-table {
  width: 100%; border-collapse: collapse; font-size: .8rem; background: var(--mm-card);
  border: 1px solid var(--border, #e8e8ec); border-radius: 6px; overflow: hidden;
}
.bc-dept-table thead th {
  background: var(--mm-topas, #008892); color: #fff; padding: 8px 10px;
  text-align: left; font-weight: 700; font-size: .75rem; letter-spacing: .2px;
}
.bc-dept-table tbody td { padding: 8px 10px; border-top: 1px solid var(--border, #e8e8ec); }
.bc-dept-table tbody tr.bc-dept-row { cursor: pointer; }
.bc-dept-table tbody tr.bc-dept-row:hover { background: var(--surface-hover, #fafbfc); }
.bc-dept-table .bc-num { text-align: center; font-weight: 600; }
.bc-dept-table .bc-pct { text-align: center; }
.bc-dept-table tr.bc-no-dept td { color: var(--text-light, #b0afb0); font-style: italic; }
.bc-pill-mm { display: inline-block; padding: 2px 8px; border-radius: 10px;
  font-size: .66rem; font-weight: 700; background: #e6f0f9; color: var(--mm-petrol, #00547d); }
.bc-pill-kunde { display: inline-block; padding: 2px 8px; border-radius: 10px;
  font-size: .66rem; font-weight: 700; background: #fff3e6; color: var(--color-warning, #f5a623); }
.bc-bar {
  display: inline-block; width: 60px; height: 6px;
  background: var(--border, #e8e8ec); border-radius: 4px;
  vertical-align: middle; margin-right: 6px; overflow: hidden;
}
.bc-bar > span { display: block; height: 100%; background: var(--color-success, #00b677); }

.bc-detail-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.bc-detail-back { font-size: .74rem; color: var(--mm-petrol, #00547d); cursor: pointer; text-decoration: none; font-weight: 600; }
.bc-detail-back:hover { text-decoration: underline; }
.bc-detail-title { font-size: 1.1rem; font-weight: 700; color: var(--mm-navy, #032e52); margin: 0; }
.bc-kpi-grid { display: grid; gap: 8px; margin-bottom: 14px; }
.bc-kpi-grid.bc-kpi-grid-5 { grid-template-columns: repeat(5, 1fr); }
.bc-kpi-grid.bc-kpi-grid-7 { grid-template-columns: repeat(7, 1fr); }
.bc-kpi {
  background: var(--mm-card); border: 1px solid var(--border, #e8e8ec); border-radius: 6px;
  overflow: hidden; text-align: center;
}
.bc-kpi-label {
  padding: 8px 6px; font-size: .62rem; font-weight: 700; color: #fff;
  text-transform: uppercase; letter-spacing: .3px; line-height: 1.2;
  min-height: 42px; display: flex; align-items: center; justify-content: center;
}
.bc-kpi-value { padding: 10px 6px; font-size: 1.4rem; font-weight: 700; color: var(--mm-navy, #032e52); }
.bc-kpi.bc-k-navy .bc-kpi-label { background: var(--mm-navy, #032e52); }
.bc-kpi.bc-k-petrol .bc-kpi-label { background: var(--mm-petrol, #00547d); }
.bc-kpi.bc-k-topas .bc-kpi-label { background: var(--mm-topas, #008892); }
.bc-kpi.bc-k-grey .bc-kpi-label { background: var(--mm-fossil, #6b6b78); }
.bc-kpi.bc-k-info .bc-kpi-label { background: var(--color-info, #008892); }
.bc-kpi.bc-k-warn .bc-kpi-label { background: var(--color-warning, #f5a623); }
.bc-kpi.bc-k-success .bc-kpi-label { background: var(--color-success, #00b677); }

/* aufklappbare Sidebar-Nav-Group (intern) — mirrors the customer-portal CSS */
.nav-group {}
.nav-group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius, 6px);
  color: var(--text-secondary, #6b6b78);
  cursor: pointer;
  user-select: none;
  font-size: .78rem;
  font-weight: 500;
}
.nav-group-head:hover {
  background: var(--mm-lichtgrau, #f3f3f3);
  color: var(--text, #1a1a2e);
}
.nav-group.active > .nav-group-head {
  background: rgba(0, 136, 146, .08);
  color: var(--mm-topas, #008892);
  font-weight: 600;
}
/* Force the icon in head to 15x15 like all other sidebar items. The first
   <svg> child is the leading icon - the caret-svg is INSIDE a button, so it
   is NOT a direct svg child of .nav-group-head. */
.nav-group-head > svg:first-child {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
.nav-group-label {
  color: inherit;
  text-decoration: none;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-group-label:hover { color: inherit; text-decoration: none; }
.nav-group-caret-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  color: inherit;
  flex-shrink: 0;
}
.nav-group-caret-btn:hover { color: var(--mm-topas, #008892); }
.nav-group-caret {
  width: 12px;
  height: 12px;
  color: var(--text-light, #b0afb0);
  transition: transform .15s;
  flex-shrink: 0;
}
.nav-group[data-expanded="0"] .nav-group-head .nav-group-caret { transform: rotate(-90deg); }

/* Smaragd-green main badge (used by the GV-Hauptzeile) */
.nav-badge.nav-badge-success {
  background: var(--mm-smaragd, #00b677);
  color: #fff;
}

.nav-group-body {
  padding: 2px 0 6px;
  background: transparent;
}
.nav-group[data-expanded="0"] .nav-group-body { display: none; }
.nav-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 32px;
  color: var(--text-secondary, #6b6b78);
  font-size: .72rem;
  cursor: pointer;
  border-radius: var(--radius, 6px);
  text-decoration: none;
  margin: 1px 0;
}
.nav-sub:hover { background: var(--mm-lichtgrau, #f3f3f3); color: var(--text, #1a1a2e); }
.nav-sub.active { background: rgba(0, 136, 146, .08); color: var(--mm-topas, #008892); font-weight: 600; }
.nav-sub-count {
  margin-left: auto;
  background: var(--mm-grau, #cdcccc);
  color: #fff;
  font-size: .55rem;
  padding: 1px 5px;
  border-radius: 8px;
  font-weight: 700;
  min-width: 16px;
  text-align: center;
  flex-shrink: 0;
}
.nav-sub-count.has { background: var(--mm-petrol, #00547d); }
.nav-sub-count.warn { background: var(--color-warning, #f5a623); }
.nav-sub.no-dept { font-style: italic; color: var(--text-light, #b0afb0); }

@media (max-width: 900px) {
  .bc-tiles-row { grid-template-columns: repeat(2, 1fr); }
  .bc-kpi-grid.bc-kpi-grid-5,
  .bc-kpi-grid.bc-kpi-grid-7 { grid-template-columns: repeat(3, 1fr); }
}

/* ============ Phase I: Geschaeftsvorfaelle - Beraterdashboard additions ============ */

/* Status-Cards inside the Gesamt section (3 KPI tiles below the 5 colored tiles) */
.bc-status-cards-inline {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border, #e8e8ec);
}
.bc-status-cards-title {
  font-size: .66rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-light, #b0afb0);
  font-weight: 700;
  margin-bottom: 6px;
}
.business-cases-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.business-cases-card {
  background: var(--mm-card);
  border: 1px solid var(--border, #e8e8ec);
  border-radius: 6px;
  padding: 14px 16px;
  text-align: left;
}
.business-cases-card-label {
  font-size: .66rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-light, #b0afb0);
  font-weight: 700;
  margin-bottom: 4px;
}
.business-cases-card-count {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--mm-navy, #032e52);
}

/* Status pills inside the detail-view ticket table (Phase I 6.6) */
.bc-status-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: .66rem;
  font-weight: 700;
  background: var(--mm-lichtgrau, #f3f3f3);
  color: var(--text-secondary, #6b6b78);
}
.bc-status-pill.s-abgeschlossen { background: var(--color-success-light); color: var(--color-success, #00b677); }
.bc-status-pill.s-inb { background: var(--color-info-light); color: var(--color-info, #008892); }
.bc-status-pill.s-offen { background: var(--mm-lichtgrau, #f3f3f3); color: var(--text-secondary, #6b6b78); }
.bc-status-pill.s-rueck { background: var(--color-warning-light); color: var(--color-warning, #f5a623); }
.bc-status-pill.s-freigabe { background: var(--color-danger-light); color: var(--color-danger, #d13438); }
