body {
  font-family: sans-serif;
  margin:0; padding:0;
  background:#fafafa; color:#222;
}
header {
  background: #49c048;
  color: #fff;
  padding: 1em;
  text-align: left;
  position: sticky;
  top: 0;
  z-index:10;
}
.hide {
  display: none !important;
}
#main-container {
  max-width: 720px;
  margin: 0 auto; /* zentriert */
  box-shadow: 0 0 22px #0fa0c225;
  background: #fff;
  min-height: 100vh;
  border-radius: 1.4em;
  padding-bottom: 60px;   /* für Sticky-Banner auf Mobil */
}
@media (max-width: 800px) {
  #main-container {
    max-width: 100%;
    box-shadow: none;
    border-radius: 0;
    background: transparent;
    min-height: 0;
    padding-bottom: 0;
  }
}
#manage-bar {
  display:flex; gap:.5em;
  padding:.4em .7em;
  background: #f6fff6;
  border-bottom:1px solid #e2e2e2;
}
#manage-bar button {
  background:#b2f9b2; border:none; border-radius:1.5em; padding:.4em 1.2em;
  font-size:1em; cursor:pointer;
}
#category-bar {
  display: flex;
  flex-direction: row;
  gap: 0.3em;
  overflow-x: auto;       /* <- Horizontal scrollbar wenn zu viele Buttons */
  padding: 0.6em 0.3em 0.6em 0.3em;
  margin-bottom: 0.7em;
  background: #fff;
  /* optional: */
  /* scroll-snap-type: x mandatory; */
}
#show-list-btn,
#show-categories-btn {
  display: flex;
  flex-direction: column;      /* Icon über Text */
  align-items: center;
  justify-content: center;
  padding: 0.6em 1.0em;
  font-size: 1em;
  height: 50px;
  border: none;
  border-radius: 2em;
  background: #e0ffe0;
  color: #222;
  cursor: pointer;
  white-space: normal;         /* Text darf umbrechen! */
  /*word-break: break-word;*/
  text-align: center;
  font-weight: normal;
  transition: background 0.13s;
  box-shadow: 0 1px 6px #0001;
}
#show-list-btn.clicked,
#show-categories-btn.clicked {
  background: #f39200 !important;
  color: #fff !important;
  filter: brightness(1.15);
  transition: background 0.12s, color 0.12s, filter 0.2s;
}
.cat-btn {
  display: flex;
  flex-direction: column;      /* Icon über Text */
  align-items: center;
  justify-content: center;
  min-width: 120px;             /* Mindestgröße */
  max-width: 120px;            /* Maximalbreite auf kleinen Screens */
  padding: 0.6em 1.2em;
  font-size: 1em;
  border: none;
  border-radius: 2em;
  background: #e0ffe0;
  color: #222;
  cursor: pointer;
  white-space: normal;         /* Text darf umbrechen! */
  /*word-break: break-word;*/
  text-align: center;
  font-weight: normal;
  transition: background 0.13s;
  box-shadow: 0 1px 6px #0001;
}
.cat-btn.active,
.cat-btn:hover,
.cat-btn:focus {
  background: #f39200;
  color: #fff;
}
#article-picker {
  display: flex; 
  flex-wrap: wrap; 
  gap: 0.3em; 
  padding: 0.7em;
  opacity: 1;
  transition: opacity 0.22s;
  will-change: opacity;
  /*flex-direction: column;*/
}
#article-picker.fade-out {
  opacity: 0;
  pointer-events: none;
}
.article-btn {
  border: 1px solid #d0e0d0;
  background: #fff;
  border-radius: 1em;
  padding: .7em 1em;
  font-size:1em;
  min-width:90px;
  display:flex;
  flex-direction:column;
  align-items:center;
  cursor:pointer;
  transition: background .2s;
}
.article-btn.active,
.article-btn:hover, 
.article-btn:focus { 
  background: #e0ffe0; 
  }
