/* base.css – Grundlagen: Farben, Typografie, Buttons, Formulare, öffentliche Seiten, App-Gerüst
   Reihenfolge der Dateien: base, components, tasks, projects, calendar, notes, finance, dashboard, time (jede Seite lädt nur, was sie braucht). */

/* ==========================================================================
   Project Hub — Clean Apple-inspired design (white & blue)
   ========================================================================== */
:root {
  --bg: #ffffff;
  --bg-soft: #f5f5f7;
  --surface: #ffffff;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #86868b;
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.14);

  /* Akzentfarbe – pro Benutzer wählbar (siehe „Akzentfarben“ unten) */
  --accent: #0071e3;

  --red: #e30000;
  --red-soft: #fdecec;
  --green: #1d8a3a;
  --green-soft: #e9f7ed;

  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 1px rgba(0, 0, 0, 0.02);
  --shadow: 0 2px 6px rgba(0, 0, 0, 0.04), 0 12px 32px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.04), 0 30px 80px rgba(0, 40, 100, 0.12);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue",
    "Segoe UI", Inter, Roboto, Arial, sans-serif;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --nav-h: 64px;
}

/* Alle Akzent-Abstufungen leiten sich von --accent ab. Sie stehen zusätzlich auf jedem Element
   mit data-accent, damit z. B. eine App-Kachel ihre eigene Farbe bekommt. */
