:root {
  --primary: #4A0F1C;
  --primary-dark: #380B15;
  --accent: #C2A052;
  --accent-light: #E9D4A6;
  --bg: #FFF8F2;
  --bg-soft: #F3E9D7;
  --card: #FFFFFF;
  --text: #3A0C16;
  --muted: #9B7B75;
  --border: #EAD9C4;
  --danger: #E53935;
  --success: #43A047;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, sans-serif; background: linear-gradient(180deg, var(--bg), var(--bg-soft)); color: var(--text); }

#app { max-width: 480px; margin: 0 auto; padding: 16px; padding-bottom: 80px; min-height: 100%; }

.hidden { display: none !important; }

.card {
  background: var(--card);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(74,15,28,0.08);
  margin-bottom: 16px;
  border-top: 3px solid var(--accent);
}

h1, h2, h3 { margin-top: 0; }

label { display: block; margin: 12px 0 4px; font-size: 14px; color: var(--muted); }
input, select, textarea, button {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 16px;
  font-family: inherit;
  background: #FFFDF9;
}

input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(194,160,82,0.25); }

button {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--accent-light);
  border: none;
  cursor: pointer;
  font-weight: 600;
  margin-top: 12px;
}

button:hover { filter: brightness(1.15); }

button.secondary { background: var(--card); color: var(--primary); border: 1px solid var(--accent); }
button.danger { background: var(--danger); color: white; }

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

.error { color: var(--danger); font-size: 14px; margin-top: 8px; }

.brand-logo {
  display: block;
  text-align: center;
  padding: 10px 28px;
  margin-bottom: 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--accent-light);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 2px;
}

#nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-around;
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 8px 0;
  z-index: 10;
}

#nav button { width: auto; background: none; color: var(--muted); font-size: 12px; margin: 0; padding: 6px 8px; position: relative; }
#nav button.active { color: var(--primary); font-weight: 700; }
#nav button .badge { position: absolute; top: 0; inset-inline-end: 0; background: var(--danger); color: white; font-size: 10px; padding: 2px 5px; border-radius: 8px; }
#nav button .badge.hidden { display: none; }

.candidate {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.actions { display: flex; gap: 12px; }
.actions button { flex: 1; }

.match-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.message-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 16px;
  margin: 6px 0;
  font-size: 15px;
}

.message-bubble.me { background: var(--primary); color: white; margin-right: auto; }
.message-bubble.them { background: var(--border); margin-left: auto; }

.message-form { display: flex; gap: 8px; }
.message-form input { flex: 1; margin: 0; }
.message-form button { width: auto; margin: 0; padding: 10px 16px; }

.empty { text-align: center; color: var(--muted); padding: 40px 0; }

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  background: var(--border);
  color: var(--muted);
}

.badge-high { background: #E8F5E9; color: var(--success); }
.badge-medium { background: #FFF3E0; color: #F57C00; }
.badge-low { background: #FFEBEE; color: var(--danger); }
