/* =========================================================
   Survaiable — style.css
   Whitaker Chalk–aligned, executive-grade UI system
   (No external fonts; safe for GoDaddy/cPanel)
   ========================================================= */

/* =========================
   Design Tokens
   ========================= */
:root {
  /* Brand */
  --navy: #00205B;
  --navy-dark: #001A4A;
  --navy-soft: #0b2a66;

  /* Neutrals */
  --ink: #0f172a;
  --slate: #475569;
  --muted: #64748b;
  --border: #e2e8f0;
  --bg: #f5f7fa;
  --card: #ffffff;

  /* Status */
  --error-bg: #FEF2F2;
  --error-bd: #FECACA;
  --error-tx: #7F1D1D;

  --warn-bg: #FFF7ED;
  --warn-bd: #FDBA74;
  --warn-tx: #9A3412;

  --ok-bg: #DCFCE7;
  --ok-bd: #86EFAC;
  --ok-tx: #166534;

  /* Elevation / radius */
  --shadow-sm: 0 6px 16px rgba(0,0,0,.08);
  --shadow: 0 12px 28px rgba(0,0,0,.08);
  --radius: 14px;

  /* Focus */
  --focus: rgba(0, 32, 91, .25);

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Helvetica, Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", Times, serif;

  /* Layout */
  --container: 980px;
}

/* =========================
   Base / Reset
   ========================= */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; }
a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }

/* =========================
   Typography scale
   ========================= */
h1, h2, h3, h4 {
  margin: 0 0 10px 0;
  color: var(--ink);
  letter-spacing: .2px;
}
/* Law-firm feel: serif headlines, sans body */
h1, h2, h3 { font-family: var(--font-serif); }
h1 { font-size: 2.0rem; line-height: 1.15; }
h2 { font-size: 1.45rem; line-height: 1.2; }
h3 { font-size: 1.15rem; line-height: 1.25; }
p { margin: 0 0 12px 0; color: var(--slate); }

.small { font-size: .92rem; color: var(--slate); font-weight: 600; }
.muted { color: var(--muted); }

/* =========================
   Layout helpers
   ========================= */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}
.section { padding: 24px 0; }
.stack-8 > * + * { margin-top: 8px; }
.stack-12 > * + * { margin-top: 12px; }
.stack-16 > * + * { margin-top: 16px; }

/* =========================
   Header / Top bar
   ========================= */
.site-header {
  background: var(--navy);
  color: #fff;
  padding: 22px 0;
}
.site-header .title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  letter-spacing: .3px;
  margin: 0;
}
.site-header .subtitle {
  opacity: .9;
  margin-top: 6px;
  font-weight: 650;
}

/* =========================
   Cards
   ========================= */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}
.card.flat {
  box-shadow: none;
  border: 1px solid var(--border);
}

/* =========================
   Buttons
   ========================= */
.btn {
  display: inline-block;
  border: 0;
  border-radius: 10px;
  padding: 12px 14px;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
  transition: transform .06s ease, background-color .12s ease, opacity .12s ease;
  user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-dark); }
.btn-secondary { background: #334155; color: #fff; }
.btn-secondary:hover { background: #263446; }
.btn-outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,.45);
  color: #fff;
}
.btn-outline:hover { border-color: rgba(255,255,255,.75); }
.btn-block { width: 100%; text-align: center; }

.btn.disabled, .btn[aria-disabled="true"] {
  opacity: .55;
  pointer-events: none;
  cursor: not-allowed;
}

/* =========================
   Forms
   ========================= */
label {
  display: block;
  font-weight: 800;
  font-size: .93rem;
  color: var(--ink);
  margin-bottom: 6px;
}
input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #CBD5E1;
  background: #fff;
  font-size: 15px;
  color: var(--ink);
}
input::placeholder, textarea::placeholder { color: #94a3b8; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 4px var(--focus);
}
.field { margin-bottom: 14px; }
.help { font-size: .9rem; color: var(--muted); font-weight: 650; }

/* Checkboxes/radios: preserve native but improve spacing */
input[type="checkbox"], input[type="radio"] {
  width: auto;
  margin-right: 8px;
}

/* =========================
   Alerts / Banners
   ========================= */