:root, [data-accent] {
  --blue: var(--accent);
  --blue-hover: color-mix(in srgb, var(--accent) 92%, #fff);
  --blue-press: color-mix(in srgb, var(--accent) 90%, #000);
  --blue-light: color-mix(in srgb, var(--accent) 72%, #fff);
  --blue-soft: color-mix(in srgb, var(--accent) 10%, #fff);
  --blue-ring: color-mix(in srgb, var(--accent) 22%, transparent);
  --accent-text: color-mix(in srgb, var(--accent) 72%, #000);
  --bg-tint: color-mix(in srgb, var(--accent) 5%, #fff);
}
[data-accent="blue"]     { --accent: #0071e3; }
[data-accent="indigo"]   { --accent: #5856d6; }
[data-accent="purple"]   { --accent: #9a3fd0; }
[data-accent="pink"]     { --accent: #e0115f; }
[data-accent="red"]      { --accent: #d70015; }
[data-accent="orange"]   { --accent: #d35a00; }
[data-accent="green"]    { --accent: #248a3d; }
[data-accent="teal"]     { --accent: #0a7f95; }
[data-accent="graphite"] { --accent: #5a5a5f; }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.012em;
}
h1, h2, h3, p { margin: 0; }
a { color: var(--blue); text-decoration: none; }
img, svg { display: block; }
button, input { font: inherit; color: inherit; letter-spacing: inherit; }
::selection { background: var(--blue-soft); }
:focus-visible { outline: 3px solid var(--blue-ring); outline-offset: 2px; border-radius: 6px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.muted { color: var(--text-2); }
.block { display: block; }
.center { text-align: center; }
.align-right { text-align: right; }
.icon { width: 22px; height: 22px; flex: none; }
.icon-sm { width: 18px; height: 18px; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 820px; }

/* ---------- Typography ---------- */
.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 18px;
}
.display {
  font-size: clamp(44px, 6.4vw, 84px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.022em;
}
.text-gradient {
  background: linear-gradient(100deg, var(--blue) 0%, var(--blue-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead {
  font-size: clamp(19px, 1.7vw, 22px);
  line-height: 1.45;
  color: var(--text-2);
  margin-top: 28px;
  max-width: 34em;
}
.section-title {
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.022em;
}
.page-title {
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.06;
  font-weight: 700;
  letter-spacing: -0.035em;
}

/* ---------- Buttons ---------- */
.btn {
  --h: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--h);
  padding: 0 22px;
  border-radius: 980px;
  border: 1px solid transparent;
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease),
    transform .12s var(--ease), border-color .2s var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn-lg { --h: 54px; padding: 0 30px; font-size: 17px; }
.btn-sm { --h: 34px; padding: 0 16px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 8px 24px color-mix(in srgb, var(--blue) 22%, transparent); }
.btn-primary:hover { background: var(--blue-hover); box-shadow: 0 10px 28px color-mix(in srgb, var(--blue) 30%, transparent); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--bg-soft); }
.btn-light { background: #fff; color: var(--blue); }
.btn-light:hover { background: #f4f8ff; }
.btn-danger { background: var(--red-soft); color: var(--red); }
.btn-danger:hover { background: #fbdcdc; }

/* ---------- Public navigation ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease);
}
.site-nav.is-scrolled { border-bottom-color: var(--border); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.brand { font-size: 19px; font-weight: 700; color: var(--text); letter-spacing: -0.02em; }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { color: var(--text-2); font-size: 15px; transition: color .2s var(--ease); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-links .nav-cta {
  color: #fff; background: var(--blue); padding: 7px 16px; border-radius: 980px; font-weight: 500;
}
.nav-links .nav-cta:hover { color: #fff; background: var(--blue-hover); }
.nav-toggle {
  display: none; width: 40px; height: 40px; border: 0; background: none; cursor: pointer;
  position: relative;
}
.nav-toggle span {
  position: absolute; left: 11px; right: 11px; height: 1.6px; background: var(--text);
  border-radius: 2px; transition: transform .3s var(--ease);
}
.nav-toggle span:first-child { top: 16px; }
.nav-toggle span:last-child { top: 23px; }
.site-nav.is-open .nav-toggle span:first-child { transform: translateY(3.5px) rotate(45deg); }
.site-nav.is-open .nav-toggle span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.public main { min-height: calc(100vh - var(--nav-h) - 90px); }
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(56px, 9vw, 120px) 0 clamp(72px, 10vw, 140px);
  background:
    radial-gradient(1000px 520px at 85% 15%, rgba(41, 151, 255, 0.10), transparent 60%),
    linear-gradient(180deg, #fbfbfd 0%, #f3f4f8 100%);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }
.hero-copy .flashes { margin-bottom: 24px; }
.hero-visual { position: relative; height: 460px; }
.glow {
  position: absolute; inset: 10% 5% 5% 10%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--blue) 22%, transparent), transparent);
  filter: blur(30px);
}
.device {
  position: absolute; top: 40px; left: 6%; right: 0;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: rise 1s var(--ease) both;
}
.device-bar { display: flex; gap: 7px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.device-bar span { width: 11px; height: 11px; border-radius: 50%; background: #e3e3e8; }
.device-body { padding: 24px 24px 28px; }
.device-hello { font-size: 13px; color: var(--text-3); }
.device-title { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin: 2px 0 18px; }
.device-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mini-tile {
  display: flex; flex-direction: column; gap: 14px;
  padding: 16px; border-radius: 16px; background: var(--surface);
  border: 1px solid var(--border); font-size: 15px; font-weight: 600;
}
.mini-tile-muted { background: var(--bg-soft); color: var(--text-3); border-style: dashed; }
.mini-icon {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  background: var(--blue-soft); color: var(--blue);
}
.mini-icon .icon { width: 20px; height: 20px; }
.mini-tile-muted .mini-icon { background: #e9e9ee; color: var(--text-3); }
.float-card {
  position: absolute; display: flex; align-items: center; gap: 10px;
  padding: 10px 16px 10px 10px; border-radius: 16px; background: #fff;
  box-shadow: var(--shadow); font-size: 14px; font-weight: 600;
  animation: float 6s ease-in-out infinite;
}
.float-a { left: -14px; bottom: 6px; }
.float-b { right: 12px; top: 4px; padding: 10px 16px; animation-delay: -3s; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #30d158; box-shadow: 0 0 0 4px rgba(48, 209, 88, .18); }
@keyframes rise { from { opacity: 0; transform: translateY(24px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 9vw, 120px) 0; }
.section-tight, .section + .section { padding-top: 0; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 56px; }
.feature-card {
  padding: 32px; border-radius: var(--radius-lg); background: var(--bg-soft);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), background-color .4s var(--ease);
}
.feature-card:hover { transform: translateY(-4px); background: #fff; box-shadow: var(--shadow); }
.feature-card h3 { font-size: 22px; letter-spacing: -0.02em; margin: 22px 0 10px; }
.feature-card p { color: var(--text-2); }
.feature-icon {
  display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 15px;
  background: linear-gradient(135deg, var(--blue-light), var(--blue)); color: #fff;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--blue) 25%, transparent);
}
.feature-icon .icon { width: 26px; height: 26px; }
.cta-band {
  display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
  padding: clamp(36px, 5vw, 64px); border-radius: var(--radius-lg); color: #fff;
  background:
    radial-gradient(600px 300px at 90% 0%, rgba(255, 255, 255, 0.22), transparent 60%),
    linear-gradient(120deg, #0062d1 0%, #0a84ff 100%);
  box-shadow: 0 30px 60px color-mix(in srgb, var(--blue) 22%, transparent);
}
.cta-band h2 { font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -0.03em; }
.cta-band p { opacity: .85; margin-top: 6px; font-size: 19px; }
.page-head {
  padding: clamp(56px, 8vw, 104px) 0 clamp(40px, 5vw, 64px);
  background: linear-gradient(180deg, #fbfbfd 0%, #ffffff 100%);
}
.page-head .lead { margin-top: 20px; }
.info-list { display: grid; gap: 14px; }
.info-item {
  display: flex; gap: 22px; align-items: flex-start; padding: 28px; border-radius: var(--radius);
  background: var(--bg-soft);
}
.info-item h3 { font-size: 20px; letter-spacing: -0.02em; margin-bottom: 4px; }
.info-item p { color: var(--text-2); }
.prose h2 { font-size: 19px; letter-spacing: -0.015em; margin: 32px 0 8px; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--text-2); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-soft); font-size: 13px; color: var(--text-3); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 90px; flex-wrap: wrap; padding-block: 20px; }
.footer-inner nav { display: flex; gap: 24px; }
.footer-inner a { color: var(--text-2); }
.footer-inner a:hover { color: var(--text); }

/* ---------- Cards & forms ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.prose.card { padding: clamp(28px, 4vw, 48px); }
.form-card { padding: 28px; margin-bottom: 20px; max-width: 760px; }
.card-title { font-size: 20px; letter-spacing: -0.02em; margin-bottom: 20px; }
.card-title-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.card-title-row .card-title { margin: 0; }
.admin-note { font-size: 14px; display: none; }
.form { display: grid; gap: 18px; }
.form-card .form, .form .form-card { gap: 18px; }
.form-card > .field + .field, .form-card > .field-row + .field { margin-top: 18px; }
.field { display: grid; gap: 7px; }
.field > span { font-size: 14px; font-weight: 500; color: var(--text); }
.field input {
  height: 48px; padding: 0 16px; border-radius: 12px;
  border: 1px solid var(--border-strong); background: #fff; font-size: 16px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field input:hover { border-color: rgba(0, 0, 0, 0.24); }
.field input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-ring); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hint { font-size: 13px; color: var(--text-3); }
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* iOS-style switch */
.switch {
  appearance: none; -webkit-appearance: none; flex: none;
  width: 51px; height: 31px; margin: 0; border-radius: 999px; background: #e9e9eb;
  position: relative; cursor: pointer; transition: background-color .25s var(--ease);
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%;
  background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15), 0 1px 1px rgba(0, 0, 0, 0.16);
  transition: transform .25s var(--ease);
}
.switch:checked { background: var(--blue); }
.switch:checked::after { transform: translateX(20px); }
.switch:disabled { opacity: .45; cursor: not-allowed; }
.toggle-list { margin-top: 24px; border-top: 1px solid var(--border); }
.toggle-list .hint { padding-top: 12px; }
.toggle-row {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 16px 0; border-bottom: 1px solid var(--border); cursor: pointer;
}
.toggle-row small { font-size: 14px; }
.perm-table { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.perm-head, .perm-row {
  display: grid; grid-template-columns: 1fr 110px 110px; align-items: center; gap: 12px; padding: 14px 18px;
}
.perm-head {
  background: var(--bg-soft); font-size: 12px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-3);
}
.perm-head span:not(:first-child), .perm-row label { justify-self: center; }
.perm-row + .perm-row { border-top: 1px solid var(--border); }
.perm-app { display: flex; align-items: center; gap: 14px; }
.perm-app small { font-size: 13px; }
.perm-card-disabled .perm-table, .perm-card-disabled .vis-body { opacity: .4; pointer-events: none; }
.perm-card-disabled .admin-note { display: block; }
.danger-zone { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 36px; }
.danger-zone .card-title { margin-bottom: 4px; }

/* ---------- Flash messages ---------- */
.flashes { display: grid; gap: 10px; margin-bottom: 20px; }
.flash {
  padding: 13px 16px; border-radius: 12px; font-size: 15px; background: var(--blue-soft); color: var(--accent-text);
  animation: rise .4s var(--ease) both;
}
.flash-error { background: var(--red-soft); color: #b00000; }
.flash-success { background: var(--green-soft); color: var(--green); }

/* ---------- Auth ---------- */
.auth-main {
  display: grid; place-items: center; padding: 48px 20px;
  background:
    radial-gradient(800px 400px at 50% 0%, rgba(41, 151, 255, 0.10), transparent 70%),
    linear-gradient(180deg, #fbfbfd 0%, #f3f4f8 100%);
}
.auth { width: 100%; display: grid; place-items: center; }
.auth-card {
  width: 100%; max-width: 420px; padding: 44px 36px 36px; border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.9); border: 1px solid #fff; box-shadow: var(--shadow-lg);
  animation: rise .6s var(--ease) both;
}
.auth-card h1 { font-size: 32px; letter-spacing: -0.03em; margin: 22px 0 6px; }
.auth-card > .muted { margin-bottom: 28px; }
.auth-card .form { margin-top: 4px; }
.auth-card .btn-block { margin-top: 8px; }
.auth-mark {
  display: grid; place-items: center; width: 60px; height: 60px; border-radius: 18px;
  background: linear-gradient(135deg, var(--blue-light), var(--blue)); color: #fff;
  box-shadow: 0 12px 28px color-mix(in srgb, var(--blue) 30%, transparent);
}
.auth-mark .icon { width: 28px; height: 28px; }
.auth-foot { margin-top: 24px; font-size: 14px; text-align: center; }
.error-code { font-size: 72px; font-weight: 700; letter-spacing: -0.04em; color: var(--blue); line-height: 1; }
.auth-card.center h1 { margin-top: 12px; }
.auth-card.center .muted { margin-bottom: 28px; }

/* ==========================================================================
   Private area
   ========================================================================== */
.private { background: var(--bg-soft); }
.shell { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  padding: 24px 14px 16px; background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-right: 1px solid var(--border);
}
.sidebar-brand { display: block; padding: 4px 12px 24px; }
.side-nav { display: grid; gap: 2px; overflow-y: auto; }
.side-nav a {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px;
  color: var(--text); font-size: 15px; transition: background-color .15s var(--ease);
}
.side-nav a .icon { width: 20px; height: 20px; color: var(--text-2); }
.side-nav a:hover { background: rgba(0, 0, 0, 0.04); }
.side-nav a[aria-current="page"] { background: var(--blue-soft); color: var(--blue); font-weight: 600; }
.side-nav a[aria-current="page"] .icon { color: var(--blue); }
.side-label {
  padding: 20px 12px 6px; font-size: 12px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-3);
}
.side-foot {
  margin-top: auto; display: flex; align-items: center; gap: 6px; padding-top: 14px;
  border-top: 1px solid var(--border);
}
.side-user {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; color: var(--text);
}
.side-user:hover, .side-user[aria-current="page"] { background: rgba(0, 0, 0, 0.04); }
.side-user-text { min-width: 0; display: grid; line-height: 1.25; }
.side-user-text strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user-text small { font-size: 12px; color: var(--text-3); }
.side-logout {
  display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 10px;
  background: none; color: var(--text-2); cursor: pointer;
}
.side-logout:hover { background: var(--red-soft); color: var(--red); }
.side-logout .icon { width: 20px; height: 20px; }
.avatar {
  display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-light), var(--blue)); color: #fff;
  font-size: 15px; font-weight: 600;
}
.workspace { min-width: 0; }
.topbar { display: none; }
.content { padding: clamp(28px, 4vw, 56px) clamp(20px, 4vw, 56px) 64px; max-width: 1200px; }
.content-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap;
  margin-bottom: 32px;
}
.content-head .eyebrow { margin-bottom: 10px; }
.content-title { font-size: clamp(30px, 3.4vw, 40px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 6px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; margin-bottom: 18px; }
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.app-tile {
  position: relative; display: flex; flex-direction: column; gap: 18px; padding: 24px;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
  color: var(--text); box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.app-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.app-tile-body { display: grid; gap: 4px; }
.app-tile-body strong { font-size: 18px; letter-spacing: -0.015em; }
.app-tile-body .muted { font-size: 15px; }
.app-tile .badge { position: absolute; top: 24px; right: 20px; }
.app-tile-admin { background: linear-gradient(160deg, #fff 40%, var(--bg-tint)); }
.app-icon {
  display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 14px;
  background: var(--blue-soft); color: var(--blue);
}
.app-icon-sm { width: 38px; height: 38px; border-radius: 11px; }
.app-icon-sm .icon { width: 20px; height: 20px; }
.app-icon-lg { width: 60px; height: 60px; border-radius: 17px; }
.app-icon-lg .icon { width: 28px; height: 28px; }
.app-head { display: flex; align-items: center; gap: 18px; }
.app-head .content-title { margin-bottom: 2px; }
.badge {
  display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px;
  background: #ececf0; color: var(--text-2); font-size: 12px; font-weight: 600; white-space: nowrap;
}
.badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-red { background: var(--red-soft); color: var(--red); }
.empty {
  display: grid; justify-items: center; text-align: center; gap: 10px; padding: 72px 24px;
  border-radius: var(--radius-lg); background: var(--surface); border: 1px dashed var(--border-strong);
}
.empty h2 { font-size: 22px; letter-spacing: -0.02em; margin-top: 12px; }

/* Table */
.table-card { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th {
  text-align: left; padding: 14px 20px; font-size: 12px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-3); border-bottom: 1px solid var(--border);
}
.table td { padding: 16px 20px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background-color .15s var(--ease); }
.table tbody tr:hover { background: #fafafc; }
.table small { font-size: 13px; }
.table .badge + .badge { margin-left: 4px; }
.is-inactive .user-cell { opacity: .5; }
.user-cell { display: flex; align-items: center; gap: 12px; }
.sidebar-backdrop { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-visual { height: 420px; max-width: 520px; width: 100%; margin: 0 auto; }
  .feature-grid { grid-template-columns: 1fr; }
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; z-index: 70; left: 0; top: 0; bottom: 0; width: 280px; height: auto;
    background: #fff; transform: translateX(-100%); transition: transform .35s var(--ease);
    box-shadow: var(--shadow-lg);
  }
  .shell.sidebar-open .sidebar { transform: none; }
  .sidebar-backdrop {
    display: block; position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, 0.25);
    opacity: 0; pointer-events: none; transition: opacity .3s var(--ease);
  }
  .shell.sidebar-open .sidebar-backdrop { opacity: 1; pointer-events: auto; }
  .topbar {
    display: flex; align-items: center; gap: 8px; position: sticky; top: 0; z-index: 40; height: 56px;
    padding: 0 12px; background: rgba(255, 255, 255, 0.8); border-bottom: 1px solid var(--border);
    backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  }
  .topbar .brand { font-size: 17px; }
  .icon-btn {
    display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 10px;
    background: none; cursor: pointer;
  }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: var(--nav-h); left: 0; right: 0; flex-direction: column; align-items: stretch;
    gap: 0; padding: 8px 16px 20px; background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    opacity: 0; transform: translateY(-8px); pointer-events: none;
    transition: opacity .25s var(--ease), transform .25s var(--ease);
  }
  .site-nav.is-open .nav-links { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a { padding: 14px 4px; font-size: 19px; border-bottom: 1px solid var(--border); color: var(--text); }
  .nav-links .nav-cta { margin-top: 14px; text-align: center; border: 0; padding: 12px; font-size: 17px; }
  .hero-visual { height: auto; padding-top: 28px; }
  .device { position: relative; top: 0; left: 0; }
  .float-a { display: none; }
  .float-b { right: 8px; top: 0; z-index: 1; }
  .hero-actions .btn { flex: 1 1 auto; }
  .info-item { flex-direction: column; gap: 16px; padding: 24px; }
  .field-row { grid-template-columns: 1fr; }
  .form-card { padding: 22px; }
  .perm-head, .perm-row { grid-template-columns: 1fr 64px 64px; padding: 12px 14px; }
  .perm-app small { display: none; }
  .perm-app .app-icon-sm { display: none; }
  .hide-sm { display: none; }
  .table th, .table td { padding: 12px 14px; }
  .auth-card { padding: 36px 24px 28px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Loading state (private area) ---------- */
[hidden] { display: none !important; }
.loader {
  position: fixed; top: 50%; left: 50%; width: 32px; height: 32px; margin: -16px 0 0 -16px;
  border-radius: 50%; border: 3px solid var(--blue-soft); border-top-color: var(--blue);
  animation: spin .8s linear infinite; display: none;
}
.is-loading .loader { display: block; }
.is-loading .shell { visibility: hidden; }
.shell { animation: fade .3s var(--ease) both; }
.is-loading .shell { animation: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.btn:disabled { opacity: .6; cursor: progress; }
.empty .btn { margin-top: 14px; }
@keyframes modal-in { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
.field input:disabled { background: var(--bg-soft); color: var(--text); -webkit-text-fill-color: var(--text); opacity: 1; }
.field > span small { font-weight: 400; }
@keyframes sheet-in { from { transform: translateY(100%); } to { transform: none; } }
.flash-info { background: var(--bg-soft); color: var(--text-2); }
@keyframes menu-in { from { opacity: 0; transform: scale(.97) translateY(-4px); } to { opacity: 1; transform: none; } }
.field select {
  height: 48px; padding: 0 40px 0 14px; border-radius: 12px; border: 1px solid var(--border-strong); background: #fff;
  font-size: 16px; color: var(--text); appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #86868b 50%), linear-gradient(135deg, #86868b 50%, transparent 50%);
  background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat;
}
.field select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-ring); }
.field select:disabled { background-color: var(--bg-soft); color: var(--text-2); }
.field .hint { margin-top: -2px; }
.eyebrow a { color: inherit; }
.field textarea {
  min-height: 96px; padding: 12px 16px; border-radius: 12px; resize: vertical;
  border: 1px solid var(--border-strong); background: #fff; font: inherit; font-size: 16px; color: var(--text);
}
.field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-ring); }
.field textarea:disabled { background: var(--bg-soft); }
:root { --fin-income: #248a3d; --fin-fixed: #5856d6; --fin-flexible: #d35a00; }
@media (min-width: 1101px) {
  .feature-grid.feature-grid-4 { grid-template-columns: repeat(4, 1fr); }
  .feature-grid-4 .feature-card h3 { font-size: 20px; }
}
:root { --time-work: #0071e3; --time-learning: #9a3fd0; --time-project: #d35a00; }
@keyframes time-pulse { 50% { opacity: .35; } }

/* Login: „Angemeldet bleiben“ */
.login-remember { display: flex; align-items: center; gap: 10px; font-size: 15px; cursor: pointer; }
.login-remember small { font-size: 13px; }

/* Offline-Seite der Handy-App */
.offline-page { min-height: 100vh; display: grid; place-items: center; }
.offline-icon { border-radius: 16px; box-shadow: var(--shadow-sm); }

/* Logo (= App-Icon) vor dem Schriftzug „Project Hub“: öffentliche Seiten, Seitenleiste, mobile Kopfzeile */
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand::before {
  content: ""; flex: none; width: 30px; height: 30px;
  background: url("../icons/logo-128.png") center / contain no-repeat;
}
.sidebar-brand { display: flex; }
.topbar .brand::before { width: 26px; height: 26px; }
.auth-logo { display: block; width: 72px; height: 72px; margin: 0; }

/* Seitenleiste: Bereiche (einklappbar) */
.side-group { display: grid; gap: 2px; }
.side-group-head {
  display: flex; align-items: center; justify-content: space-between; width: 100%; border: 0; background: none;
  cursor: pointer; text-align: left; font-family: inherit;
}
.side-group-head:hover { color: var(--text-2); }
.side-group-head .icon { transition: transform .2s var(--ease); transform: rotate(0deg); }
.side-group-head[aria-expanded="false"] .icon { transform: rotate(-90deg); }

/* Tipp beim ersten Öffnen einer Seite */
.tip-box {
  display: flex; align-items: flex-start; gap: 12px; margin: -6px 0 20px; padding: 12px 14px; border-radius: 14px;
  background: var(--blue-soft); color: var(--text); font-size: 14px; line-height: 1.45;
}
.tip-box > .icon { flex: none; margin-top: 2px; color: var(--blue); }
.tip-box p { flex: 1; margin: 0; }
.tip-box .btn { flex: none; }
@media (max-width: 760px) {
  .tip-box { flex-wrap: wrap; }
  .tip-box p { flex-basis: calc(100% - 32px); }
  .tip-box .btn { margin-left: 32px; }
}
