/* ══════════════════════════════════════════════════════════════════════
   Restaurator Cloud – Web-UI
   Editorial Atelier-Ästhetik · Waldgrün #597762 · Beige #decda7
   ══════════════════════════════════════════════════════════════════════ */

:root {
  --green:       #597762;
  --green-dark:  #3e5747;
  --green-ink:   #1a2a20;
  --beige:       #decda7;
  --beige-soft:  #eddecc;
  --cream:       #fdfaf3;
  --paper:       #faf7f0;
  --ink:         #1a1a1a;
  --ink-muted:   #525252;
  --ink-soft:    #8a8a86;
  --line:        #e7e1d1;
  --line-strong: #c9bfa3;
  --danger:      #9d3530;
  --warn:        #a66a00;
  --ok:          #3a6b49;

  --shadow-sm:   0 2px 6px rgba(35,28,14,.06);
  --shadow:      0 8px 25px rgba(35,28,14,.08);
  --shadow-lg:   0 24px 60px rgba(35,28,14,.16);

  --radius-sm:   8px;
  --radius:      14px;
  --radius-lg:   20px;
  --radius-xl:   28px;

  --display:     'Cormorant Garamond', 'Times New Roman', Georgia, serif;
  --sans:        'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono:        'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --max-w:       1280px;
  --nav-h:       64px;
}

/* ─── Reset ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0;
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'ss01', 'cv11';
}
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: clamp(32px, 4vw, 44px); }
h2 { font-size: clamp(24px, 3vw, 32px); }
h3 { font-size: 20px; }
h4 { font-size: 17px; font-weight: 700; letter-spacing: .01em; }
p { margin: 0 0 12px; }
button { font-family: var(--sans); }
input, textarea, select { font-family: var(--sans); font-size: 15px; }
img { max-width: 100%; display: block; }

/* Paper texture (sehr subtil) */
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at top, rgba(222,205,167,.18), transparent 60%),
    radial-gradient(ellipse at bottom, rgba(89,119,98,.08), transparent 50%);
  z-index: 0;
}

/* ─── Utility ───────────────────────────────────────────────────────── */
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

.eyebrow {
  display: inline-block;
  font-size: 11px; text-transform: uppercase; letter-spacing: .2em;
  color: var(--green); font-weight: 600;
  margin-bottom: 8px;
}
.muted { color: var(--ink-muted); }
.hairline { border: none; border-top: 1px solid var(--line); margin: 24px 0; }

/* ─── Buttons ───────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 14px; font-weight: 600;
  letter-spacing: .01em;
  cursor: pointer;
  transition: transform .15s, background .15s, filter .15s, box-shadow .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn-lg { height: 52px; padding: 0 22px; font-size: 15px; }
.btn-block { width: 100%; }

.btn-primary {
  background: var(--green); color: white;
  box-shadow: 0 1px 0 rgba(0,0,0,.06), 0 6px 16px rgba(89,119,98,.25);
}
.btn-primary:hover { background: var(--green-dark); filter: brightness(1.05); }

.btn-ghost {
  background: white; color: var(--green-ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover { background: var(--paper); border-color: var(--green); }

.btn-danger-ghost {
  background: white; color: var(--danger);
  border-color: rgba(157,53,48,.3);
}
.btn-danger-ghost:hover { background: rgba(157,53,48,.06); border-color: var(--danger); }

.btn-icon {
  width: 34px; height: 34px; padding: 0; border-radius: 10px;
  background: white; border: 1px solid var(--line);
  color: var(--ink-muted);
}
.btn-icon:hover { color: var(--green); border-color: var(--green); }

.link {
  background: none; border: none; padding: 0;
  color: var(--green); cursor: pointer; font-weight: 600;
  text-decoration: underline; text-underline-offset: 3px;
}
.link-muted { color: var(--ink-muted); font-weight: 500; }

/* ─── Form Fields ───────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span {
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--green); font-weight: 600;
}
.field input, .field textarea, .field select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: white;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(89,119,98,.15);
}
.field textarea { min-height: 90px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

.switch {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.switch:last-child { border-bottom: none; }
.switch-label { font-weight: 500; }
.switch input[type=checkbox] {
  appearance: none; position: relative;
  width: 42px; height: 24px; border-radius: 12px;
  background: #d8d3c4; cursor: pointer;
  transition: background .18s;
  margin: 0;
}
.switch input[type=checkbox]::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px; border-radius: 50%;
  background: white; box-shadow: 0 1px 3px rgba(0,0,0,.2);
  transition: left .18s;
}
.switch input[type=checkbox]:checked { background: var(--green); }
.switch input[type=checkbox]:checked::after { left: 20px; }

/* ═══════════════════════════════════════════════════════════════════════
   LOGIN
   ═══════════════════════════════════════════════════════════════════════ */
