/* ==========================================================
   cockpit.css — Zentrale Styles + Design Tokens
   ========================================================== */

/* ---------- Design Tokens ---------- */
:root {
  --cp-primary: #0091d7;
  --cp-primary-hover: #0078b2;
  --cp-success: #198754;
  --cp-danger: #dc3545;
  --cp-warning: #ffc107;
  --cp-info: #0dcaf0;
  --cp-bg: #f8f9fa;
  --cp-card-bg: #ffffff;
  --cp-text: #212529;
  --cp-text-muted: #6c757d;
  --cp-border: #dee2e6;
  --cp-radius: 0.5rem;
  --cp-radius-sm: 0.375rem;
  --cp-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  --cp-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.12);
  --cp-transition: 0.2s ease;

  /* Sidebar Tokens (new cd-*) */
  --cd-sidebar-width: 260px;
  --cd-sidebar-collapsed-width: 64px;
  --cd-sidebar-bg: #1a1d23;
  --cd-sidebar-text: #8b8f98;
  --cd-sidebar-text-hover: #c8ccd4;
  --cd-sidebar-text-active: #ffffff;
  --cd-sidebar-accent: var(--cp-primary);
  --cd-sidebar-section-title: rgba(255, 255, 255, 0.35);
  --cd-sidebar-search-bg: rgba(255, 255, 255, 0.06);
  --cd-sidebar-badge-bg: var(--cp-primary);
  --cd-sidebar-badge-text: #ffffff;

  /* Legacy aliases */
  --cp-sidebar-width: var(--cd-sidebar-width);
  --cp-sidebar-collapsed-width: var(--cd-sidebar-collapsed-width);
  --cp-sidebar-bg: var(--cd-sidebar-bg);
  --cp-sidebar-text: var(--cd-sidebar-text);
  --cp-sidebar-text-hover: var(--cd-sidebar-text-hover);
  --cp-sidebar-text-active: var(--cd-sidebar-text-active);
  --cp-sidebar-accent: var(--cd-sidebar-accent);
}

/* ---------- Base ---------- */
html, body {
  height: 100%;
  background-color: var(--cp-bg);
}
body {
  display: flex;
  flex-direction: row;
}
main {
  flex: 1;
}
.card, .table, .form-control, .form-select {
  background-color: var(--cp-card-bg);
}

/* ==========================================================
   Sidebar (Desktop) — cd-sidebar
   ========================================================== */
.cd-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--cd-sidebar-width);
  background: var(--cd-sidebar-bg);
  color: var(--cd-sidebar-text);
  flex-direction: column;
  z-index: 1040;
  transition: width 0.25s ease;
  overflow: hidden;
}

/* --- Collapsed state --- */
body.sidebar-collapsed .cd-sidebar {
  width: var(--cd-sidebar-collapsed-width);
}
body.sidebar-collapsed .cd-sidebar__text,
body.sidebar-collapsed .cd-sidebar__section-title,
body.sidebar-collapsed .cd-sidebar__section-chevron,
body.sidebar-collapsed .cd-sidebar__search-input {
  display: none;
}
body.sidebar-collapsed .cd-sidebar__search {
  justify-content: center;
  padding: 0.75rem 0;
}
body.sidebar-collapsed .cd-sidebar__search-icon-link {
  display: flex;
}
body.sidebar-collapsed .cd-sidebar__search-form {
  display: none;
}
body.sidebar-collapsed .cd-sidebar__link {
  justify-content: center;
  padding: 0.5rem 0;
}
body.sidebar-collapsed .cd-sidebar__link--prominent {
  padding: 0.625rem 0;
}
body.sidebar-collapsed .cd-sidebar__link--compact {
  padding: 0.4rem 0;
}
body.sidebar-collapsed .cd-sidebar__badge {
  position: absolute;
  top: 4px;
  right: 8px;
  width: 8px;
  height: 8px;
  min-width: 0;
  padding: 0;
  font-size: 0;
  border-radius: 50%;
}
body.sidebar-collapsed .cd-sidebar__section--collapsible .cd-sidebar__section-body {
  display: none;
}
body.sidebar-collapsed .cd-sidebar__section-toggle {
  display: none;
}
body.sidebar-collapsed .cd-sidebar__footer {
  align-items: center;
}
body.sidebar-collapsed .cd-sidebar__user {
  justify-content: center;
}
body.sidebar-collapsed .cd-sidebar__logout .cd-sidebar__link {
  justify-content: center;
}
body.sidebar-collapsed .cd-sidebar__collapse-btn {
  width: 100%;
  justify-content: center;
}

/* --- Logo --- */
.cd-sidebar__logo {
  padding: 1rem 1rem 0;
  display: flex;
  align-items: center;
}
.cd-sidebar__logo img {
  height: 28px;
  width: auto;
}
body.sidebar-collapsed .cd-sidebar__logo img {
  height: 22px;
}
body.sidebar-collapsed .cd-sidebar__logo {
  justify-content: center;
  padding: 0.75rem 0 0;
}

/* --- Search --- */
.cd-sidebar__search {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.cd-sidebar__search-form {
  position: relative;
}
.cd-sidebar__search-input {
  width: 100%;
  padding: 0.5rem 2rem 0.5rem 2.25rem;
  background: var(--cd-sidebar-search-bg);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--cp-radius-sm);
  color: var(--cd-sidebar-text-active);
  font-size: 0.8125rem;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.cd-sidebar__search-input::placeholder {
  color: var(--cd-sidebar-text);
}
.cd-sidebar__search-input:focus {
  border-color: var(--cd-sidebar-accent);
  background: rgba(255,255,255,0.1);
}
.cd-sidebar__search-form > svg {
  position: absolute;
  left: 0.625rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--cd-sidebar-text);
  pointer-events: none;
}
/* Search Clear Button */
.cd-search-clear {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--cd-sidebar-text);
  cursor: pointer;
  padding: 2px;
  display: none;
  line-height: 1;
}
.cd-search-clear i { width: 14px; height: 14px; }
.cd-search-clear:hover { color: var(--cd-sidebar-text-active); }

.cd-sidebar__search-icon-link {
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--cd-sidebar-text);
  text-decoration: none;
  padding: 0.5rem;
  border-radius: var(--cp-radius-sm);
  transition: color 0.15s ease;
}
.cd-sidebar__search-icon-link:hover {
  color: var(--cd-sidebar-text-hover);
}
.cd-sidebar__search-icon-link svg {
  width: 20px;
  height: 20px;
}

/* --- Nav --- */
.cd-sidebar__nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 0;
}

/* --- Section --- */
.cd-sidebar__section {
  padding: 0.25rem 0;
}
.cd-sidebar__section-title {
  display: block;
  padding: 0.75rem 1.25rem 0.375rem;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cd-sidebar-section-title);
  white-space: nowrap;
}

/* --- Collapsible Section --- */
.cd-sidebar__section-toggle {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.75rem 1.25rem 0.375rem;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--cd-sidebar-section-title);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: color 0.15s ease;
}
.cd-sidebar__section-toggle:hover {
  color: var(--cd-sidebar-text-hover);
}
.cd-sidebar__section-chevron {
  margin-left: auto;
  transition: transform 0.2s ease;
}
.cd-sidebar__section-chevron svg {
  width: 14px;
  height: 14px;
}
.cd-sidebar__section--collapsible.open .cd-sidebar__section-chevron {
  transform: rotate(90deg);
}
.cd-sidebar__section-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.cd-sidebar__section--collapsible.open .cd-sidebar__section-body {
  max-height: 500px;
}

/* --- Links --- */
.cd-sidebar__link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1.25rem;
  color: var(--cd-sidebar-text);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 400;
  border: none;
  background: none;
  width: 100%;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  position: relative;
}
.cd-sidebar__link:hover {
  color: var(--cd-sidebar-text-hover);
  background: rgba(255,255,255,0.06);
}
.cd-sidebar__link.active {
  color: var(--cd-sidebar-text-active);
  background: rgba(255,255,255,0.1);
}
.cd-sidebar__link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Prominent variant */
.cd-sidebar__link--prominent {
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.625rem 1.25rem;
  color: rgba(255,255,255,0.75);
}
.cd-sidebar__link--prominent:hover {
  color: var(--cd-sidebar-text-active);
}
.cd-sidebar__link--prominent svg {
  width: 20px;
  height: 20px;
}

/* Compact variant */
.cd-sidebar__link--compact {
  font-size: 0.75rem;
  padding: 0.4rem 1.25rem 0.4rem 1.5rem;
}
.cd-sidebar__link--compact svg {
  width: 16px;
  height: 16px;
}

/* --- Badge --- */
.cd-sidebar__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--cd-sidebar-badge-bg);
  color: var(--cd-sidebar-badge-text);
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1;
  margin-left: auto;
}

