/* ============================================
   CSS VARIABLES - Design Tokens
   ============================================ */
:root {
  /* Colors */
  --color-primary: #6557ff;
  --color-primary-hover: #857dff;
  --color-primary-light: #f0f1ff;
  --color-primary-border: #dad7fc;
  --color-danger: #e5484d;
  --color-danger-hover: #c93c42;
  --color-text: #23243e;
  --color-text-muted: #6b6f82;
  --color-bg: #fff;
  --color-bg-light: #fafaff;
  --color-bg-hover: #f8f9ff;
  --color-bg-placeholder: #ecebff;
  --color-border: #eee;
  --color-border-light: #f0f0f0;
  --color-bg-gradient-start: #141e30;
  --color-bg-gradient-end: #24243e;
  --color-modal-backdrop: rgba(11, 11, 22, 0.8);
  --color-nav-text: #c7c7e2;
  --color-nav-text-hover: #fff;
  --color-footer-text: #c7c7e2;
  --color-footer-text-muted: #9d9dbe;
  
  /* Spacing */
  --spacing-xs: 0.2em;
  --spacing-sm: 0.4em;
  --spacing-md: 0.8em;
  --spacing-lg: 1.2em;
  --spacing-xl: 1.6em;
  --spacing-xxl: 1.8em;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 16px;
  --radius-pill: 999px;
  
  /* Shadows */
  --shadow-sm: 0 2px 8px -5px rgba(101, 87, 255, 0.2);
  --shadow-md: 0 4px 24px -8px rgba(101, 87, 255, 0.15);
  --shadow-lg: 0 8px 40px -18px rgba(101, 87, 255, 0.2);
  --shadow-xl: 0 25px 80px -30px rgba(0, 0, 0, 0.3);
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  
  /* Z-Index */
  --z-modal: 1000;
  --z-navbar: 1000;
  --z-footer: 100;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Montserrat', sans-serif;
  margin: 0;
  background: linear-gradient(90deg, var(--color-bg-gradient-start) 0, var(--color-bg-gradient-end) 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============================================
   NAVBAR / HEADER
   ============================================ */
.navbar {
  font-family: 'Montserrat', sans-serif;
  background: linear-gradient(90deg, var(--color-bg-gradient-start) 0, var(--color-bg-gradient-end) 100%);
  box-shadow: 0 6px 12px -8px rgba(36, 36, 62, 0.08);
  padding: 0 2.5em;
  position: sticky;
  top: 0;
  z-index: var(--z-navbar);
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7em;
  font-size: 1.18em;
  font-weight: 700;
  color: var(--color-nav-text-hover);
  letter-spacing: 2px;
  text-decoration: none;
  padding: 0.7em 0;
  white-space: nowrap;
}

.brand .mobile-short {
  display: none;
}

.menu-links {
  display: flex;
  gap: 1.4em;
  flex-wrap: wrap;
}

.menu-link {
  transition: all var(--transition-base);
  opacity: 0.95;
  color: var(--color-nav-text);
  background: transparent;
  border: none;
  font-weight: 700;
  font-size: 1.06em;
  letter-spacing: 1px;
  padding: 0.4em 1.15em;
  border-radius: var(--radius-pill);
  text-decoration: none;
  white-space: nowrap;
}

.menu-link.active,
.menu-link:hover {
  color: var(--color-nav-text-hover);
  background: var(--color-primary);
  box-shadow: 0 2px 8px -4px rgba(101, 87, 255, 0.4);
  font-weight: 700;
}

.userblock {
  color: #d2d1f2;
  font-size: 0.96em;
  display: flex;
  align-items: center;
  gap: 0.8em;
  flex-wrap: wrap;
}

.userblock b {
  color: var(--color-nav-text-hover);
}

.userblock a {
  color: #c2b4ff;
  text-decoration: underline;
  white-space: nowrap;
}

.user-dropdown {
  position: relative;
  display: inline-block;
}

.user-dropdown-trigger {
  cursor: pointer;
  color: var(--color-nav-text-hover);
  font-weight: 700;
  padding: 0.4em 0.8em;
  border-radius: var(--radius-pill);
  transition: all var(--transition-fast);
  display: inline-block;
}

.user-dropdown-trigger:hover {
  background: var(--color-primary);
  box-shadow: 0 2px 8px -4px rgba(101, 87, 255, 0.4);
}

.user-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5em;
  background: var(--color-bg);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px -8px rgba(0, 0, 0, 0.3);
  min-width: 150px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-fast);
  z-index: 1000;
  padding: 0.5em 0;
}