.auth-view {
  min-height: 100vh;
  display: grid; place-items: center;
  padding: 40px 20px;
  position: relative;
  overflow: hidden;
}
.auth-backdrop {
  position: absolute; inset: -10%;
  background:
    radial-gradient(ellipse 60% 40% at 20% 30%, rgba(222,205,167,.55), transparent 70%),
    radial-gradient(ellipse 70% 50% at 80% 70%, rgba(89,119,98,.28), transparent 70%),
    linear-gradient(145deg, var(--cream), var(--beige-soft) 80%, var(--beige));
  z-index: 0;
}
.auth-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 460px;
  background: white;
  border-radius: var(--radius-xl);
  padding: 40px 36px 28px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,.9);
}
.auth-brand {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 22px;
}
.auth-logo {
  width: 56px; height: 56px; border-radius: 14px; object-fit: cover;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
}
.auth-wordmark { display: flex; flex-direction: column; }
.auth-eyebrow {
  font-size: 11px; text-transform: uppercase; letter-spacing: .22em;
  color: var(--green); font-weight: 600;
}
.auth-title {
  font-family: var(--display);
  font-size: 34px; line-height: 1;
  font-weight: 600;
  letter-spacing: -.01em;
  margin-top: 2px;
}
.auth-lead {
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 24px;
}
.auth-tabs {
  display: flex; gap: 4px;
  margin-bottom: 22px;
  padding: 4px;
  background: var(--paper);
  border-radius: 12px;
  border: 1px solid var(--line);
}
.auth-tab {
  flex: 1; height: 36px;
  border: none; background: transparent;
  color: var(--ink-muted);
  font-size: 14px; font-weight: 600;
  border-radius: 9px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.auth-tab.is-active {
  background: white;
  color: var(--green);
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.auth-form { display: flex; flex-direction: column; gap: 4px; }
.auth-form .btn { margin-top: 8px; }
#auth-forgot {
  align-self: center; margin-top: 10px;
  font-size: 13px;
}
.auth-error {
  margin-top: 14px;
  padding: 10px 14px;
  background: rgba(157,53,48,.08);
  border: 1px solid rgba(157,53,48,.2);
  border-radius: 10px;
  color: var(--danger);
  font-size: 13px;
}
.auth-foot {
  margin-top: 24px;
  text-align: center;
  color: var(--ink-soft);
}
.auth-foot small { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }

/* ═══════════════════════════════════════════════════════════════════════
   APP SHELL
   ═══════════════════════════════════════════════════════════════════════ */
.app-view { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; }

.app-header {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: saturate(180%) blur(12px);
  background: rgba(253,250,243,.85);
  border-bottom: 1px solid var(--line);
}
.app-header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  height: var(--nav-h);
  padding: 0 24px;
  display: flex; align-items: center; gap: 24px;
}
.app-brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--ink);
}
.app-brand:hover { text-decoration: none; }
.app-logo {
  width: 34px; height: 34px; border-radius: 9px; object-fit: cover;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
}
.app-wordmark { display: flex; flex-direction: column; line-height: 1; }
.app-wordmark em {
  font-family: var(--display); font-style: italic;
  font-size: 11px; letter-spacing: .2em; color: var(--ink-muted);
  font-weight: 500; text-transform: uppercase;
}
.app-wordmark b {
  font-size: 17px; font-weight: 700; letter-spacing: -.01em;
  color: var(--green);
}
.app-nav {
  display: flex; gap: 4px;
  margin-left: 8px;
}
.nav-link {
  padding: 8px 14px;
  border-radius: 10px;
  color: var(--ink-muted);
  font-weight: 500; font-size: 14px;
  transition: background .15s, color .15s;
}
.nav-link:hover { text-decoration: none; background: var(--paper); color: var(--green); }
.nav-link.is-active { background: var(--green); color: white; }
.nav-link.is-active:hover { background: var(--green-dark); color: white; }
.app-user {
  margin-left: auto;
  display: flex; align-items: center; gap: 14px;
}
.user-email { font-size: 13px; color: var(--ink-muted); }

@media (max-width: 820px) {
  .app-header-inner { padding: 0 16px; gap: 12px; }
  .app-nav { display: none; }
  .user-email { display: none; }
  .app-wordmark em { display: none; }
}

.app-main {
  flex: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
  padding: 36px 24px 80px;
}

/* ═══════════════════════════════════════════════════════════════════════
   CARDS / LISTS
   ═══════════════════════════════════════════════════════════════════════ */
.card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-pad { padding: 24px; }
.card-head {
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px;
}
.card-body { padding: 24px; }