.alert {
  border-radius: 10px;
  padding: 12px 14px;
  font-weight: 750;
  margin: 12px 0 14px;
}
.alert-error { background: var(--error-bg); border: 1px solid var(--error-bd); color: var(--error-tx); }
.alert-warn { background: var(--warn-bg); border: 1px solid var(--warn-bd); color: var(--warn-tx); }
.alert-ok   { background: var(--ok-bg); border: 1px solid var(--ok-bd); color: var(--ok-tx); }

/* =========================
   Tables (admin/results)
   ========================= */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}
th, td {
  text-align: left;
  padding: 10px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
th {
  font-size: .9rem;
  color: var(--slate);
  font-weight: 900;
}
td {
  font-size: .95rem;
  color: var(--ink);
}

/* =========================
   Pills / tags
   ========================= */
.pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: .82rem;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink);
}
.pill.on { background: var(--ok-bg); border-color: var(--ok-bd); color: var(--ok-tx); }
.pill.off { background: var(--error-bg); border-color: var(--error-bd); color: var(--error-tx); }
.pill.gray { background: #e2e8f0; border-color: #cbd5e1; color: #0f172a; }

/* =========================
   Login Page (split layout)
   ========================= */
.login-body { background: var(--bg); }

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
}

.login-brand {
  background: var(--navy);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.login-brand::before {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.10), transparent 45%),
    radial-gradient(circle at 70% 60%, rgba(255,255,255,.08), transparent 50%),
    radial-gradient(circle at 30% 80%, rgba(255,255,255,.06), transparent 55%);
  transform: rotate(8deg);
}

.login-brand-inner {
  position: relative;
  padding: 56px 46px;
  max-width: 680px;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}
.brand-dot {
  width: 12px; height: 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
}
.brand-name {
  font-family: var(--font-serif);
  font-weight: 800;
  letter-spacing: .2px;
  font-size: 1.05rem;
}
.brand-sub {
  font-weight: 750;
  opacity: .85;
  font-size: .95rem;
  margin-top: 2px;
}

.login-title {
  margin: 0 0 10px 0;
  color: #fff;
  font-family: var(--font-serif);
  font-size: 2.2rem;
  line-height: 1.15;
  letter-spacing: .2px;
}
.login-lead {
  margin: 0 0 18px 0;
  max-width: 520px;
  font-size: 1.05rem;
  opacity: .92;
  color: rgba(255,255,255,.92);
}

.login-bullets {
  margin-top: 18px;
  display: grid;
  gap: 10px;
  max-width: 520px;
}
.bullet {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 12px;
  padding: 12px 12px;
}
.bullet-icon {
  width: 22px; height: 22px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.18);
  font-weight: 900;
}
.bullet-text {
  font-weight: 650;
  opacity: .95;
}

.login-footer-note {
  margin-top: 34px;
  font-weight: 700;
  opacity: .70;
  font-size: .92rem;
}

.login-form-wrap {
  display: grid;
  place-items: center;
  padding: 40px 18px;
}

.login-form-inner {
  width: 100%;
  max-width: 460px;
}

.login-card { padding: 26px; }

.login-card-header h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  letter-spacing: .2px;
}

.login-card-header p {
  margin: 6px 0 0 0;
  color: var(--slate);
  font-weight: 650;
}

.login-form { margin-top: 18px; }

.micro-note {
  margin-top: 10px;
  color: var(--slate);
  font-size: .92rem;
  font-weight: 650;
  line-height: 1.35;
}

