/* Jahnschule Upload Center – Stylesheet
   Farben und Abstände entsprechen dem Entwurf (Nunito, Blurple #6a5acd). */

@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url("../fonts/nunito-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url("../fonts/nunito-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --accent: #6a5acd;
  --accent-hover: #5b4cbf;
  --accent-active: #4e40a8;
  --accent-soft: #efedfb;
  --accent-soft-2: #f4f2fd;
  --bg: #f6f6fb;
  --surface: #fff;
  --text: #23243a;
  --text-2: #4a4b63;
  --text-3: #6b6c85;
  --text-4: #8c8da6;
  --muted: #9a9ab0;
  --line: #ebebf3;
  --line-2: #f0f0f6;
  --border: #dcdcea;
  --border-hover: #b9b6d8;
  --ok-bg: #eaf7ef;
  --ok: #2f7d4f;
  --ok-dot: #3aa268;
  --warn-bg: #fdf3e2;
  --warn: #9a6a17;
  --err-bg: #fdeceb;
  --err: #b8483f;
  --shadow: 0 1px 2px rgba(35,36,58,.04), 0 8px 30px rgba(35,36,58,.06);
  --shadow-lg: 0 1px 2px rgba(35,36,58,.04), 0 12px 40px rgba(35,36,58,.08);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  background: var(--bg); color: var(--text);
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px; line-height: 1.55;
}
h1, h2, h3 { color: var(--text); letter-spacing: 0; font-weight: 700; line-height: 1.15; margin: 0; }
a { color: var(--accent); } a:hover { color: var(--accent-hover); }
::selection { background: #e4e0fa; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; background: #f0f0f6; padding: 1px 5px; border-radius: 5px; }

/* — Formularelemente — */
.input {
  width: 100%; min-height: 42px; padding: 8px 14px; font: inherit; font-size: 14px;
  color: var(--text); caret-color: var(--accent);
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
}
.input:hover { border-color: var(--border-hover); }
.input:focus-visible { border-color: var(--accent); outline-offset: 0; }
.input::placeholder { color: var(--muted); }
.input-lg { font-size: 16px; min-height: 48px; padding: 10px 14px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; text-decoration: none; font: inherit; font-size: 14px; font-weight: 600;
  line-height: 1.2; color: var(--text); background: transparent;
  border: 1px solid transparent; padding: 6px 10px; border-radius: 8px;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-ghost { color: var(--accent); font-size: 13px; }
.btn-ghost:hover { background: var(--accent-soft); }
.btn-primary-solid {
  min-height: 48px; border-radius: 12px; background: var(--accent); color: #fff; font-size: 15px;
}
.btn-primary-solid:hover:not(:disabled) { background: var(--accent-hover); }
.btn-primary-solid:active:not(:disabled) { background: var(--accent-active); }

.form-error { font-size: 13px; color: var(--err); line-height: 1.45; }
.muted { color: var(--muted); font-weight: 400; }

/* — Marke — */
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 12px; background: var(--accent-soft);
  display: grid; place-items: center; color: var(--accent); font-size: 15px; font-weight: 700; flex: none;
}
.brand-name { font-size: 15px; font-weight: 600; }

/* — Anmeldung — */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card {
  width: min(400px, 100%); background: var(--surface); border-radius: 20px; padding: 36px 32px;
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 22px; margin: 0;
}
.login-title { font-size: 26px; margin: 0 0 6px; }
.login-text { margin: 0; font-size: 15px; color: var(--text-3); line-height: 1.5; }
.login-fields { display: flex; flex-direction: column; gap: 10px; }
.login-hint { margin: 0; font-size: 13px; color: var(--muted); }
.input.shake { animation: shake .3s; border-color: var(--err); }
@keyframes shake { 20%,60% { transform: translateX(-4px) } 40%,80% { transform: translateX(4px) } }

/* — App-Rahmen — */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 14px; padding: 14px 28px;
  background: var(--surface); border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.topbar-title { display: flex; flex-direction: column; line-height: 1.25; }
.topbar-sub { font-size: 13px; color: var(--text-4); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--text-3); }

.pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px;
  font-weight: 600; font-size: 13px; white-space: nowrap;
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill-ok { background: var(--ok-bg); color: var(--ok); } .pill-ok .dot { background: var(--ok-dot); }
.pill-busy { background: var(--accent-soft); color: var(--accent); animation: ucpulse 1.4s ease-in-out infinite; }
.pill-err { background: var(--err-bg); color: var(--err); }
.pill-warn { background: var(--warn-bg); color: var(--warn); }

.toast {
  position: fixed; top: 16px; right: 16px; z-index: 50; max-width: min(360px, calc(100vw - 32px));
  background: var(--text); color: #fff; font-size: 14px; line-height: 1.45;
  padding: 12px 16px; border-radius: 14px; box-shadow: 0 12px 40px rgba(35,36,58,.25);
  animation: toastin .25s ease-out;
}
.toast strong { color: #b9f0cf; }
@keyframes toastin { from { opacity: 0; transform: translateY(-8px) } to { opacity: 1; transform: none } }

.banner {
  background: var(--warn-bg); color: var(--warn); font-size: 13px; font-weight: 600;
  padding: 10px 28px; border-bottom: 1px solid #f3e3c2;
}

.layout { flex: 1; display: flex; flex-wrap: wrap; max-width: 1240px; width: 100%; margin: 0 auto; }

/* — Seitenleiste — */
.sidebar {
  flex: 1 1 240px; max-width: 280px; padding: 32px 20px 32px 28px;
  display: flex; flex-direction: column; gap: 22px; border-right: 1px solid var(--line);
}
.sidebar-label {
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 10px; padding-left: 12px;
}
.folder-nav { display: flex; flex-direction: column; gap: 4px; }
.folder-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 12px;
  border: none; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-align: left;
  background: transparent; color: var(--text-2);
}
.folder-btn:hover { background: var(--line-2); }
.folder-btn.active { background: var(--accent-soft); color: var(--accent-active); }
.folder-icon {
  width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center;
  font-size: 13px; font-weight: 700; flex: none; background: var(--line-2); color: var(--text-3);
}
.folder-btn.active .folder-icon { background: var(--accent); color: #fff; }
.folder-name { flex: 1; text-align: left; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder-count { font-size: 12px; color: var(--muted); font-weight: 600; }

#new-folder-box { display: flex; flex-direction: column; gap: 6px; }
.sidebar-hint { font-size: 12px; color: var(--muted); padding-left: 4px; }
.new-folder-btn {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px;
  border: 1px dashed #cfcfe0; background: transparent; color: var(--accent);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; width: 100%; text-align: left;
}
.new-folder-btn:hover { background: var(--accent-soft); border-color: var(--border-hover); }
.new-folder-icon {
  width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center;
  background: var(--accent-soft); font-size: 18px; line-height: 1;
}
.sidebar-foot { margin-top: auto; font-size: 13px; color: var(--muted); line-height: 1.5; }

/* — Inhalt — */
.content {
  flex: 10 1 360px; padding: 32px 28px 56px; display: flex; flex-direction: column; gap: 28px; min-width: 0;
}
.eyebrow { font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.page-title { font-size: 28px; margin: 0 0 6px; overflow-wrap: anywhere; }
.page-text { margin: 0; font-size: 15px; color: var(--text-3); }

.dropzone {
  cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; min-height: 240px; padding: 32px; border-radius: 20px; transition: all .15s;
  background: var(--surface); border: 2px dashed #d6d6e6; box-shadow: var(--shadow);
}
.dropzone:hover { border-color: var(--border-hover); }
.dropzone.dragging { border-color: var(--accent); background: var(--accent-soft-2); box-shadow: 0 0 0 6px var(--accent-soft); }
.drop-icon {
  width: 60px; height: 60px; border-radius: 18px; background: var(--accent-soft);
  display: grid; place-items: center; color: var(--accent);
}
.drop-text { text-align: center; }
.drop-title { font-size: 17px; font-weight: 700; }
.drop-sub { font-size: 14px; color: var(--text-3); margin-top: 4px; }
.drop-link { color: var(--accent); font-weight: 600; }
.drop-limits { font-size: 12px; color: var(--muted); text-align: center; }

.note-field { display: flex; flex-direction: column; gap: 6px; }
.note-field label { font-size: 13px; font-weight: 600; color: var(--text-3); }
.note-field .input { min-height: 44px; }

.card {
  background: var(--surface); border-radius: 20px; padding: 24px 28px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 16px;
}
.card-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.card-title { font-size: 19px; margin: 0; flex: 1 1 auto; white-space: nowrap; }
.counts { display: flex; gap: 8px; font-size: 13px; font-weight: 600; }
.count { padding: 5px 12px; border-radius: 999px; white-space: nowrap; }
.count-done { background: var(--ok-bg); color: var(--ok); }
.count-pending { background: var(--warn-bg); color: var(--warn); }

.file-list { display: flex; flex-direction: column; }
.file-empty { padding: 28px 0; font-size: 14px; color: var(--muted); text-align: center; }
.file-row {
  display: grid; grid-template-columns: 42px minmax(0,1fr) auto; gap: 14px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--line-2);
}
.file-row:last-child { border-bottom: none; }
.file-ext {
  width: 42px; height: 42px; border-radius: 12px; background: #f3f3f9; display: grid; place-items: center;
  font-size: 11px; letter-spacing: .04em; color: var(--accent); font-weight: 700;
}
.file-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.file-name { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-error { font-size: 13px; color: var(--err); }
.file-retry { background: none; border: none; padding: 0; font: inherit; font-size: 13px; font-weight: 600; color: var(--accent); cursor: pointer; text-decoration: underline; }
.progress { height: 5px; border-radius: 3px; background: #eeeef5; margin-top: 5px; overflow: hidden; }
.progress > div { height: 100%; width: 0; background: var(--accent); border-radius: 3px; transition: width .2s; }

.tag {
  display: inline-flex; align-items: center; font-size: 12px; font-weight: 600;
  padding: 5px 12px; border-radius: 999px; white-space: nowrap;
}
.tag-done { background: var(--ok-bg); color: var(--ok); }
.tag-pending { background: var(--warn-bg); color: var(--warn); }
.tag-uploading { background: var(--accent-soft); color: var(--accent); animation: ucpulse 1.4s ease-in-out infinite; }
.tag-error { background: var(--err-bg); color: var(--err); }
@keyframes ucpulse { 0%,100% { opacity: .55 } 50% { opacity: 1 } }

.footer {
  padding: 16px 28px; font-size: 13px; color: var(--muted); display: flex; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid var(--line); background: var(--surface);
}
.footer-right { margin-left: auto; }

/* — Mobil — */
@media (max-width: 720px) {
  .topbar { padding: 12px 16px; }
  .topbar-right { width: 100%; margin-left: 0; justify-content: space-between; }
  .banner { padding: 10px 16px; }
  .sidebar { max-width: none; flex-basis: 100%; border-right: none; border-bottom: 1px solid var(--line); padding: 20px 16px; }
  .sidebar-foot { display: none; }
  .content { padding: 24px 16px 40px; gap: 20px; }
  .page-title { font-size: 24px; }
  .dropzone { min-height: 190px; padding: 24px 16px; }
  .card { padding: 18px 16px; }
  .file-row { grid-template-columns: 36px minmax(0,1fr); }
  .file-ext { width: 36px; height: 36px; font-size: 10px; }
  .file-row .tag { grid-column: 2; justify-self: start; }
  .footer { padding: 14px 16px; }
  .footer-right { margin-left: 0; }
}