#shopping-list {
  margin: 1em; padding:0;
  list-style:none;
}
.shopping-item {
  background: #fff;
  border-radius: 0.8em;
  margin-bottom: 0.3em;
  padding: 0.5em 1em;
  display: flex; 
  align-items:center; 
  gap:0.5em;
  font-size: 1.1em;
  box-shadow:0 1px 4px #0001;
}
.done-btn {
  /*margin-left:auto;*/
  border:none;
  background:#e0ffe0;
  color:#fff;
  border-radius:.5em;
  padding:.5em 1.2em;
  font-size:1em;
  cursor:pointer;
  box-shadow: 0 2px 4px #0002;
}
.done-btn.active,
.done-btn:hover,
.done-btn:focus {
  background: #f39200;
  color: #fff;
}
#offline-banner {
  position:fixed; left:0; right:0; bottom:0;
  background:#ffe066; color:#444; text-align:center;
  padding:10px; font-size:1em;
  z-index:100;
}
.shopping-list-padding {
  height: 50px; /* gleiche Höhe wie der Offline-Banner */
  pointer-events: none;
  background: transparent;
}


.einka-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7em 1em 0.7em 1em;
  background: linear-gradient(90deg, #49c048 0%, #0fa0c2 100%);
  color: #fff;
  position: sticky;
  top: 0;
  left: 0;
  z-index: 20;
  box-shadow: 0 2px 12px #0fa0c220;
}
.einka-header h1 {
  font-size: 1.5em;
  font-weight: 700;
  margin: 0;
  letter-spacing: .03em;
}
.einka-burger-btn {
  background: none;
  border: none;
  width: 2.4em; height: 2.4em;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: .3em;
  cursor: pointer;
}
.einka-burger-btn span {
  display: block;
  width: 2em; height: 0.32em;
  background: #fff;
  border-radius: 1em;
  transition: 0.2s;
}

/* Burger-Menü (aus der Seite schiebend) */
.einka-burger-menu {
  position: fixed;
  /*top: 0; */
  right: -90vw;   /* ausgeblendet! */
  /*width: 84vw; */
  max-width: 340px;
  /*height: 100vh;*/
  /*background: #fff;*/
  /*box-shadow: -2px 0 24px #0fa0c230;*/
  z-index: 200;
  transition: right 0.22s cubic-bezier(.67,-0.2,.6,1.4);
  display: flex; 
  flex-direction: column;
  padding: 0;
}
.einka-burger-menu.open {
  right: 0;
}
.einka-burger-head {
  display: none;
  /*display: flex;
  align-items: center;
  gap: 1em;
  padding: 0.3em 1.2em 0.3em 1.2em;
  border-bottom: 1px solid #33c99633;
  background: #f6fff9;*/
}
#burger-close {
  width: 100px;
  margin-left: 2em;
  background: none;
  border: none;
  font-size: 1.4em;
  cursor: pointer;
  font-weight: 900;
}
.einka-burger-menu ul {
  margin: 0; padding: 1.2em 0.7em;
  list-style: none;
  flex: 1 1 auto;
}
.einka-burger-menu li {
  margin-bottom: 1em;
}
.einka-burger-menu button {
  /*width: 100%;*/
  padding: 0.9em 1.3em;
  font-size: 1.1em;
  background: #eaffef;
  border: none;
  border-radius: 1.2em;
  box-shadow: 0 2px 8px #0fa0c213;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.14s, color 0.14s;
  margin: 10px 10px 0px 10px;
}
.einka-burger-menu button:active,
.einka-burger-menu button:focus {
  background: #33c996;
  color: #fff;
  outline: none;
}
.einka-menu-overlay {
  position: fixed; 
  z-index: 100;
  top: 0; 
  left: 0; 
  width: 100vw; 
  height: 100vh;
  background: rgba(0,0,0,0.70);
  display: none;
  transition: opacity .2s;
}
.einka-menu-overlay.open {
  display: block;
  opacity: 1;
}

@media (min-width: 640px) {
  .einka-burger-menu { max-width: 310px; }
}



.modal {
  position:fixed; left:0; top:0; width:100vw; height:100vh;
  background:rgba(0,0,0,0.12); z-index:999;
  display:flex; align-items:center; justify-content:center;
}
.modal-content {
  background:#fff; border-radius:1.1em; padding:1.5em 1em 1em 1em;
  min-width:260px; max-width:98vw; box-shadow:0 6px 30px #0003;
  max-height:90vh; overflow:auto; position:relative;
}
.modal-content h2 { margin-top:0; }
.modal-content .close {
  position: absolute; right: 0em; top: 0em; font-size: 1.4em; color: #888; border: none; background: none; cursor: pointer;
}
.modal-content button {
  padding: 0.7em 1.3em;
  border: none;
  background: #e0ffe0;
  border-radius: 1em;
  font-size: 1em;
  cursor: pointer;
  margin-top: 3px;
  margin-bottom: 3px;
}
.modal-content button.active,
.einka-burger-menu button.active,
#burger-close.active,
.modal-content button:hover,
.einka-burger-menu button:hover,
#burger-close:hover,
.modal-content button:focus,
.einka-burger-menu button:focus,
#burger-close:focus {
  background: #f39200;
  color: #fff;
}
.cat-list, .art-list { 
  list-style:none; 
  padding:0; 
}
.cat-list li, .art-list li {
  margin-bottom:0.3em; 
  background:#f7fdf7; 
  border-radius:.7em; 
  /*padding:.7em 1em; */
  display:flex; 
  align-items:center; 
  gap:.5em;
  font-weight: 100;
}
.cat-list .actions, .art-list .actions { 
  margin-left:auto; 
  display:flex; 
  gap:.6em; 
}
.modal-content button, .modal-content input { 
  font-size:1em; 
}

