/* Freigaben – Oberfläche nach Clarius Corporate Design (Manual 02/2025)
   Farben ausschließlich aus der Markenpalette, Montserrat Light/SemiBold. */

@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 300; font-display: swap;
  src: url("fonts/montserrat-latin-ext-300-normal.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: "Montserrat"; font-style: normal; font-weight: 300; font-display: swap;
  src: url("fonts/montserrat-latin-300-normal.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; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/montserrat-latin-ext-600-normal.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: "Montserrat"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/montserrat-latin-600-normal.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 {
  /* Hauptfarben */
  --beere: #902C7C;
  --grau: #676868;
  /* Sekundärfarben */
  --beere-dunkel: #4A1640;
  --rosa: #DA86CA;
  --pastellrosa: #F1E4EE;
  --dunkelgrau: #393939;
  --pastellgrau: #E7E7E7;
  --weiss: #FFFFFF;

  --radius: 6px;
  --font: "Montserrat", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--weiss); color: var(--grau);
  font: 300 15.5px/1.6 var(--font); -webkit-font-smoothing: antialiased;
}
strong, b { font-weight: 600; color: var(--dunkelgrau); }
a { color: var(--beere); text-underline-offset: 3px; }
h1, h2, h3 { font-weight: 600; color: var(--beere); letter-spacing: -.005em; }
h1 { font-size: 1.85rem; line-height: 1.2; margin: 0 0 .5rem; }
h2 { font-size: 1.15rem; margin: 0 0 .75rem; }
.lead { font-size: 1.05rem; max-width: 62ch; margin: 0 0 6px; }
main { max-width: 1040px; margin: 0 auto; padding: 36px 16px 96px; }

/* ---------- Kopfzeile ---------- */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 14px 24px; background: var(--weiss); border-bottom: 1px solid var(--pastellgrau);
  position: relative;
}
.top::after { /* dünne Markenlinie */
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, var(--beere), var(--rosa) 60%, transparent);
}
.logo { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; }
.logo img { display: block; height: 30px; width: auto; }
.logo span { color: var(--grau); font-weight: 300; font-size: 15px; padding-left: 14px; border-left: 1px solid var(--pastellgrau); line-height: 26px; }
.nav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.nav a { color: var(--grau); text-decoration: none; padding: 6px 12px; border-radius: var(--radius); }
.nav a:hover { color: var(--beere); }
.nav a[aria-current] { color: var(--beere); font-weight: 600; background: var(--pastellrosa); }
.nav form { margin: 0 0 0 8px; }
.nav button.link { color: var(--grau); text-decoration: none; }
.nav button.link:hover { color: var(--beere); }

/* ---------- Hero (Login, Passwortseite, Meldungen für Externe) ---------- */
body.hero { background: var(--beere-dunkel); min-height: 100vh; display: flex; flex-direction: column; }
body.hero main {
  flex: 1; width: 100%; max-width: none; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(218,134,202,.45), transparent 60%),
    radial-gradient(900px 500px at 0% 110%, rgba(144,44,124,.85), transparent 65%),
    linear-gradient(135deg, var(--beere) 0%, var(--beere-dunkel) 75%);
}
body.hero .card.narrow { margin: 6vh auto; box-shadow: 0 24px 60px rgba(74,22,64,.35); border: 0; }

/* ---------- Karten, Text ---------- */
.card { background: var(--weiss); border: 1px solid var(--pastellgrau); border-radius: var(--radius); padding: 26px; margin: 0 0 20px; }
.card.narrow { max-width: 460px; width: 100%; margin: 8vh auto; padding: 34px; }
.card.danger { border-color: var(--rosa); }
.card.danger h2 { color: var(--beere-dunkel); }
.ok-box { border-color: var(--beere); border-width: 1px 1px 1px 4px; }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.head h1 { margin: 0; }
.eyebrow { text-transform: uppercase; font-size: 12px; letter-spacing: .12em; color: var(--grau); margin: 0 0 8px; font-weight: 600; }
.eyebrow.ok { color: var(--beere); }
.muted { color: var(--grau); opacity: .85; }
.small { font-size: 13px; }
.note { font-size: 13.5px; color: var(--beere-dunkel); background: var(--pastellrosa); padding: 8px 12px; border-radius: var(--radius); margin: 8px 0 18px; }
.flash { color: var(--beere-dunkel); background: var(--pastellrosa); padding: 10px 14px; border-radius: var(--radius); border-left: 3px solid var(--beere); }
.error { color: var(--beere-dunkel); background: var(--pastellrosa); border-left: 3px solid var(--beere); padding: 10px 14px; border-radius: var(--radius); margin: 14px 0; font-weight: 600; }
.empty { text-align: center; padding: 48px 20px; }

