/* Navigation Items */
.nav_menu_title {
  font-size: 10px;
  font-weight: 900;
  color: var(--text_tertiary_color);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0 32px;
  margin-bottom: 16px;
}
.nav_item_button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 32px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text_secondary_color);
  transition: 0.2s ease;
}
.nav_item_button:hover {
  background-color: var(--surface_container_color);
  color: var(--text_primary_color);
}
.nav_item_button_active {
  background-color: var(--surface_container_lowest_color);
  color: var(--primary_color);
  box-shadow: inset 4px 0 0 var(--primary_color);
}

/* Back navigation — only rendered in the bottom bar layout */
.back_button {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  padding: 8px 12px 8px 0;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text_secondary_color);
  cursor: pointer;
  transition: 0.2s ease;
}
.back_button:hover {
  color: var(--primary_color);
}
.back_button_icon {
  font-size: 22px;
}

/* Meine Zahlen */
.rates_stack_div {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.rates_card_div {
  background-color: var(--surface_container_lowest_color);
  border: 1px solid var(--border_color);
  border-top: 8px solid var(--primary_color);
  box-shadow: var(--shadow_soft);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
/* The yellow edge marks what the app cannot do without */
.rates_card_optional_div {
  border-top-color: var(--border_strong_color);
}
.rates_card_header_div {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rates_card_title_row_div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.rates_card_title {
  font-size: 20px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.5px;
}
.rates_badge_span {
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  border-radius: 32px;
}
.rates_badge_required {
  background-color: var(--primary_color);
  color: var(--on_primary_color);
}
.rates_badge_optional {
  background-color: var(--surface_container_color);
  color: var(--text_secondary_color);
  border: 1px dashed var(--border_strong_color);
}
.rates_card_description {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text_secondary_color);
  max-width: 70ch;
}
.rate_required_marker {
  color: var(--secondary_text_color);
}
.rate_warning_text {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--secondary_text_color);
}
/* The author style above would otherwise beat the browser default */
.rate_warning_text[hidden] {
  display: none;
}
.rate_warning_icon {
  font-size: 16px;
}
.rate_rows_div {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.rate_row_div {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border_subtle_color);
}
.rate_row_div:last-child {
  padding-bottom: 0;
  border-bottom: none;
}
.rate_row_field_div {
  flex: 1 1 200px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.rate_row_value_field_div {
  flex: 0 1 180px;
}
/* Single fields carrying a long label and a description of their own */
.rate_row_wide_field_div {
  flex: 0 1 300px;
}
.rate_row_amount_div {
  flex: 0 1 160px;
}
.rate_row_amount_span {
  font-size: 20px;
  font-weight: 900;
  font-style: italic;
  color: var(--secondary_text_color);
  padding: 12px 0;
}
.rate_remove_button {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  /*
   * The row aligns its fields to the bottom, but the cross belongs to the row
   * as a whole rather than to any one field, so it centres itself in it. Left
   * on the row's own alignment it hung 14px below the middle, because it is
   * that much shorter than the label-and-field columns beside it.
   */
  align-self: center;
  /* Nudged down from the exact middle, towards the figure it belongs to */
  margin-top: 16px;
  padding: 12px 0;
  line-height: 20px;
  color: var(--text_tertiary_color);
  cursor: pointer;
  transition: 0.2s ease;
}
.rate_remove_button:hover {
  color: var(--secondary_text_color);
}
.rate_remove_button .material-symbols-outlined {
  font-size: 20px;
  line-height: 20px;
}
.rate_add_button {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: var(--surface_container_color);
  color: var(--text_secondary_color);
  border: 1px dashed var(--border_strong_color);
  border-radius: 32px;
  padding: 10px 20px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: 0.2s ease;
}
.rate_add_button:hover {
  color: var(--text_primary_color);
  border-color: var(--text_tertiary_color);
}
.rate_add_icon {
  font-size: 16px;
}
.rate_total_row_div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background-color: var(--surface_color);
  border-left: 4px solid var(--primary_color);
  padding: 16px 20px;
}
.rate_total_label_span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text_secondary_color);
}
/* Carries an explanation, so it reacts to the pointer like the salary blocks */
.rate_total_row_info {
  cursor: help;
  transition: 0.2s ease;
}
.rate_total_row_info:hover .rate_total_label_span,
.rate_total_row_info:focus .rate_total_label_span {
  color: var(--text_primary_color);
}
.rate_info_icon {
  font-size: 14px;
  color: var(--text_tertiary_color);
}
.rate_total_value_span {
  font-size: 24px;
  font-weight: 900;
  font-style: italic;
}
.rate_total_amount_span {
  font-size: 20px;
  font-weight: 900;
  font-style: italic;
  color: var(--secondary_text_color);
}
/* Sits under the month navigation and says what the month means here */
.month_nav_caption_text {
  margin: -12px 0 24px 0;
  text-align: center;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text_secondary_color);
}
.month_nav_caption_text strong {
  color: var(--text_primary_color);
}
/* Whose values the page is showing — borrowed from another month or its own */
.rates_origin_text {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text_secondary_color);
}
/* A month with its own values says nothing, and an empty line must not leave
   a gap above the cards */