/* --- Footer --- */
.cd-sidebar__footer {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.cd-sidebar__user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  font-size: 0.8125rem;
  color: var(--cd-sidebar-text);
}
.cd-sidebar__user svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.cd-sidebar__user--link {
  text-decoration: none;
  border-radius: var(--cp-radius-sm);
  transition: all 0.15s ease;
}
.cd-sidebar__user--link:hover {
  color: var(--cd-sidebar-text-hover);
  background: rgba(255,255,255,0.06);
}
.cd-sticky-header__avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
}
.cd-sidebar__logout {
  margin: 0;
}
.cd-sidebar__collapse-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  color: var(--cd-sidebar-text);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.8125rem;
  transition: color 0.15s ease;
}
.cd-sidebar__collapse-btn:hover {
  color: var(--cd-sidebar-text-hover);
}
.cd-sidebar__collapse-btn svg {
  width: 18px;
  height: 18px;
}

/* ==========================================================
   Main Wrapper — shift content beside sidebar
   ========================================================== */
.cp-main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left 0.25s ease;
  overflow-x: hidden;
}

@media (min-width: 768px) {
  .cp-main-wrapper {
    margin-left: var(--cd-sidebar-width);
  }
  body.sidebar-collapsed .cp-main-wrapper {
    margin-left: var(--cd-sidebar-collapsed-width);
  }
}

/* ==========================================================
   Mobile: Menu Button + Bottom Sheet — cd-bottomsheet
   ========================================================== */

/* Menu Button (FAB-Style) */
.cd-menu-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--cd-sidebar-bg);
  color: #fff;
  border: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}
.cd-menu-btn:active {
  transform: scale(0.92);
}
.cd-menu-btn svg {
  width: 24px;
  height: 24px;
}

/* Backdrop */
.cd-bottomsheet__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1055;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.cd-bottomsheet__backdrop.show {
  opacity: 1;
  visibility: visible;
}

/* Bottom-Sheet */
.cd-bottomsheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 85vh;
  background: var(--cd-sidebar-bg);
  color: var(--cd-sidebar-text);
  border-radius: 1rem 1rem 0 0;
  z-index: 1060;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.cd-bottomsheet.show {
  transform: translateY(0);
}

/* Handle */
.cd-bottomsheet__handle {
  width: 40px;
  height: 4px;
  background: rgba(255,255,255,0.25);
  border-radius: 2px;
  margin: 0.75rem auto 0.5rem;
}

/* Bottom-Sheet Search */
.cd-bottomsheet__search {
  padding: 0.5rem 1rem 0;
}
.cd-bottomsheet__search form {
  position: relative;
}
.cd-bottomsheet__search-input {
  width: 100%;
  padding: 0.5rem 2rem 0.5rem 2.25rem;
  background: var(--cd-sidebar-search-bg);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--cp-radius-sm);
  color: var(--cd-sidebar-text-active);
  font-size: 0.8125rem;
  outline: none;
}
.cd-bottomsheet__search-input::placeholder {
  color: var(--cd-sidebar-text);
}
.cd-bottomsheet__search-input:focus {
  border-color: var(--cd-sidebar-accent);
  background: rgba(255,255,255,0.1);
}
.cd-bottomsheet__search form > svg {
  position: absolute;
  left: 0.625rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--cd-sidebar-text);
  pointer-events: none;
}

/* Bottom-Sheet Navigation */
.cd-bottomsheet__nav {
  padding: 0.5rem 1rem 1.5rem;
}

/* Bottom-Sheet Section Title */
.cd-bottomsheet__section-title {
  display: block;
  padding: 0.75rem 0.5rem 0.375rem;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cd-sidebar-section-title);
}

/* Bottom-Sheet Collapsible Section */
.cd-bottomsheet__section--collapsible .cd-bottomsheet__section-toggle {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.75rem 0.5rem 0.375rem;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--cd-sidebar-section-title);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.cd-bottomsheet__section-chevron {
  margin-left: auto;
  transition: transform 0.2s ease;
}
.cd-bottomsheet__section-chevron svg {
  width: 14px;
  height: 14px;
}
.cd-bottomsheet__section--collapsible.open .cd-bottomsheet__section-chevron {
  transform: rotate(90deg);
}
.cd-bottomsheet__section-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.cd-bottomsheet__section--collapsible.open .cd-bottomsheet__section-body {
  max-height: 500px;
}

/* Bottom-Sheet Links */
.cd-bottomsheet__link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.5rem;
  color: var(--cd-sidebar-text);
  text-decoration: none;
  font-size: 1rem;
  border: none;
  background: none;
  width: 100%;
  cursor: pointer;
  border-radius: var(--cp-radius-sm);
  transition: all 0.15s ease;
}
.cd-bottomsheet__link:hover,
.cd-bottomsheet__link.active {
  color: var(--cd-sidebar-text-active);
  background: rgba(255,255,255,0.08);
}
.cd-bottomsheet__link svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.cd-bottomsheet__link--prominent {
  font-weight: 500;
  color: rgba(255,255,255,0.75);
}
.cd-bottomsheet__link--compact {
  font-size: 0.875rem;
  padding: 0.5rem 0.5rem 0.5rem 1rem;
}

/* Bottom-Sheet Badge */
.cd-bottomsheet__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--cd-sidebar-badge-bg);
  color: var(--cd-sidebar-badge-text);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  margin-left: auto;
}

/* Bottom-Sheet User */
.cd-bottomsheet__user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  font-size: 0.9375rem;
  color: var(--cd-sidebar-text);
}
.cd-bottomsheet__user svg {
  width: 22px;
  height: 22px;
}

/* ==========================================================
   Select2
   ========================================================== */
.select2-container--bootstrap-5 .select2-selection {
  height: calc(2.5rem + 2px);
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
}
.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
  line-height: 1.5;
  padding-left: 0;
}
.select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow {
  top: 50%;
  transform: translateY(-50%);
}

/* ==========================================================
   Checkbox
   ========================================================== */
.form-switch {
  display: flex;
  align-items: center;
  height: 100%;
}
.form-switch .form-check-input {
  margin: 0;
}

/* ==========================================================
   Buttons
   ========================================================== */
.btn-primary {
  background: var(--cp-primary);
  border-color: var(--cp-primary);
}
.btn-primary:hover {
  background: var(--cp-primary-hover);
  border-color: var(--cp-primary-hover);
}
.btn-outline-primary {
  border-color: var(--cp-primary);
  color: var(--cp-primary-hover);
}
.btn-outline-primary:hover {
  background: rgba(0, 145, 215, 0.1);
  color: var(--cp-primary-hover);
}
.btn-outline-primary:active {
  background: var(--cp-primary-hover);
  color: #fff;
}

/* ==========================================================
   Actionbar
   ========================================================== */
.actionbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.actionbar__left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.actionbar__right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.actionbar__search {
  display: flex;
}
.actionbar__search .form-control {
  min-width: 180px;
}

/* ==========================================================
   List Cards (Responsive Single-Layout)
   ========================================================== */
.list-card-header {
  display: none;
}
.list-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--cp-border);
  transition: background-color var(--cp-transition);
  font-size: 13px;
}
.list-card:hover {
  background-color: rgba(0, 0, 0, 0.02);
}
.list-card--inactive {
  opacity: 0.55;
}
.list-card__field {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.list-card__label {
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--cp-text-muted);
  min-width: 80px;
  flex-shrink: 0;
}
.list-card__value {
  flex: 1;
  min-width: 0;
}
.list-card__subtitle {
  display: block;
  font-size: 11px;
  white-space: normal;
  flex: 0 0 calc(100% - 80px - 0.5rem);
  margin-left: calc(80px + 0.5rem);
}
.list-card__actions {
  display: flex;
  gap: 0.25rem;
  padding-top: 0.5rem;
  justify-content: flex-end;
}

/* Desktop: horizontal row layout */
@media (min-width: 768px) {
  .list-card-header {
    display: grid;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--cp-text-muted);
    border-bottom: 2px solid var(--cp-border);
    background: var(--cp-bg);
  }
  .list-card {
    display: grid;
    align-items: center;
    flex-direction: unset;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
  }
  .list-card__field {
    display: block;
    min-width: 0;
  }
  .list-card__label {
    display: none;
  }
  .list-card__value {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .list-card__subtitle {
    flex: none;
    margin-left: 0;
  }
  .list-card__actions {
    padding-top: 0;
    justify-content: flex-end;
  }
  .list-card__arrow {
    align-self: center;
  }
}

.list-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  white-space: normal;
  overflow: visible;
}

