/* Verwaltungsbereich: Datenkarten, Profil, Status, Benutzerkarten, Dialog */
.flex-container-main.adm-page:has(.adm-wrap) { max-width: 1180px; }
.adm-page > .adm-wrap, .adm-page > .adm-msg { flex: 0 0 100%; width: 100%; max-width: none; padding: 0 0 24px; margin: 0; box-sizing: border-box; }
.adm-wrap { display: grid; gap: 24px; align-content: start; }
.adm-wrap.adm-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.adm-msg { text-align: center; padding: 14px 18px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); margin: 0 0 24px; }
.adm-msg:focus { outline: none; }
.adm-page .alink { font-weight: 600; }

.dcard { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; min-width: 0; }
.dcard-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.dcard-head h2, .profile-id h2 { margin: 0; font-size: 1.2rem; line-height: 1.3; text-align: left; }
.dcard-head h2::after, .profile-id h2::after { display: none; }
.dcard h3 { margin: 0 0 12px; font-size: 1rem; }
.muted { color: var(--ink-soft); margin: 0; }
.small { font-size: .85rem; }
.chip { display: inline-block; white-space: nowrap; font-size: .8rem; font-weight: 600; color: var(--brand-ink); background: #fff3cc; border-radius: 999px; padding: 4px 12px; }
.dcard-text { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; line-height: 1.6; overflow-wrap: anywhere; max-height: 260px; overflow: auto; }

.avatar { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--brand); color: var(--ink); font-weight: 700; font-size: 1.15rem; }
.avatar-lg { width: 72px; height: 72px; font-size: 1.9rem; }
.pill { display: inline-block; flex: 0 0 auto; font-size: .72rem; font-weight: 700; letter-spacing: .06em; border-radius: 999px; padding: 4px 11px; }
.pill-admin { background: var(--brand); color: var(--ink); }
.pill-mod { background: var(--dark); color: #fff; }
.pill-user { background: #f0eeec; color: var(--ink-soft); }
.pill-banned { background: var(--err-bg); color: var(--err); border: 1px solid #fecaca; }

.profile-head { display: flex; align-items: center; gap: 20px; }
.profile-id { flex: 1; min-width: 0; }
.profile-id p { overflow-wrap: anywhere; }

.fold { margin-top: 18px; }
.fold > summary { list-style: none; }
.fold > summary::-webkit-details-marker { display: none; }
.btn-ghost { display: inline-block; cursor: pointer; font-weight: 600; font-size: .95rem; padding: 10px 18px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); transition: background .15s, border-color .15s; }
.btn-ghost:hover { background: #fff6dd; border-color: var(--brand-dark); }
.btn-ghost:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.fold[open] > summary { background: #fff3cc; border-color: var(--brand-dark); }
.fold > form, .fold > .fold-grid { margin-top: 16px; }
.fold-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.lbl { display: block; font-size: .85rem; font-weight: 600; color: var(--ink-soft); margin: 0 0 12px; }
.lbl .txtbox { margin-top: 4px; }
.fold-danger[open] > summary { background: var(--err-bg); border-color: #fecaca; color: var(--err); }
input[type=submit].danger { background: var(--err); color: #fff; }
input[type=submit].danger:hover { background: #991b1b; color: #fff; box-shadow: 0 4px 14px rgba(185,28,28,.35); }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.tile { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--bg-soft); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tile-label { font-size: .75rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-soft); }
.tile-value { font-size: 1.35rem; line-height: 1.2; display: flex; align-items: center; gap: 8px; }
.tile-sub { font-size: .8rem; color: var(--ink-soft); }
.bar { height: 8px; border-radius: 999px; background: #e7e5e4; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 999px; background: var(--brand); }
.bar-warn i { background: #f59e0b; }
.bar-err i { background: var(--err); }
.bar-ok i { background: var(--brand-dark); }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.dot-ok { background: #16a34a; box-shadow: 0 0 0 4px rgba(22,163,74,.18); }
.dot-err { background: var(--err); box-shadow: 0 0 0 4px rgba(185,28,28,.18); }

.kv { margin: 0; display: grid; }
.kv > div { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.kv > div:last-child { border-bottom: 0; }
.kv dt { font-weight: 600; color: var(--ink-soft); }
.kv dd { margin: 0; overflow-wrap: anywhere; }

#user-filter { margin: 0 0 16px; }
.ugrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.ucard { display: flex; align-items: center; gap: 12px; text-align: left; font: inherit; color: inherit; text-decoration: none; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .1s; min-width: 0; }
.ucard:hover { border-color: var(--brand-dark); box-shadow: 0 4px 14px rgba(229,169,0,.25); }
.ucard:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.ucard-main { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.35; }
.ucard-main > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ucard.is-banned { border-color: #fecaca; background: var(--err-bg); }
.ucard.is-banned .avatar { background: var(--err); color: #fff; }
.ucard[hidden] { display: none; }

dialog.modal { border: 0; border-radius: var(--radius); padding: 24px; width: min(520px, calc(100% - 32px)); max-height: calc(100vh - 32px); box-shadow: 0 24px 64px rgba(0,0,0,.35); color: var(--ink); }
dialog.modal::backdrop { background: rgba(28,26,27,.6); }
.modal-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.modal-head > div { flex: 1; min-width: 0; }
.modal-head h2 { margin: 0; font-size: 1.15rem; text-align: left; overflow-wrap: anywhere; }
.modal-head h2::after { display: none; }
.modal-head p { overflow-wrap: anywhere; }
.modal-x { border: 0; background: none; font-size: 1.8rem; line-height: 1; cursor: pointer; color: var(--ink-soft); padding: 4px 8px; border-radius: 8px; }
.modal-x:hover { background: #f0eeec; color: var(--ink); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

@media (max-width: 1000px) { .ugrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 768px) {
  .adm-wrap.adm-cols, .fold-grid, .ugrid, .two { grid-template-columns: 1fr; }
  .dcard { padding: 18px; }
  .profile-head { flex-wrap: wrap; }
  .kv > div { grid-template-columns: 1fr; gap: 2px; }
}

.bar i.w0 { width: 0%; }
.bar i.w5 { width: 5%; }
.bar i.w10 { width: 10%; }
.bar i.w15 { width: 15%; }
.bar i.w20 { width: 20%; }
.bar i.w25 { width: 25%; }
.bar i.w30 { width: 30%; }
.bar i.w35 { width: 35%; }
.bar i.w40 { width: 40%; }
.bar i.w45 { width: 45%; }
.bar i.w50 { width: 50%; }
.bar i.w55 { width: 55%; }
.bar i.w60 { width: 60%; }
.bar i.w65 { width: 65%; }
.bar i.w70 { width: 70%; }
.bar i.w75 { width: 75%; }
.bar i.w80 { width: 80%; }
.bar i.w85 { width: 85%; }
.bar i.w90 { width: 90%; }
.bar i.w95 { width: 95%; }
.bar i.w100 { width: 100%; }
input[type=search].txtbox { display: block; width: 100%; box-sizing: border-box; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 1rem; background: #fff; -webkit-appearance: none; appearance: none; }
input[type=search].txtbox:focus { outline: none; border-color: var(--brand-dark); box-shadow: 0 0 0 4px rgba(255,189,0,.28); }

/* Profilkarte */
.profile-card { padding: 0; overflow: hidden; }
.profile-banner { height: 110px; background: linear-gradient(120deg, #ffbd00 0%, #ff9d00 55%, #e5a900 100%); position: relative; }
.profile-banner::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 85% 20%, rgba(255,255,255,.35), transparent 45%), radial-gradient(circle at 10% 120%, rgba(28,26,27,.18), transparent 50%); }
.profile-body { display: flex; align-items: flex-end; gap: 20px; flex-wrap: wrap; padding: 0 28px 8px; position: relative; }
.profile-body > .profile-id { flex: 1; min-width: 200px; padding-bottom: 4px; }
.profile-body .profile-id { padding-top: 14px; }
.avatar-xl { width: 96px; height: 96px; font-size: 2.6rem; background: var(--dark); color: var(--brand); border: 5px solid #fff; box-shadow: var(--shadow); margin: -48px 0 0; }
.profile-body { padding-left: 28px; }
.profile-tiles { padding: 18px 28px 28px; }
.btn-solid { display: inline-block; cursor: pointer; font: inherit; font-weight: 650; border: 0; border-radius: 10px; padding: 11px 20px; background: var(--brand); color: var(--ink); box-shadow: 0 1px 2px rgba(28,26,27,.15); transition: background .15s, box-shadow .15s; margin-top: 18px; }
.btn-solid:hover { background: var(--brand-dark); box-shadow: 0 4px 14px rgba(229,169,0,.4); }
.btn-solid:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.profile-body .btn-solid, .profile-body .pill { margin-top: 0; margin-bottom: 6px; }

/* Datenkarten mit Akzent */
.dcard-accent { border-top: 4px solid var(--brand); display: flex; flex-direction: column; }
.dcard-accent .btn-solid { align-self: flex-start; }
.dcard-accent .dcard-text { margin-bottom: 0; }

/* Textbearbeitung */
dialog.modal-wide { width: min(680px, calc(100% - 32px)); }
.adm-ta { display: block; width: 100%; box-sizing: border-box; min-height: 220px; resize: vertical; font: inherit; line-height: 1.6; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-soft); color: var(--ink); }
.adm-ta:focus { outline: none; background: #fff; border-color: var(--brand-dark); box-shadow: 0 0 0 4px rgba(255,189,0,.28); }
.ta-foot { display: flex; justify-content: space-between; gap: 12px; margin: 8px 2px 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 12px; align-items: center; }
.modal-actions input[type=submit] { margin: 0; width: auto; padding: 11px 26px; font-size: 1rem; }
dialog.modal .fold > summary { width: 100%; box-sizing: border-box; }
@media (max-width: 768px) { .profile-body { padding-left: 18px; padding-right: 18px; } .profile-tiles { padding: 14px 18px 20px; } }

/* Freigaben */
.ucard-new { justify-content: center; border: 2px dashed var(--line); background: var(--bg-soft); font-weight: 650; min-height: 92px; }
.ucard-new:hover { border-color: var(--brand-dark); background: #fff6dd; }
.ucard-new .plus { font-size: 1.6rem; line-height: 1; color: var(--brand-dark); margin-right: 8px; }
.ucard-share .ucard-main .pill { align-self: flex-start; margin-top: 6px; }
.ucard-go { align-self: flex-end; color: var(--brand-ink); font-weight: 600; }
.pill-t-ok { background: #f0fdf4; color: var(--ok); border: 1px solid #bbf7d0; }
.pill-t-warn { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.pill-t-err { background: var(--err-bg); color: var(--err); border: 1px solid #fecaca; }
.adm-msg-s { margin: 0 0 14px; padding: 10px 14px; }
.share-link { margin: 0 0 12px; }
.sfiles { list-style: none; margin: 0 0 16px; padding: 0; }
.sfiles li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.sfiles li:last-child { border-bottom: 0; }
.sf-name { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.sf-size { min-width: 64px; text-align: right; }
.sf-del { margin: 0; }
.btn-danger-sm { cursor: pointer; font: inherit; font-size: .85rem; font-weight: 600; color: var(--err); background: #fff; border: 1px solid #fecaca; border-radius: 999px; padding: 4px 12px; }
.btn-danger-sm:hover { background: var(--err-bg); }
.btn-outline { display: block; width: 100%; cursor: pointer; font: inherit; font-weight: 650; color: var(--ink); background: #fff; border: 1px solid var(--brand-dark); border-radius: 10px; padding: 12px; margin-top: 12px; }
.btn-outline:hover { background: #fff6dd; }
.btn-sm { padding: 7px 14px; margin: 0; font-size: .9rem; text-decoration: none; }
a.btn-solid { text-decoration: none; }
.dropzone { position: relative; display: block; text-align: center; cursor: pointer; font-weight: 650; color: var(--brand-ink); border: 2px dashed var(--brand-dark); background: #fffbeb; border-radius: 12px; padding: 18px; margin-bottom: 8px; }
.dropzone:hover { background: #fff3cc; }
.dropzone input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.dropzone:focus-within { outline: 3px solid var(--ink); outline-offset: 2px; }
.upform p { margin: 0 0 12px; }
.pw-row { display: flex; gap: 8px; align-items: stretch; margin-bottom: 14px; }
.pw-row .txtbox { flex: 1; min-width: 0; margin: 0; }
.pw-row .btn-ghost { padding: 8px 12px; }
.share-public { max-width: 720px; margin: 0 auto; }
.share-login form { margin-top: 4px; }
@media (max-width: 768px) { .sfiles li { flex-wrap: wrap; } .sf-name { flex-basis: 100%; } }
