@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600&display=swap');

:root{
  --teal-900:#0B444C;
  --teal-800:#12565F;
  --teal-700:#1B6B75;
  --gold-500:#BAA27B;
  --gold-600:#9C8560;
  --olive-600:#767857;
  --cream-50:#F6F3EC;
  --cream-100:#EEE9DC;
  --ink-900:#22241E;
  --ink-600:#5B5C51;
  --line:#DCD5C2;
  --white:#FFFFFF;
  --error:#B24C3C;
}

*{box-sizing:border-box;}
html,body{margin:0;padding:0;}
body{
  font-family:'Inter',sans-serif;
  background:var(--cream-50);
  color:var(--ink-900);
  min-height:100vh;
  -webkit-font-smoothing:antialiased;
}

.app{
  display:grid;
  grid-template-columns:280px 1fr;
  min-height:100vh;
}

/* ---------- SIDEBAR ---------- */
.sidebar{
  background:var(--teal-900);
  color:var(--cream-50);
  padding:36px 28px;
  display:flex;
  flex-direction:column;
  position:relative;
}
.brand{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:44px;
}
.brand-mark{width:26px;height:26px;flex-shrink:0;}
.brand-word{
  font-family:'Space Grotesk',sans-serif;
  font-weight:700;
  font-size:15px;
  letter-spacing:2.5px;
}
.brand-sub{
  font-size:9.5px;
  letter-spacing:1.5px;
  color:var(--gold-500);
  display:block;
  margin-top:1px;
  font-weight:500;
}

.brand-logo{
  display:block;
  height:34px;
  width:auto;
  margin-bottom:44px;
  object-fit:contain;
}
.brand-logo-sidebar{ height:30px; align-self:flex-start; flex-shrink:0; }

.steps{
  list-style:none;
  margin:0;
  padding:0;
  position:relative;
  flex:1;
}
.steps::before{
  content:"";
  position:absolute;
  left:13px;
  top:14px;
  bottom:14px;
  width:1px;
  background:rgba(246,243,236,0.16);
}
.step-item{
  position:relative;
  padding-left:38px;
  padding-bottom:26px;
  cursor:pointer;
}
.step-item:last-child{padding-bottom:0;}
.step-badge{
  position:absolute;
  left:0;
  top:-1px;
  width:27px;
  height:27px;
  border-radius:50%;
  background:var(--teal-900);
  border:1.5px solid rgba(246,243,236,0.3);
  display:flex;
  align-items:center;
  justify-content:center;
  font-family:'Space Grotesk',sans-serif;
  font-size:11px;
  font-weight:600;
  color:rgba(246,243,236,0.55);
  transition:all .25s ease;
  z-index:1;
}
.step-label{
  font-size:13px;
  font-weight:500;
  color:rgba(246,243,236,0.5);
  line-height:1.35;
  padding-top:4px;
  transition:color .25s ease;
}
.step-item.done .step-badge{
  background:var(--gold-500);
  border-color:var(--gold-500);
  color:var(--teal-900);
}
.step-item.done .step-label{color:rgba(246,243,236,0.78);}
.step-item.current .step-badge{
  background:var(--gold-500);
  border-color:var(--gold-500);
  color:var(--teal-900);
  box-shadow:0 0 0 4px rgba(186,162,123,0.22);
}
.step-item.current .step-label{color:var(--white);font-weight:600;}
.step-badge svg{width:13px;height:13px;}

.sidebar-foot{
  font-size:10.5px;
  color:rgba(246,243,236,0.4);
  padding-top:24px;
  border-top:1px solid rgba(246,243,236,0.14);
  margin-top:24px;
  line-height:1.5;
}

.mobile-progress{display:none;}

/* ---------- MAIN ---------- */
.main{
  padding:52px 64px 40px;
  display:flex;
  flex-direction:column;
  max-width:760px;
}
.progress-track{
  height:3px;
  background:var(--line);
  border-radius:3px;
  overflow:hidden;
  margin-bottom:34px;
}
.progress-fill{
  height:100%;
  background:linear-gradient(90deg,var(--gold-500),var(--olive-600));
  transition:width .4s cubic-bezier(.65,0,.35,1);
}

