:root{--nav-bg:#ff5900;--nav-bg-sub:#ff7a33;--nav-text:#ffffff;--nav-hover: rgba(0,0,0,.08);--nav-border: rgba(0,0,0,.12);} 
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #f8f8f8;
    color: #333;
  }
  
  header {
    background: #ff5900;
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
  }
  
  .logo {
    font-weight: bold;
    font-size: 1.5rem;
  }
  
  nav a {
    color: white;
    text-decoration: none;
    margin-left: 1rem;
    font-weight: bold;
  }
  
  main {
    padding: 2rem;
  }
  
  form {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  }
  
  label {
    display: block;
    margin-bottom: 1rem;
  }
  
  input, select, button {
    padding: 0.5rem;
    font-size: 1rem;
    margin-top: 0.5rem;
    width: 100%;
    max-width: 400px;
  }
  
  button {
    background: #ff5900;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
  }
  
  button:hover {
    background: #e44f00;
  }
  
  .alert {
    background: #ffeded;
    border-left: 5px solid red;
    padding: 1rem;
    margin-bottom: 2rem;
    border-radius: 4px;
  }
  
  .part-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
  }
  
  .part-group select,
  .part-group input {
    flex: 1;
    min-width: 150px;
  }
  
  table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  }
  
  thead {
    background: #ff5900;
    color: white;
  }
  
  td, th {
    padding: 1rem;
    border-bottom: 1px solid #ddd;
  }
  
  @media (max-width: 600px) {
    nav a {
      display: block;
      margin: 0.5rem 0;
    }
  
    .part-group {
      flex-direction: column;
    }
  }
  .toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: #333;
    color: #fff;
    padding: 1rem;
    border-radius: 6px;
    z-index: 1000;
    opacity: 0.95;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    animation: fadeOut 4s forwards;
  }
  
  @keyframes fadeOut {
    0%   { opacity: 0.95; }
    90%  { opacity: 0.95; }
    100% { opacity: 0; display: none; }
  }
  .toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: #333;
    color: #fff;
    padding: 1rem;
    border-radius: 6px;
    z-index: 1000;
    opacity: 0.95;
    max-width: 300px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  }
  
  .toast strong {
    font-size: 1.1rem;
  }
  
  button.danger {
    background: #cc0000;
  }
  button.danger:hover {
    background: #990000;
  }
  .card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
  }
  
  .card {
    background: white;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }
  
  .card h3 {
    margin-top: 0;
    color: #ff5900;
  }
  
  .card ul {
    padding-left: 1rem;
    margin: 0.5rem 0 1rem;
  }
  
  .card .button {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #ff5900;
    color: white;
    border-radius: 6px;
    text-decoration: none;
  }
  
  .card .button:hover {
    background: #e14e00;
  }
  .form-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }



nav { position: relative; z-index: 10; }
.menu-dropdown { position: relative; display: inline-block; }
.menu-dropdown > a { display: inline-block; padding: 0.25rem 0.5rem; }
.menu-dropdown > .menu-panel { display: none; position: absolute; top: 100%; left: 0; background: #fff; border: 1px solid #ddd; border-radius: 8px; padding: .5rem; min-width: 220px; box-shadow: 0 12px 24px rgba(0,0,0,.12); z-index: 999; }
.menu-dropdown:hover > .menu-panel { display: block; }
.menu-panel a { white-space: nowrap; }
.muted { color: #666; font-size: 0.9em; }

/* Alert overrides for clearer status */
.alert.success { background: #e7f6ec !important; color: #1e7e34 !important; border-left: 5px solid #1e7e34 !important; }
.alert.error { background: #fdecea !important; color: #b71c1c !important; border-left: 5px solid #b71c1c !important; }
.alert.warn { background: #fff7e0 !important; color: #8a6d00 !important; border-left: 5px solid #8a6d00 !important; }

/* ===== Responsive Navbar (CSS-only) ===== */
.site-header {
  background: #0f2233;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  position: sticky;
  top: 0;
  z-index: 1000;
}
.site-header .brand {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.site-header .logo {
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: .5px;
  padding: .75rem 0;
  display: inline-block;
}
/* Hamburger */
.nav-toggle { display: none; }
.hamburger { display: none; cursor: pointer; width: 2rem; height: 2rem; position: relative; }
.hamburger span {
  position: absolute; left: 0; right: 0; height: 2px; background: #fff; transition: .25s ease;
}
.hamburger span:nth-child(1){ top: 6px; }
.hamburger span:nth-child(2){ top: 12px; }
.hamburger span:nth-child(3){ top: 18px; }

/* Menu */
.site-nav { flex: 1; }
.menu {
  list-style: none;
  margin: 0; padding: 0;
  display: flex; align-items: stretch; gap: .5rem;
}
.menu > li { position: relative; }
.menu > li > a {
  display: inline-block; padding: .9rem .9rem;
  color: #fff; text-decoration: none; border-radius: .5rem;
}
.menu > li > a:hover,
.menu > li:hover > a { background: rgba(255,255,255,.12); }

/* Submenu (desktop hover) */
.has-sub > .submenu {
  position: absolute; left: 0; top:100%;
  min-width: 220px;
  background: #183349;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: .5rem;
  padding: .25rem 0;
  list-style: none; margin: 0;
  box-shadow: 0 12px 28px rgba(0,0,0,.25);
  display: none;
}
.has-sub:hover > .submenu { display: block; }
.submenu > li > a {
  display: block; padding: .6rem .9rem; color: #fff; text-decoration: none;
}
.submenu > li > a:hover { background: rgba(255,255,255,.12); }

/* Right align last items */
.menu > li.right { margin-left: auto; }

/* ===== Mobile ===== */
@media (max-width: 900px) {
  .hamburger { display: inline-block; }
  .site-nav { position: fixed; inset: 0 0 auto 0; top: 3.25rem; /* below header */ }
  .menu {
    position: fixed;
    top: 3.25rem; left: 0; right: 0;
    background: #0f2233;
    flex-direction: column;
    transform: translateY(-120%);
    transition: transform .25s ease;
    padding: .5rem 0;
    max-height: calc(100dvh - 3.25rem);
    overflow-y: auto;
    gap: 0;
    border-top: 1px solid rgba(255,255,255,.12);
  }
  .menu > li > a { padding: .9rem 1rem; border-radius: 0; }
  .menu > li.right { margin-left: 0; }

  /* Toggle open */
  .nav-toggle:checked ~ .site-nav .menu { transform: translateY(0); }
  /* Animate hamburger to X */
  .nav-toggle:checked + .hamburger span:nth-child(1){ transform: translateY(6px) rotate(45deg); }
  .nav-toggle:checked + .hamburger span:nth-child(2){ opacity: 0; }
  .nav-toggle:checked + .hamburger span:nth-child(3){ transform: translateY(-6px) rotate(-45deg); }

  /* Mobile submenu: show as nested blocks */
  .has-sub > .submenu {
    position: static; display: none; border: 0; box-shadow: none; background: transparent; padding: 0;
  }
  .has-sub.open > .submenu { display: block; }
  .submenu > li > a { padding: .6rem 1.75rem; }
}

/* Enable tapping parent item to toggle its submenu on mobile via :has() fallback */
@media (max-width: 900px) {
  .menu > .has-sub > a::after {
    content: "▾"; margin-left: .4rem; font-size: .9em; opacity: .8;
  }
}
/* Small helper class for muted text */
.muted { color: #9db3c7; font-size: 0.9em; }

/* Versand Eingabefeld-Fehler */
.qty-wrap { display:flex; flex-direction:column; gap:.25rem; }
.field-error { color:#b71c1c; height: 1em; }
.input-error { border-color:#b71c1c !important; outline-color:#b71c1c !important; }

/* Dashboard cards */
.cards{ display:grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap:1rem; }
.card{ background:#fff; border-radius:12px; padding:1rem; box-shadow:0 6px 16px rgba(0,0,0,.06); border:1px solid #eee; }
.card-title{ font-weight:700; margin-bottom:.5rem; }
.card-meta{ color:#555; }
@media (max-width: 520px){
  .cards{ grid-template-columns: 1fr; }
}

/* Hide nav toggle checkboxes */
.nav-open,
.sub-open { display: none; }

/* === HOTFIX: force orange brand colors === */
.site-header,
.nav-header { background: #ff5900 !important; }

.has-sub > .submenu {
  background: #ff5900 !important;
  border-color: rgba(0,0,0,.12) !important;
}

.nav-list > li > a,
.submenu li a { color: #ffffff !important; }