.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.page-head .page-title h1 { margin-bottom: 4px; }
.page-head .page-title p { margin: 0; color: var(--ink-muted); font-size: 14px; }
.page-head .page-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.section-title {
  font-family: var(--display);
  font-size: 22px; font-weight: 600;
  margin: 28px 0 14px;
  letter-spacing: -.01em;
}
.ornament {
  display: flex; align-items: center; gap: 14px;
  margin: 16px 0;
  color: var(--line-strong);
}
.ornament::before, .ornament::after {
  content: ''; flex: 1;
  height: 1px; background: var(--line-strong);
}
.ornament-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--green);
}

.empty-state {
  padding: 60px 32px;
  text-align: center;
  color: var(--ink-muted);
  background: var(--paper);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
}
.empty-state h3 { font-family: var(--display); margin-bottom: 8px; color: var(--ink); }

/* ─── Projekt-Grid ──────────────────────────────────────────────────── */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.project-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  overflow: hidden;
  cursor: pointer;
  transition: transform .18s, box-shadow .18s, border-color .18s;
  display: flex; flex-direction: column;
}
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--line-strong);
}
.project-card-img {
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, var(--beige-soft), var(--beige));
  position: relative;
  overflow: hidden;
}
.project-card-img img {
  width: 100%; height: 100%; object-fit: cover;
}
.project-card-img .placeholder {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: var(--green);
  font-family: var(--display);
  font-size: 42px;
  opacity: .4;
}
.project-card-body { padding: 16px 18px 20px; }
.project-card-body h3 {
  font-family: var(--display);
  font-size: 22px; font-weight: 600;
  margin-bottom: 4px;
  letter-spacing: -.01em;
}
.project-card-meta {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-top: 10px;
}
.project-card-meta .chip {
  font-size: 11px;
  padding: 3px 8px;
  background: var(--paper);
  border-radius: 6px;
  color: var(--ink-muted);
  font-weight: 500;
  letter-spacing: .04em;
}

/* ─── Tabs ──────────────────────────────────────────────────────────── */
.tabs {
  display: flex; gap: 2px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  margin-bottom: 28px;
  padding-bottom: 0;
  scrollbar-width: thin;
}
.tab {
  padding: 12px 18px;
  border: none; background: transparent;
  color: var(--ink-muted);
  font-weight: 500; font-size: 14px;
  cursor: pointer; white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.tab:hover { color: var(--green); }
.tab.is-active {
  color: var(--green);
  border-bottom-color: var(--green);
  font-weight: 600;
}

/* ─── Listen-Items ──────────────────────────────────────────────────── */
.list {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  overflow: hidden;
}
.list-item {
  padding: 14px 20px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background .12s;
}
.list-item:last-child { border-bottom: none; }
.list-item:hover { background: var(--paper); }
.list-item-title { font-weight: 600; color: var(--ink); }
.list-item-meta {
  font-size: 12px; color: var(--ink-muted);
  margin-top: 2px;
  display: flex; gap: 10px; flex-wrap: wrap;
}
.list-item-actions { display: flex; gap: 6px; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px; font-weight: 600;
  letter-spacing: .04em;
}
.badge-ok { background: rgba(58,107,73,.15); color: var(--ok); }
.badge-warn { background: rgba(166,106,0,.15); color: var(--warn); }
.badge-danger { background: rgba(157,53,48,.12); color: var(--danger); }
.badge-muted { background: var(--paper); color: var(--ink-muted); }

/* ─── Projekt-Header ────────────────────────────────────────────────── */
.project-hero {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.project-hero-img {
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--beige-soft), var(--beige));
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}
.project-hero-img img { width: 100%; height: 100%; object-fit: cover; }
.project-hero-img .placeholder {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--display); font-size: 54px; color: var(--green); opacity: .4;
}
.project-hero-body h1 { margin-bottom: 4px; }
.project-hero-meta {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin-top: 20px;
}
.project-hero-meta .stat {
  padding: 10px 14px;
  background: var(--paper);
  border-radius: 10px;
  border: 1px solid var(--line);
}
.project-hero-meta .stat-label {
  font-size: 10px; letter-spacing: .15em; text-transform: uppercase;
  color: var(--ink-muted); font-weight: 600;
}
.project-hero-meta .stat-value {
  font-family: var(--display); font-size: 20px; font-weight: 600;
  margin-top: 2px;
}

@media (max-width: 720px) {
  .project-hero { grid-template-columns: 1fr; gap: 18px; }
  .project-hero-img { aspect-ratio: 16/10; }
}

