* { box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin: 0; padding: 20px; background: #f5f5f5; color: #222; }
#app { max-width: 480px; margin: 0 auto; }
h1 { font-size: 24px; }
h2 { font-size: 20px; margin: 0 0 10px; }
h3 { font-size: 16px; margin: 20px 0 8px; }
input, button { width: 100%; padding: 12px; margin: 6px 0; font-size: 16px;
  border-radius: 8px; border: 1px solid #ccc; background: #fff; color: #222; }
button { background: #4a2c1a; color: #fff; border: none; cursor: pointer; font-weight: 600; }
button:hover { background: #3a2014; }
button.primary { background: #2e7d32; }
button.primary:hover { background: #256428; }
button.success { background: #1565c0; }
button:disabled { opacity: 0.5; cursor: not-allowed; }
.card { background: #fff; padding: 20px; border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08); margin-bottom: 16px; }
.progress { font-size: 32px; font-weight: bold; margin: 10px 0; }
.cups-visual { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.cup { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #4a2c1a; }
.cup.filled { background: #4a2c1a; }
.referral { background: #fff; padding: 16px; border-radius: 12px; margin-bottom: 16px; }
#history > div { background: #fff; padding: 8px 12px; border-radius: 8px;
  margin-bottom: 6px; font-size: 14px; }
.error { color: #c62828; font-size: 14px; min-height: 20px; }
.muted { color: #666; font-size: 13px; }
#users-list > div { background: #fff; padding: 10px; border-radius: 8px;
  margin-bottom: 6px; font-size: 14px; }
#users-list button { width: auto; padding: 4px 10px; font-size: 12px; margin: 2px; }
#stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#stats > div { background: #fff; padding: 12px; border-radius: 8px; font-size: 13px; }
#stats b { font-size: 20px; display: block; margin-bottom: 4px; }

.tab-btn {
  width: auto !important;
  padding: 8px 12px !important;
  font-size: 13px !important;
  background: #eee !important;
  color: #333 !important;
  border-radius: 8px !important;
  font-weight: 500 !important;
}
.tab-btn.active {
  background: #4a2c1a !important;
  color: #fff !important;
}
.tab-content { margin-top: 8px; }

.cal-day:hover {
  filter: brightness(0.95);
}

select {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  background: #fff;
  color: #222;
  font-size: 15px;
  margin: 6px 0;
}

/* Кнопки действий в очереди бариста */
.queue-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.queue-actions button {
  width: auto !important;
  flex: 1;
  padding: 10px 12px !important;
  font-size: 14px !important;
  margin: 0 !important;
  white-space: nowrap;
}
.queue-actions .btn-serve {
  background: #2e7d32 !important;
  flex: 2;
}
.queue-actions .btn-skip {
  background: #757575 !important;
  flex: 1;
  max-width: 130px;
}
.queue-actions .btn-skip:hover {
  background: #616161 !important;
}

/* Индикатор новых заказов */
#new-orders-badge {
  display: none;
  background: #c62828;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 10px;
  margin-left: 8px;
  animation: pulse 1.4s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

#month-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
#month-stats > div {
  background: #fff;
  padding: 12px;
  border-radius: 8px;
  font-size: 13px;
}
#month-stats b {
  font-size: 20px;
  display: block;
  margin-bottom: 4px;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #888 !important;
}
