/* 508-Studios – Software-Seite & Zugangsportal
   Ergänzt base.css (Snapshot des Website-Stylesheets). Nutzt nur dessen Farb- und Schrift-Tokens. */

.sw-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Produktliste ---------- */
.sw-products { padding-bottom: clamp(5rem, 9vw, 8rem); }

.sw-product {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas: "icon" "body" "actions";
  gap: 1.75rem 2rem;
  padding: clamp(1.5rem, 3.5vw, 2.75rem);
  background: linear-gradient(180deg, rgba(31,35,43,.85), rgba(23,26,32,.85));
  border: 1px solid rgba(212,175,55,.22);
  border-radius: 2px;
}
.sw-product::before { /* goldene Kante oben, einziges Schmuckelement */
  content: ""; position: absolute; inset: -1px -1px auto -1px; height: 2px;
  background: linear-gradient(90deg, #a9852a, #f2d78a 40%, #d4af37 65%, rgba(212,175,55,0));
}
@media (min-width: 640px) {
  .sw-product { grid-template-columns: auto 1fr; grid-template-areas: "icon body" "actions actions"; }
}
@media (min-width: 900px) {
  .sw-product__actions { width: 17rem; }
  .sw-product { grid-template-columns: auto 1fr auto; grid-template-areas: "icon body actions"; align-items: start; gap: 2.5rem; }
}
.sw-product__icon { grid-area: icon; }
.sw-product__icon img { display: block; width: clamp(72px, 9vw, 104px); height: auto; }
.sw-product__body { grid-area: body; max-width: 40rem; }
.sw-product__actions { grid-area: actions; display: flex; flex-direction: column; gap: .75rem; min-width: min(100%, 15rem); }
@media (min-width: 640px) and (max-width: 899px) { .sw-product__actions { flex-direction: row; flex-wrap: wrap; } }

.sw-badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: .82rem; font-weight: 500; letter-spacing: .02em;
  color: var(--color-gold-light);
  border: 1px solid rgba(212,175,55,.45);
  border-radius: 2px;
  padding: .28rem .6rem;
}
.sw-product__name { margin-top: .9rem; font-size: clamp(1.7rem, 3.4vw, 2.5rem); color: var(--color-warm); }
.sw-platform { display: flex; align-items: center; gap: .5rem; margin-top: .5rem; color: var(--color-muted); font-size: .95rem; }
.sw-platform svg { width: 1.05rem; height: 1.05rem; color: var(--color-gold); }
.sw-product__desc { margin-top: 1.25rem; color: var(--color-muted); font-size: 1.05rem; line-height: 1.7; }
.sw-note { color: rgba(184,187,195,.75); font-size: .85rem; line-height: 1.5; margin-top: .25rem; }

/* ---------- Portal ---------- */
.sw-portal { padding: 150px 0 clamp(5rem, 9vw, 7rem); min-height: 70vh; }
@media (min-width: 768px) { .sw-portal { padding-top: 180px; } }
.sw-portal__head { margin-bottom: 2.25rem; }
.sw-portal__head h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); color: var(--color-warm); }
.sw-portal__head p { margin-top: .9rem; color: var(--color-muted); max-width: 40rem; line-height: 1.65; }
.sw-crumb { display: inline-block; margin-bottom: 1rem; color: var(--color-muted); font-size: .9rem; text-decoration: none; }
.sw-crumb:hover { color: var(--color-gold); }

.sw-panel {
  background: rgba(23,26,32,.85);
  border: 1px solid rgba(212,175,55,.2);
  border-radius: 2px;
  padding: clamp(1.25rem, 3vw, 2.25rem);
}
.sw-panel + .sw-panel { margin-top: 1.5rem; }
.sw-release > .sw-panel { margin-top: 0; }
.sw-panel h2 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; color: var(--color-warm); }
.sw-narrow { max-width: 34rem; }
.sw-mid { max-width: 46rem; }

