:root {
  --bg: #f3f5f7;
  --surface: #ffffff;
  --surface-soft: #eef2f5;
  --text: #15202b;
  --muted: #65717d;
  --line: #d8e0e7;
  --primary: #1d5f8f;
  --primary-dark: #164b72;
  --success: #127a55;
  --danger: #a33a32;
  --shadow: 0 12px 34px rgba(24, 41, 58, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

button,
input,
select {
  font: inherit;
}

a {
  color: var(--primary);
  text-decoration: none;
}

.login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(rgba(243, 245, 247, 0.84), rgba(243, 245, 247, 0.92)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1200' height='800' viewBox='0 0 1200 800'%3E%3Crect width='1200' height='800' fill='%23dce7ef'/%3E%3Cpath d='M0 560c180-90 340-130 520-100s320 120 680 8v332H0z' fill='%2397b8cd'/%3E%3Cpath d='M0 660c280-80 390-20 590-60 250-50 380-150 610-90v290H0z' fill='%236f9db8'/%3E%3C/svg%3E");
  background-size: cover;
  background-position: center;
}

.login-card {
  width: min(420px, 100%);
  padding: 36px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.brand-mark {
  display: grid;
  gap: 8px;
  justify-items: center;
  margin-bottom: 28px;
}

.brand-mark img {
  display: block;
  width: min(220px, 82%);
  height: auto;
}

.brand-mark small {
  color: var(--primary-dark);
  font-size: 18px;
  font-weight: 700;
}

.login-form,
.user-form,
.filters {
  display: grid;
  gap: 16px;
}

.user-form.with-history {
  grid-template-columns: minmax(340px, 430px) minmax(680px, 1fr);
  align-items: start;
  gap: 22px;
}

.user-form.with-history > :not(.contract-history) {
  grid-column: 1;
}

.user-form.with-history .contract-history {
  grid-column: 2;
  grid-row: 1 / span 30;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

label span {
  font-weight: 400;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 9px 11px;
}

button,
.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  padding: 10px 15px;
}

.primary-button,
.filters button {
  background: var(--primary);
  color: #fff;
}

.secondary-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--primary-dark);
}

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 260px 1fr;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
  border-right: 1px solid var(--line);
  background: #182939;
  color: #fff;
  padding: 24px 18px;
}

.sidebar-logo {
  display: grid;
  gap: 3px;
  padding: 0 6px;
}

.sidebar-logo a {
  display: inline-flex;
  width: fit-content;
}

.sidebar-logo img {
  display: block;
  width: 150px;
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  background: #fff;
  padding: 8px;
}

.sidebar-logo span {
  color: #bdd2e1;
}

.sidebar nav {
  display: grid;
  gap: 8px;
}

.nav-heading {
  margin: 16px 12px 2px;
  color: #8fb1c8;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.sidebar nav a {
  width: 100%;
  justify-content: flex-start;
  border-radius: 6px;
  color: #e6eef5;
  padding: 12px;
}

.sidebar nav a.active,
.sidebar nav a:hover {
  background: rgba(255, 255, 255, 0.12);
}

.content {
  min-width: 0;
  padding: 28px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
  min-height: 50px;
}

.topbar .user-menu {
  display: grid;
  gap: 2px;
  text-align: right;
}

.creator-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  text-decoration: none;
}

.creator-link img {
  display: block;
  width: auto;
  height: 28px;
  max-width: 34px;
  object-fit: contain;
}

.creator-link strong {
  color: var(--brand);
  font-weight: 800;
}

.topbar .user-menu > span,
.creator-link span {
  color: var(--muted);
  font-size: 13px;
}

.user-menu {
  position: relative;
}

.user-menu-button {
  min-height: 32px;
  background: transparent;
  color: var(--primary-dark);
  padding: 0;
}

.user-menu-button::after {
  content: "▾";
  margin-left: 7px;
  color: var(--muted);
}

.user-menu-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 10;
  min-width: 180px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 8px;
}

.user-menu-popover[hidden] {
  display: none;
}