.user-dropdown:hover .user-dropdown-menu,
.user-dropdown-menu.mobile-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-dropdown-menu a {
  display: block;
  padding: 0.6em 1.2em;
  color: var(--color-text);
  text-decoration: none;
  transition: all var(--transition-fast);
  border: none;
  text-align: left;
}

.user-dropdown-menu a:hover {
  background: var(--color-bg-hover);
  color: var(--color-primary);
}

.user-dropdown-menu a:first-child {
  border-top-left-radius: var(--radius-md);
  border-top-right-radius: var(--radius-md);
}

.user-dropdown-menu a:last-child {
  border-bottom-left-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  font-family: 'Montserrat', sans-serif;
  background: linear-gradient(90deg, var(--color-bg-gradient-start) 0, var(--color-bg-gradient-end) 100%);
  color: var(--color-footer-text);
  padding: 1.8em 2.5em;
  box-shadow: 0 -4px 12px -6px rgba(36, 36, 62, 0.12);
  margin-top: 3em;
}

.footer.fixed {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: var(--z-footer);
  margin-top: 0;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.footer-left p {
  margin: 0.3em 0 0;
  font-size: 0.9em;
  color: var(--color-footer-text-muted);
}

.footer-links {
  display: flex;
  gap: 1.4em;
}

.footer-links a {
  color: var(--color-footer-text);
  text-decoration: none;
  transition: all var(--transition-base);
}

.footer-links a:hover {
  color: var(--color-nav-text-hover);
  opacity: 0.9;
}

.footer-brand {
  font-weight: 700;
  font-size: 1.1em;
  color: var(--color-nav-text-hover);
  text-decoration: none;
}

/* ============================================
   COMMON LAYOUT
   ============================================ */
.wrap {
  max-width: 1000px;
  margin: 1.5em auto;
  padding: 0 1em;
  width: 100%;
}

.form-container {
  max-width: 1000px;
  margin: 1.5em auto;
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.8em 1.5em;
  width: calc(100% - 2em);
}

h1 {
  color: var(--color-primary);
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 1.3em;
  text-align: center;
  font-size: clamp(1.3em, 4vw, 1.8em);
}

h1.text-white {
  color: var(--color-nav-text-hover);
}

/* ============================================
   FORMS
   ============================================ */
label {
  display: block;
  margin: 1.1em 0 0.4em;
  font-weight: 500;
  font-size: 0.95em;
}

input,
select {
  width: 100%;
  padding: 0.6em 0.8em;
  border: 1.5px solid var(--color-primary-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-light);
  font-size: 1em;
  font-family: 'Montserrat', sans-serif;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--color-primary);
  background: var(--color-bg);
  box-shadow: 0 0 0 4px rgba(101, 87, 255, 0.1);
}

button[type="submit"],
.btn-primary {
  background: linear-gradient(90deg, var(--color-primary) 60%, var(--color-text) 120%);
  color: var(--color-bg);
  font-weight: 600;
  border: none;
  padding: 0.7em 2.4em;
  border-radius: var(--radius-md);
  font-size: clamp(1em, 3vw, 1.13em);
  margin-top: 1.7em;
  cursor: pointer;
  width: 100%;
  transition: all var(--transition-fast);
}

button[type="submit"]:hover,
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* ============================================
   FORM HEADER (Bild links, Felder rechts)
   ============================================ */
.form-header {
  display: flex;
  gap: 2em;
  align-items: flex-start;
  margin-bottom: 1.5em;
}

