:root {
  --bg: #0d1f2d;
  --bg2: #102030;
  --glass: rgba(255,255,255,0.06);
  --glass-border: rgba(255,255,255,0.12);
  --teal: #1a9e8f;
  --teal-light: #22c5b3;
  --teal-dark: #127a6e;
  --orange: #e8833a;
  --orange-light: #f0a060;
  --red: #e05a5a;
  --green: #3db87a;
  --yellow: #f0c040;
  --text: #e8f4f2;
  --text2: #9bbcb8;
  --text3: #5a8a84;
  --card: rgba(255,255,255,0.05);
  --card-hover: rgba(255,255,255,0.09);
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --radius: 16px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body {
  height: 100%;
  font-family: 'Nunito', 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  overflow-x: hidden;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--teal-dark); border-radius: 4px; }

/* ── SCREENS ── */
.screen { display: none; min-height: 100vh; padding-bottom: 80px; }
.screen.active { display: block; }

/* ── TOPBAR ── */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(13,31,45,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  padding: 14px 20px;
  display: flex; align-items: center; gap: 12px;
}
.topbar-title { font-size: 1.15rem; font-weight: 700; flex: 1; }
.topbar-sub { font-size: 0.78rem; color: var(--text2); margin-top: 1px; }
.topbar-right { display: flex; gap: 8px; }

/* ── BOTTOM NAV ── */
.bottomnav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: rgba(13,31,45,0.96);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--glass-border);
  display: flex; height: 64px;
}
.bottomnav.hidden { display: none; }
.nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 3px; cursor: pointer;
  color: var(--text3); transition: color 0.2s; border: none;
  background: transparent; padding: 0; font-family: inherit;
}
.nav-item.active { color: var(--teal-light); }
.nav-item svg { width: 22px; height: 22px; }
.nav-label { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.02em; }

/* ── CARDS ── */
.card {
  background: var(--card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 16px;
  backdrop-filter: blur(8px);
}
.card-hover { cursor: pointer; transition: background 0.2s; }
.card-hover:hover, .card-hover:active { background: var(--card-hover); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 12px 20px; border-radius: 12px;
  font-family: inherit; font-size: 0.95rem; font-weight: 700;
  cursor: pointer; border: none; transition: all 0.2s; text-decoration: none;
}
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-light); }
.btn-secondary { background: var(--glass); color: var(--text); border: 1px solid var(--glass-border); }
.btn-secondary:hover { background: var(--card-hover); }
.btn-danger { background: rgba(224,90,90,0.15); color: var(--red); border: 1px solid rgba(224,90,90,0.3); }
.btn-danger:hover { background: rgba(224,90,90,0.25); }
.btn-orange { background: var(--orange); color: #fff; }
.btn-orange:hover { background: var(--orange-light); }
.btn-sm { padding: 8px 14px; font-size: 0.82rem; border-radius: 9px; }
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── FAB ── */
.fab {
  position: fixed; bottom: 80px; right: 20px; z-index: 90;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--teal); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; border: none; cursor: pointer;
  box-shadow: 0 4px 20px rgba(26,158,143,0.5);
  transition: all 0.2s;
}
.fab:hover { background: var(--teal-light); transform: scale(1.05); }
.fab.hidden { display: none; }

/* ── INPUTS ── */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 0.8rem; font-weight: 700; color: var(--text2); margin-bottom: 6px; letter-spacing: 0.04em; text-transform: uppercase; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--glass-border);
  border-radius: 10px; color: var(--text);
  font-family: inherit; font-size: 0.95rem;
  transition: border-color 0.2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--teal);
}
.field select option { background: #1a2d3d; color: var(--text); }
.field textarea { resize: vertical; min-height: 70px; }

/* ── MODAL ── */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
  align-items: center; justify-content: center;
  padding: 16px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #122535;
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 0; width: 100%; max-width: 480px; max-height: 92vh;
  overflow-y: auto; position: relative;
}
.modal-handle { display: none; }
.modal-header {
  padding: 16px 20px 12px;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--glass-border);
}
.modal-title { font-size: 1.05rem; font-weight: 800; flex: 1; }
.modal-body { padding: 20px; }
.modal-footer { padding: 12px 20px 24px; display: flex; gap: 10px; }