.user-menu-popover button,
.user-menu-popover a {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  justify-content: flex-start;
  background: transparent;
  color: var(--primary-dark);
  border-radius: 6px;
  padding: 10px 15px;
  font: inherit;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
}

.user-menu-popover .about-menu-button {
  appearance: none;
  cursor: pointer;
  color: var(--primary-dark);
}

.user-menu-popover form {
  margin: 8px 0 0;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.user-menu-popover form button {
  color: var(--danger);
}

.user-menu-popover button:hover,
.user-menu-popover a:hover {
  background: #f6f8fa;
}

.about-modal[hidden] {
  display: none;
}

.about-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  overflow: auto;
  background: rgba(21, 32, 43, 0.58);
  padding: 28px;
}

.about-modal-inner {
  width: min(920px, 100%);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.about-modal-bar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 16px 18px;
}

.about-modal-bar div {
  display: grid;
  gap: 3px;
}

.about-modal-bar span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.about-modal-bar strong {
  font-size: 22px;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 18px;
  padding: 18px;
}

.about-card {
  display: grid;
  gap: 14px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.about-card img {
  display: block;
  width: 180px;
  max-width: 100%;
  max-height: 92px;
  object-fit: contain;
}

.about-card h2 {
  margin: 0;
  color: var(--primary-dark);
  font-size: 20px;
}

.about-card p {
  margin: 0;
  color: var(--text);
  line-height: 1.5;
}

.about-card dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.about-card dl div {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 10px;
}

.about-card dt {
  color: var(--muted);
  font-weight: 800;
}

.about-card dd {
  margin: 0;
}

.manual-download-card {
  grid-column: 1 / -1;
}

.manual-download-link {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  padding: 12px 16px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.manual-download-link:hover {
  background: var(--primary-dark);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 8px 24px rgba(24, 41, 58, 0.07);
}

.panel + .panel {
  margin-top: 18px;
}

h1 {
  margin: 0 0 22px;
  font-size: 26px;
}

.booking-panel {
  display: grid;
  gap: 28px;
  max-width: 820px;
}

.home-panel {
  max-width: 1180px;
}

.home-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.home-dashboard {
  display: grid;
  gap: 24px;
}

.home-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 18px;
}

.home-status-card {
  display: grid;
  gap: 10px;
  min-height: 156px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.home-status-card span {
  color: var(--muted);
  font-weight: 700;
}

.home-status-card strong {
  color: var(--ink);
  font-size: 22px;
  line-height: 1.28;
}

.home-status-card.status-active {
  border-color: #8fd7b2;
  background: #e9f8ef;
}

.home-status-card.status-krank {
  border-color: #f1d46b;
  background: #fff6c7;
}

.home-status-card.status-urlaub {
  border-color: #9bd9a0;
  background: #e6f7e8;
}

.home-status-card.status-gleittag {
  border-color: #9ac7ef;
  background: #e4f0fb;
}

.home-status-card.status-problem {
  border-color: #efb7b2;
  background: #fff2f0;
}

.home-status-card.status-problem strong {
  color: #7d221d;
}

.home-status-card.status-holiday,
.home-status-card.status-free {
  background: #eef3f7;
}

.home-anomalies {
  display: grid;
  gap: 14px;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.section-title-row h2 {
  margin: 0;
  font-size: 22px;
}

.section-title-row span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: #a9362f;
  color: #fff;
  font-weight: 800;
}

.home-anomalies ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-anomalies li {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid #efb7b2;
  border-left: 5px solid #a9362f;
  border-radius: 8px;
  background: #fff2f0;
}

.home-anomalies li strong {
  color: #7d221d;
}

.home-anomalies li a {
  color: var(--primary-dark);
  font-weight: 800;
}

.home-anomalies li a:hover {
  color: var(--primary);
}

.empty-state {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
}

.clock {
  display: grid;
  gap: 6px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.clock span {
  color: var(--muted);
  font-size: 18px;
}

.clock strong {
  font-size: clamp(42px, 8vw, 82px);
}

.booking-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 18px;
}

.booking-actions button {
  min-height: 112px;
  color: #fff;
  font-size: 26px;
}

.come-button {
  background: var(--success);
}

.go-button {
  background: var(--danger);
}

.filters {
  align-items: end;
  grid-template-columns: minmax(180px, 1fr) 150px auto auto;
  margin-bottom: 18px;
}

.log-filters {
  grid-template-columns: 160px minmax(180px, 0.7fr) minmax(220px, 1fr) auto;
}

.absence-form {
  display: grid;
  gap: 16px;
}

.settings-form {
  display: grid;
  gap: 16px;
}

.critical-setting {
  display: grid;
  gap: 14px;
  border: 2px solid #e5a13a;
  border-radius: 8px;
  background: #fff7e8;
  padding: 18px;
}

.critical-setting input {
  border-color: #d28a25;
  background: #fffdfa;
}

.critical-setting label {
  color: #6f4b16;
}

.critical-setting label span {
  color: #6f4b16;
}

.critical-setting-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border-bottom: 1px solid rgba(210, 138, 37, 0.35);
  padding-bottom: 12px;
}

.critical-setting-head strong {
  display: block;
  color: #7a3c00;
  font-size: 17px;
}

.critical-setting-head p {
  margin: 4px 0 0;
  color: #6f4b16;
}

.critical-icon {
  display: inline-flex;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #b35a00;
  color: #fff;
  font-weight: 900;
}

.settings-group {
  display: grid;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.settings-group h2 {
  margin: 0;
  color: var(--primary-dark);
  font-size: 20px;
}

.one-time-setting {
  display: grid;
  gap: 14px;
  border: 1px solid #e5a13a;
  border-left: 5px solid #b35a00;
  border-radius: 8px;
  background: #fff9ef;
  padding: 16px;
}

.one-time-setting-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.one-time-setting-head strong {
  display: block;
  color: #7a3c00;
  font-size: 16px;
}

.one-time-setting-head p {
  margin: 4px 0 0;
  color: #6f4b16;
  line-height: 1.45;
}

.contract-history {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 18px;
}

.contract-history-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.contract-history-head h2 {
  margin: 0;
  color: var(--primary-dark);
  font-size: 20px;
}

.contract-history-head p,
.contract-history-head span {
  margin: 5px 0 0;
  color: var(--muted);
}

.contract-history-table {
  min-width: 680px;
}

.contract-history-table input {
  min-height: 34px;
  padding: 5px 7px;
}

.contract-new-row td {
  background: #f8fafc;
}

.compact-check {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
}

.readonly-profile {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.readonly-profile div {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px 14px;
}

.readonly-profile span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.readonly-profile strong {
  color: var(--text);
}

.password-generator {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.password-generator span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.password-generator-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 44px auto;
  gap: 8px;
  align-items: center;
}

.password-generator-row input {
  min-width: 0;
  font: inherit;
  font-weight: 700;
}

.copy-password-button {
  display: inline-flex;
  width: 44px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--primary-dark);
  padding: 0;
}

.copy-password-button:hover {
  background: #eef5fa;
}

.password-rules {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.password-rules li {
  display: flex;
  gap: 9px;
  align-items: center;
  color: var(--danger);
  font-weight: 700;
}

.password-rules li::before {
  content: "✕";
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 50%;
  background: #ffe8e5;
  color: var(--danger);
  font-size: 12px;
}

.password-rules li.passed {
  color: var(--success);
}

.password-rules li.passed::before {
  content: "✓";
  background: #e4f6ee;
  color: var(--success);
}

.password-strength {
  display: grid;
  gap: 7px;
}

.password-strength-bar {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9eff4;
}

.password-strength-bar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: var(--danger);
  transition: width 0.2s ease, background 0.2s ease;
}

.password-strength-bar i.very-weak {
  background: #a33a32;
}

.password-strength-bar i.weak {
  background: #d95b47;
}

.password-strength-bar i.medium {
  background: #f0a830;
}

.password-strength-bar i.strong {
  background: #4e9d68;
}

.password-strength-bar i.very-strong {
  background: var(--success);
}

.password-strength strong {
  color: var(--muted);
}

.password-rules,
.password-rules li {
  list-style: none !important;
}

.password-rules li {
  color: var(--danger);
}

.password-rules li::before,
.password-rules li.failed::before {
  content: "\2715";
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  background: #ffe8e5;
  color: var(--danger);
  font-size: 13px;
  font-weight: 900;
}

.password-rules li.failed {
  color: var(--danger);
}

.password-rules li.passed::before {
  content: "\2713";
  background: #e4f6ee;
  color: var(--success);
}

.password-strength strong {
  color: var(--danger);
}

.password-strength strong.medium {
  color: #a46a00;
}

.password-strength strong.strong,
.password-strength strong.very-strong {
  color: var(--success);
}

.vacation-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 16px;
}

.vacation-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.vacation-card h2 {
  margin: 0;
  padding: 14px 16px;
  background: #e9eff4;
  color: #354759;
  font-size: 20px;
}

.vacation-card dl {
  display: grid;
  margin: 0;
}

.vacation-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 12px 16px;
}