.eyebrow{
  font-family:'Space Grotesk',sans-serif;
  font-size:11.5px;
  font-weight:600;
  letter-spacing:2px;
  color:var(--gold-600);
  margin:0 0 10px;
}
.section-title{
  font-family:'Space Grotesk',sans-serif;
  font-size:29px;
  font-weight:700;
  color:var(--teal-900);
  margin:0 0 20px;
  line-height:1.2;
}

.rationale{
  display:flex;
  gap:12px;
  background:var(--cream-100);
  border-left:3px solid var(--gold-500);
  border-radius:2px;
  padding:16px 18px;
  margin-bottom:32px;
}
.rationale svg{flex-shrink:0;width:17px;height:17px;margin-top:2px;color:var(--gold-600);}
.rationale p{
  margin:0;
  font-size:13.5px;
  line-height:1.55;
  color:var(--ink-600);
}
.rationale strong{color:var(--teal-900);}

.fields{display:flex;flex-direction:column;gap:22px;}
.field{display:flex;flex-direction:column;gap:7px;}
.field.hidden{display:none;}
.field label{
  font-size:13.5px;
  font-weight:600;
  color:var(--ink-900);
}
.field .hint{
  font-size:12px;
  color:var(--ink-600);
  font-style:italic;
  margin-top:-3px;
}
.field input[type=text],
.field input[type=email],
.field input[type=tel],
.field input[type=number],
.field select,
.field textarea{
  font-family:'Inter',sans-serif;
  font-size:14px;
  padding:11px 13px;
  border:1.3px solid var(--line);
  border-radius:6px;
  background:var(--white);
  color:var(--ink-900);
  outline:none;
  transition:border-color .15s ease, box-shadow .15s ease;
}
.field textarea{resize:vertical;min-height:78px;font-family:'Inter',sans-serif;}
.field input:focus,.field select:focus,.field textarea:focus{
  border-color:var(--gold-500);
  box-shadow:0 0 0 3px rgba(186,162,123,0.18);
}
.field input.error,.field select.error,.field textarea.error{border-color:var(--error);}
.error-msg{font-size:11.5px;color:var(--error);display:none;}
.error-msg.show{display:block;}

.radio-group{display:flex;gap:10px;flex-wrap:wrap;}
.radio-pill{
  position:relative;
}
.radio-pill input{position:absolute;opacity:0;width:100%;height:100%;cursor:pointer;margin:0;}
.radio-pill span{
  display:inline-flex;
  align-items:center;
  padding:9px 18px;
  border:1.3px solid var(--line);
  border-radius:20px;
  font-size:13px;
  font-weight:500;
  color:var(--ink-600);
  background:var(--white);
  transition:all .15s ease;
  cursor:pointer;
}
.radio-pill input:checked + span{
  background:var(--teal-900);
  border-color:var(--teal-900);
  color:var(--white);
}
.radio-pill input:focus-visible + span{box-shadow:0 0 0 3px rgba(186,162,123,0.35);}

.conditional-block{
  border-left:2px solid var(--line);
  padding-left:16px;
  margin-left:2px;
  display:flex;
  flex-direction:column;
  gap:22px;
}

/* ---------- NAV ---------- */
.nav-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-top:40px;
  padding-top:24px;
  border-top:1px solid var(--line);
}
.btn{
  font-family:'Inter',sans-serif;
  font-size:14px;
  font-weight:600;
  padding:12px 24px;
  border-radius:7px;
  border:none;
  cursor:pointer;
  transition:transform .12s ease, opacity .15s ease, background .15s ease;
  display:inline-flex;
  align-items:center;
  gap:8px;
}
.btn:active{transform:scale(0.97);}
.btn-primary{
  background:var(--teal-900);
  color:var(--white);
}
.btn-primary:hover{background:var(--teal-800);}
.btn-ghost{
  background:transparent;
  color:var(--ink-600);
  border:1.3px solid var(--line);
}
.btn-ghost:hover{border-color:var(--gold-500);color:var(--teal-900);}
.btn-ghost:disabled{opacity:0.35;cursor:default;}
.btn-ghost:disabled:hover{border-color:var(--line);color:var(--ink-600);}
.btn svg{width:15px;height:15px;}

