@font-face { font-family: "Satoshi"; src: url("/assets/fonts/satoshi-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Satoshi"; src: url("/assets/fonts/satoshi-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Satoshi"; src: url("/assets/fonts/satoshi-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --ink: #121212; --text: #333; --muted: #8b8b8b; --line: #e6e6e6; --soft: #f5f5f4; --bg: #fff;
  --accent: #121212; --ok: #1f8a4c; --err: #c0392b;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --gap: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 400 14px/1.45 "Satoshi", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; }

/* Login */
.is-login { min-height: 100vh; display: grid; place-items: center; background: var(--soft); }
.login__box { width: min(360px, 92vw); background: #fff; padding: 32px; border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.08); display: grid; gap: 16px; }
.login__box h1 { margin: 0 0 6px; font-size: 22px; font-weight: 500; color: var(--ink); }
.login__box h1 span { color: var(--muted); font-weight: 400; }
.login__box label { display: grid; gap: 6px; font-size: 12px; color: var(--muted); }
.login__box input { padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 15px; color: var(--ink); }
.login__box button { padding: 12px; border-radius: 8px; background: var(--ink); color: #fff; font-weight: 500; }
.err { margin: 0; color: var(--err); font-size: 13px; }

/* App-Rahmen */
.bar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 22px; height: 60px; padding: 0 28px; background: rgba(255,255,255,.9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.bar__brand { font-weight: 500; font-size: 16px; color: var(--ink); letter-spacing: .01em; }
.bar__brand span { color: var(--muted); font-weight: 400; margin-left: 6px; }
.bar__spacer { flex: 1; }
.bar a { text-decoration: none; color: var(--muted); }
.bar a:hover { color: var(--ink); }
.status { font-size: 12px; color: var(--muted); padding: 5px 10px; border-radius: 99px; background: var(--soft); transition: background .3s, color .3s; white-space: nowrap; }
.status.is-saving { color: var(--ink); }
.status.is-ok { color: var(--ok); }
.status.is-err { color: #fff; background: var(--err); }

.wrap { padding: 26px 28px 80px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-bottom: 22px; }
.toolbar h2 { margin: 0; font-size: 22px; font-weight: 500; color: var(--ink); letter-spacing: -.01em; }
.hint { color: var(--muted); font-size: 13px; max-width: 70ch; }

.seg { display: inline-flex; background: var(--soft); border-radius: 99px; padding: 3px; gap: 2px; }
.seg button { padding: 5px 12px; border-radius: 99px; font-size: 12.5px; color: var(--muted); transition: background .2s, color .2s; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.seg--sm button { padding: 3px 9px; font-size: 11.5px; }

/* Board (Vorschau der Startseite) */
.board { position: relative; transition: height .4s var(--ease); }
.tile { position: absolute; border-radius: 6px; overflow: hidden; background: #ddd; cursor: grab; transition: left .45s var(--ease), top .45s var(--ease), width .45s var(--ease), height .45s var(--ease), opacity .3s, box-shadow .3s; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.tile.is-hidden img { opacity: .28; filter: grayscale(1); }
.tile.is-dragging { opacity: .35; }
.tile.drop-before { box-shadow: -4px 0 0 0 var(--ink); }
.tile.drop-after { box-shadow: 4px 0 0 0 var(--ink); }
.tile__shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.62), rgba(0,0,0,0) 46%), linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,0) 30%); pointer-events: none; }
.tile__top { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 6px; align-items: center; }
.tile__bottom { position: absolute; left: 12px; right: 12px; bottom: 10px; color: #fff; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.tile__title { font-size: 15px; font-weight: 500; line-height: 1.15; text-shadow: 0 1px 8px rgba(0,0,0,.3); }
.tile__meta { font-size: 11px; opacity: .8; letter-spacing: .04em; }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 9px; border-radius: 99px; background: rgba(255,255,255,.92); color: var(--ink); font-size: 11.5px; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.chip:hover { background: #fff; }
.chip--icon { width: 26px; padding: 0; justify-content: center; font-size: 13px; }
.chip--on { background: var(--ink); color: #fff; }
.tile .seg { background: rgba(255,255,255,.92); box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.tile .seg button { color: #666; }
.tile .seg button[aria-pressed="true"] { background: var(--ink); color: #fff; box-shadow: none; }
.tile__spacer { flex: 1; }

/* Projekt-Editor (Overlay) */
.sheet { position: fixed; inset: 0; z-index: 50; background: rgba(18,18,18,.38); display: flex; justify-content: flex-end; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; } }
.sheet__panel { width: min(1180px, 100vw); height: 100%; background: #fff; overflow: auto; animation: slide .4s var(--ease); }
@keyframes slide { from { transform: translateX(40px); opacity: .4; } }
.sheet__head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 14px; padding: 16px 28px; background: rgba(255,255,255,.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.sheet__head h3 { margin: 0; font-size: 19px; font-weight: 500; color: var(--ink); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn { padding: 9px 16px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-weight: 500; font-size: 13px; }
.btn:hover { border-color: #ccc; }
.btn--primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn--primary:disabled { opacity: .4; cursor: default; }
.sheet__body { padding: 24px 28px 60px; display: grid; gap: 34px; }
.form { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px 18px; }
.field { display: grid; gap: 5px; font-size: 11.5px; color: var(--muted); letter-spacing: .02em; }
.field--wide { grid-column: 1 / -1; }
.field input, .field textarea { padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; color: var(--ink); background: #fff; }
.field textarea { resize: vertical; min-height: 84px; line-height: 1.5; }
.field input:focus, .field textarea:focus { outline: none; border-color: #999; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink); }
.section-title { margin: 0 0 4px; font-size: 13px; font-weight: 500; color: var(--ink); letter-spacing: .02em; }
.layout-row { display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center; }
.layout-row label { display: inline-flex; gap: 10px; align-items: center; font-size: 13px; color: var(--muted); }

.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.ph { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; display: grid; grid-template-rows: auto auto; transition: opacity .3s, box-shadow .2s, transform .2s; }
.ph.is-dragging { opacity: .35; }
.ph.drop-before { box-shadow: -4px 0 0 0 var(--ink); }
.ph.drop-after { box-shadow: 4px 0 0 0 var(--ink); }
.ph__img { position: relative; aspect-ratio: 3 / 2; background: var(--soft); cursor: grab; }
.ph__img img { width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; }
.ph.is-hidden .ph__img img { opacity: .25; filter: grayscale(1); }
.ph__badges { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; gap: 6px; }
.ph__body { padding: 10px; display: grid; gap: 8px; }
.ph__name { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph__tags { padding: 6px 9px; border: 1px solid var(--line); border-radius: 7px; font-size: 12.5px; width: 100%; }
.ph__row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.cover-badge { background: var(--ink) !important; color: #fff !important; }

.empty { padding: 60px; text-align: center; color: var(--muted); }

@media (max-width: 700px) {
  .bar { padding: 0 16px; gap: 14px; }
  .wrap { padding: 18px 16px 60px; }
  .sheet__body, .sheet__head { padding-left: 16px; padding-right: 16px; }
}
/* Videos im Foto-Raster des Projekt-Editors */
.ph__img--video { background: #111; display: grid; place-items: center; }
.ph__img--video img { position: absolute; inset: 0; object-fit: cover; opacity: .7; }
.ph__play { position: relative; color: #fff; font-size: 26px; text-shadow: 0 2px 12px rgba(0,0,0,.4); pointer-events: none; }
.ph--video .ph__badges { z-index: 1; }

/* ── Statistik ── */
.stats { padding: 26px 28px 60px; display: grid; gap: 26px; }
.stats__kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.stats__kpi { border: 1px solid var(--line); padding: 16px 18px; display: grid; gap: 2px; }
.stats__kpi span { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.stats__kpi strong { font-size: 34px; font-weight: 400; color: var(--ink); letter-spacing: -.02em; }
.stats__kpi em { font-style: normal; font-size: 12.5px; color: var(--muted); }
.stats__legend { margin: 0 0 -14px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stats__legend i { display: inline-block; width: 10px; height: 10px; }
.stats__legend i.is-v { background: #121212; }
.stats__legend i.is-p { background: #e8e8e6; margin-left: 12px; }
.stats__chart svg { width: 100%; height: auto; display: block; }
.stats__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 34px; }
.stats__list { list-style: none; margin: 0; padding: 0; }
.stats__list li { position: relative; display: flex; justify-content: space-between; gap: 12px; padding: 7px 10px; font-size: 13.5px; }
.stats__list li::before { content: ""; position: absolute; inset: 2px auto 2px 0; width: var(--w); background: var(--soft); z-index: 0; }
.stats__k, .stats__v { position: relative; z-index: 1; }
.stats__k { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.stats__v { color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .stats__kpis, .stats__grid { grid-template-columns: 1fr; } .stats { padding: 20px 18px 40px; } }
