﻿/* Global loader styles (inserted) */
.global-loader {
  position: fixed;
  inset: 0;
  display: none; /* hidden by default */
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.35);
  z-index: 9999;
}
.global-loader.show {
  display: flex;
}
.global-loader .spinner {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 6px solid rgba(255,255,255,0.2);
  border-top-color: #fff;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

:root { --bg: #fbfbfd; --card-bg: #f6f6f8; --muted: #6b6b6b; --accent: #ef6b63; /* coral */ --primary: #372b84; /* roxo escuro */ --white: #fff; --shadow-1: 0 8px 18px rgba(32,30,55,0.06); --shadow-2: 0 6px 14px rgba(32,30,55,0.05); --pill-bg: #fff; font-family: 'Poppins', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial; --bg: #fafafb; --card-bg: #f7f7f9; --accent: #ef6b63; /* coral */ --purple: #372b84; --muted: #6b6b6b; --white: #ffffff; --shadow: 0 18px 40px rgba(39,34,88,0.06); font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial; --radius-card: 28px; }

* { box-sizing: border-box }
html, body { height: 100% }
body { margin: 0; background: linear-gradient(180deg,var(--bg),#ffffff 60%); color: #222; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; line-height: 1.45; }
.site-header { padding: 28px 32px; background: transparent; }
.header-inner { max-width: 1160px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { align-items: center; gap: 12px }
.logo-mark { width: 64px; height: 64px; border-radius: 8px; background: linear-gradient(135deg,#6c63ff,#ff7a18); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; box-shadow: var(--shadow-1); font-size: 18px; }
.brand-text h1 { margin: 0; font-weight: 800; font-size: 28px; color: var(--primary) }
.brand-text h1 span { color: var(--accent); font-weight: 700; margin-left: 6px }
.back-btn { float: right; background: var(--accent); color: white; padding: 10px 16px; border-radius: 10px; text-decoration: none; display: inline-flex; gap: 10px; align-items: center; font-weight: 600; box-shadow: var(--shadow-1); }
.texto-logo { display: block; width: 100%; }
.container { max-width: 1160px; margin: 10px auto 60px; padding: 0 20px }
.hero { display: flex; gap: 24px; align-items: center; margin: 12px 0 28px }
.hero-left { flex: 0 0 420px }
.hero-illustration { width: 100%; height: auto; display: block; border-radius: 12px; box-shadow: var(--shadow-1) }
.hero-right { flex: 1; padding-right: 10px }
.hero-right h2 { font-size: 18px; color: #222; margin: 8px 0 10px; font-weight: 600 }
.hero-right .lead { color: #333; max-width: 600px; margin: 0; font-size: 15px }
.form-area { display: flex; gap: 18px; align-items: flex-start; position: relative }
.side-pill { width: 76px; background: var(--pill-bg); border-radius: 36px; padding: 18px 8px; display: flex; flex-direction: column; gap: 18px; align-items: center; box-shadow: var(--shadow-2); margin-top: 32px; flex-shrink: 0; }
.side-pill button { padding: 40px 0; }
.pill-btn { width: 46px; height: 46px; border-radius: 50%; border: 0; background: transparent; display: flex; align-items: center; justify-content: center; transition: all .18s ease; cursor: pointer; box-shadow: none; }
.pill-btn img { opacity: 0.9; width: 40px; }
.pill-btn.active { background: linear-gradient(180deg, #fff, #fff); box-shadow: 0 6px 20px rgba(17,17,50,0.08), inset 0 2px 0 rgba(255,255,255,0.6); border-radius: 50%; width: 70px; height: 70px; }
.card { flex: 1; background: var(--card-bg); border-radius: 34px; padding: 28px 40px 40px; box-shadow: 0 18px 40px rgba(39,34,88,0.06); margin-top: 8px; }
.card-header { display: flex; align-items: center; gap: 18px; margin-bottom: 12px }
.circle-icon { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(180deg,#fff,#fff); display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 18px rgba(32,30,55,0.06); }
.card-header h3 { margin: 0; color: var(--accent); font-size: 28px; font-weight: 800 }
.data-form { margin-top: 10px }
.row { display: flex; gap: 24px; margin-bottom: 20px }
.row.single { gap: 0 }
.field { display: flex; flex-direction: column; flex: 1 }
.field.full { flex: 1 }
.label { display: block; color: var(--primary); font-weight: 700; margin-bottom: 10px; font-size: 14px }
input[type="text"] { height: 48px; padding: 12px 16px; border-radius: 10px; border: 1px; border-color: #FFF; background: #fff; box-shadow: 0 6px 14px rgba(33,30,60,0.05); font-size: 14px; color: #444; outline: none; }
.input-with-icon { display: flex; align-items: center; gap: 8px }
.input-with-icon .icon-btn { background: transparent; border: 0; padding: 8px; border-radius: 8px; margin-left: auto; cursor: pointer; }
.field.full input { height: 52px }
.form-actions { margin-top: 18px }
.primary { background: var(--primary); color: #fff; padding: 12px 22px; border-radius: 10px; border: 0; font-weight: 600; cursor: pointer; box-shadow: 0 8px 18px rgba(55,43,132,0.18); }
.section-heading { margin: 0 0 12px; color: var(--purple); font-weight: 700; font-size: 18px; padding: 25px 0; }
.toggle-group { display: flex; gap: 12px; margin-bottom: 12px }
.toggle-btn { background: transparent; border: 1px solid rgba(55,43,132,0.12); padding: 20px 30px; border-radius: 8px; cursor: pointer; color: var(--purple); font-weight: 600; font-size: 14px; }
.toggle-btn.active { background: var(--purple); color: #fff; border-color: transparent; box-shadow: 0 10px 18px rgba(55,43,132,0.12); }
.muted-note { margin: 6px 0 0; color: #222; font-size: 14px; max-width: 780px; line-height: 1.45; font-weight: 700; padding: 15px; }
.section-main { display: flex; gap: 28px; margin-top: 6px; align-items: flex-start; }
.left-col { flex: 1; min-width: 300px }
.period-text { font-size: 18px; color: #333; margin: 6px 0 18px; display: flex; align-items: center; gap: 10px }
.highlight { color: var(--accent); font-weight: 800 }
.info-btn { background: var(--purple); color: #fff; border: 0; width: 24px; height: 24px; border-radius: 50%; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; cursor: pointer; }
.q-title { color: var(--purple); font-weight: 700; margin: 0 0 12px }
.percent-options { display: flex; gap: 28px; align-items: center; margin-bottom: 22px }
.radio { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-size: 15px; color: #444 }
.radio input { display: none }
.radio-custom { width: 14px; height: 14px; border-radius: 50%; border: 6px solid #e6e6e6; /* ring look */ box-shadow: 10px 10px 0 rgba(200,200,200,0.08); display: inline-block; position: relative; }
.radio input:checked + .radio-custom { border-color: var(--purple); background: var(--purple); box-shadow: 0 6px 18px rgba(55,43,132,0.12); }
.radio-label { min-width: 40px; display: inline-block }

.actions { display: flex; gap: 14px; margin-top: 8px }
.btn-back { background: #bdbdbd; color: #fff; border: 0; padding: 12px 18px; border-radius: 8px; cursor: pointer; font-weight: 600; }
.btn-next { background: var(--purple); color: #fff; border: 0; padding: 12px 18px; border-radius: 8px; cursor: pointer; font-weight: 600; box-shadow: 0 12px 28px rgba(55,43,132,0.16); }

.right-col { width: 380px; display: flex; flex-direction: column; gap: 14px }
.right-col .line-one { width: 380px; display: flex; gap: 14px; justify-content: space-between; }
.right-col .line-one div { width: 100%; }
.summary { background: var(--purple); color: #fff; border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; justify-content: space-between; min-height: 58px; box-shadow: 0 10px 20px rgba(55,43,132,0.06); }
.summary.small { background: #372b84; border-radius: 12px; display: flex; justify-content: space-between; align-items: center; padding: 12px 14px }
.summary.large { background: var(--purple); border-radius: 12px; padding: 18px 20px; text-align: center; min-height: 88px; }
.summary-title { font-size: 13px; color: #fff }
.summary-sub { font-size: 12px; color: #ddd; font-weight: 500 }
.summary-value { font-weight: 700; color: #ff7a18; font-size: 16px }
.summary-label { font-size: 14px; color: #fff; margin-bottom: 6px; font-weight: 600 }
.summary-total { font-size: 22px; color: #ff7a18; font-weight: 800; }
.percent-options { padding: 30px 0; }
.percent-options .radio-label { font-size: 20px; }

.slider-wrap { display: flex; align-items: center; gap: 18px; }

.percent { color: var(--accent); font-weight: 800; font-size: 16px; min-width: 44px; text-align: left; }
.slider-container { flex: 1; display: flex; align-items: center; }
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 10px; border-radius: 10px; background: linear-gradient(90deg, var(--purple) 5%, var(--track-bg) 5%); outline: none; padding: 0; margin: 0; }
#basica, #percentual, #esporadica { min-height: 272px; }

.grid { display: flex; gap: 24px; align-items: flex-start; margin-bottom: 18px; }
.left { flex: 1; display: flex; gap: 16px; align-items: flex-start }
.right { width: 420px; display: flex; align-items: center; justify-content: flex-end }

.donut-wrap { position: relative; width: 180px; height: 180px }
.donut-canvas { display: block; border-radius: 50% }
.donut-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); pointer-events: none; display: flex; align-items: center; justify-content: center; }
#donutCenterLabel { display: none !important; }

.legend { display: flex; flex-direction: column; gap: 12px; flex: 1 }
.legend-item { display: flex; gap: 12px; align-items: center }
.dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; flex-shrink: 0 }
.dot-participant { background: var(--purple) }
.dot-sponsor { background: var(--accent) }
.legend-text { display: flex; flex-direction: column }
.legend-title { font-size: 13px; color: #333; font-weight: 700; }
.legend .participant .legend-title { color: var(--primary); }
.legend .sponsor .legend-title { color: var(--accent); }
.legend-value { font-size: 18px; color: var(--purple); font-weight: 800; margin-top: 4px }
.legend .participant .legend-value { font-size: 16pt; }
.legend .sponsor .legend-value { color: var(--accent); font-size: 16pt; }

.total-box { background: var(--purple); color: #fff; border-radius: 16px; padding: 26px 28px; min-width: 320px; text-align: left; box-shadow: 0 12px 30px rgba(55,43,132,0.08); }
.total-label { font-size: 16px; opacity: 0.95 }
.total-amount { font-size: 26px; font-weight: 800; margin-top: 6px; color: #fff }

.scenario { margin-top: 8px }
.scenario-title { color: var(--accent); font-weight: 700; margin: 0 0 12px }
.scenario-controls { margin-bottom: 16px }
.scenario-pill { border-radius: 8px; padding: 10px 14px; border: 2px solid var(--purple); background: transparent; color: var(--purple); font-weight: 600; cursor: pointer; }

.metrics { display: flex; gap: 18px; margin-top: 12px; flex-wrap: wrap }
.metric { background: #e9e9eb; border-radius: 10px; padding: 16px; width: calc(33.333% - 12px); min-width: 200px; }
.metric-label { font-size: 13px; color: var(--purple); font-weight: 700; margin-bottom: 10px }
.metric-value { font-size: 20px; color: var(--accent); font-weight: 800 }

.card-actions { display: flex; gap: 14px; margin-top: 22px }
.btn { border: 0; padding: 12px 18px; border-radius: 8px; cursor: pointer; font-weight: 700 }
.btn-secondary { background: #bdbdbd; color: #fff }
.btn-primary { background: var(--purple); color: #fff; box-shadow: 0 12px 28px rgba(55,43,132,0.14) }

.explain { color: #333; margin: 8px 0 18px; max-width: 880px; line-height: 1.5 }

.summary-row { margin: 18px 0 }
.summary-box { background: var(--purple); color: #fff; padding: 18px 20px; border-radius: 12px; display: inline-block; min-width: 240px; box-shadow: 0 10px 20px rgba(55,43,132,0.06); }
.summary-small { font-size: 13px; opacity: 0.95 }
.summary-amount { font-size: 20px; color: var(--accent); font-weight: 800; margin-top: 6px }

.actions-row { display: flex; gap: 14px; margin-top: 18px }
.btn { padding: 12px 18px; border-radius: 8px; border: 0; cursor: pointer; font-weight: 700 }
.btn-secondary { background: #bdbdbd; color: #fff }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 10px 22px rgba(239,107,99,0.12) }

/* styles.css */
.card { left: 0; top: 0; width: 100%; opacity: 0; pointer-events: none; transform: translateX(100px); transition: opacity 0.3s, transform 0.3s; z-index: 0; }
.card.card-visible { opacity: 1; pointer-events: auto; transform: translateX(0); z-index: 1; }
.card.card-slide-out-left { opacity: 0; transform: translateX(-600px); transition: opacity 0.3s, transform 0.3s; z-index: 0; }
.form-area { position: relative; }

.side-pill .pill-btn.disabled { opacity: 0.5; pointer-events: none; cursor: not-allowed; }

.inscricao-header { text-align: center; margin-bottom: 30px; padding: 20px; background: linear-gradient(135deg, #372b84 0%, #5a4bb3 100%); color: white; border-radius: 10px; }
.inscricao-header h1 { font-size: 24px; margin: 0; font-weight: 700; }
.inscricao-header h2 { font-size: 18px; margin: 5px 0; color: #00d4aa; }
.inscricao-header p { margin: 10px 0; font-size: 14px; }
.logo-casanprev { position: absolute; top: 20px; right: 20px; }
.logo-casanprev img { height: 40px; }
.inscricao-form { max-width: 800px; margin: 0 auto; }
.form-section { background: white; padding: 25px; margin-bottom: 20px; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
.row { display: flex; gap: 20px; margin-bottom: 15px; }
.field { flex: 1; display: flex; flex-direction: column; }
.label { font-weight: 600; margin-bottom: 5px; color: #333; font-size: 14px; }
.field input, .field select { padding: 12px; border: 2px solid #e9e9eb; border-radius: 5px; font-size: 16px; transition: border-color 0.3s ease; }
.field input:focus, .field select:focus { outline: none; border-color: #372b84; }
.checkbox-group { margin: 20px 0; }
.checkbox { display: flex; align-items: flex-start; margin-bottom: 15px; cursor: pointer; }
.checkbox input[type=checkbox] { display: none;  }
.checkbox-custom { width: 18px; height: 18px; border: 2px solid #372b84; border-radius: 3px; margin-right: 10px; margin-top: 2px; flex-shrink: 0; }
.checkbox input:checked + .checkbox-custom { background-color: #372b84; position: relative; }
.checkbox input:checked + .checkbox-custom::after { content: '✓'; position: absolute; top: -2px; left: 2px; color: white; font-size: 12px; font-weight: bold; }
.checkbox-label { font-size: 14px; line-height: 1.4; }
.contribuicao-inputs { display: flex; align-items: center; gap: 10px; }
.contribuicao-inputs input { width: 80px; }
.contribuicao-inputs span { font-weight: 600; color: #372b84; }
.beneficiarios-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.beneficiarios-header h3 { margin: 0; flex: 1; font-size: 16px; }
.beneficiario-item { background: #f8f9fa; padding: 20px; border-radius: 8px; margin-bottom: 15px; border-left: 4px solid #372b84; }
.beneficiario-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.beneficiario-header h4 { margin: 0; color: #372b84; }
.btn-remove-beneficiario { background: #ff4757; border: none; padding: 8px; border-radius: 4px; cursor: pointer; transition: background-color 0.3s ease; }
.btn-remove-beneficiario:hover { background: #ff3838; }
.declaracao { margin-top: 20px; padding: 15px; background: #e8f4f8; border-radius: 5px; font-size: 14px; }
.form-actions { display: flex; justify-content: space-between; margin-top: 30px; gap: 20px; }
.btn { padding: 12px 30px; border: none; border-radius: 5px; font-size: 16px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; text-decoration: none; display: inline-block; text-align: center; }
.btn-secondary { background: #6c757d; color: white; }
.btn-secondary:hover { background: #5a6268; }
.btn-accent { background: linear-gradient(135deg, #00d4aa 0%, #00b894 100%); color: white; }
.btn-accent:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(0, 212, 170, 0.3); }
.text-danger { color: #ff4757; font-size: 12px; margin-top: 5px; }

.success-container { max-width: 600px; margin: 50px auto; text-align: center; padding: 40px 20px; }
.success-header { margin-bottom: 40px; }
.success-icon { margin-bottom: 20px; }
.success-icon img { width: 80px; height: 80px; }
.success-header h1 { color: #00b894; font-size: 28px; margin-bottom: 10px; font-weight: 700; }
.success-header p { font-size: 18px; color: #666; margin: 0; }
.success-content { background: white; padding: 30px; border-radius: 10px; box-shadow: 0 2px 15px rgba(0,0,0,0.1); margin-bottom: 30px; text-align: left; }
.alert { padding: 15px; border-radius: 5px; margin-bottom: 20px; }
.alert-success { background-color: #d4edda; border: 1px solid #c3e6cb; color: #155724; }
.next-steps { margin-bottom: 30px; }
.next-steps h2 { color: #372b84; font-size: 20px; margin-bottom: 15px; }
.next-steps ol { padding-left: 20px; }
.next-steps li { margin-bottom: 10px; line-height: 1.5; }
.contact-info { background: #f8f9fa; padding: 20px; border-radius: 8px; border-left: 4px solid #372b84; }
.contact-info h3 { color: #372b84; margin-bottom: 10px; font-size: 18px; }
.contact-info p { margin-bottom: 10px; }
.contact-info ul { list-style: none; padding: 0; }
.contact-info li { margin-bottom: 5px; }
.success-actions { display: flex; gap: 20px; justify-content: center; }
.btn { padding: 12px 30px; border: none; border-radius: 5px; font-size: 16px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; text-decoration: none; display: inline-block; text-align: center; }
.btn-primary { background: linear-gradient(135deg, #372b84 0%, #5a4bb3 100%); color: white; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(55, 43, 132, 0.3); }
.btn-secondary { background: #6c757d; color: white; }
.btn-secondary:hover { background: #5a6268; transform: translateY(-2px); }

.radio-group { margin-bottom: 2rem; }

.radio-label { display: block; font-weight: 600; margin-bottom: 0.5rem; color: #333; }

.radio-options { display: flex; gap: 2rem; margin-bottom: 0.5rem; }

.radio-option { display: flex; align-items: center; cursor: pointer; position: relative; }

.radio-option input[type="radio"] { position: absolute; opacity: 0; cursor: pointer; }

.radio-custom { height: 20px; width: 20px; background-color: #fff; border: 2px solid #ddd; border-radius: 50%; margin-right: 0.5rem; transition: all 0.2s ease; position: relative; }

.radio-option input[type="radio"]:checked ~ .radio-custom { background-color: #007bff; border-color: #007bff; }

.radio-custom::after { content: ""; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 8px; height: 8px; border-radius: 50%; background-color: white; opacity: 0; transition: opacity 0.2s ease; }

.radio-option input[type="radio"]:checked ~ .radio-custom::after { opacity: 1; }

.radio-text { font-weight: 500; color: #555; }

.radio-option:hover .radio-custom { border-color: #007bff; }
.help-icon { position: relative; display: inline-block; cursor: help; vertical-align: middle; margin-left: 5px; }

.help-icon .tooltip-text { display: none; position: absolute; background-color: #333; color: #fff; padding: 10px 15px; border-radius: 6px; font-size: 0.875rem; line-height: 1.4; width: 300px; bottom: 100%; left: 50%; transform: translateX(-50%); margin-bottom: 8px; z-index: 1000; box-shadow: 0 2px 8px rgba(0,0,0,0.2); text-align: left; }

.help-icon .tooltip-text::after { content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border-width: 6px; border-style: solid; border-color: #333 transparent transparent transparent; }

@media (max-width: 700px) {
    .back-btn { float: none; }
    .header-inner { flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 0 8px; }
    .brand { width: 100%; margin: 0 auto 8px auto; display: flex; flex-direction: column; align-items: center; }
    .brand img { max-width: 160px; height: auto; }
    .texto-logo { font-size: 1rem; padding: 0 6px; text-align: center; }
    .toggle-group { display: contents; }
    .grid { display: contents; }
    .left { display: contents; }
    .right { width: 100%; }
}
