/* Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background-color: #f9f9f9;
  color: #333;
}

/* Login Page Styles */
.login-container {
  display: flex;
  height: 100vh;
}

.login-image {
  flex: 1;
  background: url("images/login.jpg") center/cover no-repeat;
  position: relative;
}

.login-image::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
}

.login-form {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 4rem;
  background-color: #fff;
}

.logo {
  text-align: center;
  margin-bottom: 2rem;
}

.logo h1 {
  font-size: 2.5rem;
  color: #e67e22;
  margin-bottom: 0.5rem;
}

.logo p {
  color: #777;
  font-size: 1rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #555;
}

.form-group input {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

.login-btn {
  width: 100%;
  padding: 0.8rem;
  background-color: #e67e22;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
}

.login-btn:hover {
  background-color: #d35400;
}

.signup-btn {
  width: 20%;
  height: 30px;
  padding: 0rem;
  background-color: #b83030;
  color: white;
  border: none;
  border-radius: 4px;
  /* font-size: 1rem; */
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
  margin-left: 40%;
}
.signup-btn:hover {
  background-color: #6e2826;
}

.role-selection {
  margin: 1.5rem 0;
  text-align: center;
}

.role-selection p {
  margin-bottom: 0.5rem;
  color: #555;
}

.role-options {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.role-options label {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
}

.guest-option {
  text-align: center;
  margin-top: 1rem;
}

.guest-option p {
  color: #777;
  margin-bottom: 0.5rem;
}

.guest-btn {
  padding: 0.6rem 1.5rem;
  background-color: transparent;
  border: 1px solid #e67e22;
  color: #e67e22;
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s;
}

.guest-btn:hover {
  background-color: #e67e22;
  color: white;
}

/* Menu Page Styles */
header {
  background-color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
}

header h1 {
  color: #e67e22;
  font-size: 1.8rem;
}

nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

nav a {
  text-decoration: none;
  color: #555;
  font-weight: 500;
  transition: color 0.3s;
}

nav a.active {
  color: #e67e22;
  font-weight: 600;
}

nav a:hover {
  color: #e67e22;
}

.login-nav-btn {
  padding: 0.5rem 1rem;
  background-color: #e67e22;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.3s;
}

.login-nav-btn:hover {
  background-color: #d35400;
}

main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 2rem;
}

.menu-categories {
  margin-bottom: 3rem;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.tab-btn {
  padding: 0.5rem 1rem;
  background-color: #f1f1f1;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s;
}

.tab-btn.active {
  background-color: #e67e22;
  color: white;
}

.tab-btn:hover:not(.active) {
  background-color: #ddd;
}

.menu-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.menu-item {
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
}

.menu-item:hover {
  transform: translateY(-5px);
}

.item-image {
  height: 200px;
  background-size: cover;
  background-position: center;
}

.item-info {
  padding: 1.5rem;
}

.item-info h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: #333;
}

.item-info p {
  color: #777;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.item-price {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.price {
  font-weight: 600;
  color: #e67e22;
  font-size: 1.1rem;
}

.order-btn {
  padding: 0.5rem 1rem;
  background-color: #e67e22;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.order-btn:hover {
  background-color: #d35400;
}

footer {
  text-align: center;
  padding: 1.5rem;
  background-color: #333;
  color: #fff;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .login-container {
    flex-direction: column;
  }

  .login-image {
    height: 200px;
  }

  .login-form {
    padding: 2rem;
  }

  .header-content {
    flex-direction: column;
    gap: 1rem;
  }

  nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .menu-items {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

/* =====================
   Admin Page Styles
===================== */

.admin-container {
  max-width: 1000px;
  margin: 3rem auto;
  padding: 2rem;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.admin-container h2 {
  text-align: center;
  color: #e67e22;
  margin-bottom: 1.5rem;
}

/* Add Item Form */
.add-item-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 2rem;
  margin-bottom: 2rem;
}

.add-item-form input,
.add-item-form textarea,
.add-item-form select {
  padding: 0.8rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.95rem;
  width: 100%;
}

.add-item-form textarea {
  grid-column: span 2;
  min-height: 80px;
  resize: vertical;
}

.add-item-form button {
  grid-column: span 2;
  padding: 0.8rem;
  background: #e67e22;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s;
}

.add-item-form button:hover {
  background: #d35400;
}

/* Menu Item Admin Controls */
.menu-item .admin-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
}

.admin-btn {
  padding: 0.4rem 0.8rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.3s;
}

.admin-btn.update {
  background: #3498db;
  color: #fff;
}

.admin-btn.update:hover {
  background: #217dbb;
}

.admin-btn.delete {
  background: #e74c3c;
  color: #fff;
}

.admin-btn.delete:hover {
  background: #c0392b;
}

/* Responsive */
@media (max-width: 768px) {
  .add-item-form {
    grid-template-columns: 1fr;
  }
  .add-item-form textarea,
  .add-item-form button {
    grid-column: span 1;
  }
}

/* //inventory styles */

/* Inventory Page Styles */
.inventory-container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 2rem;
}

