/* 22degree Files – Gestaltung wie Galerie-Verwaltung: weiß, Montserrat/Roboto Condensed, Verlauf Blau → Türkis */
@font-face { font-family: "Montserrat"; font-weight: 400; font-display: swap; src: url(fonts/Montserrat-Regular.ttf) format("truetype"); }
@font-face { font-family: "Montserrat"; font-weight: 600; font-display: swap; src: url(fonts/Montserrat-SemiBold.ttf) format("truetype"); }
@font-face { font-family: "Montserrat"; font-weight: 700; font-display: swap; src: url(fonts/Montserrat-Bold.ttf) format("truetype"); }
@font-face { font-family: "Roboto Condensed"; font-weight: 400; font-display: swap; src: url(fonts/RobotoCondensed-Regular.ttf) format("truetype"); }

:root {
  --fg: #262626; --muted: #7a7a7a; --line: #e2e2e2; --bg: #fff; --soft: #f5f7f8; --danger: #b3261e;
  --blue: #009fe3; --mark: #27ccc0; --grad: linear-gradient(90deg, #009fe3, #27ccc0);
  --head: "Montserrat", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  --text: "Roboto Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; font: 400 17px/1.5 var(--text); color: var(--fg); background: var(--soft); min-height: 100vh; }
a { color: inherit; }
[hidden] { display: none !important; }

h1 { font: 700 24px/1.2 var(--head); text-transform: uppercase; letter-spacing: .02em; color: #000; margin: 0 0 14px; }
h2 { font: 600 13px/1.2 var(--head); text-transform: uppercase; letter-spacing: .14em; color: #000; margin: 0 0 18px; }
h2 .muted { font-weight: 600; letter-spacing: .08em; margin-left: 8px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.err { color: var(--danger); }
.mono { font-family: ui-monospace, Menlo, monospace; font-size: 14px; color: var(--blue); text-decoration: none; word-break: break-all; }

/* Kopfzeile */
.top { display: flex; align-items: center; justify-content: space-between; padding: 14px 28px; background: #fff; border-bottom: 1px solid var(--line); }
.top .logo { display: flex; align-items: center; gap: 16px; text-decoration: none; }
.top .logo img { height: 30px; width: auto; filter: brightness(0); }
.top .logo span { font: 600 14px/1 var(--head); text-transform: uppercase; letter-spacing: .2em; color: var(--muted); border-left: 1px solid var(--line); padding-left: 16px; }
.top .out { display: flex; align-items: center; gap: 14px; font: 600 11px/1 var(--head); text-transform: uppercase; letter-spacing: .14em; color: #bdbdbd; }


/* Kopfzeile wie in der Galerie: schwarzer Balken, Schriftzug 22DEGREE fett + Tool-Name normal */
.top { background: #000; color: #fff; border-bottom: 0; padding: 18px 28px; }
.wordmark { font: 400 14px/1 var(--head); text-transform: uppercase; letter-spacing: .16em; color: #fff; text-decoration: none; white-space: nowrap; }
.wordmark strong { font-weight: 700; }

/* Menü „22degree ▾“ (gemeinsames Login) */
.menu { position: relative; }
.menu summary { display: flex; align-items: center; gap: 12px; cursor: pointer; list-style: none; padding: 4px 0; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary i { font-style: normal; color: #bdbdbd; font-size: 12px; transition: transform .15s; }
.menu[open] summary i { transform: rotate(180deg); }
.top nav.right { display: flex; align-items: center; gap: 22px; }
.top nav.right a { font: 600 11px/1 var(--head); text-transform: uppercase; letter-spacing: .14em; color: #8a8a8a; text-decoration: none; }
.top nav.right a:hover { color: #fff; }
.top .who { font: 600 11px/1 var(--head); text-transform: uppercase; letter-spacing: .14em; color: #8a8a8a; }

/* Rahmen */
main { margin: 0 auto; padding: 32px 20px 40px; }
main.wide { max-width: 1040px; display: grid; gap: 24px; }
.card { background: #fff; border: 1px solid var(--line); padding: 32px; }
main.card { margin: 8vh auto; }
.narrow { max-width: 440px; }
.center { text-align: center; }
.mark { filter: brightness(0); height: 88px; width: auto; margin: 0 auto 26px; display: block; }
.brand { font: 600 13px/1 var(--head); text-transform: uppercase; letter-spacing: .2em; color: var(--muted); }
.foot { font-size: 14px; color: var(--muted); margin: 28px 0 0; }
.foot a { color: var(--muted); }
p.foot.muted { text-align: center; margin: 0; }

/* Formulare */
.stack { display: grid; gap: 14px; text-align: left; margin-top: 18px; }
label { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
input, select { font: 400 17px/1.3 var(--text); color: var(--fg); border: 1px solid var(--line); border-radius: 0; padding: 11px 12px; background: #fff; width: 100%; min-width: 0; }
input:focus, select:focus, .drop:focus-visible { outline: 2px solid var(--blue); outline-offset: -1px; }
button, .btn { font: 600 11px/1 var(--head); text-transform: uppercase; letter-spacing: .14em; color: #fff; background: #000; border: 1px solid #000; border-radius: 0; padding: 14px 20px; cursor: pointer; text-decoration: none; display: inline-block; white-space: nowrap; }
button:hover, .btn:hover { background: #333; }
button.ghost { background: #fff; color: #000; }
button.ghost:hover { background: var(--soft); }
button.danger { background: #fff; color: var(--danger); border-color: var(--danger); }
button.danger:hover { background: var(--danger); color: #fff; }
button.small { padding: 9px 12px; font-size: 10px; }
button.link { background: none; border: 0; padding: 0; color: var(--blue); font: inherit; text-transform: none; letter-spacing: 0; text-decoration: underline; }
.top button.link { color: #9a9a9a; font: 600 11px/1 var(--head); text-transform: uppercase; letter-spacing: .14em; text-decoration: none; }
.btn.big { background: var(--grad); border: 0; padding: 20px 34px; font-size: 13px; margin: 18px 0 6px; }
.btn.big:hover { filter: brightness(1.05); }
.row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }

/* Ablagefeld */
.drop { border: 2px dashed #c9d3d8; min-height: 260px; display: grid; place-items: center; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; padding: 20px; }
.drop.small { min-height: 120px; }
.drop.over { border-color: var(--mark); background: #effbfa; }
.drop-title { font: 700 18px/1.3 var(--head); text-transform: uppercase; letter-spacing: .04em; color: #000; margin: 0 0 8px; }
.drop p { margin: 0; }

.filelist { list-style: none; margin: 22px 0 0; padding: 0; max-height: 260px; overflow: auto; border-top: 1px solid var(--line); text-align: left; }
.filelist li { display: flex; gap: 12px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.filelist li > :first-child { flex: 1; overflow-wrap: anywhere; }
.filelist li > span:nth-child(2) { color: var(--muted); white-space: nowrap; }
.filelist a { text-decoration: none; }
.filelist a:hover { color: var(--blue); }
.filelist .x { background: none; border: 0; color: var(--muted); font-size: 20px; padding: 0 4px; letter-spacing: 0; }
.filelist .x:hover { color: var(--danger); background: none; }
.sum { font: 600 12px/1 var(--head); text-transform: uppercase; letter-spacing: .12em; margin: 16px 0 22px; }
.grid3 { display: grid; grid-template-columns: 2fr 1fr 2fr; gap: 14px; }
.pwrow { display: flex; gap: 6px; }

/* Fortschritt */
.bar { height: 10px; background: #e9eef0; overflow: hidden; margin: 10px 0 14px; }
.bar span { display: block; height: 100%; width: 0; background: var(--grad); transition: width .3s; }
.pinfo { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0; }
#pfile { margin: 6px 0 20px; overflow-wrap: anywhere; }

/* Fertig-Leiste über dem Ablagefeld */
.donebar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: #effbfa; border: 1px solid #bfeee9; padding: 10px 12px; margin-bottom: 16px; }
.donebar .ok { font: 600 11px/1 var(--head); text-transform: uppercase; letter-spacing: .14em; color: #1a8f84; }
.donebar input { flex: 1; min-width: 200px; font-family: ui-monospace, Menlo, monospace; font-size: 14px; padding: 8px 10px; }
.list tr.fresh td { animation: fresh 3s ease-out; }
@keyframes fresh { from { background: #dff7f4; } to { background: transparent; } }

/* Speicher */
.quota { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; }
.qbar { height: 6px; background: #e9eef0; overflow: hidden; }
.qbar span { display: block; height: 100%; width: 0; background: var(--grad); }
.quota.full .qbar span { background: var(--danger); }
.quota p { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 8px 0 0; }
button:disabled { opacity: .35; cursor: not-allowed; }
button:disabled:hover { background: #000; }

/* Liste */
.tablewrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; font-size: 15px; }
.list th { font: 600 10px/1 var(--head); text-transform: uppercase; letter-spacing: .14em; color: var(--muted); text-align: left; padding: 0 12px 12px 0; }
.list td { border-top: 1px solid var(--line); padding: 14px 12px 14px 0; vertical-align: top; }
.list td.actions { text-align: right; white-space: nowrap; }
.list td.actions button { margin-left: 4px; }
.tag { font: 600 9px/1 var(--head); text-transform: uppercase; letter-spacing: .12em; background: var(--grad); color: #fff; padding: 3px 6px; vertical-align: 2px; }

/* Download-Protokoll in der Liste */
.list td:first-child { min-width: 230px; }
.list tr.logrow td { border-top: 0; padding: 0 0 14px; }
.details { display: grid; gap: 8px; }
.dlog ul.content li { grid-template-columns: 1fr auto; }
.dlog summary { cursor: pointer; list-style: none; font: 600 10px/1 var(--head); text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.dlog summary::-webkit-details-marker { display: none; }
.dlog summary::after { content: " ▾"; }
.dlog[open] summary::after { content: " ▴"; }
.dlog ul { list-style: none; margin: 10px 0 0; padding: 0; font-size: 14px; background: var(--soft); }
.dlog li { display: grid; grid-template-columns: 130px 1fr auto; gap: 14px; padding: 6px 12px; border-top: 1px solid #fff; }
.dlog li span:nth-child(2) { overflow-wrap: anywhere; }
.dlog .ok { color: #1a8f84; }

/* Download-Seite */
.dl { max-width: 620px; }
.files { margin: 26px 0 8px; text-align: left; }
div.files .filelist { margin-top: 0; }
.files summary { cursor: pointer; font: 600 11px/1 var(--head); text-transform: uppercase; letter-spacing: .14em; color: var(--muted); text-align: center; list-style: none; }
.files summary::-webkit-details-marker { display: none; }
.files summary::after { content: " ▾"; }
.files[open] summary::after { content: " ▴"; }
.files .filelist { max-height: 340px; margin-top: 16px; }

@media (max-width: 720px) {
  .top { padding: 12px 16px; }
  .top .logo img { height: 30px; }
  main { padding: 16px; }
  .card { padding: 22px 18px; }
  main.card { margin: 6vh 16px; }
  .grid3 { grid-template-columns: 1fr; }
  .list thead { display: none; }
  .list tr { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); padding: 10px 0; }
  .list td { border: 0; padding: 4px 8px 4px 0; }
  .list td:first-child, .list td.actions, .list tr.logrow td { grid-column: 1 / -1; text-align: left; }
  .list tr.logrow { border-top: 0; padding-top: 0; }
  .dlog li { grid-template-columns: 1fr auto; }
  .dlog li span:first-child { grid-column: 1 / -1; color: var(--muted); }
  .list td.actions button { margin: 6px 6px 0 0; }
}

/* Aufklappmenü wie die Kopfzeile: schwarz, je App der Schriftzug „22DEGREE Name“, blendet nach unten ein */
.menu nav { position: absolute; top: calc(100% + 18px); left: -28px; z-index: 30; min-width: 280px; display: block;
  background: #000; border: 0; padding: 4px 0 12px; box-shadow: 0 18px 40px rgba(0, 0, 0, .28); animation: menudown .22s ease-out both; }
.menu nav a { display: block; padding: 14px 28px; font: 400 14px/1 var(--head); text-transform: uppercase; letter-spacing: .16em;
  color: #fff; text-decoration: none; white-space: nowrap; transition: color .15s, background .15s; }
.menu nav a strong { font-weight: 700; }
.menu nav a:hover span { background: linear-gradient(90deg, #009fe3, #27ccc0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.menu nav a.here { color: #6f6f6f; }
.menu nav a.here:hover span { background: none; color: #6f6f6f; }
.menu nav a.out { font: 600 11px/1 var(--head); letter-spacing: .14em; color: #8a8a8a; border-top: 1px solid #222; margin-top: 6px; padding-top: 16px; }
@keyframes menudown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .menu nav { animation: none; } }
.tag.warn { background: var(--danger); }
tr.pending td { background: #fbf3f2; }
/* Vorschaubilder auf der Download-Seite (ab 2.3) */
.filelist li.has-thumb > a { flex: 1; overflow-wrap: anywhere; }
.filelist li > .thumb { width: 64px; height: 64px; object-fit: cover; flex: none; background: var(--soft); border: 1px solid var(--line); }
.filelist li > .thumb.ext { display: flex; align-items: center; justify-content: center; font: 600 10px/1 var(--head); letter-spacing: .08em; color: var(--muted); }
/* Vorschaubilder in der Inhaltsliste der Verwaltung */
.dlog ul.content li.t { grid-template-columns: 48px 1fr auto; align-items: center; }
.dlog ul.content li.t > .thumb { width: 48px; height: 48px; object-fit: cover; background: #fff; border: 1px solid var(--line); grid-column: auto; }
.dlog ul.content li.t > .thumb.ext { display: flex; align-items: center; justify-content: center; font: 600 9px/1 var(--head); letter-spacing: .08em; color: var(--muted); }
.dlog ul.content li.t > span:nth-child(2) { grid-column: auto; color: inherit; }
