/* IMPROVED ROLE SCREEN */
.role-screen { text-align:center; padding:3rem 1rem; max-width:720px; margin:0 auto; }
.role-logo { width:72px; height:72px; margin:0 auto 1rem; background:linear-gradient(135deg,#1e3a5f 0%,#2d5280 100%); border-radius:18px; display:flex; align-items:center; justify-content:center; box-shadow:0 8px 24px rgba(30,58,95,0.25); }
.role-logo svg { width:36px; height:36px; color:white; }
.role-title { font-size:1.75rem; font-weight:800; background:linear-gradient(135deg,#1e3a5f,#1e3a5f); -webkit-background-clip:text; -webkit-text-fill-color:transparent; letter-spacing:-0.03em; margin-bottom:0.25rem; }
.role-subtitle { font-size:0.85rem; color:var(--text-secondary); margin-bottom:2rem; }
.role-instruction { font-size:0.9rem; font-weight:600; color:var(--text); margin-bottom:1.25rem; }
.role-grid { display:grid; grid-template-columns:1fr 1fr 1fr; gap:1.25rem; }
.role-card { background:white; border:2px solid var(--border); border-radius:16px; padding:2rem 1.25rem 1.75rem; cursor:pointer; transition:all 0.25s ease; text-align:center; position:relative; overflow:hidden; }
.role-card::before { content:''; position:absolute; top:0; left:0; right:0; height:4px; background:linear-gradient(90deg,var(--primary),#2d5280); opacity:0; transition:opacity 0.25s ease; }
.role-card:hover { border-color:var(--primary); box-shadow:0 8px 28px rgba(30,58,95,0.15); transform:translateY(-3px); }
.role-card:hover::before { opacity:1; }
.role-card-icon { width:56px; height:56px; margin:0 auto 0.75rem; border-radius:14px; display:flex; align-items:center; justify-content:center; font-size:1.5rem; }
.role-card:first-child .role-card-icon { background:linear-gradient(135deg,#eef2ff,#c7d2fe); color:#162d4a; }
.role-card:last-child .role-card-icon { background:linear-gradient(135deg,#f0fdf4,#bbf7d0); color:#059669; }
.role-card h3 { font-size:1rem; font-weight:700; color:var(--text); margin-bottom:0.4rem; }
.role-card p { font-size:0.75rem; color:var(--text-secondary); line-height:1.5; }
/* Card SARA Campo */
.role-card-campo { border-color:#a7f3d0; background:linear-gradient(160deg,#f0fdf4 0%,#ffffff 60%); }
.role-card-campo::before { background:linear-gradient(90deg,#059669,#10b981); opacity:1; }
.role-card-campo:hover { border-color:#059669; box-shadow:0 8px 28px rgba(37,99,235,0.18); }
.role-card-icon-campo { background:linear-gradient(135deg,#d1fae5,#6ee7b7) !important; color:#065f46 !important; }

/* PROGRESS STEPS (Relatorio flow) */
.progress-steps { display:flex; align-items:center; margin-bottom:1.5rem; }
.progress-step { display:flex; align-items:center; gap:0.5rem; flex:1; }
.progress-step:not(:last-child)::after { content:''; flex:1; height:2px; background:var(--border); margin:0 0.5rem; transition:background 0.3s ease; }
.progress-step.done:not(:last-child)::after { background:var(--green); }
.progress-dot { width:28px; height:28px; border-radius:50%; background:var(--bg); border:2px solid var(--border); display:flex; align-items:center; justify-content:center; font-size:0.7rem; font-weight:700; color:var(--text-muted); flex-shrink:0; transition:all 0.3s ease; }
.progress-step.active .progress-dot { background:var(--primary); border-color:var(--primary); color:white; box-shadow:0 2px 8px rgba(30,58,95,0.35); }
.progress-step.done .progress-dot { background:var(--green); border-color:var(--green); color:white; }
.progress-label { font-size:0.7rem; font-weight:500; color:var(--text-muted); white-space:nowrap; }
.progress-step.active .progress-label { color:var(--primary); font-weight:600; }
.progress-step.done .progress-label { color:var(--green-dark); }

/* SECTION ACCORDION */
.sec-accordion { border:1px solid var(--border); border-radius:var(--radius); margin-bottom:0.625rem; overflow:hidden; background:white; }
.sec-accordion-head { padding:0.75rem 1rem; display:flex; align-items:center; justify-content:space-between; cursor:pointer; gap:0.75rem; transition:background 0.15s ease; }
.sec-accordion-head:hover { background:var(--bg); }
.sec-accordion-head h4 { font-size:0.85rem; font-weight:600; flex:1; }
.sec-accordion-head .sec-num { font-size:0.7rem; font-weight:700; color:var(--primary); background:var(--primary-50); padding:0.2rem 0.5rem; border-radius:4px; flex-shrink:0; }
.sec-accordion-head .sec-toggle { width:24px; height:24px; display:flex; align-items:center; justify-content:center; border-radius:50%; background:var(--bg); color:var(--text-muted); font-size:0.8rem; flex-shrink:0; transition:transform 0.2s ease; }
.sec-accordion.open .sec-toggle { transform:rotate(180deg); }
.sec-accordion-body { display:none; padding:0 1rem 1rem; border-top:1px solid var(--border-light); }
.sec-accordion.open .sec-accordion-body { display:block; }
.sec-field { margin-bottom:0.75rem; }
.sec-field label { font-size:0.75rem; font-weight:600; color:var(--text-secondary); text-transform:uppercase; letter-spacing:0.04em; margin-bottom:0.25rem; display:block; }
.sec-field textarea { width:100%; padding:0.5rem 0.625rem; border:1.5px solid var(--border); border-radius:6px; font-size:0.8rem; font-family:inherit; resize:vertical; min-height:60px; background:var(--bg); transition:all 0.15s ease; }
.sec-field textarea:focus { outline:none; border-color:var(--primary); background:white; box-shadow:0 0 0 3px rgba(30,58,95,0.1); }
.perguntas-list { list-style:none; }
.perguntas-list li { padding:0.4rem 0.5rem; font-size:0.8rem; color:var(--text); background:var(--bg); border-radius:6px; margin-bottom:0.25rem; display:flex; align-items:flex-start; gap:0.4rem; }
.perguntas-list li::before { content:'Q'; font-size:0.69rem; font-weight:700; color:white; background:var(--primary); width:18px; height:18px; border-radius:4px; display:flex; align-items:center; justify-content:center; flex-shrink:0; margin-top:1px; }

/* FISC CARDS */
.fisc-card { background:white; border:1px solid var(--border); border-radius:var(--radius-lg); padding:1rem 1.25rem; margin-bottom:0.625rem; transition:all 0.15s ease; }
.fisc-card:hover { box-shadow:var(--shadow-md); border-color:var(--primary-200); }
.fisc-card-top { display:flex; align-items:flex-start; justify-content:space-between; gap:0.75rem; margin-bottom:0.5rem; }
.fisc-card-title { font-size:0.9rem; font-weight:600; color:var(--text); line-height:1.3; }
.fisc-card-meta { display:flex; flex-wrap:wrap; gap:0.4rem; align-items:center; font-size:0.75rem; color:var(--text-secondary); }
.fisc-card-meta .sep { color:var(--border); }
.fisc-card-actions { display:flex; gap:0.3rem; margin-top:0.625rem; padding-top:0.625rem; border-top:1px solid var(--border-light); }

/* IMPROVED ENRICHED PREVIEW */
.enriched-card { background:white; border:1px solid var(--border); border-radius:var(--radius-lg); padding:1.25rem; margin-bottom:0.75rem; box-shadow:var(--shadow); }
.enriched-card h5 { font-size:0.9rem; font-weight:700; color:var(--text); margin-bottom:0.75rem; display:flex; align-items:center; gap:0.4rem; }
.enriched-card h5 .badge { font-size:0.69rem; }
.enriched-field { margin-bottom:0.75rem; }
.enriched-field:last-child { margin-bottom:0; }
.enriched-field label { font-size:0.7rem; font-weight:600; color:var(--primary); text-transform:uppercase; letter-spacing:0.05em; display:block; margin-bottom:0.3rem; }
.enriched-field textarea { width:100%; padding:0.625rem; border:1.5px solid var(--border); border-radius:8px; font-size:0.82rem; font-family:inherit; min-height:80px; resize:vertical; line-height:1.5; background:var(--bg); transition:all 0.15s ease; }
.enriched-field textarea:focus { outline:none; border-color:var(--primary); background:white; box-shadow:0 0 0 3px rgba(30,58,95,0.08); }

/* IMPROVED WIZARD CONNECTOR */
.wizard-steps { display:flex; align-items:center; background:white; border-radius:var(--radius-lg); padding:1rem 1.25rem; margin-bottom:1.25rem; border:1px solid var(--border); box-shadow:var(--shadow); gap:0; }
.wiz-step { display:flex; align-items:center; gap:0.5rem; }
.wiz-step:not(:last-child) { flex:1; }
.wiz-step:not(:last-child)::after { content:''; flex:1; height:2px; background:var(--border); margin:0 0.75rem; transition:background 0.3s ease; }
.wiz-step.done:not(:last-child)::after { background:var(--green); }

/* IMPROVED ADMIN ROW */
.admin-row { display:flex; align-items:center; background:white; border:1px solid var(--border); border-radius:var(--radius); padding:0.875rem 1rem; gap:0.75rem; transition:all 0.15s ease; margin-bottom:0.5rem; }
.admin-row:hover { box-shadow:var(--shadow-md); border-color:var(--primary-200); }

/* IMPROVED MODAL */
.modal-box { background:white; border-radius:16px; width:100%; max-width:560px; max-height:90vh; display:flex; flex-direction:column; box-shadow:0 16px 48px rgba(0,0,0,0.2); animation:modalIn 0.25s ease; }

/* STAT CARD IMPROVED */
.stat-box { background:white; border-radius:10px; padding:1rem; border:1px solid var(--border); text-align:center; transition:all 0.15s ease; }
.stat-box:hover { box-shadow:var(--shadow-md); }
.stat-val { font-size:1.4rem; font-weight:800; background:linear-gradient(135deg,var(--primary),#2d5280); -webkit-background-clip:text; -webkit-text-fill-color:transparent; }
.stat-lbl { font-size:0.69rem; color:var(--text-muted); margin-top:0.15rem; text-transform:uppercase; letter-spacing:0.04em; font-weight:500; }

/* EMPTY STATE IMPROVED */
.empty { text-align:center; padding:3rem 1.5rem; color:var(--text-muted); }
.empty-icon { width:64px; height:64px; margin:0 auto 1rem; background:var(--bg); border-radius:16px; display:flex; align-items:center; justify-content:center; }
.empty-icon svg { width:28px; height:28px; color:var(--text-muted); opacity:0.5; }
.empty h4 { font-size:0.95rem; font-weight:600; color:var(--text-secondary); margin-bottom:0.3rem; }
.empty p { font-size:0.82rem; margin-bottom:0.75rem; }

/* TOAST IMPROVED */
.toast { background:#1e293b; color:white; padding:0.75rem 1.25rem; border-radius:10px; font-size:0.82rem; font-weight:500; box-shadow:0 8px 24px rgba(0,0,0,0.2); opacity:0; transform:translateY(10px); transition:all 0.3s ease; white-space:nowrap; display:flex; align-items:center; gap:0.5rem; }
.toast::before { font-size:1rem; }
.toast.success { background:#059669; }
.toast.success::before { content:'\2713'; }
.toast.error { background:#dc2626; }
.toast.error::before { content:'\2717'; }
.toast.show { opacity:1; transform:translateY(0); }

/* LOGIN SCREEN */
.login-screen { display:none; position:fixed; inset:0; z-index:1000; background:linear-gradient(135deg,#0a1929 0%,#102a43 50%,#1e3a5f 100%); align-items:center; justify-content:center; flex-direction:column; }
.login-card { background:rgba(255,255,255,0.06); backdrop-filter:blur(24px); border:1px solid rgba(255,255,255,0.1); border-radius:18px; padding:2.5rem 2rem; text-align:center; width:340px; }
.login-logo { font-family:Georgia,serif; font-size:2.2rem; font-weight:700; color:#d4a843; margin-bottom:0.25rem; }
.login-sub { font-size:0.85rem; color:rgba(241,245,249,0.5); margin-bottom:2rem; }
.login-input { width:100%; background:rgba(255,255,255,0.08); border:1px solid rgba(255,255,255,0.12); color:#f1f5f9; padding:0.9rem 1rem; border-radius:10px; font-size:1.4rem; font-family:inherit; text-align:center; letter-spacing:10px; transition:all 0.2s ease; }
.login-input::placeholder { color:rgba(255,255,255,0.25); letter-spacing:4px; font-size:0.9rem; }
.login-input:focus { outline:none; border-color:rgba(212,168,67,0.4); }
.login-btn { width:100%; background:#d4a843; color:#0a1929; border:none; padding:0.85rem; border-radius:10px; font-size:1rem; font-weight:600; cursor:pointer; font-family:inherit; margin-top:1rem; transition:all 0.2s ease; }
.login-btn:hover { filter:brightness(1.1); }
.login-error { color:#f87171; font-size:0.8rem; margin-top:0.75rem; min-height:1.2rem; }

/* LOADING IMPROVED */
.loading-overlay { position:fixed; top:0; left:0; right:0; bottom:0; background:rgba(255,255,255,0.9); backdrop-filter:blur(4px); z-index:400; display:none; align-items:center; justify-content:center; flex-direction:column; gap:1.25rem; }
.loading-overlay.active { display:flex; }
.spinner { width:44px; height:44px; border:3px solid var(--primary-200); border-top-color:var(--primary); border-radius:50%; animation:spin 0.8s linear infinite; }
.loading-text { font-size:0.9rem; color:var(--text-secondary); font-weight:500; animation:pulse 1.5s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.5} }

/* FORM VALIDATION */
.form-control.invalid { border-color:var(--red); background:var(--red-50); }
.form-control.invalid:focus { box-shadow:0 0 0 3px rgba(239,68,68,0.1); }