/* Clickable list-card (whole row is a link) */
a.list-card--clickable {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
a.list-card--clickable:hover {
  background: var(--cp-bg);
}
.list-card__arrow {
  width: 16px;
  height: 16px;
  color: var(--cp-text-muted);
  flex-shrink: 0;
  opacity: 0;
  transition: opacity var(--cp-transition);
}
a.list-card--clickable:hover .list-card__arrow {
  opacity: 1;
}

/* Grid column definitions per entity */
@media (min-width: 768px) {
  .cd-grid-time-entry-list { grid-template-columns: 80px minmax(0,1fr) 90px 140px 80px 50px 70px 24px; }
  .cd-grid-line-item-list  { grid-template-columns: 80px 100px minmax(0,1fr) 80px 140px 50px 80px 80px 56px 24px; }
  .cd-grid-article         { grid-template-columns: 140px minmax(0,1fr) 60px 90px 90px minmax(0,1fr) 24px; }
  .cd-grid-translation     { grid-template-columns: minmax(0,1fr) minmax(0,1fr) 120px 100px 24px; }
  .cd-grid-contact-customers { grid-template-columns: 100px 1fr 150px 24px; }
  .cd-grid-contact-projects  { grid-template-columns: 80px 1fr 150px 100px 24px; }
}

/* Budget bar (inline in list rows) */
.cp-budget-bar__track {
  display: inline-block;
  width: 60px;
  height: 6px;
  background: var(--cp-border);
  border-radius: 3px;
  overflow: hidden;
  vertical-align: middle;
}
.cp-budget-bar__fill {
  display: block;
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* ==========================================================
   Status & Active Badges
   ========================================================== */
.badge-status {
  font-size: 0.8rem;
  padding: 0.3em 0.7em;
  border-radius: 1rem;
  font-weight: 500;
}

/* ==========================================================
   Table Action Buttons
   ========================================================== */
.table-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--cp-radius-sm);
  border: 1px solid var(--cp-border);
  color: var(--cp-text-muted);
  background: var(--cp-card-bg);
  transition: all var(--cp-transition);
  text-decoration: none;
  font-size: 0.875rem;
}
.table-action:hover {
  color: var(--cp-primary);
  border-color: var(--cp-primary);
  box-shadow: var(--cp-shadow);
}
.table-action--danger:hover {
  color: var(--cp-danger);
  border-color: var(--cp-danger);
}

/* ==========================================================
   Cards (Detail Views)
   ========================================================== */
.card {
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius);
  box-shadow: var(--cp-shadow);
}
.card-header {
  background-color: var(--cp-bg);
  border-bottom: 1px solid var(--cp-border);
  font-weight: 600;
}

/* ==========================================================
   Form Actions (Submit/Cancel)
   ========================================================== */
.form-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  padding-top: 1rem;
  border-top: 1px solid var(--cp-border);
  margin-top: 1.5rem;
}

/* ==========================================================
   Delete Modal
   ========================================================== */
.delete-modal .modal-header {
  border-bottom-color: var(--cp-border);
}
.delete-modal .modal-footer {
  border-top-color: var(--cp-border);
}

/* ==========================================================
   FAB (Floating Action Button) — Mobile Create-Button
   ========================================================== */
.cp-fab {
  position: fixed;
  bottom: 88px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--cp-primary);
  color: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 1030;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease;
}
.cp-fab:hover {
  background: var(--cp-primary-hover);
  color: white;
  transform: scale(1.05);
}
.cp-fab:active {
  transform: scale(0.95);
}
.cp-fab svg {
  width: 24px;
  height: 24px;
}

/* Round icon button (e.g. back-button) */
.cp-btn-icon-round {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================
   Hero-Header (Detail-Seiten)
   ========================================================== */
.cp-hero {
  background: linear-gradient(135deg, var(--cp-primary), var(--cp-primary-hover));
  color: white;
  border-radius: var(--cp-radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.cp-hero a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
}
.cp-hero a:hover {
  color: #fff;
}
.cp-hero__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}
.cp-hero__top > *:first-child { min-width: 0; }
.cp-hero__actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.cp-hero__title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  overflow-wrap: anywhere;
}
.cp-hero__subtitle {
  opacity: 0.85;
  margin: 0.25rem 0 0;
  overflow-wrap: anywhere;
}
.cp-hero__status {
  display: inline-block;
  margin-top: 0.5rem;
}
.cp-hero__kpis {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}
.cp-hero__kpi {
  background: rgba(255,255,255,0.15);
  border-radius: var(--cp-radius);
  padding: 0.75rem 1rem;
  min-width: 100px;
  flex: 1;
}
.cp-hero__kpi-value {
  font-size: 1.25rem;
  font-weight: 700;
}
.cp-hero__kpi-label {
  font-size: 0.75rem;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}
.cp-hero__kpi--ring {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.cp-hero__kpi-ring {
  position: relative;
  width: 56px;
  height: 56px;
}
.cp-hero__kpi-ring svg {
  width: 56px;
  height: 56px;
  transform: rotate(-90deg);
}
.cp-hero__kpi-ring-track {
  fill: none;
  stroke: rgba(255,255,255,0.2);
  stroke-width: 5;
}
.cp-hero__kpi-ring-fill {
  fill: none;
  stroke-width: 5;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s ease;
}
.cp-hero__kpi-ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  color: #fff;
}

@media (max-width: 767.98px) {
  .cp-hero {
    padding: 1rem;
  }
  .cp-hero__title {
    font-size: 1.25rem;
  }
  .cp-hero__kpis {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .cp-hero__kpi-value {
    font-size: 1.1rem;
  }
}

/* ==========================================================
   Accordion (Stunden/Material)
   ========================================================== */
.cp-accordion .accordion-item {
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius) !important;
  margin-bottom: 0.5rem;
  overflow: hidden;
}
.cp-accordion .accordion-button {
  padding: 0.75rem 1rem;
  background: var(--cp-card-bg);
  box-shadow: none;
  font-size: 0.875rem;
}
.cp-accordion .accordion-button:not(.collapsed) {
  background: var(--cp-bg);
  color: var(--cp-text);
}
.cp-accordion .accordion-button::after {
  width: 1rem;
  height: 1rem;
  background-size: 1rem;
}
.cp-accordion__summary {
  display: grid;
  grid-template-columns: 80px 1fr 1fr 60px;
  gap: 1rem;
  width: 100%;
  align-items: center;
}
.cp-accordion__tech {
  font-size: 0.8125rem;
  color: var(--cp-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cp-accordion__date {
  font-weight: 600;
  color: var(--cp-text);
}
.cp-accordion__customer {
  color: var(--cp-text-muted);
  font-size: 0.8125rem;
}
.cp-accordion__type {
  color: var(--cp-text-muted);
  font-size: 0.8125rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cp-accordion__hours {
  text-align: right;
  font-weight: 600;
}
.cp-accordion__amount {
  text-align: right;
  font-weight: 600;
}
.cp-accordion .accordion-body {
  padding: 1rem;
  border-top: 1px solid var(--cp-border);
  font-size: 0.875rem;
}
.cp-accordion__actions {
  display: flex;
  gap: 0.25rem;
  margin-top: 0.75rem;
  justify-content: flex-end;
}

@media (max-width: 767.98px) {
  .cp-accordion__summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.75rem;
    align-items: center;
  }
  .cp-accordion__tech { flex: 1; min-width: 0; }
  .cp-accordion__type { width: 100%; font-size: 0.75rem; }
  .cp-accordion__hours, .cp-accordion__amount { margin-left: auto; }
}

/* ==========================================================
   Lucide Icon Sizing in Buttons / Inline
   ========================================================== */
.btn svg,
.table-action svg,
.dropdown-item svg,
.input-group-text svg,
.alert svg {
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
}

/* ==========================================================
   Responsive Tweaks
   ========================================================== */
@media (max-width: 768px) {
  .container {
    padding-inline: 8px;
  }
  h2, h4 {
    font-size: 1.2rem;
  }
  .card, .alert {
    margin-bottom: 1rem;
  }
  /* Extra bottom-padding for menu button */
  .cp-main-wrapper {
    padding-bottom: 80px;
  }
}

/* ==========================================================
   Dashboard (cp-dash-*)
   ========================================================== */

.cp-dash-action {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: var(--cp-radius-sm);
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background var(--cp-transition);
  white-space: nowrap;
}
.cp-dash-action:hover {
  background: rgba(255,255,255,0.3);
  color: #fff;
}
.cp-dash-action--secondary {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
}
.cp-dash-action svg { width: 18px; height: 18px; }

/* --- Section B: Today Cards --- */
.cp-dash-today {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.cp-dash-card__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--cp-border);
  font-weight: 600;
  font-size: 1rem;
}
.cp-dash-card__header svg { width: 20px; height: 20px; color: var(--cp-primary); }
.cp-dash-card__count {
  background: var(--cp-primary);
  color: #fff;
  font-size: 0.7rem;
  padding: 0.15em 0.5em;
  border-radius: 1rem;
  font-weight: 600;
}
.cp-dash-card__add { margin-left: auto; }
.cp-dash-card__add + .cp-dash-card__add { margin-left: 4px; }
.cp-dash-card__body { padding: 0; }
.cp-dash-card__footer {
  padding: 0.625rem 1rem;
  border-top: 1px solid var(--cp-border);
  background: var(--cp-bg);
  font-size: 0.9rem;
  color: var(--cp-text-muted);
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  border-radius: 0 0 var(--cp-radius) var(--cp-radius);
}
.cp-dash-card__footer strong { color: var(--cp-text); }

/* Entry rows */
.cp-dash-entry {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  transition: background var(--cp-transition);
}
.cp-dash-entry:last-child { border-bottom: none; }
.cp-dash-entry:hover { background: rgba(0,0,0,0.02); }
.cp-dash-entry__main { flex: 1; min-width: 0; }
.cp-dash-entry__project {
  font-weight: 600;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cp-dash-entry__desc {
  font-size: 0.85rem;
  color: var(--cp-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cp-dash-entry__meta {
  font-size: 0.85rem;
  color: var(--cp-text-muted);
  overflow-wrap: anywhere;
}
.cp-dash-entry__right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.cp-dash-entry__hours,
.cp-dash-entry__amount {
  font-weight: 700;
  font-size: 1.05rem;
  white-space: nowrap;
}

/* Empty state */
.cp-dash-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--cp-text-muted);
}
.cp-dash-empty__icon {
  display: block;
  width: 40px;
  height: 40px;
  margin: 0 auto 0.5rem;
  opacity: 0.3;
}
.cp-dash-empty p { margin: 0.25rem 0 0.75rem; font-size: 1rem; }

/* --- Section C: Week Bars --- */
.cp-dash-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
}
.cp-dash-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  padding: 0.75rem 0.25rem;
  border-radius: var(--cp-radius);
  background: var(--cp-card-bg);
  border: 1px solid var(--cp-border);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}
