body {
  margin: 0;
  background: #f5f5f5;
  font-family: 'Roboto', 'Noto Sans TC', Arial, sans-serif;
  color: #222;
}
.main-header, .main-footer {
  width: 100%;
}
.sidebar {
  width: 210px;
  background: #fff;
  box-shadow: 2px 0 8px rgba(0,0,0,0.04);
  padding: 32px 0 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}
.logo {
  margin-bottom: 32px;
  text-align: center;
}
.sidebar .company-name {
  font-size: 1.18rem;
  color: #1976d2;
  font-weight: 700;
  margin-top: 12px;
  margin-bottom: 18px;
  letter-spacing: 1px;
  text-align: center;
}
.menu {
  width: 100%;
  list-style: none;
  padding: 0;
  margin: 0 0 18px 0;
}
.menu-item {
  width: 100%;
  text-align: center;
  margin-bottom: 18px;
}
.menu-item a {
  display: block;
  padding: 14px 0;
  color: #222;
  font-weight: 600;
  font-size: 1.13rem;
  text-decoration: none;
  border-left: 4px solid transparent;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.menu-item.active a,
.menu-item a:hover {
  background: #f0f0f0;
  color: #e60012;
  border-left: 4px solid #e60012;
}
.user-info {
  margin-top: 32px;
  color: #888;
  font-size: 1.05rem;
  text-align: center;
}
.main-content {
  flex: 1;
  padding: 40px 24px;
  max-width: 1100px;
  margin: 0 auto;
  background: none;
}
.btn {
  background: #1976d2;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 8px 24px;
  font-size: 1.08rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}
.btn:hover {
  background: #0d47a1;
}
input[type="text"], input[type="password"], select, textarea {
  padding: 8px 12px;
  border-radius: 4px;
  border: 1px solid #ccc;
  font-size: 1rem;
  margin-bottom: 8px;
  width: 100%;
  box-sizing: border-box;
}
label {
  font-weight: 500;
  margin-bottom: 4px;
  display: block;
}
table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  box-shadow: 0 2px 8px #eee;
}
th, td {
  padding: 8px 4px;
  border: 1px solid #eee;
  text-align: center;
}
th {
  background: #fafafa;
  color: #e60012;
  font-weight: 600;
}
tr:nth-child(even) {
  background: #fcfcfc;
}
.main-footer {
  background: #fff;
  color: #888;
  border-top: 1px solid #eee;
  padding: 32px 0 18px 0;
  font-size: 1.02rem;
  margin-top: 48px;
  width: 100%;
  text-align: center;
  box-sizing: border-box;
  clear: both;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
  width: 100%;
  padding: 0 20px;
}
.footer-company {
  color: #222;
  font-size: 1.08rem;
  margin-bottom: 8px;
}
.footer-copyright {
  color: #888;
  font-size: 0.98em;
}
@media (max-width: 700px) {
  .footer-inner { max-width: 98vw; font-size: 0.98em; }
  .footer-company { font-size: 1em; }
}
.main-content { margin-bottom: 48px; }
@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .sidebar { flex-direction: row; width: 100%; height: auto; box-shadow: none; padding: 0; min-height: unset; }
  .sidebar .menu { display: flex; flex-direction: row; justify-content: center; }
  .sidebar .menu-item { margin: 0 8px; }
  .main-content { padding: 12px 2px; max-width: 100vw; }
  table { font-size: 0.98em; }
  th, td { padding: 6px 2px !important; }
  .sidebar .logo, .sidebar .user-info { display: none; }
}
@media (max-width: 600px) {
  .main-content { padding: 4px 0; }
  table { font-size: 0.92em; }
  .sidebar .menu-item a { padding: 8px 0; font-size: 1em; }
}
.main-content { overflow-x: auto; }
.layout {
  display: flex;
  min-height: 100vh;
}

/* 庫存查詢相關樣式 */
.inventory-container {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  padding: 36px 24px 24px 24px;
  max-width: 520px;
  margin: 48px auto 0 auto;
  text-align: center;
}
.segment-block { margin-bottom: 22px; }
.segment-title { color: #e60012; font-weight: 700; margin-bottom: 8px; font-size: 1.1rem; }
.segment-btn-group { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.segment-btn { background: #fff; color: #e60012; border: 1.5px solid #e60012; border-radius: 6px; padding: 7px 18px; font-size: 1.08rem; font-weight: 500; cursor: pointer; transition: background 0.18s, color 0.18s; margin-bottom: 4px; }
.segment-btn.selected, .segment-btn:hover { background: #e60012; color: #fff; }
.prod-preview { margin: 18px 0 12px 0; font-size: 1.2rem; color: #222; letter-spacing: 2px; min-height: 1.5em; }
.btn-search { background: #e60012; color: #fff; border: none; border-radius: 8px; padding: 10px 32px; font-size: 1.1rem; font-weight: 600; cursor: pointer; margin-top: 8px; transition: background 0.2s; }
.btn-search:hover { background: #b8000f; }
.btn-toggle-query { background: #fff; color: #e60012; border: 1.5px solid #e60012; border-radius: 6px; padding: 6px 18px; font-size: 1rem; font-weight: 500; cursor: pointer; margin-bottom: 18px; margin-top: 8px; transition: background 0.18s, color 0.18s; }
.btn-toggle-query:hover { background: #e60012; color: #fff; }

/* 產品卡片樣式 */
.detail-container { max-width: 700px; margin: 40px auto; background: #fff; border-radius: 8px; box-shadow: 0 2px 8px #eee; padding: 32px; }
.detail-header { display: flex; align-items: center; gap: 32px; }
.product-image, .image-placeholder { width: 220px; height: 220px; object-fit: contain; border-radius: 8px; }
.image-placeholder { background: #f0f0f0; }
.detail-title { font-size: 1.5em; font-weight: bold; margin-bottom: 12px; }
.detail-table { width: 100%; border-collapse: collapse; margin-top: 24px; }
.detail-table th, .detail-table td { border: 1px solid #ccc; padding: 8px; }

/* 表單元素樣式 */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 4px; }
.form-group input[type="text"], .form-group textarea { width: 100%; padding: 8px; box-sizing: border-box; }
.form-group img { max-width: 200px; max-height: 200px; display: block; margin-bottom: 8px; }

/* 模態框樣式 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.modal-content {
  background: white;
  padding: 20px;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
}
.user-actions button {
  padding: 4px 10px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-right: 5px;
  font-size: 0.9em;
}
.user-actions .edit { background: #1976d2; color: white; }
.user-actions .delete { background: #e53935; color: white; }
.user-actions .reset { background: #ffc107; color: black; }

.msg { padding: 10px; margin-bottom: 15px; border-radius: 4px; background: #f5f5f5; }
.user-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.user-table th, .user-table td { padding: 8px; border: 1px solid #ddd; }
.user-table th { background: #f5f5f5; }

@media (max-width: 768px) {
  .detail-header { flex-direction: column; align-items: flex-start; }
  .product-image, .image-placeholder { width: 100%; height: auto; max-height: 200px; margin-bottom: 20px; }
} 