.rates_origin_text:empty {
  display: none;
}
.rates_origin_badge_span {
  background-color: var(--primary_color);
  color: var(--on_primary_color);
  border-radius: 32px;
  padding: 4px 10px;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.rates_origin_badge_inherited {
  background-color: var(--surface_container_color);
  color: var(--text_secondary_color);
  border: 1px dashed var(--border_strong_color);
}
/* Reads as a state, not as a value or a control */
.rate_open_value_span {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text_tertiary_color);
}
.rate_basis_div {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rate_actual_div {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid var(--border_color);
  padding-top: 24px;
}
.rate_input_wrapper_div {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: var(--surface_color);
  border-bottom: 2px solid var(--border_color);
  padding: 12px;
  transition: 0.2s ease;
}
.rate_input_wrapper_div:focus-within {
  border-bottom-color: var(--primary_color);
}
.rate_input {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  outline: none;
  color: var(--text_primary_color);
  font-family: inherit;
  font-size: 20px;
  font-weight: 900;
  font-style: italic;
}
.rate_input::placeholder {
  color: var(--text_tertiary_color);
  font-style: normal;
}
/* A name is not a figure, so it drops the numeric styling */
.rate_input_text {
  font-size: 16px;
  font-weight: 700;
  font-style: normal;
}
.rate_unit_span {
  font-size: 16px;
  font-weight: 700;
  color: var(--text_secondary_color);
  flex-shrink: 0;
}
/* Left empty once there is nothing left to say, and then it takes no space */
.rate_description_span:empty {
  display: none;
}
.rate_description_span {
  font-size: 11px;
  line-height: 1.4;
  color: var(--text_tertiary_color);
  margin-top: 8px;
}

/* Pointer to Meine Zahlen while no wage is set */
.salary_note_text {
  font-size: 12px;
  color: var(--text_secondary_color);
  margin-top: -16px;
  margin-bottom: 8px;
}
.salary_note_link {
  font: inherit;
  color: var(--primary_color);
  text-decoration: underline;
  cursor: pointer;
}

/* Settings sub menu — only rendered in the bottom bar layout */
/* Only spaced apart when a group actually precedes it */
.settings_menu_div + .settings_group_div {
  margin-top: 40px;
}
.settings_menu_div {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.settings_link_button {
  background-color: var(--surface_container_lowest_color);
  border: 1px solid var(--border_color);
  border-left: 8px solid var(--primary_color);
  padding: 20px 24px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  transition: 0.2s ease;
}
.settings_link_button:hover {
  background-color: var(--surface_container_color);
}
.settings_link_icon {
  color: var(--primary_color);
}
.settings_link_text_div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}
.settings_link_label {
  font-size: 16px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.settings_link_description {
  font-size: 12px;
  color: var(--text_secondary_color);
}
.settings_link_chevron {
  color: var(--text_tertiary_color);
}

/* Page Headers */
.page_header_section {
  margin-bottom: 40px;
}
.section_label_text {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--secondary_text_color);
  margin-bottom: 8px;
  display: block;
}
.page_title_text {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 900;
  font-style: italic;
  letter-spacing: -2px;
  margin-bottom: 16px;
  /* "Datenschutzerklärung" at this size is wider than a narrow phone, and an
     unbreakable word takes the whole page sideways with it */
  overflow-wrap: break-word;
  hyphens: auto;
}
.page_subtitle_text {
  font-size: clamp(15px, 1.6vw, 18px);
  color: var(--text_secondary_color);
  max-width: 600px;
  line-height: 1.5;
}

/* Upload Card (Abrechnungen) */
.upload_card_div {
  background-color: var(--surface_container_lowest_color);
  border: 1px solid var(--border_color);
  border-radius: 8px;
  padding: clamp(32px, 5vw, 64px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: var(--shadow_strong);
}
.upload_icon_wrapper_div {
  width: 128px;
  height: 128px;
  background-color: var(--surface_container_color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 4px dashed var(--border_strong_color);
  margin-bottom: 32px;
}
.upload_icon {
  font-size: 72px;
  color: var(--secondary_text_color);
}
.upload_title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 16px;
}
.upload_description {
  font-size: 14px;
  color: var(--text_secondary_color);
  line-height: 1.5;
  margin-bottom: 32px;
}
.primary_action_button {
  background-color: var(--primary_color);
  color: var(--on_primary_color);
  font-weight: 900;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 16px 40px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: 0.2s ease;
}
.primary_action_button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(255, 204, 0, 0.2);
}
.primary_action_button_red {
  background-color: var(--secondary_color);
  color: #ffffff;
  font-weight: 900;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 12px 40px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  transition: 0.2s ease;
}
.primary_action_button_red:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 25px -5px rgba(216, 35, 47, 0.35);
}
.secondary_action_button {
  background-color: var(--surface_container_color);
  color: var(--text_secondary_color);
  font-weight: 900;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 12px 32px;
  transition: 0.2s ease;
}
.secondary_action_button:hover {
  background-color: var(--border_strong_color);
  color: var(--text_primary_color);
}

/* Missing entries — empty state and hint panel */
.hint_intro_text {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text_secondary_color);
  display: block;
  margin-bottom: 20px;
}
.missing_days_list {
  list-style: disc;
  padding-left: 20px;
  margin-bottom: 32px;
  text-align: left;
}
.missing_day_item {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.8;
  color: var(--text_primary_color);
}
.missing_day_item::marker {
  color: var(--secondary_text_color);
}
.hint_more_text {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text_tertiary_color);
  margin-bottom: 24px;
}

