:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f1f3f6;
  --border: #e5e7eb;
  --text: #111827;
  --muted: #6b7280;
  --accent: #0a5cb8;       /* ReviewVista brand blue */
  --accent-2: #f59e0b;     /* amber (stars / neutral) */
  --green: #16a34a;
  --red: #e11d48;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 4px 6px -1px rgba(16, 24, 40, 0.06), 0 10px 20px -4px rgba(16, 24, 40, 0.10);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 24px; background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(8px); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}
.topbar .brand { font-weight: 700; font-size: 18px; color: var(--text); }
.topbar nav { display: flex; gap: 18px; align-items: center; }
.topbar nav a { color: var(--muted); }
.topbar nav a:hover { color: var(--text); text-decoration: none; }
.inline { display: inline; margin: 0; }
.link-btn { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 1em; }
.link-btn:hover { color: var(--text); }

.container { max-width: 960px; margin: 0 auto; padding: 32px 24px; }
.footer { text-align: center; color: var(--muted); padding: 32px; font-size: 13px; }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.card h2, .card h3 { margin-top: 0; }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 720px) { .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; } }

label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 4px; }
input, select {
  width: 100%; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
}
input:focus, select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(10, 92, 184, 0.18);
}

.btn {
  display: inline-block; background: var(--accent); color: #fff; border: 1px solid transparent;
  padding: 11px 18px; border-radius: 10px; font-weight: 600; cursor: pointer; font-size: 15px;
  box-shadow: var(--shadow);
}
.btn:hover { filter: brightness(1.06); text-decoration: none; box-shadow: var(--shadow-lg); }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-ghost { background: var(--surface); border: 1px solid var(--border); color: var(--text); box-shadow: none; }
.btn-ghost:hover { background: var(--surface-2); filter: none; box-shadow: none; }
.btn-block { display: block; width: 100%; text-align: center; }

/* Landing logo: rolls in from the left and settles centered below the nav */
.logo-roll-wrap { display: flex; justify-content: center; margin: 8px 0 8px; overflow: hidden; }
.logo-roll {
  max-width: min(360px, 70vw); height: auto;
  animation: logo-roll-in 1s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes logo-roll-in {
  from { transform: translateX(-120vw) rotate(-720deg); opacity: 0; }
  to   { transform: translateX(0) rotate(0deg); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .logo-roll { animation: none; }
}

.auth-wrap { max-width: 420px; margin: 40px auto; }
.auth-wrap h1 { text-align: center; }
.muted { color: var(--muted); }
.center { text-align: center; }

.alert { padding: 12px 14px; border-radius: 10px; margin: 12px 0; font-size: 14px; }
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #b42318; }
.alert-ok { background: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d; }

.captcha-box { display: flex; gap: 12px; align-items: flex-end; }
.captcha-box img { border-radius: 8px; border: 1px solid var(--border); }

.stat { background: var(--surface-2); border-radius: var(--radius); padding: 20px; }
.stat .num { font-size: 30px; font-weight: 700; }
.stat .label { color: var(--muted); font-size: 13px; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 14px; }
th { color: var(--muted); font-weight: 600; }

.badge { padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-green { background: #ecfdf3; color: #067647; }
.badge-gray { background: var(--surface-2); color: var(--muted); }
.badge-red { background: #fef3f2; color: #b42318; }

.review { border-bottom: 1px solid var(--border); padding: 14px 0; }
.review:last-child { border-bottom: none; }
.review .head { display: flex; justify-content: space-between; align-items: center; }
.review .author { font-weight: 600; }
.stars { color: var(--accent-2); letter-spacing: 2px; }
.review .date { color: var(--muted); font-size: 12px; }

.plan { border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; text-align: center; }
.plan.featured { border-color: var(--accent); }
.plan .price { font-size: 34px; font-weight: 800; margin: 8px 0; }
.plan .price span { font-size: 14px; color: var(--muted); }
.plan ul { list-style: none; padding: 0; color: var(--muted); text-align: left; }
.plan li::before { content: "✓ "; color: var(--green); }

.spinner { display: none; }
.htmx-request .spinner { display: inline; }
.htmx-request.spinner { display: inline; }
.place-row { display: flex; justify-content: space-between; align-items: center; padding: 12px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; }

.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 16px; flex-wrap: wrap; }
.tab {
  background: transparent; border: none; border-bottom: 2px solid transparent;
  color: var(--muted); cursor: pointer; font-size: 15px; font-weight: 600;
  padding: 10px 14px; margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }
.tab.tab-pos.active { border-bottom-color: var(--green); }
.tab.tab-neu.active { border-bottom-color: var(--accent-2); }
.tab.tab-neg.active { border-bottom-color: var(--red); }
.tab-count {
  display: inline-block; min-width: 20px; padding: 1px 7px; margin-left: 4px;
  border-radius: 999px; background: var(--surface-2); color: var(--muted);
  font-size: 12px; font-weight: 600;
}

/* Source switch: a segmented control, visually distinct from sentiment tabs */
.source-switch { display: flex; align-items: center; gap: 8px; margin: 4px 0 20px; }
.source-label { color: var(--muted); font-size: 13px; font-weight: 600; }
.seg {
  padding: 7px 16px; border: 1px solid var(--border); border-radius: 999px;
  color: var(--muted); font-weight: 600; font-size: 14px;
}
.seg:hover { color: var(--text); text-decoration: none; }
.seg.active { background: var(--accent); color: #fff; border-color: var(--accent); }
