/* Cami - Shared CSS Variables & Reset */
:root {
  --primary: #E53935;
  --primary-light: #FF6F60;
  --primary-dark: #AB000D;
  --secondary: #FFC107;
  --secondary-light: #FFF350;
  --bg: #FAFAFA;
  --bg-card: #FFFFFF;
  --text: #212121;
  --text-secondary: #757575;
  --text-light: #BDBDBD;
  --border: #E0E0E0;
  --success: #4CAF50;
  --warning: #FF9800;
  --danger: #F44336;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.12);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans TC', sans-serif;
  --nav-height: 56px;
  --bottom-nav-height: 64px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

a {
  color: var(--primary);
  text-decoration: none;
}

button {
  font-family: var(--font);
  cursor: pointer;
  border: none;
  outline: none;
}

img {
  max-width: 100%;
  height: auto;
}

/* Utility Classes */
.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.2s;
  min-height: 48px;
}

.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:active {
  background: var(--primary-dark);
}

.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.875rem;
  min-height: 36px;
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-success {
  background: var(--success);
  color: white;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 12px;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-open { background: #E8F5E9; color: #2E7D32; }
.badge-full { background: #FFF3E0; color: #E65100; }
.badge-cancelled { background: #FFEBEE; color: #C62828; }
.badge-confirmed { background: #E3F2FD; color: #1565C0; }
.badge-checked_in { background: #E8F5E9; color: #2E7D32; }

.input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: var(--font);
  background: white;
  min-height: 48px;
}
.input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(229,57,53,0.1);
}

.label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-group {
  margin-bottom: 16px;
}

.section-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 24px 0 12px;
  padding-left: 12px;
  border-left: 4px solid var(--primary);
}

.empty-state {
  text-align: center;
  padding: 48px 16px;
  color: var(--text-light);
}
.empty-state img {
  width: 80px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.loading {
  text-align: center;
  padding: 32px;
  color: var(--text-light);
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }

/* Toast notification */
.toast {
  position: fixed;
  bottom: calc(var(--bottom-nav-height) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--text);
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  z-index: 1000;
  transition: transform 0.3s;
  max-width: 90%;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
}
