body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

code {
  font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
    monospace;
}

.App {
  text-align: center;
}

.App-logo {
  height: 40vmin;
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  .App-logo {
    animation: App-logo-spin infinite 20s linear;
  }
}

.App-header {
  background-color: #282c34;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: calc(10px + 2vmin);
  color: white;
}

.App-link {
  color: #61dafb;
}

@keyframes App-logo-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Header 基本樣式 */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background-color: #a0522d; /* 深棕色背景 */
  color: #f5f5dc; /* 米色文字 */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* logo 標題樣式 */
.header .logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Merriweather', serif; /* 復古襯線字體 */
}

.header .logo .logo-icon {
  font-size: 36px;
  color: #d2b48c; /* 淺棕色圖標 */
}

.header .logo .logo-text {
  font-size: 30px;
  font-weight: bold;
  letter-spacing: 1px;
  text-align: center;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);
}

/* 菜單按鈕樣式 */
.header .menu {
  display: flex;
  align-items: center;
}

.header .menu-btn {
  background: none;
  border: none;
  color: #f5f5dc;
  font-size: 34px;
  cursor: pointer;
  transition: color 0.3s ease;
}

/* 菜單按鈕懸停效果 */
.header .menu-btn:hover {
  color: #d2b48c;
}

/* 手機模式下調整 */
@media (max-width: 768px) {
  .header {
    padding: 12px 16px;
  }

  .header .logo {
    font-size: 22px;
  }

  .header .logo-icon {
    font-size: 30px;
  }

  .header .logo-text {
    font-size: 19px;
  }

  .header .menu-btn {
    font-size: 30px;
  }
}
/* 側邊欄基本樣式 */
.sidebar {
  position: fixed;
  top: 0;
  left: -250px; /* 預設側邊欄隱藏在畫面外 */
  width: 250px;
  height: 100%;
  background-color: #333;
  color: white;
  transition: left 0.3s ease-in-out, opacity 0.3s ease;
  display: none; /* 預設隱藏 */
  flex-direction: column;
  padding-top: 20px;
  z-index: 1000; /* 確保側邊欄在最上層 */
}

/* 側邊欄開啟 */
.sidebar.open {
  left: 0;
  display: flex; /* 開啟時使用 flex 佈局顯示 */
  opacity: 1; /* 開啟時完全可見 */
}

/* 側邊欄背景遮罩 */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5); /* 透明背景 */
  z-index: 999; /* 確保在側邊欄下面 */
  display: none; /* 預設隱藏 */
}

/* 顯示遮罩 */
.sidebar.open + .sidebar-overlay {
  display: block;
}

.sidebar .close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 30px;
  align-self: flex-end;
  cursor: pointer;
  margin-right: 20px;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  margin-top: 50px;
  width: 100%;
}

.sidebar-menu a {
  color: white;
  text-decoration: none;
  font-size: 18px;
  padding: 15px 20px;
  margin: 5px 0;
  border-bottom: 1px solid #444;
  transition: background-color 0.3s ease;
}

.sidebar-menu a:hover {
  background-color: #ff9800;
}

.sidebar-divider {
  border: none;
  height: 1px;
  background-color: #ccc;
  margin: 15px 0;
}

.sidebar-heading {
  font-size: 0.9em;
  color: #888;
  margin-bottom: 10px;
  padding: 0 15px;
  display: block;
}

.admin-login {
  margin-top: auto;
  padding: 20px;
}

.login-btn {
  background-color: #ff9800;
  color: white;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  border-radius: 5px;
  width: 100%;
  font-size: 16px;
  transition: background-color 0.3s ease;
}

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

.logout-btn {
  background-color: #ff9800;
  color: white;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  border-radius: 5px;
  width: 100%;
  font-size: 16px;
  transition: background-color 0.3s ease;
}

.logout-btn:hover {
  background-color: #f57c00;
}


/* 手機模式：側邊欄寬度100% */
@media (max-width: 768px) {
  .sidebar {
    width: 100%;
  }

  .sidebar-menu a {
    font-size: 16px;
    padding: 12px 20px;
  }

  /* 側邊欄開啟 */
  .sidebar.open {
    left: 0;
    display: flex; /* 確保在手機模式下側邊欄能顯示 */
  }
  
  /* 隱藏側邊欄時讓背景不顯示 */
  .sidebar-overlay {
    display: none;
  }
}