.vacation-card dt {
  color: var(--muted);
  font-weight: 700;
}

.vacation-card dd {
  margin: 0;
  font-weight: 800;
}

.vacation-remaining {
  background: #f8fafc;
}

.admin-time-filters {
  grid-template-columns: minmax(260px, 1fr) 170px 140px auto auto;
}

.daily-strength-filters {
  grid-template-columns: minmax(220px, 1fr) auto auto auto;
}

.statistics-filters {
  grid-template-columns: minmax(180px, 0.4fr) minmax(140px, 0.3fr) auto;
}

.table-meta {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 10px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 11px 12px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #e9eff4;
  color: #354759;
  font-size: 13px;
}

tr.free-day td {
  background: #f0f1f2;
}

tr.free-day td,
tr.absence-krank td,
tr.absence-urlaub td,
tr.absence-gleittag td,
tr.missing-booking td {
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}

tr.absence-krank td {
  background: #fff3b8;
}

tr.absence-urlaub td {
  background: #dff3df;
}

tr.absence-gleittag td {
  background: #dcecff;
}

tr.missing-booking td {
  background: #ffd7d2;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.booking-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.booking-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend-color {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(21, 32, 43, 0.16);
  border-radius: 4px;
}

.legend-sick {
  background: #fff3b8;
}

