/* product picture Kundenportal
   Markenfarben aus dem Logo: Sucher-Gelb #FFB300 + Schwarz.
   Schrift Poppins liegt auf dem eigenen Server: keine Datenübertragung an Google (DSGVO). */
@font-face { font-family: "Poppins"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/poppins-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/poppins-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/poppins-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/poppins-latin-700-normal.woff2") format("woff2"); }
:root {
  --bg: #f6f6f4; --surface: #ffffff; --sweep: #ececea; --ink: #111111; --muted: #61615c; --line: #e1e1dc;
  --accent: #ffb300; --accent-ink: #111111; --accent-soft: #fff1cc; --ok: #2f7a4b; --warn: #b5541f; --danger: #b3261e;
  --stage: #111111; --stage-ink: #f4f4f2;
  --f-body: "Poppins", ui-sans-serif, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --f-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e0e0e; --surface: #181818; --sweep: #222220; --ink: #f2f2f0; --muted: #a3a39d; --line: #2d2d2b;
    --accent: #ffb300; --accent-ink: #111111; --accent-soft: #3a2c05; --ok: #6cc08b; --warn: #f0a070; --danger: #f08a80;
    --stage: #000000; --stage-ink: #f4f4f2;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --bg: #0e0e0e; --surface: #181818; --sweep: #222220; --ink: #f2f2f0; --muted: #a3a39d; --line: #2d2d2b;
    --accent: #ffb300; --accent-ink: #111111; --accent-soft: #3a2c05; --ok: #6cc08b; --warn: #f0a070; --danger: #f08a80;
    --stage: #000000; --stage-ink: #f4f4f2;
    color-scheme: dark;
}
.logo-wrap { display: inline-flex; }
.logo-img { height: 30px; width: auto; display: block; }
.logo-on-dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-on-light { display: none; } :root:not([data-theme="light"]) .logo-on-dark { display: block; } }
:root[data-theme="dark"] .logo-on-light { display: none; }
:root[data-theme="dark"] .logo-on-dark { display: block; }
.on-stage .logo-on-light { display: none; }
.on-stage .logo-on-dark { display: block; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.55 var(--f-body); }
img { max-width: 100%; }
a { color: var(--ink); text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
::selection { background: var(--accent); color: #111; }
h1, h2, h3 { font-weight: 700; letter-spacing: -.015em; text-wrap: balance; margin: 0; }
.mono { font-family: var(--f-mono); font-size: .85em; }
.muted { color: var(--muted); }
.wrap { max-width: 1180px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 5px var(--accent); }
[hidden] { display: none !important; }

.btn { border: 0; border-radius: 8px; padding: .65em 1.1em; font-weight: 600; cursor: pointer; background: var(--accent); color: var(--accent-ink); display: inline-flex; align-items: center; gap: .5em; text-decoration: none; line-height: 1.3; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.small { padding: .4em .8em; font-size: .88rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:hover:not(:disabled) { filter: brightness(1.05); }
.btn.ghost:hover:not(:disabled) { border-color: var(--ink); filter: none; }
.linkbtn { background: none; border: 0; color: var(--ink); text-decoration-color: var(--accent); cursor: pointer; padding: 0; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.logo { font-weight: 700; font-size: 1.15rem; display: inline-flex; align-items: center; gap: .5em; letter-spacing: -.02em; }
.logo i { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, var(--surface) 0 28%, var(--accent) 30%); display: inline-block; }

label { font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; display: flex; flex-direction: column; gap: 6px; }
input[type=text], input[type=password], input[type=date], input[type=number], select, textarea {
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: .7em .85em; font-size: 1rem; text-transform: none; letter-spacing: 0; width: 100%;
}
label.check { flex-direction: row; align-items: center; gap: 8px; text-transform: none; letter-spacing: 0; font-size: .95rem; color: var(--ink); font-weight: 500; }
label.check input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
form.stack { display: flex; flex-direction: column; gap: 14px; }
.msg { border-radius: 8px; padding: 10px 14px; font-size: .92rem; }
.msg.err { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--ink); border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); }
.msg.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); border: 1px solid color-mix(in srgb, var(--ok) 45%, transparent); }