/* ---------- REVIEW / SUCCESS ---------- */
.review-group{
  border:1px solid var(--line);
  border-radius:8px;
  padding:20px 22px;
  margin-bottom:16px;
  background:var(--white);
}
.review-group-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:12px;
}
.review-group-head h3{
  font-family:'Space Grotesk',sans-serif;
  font-size:15px;
  color:var(--teal-900);
  margin:0;
}
.review-edit{
  font-size:12px;
  color:var(--gold-600);
  background:none;
  border:none;
  cursor:pointer;
  font-weight:600;
  text-decoration:underline;
  padding:0;
}
.review-row{
  display:flex;
  justify-content:space-between;
  gap:16px;
  padding:7px 0;
  border-top:1px solid var(--cream-100);
  font-size:13px;
}
.review-row:first-of-type{border-top:none;}
.review-row .k{color:var(--ink-600);flex-shrink:0;max-width:55%;}
.review-row .v{color:var(--ink-900);font-weight:500;text-align:right;}
.review-row .v.empty{color:#B7B1A0;font-style:italic;font-weight:400;}

.hero-icon{width:56px;height:56px;margin-bottom:18px;}
.success-wrap{text-align:center;padding:60px 20px;}
.success-wrap h2{font-family:'Space Grotesk',sans-serif;color:var(--teal-900);font-size:26px;}
.success-wrap p{color:var(--ink-600);font-size:14px;max-width:420px;margin:12px auto 28px;line-height:1.6;}

.toast{
  position:fixed;
  bottom:24px;
  right:24px;
  background:var(--teal-900);
  color:var(--white);
  padding:12px 20px;
  border-radius:7px;
  font-size:13px;
  font-weight:500;
  opacity:0;
  transform:translateY(10px);
  transition:all .25s ease;
  pointer-events:none;
  z-index:50;
}
.toast.show{opacity:1;transform:translateY(0);}

@media (max-width:860px){
  .app{grid-template-columns:1fr;}
  .sidebar{
    padding:20px 22px;
    flex-direction:row;
    align-items:center;
    gap:16px;
  }
  .brand{margin-bottom:0;}
  .brand-logo{margin-bottom:0;}
  .steps{display:none;}
  .sidebar-foot{display:none;}
  .mobile-progress{
    display:flex;
    align-items:center;
    gap:10px;
    flex:1;
  }
  .mobile-progress .track{flex:1;height:4px;background:rgba(246,243,236,0.18);border-radius:4px;overflow:hidden;}
  .mobile-progress .fill{height:100%;background:var(--gold-500);transition:width .35s ease;}
  .mobile-progress .count{font-size:11px;color:rgba(246,243,236,0.7);white-space:nowrap;font-weight:600;}
  .main{padding:32px 22px 32px;}
  .section-title{font-size:23px;}
  .progress-track{display:none;}
}
@media print{
  .sidebar,.nav-row,.progress-track{display:none;}
  .app{display:block;}
  .main{max-width:100%;padding:0;}
  .success-wrap{text-align:left;padding:0 0 20px;}
  .success-wrap img{margin:0 0 12px !important;}
  .success-wrap > div{display:none !important;}
  .review-group{break-inside:avoid;page-break-inside:avoid;}
  .review-edit{display:none;}
}

/* =========================================================
   COMPONENTES DO PAINEL ADMINISTRATIVO (admin.html)
========================================================= */

.centered-shell{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
}
.auth-card{
  width:100%;
  max-width:380px;
  background:var(--white);
  border:1px solid var(--line);
  border-radius:12px;
  padding:40px 34px;
  box-shadow:0 18px 40px -20px rgba(11,68,76,0.25);
}
.auth-card .brand{margin-bottom:8px;color:var(--teal-900);}
.auth-card .brand-word{color:var(--teal-900);}
.auth-card .brand-sub{color:var(--gold-600);}
.auth-card .brand-logo{margin:0 auto 8px;height:46px;}
.auth-title{
  font-family:'Space Grotesk',sans-serif;
  font-size:20px;
  font-weight:700;
  color:var(--teal-900);
  margin:22px 0 4px;
}
.auth-subtitle{font-size:13px;color:var(--ink-600);margin:0 0 24px;line-height:1.5;}
.auth-card .field{margin-bottom:16px;}
.auth-card .field label{font-size:12.5px;}
.auth-error{
  background:#FBEAE7;
  border-left:3px solid var(--error);
  color:#8A3527;
  font-size:12.5px;
  padding:10px 12px;
  border-radius:4px;
  margin-bottom:16px;
  display:none;
  line-height:1.5;
}
.auth-error.show{display:block;}
.auth-card .btn-primary{width:100%;justify-content:center;margin-top:6px;}
.auth-hint{font-size:11.5px;color:var(--ink-600);text-align:center;margin-top:18px;line-height:1.6;}

/* ---------- SHELL DO DASHBOARD ---------- */
.dash-shell{min-height:100vh;background:var(--cream-50);}
.dash-topbar{
  background:var(--teal-900);
  padding:18px 40px;
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.dash-topbar .brand{margin-bottom:0;}
.dash-topbar .brand-logo{margin-bottom:0;}
.dash-user{display:flex;align-items:center;gap:16px;}
.dash-user-email{font-size:12.5px;color:rgba(246,243,236,0.75);}
.btn-logout{
  font-family:'Inter',sans-serif;
  font-size:12.5px;
  font-weight:600;
  color:rgba(246,243,236,0.85);
  background:rgba(246,243,236,0.1);
  border:1px solid rgba(246,243,236,0.25);
  padding:8px 16px;
  border-radius:6px;
  cursor:pointer;
  transition:background .15s ease;
}
.btn-logout:hover{background:rgba(246,243,236,0.18);}

.dash-body{
  max-width:920px;
  margin:0 auto;
  padding:44px 32px 80px;
}
.dash-head-row{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  margin-bottom:30px;
  gap:20px;
  flex-wrap:wrap;
}
.dash-title{
  font-family:'Space Grotesk',sans-serif;
  font-size:26px;
  font-weight:700;
  color:var(--teal-900);
  margin:0 0 4px;
}
.dash-subtitle{font-size:13px;color:var(--ink-600);margin:0;}

.empty-state{
  text-align:center;
  padding:60px 20px;
  color:var(--ink-600);
  border:1.5px dashed var(--line);
  border-radius:10px;
  font-size:13.5px;
}

/* ---------- CARD DE PROJETO ---------- */
.project-card{
  background:var(--white);
  border:1px solid var(--line);
  border-radius:10px;
  padding:22px 24px;
  margin-bottom:16px;
}
.project-card-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  margin-bottom:14px;
}
.project-name{
  font-family:'Space Grotesk',sans-serif;
  font-size:17px;
  font-weight:700;
  color:var(--teal-900);
  margin:0 0 4px;
}
.project-meta{font-size:11.5px;color:var(--ink-600);}
.project-disciplines{display:flex;gap:6px;flex-wrap:wrap;margin-top:10px;}

.badge{
  display:inline-flex;
  align-items:center;
  gap:5px;
  font-size:11px;
  font-weight:600;
  padding:4px 10px;
  border-radius:20px;
  background:var(--cream-100);
  color:var(--teal-900);
  border:1px solid var(--line);
}
.badge-count{
  background:var(--teal-900);
  color:var(--white);
  border:none;
  font-size:11px;
  font-weight:700;
  padding:3px 9px;
  border-radius:20px;
}

.project-actions{
  display:flex;
  gap:10px;
  flex-shrink:0;
}
.btn-small{
  font-size:12.5px;
  padding:8px 15px;
}

.link-list{
  border-top:1px solid var(--cream-100);
  padding-top:14px;
  margin-top:4px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.link-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  background:var(--cream-50);
  border:1px solid var(--line);
  border-radius:6px;
  padding:9px 12px;
}
.link-row-label{font-size:12.5px;font-weight:600;color:var(--ink-900);flex-shrink:0;}
.link-row-url{
  font-size:11.5px;
  color:var(--ink-600);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  flex:1;
  font-family:monospace;
}
.btn-copy{
  font-size:11.5px;
  font-weight:600;
  color:var(--teal-900);
  background:var(--white);
  border:1px solid var(--line);
  padding:6px 12px;
  border-radius:5px;
  cursor:pointer;
  flex-shrink:0;
  transition:all .15s ease;
}
.btn-copy:hover{border-color:var(--gold-500);}

/* ---------- MODAL ---------- */
.modal-overlay{
  position:fixed;
  inset:0;
  background:rgba(11,68,76,0.35);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  z-index:100;
}
.modal{
  background:var(--white);
  border-radius:12px;
  max-width:520px;
  width:100%;
  max-height:88vh;
  overflow-y:auto;
  padding:32px 30px;
}
.modal.modal-wide{max-width:760px;}
.modal-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  margin-bottom:22px;
}
.modal-title{
  font-family:'Space Grotesk',sans-serif;
  font-size:19px;
  font-weight:700;
  color:var(--teal-900);
  margin:0;
}
.modal-close{
  background:none;
  border:none;
  cursor:pointer;
  color:var(--ink-600);
  padding:4px;
}
.modal-close svg{width:18px;height:18px;}