.legend-vacation {
  background: #dff3df;
}

.legend-flex {
  background: #dcecff;
}

.legend-missing {
  background: #ffd7d2;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.summary-grid div {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.summary-grid span {
  color: var(--muted);
  font-size: 13px;
}

.summary-grid strong {
  font-size: 22px;
}

.statistics-panel h2 {
  margin: 0;
  font-size: 20px;
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 18px;
}

.chart-grid-wide {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.chart-card {
  display: grid;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  align-content: start;
}

.statistics-kpi-table-wrap {
  margin: 22px 0;
}

.statistics-kpi-table {
  min-width: 640px;
}

.statistics-kpi-table td:first-child {
  font-weight: 800;
}

.statistics-kpi-table td:nth-child(2) {
  white-space: nowrap;
}

.management-kpi-panel > p {
  max-width: 980px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
}

.management-kpi-table-wrap {
  margin: 22px 0;
}

.management-kpi-table {
  min-width: 760px;
}

.management-kpi-table th:first-child,
.management-kpi-table td:first-child {
  width: 74px;
  text-align: center;
}

.management-kpi-table td:nth-child(2) {
  font-weight: 800;
}

.management-kpi-table td:nth-child(3) {
  white-space: nowrap;
}

.kpi-status-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #1d5f8f;
}

.kpi-level-green .kpi-status-dot {
  background: #1b8a5a;
}

.kpi-level-yellow .kpi-status-dot {
  background: #f0a830;
}