.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5); /* 半透明的黑色背景 */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000; /* 確保 Modal 在其他內容之上 */
}

.modal {
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  width: 80%; /* 可以調整 Modal 的寬度 */
  max-width: 400px;
}

.modal h2 {
  margin-top: 0;
  margin-bottom: 15px;
  text-align: center;
}

.modal .login-error {
  color: red;
  margin-bottom: 10px;
  text-align: center;
}

.modal .input-group {
  margin-bottom: 15px;
}

.modal .input-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.modal .input-group input {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

.modal .button-group {
  display: flex;
  justify-content: flex-end;
}

.modal .button-group button {
  padding: 10px 15px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  margin-left: 10px;
}

.modal .button-group button:first-child {
  background-color: #007bff;
  color: white;
}

.modal .button-group button:last-child {
  background-color: #f8f9fa;
  color: #495057;
  border: 1px solid #ccc;
}

.modal .button-group button:hover {
  opacity: 0.9;
}
/* src/assets/styles/Footer.css */
.footer {
    text-align: center;
    padding: 20px;
    background-color: #333;
    color: white;
    margin-top: 20px;
  }
  
  .footer p {
    margin: 0;
  }
  
  @media (max-width: 768px) {
    .footer {
      padding: 15px;
    }
  }
  
/* ProductManagement.css */
.product-management-container {
    padding: 20px;
  }
  
  .add-product-btn {
    padding: 10px 15px;
    margin-bottom: 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
  }
  
  .product-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    grid-gap: 20px;
    gap: 20px;
  }
  
  .product-item {
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 15px;
    display: flex;
    align-items: center;
  }
  
  .product-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    margin-right: 15px;
    border-radius: 5px;
  }
  
  .product-info {
    flex-grow: 1;
  }
  
  .product-info h3 {
    margin-top: 0;
    margin-bottom: 5px;
  }
  
  .product-actions button {
    padding: 8px 12px;
    margin-left: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
  }
  
  .product-actions button:first-child {
    background-color: #28a745;
    color: white;
  }
  
  .product-actions button:last-child {
    background-color: #dc3545;
    color: white;
  }
  
  /* Modal 樣式 (可以與 Sidebar 的 modal-overlay 和 modal 共用，或創建新的) */
  .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
  }
  
  .modal {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    width: 80%;
    max-width: 600px;
  }
  
  .modal h2 {
    margin-top: 0;
    margin-bottom: 15px;
    text-align: center;
  }
  
  .modal .input-group {
    margin-bottom: 15px;
  }
  
  .modal .input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
  }
  
  .modal .input-group input,
  .modal .input-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
  }
  
  .modal .button-group {
    display: flex;
    justify-content: flex-end;
  }
  
  .modal .button-group button {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    margin-left: 10px;
  }
  
  .modal .button-group button:first-child {
    background-color: #f8f9fa;
    color: #495057;
    border: 1px solid #ccc;
  }
  
  .modal .button-group button:last-child {
    background-color: #007bff;
    color: white;
  }
  
  /* RWD 樣式 */
  @media (max-width: 768px) {
    .product-list {
      grid-template-columns: 1fr;
    }
  
    .product-item {
      flex-direction: column;
      align-items: flex-start;
    }
  
    .product-image {
      margin-bottom: 10px;
    }
  
    .product-actions {
      margin-top: 10px;
      display: flex;
      gap: 10px;
    }
  }
/* src/assets/styles/ShoppingCart.css */
.shopping-cart-page {
  padding: 20px;
}

.shopping-cart {
  background-color: #f5f5f5;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.shopping-cart h2 {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 20px;
}

.cart-items {
  display: grid; /* 使用 CSS Grid */
  grid-template-columns: repeat(auto-fit, 300px); /* 設定每個 item 的基本寬度 */
  grid-gap: 20px;
  gap: 20px; /* 項目之間的固定間距 */
  justify-content: center; /* 讓項目在容器中居中，保持間距 */
}

.cart-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #fff;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  max-width: 300px; /* 設定最大寬度 */
  max-height: 400px; /* 設定最大高度 */
}

.cart-item img {
  width: 50%; /* 圖片寬度佔滿容器 */
  height: auto; /* 保持原始比例 */
  aspect-ratio: 1 / 1; /* 強制圖片比例為 1:1 (正方形) */
  object-fit: cover; /* 圖片裁剪填充容器 */
  border-radius: 8px;
  margin-bottom: 10px;
}