/* Grid for Arbeitszeiten */
.days_grid_div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}
.day_card_div {
  background-color: var(--surface_container_lowest_color);
  padding: 24px;
  border: 1px solid var(--border_color);
  border-top: 8px solid var(--primary_color);
  box-shadow: var(--shadow_soft);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.day_card_highlight {
  border-top-color: var(--secondary_color);
}
.day_name_title {
  font-size: 20px;
  font-weight: 900;
  font-style: italic;
  margin-bottom: 8px;
}
.input_label_text {
  font-size: 10px;
  font-weight: 900;
  color: var(--text_tertiary_color);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 4px;
}
.time_input {
  width: 100%;
  min-width: 0;
  background-color: var(--surface_color);
  color: var(--text_primary_color);
  border: none;
  border-bottom: 2px solid var(--border_color);
  font-size: 18px;
  font-weight: 700;
  padding: 12px;
  outline: none;
  transition: 0.2s ease;
  font-family: inherit;
}
.time_input:focus {
  border-bottom-color: var(--primary_color);
}
.overtime_inputs_div {
  display: flex;
  gap: 8px;
}
.overtime_input {
  flex: 1;
  min-width: 0;
  background-color: var(--surface_color);
  color: var(--text_primary_color);
  border: none;
  border-bottom: 2px solid var(--border_color);
  font-size: 18px;
  font-weight: 700;
  padding: 12px;
  outline: none;
  text-align: center;
  font-family: inherit;
}
.overtime_input::placeholder {
  color: var(--text_tertiary_color);
}
.overtime_input:focus {
  border-bottom-color: var(--primary_color);
}
.action_bar_div {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 64px;
}

/* Dashboard Layout */
.dashboard_wrapper_div {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Month Navigation */
.month_nav_wrapper_div {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}
.month_nav_button {
  background-color: var(--secondary_color);
  border-radius: 32px;
  display: flex;
  align-items: center;
  padding: 8px 24px;
  gap: 32px;
  color: #ffffff;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
}
.month_nav_text {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}
.month_nav_arrow_button {
  display: flex;
  align-items: center;
  color: inherit;
  transition: 0.2s ease;
}
.month_nav_arrow_button:hover:not(:disabled) {
  transform: scale(1.2);
}
.month_nav_arrow_button:disabled {
  opacity: 0.4;
  cursor: default;
}

/* Salary Summary */
.salary_summary_div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 32px;
}
/*
 * Above the breakpoint the wrapper steps out of the way, so the month figures
 * sit directly in the summary row the way they always have. Below it the
 * wrapper becomes a row of its own — see the media query further down.
 */
.salary_headline_row_div {
  display: contents;
}
.salary_block_div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.salary_block_center_div {
  align-items: center;
  flex: 1;
}
.salary_label_text {
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}
.salary_label_red { color: var(--secondary_text_color); }
.salary_label_grey { color: var(--text_secondary_color); }
.salary_label_green { color: var(--success_color); }
.salary_value_text {
  font-size: 32px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -1px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.salary_value_large {
  font-size: clamp(36px, 5vw, 56px);
  color: var(--primary_color);
}
.salary_value_red { color: var(--secondary_text_color); }
.salary_value_green { color: var(--success_color); }
.currency_symbol {
  font-size: 16px;
  font-weight: 700;
  color: var(--text_secondary_color);
  font-style: normal;
}
.salary_divider_div {
  width: 1px;
  height: 64px;
  background-color: var(--border_color);
  margin: 0 32px;
}
.salary_status_group_div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 32px;
}

/* Dashboard Grid */
.dashboard_grid_div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--stats_panel_width);
  gap: 40px;
}

/* Left Column */
.dashboard_left_col_div {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* Today's Shift Card */
.shift_card_div {
  background-color: var(--surface_container_lowest_color);
  padding: 32px;
  border: 1px solid var(--border_color);
  border-top: 8px solid var(--primary_color);
  box-shadow: var(--shadow_strong);
  position: relative;
  overflow: hidden;
}
.shift_watermark_icon {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 128px;
  opacity: 0.06;
}
.shift_card_title {
  font-size: clamp(24px, 3.5vw, 36px);
  font-weight: 900;
  font-style: italic;
  margin-bottom: 32px;
}
/* Sits between the title and the button that leads back to the current month */
.shift_card_note_text {
  margin: -16px 0 24px 0;
  max-width: 46ch;
}
.shift_times_grid_div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
}
.shift_time_block_div {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.shift_time_input_wrapper {
  background-color: var(--surface_color);
  border-bottom: 4px solid var(--primary_color);
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.shift_time_value {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 900;
  font-style: italic;
}
.shift_time_icon {
  color: var(--secondary_text_color);
}
.shift_time_button {
  width: 100%;
  cursor: pointer;
  transition: 0.2s ease;
}
.shift_time_button:hover {
  background-color: var(--surface_container_color);
}
/* No entry yet — the planned time stands in, visibly muted */
.shift_time_value_planned {
  color: var(--text_tertiary_color);
}
.empty_note_text {
  font-size: 14px;
  color: var(--text_secondary_color);
  line-height: 1.5;
}

/* Fahrtenbuch */
.fahrtenbuch_list_div {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
/* A button since it opens the day drawer — the reset in standard.css strips the
   padding every other rule here relies on, so it is restated */
.fahrtenbuch_item_div {
  width: 100%;
  text-align: left;
  background-color: var(--surface_container_lowest_color);
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  border: 1px solid var(--border_color);
  border-left: 8px solid var(--border_strong_color);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transition: 0.2s ease;
}
.fahrtenbuch_item_div:hover {
  border-color: var(--border_strong_color);
  background-color: var(--surface_container_color);
  transform: translateX(2px);
}
.fahrtenbuch_item_div:hover.fahrtenbuch_item_highlight {
  border-left-color: var(--secondary_color);
}
.fahrtenbuch_item_highlight {
  border-left-color: var(--secondary_color);
}
.fahrtenbuch_date_block {
  display: flex;
  flex-direction: column;
}
.fahrtenbuch_date_text {
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text_secondary_color);
}
.fahrtenbuch_date_text_red {
  color: var(--secondary_text_color);
}
.fahrtenbuch_day_text {
  font-size: 18px;
  font-weight: 900;
}
.fahrtenbuch_time_block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.fahrtenbuch_duration_badge {
  background-color: var(--primary_color);
  padding: 8px 16px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--on_primary_color);
}

/* Stats Sidebar (Deepest Surface) */
.stats_sidebar_div {
  background-color: var(--surface_inverse_color);
  color: var(--text_primary_color);
  border: 1px solid var(--border_color);
  padding: 40px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
}
.stats_corner_accent {
  position: absolute;
  top: 0;
  right: 0;
  width: 96px;
  height: 96px;
  background-color: var(--primary_color);
  clip-path: polygon(100% 0, 0 0, 100% 100%);
}
.stats_watermark_icon {
  position: absolute;
  bottom: -40px;
  right: -40px;
  font-size: 240px;
  opacity: 0.06;
}
.stats_section_title {
  font-size: 11px;
  font-weight: 900;
  color: var(--primary_color);
  text-transform: uppercase;
  letter-spacing: 0.4em;
  margin-bottom: 48px;
}
.stats_block_div {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-bottom: 1px solid var(--border_color);
  padding-bottom: 32px;
  margin-bottom: 32px;
}
.stats_block_div:last-child {
  border-bottom: none;
  margin-bottom: 0;
}
.stats_label_text {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text_secondary_color);
}
.stats_value_text {
  font-size: clamp(36px, 4.5vw, 48px);
  font-weight: 900;
  font-style: italic;
}
.stats_value_yellow {
  color: var(--primary_color);
}
.stats_value_muted {
  color: var(--text_tertiary_color);
  font-size: 32px;
}
.stats_unit_text {
  font-size: 20px;
  font-style: normal;
}
.stats_unit_small {
  font-size: 16px;
}
.stats_sub_label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 9px;
  font-weight: 900;
  color: var(--primary_color);
  text-transform: uppercase;
  letter-spacing: 0.2em;
}
.stats_inner_div {
  position: relative;
  z-index: 10;
}
/* Label with the line underneath that says how the figure is to be read */
.stats_label_column_div {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
/* The counterpart to the yellow one: time that is not going to be paid */
.stats_sub_label_muted {
  color: var(--text_tertiary_color);
}

/* Kalender */
.calendar_card_div {
  padding: 0;
  overflow-x: auto;
}
.calendar_weekday_row_div {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  min-width: 700px;
  background-color: var(--surface_container_color);
  border-bottom: 1px solid var(--border_color);
  text-align: center;
}
.calendar_weekday_cell {
  padding: 12px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--text_secondary_color);
}
.calendar_grid_div {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: 140px;
  min-width: 700px;
  background-color: var(--surface_container_lowest_color);
}
.calendar_day_cell {
  border-right: 1px solid var(--border_subtle_color);
  border-bottom: 1px solid var(--border_subtle_color);
  padding: 12px;
  font-weight: 900;
  font-size: 12px;
  color: var(--text_secondary_color);
  position: relative;
}
.calendar_day_cell_empty {
  padding: 0;
  background-color: var(--surface_color);
}
/* Working days are buttons — the day number stays top left like in a div */
.calendar_day_cell_button {
  text-align: left;
  width: 100%;
  cursor: pointer;
  transition: 0.2s ease;
}
.calendar_day_cell_button:hover {
  background-color: var(--surface_container_color);
}
.calendar_day_cell_holiday {
  background-color: var(--surface_container_low_color);
}
.calendar_holiday_chip_div {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  background-color: rgba(255, 204, 0, 0.1);
  border-left: 4px solid var(--primary_color);
  padding: 4px 8px;
  color: var(--primary_color);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  text-align: left;
  /* Long names like "Tag der Deutschen Einheit" must not blow up the cell */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.calendar_missing_chip_div {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  background-color: rgba(216, 35, 47, 0.12);
  border-left: 4px solid var(--secondary_color);
  padding: 4px 8px;
  color: var(--secondary_text_color);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  text-align: left;
}
.calendar_day_cell_weekend {
  color: var(--secondary_text_color);
}
.calendar_day_cell_free {
  background-color: var(--success_surface_color);
}
.calendar_shift_chip_div {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  background-color: rgba(255, 204, 0, 0.12);
  border-left: 4px solid var(--primary_color);
  padding: 4px 8px;
}
.calendar_shift_time_text {
  font-size: 10px;
  font-weight: 700;
  color: var(--text_primary_color);
}
.calendar_shift_type_text {
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--text_secondary_color);
  margin-top: 2px;
}
/* Explains the colour bars — only needed where the labels do not fit */
.calendar_legend_div {
  display: none;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-top: 20px;
}
.calendar_legend_item_span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text_secondary_color);
}
.calendar_legend_dot_span {
  width: 14px;
  height: 5px;
  border-radius: 2px;
  flex-shrink: 0;
}
.calendar_legend_dot_entry {
  background-color: var(--primary_color);
}
.calendar_legend_dot_missing {
  background-color: var(--secondary_color);
}
.calendar_legend_dot_holiday {
  background-color: var(--text_secondary_color);
}
.calendar_legend_dot_free {
  background-color: var(--success_color);
}
.calendar_legend_dot_off {
  background-color: var(--border_strong_color);
}

