* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f2f3f5;
  color: #1c1c1e;
}

.screen { min-height: 100vh; padding: 16px; }
.hidden { display: none !important; }

.card {
  background: white;
  border-radius: 16px;
  padding: 20px;
  margin: 12px auto;
  max-width: 480px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

h1 { text-align: center; margin: 24px 0 4px; font-size: 28px; }
h2 { font-size: 18px; margin: 20px 0 10px; }
.subtitle { text-align: center; color: #666; margin-bottom: 20px; }

input {
  width: 100%;
  padding: 14px;
  font-size: 18px;
  border: 1px solid #d1d1d6;
  border-radius: 10px;
  margin-bottom: 12px;
  text-align: center;
}
#tab-items input, #tab-users input { text-align: left; }

.btn-primary {
  width: 100%;
  padding: 14px;
  font-size: 17px;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  background: #007aff;
  color: white;
  cursor: pointer;
}
.btn-primary:active { opacity: 0.8; }
.btn-green { background: #34c759; }
.btn-red { background: #ff3b30; }

.btn-text {
  display: block;
  width: 100%;
  text-align: center;
  background: none;
  border: none;
  color: #007aff;
  padding: 10px;
  font-size: 15px;
  cursor: pointer;
}

.admin-link {
  display: block;
  text-align: center;
  color: #999;
  font-size: 13px;
  margin-top: 16px;
  text-decoration: none;
}

.error { color: #ff3b30; text-align: center; font-size: 14px; min-height: 18px; }
.result { text-align: center; font-weight: 600; color: #34c759; min-height: 18px; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 480px;
  margin: 0 auto 8px;
  padding: 4px 8px;
  font-weight: 600;
}

#reader { width: 100%; border-radius: 10px; overflow: hidden; }

.adjust-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 16px 0;
}
.btn-round {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: #e5e5ea;
  font-size: 24px;
  cursor: pointer;
}
#qty-delta { width: 90px; margin-bottom: 0; }

.action-row { display: flex; gap: 10px; margin-top: 8px; }
.action-row .btn-primary { width: 100%; }

.qty-label { text-align: center; font-size: 16px; }

.tabs {
  display: flex;
  max-width: 480px;
  margin: 8px auto;
  gap: 6px;
}
.tab-btn {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 8px;
  background: #e5e5ea;
  font-weight: 600;
  cursor: pointer;
}
.tab-btn.active { background: #007aff; color: white; }

table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 14px; }
th, td { text-align: left; padding: 8px 4px; border-bottom: 1px solid #eee; }
td button { background: none; border: none; color: #ff3b30; cursor: pointer; font-size: 13px; }