/* ── LOGIN ── */
#screen-login.active {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: 100vh; padding: 40px 24px; padding-bottom: 40px;
  background: radial-gradient(ellipse at 30% 20%, rgba(26,158,143,0.15) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 80%, rgba(232,131,58,0.08) 0%, transparent 50%),
              var(--bg);
}
.login-logo {
  width: 80px; height: 80px; border-radius: 24px;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem; margin-bottom: 24px;
  box-shadow: 0 8px 32px rgba(26,158,143,0.4);
}
.login-title { font-size: 2rem; font-weight: 900; text-align: center; margin-bottom: 4px; }
.login-sub { color: var(--text2); text-align: center; margin-bottom: 36px; font-size: 0.9rem; }
.login-card { width: 100%; max-width: 380px; }

/* ── HOME / HEUTE ── */
.page-pad { padding: 16px; }
.stats-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.stat-card {
  background: var(--card); border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm); padding: 14px;
  text-align: center;
}
.stat-val { font-size: 1.8rem; font-weight: 900; color: var(--teal-light); }
.stat-lbl { font-size: 0.72rem; color: var(--text2); margin-top: 2px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }

.section-title {
  font-size: 0.75rem; font-weight: 800; color: var(--text2);
  text-transform: uppercase; letter-spacing: 0.06em;
  margin: 16px 0 8px;
}

/* ── ENTRY ITEM ── */
.entry-item {
  background: var(--card); border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm); padding: 13px 14px;
  margin-bottom: 8px; cursor: pointer; transition: background 0.2s;
  display: flex; align-items: flex-start; gap: 12px;
}
.entry-item:hover { background: var(--card-hover); }
.entry-dot {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0; margin-top: 1px;
}
.entry-info { flex: 1; min-width: 0; }
.entry-client { font-weight: 700; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entry-time { font-size: 0.8rem; color: var(--text2); margin-top: 2px; }
.entry-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 5px; }
.tag {
  font-size: 0.68rem; padding: 2px 8px; border-radius: 20px;
  font-weight: 700; letter-spacing: 0.02em;
}
.entry-hours { font-size: 1rem; font-weight: 800; color: var(--teal-light); flex-shrink: 0; margin-top: 8px; }

/* ── TIMER BUTTON ── */
.timer-bar {
  background: rgba(26,158,143,0.15);
  border: 1px solid rgba(26,158,143,0.3);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 12px; cursor: pointer;
}
.timer-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); animation: pulse 1s infinite; }
.timer-label { flex: 1; font-weight: 700; font-size: 0.9rem; color: var(--teal-light); }
.timer-time { font-size: 1.3rem; font-weight: 900; font-variant-numeric: tabular-nums; color: var(--text); }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.3} }

/* ── CHIPS (Leistungsarten) ── */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 8px 14px; border-radius: 20px;
  border: 1px solid var(--glass-border);
  background: var(--glass); color: var(--text2);
  font-size: 0.82rem; font-weight: 700; cursor: pointer;
  transition: all 0.2s; font-family: inherit;
}
.chip.selected {
  background: rgba(26,158,143,0.25);
  border-color: var(--teal);
  color: var(--teal-light);
}

/* ── STATUS PILLS ── */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.03em;
}
.pill-draft { background: rgba(90,138,132,0.2); color: var(--text2); }
.pill-pending { background: rgba(240,192,64,0.2); color: var(--yellow); }
.pill-signed { background: rgba(26,158,143,0.2); color: var(--teal-light); }
.pill-submitted { background: rgba(61,184,122,0.2); color: var(--green); }
.pill-approved { background: rgba(61,184,122,0.3); color: var(--green); }