.cart-item-info {
  text-align: center;
  margin-bottom: 10px;
}

.cart-item-info p {
  margin: 5px 0;
}

.cart-item-info p:first-child {
  font-weight: bold;
  font-size: 18px;
}

.cart-item-info p:last-child {
  font-size: 16px;
  color: #ff5722;
}

.add-to-cart-btn {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  margin-top: 10px;
}

.add-to-cart-btn:hover {
  background-color: #0056b3;
}

.cart-entry {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #28a745;
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  font-size: 20px;
  z-index: 10;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: red;
  color: white;
  border-radius: 50%;
  padding: 5px;
  font-size: 12px;
  min-width: 20px;
  height: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 手機排版 (屏幕寬度小於或等於 768px) */
@media (max-width: 768px) {
  .cart-items {
    grid-template-columns: 1fr; /* 修改為每行一個項目 */
    justify-content: start; /* 手機模式下靠左對齊 */
  }

  .cart-item {
    flex-direction: row; /* 水平排列 */
    align-items: center; /* 垂直居中對齊 */
    justify-content: space-between; /* 圖片/資訊和按鈕之間留白 */
    padding-right: 15px;
    max-width: none; /* 移除手機模式下的最大寬度限制 */
    max-height: none; /* 移除手機模式下的最大高度限制 */
  }

  .cart-item img {
    width: 80px; /* 手機模式下圖片寬度 */
    height: 80px; /* 手機模式下圖片高度 */
    aspect-ratio: 1 / 1; /* 強制比例 */
    object-fit: cover;
    margin-right: 15px;
    margin-bottom: 0;
  }

  .cart-item-info {
    flex-grow: 1;
    text-align: left;
    margin-top: 0;
    margin-bottom: 0;
  }

  .add-to-cart-btn {
    position: static;
    margin-left: 15px;
    margin-top: 0;
    padding: 6px 12px; /* 調整手機模式下按鈕內邊距 */
    font-size: 12px; /* 調整手機模式下按鈕字體大小 */
  }
  .item-image {
    width: 120px; /* 設定一個基礎寬度 */
    height: auto; /* 保持圖片的原始比例 */
    margin-top: 20px;
    margin-right: 15px;
    flex-shrink: 0; /* 防止圖片在空間不足時被壓縮 */
  }
  
  .item-image img {
    width: 100%; /* 圖片寬度佔滿 .item-image 容器 */
    height: auto;
    object-fit: cover; /* 確保圖片完整顯示並維持比例，可能會有部分裁剪 */
    border-radius: 4px;
  }
  
  /* 手機模式下的調整 */
  @media (max-width: 768px) {
    .item-image {
      width: 80px; /* 手機模式下圖片寬度縮小 */
      margin-top: 10px;
      margin-right: 10px;
    }
  }
}
/* src/assets/styles/ShoppingList.css */
.shopping-list-page {
  padding: 20px;
}

.header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.back-to-shop-icon {
  color: #007bff;
  text-decoration: none;
  cursor: pointer;
  font-size: 1.5em;
}

.back-to-shop-icon:hover {
  text-decoration: underline;
}

.cart-item-list {
  list-style: none;
  padding: 0;
}

.cart-list-item {
  display: flex;
  border: 1px solid #ddd;
  padding: 15px;
  margin-bottom: 10px;
  border-radius: 8px;
  align-items: flex-start; /* 調整為靠左上對齊，以便在垂直排列時更好看 */
  position: relative;
}

.item-image {
  width: 100px; /* 基礎寬度 */
  min-width: 60px; /* 最小寬度 */
  height: auto;
  margin-top: 0; /* 移除圖片上方的 margin，與文字對齊 */
  margin-right: 15px;
  flex-shrink: 0;
}

.item-image img {
  width: 100%;
  height: auto; /* 保持圖片比例 */
  object-fit: cover;
  border-radius: 4px;
}

.item-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-width: 0;
}

.item-name {
  font-weight: bold;
  margin-bottom: 5px;
  white-space: normal;
  font-size: 1.1em;
}

.item-price {
  color: green;
  font-weight: bold;
  white-space: nowrap;
  font-size: 1.2em;
  margin-bottom: 5px; /* 價格下方增加一點間距 */
}

.item-quantity-controls {
  display: flex;
  align-items: center;
  position: absolute;
  bottom: 10px;
  right: 15px;
}

