* {
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: #f7f4ef;
  color: #222;
  text-align: center;
}

body.modal-open {
  overflow: hidden;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

header {
  text-align: center;
  margin-bottom: 20px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.hidden {
  display: none !important;
}

/* Header / Logout */

.admin-header {
  position: relative;
  padding-top: 10px;
}

.logout-btn {
  position: absolute;
  top: 0;
  right: 0;
  background: #222;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 14px;
}

/* Banner */

.banner {
  background: #222;
  color: #fff;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 16px;
  text-align: center;
}

/* Tabs */

.tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 20px;
}

.tab {
  border: none;
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  background: #ddd;
  color: #222;
  transition: all 0.2s ease;
}

.tab:hover {
  background: #cfcfcf;
}

.tab.active {
  background: #222;
  color: #fff;
}

/* Cards */

.card,
.dish-card,
.admin-item {
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.card,
.dish-card,
.admin-item,
#menu,
#adminList {
  text-align: center;
}

/* Gastbereich */

.dish-card h3,
.dish-card p,
.price {
  text-align: center;
}

.dish-card p {
  margin-bottom: 10px;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.price {
  font-weight: bold;
  margin-top: 10px;
  font-size: 18px;
}

/* Formulare allgemein */

input,
textarea,
button {
  font: inherit;
}

input,
textarea {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 12px;
  background: #fff;
  color: #222;
  outline: none;
}

input:focus,
textarea:focus {
  border-color: #888;
}

/* Neues Gericht Formular */

#dishForm {
  display: grid;
  gap: 10px;
  justify-items: center;
}

#dishForm input {
  width: 100%;
  max-width: 100%;
  text-align: center;
}

#dishForm button {
  display: inline-block;
  min-width: 220px;
  margin: 0 auto;
}

/* Buttons allgemein */

button {
  cursor: pointer;
}

.toggle-btn,
.save-btn,
#dishForm button,
.login-card button,
#editDishForm button[type="submit"] {
  background: #222;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
}

.delete-btn {
  background: #c62828;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
}

.delete-btn:hover {
  background: #a91f1f;
}

/* Adminliste */

.admin-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding-top: 64px;
}

.admin-item-info {
  width: 100%;
  text-align: center;
  word-break: break-word;
  overflow-wrap: anywhere;
  padding: 0 8px;
}

.admin-item-info strong,
.admin-item-info small,
.admin-item-info span {
  display: block;
  text-align: center;
}

.admin-item-info strong {
  font-size: 20px;
  margin-bottom: 6px;
}

.admin-item-info small {
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 4px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.admin-category-block {
  margin-bottom: 28px;
}

.admin-category-title {
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e5e5e5;
  text-align: center;
}

/* Status */

.status-badge {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: bold;
}

.status-available {
  background: #dff5e1;
  color: #1f7a35;
}

.status-unavailable {
  background: #f8dddd;
  color: #b42318;
}

.is-unavailable {
  background: #f3f3f3;
  opacity: 0.78;
}

.is-available {
  background: #fff;
}

/* Edit Stift */

.edit-icon-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background-color: #222;
  cursor: pointer;
  z-index: 5;
  padding: 0;

  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zm2.92 2.33H5v-.92l8.06-8.06.92.92L5.92 19.58zM20.71 7.04a1.003 1.003 0 000-1.42l-2.34-2.34a1.003 1.003 0 00-1.42 0l-1.13 1.13 3.75 3.75 1.14-1.12z'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: 58%;

  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zm2.92 2.33H5v-.92l8.06-8.06.92.92L5.92 19.58zM20.71 7.04a1.003 1.003 0 000-1.42l-2.34-2.34a1.003 1.003 0 00-1.42 0l-1.13 1.13 3.75 3.75 1.14-1.12z'/%3E%3C/svg%3E");
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: 58%;
}

.edit-icon-btn:hover {
  transform: scale(1.06);
}

/* Login */

.login-card {
  max-width: 420px;
  margin: 60px auto;
}

.login-card form {
  display: grid;
  gap: 12px;
}

.login-card input {
  text-align: center;
}

.login-card button {
  min-width: 180px;
  margin: 0 auto;
}

.login-error {
  color: #b42318;
  margin-top: 12px;
  font-weight: bold;
}

/* Modal */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 20px;
  backdrop-filter: blur(2px);
}

.modal.hidden {
  display: none !important;
}

.modal-content,
.edit-modal-content {
  background: #fff;
  width: 100%;
  max-width: 560px;
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.2);
  text-align: center;
}

.modal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.modal-topbar h2 {
  margin: 0;
  flex: 1;
  text-align: center;
  padding-left: 32px;
}

.modal-close-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: #f1f1f1;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  color: #222;
}

.modal-close-btn:hover {
  background: #e6e6e6;
}

#editDishForm {
  display: grid;
  gap: 10px;
}

#editDishForm label {
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  margin-top: 6px;
}

#editDishForm input,
#editDishForm textarea {
  text-align: center;
}

#editDishForm textarea {
  min-height: 110px;
  resize: vertical;
}

.modal-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

/* Mobile */

@media (max-width: 700px) {
  .container {
    padding: 14px;
  }

  .logout-btn {
    top: 4px;
    right: 4px;
    padding: 7px 12px;
    font-size: 12px;
  }

  .admin-item {
    padding-top: 68px;
  }

  .edit-icon-btn {
    width: 36px;
    height: 36px;
    top: 10px;
    right: 10px;
  }

  .admin-actions {
    flex-direction: column;
    align-items: center;
  }

  .toggle-btn,
  .delete-btn,
  .save-btn,
  #dishForm button,
  .login-card button,
  #editDishForm button[type="submit"] {
    width: 100%;
    max-width: 280px;
  }

  .modal {
    padding: 12px;
  }

  .modal-content,
  .edit-modal-content {
    padding: 18px 14px;
    border-radius: 14px;
  }

  .modal-topbar h2 {
    font-size: 20px;
    padding-left: 24px;
  }

  .modal-actions {
    flex-direction: column;
    align-items: center;
  }
}

.delete-modal {
  max-width: 420px;
}

.delete-modal p {
  margin: 16px 0;
  font-size: 16px;
}