.form-header-image {
  flex: 0 0 auto;
  min-width: 200px;
}

.form-header-image .img-preview {
  width: 200px;
  height: auto;
  max-width: 100%;
  border-radius: var(--radius-md);
  margin-bottom: 1em;
  object-fit: cover;
  box-shadow: 0 2px 8px -2px rgba(0, 0, 0, 0.1);
}

.form-header-fields {
  flex: 1 1 auto;
  min-width: 0;
}

.btn-danger {
  background: var(--color-danger);
  color: var(--color-bg);
  font-weight: 600;
  border: none;
  padding: 0.45em 1.2em;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.btn-danger:hover {
  background: var(--color-danger-hover);
}

/* ============================================
   SIZE TABLES
   ============================================ */
.sizes-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1em;
}

.sizes-table {
  width: 100%;
  margin-bottom: 1em;
  border-collapse: collapse;
  min-width: 600px;
}

.sizes-table th,
.sizes-table td {
  text-align: center;
  padding: 0.5em 0.3em;
  font-size: 0.9em;
}

.sizes-table th {
  background: var(--color-bg-placeholder);
  color: var(--color-primary);
  font-weight: 600;
  position: sticky;
  top: 0;
}

.sizes-table input[type="number"] {
  width: 60px;
  max-width: 100%;
  padding: 0.4em 0.3em;
  border-radius: 6px;
  border: 1px solid var(--color-primary-border);
  background: var(--color-bg-light);
  font-size: 0.9em;
}

.size-section-title {
  color: var(--color-primary);
  display: block;
  margin-bottom: 0.5em;
  font-weight: 600;
  font-size: 0.95em;
}

/* ============================================
   IMAGES
   ============================================ */
.img-preview {
  margin-bottom: 0.7em;
  max-width: 100%;
  height: auto;
}

.no-image {
  height: 150px;
  background: var(--color-bg-placeholder);
  color: #8c88b0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-bottom: 1em;
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
  margin-top: 0.6em;
  padding: 0.8em 1em;
  border-radius: var(--radius-md);
  font-size: 0.95em;
}

.alert-danger {
  background: #ffe6e9;
  color: #b3122e;
  border: 1px solid #ffccd3;
}

/* ============================================
   ACTIONS / BUTTON GROUPS
   ============================================ */
.actions {
  display: flex;
  gap: 0.7em;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
  margin-top: 1em;
  align-items: stretch;
}

.actions a,
.actions button {
  background: var(--color-primary);
  color: var(--color-bg);
  font-weight: 600;
  padding: 0.5em 1.2em;
  border-radius: var(--radius-sm);
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 0.9em;
  transition: all var(--transition-fast);
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 2.5em;
  line-height: 1;
  margin: 0;
}

.actions button[type="submit"] {
  background: var(--color-danger);
}

.actions button[type="submit"]:hover {
  background: var(--color-danger-hover);
}

.actions a:hover {
  background: var(--color-primary-hover);
}

.actions form {
  display: flex;
  flex: 1 1 0;
  min-width: 0;
  align-items: stretch;
}

.actions form button {
  width: 100%;
  height: 100%;
}

/* ============================================
   CARDS
   ============================================ */
.card {
  transition: all var(--transition-base);
  opacity: 0.95;
  border: none;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 1.2em;
  background: var(--color-bg);
  position: relative;
}

.card.clickable {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  padding: 1.3em;
  border-radius: 17px;
  box-shadow: 0 6px 30px -12px rgba(101, 87, 255, 0.1);
}

.card.clickable:hover {
  box-shadow: 0 13px 56px -4px rgba(255, 255, 255, 0.35);
}

.card.clickable img {
  max-width: 100%;
  max-height: 250px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 1em;
}

.card.clickable .card-title {
  font-size: clamp(1.1em, 3vw, 1.23em);
  color: var(--color-text);
  font-weight: 700;
  margin: 0.3em 0 0.8em;
  text-align: center;
  word-break: break-word;
}

.card.clickable .card-info {
  width: 100%;
  margin-bottom: 0.6em;
  font-size: 0.95em;
}