.kpi-level-red .kpi-status-dot {
  background: #a33a32;
}

.kpi-level-neutral .kpi-status-dot {
  background: #1d5f8f;
}

.kpi-note {
  color: var(--muted);
  font-weight: 700;
}

.management-summary {
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  margin-top: 0;
}

.statistics-check {
  align-self: end;
  min-height: 52px;
}

.stat-badge {
  display: inline-flex;
  align-items: center;
  min-width: 72px;
  justify-content: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-weight: 800;
  font-size: 13px;
}

.stat-badge-green {
  background: #dff3df;
  color: #166534;
}

.stat-badge-yellow {
  background: #fff3c4;
  color: #815500;
}

.stat-badge-red {
  background: #ffd7d2;
  color: #a33a32;
}

.warning-panel {
  border-color: #efb0aa;
}

.warning-box {
  border-left: 6px solid #a33a32;
  border-radius: 8px;
  background: #fff1ef;
  color: #7f1d1d;
  padding: 14px 16px;
  font-weight: 800;
}

.stat-bars {
  display: grid;
  gap: 12px;
}

.stat-bar-row {
  display: grid;
  grid-template-columns: minmax(130px, 210px) 1fr minmax(72px, auto);
  align-items: center;
  gap: 12px;
}

.stat-bar-row span {
  font-weight: 700;
}

.stat-bar-row i,
.monthly-bars i {
  display: block;
  height: 18px;
  overflow: hidden;
  border-radius: 4px;
  background: #e9eff4;
}

.stat-bar-row b {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: #1d5f8f;
}

.stat-bar-row strong {
  text-align: right;
}

.monthly-bars {
  display: grid;
  gap: 10px;
}

.monthly-bars div {
  display: grid;
  grid-template-columns: minmax(120px, 180px) 1fr 1fr;
  align-items: center;
  gap: 10px;
}

.monthly-bars .target {
  background: #d8e0e7;
}

.monthly-bars .actual {
  background: #1d5f8f;
}

.compact-table {
  max-height: 360px;
  overflow: auto;
}

.traffic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.traffic-card {
  display: grid;
  gap: 8px;
  border-radius: 8px;
  padding: 14px;
  align-content: start;
}

.traffic-card strong {
  font-size: 30px;
}

.traffic-card span {
  font-weight: 800;
}

.traffic-card small {
  color: var(--muted);
  line-height: 1.4;
}

.traffic-user-list {
  display: grid;
  gap: 5px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  line-height: 1.35;
}

.traffic-user-list li {
  border-top: 1px solid rgba(21, 32, 43, 0.12);
  padding-top: 5px;
}

.traffic-user-list li:first-child {
  border-top: 0;
  padding-top: 0;
}

.traffic-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.traffic-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend-dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 999px;
}

.legend-dot-red {
  background: #a33a32;
}

.legend-dot-yellow {
  background: #f0a830;
}

.legend-dot-green {
  background: #1b8a5a;
}

.traffic-green {
  background: #dff3df;
}

.traffic-yellow {
  background: #fff3c4;
}

.traffic-red {
  background: #ffd7d2;
}

.unavailable-card {
  background: #f7fafc;
}

.pie-chart {
  display: grid;
  width: 190px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(21, 32, 43, 0.12);
}

.pie-chart span {
  display: grid;
  width: 76px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--text);
  font-size: 24px;
  font-weight: 800;
}

.donut-chart {
  width: 220px;
  max-width: 100%;
  height: auto;
}

.donut-track,
.donut-segment {
  fill: none;
  stroke-width: 18;
}

.donut-track {
  stroke: #d8e0e7;
}

.donut-segment {
  transform: rotate(-90deg);
  transform-origin: 60px 60px;
  stroke-linecap: butt;
}

.donut-chart text {
  fill: var(--text);
  font-weight: 800;
}

