/* ── Design Tokens ───────────────────────────────────────────── */
:root {
  --primary:       #7ccbff;
  --primary-dark:  #0e3f63;
  --primary-light: #7fd3c4;
  --accent:        #b4c5ff;
  --bg:            #0e1624;
  --bg-2:          #111b2b;
  --surface:       rgba(255,255,255,0.06);
  --surface2:      rgba(255,255,255,0.1);
  --surface3:      #1a2340;
  --text:          #eef2ff;
  --muted:         #a5b4d8;
  --border:        rgba(255,255,255,0.14);
  --success:       #22c55e;
  --warning:       #f59e0b;
  --error:         #ef4444;
  --focus-border:  #7fd3c4;
  --focus-ring:    rgba(127,211,196,.22);
  --radius:        18px;
  --radius-sm:     12px;
  --shadow:        0 10px 35px rgba(0,0,0,.35);
  --nav-h:         72px;
  --hdr-h:         60px;
}

/* ── Reset ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  height: 100%; overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background:
    radial-gradient(1200px 600px at 12% -10%, rgba(124,203,255,.24), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(127,211,196,.16), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
}

/* ── Header ──────────────────────────────────────────────────── */
.app-header {
  position: fixed; inset: 0 0 auto 0;
  height: var(--hdr-h);
  background: rgba(17, 24, 39, .7);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  padding: 0 18px; z-index: 200;
  box-shadow: 0 6px 24px rgba(0,0,0,.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  /* Safe area für iPhone-Notch */
  padding-top: env(safe-area-inset-top);
  height: calc(var(--hdr-h) + env(safe-area-inset-top));
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 860px;
}
.header-left  { display: flex; align-items: center; gap: 8px; }
.header-icon  { font-size: 22px; }
.header-brand { display: flex; flex-direction: column; line-height: 1.1; }
.header-title { font-size: 20px; font-weight: 700; letter-spacing: .4px; }
.header-legal { display: flex; align-items: center; gap: 6px; font-size: 11px; opacity: .55; margin-top: 2px; }
.header-legal a { color: inherit; text-decoration: none; white-space: nowrap; }
.header-legal a:hover { text-decoration: underline; opacity: 1; }
.header-legal .legal-sep { opacity: .6; }
.header-right { display: flex; align-items: center; gap: 12px; }
.header-user {
  font-size: 12px;
  color: rgba(255,255,255,.78);
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.header-clock { font-size: 14px; color: rgba(255,255,255,.8); font-variant-numeric: tabular-nums; }
.refresh-btn  {
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); color: #fff;
  width: 32px; height: 32px; border-radius: 50%;
  font-size: 18px; cursor: pointer; line-height: 1;
  transition: background .2s, transform .3s, border-color .2s;
  transform: rotate(60deg);
}
.refresh-btn:hover { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.32); }
.refresh-btn:active { background: rgba(255,255,255,.28); }
.refresh-btn.spinning { animation: spin .8s linear infinite; }

@keyframes spin { from { transform: rotate(60deg); } to { transform: rotate(420deg); } }

/* ── Sprachumschalter ────────────────────────────────────────── */
.lang-btn {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22);
  color: #fff;
  height: 32px; padding: 0 10px;
  border-radius: 16px;
  font-size: 12px; font-weight: 700; letter-spacing: .4px;
  cursor: pointer; line-height: 1; white-space: nowrap;
  transition: background .2s, border-color .2s;
}
.lang-btn:hover  { background: rgba(255,255,255,.2);  border-color: rgba(255,255,255,.32); }
.lang-btn:active { background: rgba(255,255,255,.28); }

.auth-lang { display: flex; justify-content: flex-end; margin-bottom: 4px; }
.auth-lang .lang-btn {
  background: var(--surface2);
  border-color: var(--border);
  color: var(--muted);
}
.auth-lang .lang-btn:hover { color: var(--text); }

/* ── Scroll-Bereich ──────────────────────────────────────────── */
.app-content {
  position: fixed;
  top: calc(var(--hdr-h) + env(safe-area-inset-top));
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
  left: 0; right: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}
.app-content::-webkit-scrollbar { display: none; }

/* ── Seiten ──────────────────────────────────────────────────── */
.page { display: none; padding: 14px 14px 24px; min-height: 100%; }
.page.active { display: block; animation: fadeUp .18s ease; }
#page-projects { position: relative; }