/* ============================================
   TABLES
   ============================================ */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

th,
td {
  padding: 0.8em;
  border-bottom: 1px solid var(--color-bg-placeholder);
  text-align: left;
  font-size: 0.95em;
}

th {
  color: var(--color-primary);
  background: var(--color-bg-light);
  font-weight: 600;
}

td {
  word-break: break-word;
}

.btn {
  background: var(--color-primary);
  color: var(--color-bg);
  text-decoration: none;
  padding: 0.45em 0.9em;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9em;
  display: inline-block;
  transition: all var(--transition-fast);
}

.btn:hover {
  background: var(--color-primary-hover);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 900px) {
  .navbar {
    padding: 0 1.2em;
  }
  
  .nav-content {
    flex-direction: row;
    align-items: center;
    min-height: 60px;
    gap: 0.8em;
  }
  
  .brand {
    font-size: 1em;
    letter-spacing: 1px;
    padding: 0.5em 0;
  }
  
  .brand .full-text {
    display: none;
  }
  
  .brand .mobile-short {
    display: inline;
  }
  
  .menu-links {
    gap: 0.8em;
    justify-content: flex-start;
  }
  
  .menu-link {
    font-size: 0.95em;
    padding: 0.35em 1em;
  }
  
  .userblock {
    font-size: 0.9em;
    gap: 0.6em;
    justify-content: flex-end;
  }
  
  .user-dropdown-trigger {
    padding: 0.3em 0.6em;
    font-size: 0.95em;
  }
  
  .user-dropdown-menu {
    min-width: 140px;
    margin-top: 0.4em;
  }
  
  .user-dropdown-menu a {
    padding: 0.5em 1em;
    font-size: 0.9em;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 0 1em;
  }
  
  .nav-content {
    min-height: 55px;
    gap: 0.6em;
  }
  
  .brand {
    font-size: 0.9em;
    letter-spacing: 0.5px;
  }
  
  .menu-links {
    gap: 0.6em;
  }
  
  .menu-link {
    font-size: 0.9em;
    padding: 0.3em 0.9em;
  }
  
  .userblock {
    font-size: 0.85em;
    gap: 0.5em;
  }
  
  .user-dropdown-trigger {
    padding: 0.3em 0.5em;
    font-size: 0.9em;
  }
  
  .user-dropdown-menu {
    min-width: 130px;
    margin-top: 0.3em;
    right: 0;
  }
  
  .user-dropdown-menu a {
    padding: 0.5em 0.9em;
    font-size: 0.85em;
  }
  
  .form-container {
    margin: 1em auto;
    padding: 1.5em 1.2em;
    width: calc(100% - 1em);
  }
  
  .sizes-table {
    min-width: 500px;
  }
  
  .sizes-table th,
  .sizes-table td {
    padding: 0.4em 0.2em;
    font-size: 0.85em;
  }
  
  .sizes-table input[type="number"] {
    width: 50px;
    padding: 0.3em 0.2em;
    font-size: 0.85em;
  }
  
  .wrap {
    padding: 0 0.8em;
    margin: 1em auto;
  }
  
  .card.clickable {
    padding: 1em;
  }
  
  .card.clickable .card-title {
    font-size: 1.1em;
  }
  
  table {
    min-width: 500px;
  }
  
  th,
  td {
    padding: 0.6em 0.5em;
    font-size: 0.9em;
  }
  
  .btn {
    padding: 0.4em 0.8em;
    font-size: 0.85em;
  }
  
  label {
    font-size: 0.9em;
  }
  
  input,
  select {
    padding: 0.5em 0.7em;
    font-size: 0.95em;
  }
  
  .form-header {
    flex-direction: column;
    gap: 1.5em;
  }
  
  .form-header-image {
    min-width: auto;
    width: 100%;
  }
  
  .form-header-image .img-preview {
    width: 100%;
    max-width: 300px;
  }
}