/* Login */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { background: var(--stage); color: var(--stage-ink); display: flex; flex-direction: column; justify-content: center; padding: 40px; gap: 28px; overflow: hidden; }
/* Collage im schwarzen Bereich: versetzte Bilder in verschiedenen Größen */
.collage { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: repeat(12, minmax(0, 1fr)); width: min(560px, 100%); aspect-ratio: 1 / 1.02; align-self: center; position: relative; }
.ci { margin: 0; position: relative; min-width: 0; min-height: 0; }
.ci-pic { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.ci-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ci-pic svg { width: 86%; height: 86%; }
.ci figcaption { position: absolute; left: 0; bottom: 0; background: rgba(17,17,17,.82); color: #f4f4f2; font-size: .74rem; font-weight: 600; padding: 4px 10px; letter-spacing: .02em; }
.ci-hollowman { grid-area: 1 / 1 / 8 / 8; z-index: 0; }
.ci-frame { grid-area: 1 / 1 / 8 / 8; margin: -12px; width: calc(100% + 24px); height: calc(100% + 24px); z-index: 1; pointer-events: none; }
.ci-model { grid-area: 1 / 8 / 8 / 13; margin-left: 14px; margin-top: 28px; }
.ci-schmuck { grid-area: 8 / 1 / 12 / 5; margin-top: 22px; }
.ci-packshot { grid-area: 7 / 5 / 13 / 9; z-index: 2; margin-left: 8px; }
.ci-packshot .ci-pic { outline: 7px solid var(--stage); }
.ci-flatlay { grid-area: 8 / 9 / 13 / 13; margin-left: 14px; margin-top: 42px; }
.ci-model .ci-pic img { object-position: 50% 20%; }
.login-form .logo-img { height: 52px; }
header.top .logo-img { height: 38px; }
.login-art .claim { font-size: clamp(1.3rem, 2.4vw, 1.75rem); font-weight: 600; line-height: 1.25; max-width: 22ch; margin: 0; text-wrap: balance; }
.login-art .claim em { font-style: normal; color: var(--accent); }
.login-art small { color: #9a9a94; font-size: .85rem; }
.login-form { display: flex; flex-direction: column; justify-content: center; gap: 26px; padding-block: 48px; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); max-width: 480px; width: 100%; margin: 0 auto; }
.login-form h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); line-height: 1.1; }
#code { font-family: var(--f-mono); letter-spacing: .1em; text-transform: uppercase; }
@media (max-width: 820px) { .login { grid-template-columns: 1fr; min-height: 0; } .login-art { padding: 24px 20px; gap: 16px; } .collage { width: min(340px, 100%); } .login-form .logo-img { height: 42px; } .login-art small { display: none; } }

/* Kopf / Fuß */
header.top { border-bottom: 1px solid var(--line); background: var(--surface); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 14px; flex-wrap: wrap; }
footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; margin-top: 24px; }
footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-block: 20px; }