/* ── Inhalt-Breite begrenzen ─────────────────────────────────── */
.page > *,
.page > .filters,
.page > .log-list,
.page > .projects-list,
.page > .section-title,
.page > h2 {
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 600px) {
  .page {
    padding-left: max(24px, calc((100% - 860px) / 2));
    padding-right: max(24px, calc((100% - 860px) / 2));
  }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Timer-Card ──────────────────────────────────────────────── */
.timer-card {
  background: linear-gradient(135deg, rgba(14,63,99,.94) 0%, rgba(124,203,255,.86) 100%);
  border-radius: var(--radius); padding: 20px 20px 18px;
  margin-bottom: 14px; position: relative; overflow: hidden;
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 12px 36px rgba(5,18,35,.45);
}
.timer-card::after {
  content: '';
  position: absolute; inset: -60%; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.06) 0%, transparent 70%);
  animation: glow 4s ease-in-out infinite;
}
@keyframes glow { 0%,100% { transform: scale(.9); } 50% { transform: scale(1.1); } }

.timer-top {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px; position: relative; z-index: 1;
}
.timer-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #fff; flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(255,255,255,.25);
}
.timer-project-name { flex: 1; font-size: 14px; font-weight: 600; opacity: .95; }
.timer-badge {
  padding: 3px 10px; border-radius: 20px;
  font-size: 10px; font-weight: 700; letter-spacing: 1px;
  background: rgba(255,255,255,.2);
}
.timer-badge.paused { background: rgba(245,158,11,.3); color: var(--warning); }

.timer-display {
  font-size: 56px; font-weight: 200; letter-spacing: 2px;
  font-variant-numeric: tabular-nums; line-height: 1;
  margin-bottom: 8px; position: relative; z-index: 1;
}
.timer-desc { font-size: 13px; opacity: .75; position: relative; z-index: 1; }

/* ── Statistik-Kacheln ───────────────────────────────────────── */
.stats-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px; margin-bottom: 20px;
}
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px; text-align: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.stat-val {
  font-size: 22px; font-weight: 700;
  color: var(--accent); font-variant-numeric: tabular-nums;
}
.stat-lbl { font-size: 11px; color: var(--muted); margin-top: 3px; }

/* ── Section Title ───────────────────────────────────────────── */
.section-title {
  font-size: 13px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: .6px;
  margin-bottom: 10px; margin-top: 4px;
}

/* ── WorkLog-Liste ───────────────────────────────────────────── */
.log-list { display: flex; flex-direction: column; gap: 9px; }

.log-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 13px 14px;
  display: grid; grid-template-columns: 4px 1fr auto;
  gap: 12px; align-items: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.log-bar { border-radius: 2px; align-self: stretch; min-height: 40px; }
.log-info { overflow: hidden; }
.log-project { font-size: 11px; font-weight: 700; color: var(--accent); margin-bottom: 2px; }
.log-desc    { font-size: 14px; font-weight: 500; white-space: pre-wrap; word-break: break-word; }
.log-desc.no-desc { color: var(--muted); font-style: italic; font-weight: 400; }
.log-meta    { font-size: 11px; color: var(--muted); margin-top: 3px; }
/* .log-hours is defined below with flex layout */
.log-h-val   { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.log-h-lbl   { font-size: 11px; color: var(--muted); }
.badge-billed   { color: var(--success); }
.badge-unbilled { color: var(--warning); }

/* ── Projekte ────────────────────────────────────────────────── */
.projects-list { display: flex; flex-direction: column; gap: 12px; }

.project-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 14px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.project-card-clickable {
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.project-card-clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,.4);
  border-color: rgba(255,255,255,.24);
}
.project-card-clickable:active {
  transform: translateY(0);
}
.project-card-hint {
  font-size: 11px;
  color: var(--muted);
  text-align: right;
  margin-top: -6px;
  opacity: .7;
}

