/* ===================================================================
   Diagnóstico de Maturidade em Gestão — Saúde | Planos Consultoria
   Dark theme, professional, high perceived value.
=================================================================== */

:root{
  --bg: #070b14;
  --bg-soft: #0a0f1d;
  --panel: #111a2e;
  --panel-2: #141d33;
  --panel-border: rgba(255,255,255,0.08);
  --line: rgba(255,255,255,0.10);

  --blue-deep: #0b3e6e;
  --blue: #1e7fbf;
  --blue-light: #4fc3e8;
  --orange: #f2900b;
  --orange-light: #ffc24b;

  --text: #eef2f9;
  --text-dim: #a7b1c6;
  --text-faint: #6c7891;

  --ok: #35c98f;
  --warn: #ffc24b;
  --crit: #ff6161;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 20px 60px -20px rgba(0,0,0,0.6);
  --font: 'Segoe UI', 'Inter', system-ui, -apple-system, Arial, sans-serif;
}

*{box-sizing:border-box;}
html,body{height:100%;}
body{
  margin:0;
  font-family:var(--font);
  color:var(--text);
  background:
    radial-gradient(1100px 600px at 85% -10%, rgba(30,127,191,0.18), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(242,144,11,0.10), transparent 55%),
    var(--bg);
  min-height:100%;
  -webkit-font-smoothing:antialiased;
}

::selection{ background: rgba(79,195,232,0.35); }

a{ color: var(--blue-light); }

.hidden{ display:none !important; }

/* ---------- Layout shell ---------- */
#app{
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:22px 40px;
  border-bottom:1px solid var(--panel-border);
  background: rgba(7,11,20,0.7);
  backdrop-filter: blur(10px);
  position:sticky;
  top:0;
  z-index:50;
}
.brand{ display:flex; align-items:center; gap:14px; }
.brand img{ height:34px; display:block; }
.brand .tagline{
  font-size:12px;
  letter-spacing:.06em;
  color:var(--text-faint);
  border-left:1px solid var(--line);
  padding-left:14px;
  margin-left:2px;
}

.main{
  flex:1;
  display:flex;
  flex-direction:column;
  align-items:center;
  padding:48px 20px 90px;
}

.container{
  width:100%;
  max-width:920px;
}

.footer{
  text-align:center;
  padding:26px 20px;
  color:var(--text-faint);
  font-size:12.5px;
  border-top:1px solid var(--panel-border);
}

/* ---------- Cards / panels ---------- */
.card{
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border:1px solid var(--panel-border);
  border-radius:var(--radius);
  box-shadow: var(--shadow);
  padding:36px;
}

.card + .card{ margin-top:22px; }

/* ---------- Typography ---------- */
h1{ font-size:34px; line-height:1.2; margin:0 0 12px; letter-spacing:-.01em; }
h2{ font-size:24px; margin:0 0 10px; letter-spacing:-.01em; }
h3{ font-size:17px; margin:0 0 8px; color:var(--text); }
p{ color:var(--text-dim); line-height:1.65; margin:0 0 14px; }
.lead{ font-size:17px; color:var(--text-dim); }
.eyebrow{
  text-transform:uppercase;
  font-size:12px;
  letter-spacing:.14em;
  color:var(--blue-light);
  font-weight:700;
  margin-bottom:14px;
  display:inline-block;
}

.gradient-text{
  background:linear-gradient(90deg, var(--blue-light), var(--blue));
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  font-family:inherit;
  font-size:15px;
  font-weight:600;
  padding:14px 26px;
  border-radius:12px;
  border:1px solid transparent;
  cursor:pointer;
  transition:transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
  text-decoration:none;
  user-select:none;
}
.btn:active{ transform: translateY(1px); }
.btn:disabled{ opacity:.4; cursor:not-allowed; }

.btn-primary{
  color:#04101c;
  background:linear-gradient(90deg, var(--orange-light), var(--orange));
  box-shadow:0 10px 30px -8px rgba(242,144,11,0.55);
}
.btn-primary:hover:not(:disabled){ box-shadow:0 14px 36px -6px rgba(242,144,11,0.7); transform:translateY(-1px); }