.check-grid{display:flex;flex-direction:column;gap:10px;margin-bottom:8px;}
.check-row{
  display:flex;
  align-items:center;
  gap:11px;
  padding:11px 14px;
  border:1.3px solid var(--line);
  border-radius:7px;
  cursor:pointer;
  transition:border-color .15s ease;
}
.check-row:hover{border-color:var(--gold-500);}
.check-row.disabled{opacity:0.5;cursor:default;}
.check-row.disabled:hover{border-color:var(--line);}
.check-row input{width:16px;height:16px;accent-color:var(--teal-900);flex-shrink:0;}
.check-row .clabel{font-size:13.5px;font-weight:500;color:var(--ink-900);flex:1;}
.check-row .soon-tag{
  font-size:10px;
  font-weight:700;
  letter-spacing:.5px;
  color:var(--gold-600);
  background:var(--cream-100);
  padding:2px 8px;
  border-radius:10px;
  text-transform:uppercase;
}

.modal-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:26px;
  padding-top:20px;
  border-top:1px solid var(--cream-100);
}

/* ---------- LISTA DE RESPOSTAS ---------- */
.response-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:14px 16px;
  border:1px solid var(--line);
  border-radius:8px;
  margin-bottom:10px;
  cursor:pointer;
  transition:border-color .15s ease, background .15s ease;
}
.response-row:hover{border-color:var(--gold-500);background:var(--cream-50);}
.response-row-main{display:flex;flex-direction:column;gap:2px;}
.response-row-name{font-size:13.5px;font-weight:600;color:var(--ink-900);}
.response-row-meta{font-size:11.5px;color:var(--ink-600);}
.response-row-date{font-size:11.5px;color:var(--ink-600);white-space:nowrap;}
.response-row-actions{display:flex;gap:14px;margin-top:6px;}
.response-row-actions button{
  font-size:11px;
  font-weight:600;
  color:var(--gold-600);
  background:none;
  border:none;
  cursor:pointer;
  padding:0;
}
.response-row-actions button:hover{text-decoration:underline;}
.response-row-actions button.danger{color:var(--error);}
.badge-latest{
  display:inline-block;
  font-size:9.5px;
  font-weight:700;
  letter-spacing:.4px;
  text-transform:uppercase;
  color:var(--white);
  background:var(--olive-600);
  padding:2px 8px;
  border-radius:20px;
  margin-left:8px;
  vertical-align:middle;
}
.btn-ghost.danger{color:var(--error);border-color:var(--error);}
.btn-ghost.danger:hover{background:#FBEAE7;}

.spinner{
  width:22px;height:22px;
  border:2.5px solid var(--cream-100);
  border-top-color:var(--gold-500);
  border-radius:50%;
  animation:spin .7s linear infinite;
  margin:0 auto;
}
.spinner-sm{width:14px;height:14px;border-width:2px;}
@keyframes spin{to{transform:rotate(360deg);}}
.loading-block{padding:60px 20px;text-align:center;color:var(--ink-600);font-size:13px;}
.loading-block .spinner{margin-bottom:14px;}

.notice-banner{
  display:flex;
  gap:12px;
  align-items:flex-start;
  background:var(--cream-100);
  border-left:3px solid var(--gold-500);
  border-radius:2px;
  padding:14px 16px;
  margin-bottom:24px;
  font-size:12.5px;
  color:var(--ink-600);
  line-height:1.55;
}
.notice-banner svg{width:16px;height:16px;flex-shrink:0;margin-top:1px;color:var(--gold-600);}