/* ── Projekt-Detail ──────────────────────────────────────────── */
.project-detail {
  position: absolute;
  inset: 0;
  background: var(--bg);
  overflow-y: auto;
  padding: 0 14px 28px;
  animation: slideInRight .22s ease;
}
@keyframes slideInRight {
  from { transform: translateX(32px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

.project-detail-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 0 12px;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}

.back-btn {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.18);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
}
.back-btn:hover  { background: rgba(255,255,255,.18); }
.back-btn:active { background: rgba(255,255,255,.25); }

.detail-title {
  font-size: 17px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.detail-info-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.project-header { display: flex; align-items: center; gap: 12px; }
.project-avatar {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.project-meta { flex: 1; overflow: hidden; }
.project-name { font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.project-desc { font-size: 13px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.status-pill {
  padding: 4px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 600; white-space: nowrap;
}
.status-active   { background: rgba(34,197,94,.15);  color: var(--success); }
.status-paused   { background: rgba(245,158,11,.15); color: var(--warning); }
.status-archived { background: rgba(148,163,184,.12); color: var(--muted); }

.project-numbers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}
.p-num {
  background: rgba(9,13,28,.5); border: 1px solid rgba(255,255,255,.08); border-radius: 10px;
  padding: 10px; text-align: center;
}
.p-num-val { font-size: 18px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.p-num-val-money {
  font-size: 16px;
  line-height: 1.3;
  word-break: break-word;
}
.p-num-lbl { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ── Edit-Button im Log-Item ────────────────────────────────── */
.log-hours {
  text-align: right;
  white-space: nowrap;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.log-edit-btn {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 8px;
  padding: 3px 7px;
  font-size: 13px;
  cursor: pointer;
  line-height: 1;
  transition: background .15s;
}
.log-edit-btn:hover  { background: rgba(255,255,255,.18); }
.log-edit-btn:active { background: rgba(255,255,255,.28); }

/* ── Edit Modal ──────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fadeIn .15s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: min(480px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
  animation: slideUp .18s ease;
}
@keyframes slideUp {
  from { transform: translateY(16px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 17px; font-weight: 700; }
.modal-close-btn {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.18);
  color: var(--text);
  width: 30px; height: 30px;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  line-height: 1;
  transition: background .15s;
}
.modal-close-btn:hover { background: rgba(255,255,255,.2); }

.modal-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.modal-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.modal-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .4px;
}
.modal-textarea {
  resize: vertical;
  min-height: 70px;
  font-family: inherit;
  line-height: 1.5;
}
.modal-error {
  color: var(--error);
  font-size: 13px;
  padding: 8px 10px;
  background: rgba(239,68,68,.1);
  border-radius: 8px;
  border: 1px solid rgba(239,68,68,.25);
}

.modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 14px 18px 18px;
  border-top: 1px solid var(--border);
}
.modal-btn-primary {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  border: none;
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: filter .2s, transform .15s;
}
.modal-btn-primary:hover    { filter: brightness(1.1); }
.modal-btn-primary:active   { transform: translateY(1px); }
.modal-btn-primary:disabled { opacity: .55; cursor: default; }
.modal-btn-secondary {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-size: 14px;
  cursor: pointer;
  transition: background .15s;
}
.modal-btn-secondary:hover { background: rgba(255,255,255,.15); }
.filters {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 14px;
}
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.filter-group-primary {
  padding: 12px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-sm);
}
.filter-label-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.filter-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: .01em;
}
.filter-hint {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}
.filter-input {
  background: rgba(9,13,28,.55); border: 1px solid rgba(255,255,255,.16);
  color: var(--text); border-radius: var(--radius-sm);
  padding: 10px 12px; font-size: 14px;
  width: 100%; appearance: none; -webkit-appearance: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
  color-scheme: dark;
}
.filter-input:focus {
  outline: none;
  border-color: var(--focus-border);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

/* ── Bottom Navigation ───────────────────────────────────────── */
.bottom-nav {
  position: fixed; inset: auto 0 0 0;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  background: rgba(12,18,36,.75); border-top: 1px solid var(--border);
  display: flex; align-items: flex-start; padding-top: 8px;
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 200;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.nav-btn {
  flex: 1; background: none; border: none;
  color: var(--muted); display: flex; flex-direction: column;
  align-items: center; gap: 3px; padding: 6px 4px;
  cursor: pointer; transition: color .15s, transform .15s;
}
.nav-btn.active { color: var(--accent); }
.nav-btn.active .nav-icon { transform: translateY(-1px); }
.nav-icon { font-size: 22px; }
.nav-lbl  { font-size: 11px; font-weight: 500; }

/* ── Utility ─────────────────────────────────────────────────── */
.hidden { display: none !important; }

.loading {
  text-align: center; color: var(--muted);
  padding: 40px 16px; font-size: 14px;
}
.empty-state {
  text-align: center; padding: 48px 24px; color: var(--muted);
}
.empty-icon  { font-size: 48px; margin-bottom: 12px; }
.empty-title { font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.empty-desc  { font-size: 13px; line-height: 1.5; }

/* ── Auth ────────────────────────────────────────────────────── */
.auth-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-card {
  width: min(420px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.auth-card h1 {
  font-size: 28px;
  margin-bottom: 8px;
}

.auth-subtitle {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 14px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-input {
  width: 100%;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(9,13,28,.55);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  font-size: 14px;
  transition: border-color .2s, box-shadow .2s;
}
.auth-input:focus {
  outline: none;
  border-color: var(--focus-border);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.auth-btn {
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  padding: 11px 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s, filter .2s;
}
.auth-btn:hover { filter: brightness(1.08); }
.auth-btn:active { transform: translateY(1px); }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
}
.auth-btn-google:hover {
  filter: none;
  background: var(--surface3);
  border-color: var(--focus-border);
}
.auth-btn-google .google-icon {
  display: block;
  background: #fff;
  border-radius: 4px;
  padding: 2px;
}

.auth-link-btn {
  margin-top: 10px;
  background: none;
  border: none;
  color: var(--primary-light);
  cursor: pointer;
  display: block;
  width: 100%;
  text-align: center;
}

.auth-error {
  margin-bottom: 10px;
  color: var(--error);
  font-size: 13px;
}

.admin-user-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-user-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.admin-user-email {
  font-size: 13px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-role-select {
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(9,13,28,.55);
  color: var(--text);
  border-radius: 8px;
  padding: 8px;
}

.admin-projects-input {
  width: 100%;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(9,13,28,.55);
  color: var(--text);
  border-radius: 8px;
  padding: 10px;
}

.admin-projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  background: rgba(9,13,28,.35);
}

.admin-project-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
}

.admin-project-item input[type="checkbox"] {
  margin-top: 2px;
}

.admin-project-key {
  color: var(--muted);
  font-size: 11px;
}

.admin-save-btn {
  border: none;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  border-radius: 8px;
  padding: 9px 12px;
  cursor: pointer;
  transition: transform .15s, filter .2s;
}
.admin-save-btn:hover { filter: brightness(1.08); }
.admin-save-btn:active { transform: translateY(1px); }

/* ── Anklickbare Log-Items ───────────────────────────────────── */
.log-item-clickable {
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s;
}
.log-item-clickable:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.22);
}
.log-item-clickable:active { transform: scale(.99); }

/* ── WorkLog Detail Modal ────────────────────────────────────── */
.wld-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
}
.wld-date { font-size: 13px; }
.wld-hours {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.wld-desc {
  font-size: 14px;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  padding: 10px 12px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.wld-section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-top: 4px;
}
.wld-items-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}
.wld-item {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
}
.wld-item-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.wld-item-name { font-size: 14px; font-weight: 500; }
.wld-item-qty  { font-size: 13px; color: var(--accent); font-variant-numeric: tabular-nums; white-space: nowrap; }
.wld-item-notes {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  white-space: pre-wrap;
}

/* ── Materiallisten ──────────────────────────────────────────── */
.ml-project-group { margin-bottom: 20px; }
.ml-project-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  margin-bottom: 8px;
  background: var(--surface);
  border-radius: var(--radius-sm);
}
.ml-project-name { font-weight: 600; font-size: 15px; }
.ml-count { font-size: 12px; color: var(--muted); }

.ml-list-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background .15s;
}
.ml-list-card:hover { background: var(--surface2); }
.ml-list-name { font-weight: 600; font-size: 15px; }
.ml-list-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

.ml-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 8px;
}
.ml-item-info { flex: 1; min-width: 0; }
.ml-item-name { font-weight: 500; font-size: 14px; }
.ml-item-meta {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
  flex-wrap: wrap;
}
.ml-item-notes { font-style: italic; }
.ml-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.ml-status-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  white-space: nowrap;
}
.ml-status-needed   { background: rgba(245,158,11,.18); color: #f59e0b; }
.ml-status-ordered  { background: rgba(59,130,246,.18);  color: #60a5fa; }
.ml-status-delivered { background: rgba(34,197,94,.18); color: #4ade80; }

.ml-status-btn {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.ml-status-btn:hover:not(:disabled) { background: var(--surface2); color: var(--text); }
.ml-status-btn:disabled { opacity: .5; cursor: default; }

/* ── Multi-Tenant: Projekt-Aktionen, Mitglieder ──────────────── */
.page-actions { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.primary-btn {
  background: var(--primary-light);
  color: #06251d;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.primary-btn:hover { filter: brightness(1.05); }

.project-role { font-size: 11px; color: var(--muted); margin-top: 2px; }

.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.chip-btn {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
}
.chip-btn:hover { background: var(--surface3); }
.chip-btn-danger { color: #fca5a5; border-color: rgba(239,68,68,.4); }

.member-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.member-info { min-width: 0; }
.member-email { font-size: 14px; font-weight: 600; word-break: break-all; }
.member-row .member-role { font-size: 12px; color: var(--primary); }
.member-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.member-role-select { width: auto; min-width: 120px; }

.empty-sub { font-size: 13px; color: var(--muted); margin-top: 6px; }