.login-help {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.login-side-meta {
  margin-top: 14px;
  text-align: center;
}

/* =========================
   Responsive
   ========================= */
@media (max-width: 980px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-brand-inner { padding: 42px 22px; }
  .login-title { font-size: 1.9rem; }
  .login-form-wrap { padding: 26px 16px 46px; }
}

/* =========================
   Survey Layout (Modern Cards)
   ========================= */
.survey-wrap{ max-width: 980px; margin: 0 auto; padding: 0 16px 40px; }
.survey-top{ margin-top: 16px; }
.survey-top .card{ padding: 16px 18px; }
.survey-title{ margin: 18px 0 6px; letter-spacing: .1px; }
.survey-sub{ color: var(--slate); margin: 0 0 18px; font-weight: 650; }

form.survey-form{ max-width: 980px; margin: 0 auto; padding: 0 16px 56px; }
form.survey-form fieldset{
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  padding: 18px 18px 8px;
  margin: 18px 0;
}
form.survey-form legend{
  font-weight: 900;
  color: var(--navy);
  padding: 0 10px;
  letter-spacing: .15px;
}
form.survey-form .question{
  padding: 14px 0;
  border-top: 1px solid var(--border);
}
form.survey-form fieldset .question:first-of-type{ border-top: 0; padding-top: 4px; }
form.survey-form .question-title{
  font-weight: 850;
  color: var(--ink);
  margin: 0 0 8px;
}
form.survey-form label{
  display: block;
  margin: 8px 0;
  color: var(--ink);
  font-weight: 600;
}
form.survey-form input[type="text"],
form.survey-form input[type="number"],
form.survey-form textarea,
form.survey-form select{
  width: 100%;
  max-width: 760px;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  outline: none;
}
form.survey-form textarea{ min-height: 120px; resize: vertical; }

form.survey-form .scale-labels{ color: var(--muted); font-weight: 650; }
form.survey-form .submit-container{
  margin-top: 18px;
  padding-top: 6px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
form.survey-form .submit-container .btn{ box-shadow: var(--shadow-sm); }


/* =========================================================
   Survey Layout - Sidebar + Collapsible Cards (Modern)
   ========================================================= */
.survey-shell{
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 18px;
  max-width: 1180px;
  margin: 18px auto 40px;
  padding: 0 14px;
}

@media (max-width: 980px){
  .survey-shell{ grid-template-columns: 1fr; }
}

.survey-sidenav{
  background: var(--tenant-hero-bg, var(--navy));
  color: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: sticky;
  top: 14px;
  height: fit-content;
}

.survey-sidenav .survey-brand{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}
.survey-sidenav .survey-brand img{
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: contain;
  background: rgba(255,255,255,0.08);
  padding: 4px;
}
.survey-sidenav .survey-brand .survey-brand-name{
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 18px;
}

.survey-nav{
  display: flex;
  flex-direction: column;
  padding: 10px;
  gap: 8px;
}
.survey-nav-item{
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: center;
  text-decoration: none;
  color: rgba(255,255,255,0.92);
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
}
.survey-nav-item:hover{
  background: rgba(255,255,255,0.08);
}
.survey-nav-item.is-active{
  background: rgba(46, 134, 222, 0.35);
  border-color: rgba(46, 134, 222, 0.55);
}
.survey-nav-num{
  width: 26px;
  height: 26px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.10);
  font-weight: 800;
}
.survey-nav-label{
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
}

.survey-nav-bottom{
  padding: 14px 16px 16px;
  border-top: 1px solid rgba(255,255,255,0.10);
}
#surveyCompleteText{
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.survey-progress{
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
  overflow: hidden;
}
#surveyProgressBar{
  height: 100%;
  width: 0%;
  background: rgba(255,255,255,0.70);
  border-radius: 999px;
  transition: width 160ms ease;
}

.survey-main{ min-width: 0; } /* prevents overflow */
.survey-main .survey-wrap{ margin: 0; padding: 0; }
.survey-main .card{ box-shadow: var(--shadow-lg); border-radius: 16px; }

.survey-section{
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  margin: 16px 0;
  overflow: hidden;
}
.survey-section legend.sr-only{
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
.survey-section-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 14px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfbfc 100%);
  border-bottom: 1px solid var(--border);
}
.survey-section-title{
  font-weight: 850;
  letter-spacing: -0.02em;
}
.survey-section-toggle{
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 12px;
  width: 38px;
  height: 34px;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.survey-section-toggle .chev{
  display: inline-block;
  transform: rotate(0deg);
  transition: transform 140ms ease;
  font-size: 18px;
  line-height: 1;
}
.survey-section.is-collapsed .survey-section-body{ display: none; }
.survey-section.is-collapsed .survey-section-toggle .chev{ transform: rotate(-90deg); }

.survey-section-body{
  padding: 14px 14px;
}
.survey-section-body .question{
  padding: 10px 0;
  border-top: 1px solid rgba(0,0,0,0.05);
}
.survey-section-body .question:first-child{ border-top: 0; padding-top: 0; }

@media (max-width: 980px){
  .survey-sidenav{ position: relative; top: 0; }
}

.survey-brand-fallback{ width:28px; height:28px; border-radius:8px; background: rgba(255,255,255,0.14); }

.survey-brand-logo{ display:block; max-width: 180px; height:auto; margin: 6px auto 14px; }