/* ---------- Formulare ---------- */
label, .label { display: block; font-weight: 600; font-size: 13.5px; color: var(--dunkelgrau); margin-bottom: 6px; }
input[type=text], input[type=password], input[type=date], input[type=number], input:not([type]) {
  width: 100%; font: 300 15px var(--font); color: var(--dunkelgrau); background: var(--weiss);
  border: 1px solid #cfcfcf; border-radius: var(--radius); padding: 9px 12px; min-height: 42px;
}
input::placeholder { color: var(--grau); opacity: .7; }
input:focus { outline: none; border-color: var(--beere); box-shadow: 0 0 0 3px var(--pastellrosa); }
button:focus-visible, a:focus-visible, input[type=checkbox]:focus-visible, input[type=radio]:focus-visible { outline: 2px solid var(--beere); outline-offset: 2px; }
input[readonly] { background: #fafafa; }
input.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .03em; color: var(--beere-dunkel); }
input[type=checkbox], input[type=radio] { accent-color: var(--beere); width: 16px; height: 16px; flex: none; transform: translateY(2px); }
label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 300; font-size: 15px; color: var(--grau); margin: 8px 0; }
fieldset { border: 0; padding: 0; margin: 26px 0 0; }
legend { font-weight: 600; color: var(--beere); font-size: 1.05rem; padding: 0; margin-bottom: 14px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 24px; }
.field.wide { grid-column: 1 / -1; }
.pw-modes input[name=password] { margin: 2px 0 6px 26px; width: calc(100% - 26px); max-width: 420px; }
.hint { display: block; font-size: 12.5px; color: var(--grau); margin-top: 6px; line-height: 1.45; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.stack .btn { align-self: flex-start; margin-top: 8px; }
form.inline { display: inline; margin: 0; }
@media (max-width: 680px) { .grid { grid-template-columns: 1fr; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 14.5px var(--font); letter-spacing: .01em;
  background: var(--beere); color: var(--weiss); border: 1px solid var(--beere); border-radius: var(--radius);
  padding: 10px 20px; min-height: 42px; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--beere-dunkel); border-color: var(--beere-dunkel); }
.btn.ghost { background: transparent; color: var(--beere); border-color: var(--beere); }
.btn.ghost:hover { background: var(--pastellrosa); }
.btn.danger { background: var(--beere-dunkel); border-color: var(--beere-dunkel); }
.btn.danger:hover { background: var(--dunkelgrau); border-color: var(--dunkelgrau); }
.btn.sm { min-height: 34px; padding: 5px 12px; font-size: 13px; }
.btn[disabled] { opacity: .4; cursor: default; }
.btn[disabled]:hover { background: var(--beere); border-color: var(--beere); }
.btn.ghost[disabled]:hover { background: transparent; }
button.link { background: none; border: 0; padding: 0; color: var(--beere); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: var(--radius); border: 1px solid transparent; background: none; color: var(--grau); cursor: pointer; }
.icon-btn:hover { color: var(--beere-dunkel); background: var(--pastellrosa); border-color: var(--rosa); }
.actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 22px; }

