/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:       #FF6B35;
  --primary-dark:  #E55A26;
  --primary-light: #FFE8DF;
  --secondary:     #4ECDC4;
  --secondary-light: #E0F7F5;
  --bg:            #FFF8F3;
  --surface:       #FFFFFF;
  --surface2:      #FFF0E8;
  --border:        #F0DDD4;
  --text:          #2D1B12;
  --text-secondary:#7A5C4F;
  --success:       #52B788;
  --success-light: #D8F3E5;
  --warning:       #FFD166;
  --warning-light: #FFF8E1;
  --danger:        #EF476F;
  --danger-light:  #FDEAF0;
  --radius:        12px;
  --radius-sm:     8px;
  --shadow:        0 2px 12px rgba(45,27,18,.08);
  --shadow-lg:     0 8px 32px rgba(45,27,18,.14);
  --sidebar-w:     240px;
  font-size: 15px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

.hidden { display: none !important; }

/* ── Login ── */
.login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1rem;
  background: linear-gradient(135deg, #FF6B35 0%, #FFD166 50%, #4ECDC4 100%);
}

.login-card {
  background: var(--surface);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.login-logo-img { width: 130px; height: auto; margin-bottom: .5rem; }
.login-schriftzug { width: 100%; max-width: 300px; height: auto; margin-bottom: .5rem; }
.login-subtitle { color: var(--text-secondary); margin-bottom: 2rem; font-size: .95rem; }

/* ── App Shell ── */
.app {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1.5px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  box-shadow: 2px 0 12px rgba(45,27,18,.06);
  transition: transform .25s ease;
}

.sidebar-brand {
  background: var(--primary);
  padding: 1.1rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
}
.sidebar-logo { height: 52px; width: auto; }
.sidebar-schriftzug { width: 100%; max-width: 160px; height: auto; filter: brightness(0) invert(1); }

.sidebar-nav {
  flex: 1;
  padding: 1rem .75rem;
  display: flex;
  flex-direction: column;
  gap: .25rem;
  overflow-y: auto;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: .65rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: .7rem .9rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: .92rem;
  font-weight: 600;
  text-align: left;
  width: 100%;
  transition: background .15s, color .15s;
}
.nav-btn:hover { background: var(--primary-light); color: var(--primary); }
.nav-btn.active { background: var(--primary); color: #fff; }
.nav-icon { font-size: 1.1rem; flex-shrink: 0; }

.sidebar-footer {
  padding: 1rem .75rem;
  border-top: 1.5px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.sidebar-user-name {
  font-weight: 700;
  font-size: .92rem;
  color: var(--text);
}
.sidebar-user-role {
  font-size: .78rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 600;
}

.sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.sidebar-version {
  text-align: center;
  font-size: .72rem;
  color: var(--border);
  font-weight: 600;
  letter-spacing: .05em;
  padding-top: .25rem;
}

/* ── Mobile Topbar ── */
.mobile-topbar {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 54px;
  background: var(--surface);
  border-bottom: 1.5px solid var(--border);
  z-index: 90;
  align-items: center;
  justify-content: space-between;
  padding: 0 .75rem;
  box-shadow: 0 2px 8px rgba(45,27,18,.07);
}

.mobile-topbar-title {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 700;
  font-size: .95rem;
  color: var(--text);
}
.mobile-topbar-logo { height: 30px; width: auto; }

.hamburger {
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem;
  display: flex;
  flex-direction: column;
  gap: 5px;
  border-radius: var(--radius-sm);
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.hamburger:hover { background: var(--primary-light); }

/* Sidebar Overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(45,27,18,.4);
  z-index: 99;
  backdrop-filter: blur(1px);
}

/* ── Content Area ── */
.content-wrap {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
}

.view {
  padding: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}
.view.active { display: block; }

/* ── View Header ── */
.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.view-header h2 { font-size: 1.25rem; font-weight: 700; color: var(--text); }

.month-nav { display: flex; align-items: center; gap: .75rem; }
.month-nav h2 { min-width: 180px; text-align: center; }

/* ── Summary Bar ── */
.summary-bar {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.summary-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: .85rem 1.25rem;
  min-width: 130px;
  flex: 1;
}
.summary-card .sc-label { font-size: .78rem; color: var(--text-secondary); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.summary-card .sc-value { font-size: 1.5rem; font-weight: 800; color: var(--primary); margin-top: .1rem; }
.summary-card.ok .sc-value { color: var(--success); }
.summary-card.warn .sc-value { color: var(--danger); }

/* ── Tables ── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow); }

.time-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
}

.time-table th {
  background: var(--primary);
  color: #fff;
  padding: .75rem 1rem;
  text-align: left;
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}

.time-table td {
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: .9rem;
  vertical-align: middle;
}

.time-table tbody tr:last-child td { border-bottom: none; }
.time-table tbody tr:hover { background: var(--primary-light); }

.time-table tfoot td {
  font-weight: 700;
  background: var(--surface2);
  padding: .8rem 1rem;
  border-top: 2px solid var(--primary-light);
}

.empty-row { text-align: center; color: var(--text-secondary); padding: 2.5rem !important; font-style: italic; }

.date-cell { white-space: nowrap; font-weight: 600; }
.date-cell .weekday { font-size: .78rem; color: var(--text-secondary); font-weight: 400; }
.time-cell { font-variant-numeric: tabular-nums; white-space: nowrap; }
.hours-cell { font-weight: 700; font-variant-numeric: tabular-nums; }
.taetigkeit-cell { max-width: 220px; color: var(--text-secondary); font-size: .85rem; }
.actions-cell { white-space: nowrap; text-align: right; }

.time-table tbody tr.weekend { background: #FFF5F0; }
.time-table tbody tr.weekend:hover { background: var(--primary-light); }

/* Print-Elemente auf Screen verstecken */
.print-header, .print-employee-info, .print-feiertage, .print-signature { display: none; }

/* Tätigkeit Sub-Row (nur auf Mobile sichtbar) */
.taetigkeit-sub-row { display: none; }
.taetigkeit-sub-cell {
  padding-top: 0 !important;
  padding-bottom: .55rem !important;
  color: var(--text-secondary);
  font-size: .82rem;
  font-style: italic;
  border-bottom: 1px solid var(--border);
}
.taetigkeit-sub-row.weekend .taetigkeit-sub-cell { background: #FFF5F0; }

/* Status badges */
.badge {
  display: inline-block;
  padding: .2rem .55rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
}
.badge-green { background: var(--success-light); color: #2D6A4F; }
.badge-orange { background: var(--warning-light); color: #8B5E0A; }
.badge-red { background: var(--danger-light); color: #9B1B3A; }
.badge-gray { background: #F0EDE9; color: var(--text-secondary); }

.role-badge { font-size: .75rem; font-weight: 600; padding: .2rem .55rem; border-radius: 999px; }
.role-mitarbeiter { background: var(--secondary-light); color: #1A6B66; }
.role-lohnbuchhaltung { background: var(--warning-light); color: #7A5000; }
.role-admin { background: var(--primary-light); color: var(--primary-dark); }

/* ── Monatsbericht ── */
.bericht-user-block {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.bericht-user-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--secondary);
  color: #fff;
  padding: .85rem 1.25rem;
}
.bericht-user-header h3 { font-size: 1rem; font-weight: 700; }
.bericht-user-header .bericht-meta { font-size: .85rem; opacity: .9; }

.bericht-user-block .time-table th { background: var(--secondary); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  border: none;
  border-radius: var(--radius-sm);
  padding: .55rem 1.1rem;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, transform .1s, opacity .15s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: default; }

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); }

.btn-secondary { background: var(--secondary); color: #fff; }
.btn-secondary:hover:not(:disabled) { background: #3ABBB3; }

.btn-ghost { background: transparent; color: var(--text-secondary); border: 1.5px solid var(--border); }
.btn-ghost:hover:not(:disabled) { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #D93860; }

.btn-sm { padding: .35rem .75rem; font-size: .82rem; }
.btn-block { width: 100%; justify-content: center; }
.btn-icon { padding: .35rem .55rem; }

/* ── Forms ── */
.form-group { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
.form-group label { font-size: .82rem; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .04em; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .75rem; margin-bottom: 0; }
.form-row .form-group { margin-bottom: 0; }

input, select, textarea {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .6rem .85rem;
  font-size: .95rem;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  width: 100%;
  transition: border-color .15s;
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  background: #fff;
}
textarea { resize: vertical; }

.hint { font-size: .75rem; font-weight: 400; color: var(--text-secondary); }

.error-msg {
  background: var(--danger-light);
  border: 1px solid #F7B8C8;
  border-radius: var(--radius-sm);
  color: var(--danger);
  padding: .6rem .85rem;
  font-size: .85rem;
  margin-bottom: .5rem;
}

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(45,27,18,.45);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(2px);
}

.modal {
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  display: none;
}
.modal.active { display: block; }
.modal-sm { max-width: 380px; }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1.5rem .75rem;
  border-bottom: 1.5px solid var(--border);
  position: sticky; top: 0; background: var(--surface); z-index: 1;
}
.modal-header h3 { font-size: 1.05rem; font-weight: 700; }
.modal-close {
  background: none; border: none; cursor: pointer;
  font-size: 1.4rem; color: var(--text-secondary); line-height: 1;
  padding: .1rem .4rem; border-radius: 6px;
}
.modal-close:hover { background: var(--primary-light); color: var(--primary); }

.modal form { padding: 1.25rem 1.5rem; }

.modal-footer {
  display: flex; gap: .75rem; justify-content: flex-end;
  padding-top: .5rem;
}

/* ── Toast ── */
#toast-container {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  display: flex; flex-direction: column; gap: .5rem;
  z-index: 999; pointer-events: none;
}

.toast {
  background: var(--text);
  color: #fff;
  padding: .7rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: .88rem; font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn .2s ease;
  max-width: 320px;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Stempeluhr ── */
.sz-fab {
  position: fixed; bottom: 1.75rem; right: 1.75rem; z-index: 150;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--primary); color: #fff; border: none; cursor: pointer;
  box-shadow: 0 4px 16px rgba(255,107,53,.45);
  font-size: 1.5rem; display: flex; align-items: center; justify-content: center;
  transition: transform .15s, background .15s;
}
.sz-fab:hover { background: var(--primary-dark); transform: scale(1.08); }
.sz-fab-dot {
  position: absolute; top: 6px; right: 6px;
  width: 13px; height: 13px; border-radius: 50%;
  background: #2ECC71; border: 2px solid #fff;
  animation: sz-pulse 1.5s infinite;
}
@keyframes sz-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(46,204,113,.6); }
  50%      { box-shadow: 0 0 0 6px rgba(46,204,113,0); }
}

.sz-modal {
  position: fixed; inset: 0; z-index: 210;
  background: rgba(45,27,18,.45); backdrop-filter: blur(2px);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 1rem;
}
@media (min-width: 480px) { .sz-modal { align-items: center; } }

.sz-card {
  background: var(--surface); border-radius: 20px 20px 16px 16px;
  width: 100%; max-width: 420px;
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.sz-header {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--primary); color: #fff;
  padding: 1rem 1.25rem;
}
.sz-header-title { font-size: 1rem; font-weight: 700; }

.sz-pane { padding: 1.25rem 1.5rem 1.5rem; }
.sz-hint { font-size: .85rem; color: var(--text-secondary); margin-bottom: 1rem; }

.sz-timer-display {
  font-size: 3rem; font-weight: 800; text-align: center;
  font-variant-numeric: tabular-nums; letter-spacing: .02em;
  color: var(--primary); margin: .5rem 0 1.25rem;
  font-family: 'Courier New', monospace;
}
.sz-warn {
  background: var(--warning-light); color: #7A5000;
  border-radius: var(--radius-sm); padding: .5rem .85rem;
  font-size: .82rem; font-weight: 600; margin-bottom: 1rem; text-align: center;
}

.sz-pause-btns { display: flex; gap: .3rem; flex-wrap: wrap; margin-bottom: .4rem; }
.sz-pb {
  flex: 1 1 auto; min-width: 38px;
  padding: .4rem .3rem; border-radius: 6px;
  border: 1.5px solid var(--border); cursor: pointer;
  font-size: .82rem; font-weight: 600;
  background: var(--bg); color: var(--text);
  transition: background .12s;
}
.sz-pb.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.sz-pb:hover:not(.active) { background: var(--primary-light); }

.sz-summary-table { width: 100%; border-collapse: collapse; }
.sz-summary-table td {
  padding: .55rem .25rem; border-bottom: 1px solid var(--border);
  font-size: .9rem;
}
.sz-summary-table td:first-child { color: var(--text-secondary); width: 45%; }
.sz-summary-table td:last-child { font-weight: 600; }
.sz-sum-total td { font-size: 1.05rem !important; color: var(--primary) !important; border-bottom: none; }
.sz-summary-table input[type=time] { width: auto; padding: .3rem .5rem; font-size: .9rem; }

/* ── Danger Zone ── */
.danger-zone {
  margin-top: 2rem;
  border: 1.5px solid #F7B8C8;
  border-radius: var(--radius);
  overflow: hidden;
}
.danger-zone-title {
  background: var(--danger-light);
  color: var(--danger);
  padding: .75rem 1.25rem;
  font-size: .9rem;
  font-weight: 700;
}
.danger-zone-body { padding: 1rem 1.25rem; display: flex; flex-direction: column; gap: 1rem; }
.danger-action {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.danger-action:last-child { border-bottom: none; padding-bottom: 0; }
.danger-action p { font-size: .82rem; color: var(--text-secondary); margin-top: .2rem; }

/* ── Feiertage ── */
.feiertage-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
  margin-bottom: 1rem; font-size: .83rem;
}
.feiertage-bar.mb { margin-bottom: 1.25rem; }
.ft-label { font-weight: 700; color: var(--text-secondary); white-space: nowrap; }
.ft-chip {
  background: var(--warning-light);
  border: 1px solid #FFD166;
  border-radius: 999px;
  padding: .15rem .6rem;
  color: #7A5000;
  font-weight: 500;
  white-space: nowrap;
}

/* ── Print ── */
@media print {
  @page {
    size: A4 portrait;
    margin: 10mm 12mm 12mm 12mm;
  }

  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }

  html, body { width: 210mm; font-size: 9pt; background: #fff; margin: 0; padding: 0; }
  .content-wrap, #view-monatsbericht, #bericht-container { margin-top: 0 !important; padding-top: 0 !important; }

  .sidebar, .mobile-topbar, .view-header, #toast-container, .sz-fab, .sz-modal,
  .modal-overlay, .feiertage-bar { display: none !important; }

  .content-wrap { margin-left: 0 !important; }
  .view { padding: 0 !important; max-width: none !important; width: 100% !important; }

  /* Jeder Mitarbeiter-Block = eigene Seite */
  .bericht-user-block {
    page-break-after: always;
    break-after: page;
    box-shadow: none !important;
    border: none !important;
    width: 100%;
  }
  .bericht-user-block:last-child {
    page-break-after: avoid;
    break-after: avoid;
  }

  /* Kopfzeile + Infozeile nie von Tabelle getrennt */
  .print-header, .print-employee-info, .print-feiertage {
    page-break-after: avoid;
    break-after: avoid;
  }

  /* Print-Kopfzeile */
  .print-header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2pt solid #FF6B35;
    padding-bottom: 3mm;
    margin-bottom: 3mm;
  }
  .print-header-left { display: flex; align-items: center; gap: 3mm; }
  .print-header-logo { height: 14mm; width: auto; }
  .print-header-title h1 { font-size: 13pt; font-weight: 800; color: #2D1B12; margin: 0; }
  .print-header-title p  { font-size: 8pt; color: #7A5C4F; margin: 0; }
  .print-header-month .month-big { font-size: 12pt; font-weight: 700; color: #FF6B35; }

  /* Mitarbeiter-Infozeile */
  .print-employee-info {
    display: flex !important;
    gap: 3mm;
    margin-bottom: 2mm;
    background: #FFF8F3;
    border: 1px solid #F0DDD4;
    border-radius: 3pt;
    padding: 2mm 3mm;
  }
  .print-info-cell { flex: 1; }
  .print-info-label { font-size: 6.5pt; color: #7A5C4F; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
  .print-info-value { font-size: 9.5pt; font-weight: 700; color: #2D1B12; }
  .print-info-value.ok   { color: #2D6A4F; }
  .print-info-value.warn { color: #EF476F; }

  /* Feiertage im Print */
  .print-feiertage {
    display: flex !important;
    flex-wrap: wrap;
    gap: 1.5mm;
    margin-bottom: 2mm;
    font-size: 7.5pt;
    align-items: center;
  }
  .print-feiertage .ft-label { font-weight: 700; color: #7A5C4F; }
  .print-feiertage .ft-chip {
    background: #FFF8E1 !important;
    border: 1px solid #FFD166;
    border-radius: 999px;
    padding: .3mm 2mm;
    color: #7A5000;
    font-weight: 500;
  }

  /* Tabelle im Print – Tätigkeit als Spalte, Sub-Rows verstecken */
  .bericht-user-header { display: none !important; }
  tr.taetigkeit-sub-row { display: none !important; }
  .time-table th:nth-child(6) { display: table-cell !important; }
  .taetigkeit-cell            { display: table-cell !important; max-width: none; font-size: 7.5pt; color: #5A4A42; }

  .table-wrap { box-shadow: none !important; overflow: visible !important; border-radius: 0; }

  .time-table { font-size: 8pt; width: 100%; border-collapse: collapse; table-layout: fixed; }
  .time-table th {
    background: #FF6B35 !important;
    color: #fff !important;
    padding: 1.5mm 2mm;
    font-size: 7pt;
    font-weight: 700;
    white-space: nowrap;
  }
  /* Spaltenbreiten: Datum | Beginn | Ende | Pause | Netto | Tätigkeit */
  .time-table th:nth-child(1), .time-table td:nth-child(1) { width: 22%; }
  .time-table th:nth-child(2), .time-table td:nth-child(2) { width: 11%; }
  .time-table th:nth-child(3), .time-table td:nth-child(3) { width: 11%; }
  .time-table th:nth-child(4), .time-table td:nth-child(4) { width: 11%; display: table-cell !important; }
  .time-table th:nth-child(5), .time-table td:nth-child(5) { width: 11%; }
  .time-table th:nth-child(6), .time-table td:nth-child(6) { width: 34%; }
  /* Aktions-Spalte im Print verstecken */
  .time-table th:nth-child(7), .time-table td:nth-child(7) { display: none !important; }

  .time-table td {
    padding: 1.2mm 2mm;
    border-bottom: 0.3pt solid #E0D0C8;
    font-size: 8pt;
    vertical-align: middle;
    overflow: hidden;
  }
  .time-table tfoot td {
    background: #FFF0E8 !important;
    font-weight: 700;
    border-top: 1pt solid #F0DDD4;
    font-size: 8.5pt;
    padding: 1.5mm 2mm;
  }
  .time-table tbody tr.weekend td { background: #FFF5F0 !important; }
  .time-table tbody tr:hover { background: none !important; }

  .badge-green { background: #D8F3E5 !important; color: #2D6A4F !important; padding: .2mm 1.5mm; }
  .badge-red   { background: #FDEAF0 !important; color: #9B1B3A !important; padding: .2mm 1.5mm; }
  .date-cell .weekday { font-size: 6.5pt; }

  /* Unterschriftszeile */
  .print-signature {
    display: flex !important;
    gap: 15mm;
    margin-top: 6mm;
    page-break-inside: avoid;
    break-inside: avoid;
  }
  .print-sig-field { flex: 1; }
  .print-sig-line  { border-top: 0.5pt solid #2D1B12; padding-top: 1.5mm; }
  .print-sig-label { font-size: 7pt; color: #7A5C4F; }

  #view-zeiterfassung, #view-admin { display: none !important; }
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(calc(-1 * var(--sidebar-w)));
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-overlay.open {
    display: block;
  }
  .mobile-topbar {
    display: flex;
  }
  .content-wrap {
    margin-left: 0;
    padding-top: 54px;
  }
  .view { padding: 1rem .75rem; }
  .month-nav h2 { min-width: 140px; font-size: 1rem; }
  .summary-card { min-width: 110px; }
  .sz-fab { bottom: 1.25rem; right: 1.25rem; }

  /* Nur Tätigkeit-Spalte ausblenden, stattdessen Sub-Row zeigen */
  .time-table th:nth-child(6),
  .time-table td.taetigkeit-cell { display: none; }
  .taetigkeit-sub-row { display: table-row !important; }

  /* Leere Aktions-Spalte ausblenden */
  .time-table th:last-child:empty,
  .time-table td.actions-cell { display: none; }

  .table-wrap { overflow-x: auto; }
}