.btn-secondary{
  color:var(--text);
  background:transparent;
  border-color: var(--line);
}
.btn-secondary:hover:not(:disabled){ border-color: var(--blue-light); color:var(--blue-light); }

.btn-ghost{
  color:var(--text-dim);
  background:transparent;
  border-color:transparent;
  padding:14px 10px;
}
.btn-ghost:hover{ color:var(--text); }

.btn-row{ display:flex; gap:12px; align-items:center; margin-top:28px; flex-wrap:wrap; }
.btn-row.between{ justify-content:space-between; }

/* ---------- Progress ---------- */
.progress-wrap{
  position:sticky;
  top:78px;
  z-index:40;
  padding:14px 40px 0;
  max-width:920px;
  margin:0 auto;
  width:100%;
}
.progress-track{
  height:6px;
  border-radius:6px;
  background: rgba(255,255,255,0.07);
  overflow:hidden;
}
.progress-fill{
  height:100%;
  border-radius:6px;
  background:linear-gradient(90deg, var(--blue), var(--blue-light));
  transition:width .35s ease;
}
.progress-label{
  display:flex;
  justify-content:space-between;
  font-size:12.5px;
  color:var(--text-faint);
  margin-top:8px;
}

/* ---------- Choice grids (profile / sub-filters) ---------- */
.choice-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(240px,1fr));
  gap:16px;
  margin-top:22px;
}
.choice-card{
  text-align:left;
  background: var(--panel);
  border:1px solid var(--panel-border);
  border-radius:var(--radius-sm);
  padding:20px;
  cursor:pointer;
  transition: border-color .15s ease, transform .15s ease, background .15s ease;
  color:var(--text);
  font-family:inherit;
}
.choice-card:hover{ border-color:var(--blue); transform:translateY(-2px); }
.choice-card.selected{
  border-color:var(--blue-light);
  background: linear-gradient(180deg, rgba(79,195,232,0.12), rgba(79,195,232,0.03));
  box-shadow: 0 0 0 1px var(--blue-light) inset;
}
.choice-card .ci-title{ font-weight:700; font-size:15.5px; margin-bottom:6px; }
.choice-card .ci-desc{ font-size:13px; color:var(--text-dim); line-height:1.5; }

.yn-row{ display:flex; gap:12px; margin-top:14px; flex-wrap:wrap; }
.yn-btn{
  flex:1;
  min-width:120px;
  padding:14px 16px;
  border-radius:var(--radius-sm);
  border:1px solid var(--panel-border);
  background:var(--panel);
  color:var(--text);
  cursor:pointer;
  font-weight:600;
  font-family:inherit;
  transition: all .15s ease;
}
.yn-btn:hover{ border-color:var(--blue); }
.yn-btn.selected{
  border-color:var(--blue-light);
  background:linear-gradient(180deg, rgba(79,195,232,0.16), rgba(79,195,232,0.04));
}
.subfilter-block{ margin-top:26px; padding-top:22px; border-top:1px solid var(--line); }
.subfilter-block:first-of-type{ border-top:none; padding-top:0; margin-top:22px; }

/* ---------- Question screen ---------- */
.dim-tag{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:12px;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--blue-light);
  background: rgba(30,127,191,0.14);
  border:1px solid rgba(79,195,232,0.25);
  padding:6px 12px;
  border-radius:100px;
  margin-bottom:18px;
}
.q-count{ color:var(--text-faint); font-weight:500; letter-spacing:normal; text-transform:none; }

.question-block{ margin-bottom:34px; }
.question-block:last-child{ margin-bottom:0; }
.q-text{ font-size:18px; font-weight:600; color:var(--text); margin-bottom:16px; line-height:1.5; }
.q-weight{
  font-size:10.5px;
  color:var(--text-faint);
  font-weight:600;
  letter-spacing:.05em;
  margin-left:8px;
  vertical-align:middle;
  text-transform:uppercase;
}