.item-quantity-controls button {
  background: none;
  border: 1px solid #ccc;
  padding: 6px 10px;
  margin: 0 6px;
  cursor: pointer;
  border-radius: 4px;
  font-size: 1em;
}

.item-quantity-controls span {
  margin: 0 12px;
  font-size: 1.1em;
  min-width: 35px;
  text-align: center;
}

.remove-item {
  background: none;
  border: none;
  color: red;
  cursor: pointer;
  font-size: 1.4em;
  position: absolute;
  top: 10px;
  right: 15px;
}

.total-price {
  margin-top: 20px;
  font-size: 1.3em;
  text-align: right;
  font-weight: bold;
}

/* 新增的結帳選項樣式 */
.checkout-options {
  margin-top: 20px;
  padding: 15px;
  border: 1px solid #eee;
  border-radius: 8px;
}

.checkout-options > div {
  margin-bottom: 15px;
}

.checkout-options label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.checkout-options textarea {
  width: 90%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  resize: vertical;
}

.checkout-options select {
  width: 150px;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.cart-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
}

.checkout-button {
  background-color: #5cb85c;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 18px;
}

.checkout-button:hover {
  background-color: #4cae4c;
}

.clear-cart-button {
  background-color: #d9534f;
  color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
}

.clear-cart-button:hover {
    background-color: #c9302c;
}

.order-type-options {
    margin-bottom: 15px;
    display: flex;
    gap: 20px;
    align-items: center;
}

.order-type-options label {
    display: flex;
    align-items: center;
    gap: 5px;
}

.table-number-input {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-number-input label {
    font-weight: bold;
}

.table-number-input input[type="text"] {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100px;
}

/* 確認對話框樣式 */
.confirmation-dialog {
    padding: 20px;
    border-radius: 8px;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    text-align: center;
}

.confirmation-dialog p {
    color: #555;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.1em;
}

.confirmation-dialog strong {
    font-weight: bold;
    color: red;
}

.confirmation-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.confirmation-buttons button {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
}

.confirmation-buttons .cancel-button {
    background-color: #ffc107;
    color: #333;
}

.confirmation-buttons .cancel-button:hover {
    background-color: #e0a800;
}

.confirmation-buttons .submit-button {
    background-color: #28a745;
}

.confirmation-buttons .submit-button:hover:enabled {
    background-color: #1e7e34;
}

.confirmation-buttons .submit-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* 手機模式下的調整 */
@media (max-width: 768px) {
    .shopping-list-page {
        padding: 15px;
    }

    .header-row {
        margin-bottom: 15px;
    }

    .cart-list-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px;
    }

    .item-image {
        width: 80px;
        min-width: 80px;
        height: auto;
        margin-top: 0; /* 移除圖片上方的 margin */
        margin-right: 0;
        margin-bottom: 10px;
    }

    .item-info {
        margin-bottom: 10px; /* 在資訊下方增加間距 */
    }

    .item-quantity-controls {
        position: static; /* 在手機模式下取消絕對定位 */
        margin-left: 0;
        margin-top: 10px;
    }

    .remove-item {
        top: 5px;
        right: 5px;
        font-size: 1.2em;
    }

    .checkout-options {
        padding: 10px;
        margin-top: 15px;
    }

    .checkout-options > div {
        margin-bottom: 10px;
    }

    .cart-actions {
        flex-direction: column;
        gap: 10px;
    }

    .checkout-button,
    .clear-cart-button {
        width: 100%;
    }
}
/* src/assets/styles/OrderList.css */
.order-list-page {
    padding: 20px;
}

.order-list-page h2 {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
}

.order-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* 響應式卡片佈局 */
    grid-gap: 20px;
    gap: 20px;
}

.order-card {
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #ddd;
}

.order-info p {
    margin-bottom: 8px;
    font-size: 16px;
}

.order-info strong {
    font-weight: bold;
    margin-right: 5px;
}

.order-items {
    margin-top: 10px;
    padding-left: 15px;
    border-left: 2px solid #ccc;
}

.order-items strong {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.order-items p {
    font-size: 14px;
    margin-bottom: 3px;
}

/* 手機排版 */
@media (max-width: 768px) {
    .order-cards {
        grid-template-columns: 1fr; /* 手機模式下每行一個卡片 */
    }

    .order-info p {
        font-size: 14px;
        margin-bottom: 5px;
    }
}