.calendar_free_chip_div {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  background-color: rgba(74, 222, 128, 0.14);
  border-left: 4px solid var(--success_color);
  padding: 4px 8px;
  color: var(--success_color);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
/* A day the user declared free — quieter than a shift, but not an error either */
.calendar_off_chip_div {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  background-color: var(--surface_container_color);
  border-left: 4px solid var(--border_strong_color);
  padding: 4px 8px;
  color: var(--text_secondary_color);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

/* Stats panel drops under the main column before it gets squeezed */
/*
 * From here the four figures no longer read as one row: the status group drops
 * below and would sit left under a centred value. Two centred rows instead —
 * a deliberate arrangement rather than a leftover line.
 */
@media (max-width: 1235px) {
  .salary_summary_div {
    flex-direction: column;
    align-items: center;
    gap: 28px;
  }
  .salary_headline_row_div {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 24px;
  }
  .salary_block_center_div {
    flex: 0 1 auto;
  }
  .salary_status_group_div {
    justify-content: center;
  }
  /* Separated the group from the value beside it — nothing to separate now */
  .salary_group_lead_divider {
    display: none;
  }
}

@media (max-width: 1100px) {
  .dashboard_grid_div {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
}

/* Sidebar is an icon rail — hide labels, centre the icons */
@media (max-width: 1024px) {
  .nav_menu_title {
    display: none;
  }
  .nav_item_label {
    display: none;
  }
  .nav_item_button {
    justify-content: center;
    padding: 16px 0;
  }
  .salary_divider_div {
    display: none;
  }
  /*
   * Once the sidebar is a rail the content column stops narrowing with the
   * window, so the net pay has no reason to keep shrinking either. Frozen at
   * the size it had the moment the rail took over.
   */
  .salary_value_large {
    font-size: 51.2px;
  }
  .salary_summary_div {
    gap: 32px;
  }
  /* Narrower cells before the grid starts scrolling sideways */
  .calendar_weekday_row_div,
  .calendar_grid_div {
    min-width: 620px;
  }
  .calendar_grid_div {
    grid-auto-rows: 118px;
  }
  .calendar_day_cell {
    padding: 10px 8px;
  }
  .calendar_shift_chip_div,
  .calendar_missing_chip_div,
  .calendar_holiday_chip_div,
  .calendar_free_chip_div,
  .calendar_off_chip_div {
    padding: 3px 6px;
    border-left-width: 3px;
  }
}

/*
 * Two bands where the wide sidebar still applies but the content column has
 * already fallen below the grid width, which cut the Sunday column off.
 * Available width is viewport minus sidebar minus both gutters:
 *   1025px - 256px - 96px = 673px, so the grid must stay under that
 */
@media (max-width: 1070px) and (min-width: 1025px) {
  .calendar_weekday_row_div,
  .calendar_grid_div {
    min-width: 640px;
  }
  .calendar_grid_div {
    grid-auto-rows: 126px;
  }
  .calendar_day_cell {
    padding: 10px 8px;
  }
}

/* 721px - 80px - 64px = 577px available with the icon rail */
@media (max-width: 780px) and (min-width: 721px) {
  .calendar_weekday_row_div,
  .calendar_grid_div {
    min-width: 560px;
  }
  .calendar_grid_div {
    grid-auto-rows: 110px;
  }
  .calendar_day_cell {
    padding: 8px 6px;
  }
  .calendar_shift_time_text {
    font-size: 9px;
  }
  .calendar_shift_type_text,
  .calendar_missing_chip_div,
  .calendar_holiday_chip_div,
  .calendar_free_chip_div,
  .calendar_off_chip_div {
    font-size: 8px;
  }
}

@media (max-width: 720px) {
  .shift_times_grid_div {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
  .shift_card_div:not(.calendar_card_div),
  .stats_sidebar_div {
    padding: 24px;
  }
  /*
   * The bottom bar layout stacks the figures, and stacked they stay centred —
   * the same arrangement as on the wider screens, just in one column. Each
   * block centres its own label over its value, otherwise the small caption
   * would hang off the left edge of a wide number.
   */
  .salary_summary_div {
    align-items: center;
    gap: 24px;
  }
  .salary_headline_row_div {
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }
  .salary_block_div {
    align-items: center;
  }
  /*
   * On a phone the four figures stack into a tall column. The previous month is
   * the one that carries the least here — it is a comparison, not a figure to
   * act on, and the month navigation reaches it in one tap.
   */
  .salary_previous_block_div {
    display: none;
  }
  .salary_status_group_div {
    justify-content: center;
    gap: 24px;
  }
  .fahrtenbuch_item_div {
    padding: 20px;
  }
  .rates_card_div {
    padding: 24px;
    gap: 20px;
  }
  .rate_row_value_field_div,
  .rate_row_amount_div {
    flex: 1 1 140px;
  }
  /* Once the fields fill the width the button wraps below them, where it reads
     as part of its row only if it stays at the right edge */
  .rate_remove_button {
    margin-left: auto;
  }
  .fahrtenbuch_time_block {
    align-items: flex-start;
  }
  .action_bar_div {
    justify-content: stretch;
    padding-bottom: 32px;
  }
  .action_bar_div button {
    flex: 1;
    justify-content: center;
  }
  /* Bottom bar: icons sit in a row, active marker moves to the top edge */
  .nav_item_button {
    flex: 1;
    padding: 14px 4px;
  }
  .nav_item_button_active {
    box-shadow: inset 0 3px 0 var(--primary_color);
  }
  .stats_watermark_icon {
    font-size: 160px;
  }

  /*
   * The month has to fit the screen — seven columns on a phone leave roughly
   * 45px per cell, far too little for the labels. The cells become tiles and
   * the state is carried by a colour bar, explained by the legend.
   *
   * Only the width gives way here. The row height carries straight over from
   * the band above, so switching to the tiles does not make the calendar jump
   * shorter; from here it steps down width by width, see below.
   */
  .calendar_weekday_row_div,
  .calendar_grid_div {
    min-width: 0;
  }
  .calendar_grid_div {
    grid-auto-rows: 110px;
  }
  .calendar_weekday_cell {
    padding: 10px 2px;
    font-size: 9px;
  }
  .calendar_day_cell {
    padding: 6px 4px;
    font-size: 11px;
    text-align: center;
  }
  .calendar_day_cell_button {
    text-align: center;
  }
  .calendar_shift_chip_div,
  .calendar_missing_chip_div,
  .calendar_holiday_chip_div,
  .calendar_free_chip_div,
  .calendar_off_chip_div {
    left: 5px;
    right: 5px;
    bottom: 5px;
    height: 5px;
    padding: 0;
    border-left: none;
    border-radius: 2px;
    font-size: 0;
    overflow: hidden;
  }
  .calendar_shift_time_text,
  .calendar_shift_type_text {
    display: none;
  }
  .calendar_shift_chip_div {
    background-color: var(--primary_color);
  }
  .calendar_missing_chip_div {
    background-color: var(--secondary_color);
  }
  .calendar_holiday_chip_div {
    background-color: var(--text_secondary_color);
  }
  .calendar_free_chip_div {
    background-color: var(--success_color);
  }
  .calendar_off_chip_div {
    background-color: var(--border_strong_color);
  }
  .calendar_legend_div {
    display: flex;
  }
}

/*
 * The tiles lose height in steps of their own rather than following the width.
 * A cell only carries a day number and a colour bar, so it may stand upright on
 * a narrow screen — what it must not do is collapse the moment the tile layout
 * takes over. Each step is one notch of 8px.
 */
@media (max-width: 640px) {
  .calendar_grid_div {
    grid-auto-rows: 102px;
  }
}
@media (max-width: 560px) {
  .calendar_grid_div {
    grid-auto-rows: 94px;
  }
}
@media (max-width: 480px) {
  .calendar_grid_div {
    grid-auto-rows: 86px;
  }
}
@media (max-width: 400px) {
  .calendar_grid_div {
    grid-auto-rows: 78px;
  }
}
@media (max-width: 340px) {
  .calendar_grid_div {
    grid-auto-rows: 70px;
  }
}

/*
 * One notch smaller on phones, so the label keeps its distance from the edges
 * of the column. The values line up with where the lock below starts, so the
 * button carries on shrinking from here without a jump.
 */
@media (max-width: 480px) {
  .month_nav_text {
    font-size: 10px;
  }
  .month_nav_button {
    padding: 8px 14px;
    gap: 12px;
  }
  .month_nav_arrow_button .material-symbols-outlined {
    font-size: 22px;
  }
}

/*
 * The month button holds the longest label the app produces — a month name,
 * the year and the "(Aktuell)" suffix. Below this width it stops fitting on
 * one line, so instead of breaking it the whole button follows the viewport
 * down to 300px: type, chevrons, padding and the gaps between them.
 */
@media (max-width: 375px) {
  .month_nav_text {
    white-space: nowrap;
    font-size: clamp(7px, calc(7px + 2 * (100vw - 300px) / 75), 9px);
  }
  .month_nav_button {
    padding: clamp(6px, calc(6px + 2 * (100vw - 300px) / 75), 8px) clamp(10px, calc(10px + 4 * (100vw - 300px) / 75), 14px);
    gap: clamp(10px, calc(10px + 2 * (100vw - 300px) / 75), 12px);
  }
  /* The chevrons carry their size in the icon font's own em box */
  .month_nav_arrow_button .material-symbols-outlined {
    font-size: clamp(18px, calc(18px + 4 * (100vw - 300px) / 75), 22px);
  }
}

/* Narrow phones: the net pay steps down one notch so it keeps its distance
   from the edges of the column */
@media (max-width: 520px) {
  .salary_value_large {
    font-size: 48px;
  }
}

/*
 * The three figures need 419px side by side, so below roughly 459px of viewport
 * the browser starts wrapping them on its own — and it wraps two onto the first
 * line and one onto the second, which reads as an accident. The rule takes over
 * just before that: what arrived gets a line of its own under the net pay, and
 * the two open amounts share the line below, where they read as a pair.
 */
@media (max-width: 460px) {
  .salary_paid_block_div {
    flex: 0 0 100%;
  }
}

/*
 * From here the rate cards no longer change their arrangement, they change
 * their scale: every size in them follows the viewport down to 300px, so a
 * deduction row keeps its four columns side by side instead of wrapping. Each
 * value is a CSS lock — the first number applies at 300px, the second from
 * 1060px up, and in between the size follows the width.
 *
 * Placed last on purpose: it has to override the plain mobile rules further up,
 * which reflow these rows rather than scale them.
 */
@media (max-width: 1120px) {
  .rates_card_div {
    padding: clamp(12px, calc(12px + 20 * (100vw - 300px) / 820), 32px);
    gap: clamp(12px, calc(12px + 11 * (100vw - 300px) / 820), 24px);
  }
  .rates_card_header_div {
    gap: clamp(5px, calc(5px + 3 * (100vw - 300px) / 820), 8px);
  }
  .rates_card_title_row_div {
    gap: clamp(6px, calc(6px + 6 * (100vw - 300px) / 820), 12px);
  }
  .rates_card_title {
    font-size: clamp(13px, calc(13px + 7 * (100vw - 300px) / 820), 20px);
  }
  .rates_badge_span {
    font-size: clamp(7px, calc(7px + 2 * (100vw - 300px) / 820), 9px);
    padding: clamp(3px, calc(3px + 1 * (100vw - 300px) / 820), 4px) clamp(7px, calc(7px + 3 * (100vw - 300px) / 820), 10px);
  }
  .rates_card_description {
    font-size: clamp(9px, calc(9px + 4 * (100vw - 300px) / 820), 13px);
  }

  /* The rows themselves */
  .rate_rows_div {
    gap: clamp(8px, calc(8px + 8 * (100vw - 300px) / 820), 16px);
  }
  .rate_row_div {
    gap: clamp(6px, calc(6px + 9 * (100vw - 300px) / 820), 16px);
    padding-bottom: clamp(8px, calc(8px + 8 * (100vw - 300px) / 820), 16px);
  }
  .rate_row_field_div {
    flex: 1 1 clamp(48px, calc(48px + 152 * (100vw - 300px) / 820), 200px);
  }
  .rate_row_value_field_div {
    flex: 0 1 clamp(55px, calc(55px + 124 * (100vw - 300px) / 820), 180px);
  }
  .rate_row_amount_div {
    flex: 0 1 clamp(44px, calc(44px + 116 * (100vw - 300px) / 820), 160px);
  }
  /* The column headings carry the layout — wrapped, they would push the row
     onto a second line, so they shrink and stay on one */
  .input_label_text {
    font-size: clamp(6px, calc(6px + 4 * (100vw - 300px) / 820), 10px);
    letter-spacing: clamp(0.2px, calc(0.2px + 0.8 * (100vw - 300px) / 820), 1px);
    margin-bottom: clamp(2px, calc(2px + 2 * (100vw - 300px) / 820), 4px);
  }
  /* Only the column headings of a rate row: wrapped, they would push the row
     onto a second line. Labels elsewhere are whole sentences and must wrap. */
  .rate_row_div .input_label_text {
    white-space: nowrap;
  }
  .rate_input_wrapper_div {
    padding: clamp(5px, calc(5px + 7 * (100vw - 300px) / 820), 12px);
    gap: clamp(3px, calc(3px + 5 * (100vw - 300px) / 820), 8px);
  }
  .rate_input {
    font-size: clamp(11px, calc(11px + 9 * (100vw - 300px) / 820), 20px);
  }
  .rate_input_text {
    font-size: clamp(9px, calc(9px + 7 * (100vw - 300px) / 820), 16px);
  }
  .rate_unit_span {
    font-size: clamp(8px, calc(8px + 8 * (100vw - 300px) / 820), 16px);
  }
  .rate_row_amount_span {
    font-size: clamp(11px, calc(11px + 9 * (100vw - 300px) / 820), 20px);
    padding: clamp(5px, calc(5px + 7 * (100vw - 300px) / 820), 12px) 0;
    /* The figure and its sign are one value, not two words */
    white-space: nowrap;
  }
  .rate_remove_button {
    width: clamp(24px, calc(24px + 15 * (100vw - 300px) / 820), 40px);
    /* The mobile rule above pushes it onto its own line at the right edge; here
       it stays in the row */
    margin-left: 0;
    margin-top: clamp(8px, calc(8px + 8 * (100vw - 300px) / 820), 16px);
    padding: clamp(5px, calc(5px + 7 * (100vw - 300px) / 820), 12px) 0;
    line-height: clamp(12px, calc(12px + 8 * (100vw - 300px) / 820), 20px);
  }
  .rate_remove_button .material-symbols-outlined {
    font-size: clamp(12px, calc(12px + 8 * (100vw - 300px) / 820), 20px);
    line-height: clamp(12px, calc(12px + 8 * (100vw - 300px) / 820), 20px);
  }

  /* Everything below the rows */
  .rate_add_button {
    font-size: clamp(7px, calc(7px + 3 * (100vw - 300px) / 820), 10px);
    padding: clamp(6px, calc(6px + 4 * (100vw - 300px) / 820), 10px) clamp(12px, calc(12px + 8 * (100vw - 300px) / 820), 20px);
    gap: clamp(5px, calc(5px + 3 * (100vw - 300px) / 820), 8px);
  }
  .rate_add_icon {
    font-size: clamp(10px, calc(10px + 6 * (100vw - 300px) / 820), 16px);
  }
  .rate_basis_div {
    gap: clamp(5px, calc(5px + 3 * (100vw - 300px) / 820), 8px);
  }
  .rate_total_row_div {
    padding: clamp(8px, calc(8px + 8 * (100vw - 300px) / 820), 16px) clamp(10px, calc(10px + 9 * (100vw - 300px) / 820), 20px);
    gap: clamp(6px, calc(6px + 6 * (100vw - 300px) / 820), 12px);
    border-left-width: clamp(2px, calc(2px + 2 * (100vw - 300px) / 820), 4px);
  }
  .rate_total_label_span {
    font-size: clamp(7px, calc(7px + 4 * (100vw - 300px) / 820), 11px);
    gap: clamp(4px, calc(4px + 2 * (100vw - 300px) / 820), 6px);
    letter-spacing: clamp(0.2px, calc(0.2px + 0.9 * (100vw - 300px) / 820), 1.1px);
  }
  .rate_total_value_span {
    font-size: clamp(13px, calc(13px + 10 * (100vw - 300px) / 820), 24px);
  }
  .rate_total_amount_span {
    font-size: clamp(11px, calc(11px + 9 * (100vw - 300px) / 820), 20px);
  }
  .rate_info_icon {
    font-size: clamp(9px, calc(9px + 5 * (100vw - 300px) / 820), 14px);
  }
  .rate_description_span {
    font-size: clamp(8px, calc(8px + 3 * (100vw - 300px) / 820), 11px);
    margin-top: clamp(5px, calc(5px + 3 * (100vw - 300px) / 820), 8px);
    margin-bottom: clamp(5px, calc(5px + 3 * (100vw - 300px) / 820), 8px);
  }
  .rate_warning_text {
    font-size: clamp(8px, calc(8px + 4 * (100vw - 300px) / 820), 12px);
    gap: clamp(5px, calc(5px + 3 * (100vw - 300px) / 820), 8px);
  }
  .rate_warning_icon {
    font-size: clamp(10px, calc(10px + 6 * (100vw - 300px) / 820), 16px);
  }
  .empty_note_text {
    font-size: clamp(9px, calc(9px + 4 * (100vw - 300px) / 820), 13px);
  }
}

/*
 * Phone layout for Meine Zahlen. Below this width four columns in a row stop
 * being usable however small they are made, so the row stops being a row: the
 * name and the cross take the top line, the figures the one below. Nothing is
 * added or taken away — every field, value and button is the one from the wide
 * layout, only placed differently and back at a size a thumb can hit.
 *
 * Comes after the scaling block above, whose locks it deliberately overrides.
 */
@media (max-width: 555px) {
  /* The page itself: title block tightened up so the fields start higher, and
     centred — on a narrow screen a left-aligned block of text under a big
     heading reads as unfinished */
  [data-view="meinezahlen"] .page_header_section {
    gap: 4px;
    text-align: center;
  }
  [data-view="meinezahlen"] .page_subtitle_text {
    margin-left: auto;
    margin-right: auto;
  }
  [data-view="meinezahlen"] .page_title_text {
    font-size: 30px;
  }
  [data-view="meinezahlen"] .page_subtitle_text {
    font-size: 12px;
    line-height: 1.55;
  }

  /*
   * The month decides what every figure below it means, so on a phone it stays
   * in reach: it sticks under the header while the cards scroll past, spans the
   * full width and puts its arrows at the outer edges where thumbs are.
   */
  [data-view="meinezahlen"] .month_nav_wrapper_div {
    position: sticky;
    top: 0;
    z-index: 70;
    margin: 0 calc(var(--content_gutter) * -1) 14px;
    padding: 10px var(--content_gutter);
    background-color: var(--surface_color);
    border-bottom: 1px solid var(--border_color);
  }
  [data-view="meinezahlen"] .month_nav_button {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
  }
  [data-view="meinezahlen"] .month_nav_arrow_button {
    padding: 4px;
  }
  [data-view="meinezahlen"] .month_nav_caption_text {
    margin: 0 0 14px 0;
    font-size: 11px;
  }
  [data-view="meinezahlen"] .rates_origin_text {
    margin-bottom: 16px;
    font-size: 11px;
    gap: 6px;
  }

  /*
   * The cards give up their frames and run to both edges of the screen. Boxed
   * in with a margin they read as objects floating on a page; edge to edge they
   * read as sections of one, which is what a phone has room for.
   */
  .rates_stack_div {
    gap: 12px;
  }
  .rates_card_div {
    margin-left: calc(var(--content_gutter) * -1);
    margin-right: calc(var(--content_gutter) * -1);
    border-left: none;
    border-right: none;
    border-top-width: 4px;
    box-shadow: none;
    padding: 20px var(--content_gutter) 24px var(--content_gutter);
    gap: 18px;
  }
  .rates_card_header_div {
    gap: 6px;
  }
  .rates_card_title {
    font-size: 18px;
  }
  .rates_badge_span {
    font-size: 8px;
    padding: 4px 9px;
  }
  .rates_card_description {
    font-size: 12px;
  }

  /*
   * Each entry becomes a card in a stack: the rows run to both edges of the
   * card and a full-width rule separates them, so four deductions read as four
   * things rather than one block of fields. The gap between rows goes, since
   * the rule and the padding around it do that work now.
   */
  .rate_rows_div {
    gap: 0;
    margin-left: calc(var(--content_gutter) * -1);
    margin-right: calc(var(--content_gutter) * -1);
  }
  /* Name on the first line, the figures on the second */
  .rate_row_div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 14px 12px;
    padding: 16px var(--content_gutter);
    border-bottom: 1px solid var(--border_color);
    /* Anchors the dismiss button in the corner */
    position: relative;
  }
  /* A line above the first entry too, otherwise the list runs straight out of
     the description above it and the first entry reads as part of the text */
  .rate_row_div:first-child {
    border-top: 1px solid var(--border_color);
  }
  .rate_row_div:last-child {
    padding-bottom: 4px;
    border-bottom: none;
  }
  .empty_note_text {
    padding: 0 var(--content_gutter);
  }
  .rate_row_field_div {
    grid-column: 1 / -1;
    grid-row: 1;
    /* Leaves the corner free for the button sitting above the field */
    padding-right: 36px;
  }
  /* The two fields that stand alone in their row — hourly wage and the net that
     was actually paid — have no cross to leave room for */
  .rate_row_wide_field_div {
    grid-column: 1 / -1;
    padding-right: 0;
  }
  .rate_row_value_field_div {
    grid-column: 1 / 2;
    grid-row: 2;
    /* The corner is above the first line only — the figures below it have the
       full width of their column */
    padding-right: 0;
  }
  .rate_row_amount_div {
    grid-column: 2 / -1;
    grid-row: 2;
    text-align: right;
  }
  /*
   * The cross sits in the top right corner of the entry, where a video ad puts
   * its dismiss button. From there it reads as belonging to the whole card
   * rather than to the field beside it. The box around it is only there to be
   * hit — the offset lines the glyph itself up with the right hand edge.
   */
  .rate_remove_button {
    position: absolute;
    top: 6px;
    right: calc(var(--content_gutter) - 6px);
    width: 40px;
    height: 40px;
    /* The glyph sits at the right edge of its own box rather than in the middle
       of it: the box has to stay inside the card — pushed out even two pixels it
       made the whole page scrollable sideways — while the cross itself is what
       should sit far out in the corner. */
    justify-content: flex-end;
    margin: 0;
    padding: 0;
    line-height: 1;
  }
  .rate_remove_button .material-symbols-outlined {
    font-size: 24px;
    line-height: 1;
  }

  /* Readable again — the locks above had squeezed these down to phone-hostile
     sizes on the way to 300px */
  .input_label_text {
    font-size: 10px;
    letter-spacing: 0.08em;
    margin-bottom: 5px;
  }
  .rate_input_wrapper_div {
    padding: 12px;
    gap: 8px;
  }
  .rate_input {
    font-size: 18px;
  }
  .rate_input_text {
    font-size: 15px;
  }
  .rate_unit_span {
    font-size: 14px;
  }
  .rate_row_amount_span {
    font-size: 18px;
    padding: 12px 0;
  }

  /* Full width, so it is as easy to hit as the rows above it */
  .rate_add_button {
    align-self: stretch;
    justify-content: center;
    font-size: 10px;
    padding: 14px 20px;
    gap: 8px;
  }
  .rate_add_icon {
    font-size: 18px;
  }

  /* The totals put their heading on its own line and the figures under it */
  .rate_total_row_div {
    justify-content: flex-start;
    align-items: baseline;
    gap: 4px 12px;
    padding: 14px 16px;
  }
  .rate_total_label_span {
    flex: 0 0 100%;
    font-size: 10px;
    letter-spacing: 0.08em;
    gap: 6px;
  }
  .rate_total_value_span {
    font-size: 22px;
  }
  .rate_total_amount_span {
    font-size: 18px;
  }
  .rate_info_icon {
    font-size: 15px;
  }
  .rate_description_span {
    font-size: 11px;
  }
  .rate_warning_text {
    /* The icon keeps to the first line of a warning that runs over several */
    align-items: flex-start;
    font-size: 11px;
    gap: 8px;
  }
  .rate_warning_icon {
    font-size: 16px;
  }
  .empty_note_text {
    font-size: 12px;
  }
}

/*
 * The settings menu becomes a grid of tiles below this width. A list of wide
 * rows wastes a phone screen on empty space to the right of every entry; two
 * columns of tiles put twice as much within reach without scrolling.
 *
 * Each tile stacks what the row had beside each other. The chevron goes: in a
 * grid there is no row to follow along to a destination, and the tile itself is
 * the target. An odd entry at the end keeps to its own column, which leaves it
 * on the left rather than stretched across both.
 */
@media (max-width: 440px) {
  .settings_menu_div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .settings_link_button {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    gap: 10px;
    padding: 14px;
    /* An accent bar down one side of a tile reads as a torn-off row rather than
       as an edge — the tile keeps the same thin border all the way round */
    border-left: 1px solid var(--border_color);
  }
  .settings_link_icon {
    font-size: 26px;
  }
  .settings_link_text_div {
    gap: 3px;
    align-items: center;
    /* The text fills what the tile has left under the icon */
    flex: 1 1 auto;
    width: 100%;
  }
  /*
   * Tight enough for "Arbeitszeiten" to stay on one line in a tile. What is
   * still too long — "Datenschutzerklärung" — is hyphenated rather than snapped
   * mid-word, which the page's German lang attribute makes possible.
   */
  .settings_link_label {
    font-size: 11px;
    letter-spacing: 0.02em;
    overflow-wrap: break-word;
    hyphens: auto;
  }
  .settings_link_description {
    font-size: 10px;
    line-height: 1.35;
    overflow-wrap: break-word;
    hyphens: auto;
  }
  /*
   * Two class names on purpose. The icon font's own stylesheet is loaded after
   * this one and sets display on .material-symbols-outlined; with a single
   * class here it would win on source order and the arrow would stay visible.
   */
  .settings_link_button .settings_link_chevron {
    display: none;
  }
}

/*
 * Smallest screens. Two columns stop paying off here: a tile becomes narrower
 * than the words in it, so "Datenschutzerklärung" is broken across lines while
 * half of every tile stands empty. One column per entry gives the text the
 * whole width, and the icon moves back beside it — the entries get shorter
 * rather than narrower, so more of them fit on screen than as tiles.
 */
@media (max-width: 360px) {
  .settings_menu_div {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  .settings_link_button {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 12px;
    padding: 11px 14px;
  }
  .settings_link_icon {
    font-size: 22px;
  }
  .settings_link_text_div {
    align-items: flex-start;
    gap: 2px;
  }
  .settings_link_label {
    font-size: 11px;
    letter-spacing: 0.02em;
  }
  .settings_link_description {
    font-size: 9px;
  }
}