/* Galerie */
.hero { padding-block: 32px 18px; }
.hero h1 { font-size: clamp(1.5rem, 3.6vw, 2.3rem); line-height: 1.12; }
.meta { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: .92rem; margin-top: 10px; }
.meta b { color: var(--ink); font-weight: 600; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-block: 12px; border-block: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); z-index: 5; }
.chips, .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.actions { gap: 8px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: .35em .9em; cursor: pointer; font-size: .9rem; }
.chip[aria-pressed=true] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip .cnt { opacity: .6; font-variant-numeric: tabular-nums; margin-left: .2em; }
.chips .chip { padding: .45em 1em; font-weight: 600; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; padding-block: 22px 40px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; position: relative; }
.tile:has(.sel:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent); }
.thumb { aspect-ratio: 1 / 1; max-width: 100%; width: 100%; background: linear-gradient(180deg, #fafbfb, #e6eaea); border: 0; padding: 0; cursor: zoom-in; display: grid; place-items: center; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.thumb .noprev { color: #5d6b6a; font-family: var(--f-mono); font-size: .8rem; }
.tile .info { padding: 10px 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tile .info > div { min-width: 0; }
.fname { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spec { color: var(--muted); font-size: .8rem; }
.selbox { position: absolute; top: 10px; left: 10px; z-index: 2; display: inline-flex; flex-direction: row; align-items: center; gap: 7px; padding: 6px 12px 6px 8px; border-radius: 999px; background: rgba(255,255,255,.94); color: #111; font-size: .82rem; font-weight: 600; letter-spacing: 0; text-transform: none; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.selbox input { width: 20px; height: 20px; accent-color: #111; cursor: pointer; margin: 0; }
.selbox:has(.sel:checked) { background: var(--accent); }
.dl { border: 1px solid var(--line); border-radius: 6px; width: 34px; height: 34px; display: grid; place-items: center; flex: none; text-decoration: none; color: var(--ink); }
.tag { position: absolute; top: 10px; right: 10px; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; background: rgba(22,32,31,.78); color: #fff; padding: 2px 8px; border-radius: 4px; }
.empty { padding: 60px 0; text-align: center; color: var(--muted); }

/* Großansicht */
#lb { position: fixed; inset: 0; background: rgba(10,14,14,.9); z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 20px max(16px, env(safe-area-inset-right, 0px)) 20px max(16px, env(safe-area-inset-left, 0px)); }
#lb .frame { width: min(80vh, 92vw); max-width: 100%; aspect-ratio: 1 / 1; background: linear-gradient(180deg, #fafbfb, #e6eaea); border-radius: 6px; overflow: hidden; display: grid; place-items: center; }
#lb .frame img { width: 100%; height: 100%; object-fit: contain; }
#lb .bar { display: flex; gap: 10px; align-items: center; color: #e9efee; flex-wrap: wrap; justify-content: center; }
#lb .btn.ghost { color: #e9efee; border-color: #56625f; }

/* Studio-Bereich */
.admin-grid { padding-block: 28px 48px; display: grid; grid-template-columns: 340px 1fr; gap: 24px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 20px; min-width: 0; }
.panel h2 { font-size: 1.12rem; margin-bottom: 14px; }
.panel + .panel { margin-top: 20px; }
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; white-space: nowrap; }
td a { font-weight: 600; }
.pill { font-size: .75rem; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); }
.pill.wm { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--ink); }
.notice { background: color-mix(in srgb, var(--warn) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warn) 40%, var(--line)); border-radius: 10px; padding: 12px 16px; margin-bottom: 18px; font-size: .95rem; }
.selinfo { color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; align-self: center; }
.pill.off { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.drop { border: 2px dashed var(--line); border-radius: 10px; padding: 28px 16px; text-align: center; color: var(--muted); cursor: pointer; }
.drop.over { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.queue { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 6px; font-size: .88rem; }
.queue li { display: flex; justify-content: space-between; gap: 10px; }
.queue .fname { min-width: 0; }
.mailbox { width: 100%; min-height: 210px; font-family: var(--f-body); font-size: .92rem; resize: vertical; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.row > * { flex: 1 1 140px; }
.imglist { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.imglist figure { margin: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.imglist .thumb { cursor: default; }
.imglist figcaption { padding: 6px 8px; font-size: .78rem; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dangerzone { border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }
@media (max-width: 860px) { .admin-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: no-preference) { .tile { transition: box-shadow .15s, border-color .15s; } }

/* 360°-Ansichten (GIF/Video) */
.thumb { position: relative; }
.thumb video, .thumb img { width: 100%; height: 100%; object-fit: contain; }
.spin { position: absolute; right: 10px; bottom: 10px; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #111; display: grid; place-items: center; font-size: 17px; font-weight: 700; }
.wm-ov { position: absolute; inset: 0; pointer-events: none; background-image: url("wasserzeichen.png"); background-size: 42% auto; background-repeat: space; background-position: center; opacity: .3; }
.dl.locked { color: var(--muted); cursor: not-allowed; }
#lb .frame { position: relative; }
#lb .frame video { width: 100%; height: 100%; object-fit: contain; background: #000; }

/* Studio-Navigation und Bildbearbeitung */
.studio-nav { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.studio-nav > a:not(.btn) { color: var(--muted); text-decoration: none; font-weight: 600; padding-block: 4px; border-bottom: 2px solid transparent; }
.studio-nav > a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #111; font-size: .75rem; font-weight: 700; }
.pill.st-offen { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.pill.st-in_bearbeitung { background: color-mix(in srgb, #3b82f6 18%, transparent); }
.pill.st-fertig { background: var(--accent); color: #111; font-weight: 600; }
.pill.st-abgeschlossen { background: color-mix(in srgb, var(--ok) 18%, transparent); }
.briefing { border-left: 0; background: var(--accent-soft); }
textarea { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: .7em .85em; font-size: .95rem; width: 100%; text-transform: none; letter-spacing: 0; resize: vertical; font-family: inherit; color: var(--ink); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
details.mini summary { list-style: none; cursor: pointer; }
details.mini summary::-webkit-details-marker { display: none; }
.imglist a.thumb { cursor: zoom-in; }
.pick:has(.pickbox:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }

#code::placeholder { text-transform: none; letter-spacing: 0; font-family: var(--f-body); }

/* Projekt-Übersicht (Kunde) und Projektliste (Studio) */
.projgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; padding-block: 8px 48px; }
.projcard { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.projcard:hover, .projcard:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.projcover { position: relative; aspect-ratio: 4 / 3; max-width: 100%; background: linear-gradient(180deg, #fafbfb, #e6eaea); display: grid; place-items: center; overflow: hidden; }
.projcover img { width: 100%; height: 100%; object-fit: contain; }
.projbody { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; min-width: 0; }
.projtitle { font-weight: 700; font-size: 1.08rem; line-height: 1.3; }
.tag.new { left: 10px; right: auto; background: var(--accent); color: #111; }
.projlist { display: flex; flex-direction: column; gap: 10px; }
.projrow { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); }
.projrow:hover { border-color: var(--accent); }
.projrow .projcover { aspect-ratio: 1 / 1; border-radius: 6px; }
.projrow > span { min-width: 0; }
.crumbs { margin: 20px 0 0; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; color: var(--muted); }

/* Zugangsdaten auf einen Blick (Studio) */
.subhead { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 8px; font-weight: 600; }
.access { display: grid; grid-template-columns: 1fr; margin: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--bg); }
.access dt { margin: 0; padding: 10px 14px 0; border-top: 1px solid var(--line); font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; }
.access dt:first-of-type { border-top: 0; }
.access dd { margin: 0; padding: 2px 14px 10px; display: flex; gap: 12px; align-items: center; justify-content: space-between; min-width: 0; }
.access dd > a, .access dd > span, .access dd > b { overflow-wrap: anywhere; min-width: 0; }
.access dd > a.mono { font-size: .85rem; }
.access dd .linkbtn { flex: 0 0 auto; font-size: .85rem; }
.access .codebig { font-size: 1.3rem; letter-spacing: .14em; }
.copymini { text-decoration: none; font-size: .95rem; margin-left: 4px; }

/* Beispielbilder (Reference images) in Bearbeitungsaufträgen */
.refpanel { border: 2px solid var(--accent); }
.reflist { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.reflist figure { margin: 0; }
.reflist .thumb { aspect-ratio: 1; display: grid; place-items: center; background: var(--sweep); border-radius: 10px; overflow: hidden; }
.reflist .thumb img { width: 100%; height: 100%; object-fit: contain; }
.reflist figcaption { display: flex; justify-content: space-between; gap: 8px; font-size: .8rem; padding-top: 6px; }
.flabel { display: block; font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