@media (max-width: 700px) {
  .footer-content {
    flex-direction: column;
    align-items: center;
    gap: 1em;
  }
  
  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .navbar {
    padding-top: 10px !important;
    padding: 0 0.8em;
  }
  
  .nav-content {
    min-height: 50px;
    gap: 0.5em;
    flex-wrap: wrap;
  }
  
  .brand {
    font-size: 0.85em;
    padding: 0.4em 0;
    flex: 1 1 auto;
    min-width: 0;
  }
  
  .menu-links {
    width: 100%;
    order: 3;
    justify-content: center;
    padding-top: 0.5em;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 0.5em;
  }
  
  .menu-link {
    font-size: 0.85em;
    padding: 0.3em 0.8em;
  }
  
  .userblock {
    font-size: 0.8em;
    order: 2;
    flex: 0 0 auto;
  }
  
  .user-dropdown-trigger {
    padding: 0.3em 0.5em;
    font-size: 0.85em;
  }
  
  .user-dropdown-menu {
    min-width: 120px;
    margin-top: 0.3em;
    right: 0;
    box-shadow: 0 6px 24px -8px rgba(0, 0, 0, 0.4);
  }
  
  .user-dropdown-menu a {
    padding: 0.5em 0.8em;
    font-size: 0.8em;
  }
  
  /* Auf sehr kleinen Bildschirmen: Dropdown nach links verschieben */
  @media (max-width: 400px) {
    .user-dropdown-menu {
      right: auto;
      left: 0;
    }
  }
  
  .form-container {
    padding: 1.2em 1em;
  }
  
  h1 {
    font-size: 1.2em;
    margin-bottom: 1em;
  }
  
  label {
    font-size: 0.9em;
    margin: 0.9em 0 0.3em;
  }
  
  .sizes-table {
    min-width: 450px;
  }
  
  .sizes-table th,
  .sizes-table td {
    padding: 0.3em 0.15em;
    font-size: 0.8em;
  }
  
  .sizes-table input[type="number"] {
    width: 45px;
    padding: 0.25em 0.15em;
    font-size: 0.8em;
  }
  
  input,
  select {
    padding: 0.5em 0.7em;
    font-size: 0.95em;
  }
  
  button[type="submit"] {
    padding: 0.6em 2em;
    font-size: 1em;
  }
  
  .card.clickable {
    padding: 0.9em;
  }
  
  .actions {
    gap: 0.5em;
  }
  
  .actions a,
  .actions button {
    padding: 0.35em 1em;
    font-size: 0.85em;
    flex: 1 1 0;
  }
  
  h1 {
    margin: 1em 0;
    font-size: 1.2em;
  }
  
  .card {
    padding: 0.8em;
  }
  
  table {
    min-width: 450px;
  }
  
  th,
  td {
    padding: 0.5em 0.4em;
    font-size: 0.85em;
  }
  
  .top-actions {
    justify-content: center;
  }
  
  .btn {
    width: 100%;
    text-align: center;
    padding: 0.5em;
  }
  
  label {
    margin: 0.9em 0 0.3em;
    font-size: 0.85em;
  }
  
  input,
  select {
    padding: 0.5em 0.6em;
    font-size: 0.9em;
  }
  
  button {
    padding: 0.7em 0.9em;
    font-size: 1em;
  }
  
  .alert {
    font-size: 0.9em;
    padding: 0.7em 0.9em;
  }
}

/* ============================================
   KOSTÜME OVERVIEW PAGE
   ============================================ */
.inventar-container {
  flex: 1 0 auto;
  max-width: 1300px;
  margin: 0 auto 3em;
  padding: 0 1em;
  width: 100%;
}

.add-btn {
  display: block;
  margin: 0 auto 2em;
  background: linear-gradient(90deg, #ffffff 0, #ffffff 100%);
  color: var(--color-bg-gradient-start);
  font-weight: 600;
  border: none;
  padding: 0.7em 2.5em;
  border-radius: var(--radius-md);
  font-size: clamp(1em, 3vw, 1.13em);
  text-align: center;
  box-shadow: 0 2px 10px -7px rgba(101, 87, 255, 0.47);
  text-decoration: none;
  width: 100%;
  max-width: 400px;
  transition: all var(--transition-fast);
}

.add-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px -7px rgba(101, 87, 255, 0.6);
}