.sw-form { display: grid; gap: 1.15rem; }
.sw-form--2 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .sw-form--2 { grid-template-columns: 1fr 1fr; } .sw-form--2 .sw-span { grid-column: 1 / -1; } }
.sw-field label, .sw-label { display: block; font-family: var(--font-display); font-size: .92rem; font-weight: 500; color: var(--color-warm); margin-bottom: .4rem; }
.sw-field .sw-hint { display: block; color: rgba(184,187,195,.8); font-size: .82rem; margin-top: .35rem; line-height: 1.45; }
.sw-input, .sw-field input[type=text], .sw-field input[type=email], .sw-field input[type=password],
.sw-field input[type=date], .sw-field textarea, .sw-field select, .sw-field input[type=file] {
  width: 100%;
  background: #0b0d12;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 2px;
  color: var(--color-warm);
  padding: .78rem .9rem;
  font-size: 1rem;
  color-scheme: dark;
  transition: border-color .2s, box-shadow .2s;
}
.sw-field textarea { min-height: 9rem; resize: vertical; line-height: 1.55; }
.sw-field input:focus, .sw-field textarea:focus, .sw-field select:focus {
  outline: none; border-color: var(--color-gold); box-shadow: 0 0 0 3px rgba(212,175,55,.22);
}
.sw-field [aria-invalid=true] { border-color: #e07a6a; }
.sw-check { display: flex; gap: .75rem; align-items: flex-start; color: var(--color-muted); font-size: .93rem; line-height: 1.55; }
.sw-check input { margin-top: .25rem; width: 1.1rem; height: 1.1rem; accent-color: var(--color-gold); flex: none; }
.sw-check a, .sw-link { color: var(--color-gold-light); text-decoration: underline; text-underline-offset: 3px; }
.sw-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.sw-hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

.sw-alert { border-radius: 2px; padding: .9rem 1.1rem; margin-bottom: 1.5rem; font-size: .96rem; line-height: 1.55; border: 1px solid; }
.sw-alert--ok { border-color: rgba(118,168,120,.55); background: rgba(118,168,120,.1); color: #cfe6cf; }
.sw-alert--err { border-color: rgba(224,122,106,.6); background: rgba(224,122,106,.1); color: #f3cfc8; }
.sw-alert--info { border-color: rgba(212,175,55,.45); background: rgba(212,175,55,.08); color: var(--color-warm); }
.sw-alert ul { margin: .4rem 0 0 1.1rem; list-style: disc; }

/* Downloadbereich */
.sw-release { display: grid; gap: 2rem; }
@media (min-width: 900px) { .sw-release { grid-template-columns: 1.1fr .9fr; } }
.sw-meta { display: grid; grid-template-columns: max-content 1fr; gap: .55rem 1.5rem; margin-top: 1.25rem; font-size: .97rem; }
.sw-meta dt { color: var(--color-muted); }
.sw-meta dd { color: var(--color-warm); }
.sw-hash { font-family: var(--font-mono); font-size: .78rem; word-break: break-all; color: var(--color-muted); }
.sw-notes { color: var(--color-muted); line-height: 1.7; white-space: pre-line; margin-top: 1rem; }
.sw-version { font-family: var(--font-display); font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 500; line-height: 1; margin-top: .6rem; }

/* Admin */
.sw-tabs { display: flex; flex-wrap: wrap; gap: .25rem 1.75rem; border-bottom: 1px solid rgba(212,175,55,.2); margin-bottom: 2rem; }
.sw-tabs a { padding: .7rem 0; font-family: var(--font-display); color: var(--color-muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.sw-tabs a:hover { color: var(--color-warm); }
.sw-tabs a[aria-current=page] { color: var(--color-gold); border-bottom-color: var(--color-gold); }
.sw-count { display: inline-grid; place-items: center; min-width: 1.4rem; height: 1.4rem; padding: 0 .35rem; margin-left: .35rem; border-radius: 999px; background: var(--color-gold); color: var(--color-midnight); font-size: .75rem; font-weight: 700; }

.sw-table-wrap { overflow-x: auto; }
.sw-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.sw-table th { text-align: left; font-family: var(--font-display); font-weight: 500; color: var(--color-muted); padding: .65rem .75rem; border-bottom: 1px solid rgba(212,175,55,.25); white-space: nowrap; }
.sw-table td { padding: .8rem .75rem; border-bottom: 1px solid rgba(255,255,255,.06); vertical-align: top; color: var(--color-warm); }
.sw-table td.sw-muted, .sw-muted { color: var(--color-muted); }
.sw-reason { white-space: pre-line; max-width: 34rem; color: var(--color-muted); }
.sw-status { display: inline-block; font-size: .78rem; padding: .15rem .5rem; border-radius: 2px; border: 1px solid rgba(255,255,255,.2); white-space: nowrap; }
.sw-status--active, .sw-status--published, .sw-status--approved { border-color: rgba(118,168,120,.6); color: #cfe6cf; }
.sw-status--locked, .sw-status--rejected, .sw-status--withdrawn { border-color: rgba(224,122,106,.6); color: #f3cfc8; }
.sw-status--pending, .sw-status--draft { border-color: rgba(212,175,55,.6); color: var(--color-gold-light); }
.sw-inline { display: inline; }
.btn-sm { min-height: 2.4rem !important; padding: .45rem .9rem !important; font-size: .88rem !important; }
.btn-danger { color: #f3cfc8; border: 1px solid rgba(224,122,106,.7); background: transparent; }
.btn-danger:hover { background: rgba(224,122,106,.12); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.sw-stack > * + * { margin-top: 1rem; }

@media (prefers-reduced-motion: reduce) { .sw-field input, .sw-field textarea { transition: none; } }
.sw-tabs__me { margin-left: auto; padding: .7rem 0; font-size: .88rem; color: var(--color-muted); overflow-wrap: anywhere; }
.sw-tabs__form { padding: .35rem 0; }
@media (max-width: 640px) { .sw-tabs__me { margin-left: 0; width: 100%; padding-bottom: 0; } }
.sw-after { margin-top: 1.5rem; }
details > summary { cursor: pointer; list-style: none; font-size: .88rem; }
details > summary::-webkit-details-marker { display: none; }
code { font-family: var(--font-mono); font-size: .9em; color: var(--color-gold-light); }
/* Fortschrittsanzeige Upload */
.sw-progress { display: grid; gap: .5rem; padding: 1rem 1.1rem; border: 1px solid rgba(212,175,55,.35); border-radius: 2px; background: rgba(212,175,55,.06); }
.sw-progress[hidden] { display: none; }
.sw-progress progress { width: 100%; height: .55rem; appearance: none; -webkit-appearance: none; border: 0; border-radius: 999px; background: rgba(255,255,255,.1); overflow: hidden; }
.sw-progress progress::-webkit-progress-bar { background: rgba(255,255,255,.1); border-radius: 999px; }
.sw-progress progress::-webkit-progress-value { background: linear-gradient(90deg, #a9852a, #f2d78a 60%, #d4af37); border-radius: 999px; transition: width .2s; }
.sw-progress progress::-moz-progress-bar { background: linear-gradient(90deg, #a9852a, #f2d78a 60%, #d4af37); border-radius: 999px; }
.sw-progress [data-upload-label] { font-size: .92rem; color: var(--color-warm); }
.sw-progress.is-error { border-color: rgba(224,122,106,.6); background: rgba(224,122,106,.1); }
.sw-progress.is-error [data-upload-label] { color: #f3cfc8; }
.sw-progress.is-error progress { display: none; }
@media (prefers-reduced-motion: reduce) { .sw-progress progress::-webkit-progress-value { transition: none; } }
.sw-status--superseded { border-color: rgba(255,255,255,.25); color: var(--color-muted); }