.opt{
  display:flex;
  gap:14px;
  align-items:flex-start;
  padding:14px 16px;
  border-radius:var(--radius-sm);
  border:1px solid var(--panel-border);
  background:var(--panel);
  cursor:pointer;
  margin-bottom:10px;
  transition: border-color .15s ease, background .15s ease;
}
.opt:hover{ border-color: rgba(79,195,232,0.4); }
.opt.selected{
  border-color:var(--blue-light);
  background:linear-gradient(180deg, rgba(79,195,232,0.13), rgba(79,195,232,0.03));
}
.opt .opt-letter{
  flex:0 0 30px;
  height:30px;
  border-radius:8px;
  background: rgba(255,255,255,0.06);
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
  font-size:13px;
  color:var(--text-dim);
}
.opt.selected .opt-letter{
  background:linear-gradient(135deg, var(--blue-light), var(--blue));
  color:#04101c;
}
.opt .opt-text{ font-size:14.5px; color:var(--text-dim); line-height:1.5; padding-top:4px;}
.opt.selected .opt-text{ color:var(--text); }

/* ---------- Lead form ---------- */
.field{ margin-bottom:18px; }
.field label{
  display:block;
  font-size:13px;
  font-weight:600;
  color:var(--text-dim);
  margin-bottom:8px;
}
.field input, .field select{
  width:100%;
  padding:13px 14px;
  border-radius:var(--radius-sm);
  border:1px solid var(--panel-border);
  background: var(--bg-soft);
  color:var(--text);
  font-family:inherit;
  font-size:14.5px;
  transition:border-color .15s ease;
}
.field input:focus, .field select:focus{
  outline:none;
  border-color:var(--blue-light);
}
.field-row{ display:grid; grid-template-columns:1fr 1fr; gap:16px; }
@media (max-width:640px){ .field-row{ grid-template-columns:1fr; } }