.filter-bar {
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  padding: 1.2em;
  margin: 0 auto 2.2em;
  max-width: 900px;
  display: grid;
  grid-template-columns: 1fr 200px auto;
  gap: 1em;
  align-items: end;
  backdrop-filter: blur(6px);
  box-shadow: 0 12px 30px -18px rgba(19, 23, 47, 1);
}

.filter-bar label {
  display: block;
  font-weight: 600;
  color: #e7e8ff;
  margin-bottom: 0.4em;
  letter-spacing: 0.5px;
  font-size: 0.92em;
}

.filter-bar input[type="text"],
.filter-bar select {
  width: 100%;
  padding: 0.65em 0.9em;
  border-radius: var(--radius-md);
  border: 1.5px solid rgba(218, 215, 252, 0.4);
  background: rgba(255, 255, 255, 0.9);
  font-size: 1em;
  font-family: 'Montserrat', sans-serif;
  transition: border var(--transition-fast), box-shadow var(--transition-fast);
}

.filter-bar input[type="text"]:focus,
.filter-bar select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(101, 87, 255, 0.13);
}

.filter-bar button {
  padding: 0.7em 1.7em;
  border-radius: var(--radius-md);
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
  color: var(--color-bg);
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 1em;
  box-shadow: 0 10px 20px -12px rgba(101, 87, 255, 0.67);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.filter-bar button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -12px rgba(101, 87, 255, 0.67);
}

.filter-links {
  display: flex;
  gap: 1em;
  justify-content: flex-end;
  margin-bottom: 1.5em;
  color: #dcdcff;
  font-size: 0.9em;
}

.filter-links a {
  color: #dcdcff;
  text-decoration: none;
  border-bottom: 1px dotted rgba(220, 220, 255, 0.4);
}

.filter-links a:hover {
  color: var(--color-nav-text-hover);
  border-bottom-color: var(--color-nav-text-hover);
}

.shop-grid {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5em;
}

.empty-state {
  color: var(--color-nav-text-hover);
  text-align: center;
  margin: 3em 0;
  font-size: 1.1em;
  opacity: 0.85;
}

/* ============================================
   KOSTÜM DETAIL PAGE
   ============================================ */
.kostuem-detail-container {
  max-width: 800px;
  margin: 2em auto;
  background: var(--color-bg);
  border-radius: 18px;
  box-shadow: 0 4px 28px -12px rgba(101, 87, 255, 0.2);
  padding: 1.5em 1.2em;
  width: calc(100% - 2em);
}

.imgbox {
  text-align: center;
  margin-bottom: 1.5em;
}

.imgbox img {
  max-width: 100%;
  max-height: 240px;
  border-radius: 13px;
  box-shadow: 0 2px 12px -2px rgba(101, 87, 255, 0.19);
  object-fit: cover;
  background: #f6f7fa;
  width: 100%;
}

.imgbox .no-image {
  height: 180px;
  line-height: 180px;
  background: var(--color-bg-placeholder);
  display: inline-block;
  max-width: 100%;
  width: 260px;
  text-align: center;
  border-radius: 13px;
  color: #888;
}

.infos {
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-size: clamp(0.95em, 2.5vw, 1.11em);
  line-height: 1.74;
  margin-bottom: 1.3em;
}

.infos p {
  margin: 0.8em 0;
  word-break: break-word;
}

.infos label {
  display: inline-block;
  min-width: 140px;
  font-weight: bold;
  color: var(--color-primary);
  font-size: 1.04em;
  letter-spacing: 0.5px;
  margin-right: 0.4em;
}

.groessenliste {
  margin: 1em 0 1.8em;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65em;
}

