

.app_header {
  height: var(--header-height);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: 0 var(--space-6);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header_search {
  flex: 1;
  max-width: 420px;
  position: relative;
}

.header_search input {
  padding-left: 38px;
  border-radius: var(--radius-pill);
  background: var(--color-bg);
  border-color: var(--color-border);
}

.header_search_icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-faint);
}

.header_spacer {
  flex: 1;
}

.header_version {
  font-size: var(--text-sm);
  white-space: nowrap;
  flex-shrink: 0;
}

.header_betrieb {
  color: var(--color-text);
  font-weight: 600;
  font-size: var(--text-sm);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


.header_apk_download {
  min-height: 32px;
  padding: 6px 14px;
  flex-shrink: 0;
  white-space: nowrap;
}

.header_user {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  white-space: nowrap;
  min-width: 0;
}


.header_user_info {
  min-width: 0;
  overflow: hidden;
}

.header_user_name,
.header_user_role {
  overflow: hidden;
  text-overflow: ellipsis;
}

.header_user_avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--text-sm);
  flex-shrink: 0;
}

.header_user_name {
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--color-text);
}

.header_user_role {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}


.header_brand_button {
  display: none;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border: none;
  padding: 0;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff;
  font-size: var(--text-base);
  cursor: pointer;
  box-shadow: var(--shadow-card), 0 0 0 3px var(--color-primary-bg);
  transition: box-shadow 0.15s ease;
}

.header_brand_button:hover,
.header_brand_button:focus-visible {
  box-shadow: var(--shadow-card), 0 0 0 3px var(--color-primary);
}

.header_brand_button_glyph {
  display: block;
  line-height: 1;
}


.header_brand_button_spin {
  animation: header_brand_button_flash 1.1s ease;
}

@keyframes header_brand_button_flash {
  0% {
    transform: rotate(0deg);
    box-shadow: var(--shadow-card), 0 0 0 3px var(--color-primary-bg);
  }
  50% {
    box-shadow: var(--shadow-card), 0 0 16px 4px rgba(47, 111, 237, 0.8);
  }
  100% {
    transform: rotate(360deg);
    box-shadow: var(--shadow-card), 0 0 0 3px var(--color-primary-bg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .header_brand_button_spin {
    animation: none;
  }
}

@media (max-width: 1199px) {
  .header_brand_button {
    display: inline-flex;
  }
  
  .app_header {
    height: auto;
    min-height: var(--header-height);
    padding-top: var(--space-2);
    padding-bottom: var(--space-2);
  }
  .header_spacer {
    flex: 0 1 var(--space-4);
  }
  .header_betrieb {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: break-word;
  }
}

@media (max-width: 767px) {
  .header_search {
    display: none;
  }
  
  .app_main .header_user_info {
    display: none;
  }
}




.dashboard_grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.dashboard_grid .stat_card {
  flex: 1 1 240px;
  min-width: 0;
  position: relative;
  overflow: hidden;
}

@media (min-width: 768px) {
  .dashboard_grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  
  .dashboard_grid .stat_card {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-3);
  }
}

.dashboard_card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: var(--space-5);
}

.stat_card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}


.stat_card_body {
  min-width: 0;
  flex: 1;
  position: relative;
  z-index: 1;
}


.stat_card_watermark {
  position: absolute;
  right: 4px;
  bottom: 10px;
  font-size: 66px;
  line-height: 1;
  opacity: 0.14;
  transform: rotate(12deg);
  pointer-events: none;
  user-select: none;
}

.stat_card_value {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.1;
}

.stat_card_value_alert {
  color: var(--color-danger);
}

.stat_card_value_warning {
  color: var(--color-warning);
}

.stat_card_label {
  font-size: var(--text-sm);
  color: var(--color-text);
  font-weight: 600;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  hyphens: auto;
  overflow-wrap: break-word;
}

.stat_card_subtext {
  font-size: var(--text-sm);
  color: var(--color-text-faint);
  overflow-wrap: break-word;
}

.stat_card_subtext_alert {
  color: var(--color-danger);
  font-weight: 600;
}


