/* SurveyHub theme */
:root {
  --sh-primary: #4f46e5;
  --sh-primary-dark: #3730a3;
  --sh-accent: #10b981;
  --sh-bg: #f5f7fb;
  --sh-text: #1f2937;
  --sh-muted: #6b7280;
  --sh-card-radius: 14px;
  --bs-primary: #4f46e5;
  --bs-primary-rgb: 79, 70, 229;
  --bs-link-color: #4f46e5;
  --bs-link-color-rgb: 79, 70, 229;
  --bs-link-hover-color: #3730a3;
}
body { background: var(--sh-bg); color: var(--sh-text); font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.btn-primary { --bs-btn-bg: var(--sh-primary); --bs-btn-border-color: var(--sh-primary); --bs-btn-hover-bg: var(--sh-primary-dark); --bs-btn-hover-border-color: var(--sh-primary-dark); --bs-btn-active-bg: var(--sh-primary-dark); --bs-btn-disabled-bg: var(--sh-primary); --bs-btn-disabled-border-color: var(--sh-primary); }
.btn-outline-primary { --bs-btn-color: var(--sh-primary); --bs-btn-border-color: var(--sh-primary); --bs-btn-hover-bg: var(--sh-primary); --bs-btn-hover-border-color: var(--sh-primary); }
.text-primary { color: var(--sh-primary) !important; }
.bg-primary { background-color: var(--sh-primary) !important; }
.card { border: 0; border-radius: var(--sh-card-radius); box-shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04); }
.card-header { background: transparent; border-bottom: 1px solid #eef0f4; font-weight: 600; }
.table > :not(caption) > * > * { padding: .65rem .75rem; }
.table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--sh-muted); font-weight: 600; background: #fafbfd; }
.form-control, .form-select { border-radius: 10px; }
.btn { border-radius: 10px; }

