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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #F5F7FA;
  color: #1A1A1A;
  min-height: 100vh;
}

header {
  background: #00A86B;
  color: #fff;
  padding: 16px;
  text-align: center;
}

header h1 { font-size: 18px; font-weight: 700; }

main { padding: 24px; max-width: 500px; margin: 0 auto; }

.status { text-align: center; color: #666; margin-bottom: 16px; font-size: 14px; }

.card {
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.label { font-size: 12px; color: #666; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }

.value { font-size: 16px; font-weight: 600; color: #1A1A1A; word-break: break-all; }

.value.ok { color: #2ECC71; }
.value.fail { color: #E74C3C; }

/* Auth forms */
form.card { display: flex; flex-direction: column; }

form.card label {
  font-size: 13px;
  color: #666;
  margin-top: 12px;
  margin-bottom: 4px;
}

form.card input {
  padding: 10px 12px;
  font-size: 15px;
  border: 1px solid #E0E0E0;
  border-radius: 8px;
  outline: none;
  background: #F9FAFB;
}

form.card input:focus {
  border-color: #00A86B;
  background: #fff;
}

form.card button {
  margin-top: 20px;
  padding: 12px;
  background: #00A86B;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

form.card button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.error-msg {
  color: #E74C3C;
  font-size: 14px;
  margin-top: 12px;
  text-align: center;
}

.hidden { display: none; }

.switch-link {
  text-align: center;
  margin-top: 16px;
  font-size: 14px;
  color: #666;
}

.switch-link a {
  color: #00A86B;
  font-weight: 600;
  text-decoration: none;
}

.logout-btn {
  width: 100%;
  margin-top: 8px;
  padding: 12px;
  background: #fff;
  color: #E74C3C;
  border: 1px solid #E74C3C;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

/* Sync badge */
header {
  position: relative;
}

.sync-badge {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sync-badge.ok {
  background: rgba(255,255,255,0.25);
  color: #fff;
}

.sync-badge.pending {
  background: #F39C12;
  color: #fff;
}

/* ───────────── Buttons (real <a> links + <button> elements) ───────────── */
.primary-btn {
  display: inline-block;
  background: #00A86B;
  color: #ffffff !important;
  border: none;
  border-radius: 8px;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease;
}
.primary-btn:hover {
  background: #007A4D;
}
.primary-btn:active {
  background: #005F3B;
}

.secondary-btn {
  display: inline-block;
  background: #ffffff;
  color: #00A86B !important;
  border: 1.5px solid #00A86B;
  border-radius: 8px;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease;
}
.secondary-btn:hover {
  background: #E8F8F0;
}
.secondary-btn:active {
  background: #C9EDDB;
}

.block {
  display: block;
  width: 100%;
  margin-top: 10px;
  box-sizing: border-box;
}

/* ───── Type selector buttons ───── */
.type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.type-btn {
  padding: 16px 12px;
  font-size: 15px;
  font-weight: 600;
  background: #f9fafb;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  cursor: pointer;
  color: #1a1a1a;
  transition: all 0.15s ease;
}

.type-btn:hover {
  border-color: #00a86b;
  background: #f0f9f5;
}

.type-btn.selected {
  background: #00a86b !important;
  border-color: #00a86b !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(0, 168, 107, 0.35);
}

.type-btn.selected::before {
  content: "✓ ";
  font-weight: 700;
}