a.cp-dash-day:hover {
  border-color: var(--cp-primary);
  box-shadow: 0 0 0 2px rgba(0,145,215,0.15);
}
.cp-dash-day--selected {
  border-color: var(--cp-primary);
  border-width: 2px;
  background: rgba(0,145,215,0.05);
}
.cp-dash-day--today {
  border-color: var(--cp-border);
  border-width: 1px;
  box-shadow: none;
}
.cp-dash-day--today.cp-dash-day--selected {
  border-color: var(--cp-primary);
  border-width: 2px;
}
.cp-dash-day__name {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--cp-text-muted);
  text-transform: uppercase;
  position: relative;
}
.cp-dash-day--today .cp-dash-day__name {
  color: var(--cp-primary);
}
.cp-dash-day--today .cp-dash-day__name::after {
  content: "";
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cp-primary);
  margin: 2px auto 0;
}
.cp-dash-day__bar-track {
  width: 24px;
  height: 90px;
  background: var(--cp-bg);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}
.cp-dash-day__bar-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  border-radius: 12px;
  transition: height 0.4s ease;
}
.cp-dash-day__hours {
  font-weight: 700;
  font-size: 0.95rem;
}
.cp-dash-day__bilanz {
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.2em 0.55em;
  border-radius: 1rem;
  background: color-mix(in srgb, currentColor 12%, transparent);
}

/* --- Section D: Periods with Rings --- */
.cp-dash-periods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.cp-dash-period__header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--cp-border);
  font-weight: 600;
  font-size: 1rem;
}
.cp-dash-period__body {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem;
}
.cp-dash-period__stats {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.cp-dash-period__stat {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
}
.cp-dash-period__stat-label { color: var(--cp-text-muted); }
.cp-dash-period__stat-value { font-weight: 600; }

/* SVG Ring */
.cp-dash-ring {
  position: relative;
  width: 90px;
  height: 90px;
  flex-shrink: 0;
}
.cp-dash-ring svg {
  width: 90px;
  height: 90px;
  transform: rotate(-90deg);
}
.cp-dash-ring__track {
  fill: none;
  stroke: var(--cp-bg);
  stroke-width: 6;
}
.cp-dash-ring__fill {
  fill: none;
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s ease;
}
.cp-dash-ring__label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
}

/* --- Section E: Project Dashboard --- */
.cp-dash-project {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1rem;
  border-bottom: 1px solid var(--cp-border);
}
.cp-dash-project:last-child { border-bottom: none; }
.cp-dash-project__info { flex: 1; min-width: 0; }
.cp-dash-project__name {
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--cp-text);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cp-dash-project__name:hover { color: var(--cp-primary); }
.cp-dash-project__meta {
  font-size: 0.8rem;
  color: var(--cp-text-muted);
}
.cp-dash-project__bar-track {
  width: 80px;
  height: 8px;
  background: var(--cp-bg);
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}
.cp-dash-project__bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}
.cp-dash-project__pct {
  font-weight: 700;
  font-size: 0.85rem;
  min-width: 3rem;
  text-align: right;
  flex-shrink: 0;
}

/* --- Section F: Secondary (collapsible) --- */
.cp-dash-secondary { margin-bottom: 1.5rem; }
.cp-dash-secondary__toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius);
  padding: 0.625rem 1rem;
  width: 100%;
  font-size: 1rem;
  color: var(--cp-text-muted);
  cursor: pointer;
  transition: all var(--cp-transition);
}
.cp-dash-secondary__toggle:hover {
  color: var(--cp-text);
  border-color: var(--cp-primary);
}
.cp-dash-secondary__toggle svg {
  width: 18px;
  height: 18px;
  transition: transform 0.2s ease;
}
.cp-dash-secondary__toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

/* --- Hero Search --- */
.cp-hero__search {
  margin-top: 1rem;
  max-width: 480px;
}
.cp-hero__search .form-control {
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  backdrop-filter: blur(4px);
}
.cp-hero__search .form-control::placeholder { color: rgba(255,255,255,0.7); }
.cp-hero__search .form-control:focus {
  background: rgba(255,255,255,0.3);
  border-color: rgba(255,255,255,0.5);
  color: #fff;
  box-shadow: 0 0 0 0.2rem rgba(255,255,255,0.15);
}
.cp-hero__search-btn {
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
}
.cp-hero__search-btn:hover {
  background: rgba(255,255,255,0.35);
  color: #fff;
}

/* --- Global Search Results --- */
.cp-search-header {
  margin-bottom: 1.5rem;
}
.cp-search-header__title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.cp-search-header__form {
  max-width: 480px;
}

.cp-search-summary {
  color: var(--cp-text-muted);
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

.cp-search-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--cp-text-muted);
}
.cp-search-empty__icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  opacity: 0.4;
}
.cp-search-empty p { font-size: 1.05rem; margin-bottom: 0.25rem; }

.cp-search-group {
  background: var(--cp-card-bg);
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius);
  margin-bottom: 1rem;
  overflow: hidden;
}
.cp-search-group__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--cp-border);
  background: var(--cp-bg);
}
.cp-search-group__header svg { width: 18px; height: 18px; color: var(--cp-primary); }
.cp-search-group__count {
  margin-left: auto;
  background: var(--cp-primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15em 0.55em;
  border-radius: 999px;
  line-height: 1.4;
}

.cp-search-group__body { padding: 0; }

.cp-search-result {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1rem;
  text-decoration: none;
  color: var(--cp-text);
  border-bottom: 1px solid var(--cp-border);
  transition: background var(--cp-transition);
}
.cp-search-result:last-child { border-bottom: none; }
.cp-search-result:hover { background: var(--cp-bg); }

.cp-search-result__content { flex: 1; min-width: 0; }
.cp-search-result__title {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cp-search-result__meta {
  font-size: 0.825rem;
  color: var(--cp-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cp-search-result__arrow {
  width: 16px;
  height: 16px;
  color: var(--cp-text-muted);
  flex-shrink: 0;
  opacity: 0;
  transition: opacity var(--cp-transition);
}
.cp-search-result:hover .cp-search-result__arrow { opacity: 1; }

.cp-search-group__more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.625rem 1rem;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--cp-primary);
  border-top: 1px solid var(--cp-border);
  transition: background var(--cp-transition);
}
.cp-search-group__more:hover { background: var(--cp-bg); }
.cp-search-group__more svg { width: 14px; height: 14px; }

/* --- Detail Row (Key-Value) --- */
.cp-detail-row { display: flex; justify-content: space-between; padding: 0.375rem 0; border-bottom: 1px solid rgba(0,0,0,0.04); font-size: 0.9rem; }
.cp-detail-row:last-child { border-bottom: none; }
.cp-detail-row__label { color: var(--cp-text-muted); }
.cp-detail-row__value { font-weight: 600; text-align: right; }

/* --- Team Dashboard (Manager) --- */
.cp-team-employee {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--cp-border);
}
.cp-team-employee:last-child { border-bottom: none; }

.cp-team-employee__summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
}
.cp-team-employee__summary:hover { opacity: 0.85; }

.cp-team-employee__info { flex: 1; min-width: 0; }

.cp-team-employee__name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--cp-text);
}

.cp-team-employee__meta {
  font-size: 0.825rem;
  color: var(--cp-text-muted);
}

.cp-team-employee__right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.cp-team-employee__chevron {
  width: 18px;
  height: 18px;
  color: var(--cp-text-muted);
  transition: transform 0.2s ease;
}
.cp-team-employee__summary[aria-expanded="true"] .cp-team-employee__chevron {
  transform: rotate(180deg);
}

.cp-team-employee__week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
  margin-top: 0.5rem;
}

.cp-team-employee__entries {
  border-top: 1px solid var(--cp-border);
  margin-top: 0.5rem;
}

/* Compact day bars for team view */
.cp-dash-day--compact {
  padding: 0.375rem 0.125rem;
  gap: 0.2rem;
}
.cp-dash-day--compact .cp-dash-day__bar-track {
  height: 40px;
  width: 16px;
}
.cp-dash-day--compact .cp-dash-day__hours {
  font-size: 0.7rem;
}
.cp-dash-day--compact .cp-dash-day__name {
  font-size: 0.7rem;
}