/* ---------- Report ---------- */
.report-hero{ text-align:center; padding:44px 36px; }
.score-ring-wrap{ display:flex; justify-content:center; margin:14px 0 22px; }
.score-value{ font-size:56px; font-weight:800; }
.concept-badge{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:8px 20px;
  border-radius:100px;
  font-weight:700;
  font-size:14px;
  letter-spacing:.02em;
  margin-top:10px;
}
.concept-1{ background:rgba(255,97,97,0.14); color:#ff8a8a; border:1px solid rgba(255,97,97,0.35); }
.concept-2{ background:rgba(242,144,11,0.14); color:var(--orange-light); border:1px solid rgba(242,144,11,0.35); }
.concept-3{ background:rgba(255,194,75,0.14); color:#ffd77a; border:1px solid rgba(255,194,75,0.35); }
.concept-4{ background:rgba(53,201,143,0.14); color:#6fe3b6; border:1px solid rgba(53,201,143,0.35); }
.concept-5{ background:rgba(79,195,232,0.14); color:var(--blue-light); border:1px solid rgba(79,195,232,0.35); }

.section-title{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:18px;
}
.section-title .num{
  flex:0 0 34px; height:34px; border-radius:9px;
  background:linear-gradient(135deg, var(--blue-light), var(--blue));
  color:#04101c; font-weight:800; font-size:14px;
  display:flex; align-items:center; justify-content:center;
}

.alert-block{
  border-radius:var(--radius-sm);
  padding:20px 22px;
  border:1px solid rgba(255,194,75,0.35);
  background:rgba(255,194,75,0.08);
  margin-bottom:18px;
}
.alert-block.crit{
  border-color: rgba(255,97,97,0.4);
  background: rgba(255,97,97,0.08);
}
.alert-block h3{ margin-bottom:8px; }
.alert-block p{ color:var(--text); margin-bottom:0; }

.radar-wrap{ display:flex; justify-content:center; margin:10px 0 6px; }

.dim-row{
  display:grid;
  grid-template-columns: 190px 1fr 60px;
  align-items:center;
  gap:16px;
  padding:12px 0;
  border-bottom:1px solid var(--line);
}
.dim-row:last-child{ border-bottom:none; }
.dim-row .dim-name{ font-size:13.5px; font-weight:600; color:var(--text); }
.dim-row .dim-bar-track{ height:9px; border-radius:6px; background:rgba(255,255,255,0.07); overflow:hidden; }
.dim-row .dim-bar-fill{ height:100%; border-radius:6px; }
.dim-row .dim-score{ text-align:right; font-weight:700; font-size:14px; }

.dim-detail{
  border-top:1px solid var(--line);
  padding-top:20px;
  margin-top:6px;
}
.dim-detail-item{ margin-bottom:22px; }
.dim-detail-item:last-child{ margin-bottom:0; }
.dim-detail-head{ display:flex; align-items:center; gap:10px; margin-bottom:8px; flex-wrap:wrap; }
.dim-detail-head .badge-score{
  font-size:12px; font-weight:800; padding:3px 10px; border-radius:100px;
}

.priority-card{
  border:1px solid var(--panel-border);
  border-radius:var(--radius-sm);
  padding:20px 22px;
  margin-bottom:14px;
  background: var(--panel);
  position:relative;
}
.priority-rank{
  position:absolute; top:-12px; left:20px;
  background:linear-gradient(135deg, var(--orange-light), var(--orange));
  color:#211102;
  font-weight:800;
  font-size:12px;
  padding:4px 12px;
  border-radius:100px;
}

.flag-item{
  display:flex;
  gap:14px;
  padding:16px 0;
  border-bottom:1px solid var(--line);
}
.flag-item:last-child{ border-bottom:none; }
.flag-icon{ flex:0 0 auto; font-size:20px; line-height:1; }
.flag-item h3{ margin-bottom:6px; }
.flag-item p{ margin:0; }

.roadmap-phase{ margin-bottom:26px; }
.roadmap-phase h3{
  color:var(--blue-light);
  font-size:14px;
  text-transform:uppercase;
  letter-spacing:.08em;
  margin-bottom:14px;
}
.roadmap-item{
  display:flex;
  gap:14px;
  padding:12px 0;
  border-bottom:1px solid var(--line);
}
.roadmap-item:last-child{ border-bottom:none; }
.roadmap-check{
  flex:0 0 22px; height:22px; border-radius:6px;
  border:1.5px solid var(--blue-light);
  margin-top:2px;
}
.roadmap-item p{ margin:0; color:var(--text); }

.cta-block{
  text-align:center;
  padding:40px 32px;
  background: radial-gradient(600px 260px at 50% -20%, rgba(242,144,11,0.16), transparent), linear-gradient(180deg, var(--panel-2), var(--panel));
  border:1px solid rgba(242,144,11,0.25);
}
.cta-block h2{ margin-bottom:10px; }

.report-actions{ display:flex; justify-content:center; gap:14px; margin:26px 0 6px; flex-wrap:wrap;}

/* ---------- Utility ---------- */
.text-center{ text-align:center; }
.muted{ color:var(--text-faint); font-size:13px; }
.spacer-sm{ height:12px; }
.spacer{ height:26px; }

/* Print */
@media print{
  body{ background:#fff !important; color:#000; }
  .topbar, .footer, .report-actions, .progress-wrap{ display:none !important; }
  .card{ box-shadow:none; border:1px solid #ccc; background:#fff; color:#000; break-inside:avoid; }
  p, .dim-name, .q-text{ color:#111 !important; }
}

@media (max-width:640px){
  .topbar{ padding:16px 20px; }
  .main{ padding:28px 14px 60px; }
  .card{ padding:22px; }
  h1{ font-size:26px; }
  .dim-row{ grid-template-columns:1fr; gap:6px; }
  .dim-row .dim-score{ text-align:left; }
  .progress-wrap{ padding:14px 20px 0; }
}
