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

/* ── Body ──────────────────────────────────────────────────────────────── */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #1A1A2E;
  background: #F8FAFC;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  touch-action: manipulation;
}

/* ── Layout ────────────────────────────────────────────────────────────── */
.container {
  max-width: 480px;
  margin: 32px auto;
  padding: 24px;
  background: #FFFFFF;
  border: none;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
}

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.2px;
  cursor: pointer;
  border: none;
  padding: 12px 24px;
  width: 100%;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease, background 0.15s ease;
  touch-action: manipulation;
}

.btn:active {
  opacity: 0.85;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: #2E6DA4;
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(46, 109, 164, 0.25);
}

.btn-primary:hover {
  background: #265d8f;
}

.btn-primary:active {
  transform: scale(0.97);
  box-shadow: 0 1px 4px rgba(46, 109, 164, 0.2);
  opacity: 1;
}

.btn-success {
  background: #28A745;
  color: #FFFFFF;
}

.btn-danger {
  background: #DC3545;
  color: #FFFFFF;
}

/* ── Spinner ───────────────────────────────────────────────────────────── */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(46, 109, 164, 0.15);
  border-top-color: #2E6DA4;
  border-radius: 50%;
  display: block;
  margin: 0 auto;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner-text {
  text-align: center;
  margin-top: 12px;
  color: #6B7280;
}

/* ── Card ──────────────────────────────────────────────────────────────── */
.card {
  background: #FFFFFF;
  border: none;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
}

/* ── Status badges ─────────────────────────────────────────────────────── */
.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.status-synced {
  background: #D4EDDA;
  color: #155724;
}

.status-pending {
  background: #FFF3CD;
  color: #856404;
}

.status-failed {
  background: #F8D7DA;
  color: #721C24;
}

.status-uploading {
  background: #D1ECF1;
  color: #0C5460;
}

/* ── Form controls ─────────────────────────────────────────────────────── */
.select-wrapper {
  position: relative;
}

.select-wrapper::after {
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #6B7280;
  pointer-events: none;
}

.select-wrapper select {
  width: 100%;
  font-size: 16px;
  padding: 12px 36px 12px 14px;
  border-radius: 12px;
  border: 1px solid #E0E0E0;
  background: #FFFFFF;
  appearance: none;
  -webkit-appearance: none;
  color: #1A1A2E;
  min-height: 44px;
  box-shadow: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"] {
  width: 100%;
  font-size: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #E0E0E0;
  background: #FFFFFF;
  color: #1A1A2E;
  min-height: 44px;
  box-shadow: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:focus,
.select-wrapper select:focus {
  outline: none;
  border-color: #2E6DA4;
  box-shadow: 0 0 0 3px rgba(46, 109, 164, 0.12);
}

/* ── Error box ─────────────────────────────────────────────────────────── */
.error-box {
  background: #FFFFFF;
  border: none;
  border-left: 3px solid #DC3545;
  border-radius: 16px;
  padding: 16px 20px;
  color: #DC3545;
  font-size: 15px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
}

/* ── Empty state ───────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 40px;
  color: #6B7280;
}

/* ── Utility ───────────────────────────────────────────────────────────── */
.hidden {
  display: none;
}
