* { box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f4f5f7;
  margin: 0;
  padding: 0 0 40px;
  color: #1c1c1e;
}
a { color: #ee4d2d; text-decoration: none; }

.topbar {
  background: #fff;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar h1 { font-size: 18px; margin: 0; }
.topbar-actions a { margin-left: 12px; font-size: 14px; }

.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: #ee4d2d;
}
.login-box {
  background: #fff;
  padding: 32px 24px;
  border-radius: 12px;
  width: 90%;
  max-width: 340px;
  text-align: center;
}
.login-box h1 { color: #ee4d2d; margin-bottom: 4px; }
.login-box h2 { font-size: 15px; color: #888; margin-top: 0; font-weight: normal; }
.login-box input {
  width: 100%;
  padding: 12px;
  margin-bottom: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
}
.login-box button {
  width: 100%;
  padding: 12px;
  background: #ee4d2d;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
}
.error { color: #d33; font-size: 14px; }
.success { color: #2a9d3f; padding: 8px 16px; }

.summary-box {
  display: flex;
  justify-content: space-around;
  background: #fff;
  margin: 12px;
  padding: 16px;
  border-radius: 10px;
  text-align: center;
  font-size: 14px;
}
.summary-box strong { display: block; font-size: 20px; color: #ee4d2d; }

.btn-primary, .btn-secondary {
  display: block;
  text-align: center;
  padding: 14px;
  margin: 10px 12px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  width: calc(100% - 24px);
}
.btn-primary { background: #ee4d2d; color: #fff; }
.btn-secondary { background: #fff; color: #ee4d2d; border: 1px solid #ee4d2d; }
.btn-block { width: calc(100% - 24px); }
.btn-small {
  padding: 6px 12px;
  border-radius: 6px;
  background: #eee;
  font-size: 13px;
  border: none;
  cursor: pointer;
  display: inline-block;
}
.btn-danger { background: #fde2e2; color: #d33; }

h3 { margin: 20px 12px 8px; font-size: 15px; color: #555; }
.hint { margin: 0 12px 8px; font-size: 13px; color: #888; }
.empty { text-align: center; color: #999; padding: 20px; }

.order-card {
  background: #fff;
  margin: 10px 12px;
  padding: 14px;
  border-radius: 10px;
  border-left: 4px solid #ffb020;
}
.order-card.status-done { border-left-color: #2a9d3f; opacity: 0.85; }
.order-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 20px;
  background: #fff3e0;
  color: #c77700;
}
.status-done .badge { background: #e6f7e9; color: #2a9d3f; }
.order-address { font-size: 13px; color: #666; margin-bottom: 8px; }
.order-items { margin: 0 0 8px; padding-left: 18px; font-size: 14px; }
.order-notes { font-size: 13px; color: #888; font-style: italic; margin-bottom: 8px; }
.order-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  color: #888;
  border-top: 1px solid #f0f0f0;
  padding-top: 8px;
}

.order-form { padding: 0 12px; }
.order-form label { display: block; margin: 14px 0 4px; font-size: 13px; color: #555; font-weight: 600; }
.order-form input[type=text], .order-form textarea, .order-form select {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
}

.item-row {
  background: #fff;
  border-radius: 10px;
  padding: 12px;
  margin: 12px 0;
  border: 1px solid #eee;
}
.item-row-header { display: flex; gap: 8px; margin-bottom: 10px; }
.aroma-input { flex: 1; padding: 10px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; }
.remove-item {
  background: #fde2e2;
  color: #d33;
  border: none;
  border-radius: 8px;
  width: 40px;
  font-size: 18px;
  cursor: pointer;
}
.variant-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.variant-btn {
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fafafa;
  font-size: 13px;
  cursor: pointer;
  line-height: 1.4;
}
.variant-btn small { color: #888; }
.variant-btn.selected {
  background: #ee4d2d;
  border-color: #ee4d2d;
  color: #fff;
}
.variant-btn.selected small { color: #ffe; }
.qty-row { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.qty-row button {
  width: 30px; height: 30px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
  font-size: 16px;
  cursor: pointer;
}
.qty-input { width: 40px; text-align: center; border: none; font-size: 15px; }
.item-subtotal { margin-left: auto; font-weight: 600; color: #ee4d2d; }

.order-total-box {
  background: #fff3e0;
  padding: 14px;
  border-radius: 10px;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  margin: 16px 0;
}
#order-total { color: #ee4d2d; }

.inline-form {
  display: flex;
  gap: 8px;
  margin: 0 12px 16px;
  flex-wrap: wrap;
}
.inline-form input, .inline-form select { padding: 10px; border: 1px solid #ddd; border-radius: 8px; flex: 1; min-width: 100px; }

.variant-list { padding: 0 12px; }
.variant-card {
  background: #fff;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 8px;
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.variant-card.inactive { opacity: 0.5; }
.variant-label-input { flex: 2; min-width: 90px; padding: 8px; border: 1px solid #ddd; border-radius: 6px; }
.variant-price-input { flex: 1; min-width: 70px; padding: 8px; border: 1px solid #ddd; border-radius: 6px; }
.variant-sort-input { width: 50px; padding: 8px; border: 1px solid #ddd; border-radius: 6px; }

.settings-form { padding: 0 12px; }
.photo-field { margin-bottom: 16px; }
.photo-field label { display: block; font-size: 13px; color: #555; margin-bottom: 6px; font-weight: 600; }
.preview-photo { display: block; width: 100px; height: 100px; object-fit: cover; border-radius: 8px; margin-bottom: 6px; }

.bottle-reference {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: #fff;
  overflow-x: auto;
}
.ref-photo { width: 90px; height: 90px; object-fit: cover; border-radius: 8px; border: 1px solid #eee; flex-shrink: 0; }
.ref-photo-empty {
  width: 90px; height: 90px;
  display: flex; align-items: center; justify-content: center;
  background: #f4f4f4; border-radius: 8px; font-size: 11px; color: #999; text-align: center;
  flex-shrink: 0;
}

.single-select-group { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.option-btn {
  padding: 10px 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fafafa;
  font-size: 14px;
  cursor: pointer;
}
.option-btn.selected { background: #ee4d2d; border-color: #ee4d2d; color: #fff; }

.filter-tabs { display: flex; gap: 8px; padding: 0 12px 12px; }
.filter-tabs a {
  padding: 8px 14px;
  border-radius: 20px;
  background: #fff;
  font-size: 13px;
  color: #555;
  border: 1px solid #eee;
}
.filter-tabs a.active { background: #ee4d2d; color: #fff; border-color: #ee4d2d; }