/* PL group header in team project list */
.cp-team-pl-group { border-bottom: 1px solid var(--cp-border); }
.cp-team-pl-group:last-child { border-bottom: none; }
.cp-team-pl-group__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--cp-text-muted);
  background: var(--cp-bg);
  border-bottom: 1px solid var(--cp-border);
}
.cp-team-pl-group__header svg { width: 16px; height: 16px; }
.cp-team-pl-group .cp-dash-project:last-child { border-bottom: none; }

/* --- Section-Navigation (Pillenleiste) --- */
.cp-dash-section-nav {
  display: flex;
  gap: 0.25rem;
  background: var(--cp-card-bg);
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius);
  padding: 0.25rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--cp-shadow);
  overflow-x: auto;
}
.cp-dash-section-nav__item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  border-radius: calc(var(--cp-radius) - 2px);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--cp-text-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: var(--cp-transition);
}
.cp-dash-section-nav__item:hover {
  color: var(--cp-text);
  background: rgba(0, 0, 0, 0.04);
}
.cp-dash-section-nav__item--active {
  color: var(--cp-primary);
  background: rgba(0, 145, 215, 0.08);
  font-weight: 600;
}
.cp-dash-section-nav__item--active:hover {
  background: rgba(0, 145, 215, 0.12);
  color: var(--cp-primary);
}
.cp-dash-section-nav__item svg { width: 16px; height: 16px; }
.cp-dash-section-nav__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  background: var(--cp-danger);
  border-radius: 9px;
  line-height: 1;
}

/* --- Ferien-Übersicht --- */
.cp-team-vacation {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--cp-border);
}
.cp-team-vacation:last-child { border-bottom: none; }
.cp-team-vacation__info { flex: 1; min-width: 0; }
.cp-team-vacation__name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--cp-text);
}
.cp-team-vacation__meta {
  font-size: 0.8rem;
  color: var(--cp-text-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.125rem;
}
.cp-team-vacation__tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.125rem 0.5rem;
  border-radius: 9px;
  white-space: nowrap;
}
.cp-team-vacation__tag--pending {
  background: rgba(255, 193, 7, 0.15);
  color: #856404;
}
.cp-team-vacation__tag--upcoming {
  background: rgba(0, 145, 215, 0.1);
  color: var(--cp-primary);
}
.cp-team-vacation__bar-track {
  width: 100px;
  height: 8px;
  background: var(--cp-border);
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}
.cp-team-vacation__bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}
.cp-team-vacation__stats {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  min-width: 3rem;
}
.cp-team-vacation__remaining {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
}
.cp-team-vacation__stats-label {
  font-size: 0.65rem;
  color: var(--cp-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* --- Offene Anträge --- */
.cp-team-vacation__request {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--cp-border);
}
.cp-team-vacation__request:last-child { border-bottom: none; }
.cp-team-vacation__request-info { flex: 1; min-width: 0; }
.cp-team-vacation__request-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--cp-text);
}
.cp-team-vacation__request-meta {
  font-size: 0.8rem;
  color: var(--cp-text-muted);
}
.cp-team-vacation__request-actions {
  display: flex;
  gap: 0.375rem;
  flex-shrink: 0;
}
.cp-dash-action--small {
  padding: 0.375rem;
  min-width: 32px;
  min-height: 32px;
  font-size: 0.8rem;
}
.cp-dash-action--small svg { width: 16px; height: 16px; }

/* --- Dashboard Responsive --- */
@media (max-width: 1099.98px) {
  .cp-hero__top { flex-wrap: wrap; }
  .cp-hero__actions { width: 100%; }
}
@media (max-width: 767.98px) {
  .cp-hero__top { flex-direction: column; }
  .cp-hero__actions { flex-wrap: wrap; }
  .cp-dash-action__text { display: none; }
  .cp-dash-action { padding: 0.5rem; min-width: 44px; min-height: 44px; justify-content: center; }
  .cp-dash-today { grid-template-columns: 1fr; }
  .cp-dash-week { gap: 0.25rem; }
  .cp-dash-day__bar-track { height: 60px; width: 18px; }
  .cp-dash-day__hours { font-size: 0.75rem; }
  .cp-dash-day__bilanz { font-size: 0.65rem; padding: 0.15em 0.4em; }
  .cp-dash-day { padding: 0.5rem 0.125rem; gap: 0.25rem; }
  .cp-dash-periods { grid-template-columns: 1fr; }
  .cp-dash-project__bar-track { width: 60px; }
  /* Team compact bars mobile */
  .cp-dash-day--compact .cp-dash-day__bar-track { height: 30px; width: 14px; }
  .cp-dash-day--compact .cp-dash-day__hours { font-size: 0.65rem; }
  .cp-dash-day--compact .cp-dash-day__name { font-size: 0.65rem; }
  .cp-team-employee__week { gap: 0.125rem; }
  /* Section nav mobile */
  .cp-dash-section-nav { -webkit-overflow-scrolling: touch; }
  .cp-dash-section-nav__item { padding: 0.5rem 0.75rem; font-size: 0.8rem; }
  /* Vacation mobile */
  .cp-team-vacation { flex-wrap: wrap; gap: 0.5rem; }
  .cp-team-vacation__bar-track { width: 100%; order: 3; }
  .cp-team-vacation__stats { flex-direction: row; gap: 0.25rem; }
  .cp-team-vacation__request { flex-wrap: wrap; }
  /* Detail-Row: lange Werte umbrechen */
  .cp-detail-row { gap: 0.5rem; }
  .cp-detail-row__label { flex-shrink: 0; }
  .cp-detail-row__value { min-width: 0; word-break: break-word; }
}

/* ==========================================================
   Footer
   ========================================================== */
.cp-footer {
  padding: 0.75rem 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--cp-text-muted);
  border-top: 1px solid var(--cp-border);
  background: var(--cp-card-bg);
}

/* ==========================================================
   Shadow Normalisierung
   ========================================================== */
.card.shadow-sm { box-shadow: var(--cp-shadow) !important; }

/* ==========================================================
   Page Title (Listen / Formulare)
   ========================================================== */
.cp-page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--cp-text);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--cp-primary);
  display: inline-block;
}

/* ==========================================================
   Create Button (responsive: Button → FAB)
   ========================================================== */
.cp-create-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
@media (max-width: 767.98px) {
  .cp-create-btn {
    position: fixed;
    bottom: 88px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    padding: 0;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 1030;
  }
  .cp-create-btn__text { display: none; }
  .cp-create-btn svg { width: 24px; height: 24px; }
}

/* ==========================================================
   Login / MFA Dark Theme (cp-login__*)
   ========================================================== */
:root {
  --login-bg: #0e1a2b;
  --login-card: #162236;
  --login-input: #1c2c42;
  --login-input-focus: #1f3350;
  --login-border: #253650;
  --login-text: #e8edf4;
  --login-text-secondary: #8b9bb8;
  --login-text-tertiary: #5e7190;
}

@keyframes fadeUp {
  0%   { opacity: 0; transform: translateY(16px); }
  100% { opacity: 1; transform: translateY(0); }
}

.cp-login {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  background: var(--login-bg);
  position: relative;
  overflow: hidden;
}
.cp-login::before {
  content: '';
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0,145,215,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.cp-login__card {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: var(--login-card);
  border: 1px solid var(--login-border);
  border-radius: 14px;
  padding: 44px 36px 36px;
  animation: fadeUp 0.4s ease-out;
}

.cp-login__logo {
  display: block;
  max-width: 160px;
  margin: 0 auto 32px;
}

.cp-login__divider {
  width: 36px;
  height: 2px;
  background: var(--bv2-blue);
  opacity: 0.3;
  margin: 0 auto 32px;
  border-radius: 1px;
}

.cp-login__label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--login-text-secondary);
  letter-spacing: 0.4px;
  margin-bottom: 6px;
}

.cp-login__field {
  position: relative;
  margin-bottom: 20px;
}

.cp-login__field-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--login-text-tertiary);
  pointer-events: none;
}

.cp-login__input {
  display: block;
  width: 100%;
  height: 42px;
  background: var(--login-input);
  border: 1px solid var(--login-border);
  border-radius: 8px;
  color: var(--login-text);
  font-size: 14px;
  padding: 0 12px 0 38px;
  transition: border-color 0.15s, background-color 0.15s;
}
.cp-login__input:focus {
  outline: none;
  border-color: var(--bv2-blue);
  background: var(--login-input-focus);
}
.cp-login__input::placeholder {
  color: var(--login-text-tertiary);
  font-size: 13px;
}

.cp-login__toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 4px;
  color: var(--login-text-tertiary);
  cursor: pointer;
  line-height: 0;
}
.cp-login__toggle:hover { color: var(--login-text-secondary); }
.cp-login__toggle svg { width: 16px; height: 16px; }

.cp-login__options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.cp-login__options .form-check-input {
  background-color: var(--login-input);
  border-color: var(--login-border);
}
.cp-login__options .form-check-input:checked {
  background-color: var(--bv2-blue);
  border-color: var(--bv2-blue);
}
.cp-login__options .form-check-label {
  font-size: 13px;
  color: var(--login-text-secondary);
}