.groesse-badge {
  display: inline-block;
  background: var(--color-bg-placeholder);
  color: var(--color-primary);
  border-radius: 14px;
  padding: 0.13em 1.2em;
  font-weight: 600;
  font-size: clamp(0.85em, 2vw, 1.01em);
  letter-spacing: 1px;
  box-shadow: 0 1px 4px -2px rgba(101, 87, 255, 0.2);
}

.gesamtmenge-block {
  margin-bottom: 1.3em;
  font-size: clamp(1em, 2.5vw, 1.13em);
  color: var(--color-text);
  text-align: center;
  font-weight: 600;
  letter-spacing: 1px;
}

.card-header {
  display: flex;
  justify-content: space-evenly;
  height: 270px;
}

/* ============================================
   LOGIN PAGE
   ============================================ */
body.login-page {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, var(--color-bg-gradient-start) 100%);
  background-attachment: fixed;
  position: relative;
  padding-bottom: 100px;
}

body.login-page::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(101, 87, 255, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.15) 0%, transparent 50%);
  pointer-events: none;
}

.login-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2em 1em;
  position: relative;
  z-index: 1;
}

.login-container .wrap {
  width: 100%;
  max-width: 480px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  box-shadow: 
    0 20px 60px -12px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  padding: 3.5em 2.5em;
  animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-container h1 {
  text-align: center;
  color: var(--color-primary);
  letter-spacing: 1.5px;
  font-size: 2em;
  font-weight: 700;
  margin: 0 0 0.3em 0;
  background: linear-gradient(135deg, var(--color-primary) 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  text-align: center;
  color: #888;
  font-size: 0.95em;
  margin-bottom: 2em;
  font-weight: 400;
}

.login-container form {
  display: grid;
  gap: 1.2em;
  margin-top: 2em;
}

.login-container input {
  padding: 1em 1.2em;
  border-radius: 12px;
  border: 2px solid #e0e0f0;
  background: var(--color-bg-light);
  font-size: 1rem;
  font-family: 'Montserrat', sans-serif;
  transition: all var(--transition-base);
  width: 100%;
}

.login-container input:focus {
  outline: none;
  border-color: var(--color-primary);
  background: var(--color-bg);
  box-shadow: 0 0 0 4px rgba(101, 87, 255, 0.1);
  transform: translateY(-1px);
}

.login-container input::placeholder {
  color: #aaa;
}

.login-container button {
  background: linear-gradient(135deg, var(--color-primary) 0%, #764ba2 100%);
  border: none;
  color: var(--color-bg);
  border-radius: 12px;
  padding: 1.1em 1.5em;
  font-weight: 700;
  font-size: 1.05em;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: 0 4px 15px -5px rgba(101, 87, 255, 0.4);
  font-family: 'Montserrat', sans-serif;
  letter-spacing: 0.5px;
  margin-top: 0.5em;
}

.login-container button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px -5px rgba(101, 87, 255, 0.6);
}

.login-container button:active {
  transform: translateY(0);
}

.err {
  color: #e74c3c;
  text-align: center;
  margin-bottom: 1em;
  padding: 0.8em 1em;
  background: #fee;
  border-radius: var(--radius-md);
  border: 1px solid #fcc;
  font-size: 0.95em;
  font-weight: 500;
  animation: shake 0.4s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

/* ============================================
   USER MANAGEMENT
   ============================================ */
.top-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1em;
}

.actions-column {
  display: flex;
  gap: 0.8em;
  margin-top: 1em;
  flex-direction: column;
}

.link {
  display: inline-block;
  padding: 0.7em 1em;
  border: 1.5px solid var(--color-primary-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--color-text);
  background: var(--color-bg);
  text-align: center;
  width: 100%;
  transition: all var(--transition-fast);
}

.link:hover {
  background: var(--color-bg-hover);
  border-color: var(--color-primary);
}

/* ============================================
   ADDITIONAL RESPONSIVE FOR SPECIFIC PAGES
   ============================================ */
@media (max-width: 992px) {
  .filter-bar {
    grid-template-columns: 1fr 1fr;
  }
  
  .filter-bar button {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .shop-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1em;
  }
  
  h1.text-white {
    margin: 1em 0 0.8em;
  }
  
  .inventar-container {
    padding: 0 0.8em;
    margin: 0 auto 2em;
  }
  
  .add-btn {
    padding: 0.6em 1.5em;
    margin-bottom: 1.5em;
  }
  
  .filter-bar {
    grid-template-columns: 1fr;
    padding: 1em;
    gap: 0.8em;
  }
  
  .filter-links {
    justify-content: center;
  }
  
  .kostuem-detail-container {
    margin: 1em auto;
    padding: 1.2em 1em;
    width: calc(100% - 1em);
  }
  
  .infos label {
    display: block;
    min-width: auto;
    margin-bottom: 0.3em;
  }
  
  .infos p {
    margin: 1em 0;
  }
  
  .groessenliste {
    gap: 0.5em;
  }
  
  .groesse-badge {
    font-size: 0.9em;
    padding: 0.1em 1em;
  }
  
  .actions {
    gap: 0.6em;
  }
  
  .actions a {
    padding: 0.4em 1em;
    font-size: 0.9em;
  }
  
  .login-container .wrap {
    padding: 2.5em 1.8em;
    border-radius: 20px;
  }
  
  .login-container h1 {
    font-size: 1.7em;
  }
}

@media (max-width: 480px) {
  .shop-grid {
    grid-template-columns: 1fr;
    gap: 1em;
  }
  
  .kostuem-detail-container {
    padding: 1em 0.8em;
  }
  
  .imgbox img {
    max-height: 200px;
  }
  
  .imgbox .no-image {
    width: 100%;
    max-width: 260px;
  }
  
  .infos {
    font-size: 0.9em;
  }
  
  .infos label {
    font-size: 0.95em;
  }
  
  .groesse-badge {
    font-size: 0.85em;
    padding: 0.08em 0.8em;
  }
  
  .actions {
    flex-direction: column;
    width: 100%;
  }
  
  .actions a,
  .actions button {
    width: 100%;
    padding: 0.5em;
    flex: 1 1 0;
  }
  
  .card-header {
    flex-direction: column;
    height: auto;
  }
}

/* ============================================
   GROUPS MANAGEMENT
   ============================================ */
.wrap {
  max-width: 1000px;
  margin: var(--spacing-lg) auto;
  padding: 0 var(--spacing-md);
}

h1 {
  color: var(--color-bg);
  font-weight: 700;
  letter-spacing: 2px;
  text-align: center;
  margin: var(--spacing-lg) 0;
}

.card {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
}

.top-actions {
  margin-bottom: var(--spacing-md);
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 400px;
}

th, td {
  padding: var(--spacing-sm) var(--spacing-md);
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

th {
  font-weight: 600;
  color: var(--color-text);
}

.group-name-input {
  width: 100%;
  padding: 0.4em var(--spacing-sm);
  border: 1.5px solid var(--color-primary-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-light);
  font-size: 1em;
}

.group-name-input:focus {
  outline: none;
  border-color: var(--color-primary);
  background: var(--color-bg);
}

.group-name-display {
  padding: 0.4em var(--spacing-sm);
}

.btn-group {
  display: flex;
  gap: var(--spacing-xs);
  flex-wrap: wrap;
}

.btn-small {
  padding: 0.3em 0.8em;
  font-size: 0.9em;
}

.new-group-form {
  display: flex;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
  align-items: flex-end;
}

.new-group-form input {
  flex: 1;
  min-width: 0;
  padding: 0.55em var(--spacing-md);
  border-radius: var(--radius-md);
  border: 1.5px solid var(--color-primary-border);
  background: var(--color-bg-light);
  font-size: 1em;
}

.new-group-form input:focus {
  outline: none;
  border-color: var(--color-primary);
  background: var(--color-bg);
}

.new-group-form button {
  padding: 0.55em var(--spacing-md);
  flex: 0 0 auto;
  white-space: nowrap;
  width: auto !important;
  min-width: fit-content;
  max-width: none;
}

.editing {
  background: var(--color-primary-light);
}