/* ---------- Upload ---------- */
.drop {
  border: 1.5px dashed var(--rosa); border-radius: var(--radius); padding: 40px 20px; text-align: center;
  background: linear-gradient(180deg, #fff, var(--pastellrosa)); transition: border-color .15s, background .15s;
}
.drop.over { border-color: var(--beere); border-style: solid; background: var(--pastellrosa); }
.drop-icon { color: var(--beere); margin-bottom: 6px; }
.drop-title { font-size: 1.2rem; font-weight: 600; color: var(--beere); margin: 0 0 4px; }
.pick { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 18px 0 10px; }
.pick label { margin: 0; position: relative; overflow: hidden; color: var(--beere); }
.pick label:hover { color: var(--beere); }
.pick input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.selection { margin-top: 16px; border: 1px solid var(--pastellgrau); border-radius: var(--radius); }
.sel-head { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--pastellgrau); background: #fafafa; }
.selection ul { list-style: none; margin: 0; padding: 6px 14px; max-height: 220px; overflow: auto; font-size: 13.5px; }
.selection li { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; overflow-wrap: anywhere; }
.selection li span:last-child { white-space: nowrap; opacity: .8; }
progress { width: 220px; height: 6px; accent-color: var(--beere); }

/* ---------- Ergebnis / Kopierfelder ---------- */
.copy { margin: 14px 0 6px; min-width: 0; }
.copyrow { display: flex; gap: 8px; }
.copyrow input { flex: 1; min-width: 0; }
.split { display: grid; grid-template-columns: 1.4fr 1fr; gap: 0 16px; }
@media (max-width: 680px) { .split { grid-template-columns: 1fr; } }
.result h2 { font-size: 1.4rem; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin: 20px 0 0; padding-top: 18px; border-top: 1px solid var(--pastellgrau); }
.facts dt { font-size: 12.5px; }
.facts dd { margin: 0; font-weight: 600; color: var(--dunkelgrau); }

/* ---------- Status ---------- */
.badge { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 99px; vertical-align: 2px;
  background: var(--pastellgrau); color: var(--grau); white-space: nowrap; }
.badge.ok { background: var(--pastellrosa); color: var(--beere); }
.badge.warn { background: var(--beere-dunkel); color: var(--weiss); }
.badge.outline { background: transparent; border: 1px solid var(--rosa); color: var(--beere-dunkel); font-weight: 300; }
h1 .badge { font-size: 12px; vertical-align: 6px; }

/* ---------- Tabellen ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--pastellgrau); margin: 8px 0 14px; }
.tabs a { padding: 8px 14px; text-decoration: none; color: var(--grau); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a span { font-size: 12px; background: var(--pastellgrau); border-radius: 99px; padding: 1px 7px; margin-left: 4px; }
.tabs a[aria-current] { color: var(--beere); border-bottom-color: var(--beere); font-weight: 600; }
.tabs a[aria-current] span { background: var(--pastellrosa); color: var(--beere); }
.bulk { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 0 0 10px; }
.bulk label.check { margin: 0 8px 0 0; font-size: 14px; }
.tablewrap { overflow-x: auto; border: 1px solid var(--pastellgrau); border-radius: var(--radius); }
table.list { width: 100%; border-collapse: collapse; }
.list th, .list td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--pastellgrau); vertical-align: top; }
.list th { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; color: var(--grau); background: #fafafa; }
.list tr:last-child td { border-bottom: 0; }
.list tbody tr:hover { background: #fcf8fb; }
.list tr:has(.sel input:checked) { background: var(--pastellrosa); }
.list td a { font-weight: 600; text-decoration: none; }
.list td a:hover { text-decoration: underline; }
.list .sel { width: 36px; padding-right: 0; }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions > * { vertical-align: middle; }
.num { text-align: right !important; white-space: nowrap; font-variant-numeric: tabular-nums; }
.meter { height: 4px; background: var(--pastellgrau); border-radius: 2px; margin-top: 6px; overflow: hidden; }
.meter span { display: block; height: 100%; width: 0; background: var(--beere); }

/* ---------- Dateien einer Freigabe ---------- */
select { width: 100%; font: 300 15px var(--font); color: var(--dunkelgrau); background: var(--weiss);
  border: 1px solid #cfcfcf; border-radius: var(--radius); padding: 9px 12px; min-height: 42px; }
select:focus { outline: none; border-color: var(--beere); box-shadow: 0 0 0 3px var(--pastellrosa); }
.ftree { list-style: none; margin: 0; padding: 0; border: 1px solid var(--pastellgrau); border-radius: var(--radius); max-height: 460px; overflow: auto; }
.frow { display: flex; align-items: center; gap: 12px; padding: 7px 12px; border-top: 1px solid var(--pastellgrau); min-height: 46px; }
.frow:first-child { border-top: 0; }
.frow:hover { background: #fcf8fb; }
.frow:has(input[type=checkbox]:checked) { background: var(--pastellrosa); }
.frow > input[type=checkbox] { transform: none; }
.fname { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; color: var(--dunkelgrau); overflow-wrap: anywhere; }
.fdir .fname { font-weight: 600; }
.frow[data-depth="1"] .fname { padding-left: 22px; }
.frow[data-depth="2"] .fname { padding-left: 44px; }
.frow[data-depth="3"] .fname { padding-left: 66px; }
.frow[data-depth="4"] .fname { padding-left: 88px; }
.frow[data-depth="5"] .fname, .frow[data-depth="6"] .fname, .frow[data-depth="7"] .fname { padding-left: 110px; }
.ftype { display: inline-grid; place-items: center; flex: none; min-width: 36px; height: 26px; padding: 0 4px; border-radius: 4px;
  background: var(--pastellrosa); color: var(--beere); font-size: 10px; font-weight: 600; letter-spacing: .04em; }
.ftype.dir { background: var(--beere); color: var(--weiss); }
.fsize { font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.factions { min-width: 92px; text-align: right; }
.filebtn { position: relative; overflow: hidden; margin: 0; }
.filebtn input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.fadd { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--pastellgrau); }
.fadd h3 { margin: 0 0 4px; font-size: 1rem; }
.fadd .grid { margin-top: 14px; }
.pick.left { justify-content: flex-start; align-items: center; }
@media (max-width: 680px) { .fsize { display: none; } }

/* ---------- Links einer Freigabe ---------- */
.linkgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 8px; }
@media (max-width: 760px) { .linkgrid { grid-template-columns: 1fr; } }
.linkcard { min-width: 0; border: 1px solid var(--pastellgrau); border-radius: var(--radius); padding: 16px 18px; background: #fcfcfc; }
.linkcard[data-kind="edit"] { border-left: 3px solid var(--beere); }
.linkcard[data-kind="view"] { border-left: 3px solid var(--rosa); }
.linkcard h3 { margin: 0 0 2px; font-size: 1rem; }
.linkcard .copy { margin-top: 10px; }
.linkcard .actions { margin-top: 12px; }
.plain-link { overflow-wrap: anywhere; }
.mono-s { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.pw-state { margin: 12px 0 0; padding: 10px 14px; border-radius: var(--radius); background: var(--pastellgrau); color: var(--dunkelgrau); }
.links .note { margin-bottom: 0; }

/* ---------- Upload kompakt / Hinweise ---------- */
.drop.compact { padding: 22px 16px; }
.drop.compact .drop-title { font-size: 1.05rem; }
.drop.compact .pick { margin: 12px 0 2px; }
.grid.tight { margin-top: 16px; gap: 14px 24px; }
.hint.center { text-align: center; }
.hint-right { margin-left: auto; }
.empty-files { margin: 18px 0 0; padding: 18px; border: 1px dashed var(--pastellgrau); border-radius: var(--radius); text-align: center; }
#dateien .ftree, #dateien .bulk { margin-top: 18px; }
#dateien .bulk + .ftree { margin-top: 0; }

/* ---------- Kunden ---------- */
.linkgrid.one { grid-template-columns: 1fr; }
.linkcard[data-kind="customer"] { border-left: 3px solid var(--beere-dunkel); }
.usage { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 32px; }
.usage strong { display: block; font-size: 1.15rem; margin: 2px 0 8px; }
.usage .meter { height: 6px; }
@media (max-width: 680px) { .usage { grid-template-columns: 1fr; } }
.section-title { margin: 28px 0 12px; }
.spacer { height: 20px; }
.backlink { margin: -8px 0 14px; font-size: 14px; }
.backlink a { text-decoration: none; }
hr.sep { border: 0; border-top: 1px solid var(--pastellgrau); margin: 24px 0; }
.row-actions > * + * { margin-left: 6px; }

/* ---------- Kundenbereich: Tabs ---------- */
.ctabs { display: flex; gap: 4px; border-bottom: 1px solid var(--pastellgrau); margin: 18px 0 24px; overflow-x: auto; }
.ctabs a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; color: var(--grau); text-decoration: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.ctabs a:hover { color: var(--beere); }
.ctabs a[aria-current] { color: var(--beere); border-bottom-color: var(--beere); font-weight: 600; }
.ctabs svg { flex: none; }

/* ---------- Anlegen: Titel + eingeklappte Einstellungen ---------- */
.title-field { margin-top: 20px; }
details.more { margin-top: 18px; border: 1px solid var(--pastellgrau); border-radius: var(--radius); padding: 0 16px; }
details.more > summary { cursor: pointer; padding: 12px 0; font-weight: 600; color: var(--beere); list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "▸"; display: inline-block; width: 1.2em; transition: transform .15s; }
details.more[open] > summary::before { transform: rotate(90deg); }
details.more > summary .muted { font-weight: 300; font-size: 13px; }
details.more[open] { padding-bottom: 16px; }

/* ---------- Kunden-Link: Passwort-Kachel ---------- */
.linkcard.pwcard { border-left: 3px solid var(--pastellgrau); }
.linkcard.pwcard .pw-state { margin: 10px 0 0; }
