/* 團購活動管理頁面樣式 — 使用 design-system.css 設計語彙 */

.gb-banner {
  background: var(--primary-light);
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  line-height: 1.7;
}
.gb-banner strong {
  color: var(--primary);
}

.gb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.25rem;
}
.gb-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 0.875rem;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.gb-card h3 {
  font-size: 1.15rem;
  color: var(--gray-900);
}

.gb-badge {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}
.gb-badge.open {
  background: #fef3c7;
  color: #92400e;
}
.gb-badge.success {
  background: #dcfce7;
  color: #166534;
}
.gb-badge.expired {
  background: #fee2e2;
  color: #991b1b;
}

.gb-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  color: var(--gray-600);
}
.gb-row b {
  color: var(--gray-900);
  font-weight: 600;
}
.gb-strike {
  text-decoration: line-through;
  color: var(--gray-400);
}
.gb-price-final {
  color: var(--secondary-hover);
  font-weight: 800;
}

.gb-progress {
  height: 10px;
  background: var(--gray-200);
  border-radius: 999px;
  overflow: hidden;
}
.gb-progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.3s;
}

.gb-members {
  font-size: 0.8rem;
  color: var(--gray-500);
}
.gb-members .init {
  color: var(--primary);
  font-weight: 700;
}

.btn {
  padding: 0.55rem 1rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.875rem;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-hover);
}
.btn-secondary {
  background: var(--gray-100);
  color: var(--gray-700);
}
.btn-ghost {
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--primary);
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.gb-form {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 0.875rem;
  padding: 1.5rem;
  margin-bottom: 1.75rem;
}
.gb-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.gb-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.3rem;
}
.gb-field input {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--gray-300);
  border-radius: 0.5rem;
  font-size: 0.9rem;
}
.gb-field small {
  color: var(--gray-400);
  font-size: 0.72rem;
}

.gb-wallet {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 0.875rem;
  padding: 1.25rem;
  margin-bottom: 1.75rem;
}
.gb-wallet-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.gb-chip {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 0.5rem;
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
}
.gb-chip b {
  color: var(--primary);
}

.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(150%);
  background: var(--gray-900);
  color: #fff;
  padding: 0.8rem 1.4rem;
  border-radius: 0.6rem;
  font-size: 0.9rem;
  transition: transform 0.3s;
  z-index: 1000;
  max-width: 90vw;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
}
.toast.err {
  background: var(--error);
}
.toast.ok {
  background: var(--success);
}