.cp-login__forgot {
  font-size: 13px;
  color: var(--bv2-blue);
  text-decoration: none;
}
.cp-login__forgot:hover {
  text-decoration: underline;
}

.cp-login__btn {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 44px;
  background: var(--bv2-blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.cp-login__btn:hover { background: var(--bv2-blue-hover); }
.cp-login__btn svg { width: 16px; height: 16px; }

.cp-login__error {
  background: rgba(225,75,74,0.12);
  color: #f87171;
  border: 1px solid rgba(225,75,74,0.2);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 24px;
}
.cp-login__error ul { margin: 0; padding-left: 18px; }

.cp-login__subtitle {
  font-size: 18px;
  font-weight: 600;
  color: var(--login-text);
  text-align: center;
  margin: 0 0 8px;
}

.cp-login__description {
  font-size: 13px;
  color: var(--login-text-secondary);
  text-align: center;
  margin: 0 0 28px;
}

.cp-login__code-input {
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 8px;
  padding-left: 38px;
  padding-right: 12px;
}

.cp-login__link {
  font-size: 13px;
  color: var(--bv2-blue);
  text-decoration: none;
}
.cp-login__link:hover { text-decoration: underline; }

.cp-login__footer {
  font-size: 11px;
  color: var(--login-text-tertiary);
  text-align: center;
  margin-top: 28px;
}

@media (max-width: 440px) {
  .cp-login__card { padding: 32px 24px 28px; }
  .cp-login__logo { max-width: 120px; }
}

/* ---------- Quick-Create Button (Modals) ---------- */
.cp-quick-create-btn {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- htmx Load-More Button ---------- */
.cp-load-more {
  padding: 0.75rem 1rem;
  text-align: center;
}
.cp-load-more__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius);
  padding: 0.45rem 1.2rem;
  font-size: 0.85rem;
  color: var(--cp-primary);
  cursor: pointer;
  transition: var(--cp-transition);
}
.cp-load-more__btn:hover {
  background: var(--cp-primary);
  color: #fff;
  border-color: var(--cp-primary);
}
.cp-load-more__btn svg { width: 16px; height: 16px; }
.htmx-request .cp-load-more__btn {
  pointer-events: none;
  opacity: 0.6;
}

/* ---------- Avatar ---------- */
.cp-avatar {
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cp-bg);
  border: 2px solid var(--cp-border);
}
.cp-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cp-avatar svg {
  width: 60%;
  height: 60%;
  color: var(--cp-text-muted);
}
.cp-avatar--lg {
  width: 150px;
  height: 150px;
}
.cp-avatar--sm {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-color: rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.1);
}
.cp-avatar--sm svg {
  color: var(--cp-sidebar-text);
}

/* ---------- Move-Modus (Einträge verschieben) ---------- */
.cp-move-row { display: flex; align-items: center; }
.cp-move-row .list-card { flex: 1; min-width: 0; }
.cp-move-checkbox { display: none; margin: 0 8px 0 16px; flex-shrink: 0; width: 18px; height: 18px; cursor: pointer; accent-color: var(--cp-primary); }
.cp-move-active .cp-move-checkbox { display: block; }
.cp-move-active .list-card--clickable { pointer-events: none; color: inherit; }
.cp-move-bar { display: none; padding: 10px 16px; align-items: center; gap: 12px; border-top: 1px solid var(--cd-border-default); background: var(--cd-bg-header); font-size: 12px; color: var(--cd-text-secondary); }
.cp-move-active .cp-move-bar { display: flex; }

/* ---------- Date Input: kompakt + Icon links ---------- */
input[type="date"].form-control {
  max-width: 11rem;
  direction: rtl;
}
input[type="date"].form-control::-webkit-datetime-edit {
  direction: ltr;
}
input[type="date"].form-control-sm {
  max-width: 10rem;
}

/* ==========================================================
   Customer-Detail Redesign (cd-*)
   ========================================================== */

/* ---------- Extended Tokens ---------- */
:root {
  --bv2-blue: #0091d7;
  --bv2-blue-hover: #0080c0;
  --cd-text-primary: #0f172a;
  --cd-text-secondary: #475569;
  --cd-text-tertiary: #64748b;
  --cd-bg-page: #f5f7fa;
  --cd-bg-card: #ffffff;
  --cd-bg-header: #f8fafc;
  --cd-border-default: #e8ecf0;
  --cd-border-light: #f0f4f8;
  --cd-status-success-bg: #ecfdf5; --cd-status-success-text: #065f46;
  --cd-status-warning-bg: #fffbeb; --cd-status-warning-text: #92400e;
  --cd-status-error-bg: #fef2f2; --cd-status-error-text: #991b1b;
  --cd-status-info-bg: #eff6ff; --cd-status-info-text: #1e40af;
  --cd-status-brand-bg: #e6f4fb; --cd-status-brand-text: #0077b3;
}

/* ---------- Utility ---------- */
.cd-text-tertiary { color: var(--cd-text-tertiary); }

/* ---------- Page Container ---------- */
.cd-page-container {
  max-width: 1140px;
  padding-top: 1rem;
}

/* ---------- Sticky Header ---------- */
.cd-sticky-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--cd-bg-card);
  border-bottom: 1px solid var(--cd-border-default);
  padding: 12px 24px;
}
.cd-sticky-header__top {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  max-width: 1140px;
  margin: 0 auto;
}
.cd-sticky-header__back {
  color: var(--cd-text-tertiary);
  text-decoration: none;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.cd-sticky-header__back:hover { color: var(--cd-text-primary); }
.cd-sticky-header__title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--cd-text-primary);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cd-sticky-header__badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.cd-sticky-header__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---------- KPI Grid ---------- */
.cd-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 1.5rem;
}
@media (max-width: 991.98px) {
  .cd-kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 575.98px) {
  .cd-kpi-grid { grid-template-columns: 1fr; }
}
/* KPI-Grid Modifier: 3 Spalten auf Desktop */
.cd-kpi-grid--3col { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 991.98px) {
  .cd-kpi-grid--3col { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 575.98px) {
  .cd-kpi-grid--3col { grid-template-columns: 1fr; }
}
.cd-kpi-card {
  background: var(--cd-bg-card);
  border: 1px solid var(--cd-border-default);
  border-radius: 10px;
  padding: 16px;
}
.cd-kpi-card__value {
  font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', monospace;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--cd-text-primary);
  line-height: 1.2;
}
.cd-kpi-card__label {
  color: var(--cd-text-secondary);
  font-size: 0.7rem;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.cd-kpi-card__detail {
  margin-top: 8px;
  font-size: 12px;
  color: var(--cd-text-tertiary);
}
.cd-kpi-card__detail .badge {
  font-size: 10px;
  padding: 2px 6px;
  font-weight: 500;
}
.cd-kpi-card[title] {
  cursor: help;
}

/* ---------- Progress Bar ---------- */
.cd-progress-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--cd-border-light);
  margin-top: 8px;
  overflow: hidden;
}
.cd-progress-bar__fill {
  height: 100%;
  border-radius: 3px;
  background: var(--bv2-blue);
  transition: width 0.3s ease;
}

/* ---------- Filter Chips ---------- */
.cd-filter-chips {
  display: flex;
  gap: 6px;
  padding: 8px 0;
  overflow-x: auto;
  scrollbar-width: thin;
  flex-wrap: wrap;
}
.cd-filter-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 20px;
  font-size: 12px;
  padding: 4px 12px;
  border: 1px solid var(--cd-border-default);
  color: var(--cd-text-secondary);
  background: var(--cd-bg-card);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}
.cd-filter-chip:hover {
  border-color: var(--bv2-blue);
  color: var(--bv2-blue);
}
.cd-filter-chip--active {
  background: var(--bv2-blue);
  color: #fff;
  border-color: var(--bv2-blue);
}
.cd-filter-chip--active:hover {
  background: var(--bv2-blue-hover);
  color: #fff;
}
.cd-filter-chip--reset {
  color: var(--cd-text-tertiary);
  border-style: dashed;
}