/* Entfernt blaue Ränder & Browser-Highlights */
button,
button:focus,
button:active,
.cat-btn,
.cat-btn:focus,
.cat-btn:active,
#show-list-btn,
#show-categories-btn {
  outline: none !important;
  box-shadow: none !important;
  background-image: none !important;
  -webkit-tap-highlight-color: transparent;
}
/* Auch für input/textarea */
input:focus, 
textarea:focus {
  outline: none !important;
  box-shadow: none !important;
  background: inherit !important;
  -webkit-tap-highlight-color: transparent;
}
/* keine Textauswahl mehr, generell */
body * {
  user-select: none !important;
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
}

/*Benutzerverwaltung*/
/* EINKA-Stil für Benutzerverwaltung */
#admin-user-panel h2 {
  color: #0fa0c2;
  text-align: center;
}
#admin-user-panel table {
  font-size: 1.07em;
}
#admin-user-panel th, #admin-user-panel td {
  text-align: left;
  border: none;
}
#admin-user-panel td {
  background: #f6fff6;
  border-radius: 0.8em;
  padding: 0.7em 0.6em;
  vertical-align: middle;
}
#admin-user-panel tr:not(:first-child):hover td {
  background: #e0ffe0;
}
.einka-btn {
  padding: 0.7em 1.3em;
  border: none;
  border-radius: 1em;
  background: #e0ffe0;
  color: #222;
  font-size: 1em;
  cursor: pointer;
  font-weight: 500;
  box-shadow: 0 2px 8px #0fa0c213;
  transition: background 0.14s, color 0.14s;
}
.einka-btn:active,
.einka-btn:focus,
.einka-btn:hover {
  background: #f39200;
  color: #fff;
}
.einka-btn-secondary {
  background: #fffbe6;
  color: #0fa0c2;
}
.einka-btn-secondary:hover,
.einka-btn-secondary:focus {
  background: #e0ffe0;
  color: #222;
}
.user-action-btn {
  margin-right: 0.15em;
  border: none;
  background: #fff;
  font-size: 1.13em;
  border-radius: 0.6em;
  cursor: pointer;
  padding: 0.45em 0.8em;
  box-shadow: 0 2px 6px #0fa0c210;
  transition: background 0.15s, color 0.15s;
}
.user-action-btn:hover,
.user-action-btn:focus {
  background: #f39200;
  color: #fff;
}

/* Artikel ausgewählt markiert */
.article-btn.selected {
  background: #49c048;
  color: #fff;
  border: 1px solid #0fa0c2;
  position: relative;
}
.article-btn.selected::after {
  content: "✓";
  position: absolute;
  top: 6px;
  right: 14px;
  font-size: 1.2em;
  color: #fff;
  /*background: #0fa0c2;*/
  border-radius: 50%;
  width: 1.3em;
  height: 1.3em;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Deaktivierte Buttons*/
#menu-cleanup:disabled:hover,
#menu-cleanup:disabled:focus {
  background: #eee !important;
  color: #888 !important;
  text-decoration: none !important;
  outline: none !important;
  pointer-events: none !important;
  cursor: not-allowed !important;
}

/* Wichtig (!), Badge*/
.badge-slot {
  display: inline-block;
  vertical-align: middle;
  margin-left:auto;
}
.badge-important {
  display: inline-block;
  background: #e02424;
  color: #fff;
  font-size: 0.89em;
  border-radius: 1em;
  padding: 0.14em 0.85em;
  font-weight: 600;
  letter-spacing: 0.04em;
  box-shadow: 0 2px 6px #a00a2e14;
}