/* ── SIGNATURE CANVAS ── */
.sig-wrap {
  border: 2px dashed var(--glass-border); border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.03); position: relative;
  overflow: hidden;
}
.sig-wrap canvas { display: block; touch-action: none; cursor: crosshair; }
.sig-hint {
  position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; color: var(--text3); font-size: 0.85rem;
  pointer-events: none; transition: opacity 0.2s;
}

/* ── REPORT GROUP ── */
.report-group { margin-bottom: 16px; }
.report-group-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  background: rgba(26,158,143,0.1);
  border: 1px solid rgba(26,158,143,0.2);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  font-weight: 700;
}
.report-group-body {
  border: 1px solid var(--glass-border); border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  overflow: hidden;
}
.report-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid var(--glass-border);
  font-size: 0.88rem;
}
.report-row:last-child { border-bottom: none; }
.report-row-date { color: var(--text2); width: 70px; flex-shrink: 0; }
.report-row-info { flex: 1; }
.report-row-hrs { font-weight: 800; color: var(--teal-light); }
.sig-status { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; }
.sig-check { color: var(--green); }
.sig-pending-icon { color: var(--yellow); }

/* ── MANAGER CARDS ── */
.mgr-employee-card {
  background: var(--card); border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm); padding: 14px;
  margin-bottom: 10px; cursor: pointer; transition: background 0.2s;
  display: flex; align-items: center; gap: 14px;
}
.mgr-employee-card:hover { background: var(--card-hover); }
.mgr-avatar {
  width: 44px; height: 44px; border-radius: 14px;
  background: linear-gradient(135deg, var(--teal-dark), var(--teal));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 900; flex-shrink: 0;
}
.mgr-info { flex: 1; min-width: 0; }
.mgr-name { font-weight: 700; }
.mgr-detail { font-size: 0.78rem; color: var(--text2); margin-top: 2px; }
.status-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
}
.dot-green { background: var(--green); }
.dot-yellow { background: var(--yellow); }
.dot-red { background: var(--red); }
.dot-gray { background: var(--text3); }

/* ── EMPTY STATE ── */
.empty {
  text-align: center; padding: 40px 20px; color: var(--text3);
}
.empty-icon { font-size: 3rem; margin-bottom: 10px; }
.empty-text { font-size: 0.9rem; }

/* ── DIVIDER ── */
.divider { height: 1px; background: var(--glass-border); margin: 16px 0; }

/* ── ALERT ── */
.alert {
  padding: 10px 14px; border-radius: 10px;
  font-size: 0.84rem; margin-bottom: 14px;
  display: flex; align-items: flex-start; gap: 8px;
}
.alert-warn { background: rgba(240,192,64,0.1); border: 1px solid rgba(240,192,64,0.3); color: var(--yellow); }
.alert-info { background: rgba(26,158,143,0.1); border: 1px solid rgba(26,158,143,0.3); color: var(--teal-light); }
.alert-ok { background: rgba(61,184,122,0.1); border: 1px solid rgba(61,184,122,0.3); color: var(--green); }

/* ── TIME RANGE ── */
.time-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; }
.time-sep { text-align: center; color: var(--text3); font-weight: 700; font-size: 1.1rem; }

/* ── CLIENT PROFILE ── */
.client-info-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--glass-border); }
.client-info-row:last-child { border-bottom: none; }
.client-info-label { font-size: 0.75rem; color: var(--text2); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; width: 110px; flex-shrink: 0; }
.client-info-val { flex: 1; font-size: 0.9rem; }

/* ── PRINT ── */
@media print {
  .topbar, .bottomnav, .fab, .btn, .modal-overlay { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .print-only { display: block !important; }
}
.print-only { display: none; }

/* ── RESPONSIVE ── */