.inventory-controls {
  margin-bottom: 2rem;
}

.control-buttons {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.search-box {
  display: flex;
  margin-left: auto;
}

.search-box input {
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px 0 0 4px;
}

.search-box button {
  padding: 0.5rem 1rem;
  background-color: #e67e22;
  color: white;
  border: none;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
}

.filter-options {
  margin-top: 1rem;
}

.inventory-list {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.inventory-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr;
  padding: 1rem;
  background: #f5f5f5;
  font-weight: 600;
  border-bottom: 1px solid #ddd;
}

.inventory-item {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr;
  padding: 1rem;
  border-bottom: 1px solid #eee;
  align-items: center;
}

.inventory-item:last-child {
  border-bottom: none;
}

.item-name {
  font-weight: 500;
}

.item-quantity {
  font-weight: 600;
}

.item-quantity.low-stock {
  color: #e74c3c;
}

.item-status .status-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
}

.status-badge.badge-success {
  background-color: #2ecc71;
  color: white;
}

.status-badge.badge-warning {
  background-color: #e74c3c;
  color: white;
}

.item-actions {
  display: flex;
  gap: 0.5rem;
}

.btn.small {
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
}

.update-btn {
  background-color: #3498db;
  color: white;
}

.delete-btn {
  background-color: #e74c3c;
  color: white;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  width: 90%;
  max-width: 500px;
  position: relative;
}

.close-modal {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.form-group textarea {
  min-height: 80px;
}

/* Error and No Items Styles */
.error,
.no-items {
  padding: 2rem;
  text-align: center;
  color: #777;
}

.error {
  color: #e74c3c;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .inventory-header,
  .inventory-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 0.5rem;
  }

  .header-item {
    display: none;
  }

  .inventory-item > div {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .inventory-item > div::before {
    content: attr(data-label);
    font-weight: 600;
  }

  .item-name {
    grid-area: 1 / 1 / 2 / 3;
  }
  .item-quantity {
    grid-area: 2 / 1 / 3 / 2;
  }
  .item-unit {
    grid-area: 2 / 2 / 3 / 3;
  }
  .item-reorder {
    grid-area: 3 / 1 / 4 / 2;
  }
  .item-status {
    grid-area: 3 / 2 / 4 / 3;
  }
  .item-actions {
    grid-area: 4 / 1 / 5 / 3;
  }

  .control-buttons {
    flex-direction: column;
  }

  .search-box {
    margin-left: 0;
    width: 100%;
  }
}

/* Cart Section Styles */
#cartSection {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  margin: 2rem auto;
  max-width: 800px;
  border-top: 3px solid #e67e22;
}

#cartSection h2 {
  color: #e67e22;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.5rem;
}

#cartItems {
  margin-bottom: 1.5rem;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid #f5f5f5;
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item-name {
  font-weight: 500;
  color: #333;
  flex: 2;
}

.cart-item-price {
  color: #666;
  flex: 1;
  text-align: right;
}

.cart-item-quantity {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  justify-content: center;
}

.quantity-btn {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  border: 1px solid #ddd;
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.quantity-btn:hover {
  background: #f5f5f5;
}

.remove-item {
  color: #e74c3c;
  cursor: pointer;
  margin-left: 1rem;
  font-size: 0.9rem;
}

#cartTotal {
  font-size: 1.2rem;
  font-weight: 600;
  text-align: right;
  margin: 1.5rem 0;
  color: #333;
}

#checkoutBtn {
  width: 100%;
  padding: 1rem;
  background-color: #e67e22;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
}

#checkoutBtn:hover {
  background-color: #d35400;
}

/* Empty Cart State */
.cart-empty {
  text-align: center;
  color: #777;
  padding: 2rem 0;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .cart-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .cart-item-name,
  .cart-item-price,
  .cart-item-quantity {
    width: 100%;
    text-align: left;
  }

  .cart-item-quantity {
    justify-content: flex-start;
  }
}