/* ---------- Public site ---------- */
.site-nav { background: #fff; box-shadow: 0 1px 0 #eef0f4; }
.brand { font-weight: 800; letter-spacing: -.02em; color: var(--sh-primary) !important; font-size: 1.35rem; }
.brand i { color: var(--sh-accent); }
.hero { background: radial-gradient(1200px 500px at 10% -10%, #e0e7ff 0, transparent 60%), radial-gradient(900px 400px at 100% 0, #d1fae5 0, transparent 55%), #fff; padding: 5rem 0 4rem; }
.hero h1 { font-weight: 800; letter-spacing: -.03em; font-size: clamp(2rem, 5vw, 3.3rem); }
.hero .lead { color: var(--sh-muted); }
.hero-card { background: linear-gradient(135deg, var(--sh-primary), #7c3aed); color: #fff; border-radius: 20px; padding: 1.75rem; box-shadow: 0 25px 50px -12px rgba(79, 70, 229, .45); }
.hero-card .amount { font-size: 2.2rem; font-weight: 800; }
.feature-icon { width: 52px; height: 52px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.5rem; background: #eef2ff; color: var(--sh-primary); }
.step-num { width: 40px; height: 40px; border-radius: 50%; background: var(--sh-primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.section { padding: 4rem 0; }
.section-title { font-weight: 800; letter-spacing: -.02em; }
.site-footer { background: #111827; color: #9ca3af; padding: 3rem 0 1.5rem; }
.site-footer a { color: #d1d5db; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.legal h2 { font-size: 1.2rem; margin-top: 1.75rem; font-weight: 700; }
.auth-wrap { min-height: calc(100vh - 70px); display: flex; align-items: center; padding: 2rem 0; }
.auth-card { max-width: 440px; width: 100%; margin: 0 auto; }

/* ---------- App shell ---------- */
.app-layout { display: flex; min-height: 100vh; }
.app-sidebar { width: 250px; background: #111827; color: #cbd5e1; position: fixed; top: 0; bottom: 0; left: 0; z-index: 1040; transition: transform .2s ease; overflow-y: auto; }
.app-sidebar .brand { color: #fff !important; padding: 1.2rem 1.25rem; display: block; text-decoration: none; }
.app-sidebar .nav-link { color: #cbd5e1; padding: .6rem 1.25rem; border-radius: 0; display: flex; align-items: center; gap: .7rem; font-size: .95rem; }
.app-sidebar .nav-link:hover { color: #fff; background: rgba(255, 255, 255, .05); }
.app-sidebar .nav-link.active { color: #fff; background: rgba(79, 70, 229, .35); border-left: 3px solid #818cf8; }
.app-sidebar .nav-section { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #6b7280; padding: 1rem 1.25rem .3rem; }
.app-main { margin-left: 250px; flex: 1; min-width: 0; }
.app-topbar { background: #fff; height: 62px; display: flex; align-items: center; padding: 0 1rem; box-shadow: 0 1px 0 #eef0f4; position: sticky; top: 0; z-index: 1030; }
.app-content { padding: 1.25rem; }
.sidebar-backdrop { display: none; }
@media (max-width: 991.98px) {
  .app-sidebar { transform: translateX(-100%); }
  .app-sidebar.open { transform: translateX(0); }
  .app-main { margin-left: 0; }
  .sidebar-backdrop.show { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 1035; }
}
.stat-card { padding: 1.1rem 1.2rem; }
.stat-card .label { color: var(--sh-muted); font-size: .82rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.stat-card .value { font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; }
.stat-card .icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.ic-indigo { background: #eef2ff; color: #4f46e5; }
.ic-green { background: #d1fae5; color: #059669; }
.ic-amber { background: #fef3c7; color: #d97706; }
.ic-red { background: #fee2e2; color: #dc2626; }
.ic-sky { background: #e0f2fe; color: #0284c7; }
.ic-gray { background: #f3f4f6; color: #4b5563; }
.wallet-hero { background: linear-gradient(135deg, var(--sh-primary), #7c3aed); color: #fff; border-radius: var(--sh-card-radius); padding: 1.5rem; }
.wallet-hero .big { font-size: 2.2rem; font-weight: 800; }
.offerwall-frame { width: 100%; height: 78vh; min-height: 560px; border: 0; border-radius: var(--sh-card-radius); background: #fff; }
.survey-card { transition: transform .12s ease, box-shadow .12s ease; }
.survey-card:hover { transform: translateY(-2px); box-shadow: 0 10px 20px -8px rgba(16, 24, 40, .18); }
.notif-unread { border-left: 3px solid var(--sh-primary); background: #f8f9ff; }
.amount-pos { color: #059669; font-weight: 600; }
.amount-neg { color: #dc2626; font-weight: 600; }
.chat-msg { max-width: 85%; padding: .6rem .85rem; border-radius: 12px; margin-bottom: .6rem; white-space: pre-wrap; }
.chat-user { background: #eef2ff; margin-left: auto; }
.chat-admin { background: #f3f4f6; }
.risk-low { color: #059669; } .risk-mid { color: #d97706; } .risk-high { color: #dc2626; font-weight: 700; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85em; }
.cursor-pointer { cursor: pointer; }
.chart-box { position: relative; height: 300px; }
.min-w-0 { min-width: 0; }
.text-truncate-200 { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: bottom; }
.admin-section { display: none; }
.admin-section.active { display: block; }
.fs-7 { font-size: .85rem; }
@media (max-width: 575.98px) {
  .stat-card { padding: .85rem; }
  .stat-card .value { font-size: 1.15rem; white-space: nowrap; }
  .stat-card .icon { width: 34px; height: 34px; font-size: 1rem; }
  .stat-card .label { font-size: .72rem; }
  .app-content { padding: .85rem; }
}
.form-check-input:checked { background-color: var(--sh-primary); border-color: var(--sh-primary); }
.form-check-input:focus, .form-control:focus, .form-select:focus { border-color: #a5b4fc; box-shadow: 0 0 0 .2rem rgba(79, 70, 229, .15); }
.nav-pills .nav-link.active { background-color: var(--sh-primary); }
.nav-pills .nav-link { color: var(--sh-primary); }
.pagination { --bs-pagination-color: var(--sh-primary); }