/* ═══════════════════════════════════════════════════════════════════════
   MODAL
   ═══════════════════════════════════════════════════════════════════════ */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(26,26,26,.45);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: grid; place-items: center;
  padding: 20px;
  animation: fadeIn .15s ease-out;
}
.modal {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 560px;
  max-height: 90vh;
  display: flex; flex-direction: column;
  animation: modalIn .22s cubic-bezier(.2,.8,.2,1);
}
.modal-wide { max-width: 780px; }
.modal-head {
  padding: 22px 28px 16px;
  border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px;
}
.modal-head h2 { font-size: 22px; }
.modal-body { padding: 22px 28px; overflow-y: auto; }
.modal-foot {
  padding: 16px 28px 22px;
  display: flex; justify-content: flex-end; gap: 10px;
  border-top: 1px solid var(--line);
}
.modal-close {
  width: 34px; height: 34px; border-radius: 10px;
  border: none; background: transparent;
  font-size: 20px; color: var(--ink-muted);
  cursor: pointer;
}
.modal-close:hover { background: var(--paper); color: var(--ink); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ═══════════════════════════════════════════════════════════════════════
   TOAST
   ═══════════════════════════════════════════════════════════════════════ */
#toast-root {
  position: fixed; top: 80px; right: 20px; z-index: 200;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  padding: 12px 18px;
  background: white;
  border-left: 3px solid var(--green);
  border-radius: 10px;
  box-shadow: var(--shadow);
  font-size: 14px;
  min-width: 240px; max-width: 340px;
  animation: toastIn .22s ease-out;
}
.toast-ok { border-left-color: var(--ok); }
.toast-err { border-left-color: var(--danger); }
.toast-warn { border-left-color: var(--warn); }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ═══════════════════════════════════════════════════════════════════════
   SYNC INDICATOR
   ═══════════════════════════════════════════════════════════════════════ */
.sync-indicator {
  position: fixed; bottom: 20px; right: 20px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 8px 16px;
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; color: var(--ink-muted);
  box-shadow: var(--shadow);
  z-index: 30;
}
.sync-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .4; transform: scale(.85); }
}

/* ═══════════════════════════════════════════════════════════════════════
   SPINNER / LOADING
   ═══════════════════════════════════════════════════════════════════════ */
.spinner {
  width: 24px; height: 24px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
.spinner-lg { width: 40px; height: 40px; border-width: 3px; }
.spinner-center {
  padding: 80px 20px;
  display: grid; place-items: center;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════════════════════════════
   PHOTO GRID
   ═══════════════════════════════════════════════════════════════════════ */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.photo-cell {
  aspect-ratio: 1;
  border-radius: 10px;
  background: var(--paper);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--line);
  cursor: pointer;
}
.photo-cell img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .18s;
}
.photo-cell:hover img { transform: scale(1.05); }
.photo-cell-rm {
  position: absolute; top: 6px; right: 6px;
  width: 24px; height: 24px; border: none;
  background: rgba(0,0,0,.55); color: white;
  border-radius: 50%; cursor: pointer;
  font-size: 14px; line-height: 1;
  display: none;
}
.photo-cell:hover .photo-cell-rm { display: block; }
.photo-upload-cell {
  aspect-ratio: 1;
  border-radius: 10px;
  border: 2px dashed var(--line-strong);
  color: var(--ink-muted);
  display: grid; place-items: center;
  cursor: pointer;
  background: var(--paper);
  transition: border-color .15s, color .15s;
  font-size: 13px; text-align: center;
}
.photo-upload-cell:hover { border-color: var(--green); color: var(--green); }
.photo-upload-cell input { display: none; }

/* ═══════════════════════════════════════════════════════════════════════
   LIGHTBOX
   ═══════════════════════════════════════════════════════════════════════ */
.lightbox {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(0,0,0,.88);
  display: grid; place-items: center;
  cursor: zoom-out;
  animation: fadeIn .15s;
}
.lightbox img {
  max-width: 94vw; max-height: 94vh;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}

/* ═══════════════════════════════════════════════════════════════════════
   TABELLE (Arbeitsstunden, Rechnungen)
   ═══════════════════════════════════════════════════════════════════════ */
.table-wrap {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  overflow: hidden;
}
table.data {
  width: 100%; border-collapse: collapse;
  font-size: 14px;
}
table.data th, table.data td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
table.data th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--ink-muted);
  font-weight: 600;
  background: var(--paper);
}
table.data tbody tr { cursor: pointer; }
table.data tbody tr:hover { background: var(--paper); }
table.data tbody tr:last-child td { border-bottom: none; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ═══════════════════════════════════════════════════════════════════════
   KPI CARDS (Dashboard Stats)
   ═══════════════════════════════════════════════════════════════════════ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}
.kpi {
  background: white;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
}
.kpi-label {
  font-size: 11px; letter-spacing: .15em; text-transform: uppercase;
  color: var(--ink-muted); font-weight: 600;
}
.kpi-value {
  font-family: var(--display);
  font-size: 30px; font-weight: 600;
  margin-top: 4px;
  color: var(--ink);
  letter-spacing: -.01em;
}
.kpi-sub { font-size: 12px; color: var(--ink-muted); margin-top: 2px; }