.stat_card_link {
  color: inherit;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.stat_card_link:hover,
.stat_card_link:focus-visible {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-panel);
}


.stat_card_progress_mobile {
  display: none;
}

.dashboard_columns {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-5);
  align-items: start;
}


.dashboard_columns > * {
  min-width: 0;
}

.card_header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.card_header h2 {
  font-size: var(--text-base);
  margin: 0;
}

.month_pager {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.month_pager a {
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.month_pager a:hover,
.month_pager a:focus-visible {
  background: var(--color-bg);
  color: var(--color-primary);
}



.control_table {
  font-size: var(--text-sm);
}

.control_table th {
  text-align: center;
  font-weight: 600;
  color: var(--color-text-muted);
  padding: var(--space-2);
  border-bottom: 1px solid var(--color-border);
}

.control_table th:first-child {
  text-align: left;
}

.control_table td {
  padding: 8px var(--space-2);
  text-align: center;
  border-bottom: 1px solid var(--color-border);
  height: 48px;
}

.control_row:nth-child(even) {
  background: var(--color-bg);
}

.control_table td:first-child {
  text-align: left;
  font-weight: 500;
  white-space: nowrap;
}

.dot {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
}

.dot_GRUEN { background: var(--color-success); }
.dot_ROT { background: var(--color-danger); }
.dot_GELB { background: var(--color-warning); }
.dot_GRAU { background: var(--color-border); }


.dot_GESCHLOSSEN {
  background: repeating-linear-gradient(
    135deg,
    var(--color-text-faint) 0,
    var(--color-text-faint) 2px,
    transparent 2px,
    transparent 5px
  );
  border: 1px solid var(--color-border);
}

.control_row_section td {
  padding-top: var(--space-3);
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-text-muted);
  border-bottom: none;
  height: auto;
}

.matrix_scroll {
  overflow-x: auto;
}

.matrix_legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.matrix_legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}



.task_list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.task_item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
}

.task_item:last-child {
  border-bottom: none;
}

.task_icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-primary-bg);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: var(--text-base);
}

.task_body {
  flex: 1;
  min-width: 0;
}


.task_title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--color-text);
}

.task_subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}


.task_actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.task_actions form {
  margin: 0;
}


@media (max-width: 767px) {
  .task_list_heute .task_item {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .task_list_heute .task_actions {
    flex-basis: 100%;
    flex-wrap: wrap;
    margin-top: var(--space-2);
    padding-left: calc(40px + var(--space-3));
  }
}


.task_ok_button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--color-primary-bg);
  color: var(--color-primary);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.task_ok_button:hover,
.task_ok_button:focus-visible {
  background: var(--color-primary);
  color: #fff;
}

.task_ok_label,
.task_ok_check {
  position: absolute;
  font-weight: 700;
  font-size: var(--text-sm);
  transition: opacity 0.2s ease, transform 0.25s ease;
}

.task_ok_check {
  opacity: 0;
  transform: scale(0.4);
}

.task_ok_button.is_done {
  background: var(--color-success);
  color: #fff;
  transform: scale(1.1);
}

.task_ok_button.is_done .task_ok_label {
  opacity: 0;
  transform: scale(0.4);
}

.task_ok_button.is_done .task_ok_check {
  opacity: 1;
  transform: scale(1);
}

.task_link_secondary {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  white-space: nowrap;
}

.task_link_secondary:hover,
.task_link_secondary:focus-visible {
  color: var(--color-text);
}



.progress_ring_wrap {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.progress_ring_value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--text-md);
  color: var(--color-text);
}

.progress_ring_container {
  position: relative;
  width: 108px;
  height: 108px;
  flex-shrink: 0;
  border-radius: 50%;
  background: conic-gradient(var(--color-success) calc(var(--pct, 0) * 3.6deg), var(--color-border) 0deg);
}

.progress_ring_container::after {
  content: "";
  position: absolute;
  inset: 10px;
  background: var(--color-surface);
  border-radius: 50%;
}

