:root {
  --bg: #0b1220;
  --card: #111a2e;
  --muted: #9fb0d0;
  --text: #eef3ff;
  --accent: #6ea8ff;
  --line: rgba(255, 255, 255, 0.08);
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  background: linear-gradient(180deg, #081025, #0b1220 40%);
  color: var(--text);
  font:
    14px/1.45 system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial;
}
a {
  color: var(--accent);
}
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 22px;
}
header {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
h1 {
  font-size: 20px;
  margin: 0;
}
.hint {
  color: var(--muted);
  font-size: 12px;
}
.toolbar {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 10px;
  width: 100%;
  margin-top: 14px;
}
.toolbar > * {
  min-width: 180px;
}
input,
select,
button {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
}
input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}
button {
  cursor: pointer;
}
.stats {
  margin-top: 10px;
  color: var(--muted);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
/* Optional: Für die Grid-Ansicht */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  padding: 16px;
}
@media (max-width: 980px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .toolbar {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 620px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .toolbar {
    grid-template-columns: 1fr;
  }
}
/* Container für die Karte */
.card {
  height: 100%; /* Volle Höhe nutzen */
  display: flex;
  flex-direction: column;
}

/* Container für die Karte */
.card {
  height: 100%; /* Volle Höhe nutzen */
  display: flex;
  flex-direction: column;
}

/* Container für das Bild */
.thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10; /* Festes Seitenverhältnis für alle Bilder */
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 12px;
}

/* Weichgezeichneter Hintergrund */
.thumb-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  filter: blur(12px);
  z-index: 1;
  opacity: 0.7;
}

/* Das eigentliche Bild */
.thumb img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  z-index: 2;
}

.badge {
  position: absolute;
  left: 10px;
  top: 10px;
  background: rgba(110, 168, 255, 0.16);
  border: 1px solid rgba(110, 168, 255, 0.35);
  color: var(--text);
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
}
.body {
  padding: 12px 12px 14px;
}
.title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}
.name {
  font-weight: 700;
}
.maker {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}
.bezeichnung {
  color: rgba(238, 243, 255, 0.9);
  font-size: 12px;
  margin-top: 6px;
}
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}
.chip {
  border: 1px solid var(--line);
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}
.desc {
  margin-top: 10px;
  color: rgba(238, 243, 255, 0.88);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.link {
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}
/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.modal.open {
  display: flex;
}
.modalBox {
  max-width: 980px;
  width: 100%;
  background: rgba(17, 26, 46, 0.98);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}
.modalHead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.modalTitle {
  font-weight: 800;
}
.close {
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}
.modalBody {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 0;
}
@media (max-width: 880px) {
  .modalBody {
    grid-template-columns: 1fr;
  }
}
.gallery {
  background: rgba(255, 255, 255, 0.02);
  padding: 10px;
}
.galleryMain {
  aspect-ratio: 16/10;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
}
.galleryMain img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.15);
}
.thumbRow {
  display: flex;
  gap: 8px;
  overflow: auto;
  margin-top: 10px;
  padding-bottom: 6px;
}
.thumbRow img {
  width: 92px;
  height: 60px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
  cursor: pointer;
  opacity: 0.85;
}
.thumbRow img.active {
  outline: 2px solid rgba(110, 168, 255, 0.65);
  opacity: 1;
}
.detail {
  padding: 12px 14px;
}
.kv {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px 12px;
  font-size: 13px;
}
.k {
  color: var(--muted);
}
.v {
  color: var(--text);
}
.fullDesc {
  margin-top: 12px;
  color: rgba(238, 243, 255, 0.9);
  white-space: pre-wrap;
}
.warn {
  margin-top: 10px;
  color: rgba(255, 210, 140, 0.95);
  font-size: 12px;
}

.badge {
  background: rgba(8, 16, 35, 1) !important;
  opacity: 1 !important;
}

select {
  background: var(--card) !important;
  color: var(--text) !important;
  border: 1px solid var(--line) !important;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
}

.modal-content-box {
  background-color: #111a2e;
  padding: 20px;
  border-radius: 12px;
  max-width: 90%;
  max-height: 90%;
  text-align: center;
}

.modal-content {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
}

.close-modal {
  position: absolute;
  top: 10px;
  right: 20px;
  color: white;
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
}

#modal-title {
  color: white;
  margin-bottom: 15px;
}

/*password.php*/
/* password.php – im Stil des Katalogs */
.password-form{
  max-width: 420px;
  margin: 10vh auto 0;
  padding: 22px;
  border-radius: 18px;

  /* „Glas“-Karte wie der Rest */
  background: rgba(17, 26, 46, 0.88);  /* nah an --card */
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 60px rgba(0,0,0,.55);

  text-align: center;
}

/* Wenn du eine Überschrift im Formular hast */
.password-form h2{
  margin: 0 0 18px;
  font-size: 20px;
  letter-spacing: .2px;
}

.password-form input[type="password"]:focus{
  border-color: rgba(110,168,255,.55);
  box-shadow: 0 0 0 4px rgba(110,168,255,.16);
}

.password-form button:hover{
  background: rgba(110,168,255,.28);
}

/* Optional: kleine Fehlermeldung */
.password-form .error{
  margin-top: 10px;
  color: rgba(255, 160, 160, .95);
  font-size: 12px;
}

/* gleiche Breite für Feld + Button */
.password-form{
  --fieldWidth: 360px; /* hier kannst du später 380/400 testen */
}

.password-form input,
.password-form button{
  width: min(var(--fieldWidth), 100%);
  margin: 12px auto 14px;
  display: block;
  box-sizing: border-box; /* wichtig: Padding zählt in die Breite rein */
}

/* Input-Feinschliff (dein Look bleibt) */
.password-form input{
  padding: 12px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line);
}

.password-form input:focus{
  border-color: rgba(110,168,255,.55);
  box-shadow: 0 0 0 4px rgba(110,168,255,.16);
}

/* Button-Feinschliff */
.password-form button{
  margin: 0 auto;          /* Button nicht “nach unten versetzt” */
  padding: 12px 12px;
  border-radius: 12px;
  background: rgba(110,168,255,.22);
  border: 1px solid rgba(110,168,255,.35);
  color: var(--text);
  font-weight: 650;
}

.password-form button:hover{
  background: rgba(110,168,255,.28);
}

body.login-page{
  height: 100vh;
  overflow: hidden;   /* verhindert Scrollen */
}

/* Login-Seite: keine unnötige Scrollbar + sauber zentriert */
body.login-page{
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
}

/* Deine Passwort-Box soll dann nicht mehr mit 10vh "runtergeschoben" werden */
body.login-page .password-form{
  margin: 0;
}

/* Intro-Layout: Logo + Text */
.password-form .login-intro{
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: center;
  text-align: left;
  margin-bottom: 14px;
}

.password-form .login-logo{
  width: 56px;
  height: 56px;
  object-fit: contain;
  flex: 0 0 auto;
  opacity: 0.95;
  filter: drop-shadow(0 6px 18px rgba(0,0,0,.35));
}

.password-form .login-eyebrow{
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 2px;
}

.password-form .login-info{
  font-size: 13px;
  color: rgba(238, 243, 255, 0.9);
  line-height: 1.35;
}

.lightbox{
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0,0,0,.75);
  z-index: 9999;
}

.lightbox.open{ display: flex; }

.lightbox .lb-img{
  max-width: min(1200px, 95vw);
  max-height: 92vh;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
}

.lightbox .lb-close{
  position: fixed;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 0;
  background: rgba(255,255,255,.15);
  color: #fff;
  font-size: 28px;
  line-height: 44px;
  cursor: pointer;
}
