/* Techniker-Zeitkonto-Portal - mobile-first, Bentomax-CI (Navy/Orange) */

:root {
  --navy: #122941;
  --navy-2: #1c3a5e;
  --orange: #f28a00;
  --green: #2e7d32;
  --red: #c0392b;
  --warn: #b8860b;
  --bg: #f2f5f9;
  --card: #ffffff;
  --text: #1c2530;
  --muted: #6b7684;
  --line: #e3e8ef;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Open Sans', -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  padding-bottom: 76px;
}

.topbar {
  background: var(--navy);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar-title { font-weight: 700; font-size: 16px; }
.topbar-user { font-size: 12px; opacity: .85; text-align: right; }

.content { padding: 14px 12px 24px; max-width: 560px; margin: 0 auto; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 14px;
  box-shadow: 0 1px 4px rgba(18,41,65,.08);
}
.card h3 {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.kpi-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
.kpi-row-3 { grid-template-columns: repeat(3, 1fr); }
.kpi {
  background: var(--card);
  border-radius: var(--radius);
  padding: 12px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(18,41,65,.08);
}
.kpi .value { font-size: 20px; font-weight: 700; color: var(--navy); }
.kpi .label { font-size: 11px; color: var(--muted); margin-top: 3px; }

.month-nav { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 12px; }
.month-nav button {
  border: none; background: var(--navy); color: #fff;
  width: 40px; height: 34px; border-radius: 10px; font-size: 15px; cursor: pointer;
}
.month-nav .label { font-weight: 700; font-size: 14px; color: var(--navy); }

table.zk { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.zk th {
  text-align: left; color: var(--muted); font-weight: 600; font-size: 10.5px;
  padding: 6px 6px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.zk td { padding: 7px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.zk tr.subtotal td {
  background: #eef3f9; font-weight: 700; border-bottom: 2px solid var(--navy);
}
table.zk tr.subtotal .konto-note { display: block; font-weight: 500; font-size: 10.5px; color: var(--muted); margin-top: 2px; }
td.pos { color: var(--green); font-weight: 700; }
td.neg { color: var(--red); font-weight: 700; }
.day-absence td { background: #fcf6ec; }
.tag {
  display: inline-block; background: #eef3f9; color: var(--navy);
  border-radius: 8px; padding: 1px 8px; font-size: 10.5px; font-weight: 600;
}
.tag.warn { background: #fdf3d7; color: var(--warn); }
.tag.off { background: #f0f0f0; color: #999; }

.km-list { display: flex; flex-direction: column; gap: 8px; }
.km-day {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px;
}
.km-day .d { font-weight: 600; font-size: 13px; }
.km-day .r { font-size: 12px; color: var(--muted); }
.km-day .v { font-weight: 700; color: var(--navy); }
.km-day .v.over { color: var(--red); }

.status-pill {
  display: inline-block; padding: 2px 9px; border-radius: 9px;
  font-size: 10.5px; font-weight: 700;
}
.status-eingereicht { background: #fdf3d7; color: var(--warn); }
.status-genehmigt { background: #e4f3e5; color: var(--green); }
.status-abgelehnt { background: #fbe4e1; color: var(--red); }

.btn {
  display: block; width: 100%;
  border: none; background: var(--orange); color: #fff;
  padding: 13px; border-radius: 12px; font-size: 14.5px; font-weight: 700;
  cursor: pointer;
}
.btn.secondary { background: #eef3f9; color: var(--navy); }

.form-group { margin-bottom: 12px; }
.form-group label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 11px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 14px; font-family: inherit; background: #fbfcfe;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.empty { text-align: center; color: var(--muted); font-size: 13px; padding: 22px 10px; }

.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: #fff; border-top: 1px solid var(--line);
  display: flex; z-index: 20; padding-bottom: env(safe-area-inset-bottom);
}
.tabbar .tab {
  flex: 1; border: none; background: none; padding: 12px 4px 14px;
  font-size: 11px; font-weight: 600; color: var(--muted); cursor: pointer;
}
.tabbar .tab.active { color: var(--orange); }

.modal-overlay {
  position: fixed; inset: 0; background: rgba(18,41,65,.5);
  display: flex; align-items: flex-end; justify-content: center; z-index: 50;
}
.modal {
  background: #fff; width: 100%; max-width: 560px;
  border-radius: 18px 18px 0 0; padding: 18px 16px 24px;
  max-height: 88vh; overflow-y: auto;
}
.modal h3 { margin: 0 0 14px; color: var(--navy); font-size: 16px; }
.modal .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }

.loading { text-align: center; padding: 48px 0; color: var(--muted); }
.spinner {
  width: 34px; height: 34px; margin: 0 auto 12px;
  border: 3px solid var(--line); border-top-color: var(--orange);
  border-radius: 50%; animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hint { font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.login-card { max-width: 380px; margin: 30px auto 0; }
.logout-btn {
  background: none; border: 1px solid rgba(255,255,255,.3); color: #fff;
  border-radius: 8px; width: 30px; height: 26px; cursor: pointer; margin-left: 8px;
}
.badge-week-overtime { background: var(--orange); color: #fff; border-radius: 8px; padding: 1px 8px; font-size: 10px; font-weight: 700; }
