/* ============================================================
   Or.TOP Business — Design System
   Shared across all pages in sistema_de_pesquisa/
   ============================================================ */

:root {
  --color-primary:      #080E17;
  --color-secondary:    #001B48;
  --color-accent:       #8c612e;
  --color-accent-light: #b8845a;
  --color-accent-gold:  #c9a96e;
  --color-text:         #e2ddd4;
  --color-text-muted:   rgba(226,221,212,0.55);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background-color: var(--color-primary);
  color: var(--color-text);
  font-family: 'Raleway', sans-serif;
  font-weight: 400;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Grain texture overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.04;
  pointer-events: none;
  z-index: 9999;
}

/* ── Typography ─────────────────────────────────────── */
.font-display { font-family: 'Cormorant Garamond', Georgia, serif; }

.text-gold {
  background: linear-gradient(135deg, #8c612e 0%, #c9a96e 45%, #a57a3a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-val {
  font-family: 'Cormorant Garamond', serif;
  background: linear-gradient(135deg, #8c612e, #c9a96e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Buttons ─────────────────────────────────────────── */
.btn-gold {
  display: inline-block;
  background: linear-gradient(135deg, #6b4a22, #8c612e, #c9a96e, #8c612e, #6b4a22);
  background-size: 300% auto;
  color: #fff;
  font-family: 'Raleway', sans-serif;
  font-weight: 600;
  letter-spacing: 0.1em;
  font-size: 13px;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: background-position 0.6s ease, transform 0.25s ease, box-shadow 0.3s ease;
}
.btn-gold:hover {
  background-position: right center;
  transform: translateY(-3px);
  box-shadow: 0 18px 48px rgba(140,97,46,0.38);
}
.btn-gold:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-outline {
  display: inline-block;
  border: 1px solid rgba(140,97,46,0.45);
  color: #c9a96e;
  font-family: 'Raleway', sans-serif;
  font-weight: 500;
  letter-spacing: 0.12em;
  font-size: 11px;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  transition: all 0.3s ease;
}
.btn-outline:hover {
  background: rgba(140,97,46,0.1);
  border-color: #c9a96e;
  box-shadow: 0 0 30px rgba(140,97,46,0.15);
}

/* ── Section tag ─────────────────────────────────────── */
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #c9a96e;
}
.section-tag::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: #8c612e;
}

/* ── Divider ─────────────────────────────────────────── */
.divider {
  display: flex;
  align-items: center;
  gap: 14px;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(140,97,46,0.35), transparent);
}
.divider-diamond {
  width: 7px;
  height: 7px;
  background: #8c612e;
  transform: rotate(45deg);
  flex-shrink: 0;
}

/* ── Reveal animations ───────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.9s cubic-bezier(0.25,0.46,0.45,0.94),
              transform 0.9s cubic-bezier(0.25,0.46,0.45,0.94);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }
.reveal-d4 { transition-delay: 0.4s; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Cards ───────────────────────────────────────────── */
.feature-card {
  background: rgba(0,27,72,0.14);
  border: 1px solid rgba(140,97,46,0.12);
  transition: background 0.3s ease, border-color 0.3s ease,
              transform 0.3s ease, box-shadow 0.3s ease;
}
.feature-card:hover {
  background: rgba(0,27,72,0.35);
  border-color: rgba(140,97,46,0.38);
  transform: translateY(-5px);
  box-shadow: 0 22px 48px rgba(0,0,0,0.28), 0 0 40px rgba(140,97,46,0.05);
}

.mls-card {
  background: rgba(0,27,72,0.18);
  border: 1px solid rgba(140,97,46,0.14);
  transition: border-color 0.3s ease, background 0.3s ease;
}
.mls-card:hover {
  border-color: rgba(140,97,46,0.38);
  background: rgba(0,27,72,0.32);
}

.testimonial-card {
  background: rgba(0,27,72,0.2);
  border: 1px solid rgba(140,97,46,0.14);
  position: relative;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.testimonial-card:hover {
  border-color: rgba(140,97,46,0.34);
  background: rgba(0,27,72,0.32);
}

/* ── Hover underline ─────────────────────────────────── */
.u-line {
  position: relative;
  display: inline-block;
}
.u-line::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: #c9a96e;
  transition: width 0.3s ease;
}
.u-line:hover::after { width: 100%; }

/* ── Blockquote ──────────────────────────────────────── */
.bq {
  border-left: 2px solid rgba(140,97,46,0.5);
  padding-left: 24px;
}

/* ── Animations ──────────────────────────────────────── */
@keyframes pulse-glow {
  0%,100% { box-shadow: 0 0 0 0 rgba(140,97,46,0.35); }
  50%      { box-shadow: 0 0 0 14px rgba(140,97,46,0); }
}
.pulse-cta { animation: pulse-glow 3s ease infinite; }

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}

/* ── Input / Form base ───────────────────────────────── */
.input-field {
  width: 100%;
  background: rgba(0,27,72,0.22);
  border: 1px solid rgba(140,97,46,0.22);
  color: var(--color-text);
  font-family: 'Raleway', sans-serif;
  font-size: 16px;
  font-weight: 400;
  padding: 14px 18px;
  outline: none;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.input-field::placeholder { color: rgba(226,221,212,0.3); }
.input-field:focus {
  border-color: rgba(140,97,46,0.6);
  background: rgba(0,27,72,0.32);
}

textarea.input-field { resize: vertical; min-height: 100px; }

/* ── Admin top bar ───────────────────────────────────── */
.admin-topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(8,14,23,0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(140,97,46,0.15);
}

/* ── Toggle switch ───────────────────────────────────── */
.toggle-wrap { display: flex; align-items: center; gap: 10px; }
.toggle-input { display: none; }
.toggle-label {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  cursor: pointer;
}
.toggle-label::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(140,97,46,0.2);
  border: 1px solid rgba(140,97,46,0.3);
  border-radius: 99px;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.toggle-label::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 14px; height: 14px;
  background: rgba(140,97,46,0.5);
  border-radius: 50%;
  transition: transform 0.3s ease, background 0.3s ease;
}
.toggle-input:checked + .toggle-label::before {
  background: rgba(140,97,46,0.35);
  border-color: #8c612e;
}
.toggle-input:checked + .toggle-label::after {
  transform: translateX(18px);
  background: #c9a96e;
}

