/* Zeiterfassung-App — an Vorlagen (time-tracker-table.html, modal.html) angelehnt */
:root {
  --ok: #1e7d32; --err: #b3261e; --muted: #6b7280;
  --border: #d7dbe0; --bg: #f5f6f8; --accent: #0f4c81;
}
* { box-sizing: border-box; }
body {
  margin: 0; font-family: "Segoe UI", system-ui, sans-serif; background: var(--bg);
  color: #1f2937; font-size: 14px;
}
.app { max-width: 1200px; margin: 0 auto; padding: 20px; }

/* Kopf-Toolbar */
.table_options_control .buttonBar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 8px 0 16px; flex-wrap: wrap;
}
.buttonBar h1 { font-size: 20px; margin: 0; }
.month-label { color: var(--muted); font-weight: 400; font-size: 16px; }
.live_status_box { display: flex; align-items: center; gap: 10px; }
.status_pill {
  padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: #e5e7eb; color: #374151;
}
.status_pill.status_active { background: #dcfce7; color: var(--ok); }
.status_pill.status_paused { background: #fef3c7; color: #92400e; }
.status_pill.status_stopped { background: #e5e7eb; }
.live_duration { font-variant-numeric: tabular-nums; font-size: 18px; font-weight: 700; }
.live_hint { color: var(--muted); font-size: 12px; }

.xButton {
  padding: 7px 14px; border: 1px solid var(--border); border-radius: 6px;
  background: #fff; cursor: pointer; font-size: 13px;
}
.xButton:hover { background: #f3f4f6; }
.xButton.--success { background: var(--ok); border-color: var(--ok); color: #fff; }
.xButton.--success:hover { background: #166b28; }
.xButton.--tertiary { background: transparent; }
.xButton.--danger { background: var(--err); border-color: var(--err); color: #fff; }
.xButton.--sm { padding: 4px 10px; font-size: 16px; }

/* Tabelle (Struktur der Vorlage) */
.time_table { border-collapse: collapse; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.time_table th, .time_table td { padding: 7px 10px; border-bottom: 1px solid var(--border); text-align: left; }
.time_table thead th {
  background: #eef1f5; font-size: 12px; text-transform: uppercase; letter-spacing: .03em;
  color: #4b5563; white-space: nowrap;
}
.time_table td.project_label { font-weight: 600; }
tr.total td { background: #eef1f5; font-weight: 700; }
tr.day_row:hover td { background: #f8fafc; }
tr.is_today td { background: #eaf3ff; }
.valid.status_ok { color: var(--ok); }
.invalid.status_error { color: var(--err); font-weight: 600; }
.status_success { color: var(--ok); }
span.sum { font-variant-numeric: tabular-nums; }
td.num, .timerecord { font-variant-numeric: tabular-nums; text-align: right; }
.th_num, thead th:nth-child(n+3) { text-align: right; }
td .entry_link { color: var(--accent); text-decoration: none; cursor: pointer; }
td .entry_link:hover { text-decoration: underline; }
td .empty { color: #c3c9d1; }
.break_cell .break_tracked { color: var(--ok); }
.break_cell .break_untracked { color: #92400e; }
.col_actions button { margin-right: 4px; }
.auto_badge {
  display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 4px;
  background: #e0e7ff; color: #3730a3; font-size: 10px; font-weight: 600;
}
.nightshift_icon { margin-left: 4px; }

/* Modal (Struktur modal.html) */
.modal_overlay {
  position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 100;
  display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px;
  overflow: auto;
}
.modal { background: #fff; border-radius: 10px; width: 800px; max-width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal.--sm { width: 420px; }
.modalHeader { padding: 14px 20px; border-bottom: 1px solid var(--border); }
.headerTop { display: flex; align-items: center; justify-content: space-between; }
.modalTitle h1 { margin: 0; font-size: 18px; }
.modalBody { padding: 20px; }
.modalFooter { padding: 12px 20px; border-top: 1px solid var(--border); text-align: right; display: flex; gap: 8px; justify-content: flex-end; }
.xm_hrm.timetracker .time h1 { font-size: 22px; margin: 0 0 14px; }

.t_table .t_row { display: flex; flex-wrap: wrap; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.t_table .t_row.t_hide { display: flex; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 12px; text-transform: uppercase; }
.t_row.t_hide h2 { margin: 0; font-size: 12px; }
.t_account { flex: 2 1 240px; }
.t_start, .t_end, .t_break { flex: 1 1 90px; }
.t_sum { flex: 0 0 110px; font-variant-numeric: tabular-nums; }
.t_comment { flex-basis: 100%; }
.t_row h3 { margin: 4px 0 10px; font-size: 13px; color: var(--muted); }
.t_row label { display: block; font-size: 12px; color: var(--muted); }
.form_element {
  width: 100%; padding: 7px 9px; border: 1px solid var(--border); border-radius: 5px; font-size: 14px;
}
.form_element:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.form_element.invalid { border-color: var(--err); outline-color: var(--err); }
textarea.form_element { min-height: 60px; resize: vertical; }
.break-suggest.warning { color: #92400e; background: #fef3c7; padding: 8px 10px; border-radius: 6px; font-size: 12px; margin-bottom: 8px; }
.form_error { color: #fff; background: var(--err); padding: 8px 10px; border-radius: 6px; font-size: 13px; margin-bottom: 8px; }
#live_sum { font-weight: 700; }
#live_sum .nightshift { color: #4338ca; }
.form_column.buttons { margin-top: 16px; display: flex; gap: 8px; justify-content: flex-end; }
.form_end { height: 4px; }