.donut-chart text + text {
  fill: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.chart-legend {
  display: grid;
  gap: 10px;
}

.chart-legend div {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 4px 8px;
}

.chart-color {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  margin-top: 2px;
}

.chart-legend small {
  grid-column: 2;
  color: var(--muted);
  line-height: 1.4;
}

.sick-days-card {
  max-width: 820px;
}

.sick-days-chart {
  display: grid;
  gap: 12px;
}

.sick-days-row {
  display: grid;
  grid-template-columns: minmax(140px, 220px) 1fr 46px;
  align-items: center;
  gap: 12px;
}

.sick-days-name {
  font-weight: 700;
}

.sick-days-bar {
  display: block;
  height: 18px;
  overflow: hidden;
  border-radius: 4px;
  background: #e9eff4;
}

.sick-days-bar i {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: #f0a830;
}

.sick-days-row strong {
  text-align: right;
}

.daily-strength-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(220px, 1fr));
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.day-strength-card {
  min-width: 220px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.day-strength-card h2 {
  display: grid;
  gap: 3px;
  margin: 0;
  background: #e9eff4;
  color: #354759;
  padding: 12px;
  font-size: 16px;
}

.day-strength-card h2 span {
  color: var(--muted);
  font-size: 13px;
}

.strength-group {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
}

.strength-group h3 {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 4px;
  font-size: 13px;
}

.strength-group div {
  border-radius: 4px;
  padding: 4px 6px;
  font-size: 13px;
}

.strength-present div {
  background: #fff;
}

.strength-urlaub div {
  background: #dff3df;
}

.strength-gleittag div {
  background: #dcecff;
}

.strength-krank div {
  background: #fff3b8;
}

.strength-unknown div {
  background: #ffd7d2;
}

.day-strength-total {
  display: grid;
  gap: 4px;
  border-top: 1px solid var(--line);
  background: #f8fafc;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 12px;
}

.actions {
  white-space: nowrap;
}

.actions > form,
.actions > a,
.actions > button {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  vertical-align: middle;
}

.actions > form + form,
.actions > form + a,
.actions > a + form,
.actions > a + a,
.actions > button + button {
  margin-left: 8px;
}

.actions form {
  margin: 0;
}

.actions button {
  min-height: 0;
  border: 0;
  background: transparent;
  color: var(--danger);
  padding: 0;
}

.icon-action {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--primary-dark);
}

.icon-action:hover {
  background: #eef5fa;
}

.icon-action.danger {
  color: var(--danger);
}

.icon-action.danger:hover {
  background: #ffe8e5;
}

.icon-action.success {
  color: var(--success);
}

.icon-action.success:hover {
  background: #e4f6ee;
}

.icon {
  display: inline-flex;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
}

.icon-logout::before {
  content: "⇥";
}

.icon-about::before {
  content: "i";
  display: inline-grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
}

.icon-vacation::before {
  content: "☀";
}

.icon-settings::before {
  content: "⚙";
}

.icon-download::before {
  content: "↓";
}

.icon-edit::before {
  content: "✎";
}

.icon-disable::before {
  content: "⊘";
}

.icon-approve::before {
  content: "✓";
}

.icon-reject::before {
  content: "×";
}

.icon-copy::before {
  content: "\2398";
  font-size: 18px;
  font-weight: 800;
}

.icon-logout::before {
  content: "\21AA";
  font-size: 21px;
  font-weight: 800;
}

.icon-vacation::before {
  content: "\2600";
}

.icon-settings::before {
  content: "\2699";
}

.status-pill {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
}

.status-pill.offen {
  background: #fff6da;
  color: #81610e;
}

.status-pill.genehmigt {
  background: #e4f6ee;
  color: var(--success);
}

.status-pill.abgelehnt {
  background: #ffe8e5;
  color: var(--danger);
}

.status-pill.storniert {
  background: #eef2f5;
  color: var(--muted);
}

.log-level {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
}

.log-level.info {
  background: #e3eef7;
  color: #164b72;
}

.log-level.kritisch {
  background: #ffe8e5;
  color: #8f261d;
}

.log-context {
  max-width: 280px;
  color: var(--muted);
  font-family: Consolas, Monaco, monospace;
  font-size: 12px;
  white-space: normal;
  word-break: break-word;
}