/* ── Status badge ────────────────────────────────────── */
.badge {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 2px;
  font-family: 'Raleway', sans-serif;
  font-weight: 600;
}
.badge-active {
  background: rgba(140,97,46,0.15);
  color: #c9a96e;
  border: 1px solid rgba(140,97,46,0.3);
}
.badge-inactive {
  background: rgba(255,255,255,0.04);
  color: rgba(226,221,212,0.35);
  border: 1px solid rgba(255,255,255,0.08);
}
.badge-type {
  background: rgba(0,27,72,0.4);
  color: rgba(201,169,110,0.7);
  border: 1px solid rgba(140,97,46,0.2);
}

/* ── Survey step option boxes ────────────────────────── */
.option-box {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border: 1px solid rgba(140,97,46,0.25);
  background: rgba(0,27,72,0.12);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  user-select: none;
}
.option-box:hover {
  background: rgba(0,27,72,0.28);
  border-color: rgba(140,97,46,0.5);
}
.option-box.selected {
  background: rgba(140,97,46,0.12);
  border-color: #c9a96e;
}
.option-letter {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(140,97,46,0.4);
  color: #c9a96e;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.option-box.selected .option-letter {
  background: rgba(140,97,46,0.25);
  border-color: #c9a96e;
}

/* ── Scale circles ───────────────────────────────────── */
.scale-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(140,97,46,0.3);
  background: rgba(0,27,72,0.15);
  color: rgba(226,221,212,0.7);
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.scale-btn:hover {
  border-color: rgba(140,97,46,0.6);
  background: rgba(140,97,46,0.1);
  color: #c9a96e;
}
.scale-btn.selected {
  border-color: #c9a96e;
  background: rgba(140,97,46,0.2);
  color: #c9a96e;
  box-shadow: 0 0 0 3px rgba(140,97,46,0.15);
}

/* ── Progress bar ────────────────────────────────────── */
.progress-bar-track {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 3px;
  background: rgba(255,255,255,0.06);
  z-index: 100;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #8c612e, #c9a96e);
  transition: width 0.4s ease;
}

/* ── Loading skeleton ────────────────────────────────── */
.skeleton-bar {
  height: 3px;
  background: linear-gradient(90deg, rgba(140,97,46,0.1) 0%, rgba(201,169,110,0.4) 50%, rgba(140,97,46,0.1) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.8s ease infinite;
}

/* ── Dialog modal ────────────────────────────────────── */
dialog {
  background: #0d1724;
  border: 1px solid rgba(140,97,46,0.25);
  color: var(--color-text);
  padding: 0;
  max-width: 560px;
  width: 90%;
  outline: none;
}
dialog::backdrop {
  background: rgba(8,14,23,0.88);
  backdrop-filter: blur(4px);
}

/* ── Pagination ──────────────────────────────────────── */
.page-btn {
  padding: 8px 16px;
  border: 1px solid rgba(140,97,46,0.2);
  background: transparent;
  color: rgba(201,169,110,0.6);
  font-family: 'Raleway', sans-serif;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.page-btn:hover, .page-btn.active {
  background: rgba(140,97,46,0.12);
  border-color: rgba(140,97,46,0.4);
  color: #c9a96e;
}
.page-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ── Table ───────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(140,97,46,0.7);
  font-weight: 600;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(140,97,46,0.15);
  text-align: left;
}
.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 13px;
  color: rgba(226,221,212,0.75);
}
.data-table tr:hover td { background: rgba(0,27,72,0.15); }

/* ── Drag handle ─────────────────────────────────────── */
.drag-handle {
  cursor: grab;
  color: rgba(140,97,46,0.35);
  flex-shrink: 0;
  padding: 4px;
}
.drag-handle:active { cursor: grabbing; }

/* ── Tabs ────────────────────────────────────────────── */
.tab-btn {
  padding: 12px 24px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-family: 'Raleway', sans-serif;
  font-weight: 500;
  color: rgba(226,221,212,0.4);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.tab-btn:hover { color: rgba(201,169,110,0.7); }
.tab-btn.active {
  color: #c9a96e;
  border-bottom-color: #8c612e;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Error / success messages ────────────────────────── */
.msg-error {
  color: rgba(220,80,80,0.9);
  font-size: 12px;
  letter-spacing: 0.05em;
  margin-top: 8px;
}
.msg-success {
  color: #c9a96e;
  font-size: 12px;
  letter-spacing: 0.05em;
  margin-top: 8px;
}

/* ── Char counter ────────────────────────────────────── */
.char-counter {
  font-size: 11px;
  color: rgba(226,221,212,0.25);
  text-align: right;
  margin-top: 6px;
  letter-spacing: 0.05em;
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 767px) {
  html, body { overflow-x: hidden; max-width: 100%; }
  .admin-topbar { padding: 14px 20px; }
  .scale-btn { width: 42px; height: 42px; font-size: 1.1rem; }
  .option-box { padding: 14px 16px; }
}