.progress_ring_value {
  z-index: 1;
  font-weight: 700;
  font-size: var(--text-md);
}

.progress_caption {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.week_bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 78px;
  margin-top: var(--space-4);
}

.week_bar_col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  justify-content: flex-end;
  height: 100%;
}

.week_bar {
  width: 100%;
  max-width: 18px;
  background: var(--color-primary);
  border-radius: 4px 4px 0 0;
  min-height: 3px;
}

.week_bar_label {
  font-size: var(--text-sm);
  color: var(--color-text-faint);
}



.progress_bar_track {
  background: var(--color-border);
  border-radius: var(--radius-pill);
  height: 10px;
  overflow: hidden;
  flex: 1;
}

.progress_bar_fill {
  background: var(--color-primary);
  height: 100%;
  border-radius: var(--radius-pill);
}

.progress_bar_row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.progress_bar_text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  white-space: nowrap;
}

@media (max-width: 1199px) {
  .dashboard_columns {
    grid-template-columns: 1fr;
  }
}


@media (min-width: 768px) and (max-width: 1199px) {
  .dashboard_columns .stack_gap {
    flex-direction: row;
    align-items: start;
  }

  .dashboard_columns .stack_gap > .dashboard_card {
    flex: 1;
    min-width: 0;
  }
}

@media (max-width: 767px) {
  
  .dashboard_grid {
    gap: var(--space-3);
  }

  .dashboard_grid .stat_card {
    flex-basis: calc(50% - var(--space-3) / 2);
    gap: var(--space-3);
    padding: var(--space-4);
  }

  .dashboard_grid .stat_card_value {
    font-size: var(--text-lg);
  }

  .dashboard_grid .stat_card_subtext {
    display: none;
  }

  .stat_card_watermark {
    font-size: 50px;
  }

  
  .stat_card_progress_mobile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: center;
  }

  .dashboard_grid .stat_card_progress_mobile .stat_card_subtext {
    display: block;
  }

  .dashboard_card_hide_mobile {
    display: none;
  }

  .progress_ring_container_sm {
    width: 56px;
    height: 56px;
  }

  .progress_ring_container_sm::after {
    inset: 7px;
  }

  .progress_ring_container_sm .progress_ring_value {
    font-size: var(--text-sm);
  }

  
  .control_table th,
  .control_table td {
    padding: 6px 2px;
  }

  .control_table td:first-child,
  .control_table th:first-child {
    white-space: normal;
    max-width: 92px;
    padding-right: var(--space-2);
  }

  
  .control_table th:not(:first-child) {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    white-space: nowrap;
    height: 72px;
    padding-bottom: var(--space-2);
    text-align: left;
  }

  .dot {
    width: 14px;
    height: 14px;
  }
}



.login_welcome_overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 24, 40, 0.45);
  cursor: pointer;
  animation: login_welcome_overlay_fade 2.6s ease forwards;
}

@keyframes login_welcome_overlay_fade {
  0% { opacity: 0; }
  10% { opacity: 1; }
  75% { opacity: 1; }
  100% { opacity: 0; pointer-events: none; }
}

.login_welcome_card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-panel);
  padding: var(--space-8) var(--space-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  transform: scale(0.85);
  animation: login_welcome_card_pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s forwards;
}

@keyframes login_welcome_card_pop {
  to {
    transform: scale(1);
  }
}

.login_welcome_check_svg {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
}

.login_welcome_check_circle {
  stroke: var(--color-success);
  stroke-width: 3;
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
  animation: login_welcome_stroke_draw 0.5s ease forwards 0.1s;
}

.login_welcome_check_mark {
  stroke: var(--color-success);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 36;
  stroke-dashoffset: 36;
  animation: login_welcome_stroke_draw 0.35s ease forwards 0.55s;
}

@keyframes login_welcome_stroke_draw {
  to {
    stroke-dashoffset: 0;
  }
}

.login_welcome_text {
  text-align: center;
}

.login_welcome_title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
}

.login_welcome_subtitle {
  margin-top: var(--space-1);
  font-size: var(--text-base);
  color: var(--color-text-muted);
}