.pagination {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.approval-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.muted-text {
  color: var(--muted);
  font-size: 13px;
}

.admin-times-table input {
  min-height: 34px;
  padding: 5px 7px;
}

.admin-times-actions {
  margin-top: 18px;
}

.print-modal[hidden] {
  display: none;
}

.print-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  overflow: auto;
  background: rgba(10, 20, 30, 0.72);
  padding: 28px;
}

.print-modal-inner {
  width: min(1000px, 100%);
  margin: 0 auto;
}

.print-modal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.print-modal-bar div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.print-page {
  width: 210mm;
  min-height: 297mm;
  margin: 0 auto;
  background: #fff;
  color: #111;
  padding: 10mm;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
}

.pdf-export-root {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10000;
  width: 210mm;
  background: #fff;
  color: #111;
  pointer-events: none;
}

.pdf-export-page {
  margin: 0 !important;
  box-shadow: none !important;
  background: #fff !important;
}

.print-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 8mm;
}

.print-head img {
  width: 45mm;
  height: auto;
}

.print-head h2 {
  margin: 0 0 4px;
  font-size: 20px;
  text-align: right;
}

.print-head p {
  margin: 0;
  text-align: right;
}

.print-table {
  min-width: 0;
  font-size: 10px;
}

.print-table th,
.print-table td {
  padding: 3px 5px;
}

.print-legend {
  gap: 5px 10px;
  margin-top: 5mm;
  font-size: 10px;
}

.print-legend .legend-color {
  width: 12px;
  height: 12px;
}

.print-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 7mm;
  font-size: 11px;
}

.print-summary span {
  border: 1px solid #bbb;
  padding: 6px;
}

.form-panel {
  max-width: 720px;
}

.user-form-panel {
  max-width: 1320px;
}

.check {
  display: flex;
  gap: 10px;
  align-items: center;
}

.check input {
  width: auto;
  min-height: 0;
}

.form-actions {
  display: flex;
  gap: 12px;
}

.alert {
  margin-bottom: 18px;
  border-radius: 6px;
  padding: 12px 14px;
}

.alert.error {
  background: #ffe8e5;
  color: #8f261d;
}

.alert.success {
  background: #e4f6ee;
  color: #0e6144;
}

@media (max-width: 1180px) {
  .user-form.with-history {
    grid-template-columns: 1fr;
  }

  .user-form.with-history > :not(.contract-history),
  .user-form.with-history .contract-history {
    grid-column: 1;
    grid-row: auto;
  }
}

@media (max-width: 820px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .content {
    padding: 18px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .topbar .user-menu {
    text-align: left;
  }

  .creator-link {
    justify-content: flex-start;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-card dl div {
    grid-template-columns: 1fr;
  }

  .readonly-profile {
    grid-template-columns: 1fr;
  }

  .filters,
  .log-filters,
  .admin-time-filters,
  .daily-strength-filters,
  .statistics-filters,
  .booking-actions,
  .summary-grid,
  .home-status-grid,
  .chart-grid,
  .vacation-cards {
    grid-template-columns: 1fr;
  }

  .sick-days-row {
    grid-template-columns: 1fr;
  }

  .sick-days-row strong {
    text-align: left;
  }

  .password-generator-row {
    grid-template-columns: minmax(0, 1fr) 44px;
  }

  .password-generator-row .secondary-button {
    grid-column: 1 / -1;
    justify-content: center;
  }
}

@media print {
  body * {
    visibility: hidden;
  }

  .print-page,
  .print-page * {
    visibility: visible;
  }

  .print-modal {
    position: static;
    overflow: visible;
    background: #fff;
    padding: 0;
  }

  .print-modal-bar {
    display: none;
  }

  .print-page {
    width: 210mm;
    min-height: 0;
    margin: 0;
    padding: 8mm;
    box-shadow: none;
  }

  @page {
    size: A4 portrait;
    margin: 6mm;
  }
}