/* ---------- Technician Avatar ---------- */
.cd-tech-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cd-tech-avatar--0 { background: #0091d7; }
.cd-tech-avatar--1 { background: #6366f1; }
.cd-tech-avatar--2 { background: #f59e0b; }
.cd-tech-avatar--3 { background: #10b981; }
.cd-tech-avatar--4 { background: #ec4899; }
.cd-tech-avatar--5 { background: #8b5cf6; }
.cd-tech-avatar--6 { background: #ef4444; }
.cd-tech-avatar--7 { background: #06b6d4; }
.cd-tech-avatar--8 { background: #84cc16; }
.cd-tech-avatar--9 { background: #f97316; }

/* ---------- Row Actions (hover) ---------- */
.cd-row-actions {
  opacity: 0;
  transition: opacity 0.15s ease;
  display: flex;
  gap: 4px;
}
.list-card:hover .cd-row-actions { opacity: 1; }
@media (max-width: 767.98px) {
  .cd-row-actions { opacity: 1; }
}

/* ---------- Utility Classes ---------- */
.cd-mono { font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', monospace; }
.cd-text-right { text-align: right; }
.cd-margin-positive { color: #065f46; }
.cd-margin-negative { color: #991b1b; }

/* Status-Badge-Klassen für KPI-Cards */
.cd-badge-in-arbeit  { background: #E6F1FB; color: #185FA5; }
.cd-badge-verrechnet { background: #FAEEDA; color: #854F0B; }
.cd-badge-erledigt   { background: #EAF3DE; color: #3B6D11; }
.cd-badge-abgelehnt  { background: #F1EFE8; color: #5F5E5A; }

/* Card-Wrapper (ersetzt wiederholte Inline-Styles) */
.cd-card { border-radius: 10px; border: 1px solid var(--cd-border-default); }

/* Section-Body (ersetzt padding-Inline-Styles) */
.cd-section-body { padding: 12px 16px; }

/* Section-Footer-Link (ersetzt wiederholte Inline-Styles) */
.cd-section-footer__link { color: var(--bv2-blue); font-size: 12px; cursor: pointer; text-decoration: none; }
.cd-section-footer__link:hover { text-decoration: underline; }

/* Kontakt-Zeile */
.cd-contact-row { padding: 8px 0; border-bottom: 1px solid var(--cd-border-light); }
.cd-contact-row:last-child { border-bottom: none; }

/* Kontakt-Detail (Telefon, Mail) */
.cd-contact-detail { font-size: 12px; color: var(--cd-text-tertiary); margin-top: 4px; }
.cd-contact-detail a { color: var(--cd-text-tertiary); }
.cd-contact-detail a:hover { color: var(--cd-text-primary); }

/* Form-Label für cd-Kontext (Modal etc.) */
.cd-form-label { font-size: 12px; color: var(--cd-text-tertiary); margin-bottom: 4px; }

/* Tag-Dot (farbiger Punkt vor Filter-Chips) */
.cd-tag-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }

/* Empty-State */
.cd-empty-state { font-size: 13px; color: var(--cd-text-tertiary); font-style: italic; padding: 16px; }

/* Modal-Footer im cd-Stil */
.cd-modal-footer { background: var(--cd-bg-header); border-top: 1px solid var(--cd-border-default); }

/* ---------- Customer Info Section ---------- */
.cd-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 1.5rem;
}
@media (max-width: 767.98px) {
  .cd-info-grid { grid-template-columns: 1fr; }
}
.cd-info-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--cd-border-light);
  font-size: 13px;
}
.cd-info-row:last-child { border-bottom: none; }
.cd-info-row__label {
  color: var(--cd-text-tertiary);
  flex-shrink: 0;
  margin-right: 12px;
}
.cd-info-row__value {
  color: var(--cd-text-primary);
  text-align: right;
}
.cd-info-row__value a {
  color: inherit;
  text-decoration: none;
}
.cd-info-row__value a:hover {
  color: var(--bv2-blue);
}

/* ---------- Section Header ---------- */
.cd-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--cd-border-default);
  flex-wrap: wrap;
}
.cd-section-header__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--cd-text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.cd-section-header__count {
  background: var(--cd-border-light);
  color: var(--cd-text-tertiary);
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 10px;
  font-weight: 500;
}
.cd-section-header__meta {
  font-size: 12px;
  color: var(--cd-text-tertiary);
  display: flex;
  gap: 12px;
}
.cd-section-header__actions {
  margin-left: auto;
  display: flex;
  gap: 6px;
}

/* ---------- Section Footer / Summen ---------- */
.cd-section-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-top: 1px solid var(--cd-border-default);
  font-size: 12px;
  color: var(--cd-text-tertiary);
  background: var(--cd-bg-header);
  cursor: pointer;
}
.cd-section-footer__sums {
  display: flex;
  gap: 16px;
  font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', monospace;
}

/* ---------- Column Header ---------- */
.cd-column-header {
  font-size: 11px;
  padding: 6px 16px;
  border-bottom: 1px solid var(--cd-border-light);
  color: var(--cd-text-tertiary);
}

/* ---------- Search Bar ---------- */
.cd-search-bar {
  margin-bottom: 1rem;
}
.cd-search-bar .form-control {
  border-radius: 8px;
  border: 1px solid var(--cd-border-default);
  font-size: 13px;
  padding: 8px 12px 8px 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 10px center;
}

/* ---------- Dropdown More Menu ---------- */
.cd-more-menu .dropdown-toggle::after { display: none; }
.cd-more-menu .btn {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: 1px solid var(--cd-border-default);
  background: var(--cd-bg-card);
  color: var(--cd-text-secondary);
}
.cd-more-menu .btn:hover {
  background: var(--cd-bg-header);
}
.cd-more-menu .dropdown-menu {
  font-size: 13px;
  min-width: 200px;
}
.cd-more-menu .dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
}
.cd-more-menu .dropdown-item i {
  width: 16px;
  height: 16px;
}

/* ---------- Row Padding for cd-grid rows ---------- */
.list-card[class*="cd-grid-"] { padding: 8px 16px; }

/* ---------- Changelog Entry ---------- */
.cd-changelog-entry {
  padding: 8px 16px;
  border-bottom: 1px solid var(--cd-border-light);
  font-size: 13px;
}

/* ---------- Changelog Action Badges ---------- */
.cd-changelog-badge--create  { background: #EAF3DE; color: #3B6D11; font-size: 10px; }
.cd-changelog-badge--update  { background: #E6F1FB; color: #185FA5; font-size: 10px; }
.cd-changelog-badge--delete  { background: #FCEBEB; color: #E24B4A; font-size: 10px; }

/* ---------- Filter Divider ---------- */
.cd-filter-divider {
  width: 1px; height: 20px;
  background: var(--cd-border-default);
  flex-shrink: 0; align-self: center;
}

/* ---------- Grid Classes for Row Templates ---------- */
.cd-grid-project { grid-template-columns: 80px 1fr 90px 80px 70px 24px; }
.cd-grid-time-entry { grid-template-columns: 80px 1fr 80px 32px 80px 50px; }
.cd-grid-line-item { grid-template-columns: 1fr 80px 32px 50px 80px 80px 80px; }
.cd-grid-subscription { grid-template-columns: 1fr 80px 100px 70px 24px; }
.cd-grid-project-header { grid-template-columns: 80px 1fr 90px 80px 70px 24px; }
.cd-grid-customer { grid-template-columns: 100px minmax(0,1fr) 130px 120px minmax(0,1fr) 24px; }
.cd-grid-customer-header { grid-template-columns: 100px minmax(0,1fr) 130px 120px minmax(0,1fr) 24px; }
.cd-grid-time-entry-list { grid-template-columns: 82px minmax(0,1fr) 100px 140px 80px 64px 64px 24px; }
.cd-grid-contact { grid-template-columns: minmax(0,1fr) minmax(0,1fr) 100px 130px minmax(0,1fr) 24px; }
.cd-grid-project-list { grid-template-columns: 90px 80px minmax(0,1fr) 130px 100px 120px 80px 50px 24px; }
.cd-grid-project-list-header { grid-template-columns: 90px 80px minmax(0,1fr) 130px 100px 120px 80px 50px 24px; }

/* ---------- Sortable Column Headers ---------- */
.cd-sortable { cursor:pointer; user-select:none; display:inline-flex; align-items:center; gap:2px; }
.cd-sortable:hover { color:var(--cd-text-primary); }
.cd-sortable[data-sort-dir="asc"]::after { content:" \2191"; font-size:10px; }
.cd-sortable[data-sort-dir="desc"]::after { content:" \2193"; font-size:10px; }
.cd-grid-subscription-list { grid-template-columns: 120px minmax(0,1fr) minmax(0,0.6fr) 100px 80px 120px 24px; }
.cd-grid-cost-tag { grid-template-columns: minmax(0,1fr) 80px 100px 100px 100px 70px; }

/* ---------- Intern Grid Classes ---------- */
.cd-grid-intern-project  { grid-template-columns: 80px minmax(0,1fr) 100px 140px 24px; }
.cd-grid-intern-employee { grid-template-columns: minmax(0,1fr) minmax(0,1fr) 90px 90px 80px 100px 24px; }

/* ---------- Responsive: Mobile ---------- */
@media (max-width: 767.98px) {
  /* Sticky Header */
  .cd-sticky-header { padding: 8px 12px; }
  .cd-sticky-header__title {
    font-size: 1rem;
    white-space: normal;
    overflow: visible;
  }
  .cd-sticky-header__top {
    gap: 8px;
  }
  .cd-sticky-header__badges .badge { font-size: 10px; padding: 2px 6px; }
  .cd-sticky-header__actions { margin-left: 0; width: 100%; justify-content: flex-end; }

  /* Section Header */
  .cd-section-header__meta {
    width: 100%;
    order: 10;
    flex-wrap: wrap;
    gap: 6px;
  }
  .cd-section-header__actions { margin-left: auto; }

  /* Info row label */
  .cd-info-row__label { font-size: 12px; }

  /* Grid overrides — switch to stacked layout */
  .cd-grid-project,
  .cd-grid-time-entry,
  .cd-grid-time-entry-list,
  .cd-grid-line-item,
  .cd-grid-subscription,
  .cd-grid-customer,
  .cd-grid-contact,
  .cd-grid-project-list,
  .cd-grid-cost-tag,
  .cd-grid-intern-project,
  .cd-grid-intern-employee,
  .cd-grid-subscription-list { grid-template-columns: 1fr !important; }
  .cd-grid-project-header,
  .cd-grid-customer-header,
  .cd-grid-project-list-header,
  .list-card-header.cd-grid-time-entry-list,
  .list-card-header.cd-grid-subscription,
  .list-card-header.cd-grid-subscription-list,
  .list-card-header.cd-grid-contact,
  .list-card-header.cd-grid-cost-tag,
  .list-card-header.cd-grid-intern-project,
  .list-card-header.cd-grid-intern-employee { display: none !important; }
}

/* ==========================================================
   Dashboard NEW (cd-dash-*)
   ========================================================== */

/* --- Today 2-column grid --- */
.cd-dash-today {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

/* --- Entry rows --- */
.cd-dash-entry {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 8px 16px;
  border-bottom: 1px solid var(--cd-border-light);
  transition: background 0.15s ease;
}
.cd-dash-entry:last-child { border-bottom: none; }
.cd-dash-entry:hover { background: var(--cd-bg-header); }
.cd-dash-entry__main { flex: 1; min-width: 0; }
.cd-dash-entry__project {
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--cd-text-primary);
}
.cd-dash-entry__desc {
  font-size: 12px;
  color: var(--cd-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cd-dash-entry__meta {
  font-size: 11px;
  color: var(--cd-text-tertiary);
  overflow-wrap: anywhere;
}
.cd-dash-entry__right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.cd-dash-entry__hours {
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
}

/* --- cd-table (Bootstrap table mit cd-* Styling) --- */
.cd-table { font-size: 13px; }
.cd-table thead th {
  font-size: 11px;
  font-weight: 600;
  color: var(--cd-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--cd-border-light);
  padding: 0.5rem 0.75rem;
}
.cd-table tbody td { padding: 0.5rem 0.75rem; vertical-align: middle; }
.cd-table a { color: inherit; text-decoration: none; }
.cd-table a:hover { text-decoration: underline; }

/* --- Empty state --- */
.cd-dash-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--cd-text-tertiary);
}

/* --- Week bars --- */
.cd-dash-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}
.cd-dash-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 4px;
  border-radius: 10px;
  background: var(--cd-bg-card);
  border: 1px solid var(--cd-border-default);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.2s;
}
a.cd-dash-day:hover {
  border-color: var(--bv2-blue);
}
.cd-dash-day--selected {
  border-color: var(--bv2-blue);
  border-width: 2px;
  background: rgba(0,145,215,0.05);
}
.cd-dash-day--today {
  border-color: var(--cd-border-default);
  border-width: 1px;
}
.cd-dash-day--today.cd-dash-day--selected {
  border-color: var(--bv2-blue);
  border-width: 2px;
}
.cd-dash-day__name {
  font-weight: 600;
  font-size: 11px;
  color: var(--cd-text-tertiary);
  text-transform: uppercase;
  position: relative;
}
.cd-dash-day--today .cd-dash-day__name {
  color: var(--bv2-blue);
}
.cd-dash-day--today .cd-dash-day__name::after {
  content: "";
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--bv2-blue);
  margin: 2px auto 0;
}
.cd-dash-day__bar-track {
  width: 24px;
  height: 90px;
  background: var(--cd-border-light);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}
.cd-dash-day__bar-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  border-radius: 12px;
  transition: height 0.4s ease;
}
.cd-dash-day__hours {
  font-weight: 700;
  font-size: 13px;
}
.cd-dash-day__bilanz {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 1rem;
  background: color-mix(in srgb, currentColor 12%, transparent);
}

/* --- Periods grid --- */
.cd-dash-periods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.cd-dash-period__body {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 16px;
}
.cd-dash-period__stats {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cd-dash-period__stat {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}
.cd-dash-period__stat-label { color: var(--cd-text-tertiary); }
.cd-dash-period__stat-value { font-weight: 600; }

/* --- SVG Ring --- */
.cd-dash-ring {
  position: relative;
  width: 70px;
  height: 70px;
  flex-shrink: 0;
}
.cd-dash-ring svg {
  width: 70px;
  height: 70px;
  transform: rotate(-90deg);
}
.cd-dash-ring__track {
  fill: none;
  stroke: var(--cd-border-light);
  stroke-width: 6;
}
.cd-dash-ring__fill {
  fill: none;
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s ease;
}
.cd-dash-ring__label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: var(--cd-text-primary);
}

/* --- Project rows --- */
.cd-dash-project {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--cd-border-light);
}
.cd-dash-project:last-child { border-bottom: none; }
.cd-dash-project__info { flex: 1; min-width: 0; }
.cd-dash-project__name {
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  color: var(--cd-text-primary);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cd-dash-project__name:hover { color: var(--bv2-blue); }
.cd-dash-project__meta {
  font-size: 11px;
  color: var(--cd-text-tertiary);
}
.cd-dash-project__bar-track {
  width: 80px;
  height: 6px;
  background: var(--cd-border-light);
  border-radius: 3px;
  overflow: hidden;
  flex-shrink: 0;
}
.cd-dash-project__bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}
.cd-dash-project__pct {
  font-weight: 700;
  font-size: 12px;
  min-width: 3rem;
  text-align: right;
  flex-shrink: 0;
}

/* --- Mobile Responsive --- */
@media (max-width: 767.98px) {
  .cd-dash-today { grid-template-columns: 1fr; }
  .cd-dash-periods { grid-template-columns: 1fr; }
  .cd-dash-week {
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin: 0 -8px;
  }
  .cd-dash-day {
    padding: 8px 2px;
  }
  .cd-dash-day__hours { font-size: 11px; }
  .cd-dash-day__bilanz { font-size: 10px; padding: 2px 4px; }
  .cd-dash-day__bar-track { height: 60px; }
  .cd-dash-project__bar-track { width: 60px; }
}

/* ---------- Search Results (cd-*) ---------- */
.cd-search-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  text-decoration: none;
  color: var(--cd-text-primary);
  border-bottom: 1px solid var(--cd-border-light);
  transition: background 0.15s ease;
}
.cd-search-result:last-child { border-bottom: none; }
.cd-search-result:hover { background: var(--cd-bg-header); color: var(--cd-text-primary); }
.cd-search-result__content { flex: 1; min-width: 0; }
.cd-search-result__title { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cd-search-result__meta { font-size: 11px; color: var(--cd-text-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cd-search-result__arrow { width: 14px; height: 14px; color: var(--cd-text-tertiary); flex-shrink: 0; opacity: 0; transition: opacity 0.15s ease; }
.cd-search-result:hover .cd-search-result__arrow { opacity: 1; }

/* ── Report Grid ── */
.cd-report-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (max-width: 767.98px) {
  .cd-report-grid { grid-template-columns: 1fr; }
}

/* Report Card */
.cd-report-card {
  display: flex;
  flex-direction: column;
  padding: 20px;
  text-decoration: none;
  color: var(--cd-text-primary);
  border: 1px solid var(--cd-border-light);
  border-radius: 8px;
  background: var(--cd-card-bg);
  transition: border-color 0.15s;
}
.cd-report-card:hover {
  border-color: var(--bv2-blue);
  color: var(--cd-text-primary);
}
.cd-report-card__icon {
  margin-bottom: 12px;
  color: var(--bv2-blue);
}
.cd-report-card__icon i {
  width: 20px;
  height: 20px;
  stroke-width: 1.8;
}
.cd-report-card__title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}
.cd-report-card__desc {
  font-size: 13px;
  color: var(--cd-text-secondary);
  margin-bottom: 0;
  flex-grow: 1;
}
.cd-report-card__action {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--bv2-blue);
}
.cd-report-card__action i {
  width: 14px;
  height: 14px;
  stroke-width: 1.8;
}

/* ==========================================================
   GL-Dashboard: Responsive Grids & Charts
   ========================================================== */

/* Chart containers — responsive height */
.gl-chart-container {
  position: relative;
  height: 300px;
}
@media (max-width: 575.98px) {
  .gl-chart-container { height: 220px; }
}

/* Doughnut chart — constrained size */
.gl-chart-doughnut {
  max-width: 280px;
  max-height: 280px;
}
@media (max-width: 575.98px) {
  .gl-chart-doughnut { max-width: 220px; max-height: 220px; }
}

/* Select2 Multiple: Auto-Resize bei mehreren Tags */
.select2-container--bootstrap-5 .select2-selection--multiple {
  min-height: calc(2.5rem + 2px);
  height: auto !important;
}

/* Budget-Alerts Grid */
@media (min-width: 768px) {
  .gl-grid-budget { grid-template-columns: 80px 1fr 80px 100px 24px; }
}

/* Top-15 Projekte Grid */
@media (min-width: 768px) {
  .gl-grid-top-projects { grid-template-columns: 80px 1fr 1fr 100px 100px 100px 24px; }
}
