@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');
:root{--bg:#0b0c10;--surface:#111319;--surface-hover:#151821;--line:#232732;--text:#f3f4f7;--muted:#9097a6;--blue:#445bff;--radius:18px}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;min-height:100vh;background:radial-gradient(circle at top,rgba(68,91,255,.08),transparent 28%),var(--bg);color:var(--text);font-family:"Manrope",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;-webkit-font-smoothing:antialiased}a{color:inherit;text-decoration:none}button,input{font:inherit}.portfolio-page{width:min(100% - 28px,760px);min-height:100svh;margin:0 auto;padding:96px 0 48px}.profile{text-align:center;margin-bottom:56px}.profile-photo{width:104px;height:104px;margin:0 auto 20px;padding:3px;border:2px solid #5f636d;border-radius:50%}.profile-photo img{display:block;width:100%;height:100%;border-radius:50%;object-fit:cover;object-position:50% 38%}.profile h1{margin:0;color:var(--text);font-size:clamp(1.08rem,3.8vw,1.28rem);line-height:1.3;font-weight:800;letter-spacing:-.025em}.profile h1 span{font:inherit;color:inherit}.profile-subheadline{margin:8px 0 0;color:var(--muted);font-size:.94rem;line-height:1.5}.portfolio-list{display:grid;gap:24px}.project-card{width:100%;padding:0;overflow:hidden;text-align:left;color:var(--text);background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);cursor:pointer;transition:transform .2s ease,border-color .2s ease,background .2s ease}.project-card:hover{transform:translateY(-2px);border-color:#343a49;background:var(--surface-hover)}.project-preview{width:100%;aspect-ratio:16/9;overflow:hidden;background:#000;border-bottom:1px solid var(--line)}.project-preview img{width:100%;height:100%;object-fit:cover;object-position:top center;display:block}.placeholder-preview{display:flex;align-items:center;justify-content:center}.placeholder-preview span,.modal-placeholder{color:#fff;font-size:clamp(2.2rem,8vw,4.8rem);font-weight:800;letter-spacing:.12em}.project-info{padding:18px 20px}.project-info strong{display:block;font-size:1rem;letter-spacing:-.02em}.project-modal{position:fixed;inset:0;z-index:20;display:none;align-items:flex-start;justify-content:center;padding:20px;overflow:auto}.project-modal.is-open{display:flex}.modal-backdrop{position:fixed;inset:0;width:100%;border:0;background:rgba(0,0,0,.82);cursor:pointer}.modal-content{position:relative;z-index:1;width:min(100%,920px);background:var(--surface);border:1px solid var(--line);border-radius:20px;overflow:hidden}.modal-header{min-height:64px;padding:0 18px 0 20px;display:flex;align-items:center;justify-content:space-between;gap:18px;border-bottom:1px solid var(--line);position:sticky;top:0;background:var(--surface);z-index:2}.modal-close{width:38px;height:38px;display:grid;place-items:center;border:0;border-radius:50%;background:#191c24;color:var(--text);font-size:1.45rem;cursor:pointer}.modal-image-wrap{background:#000}.modal-image-wrap img{display:block;width:100%;height:auto}.modal-placeholder{min-height:72vh;display:flex;align-items:center;justify-content:center}.auth-page{width:min(100% - 28px,440px);min-height:100svh;margin:0 auto;display:flex;align-items:center;padding:40px 0}.auth-card,.admin-panel{width:100%;background:var(--surface);border:1px solid var(--line);border-radius:20px;padding:28px}.auth-card h1,.admin-panel h2{margin:0 0 8px}.auth-card>p{margin:0 0 24px;color:var(--muted)}.auth-photo{width:88px;height:88px}.form-stack{display:grid;gap:16px}.form-stack label{display:grid;gap:8px;color:#c8ccd6;font-size:.84rem;font-weight:600}.form-stack label small{color:var(--muted);font-weight:400}.form-stack input[type=text],.form-stack input[type=password]{width:100%;border:1px solid #2a2f3c;background:#0e1015;color:var(--text);border-radius:12px;padding:13px 14px;outline:none}.form-stack input[type=file]{width:100%;color:var(--muted)}.primary-button,.secondary-button,.project-actions button{border:1px solid transparent;border-radius:12px;padding:12px 15px;cursor:pointer;font-weight:700}.primary-button{background:var(--blue);color:#fff}.secondary-button{background:#1a1e28;color:#fff;border-color:#2c3240}.alert{margin:0 0 18px;padding:12px 14px;border-radius:12px;font-size:.84rem}.alert.success{background:rgba(42,172,98,.12);border:1px solid rgba(42,172,98,.35);color:#9ae7b9}.alert.error{background:rgba(220,70,70,.12);border:1px solid rgba(220,70,70,.35);color:#ffadad}.admin-page{width:min(100% - 28px,900px);margin:0 auto;padding:50px 0 70px}.admin-header{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:28px}.admin-header h1{margin:0;font-size:1.55rem}.admin-header p{margin:5px 0 0;color:var(--muted);font-size:.84rem}.admin-header-actions{display:flex;gap:10px;flex-wrap:wrap}.admin-header-actions a{border:1px solid var(--line);border-radius:11px;padding:9px 12px;font-size:.78rem}.admin-panel{margin-bottom:26px}.admin-projects{display:grid;gap:18px}.admin-project-card{display:grid;grid-template-columns:180px 1fr;overflow:hidden;background:var(--surface);border:1px solid var(--line);border-radius:18px}.admin-project-card>img{width:100%;height:100%;min-height:150px;object-fit:cover;object-position:top center;background:#000}.admin-project-body{padding:18px}.admin-project-topline{display:flex;justify-content:space-between;align-items:center;gap:12px}.status{font-size:.7rem;padding:5px 8px;border-radius:999px}.status.active{background:rgba(42,172,98,.12);color:#9ae7b9}.status.inactive{background:#1a1d24;color:#8f95a3}.admin-project-body details{margin-top:14px;border-top:1px solid var(--line);padding-top:12px}.admin-project-body summary{cursor:pointer;color:#cbd0db;font-size:.82rem}.compact-form{margin-top:14px}.project-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:16px}.project-actions form{margin:0}.project-actions button{padding:8px 11px;background:#191d26;color:#dce0e9;border-color:#2a303d;font-size:.76rem}.project-actions button.danger{color:#ff9b9b}.project-actions button:hover{background:#202530}[data-reveal]{opacity:0;transform:translateX(-28px)}body.is-ready [data-reveal]{animation:slideIn .62s cubic-bezier(.2,.75,.22,1) forwards}body.is-ready .profile{animation-delay:.02s}body.is-ready .project-card:nth-child(1){animation-delay:.08s}body.is-ready .project-card:nth-child(2){animation-delay:.14s}body.is-ready .project-card:nth-child(3){animation-delay:.20s}@keyframes slideIn{to{opacity:1;transform:translateX(0)}}@media(prefers-reduced-motion:reduce){[data-reveal]{opacity:1!important;transform:none!important;animation:none!important}}@media(max-width:620px){.portfolio-page{width:min(100% - 20px,500px);padding-top:56px;padding-bottom:32px}.profile{margin-bottom:48px}.profile-photo{width:96px;height:96px;margin-bottom:18px}.profile h1{font-size:1.02rem}.profile-subheadline{font-size:.88rem}.portfolio-list{gap:18px}.project-info{padding:16px 17px}.project-modal{padding:10px}.modal-content{border-radius:16px}.admin-page{width:min(100% - 20px,560px);padding-top:28px}.admin-header{align-items:flex-start;flex-direction:column}.admin-project-card{grid-template-columns:1fr}.admin-project-card>img{aspect-ratio:16/9;min-height:0}.auth-card,.admin-panel{padding:22px}}


/* V4 — pré-visualização de upload + configurações */
.admin-shell{
  width:min(100% - 28px,1180px);
  margin:0 auto;
  display:grid;
  grid-template-columns:190px minmax(0,1fr);
  gap:34px;
  align-items:start;
}
.admin-shell .admin-page{width:100%;margin:0}
.admin-sidebar{
  position:sticky;
  top:38px;
  margin-top:50px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:18px;
  padding:16px
}
.admin-sidebar-title{padding:6px 8px 14px;font-size:.82rem;font-weight:800;color:#dfe3ec}
.admin-nav{display:grid;gap:7px}
.admin-nav a{
  display:block;
  padding:11px 12px;
  border-radius:11px;
  color:var(--muted);
  font-size:.82rem;
  font-weight:700;
  transition:background .2s ease,color .2s ease
}
.admin-nav a:hover,.admin-nav a.active{background:#191d26;color:var(--text)}

.upload-preview{
  width:100%;
  min-height:180px;
  overflow:auto;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px dashed #303644;
  border-radius:14px;
  background:#090a0e;
  color:#676e7d;
  font-size:.78rem
}
.upload-preview.card-preview{min-height:0;aspect-ratio:16/9;overflow:hidden}
.upload-preview img{
  display:block;
  width:100%;
  height:auto;
  max-height:420px;
  object-fit:contain;
  object-position:top center
}
.upload-preview.card-preview img{
  width:100%;
  height:100%;
  max-height:none;
  object-fit:cover;
  object-position:top center
}

.settings-current-photo{display:flex;justify-content:flex-start;margin:4px 0 6px}
.settings-current-photo img{
  width:104px;
  height:104px;
  object-fit:cover;
  object-position:center;
  border-radius:50%;
  padding:3px;
  border:2px solid #5f636d;
  background:#000
}

@media(max-width:820px){
  .admin-shell{
    width:min(100% - 20px,700px);
    grid-template-columns:1fr;
    gap:18px
  }
  .admin-sidebar{position:static;margin-top:28px;padding:10px}
  .admin-sidebar-title{display:none}
  .admin-nav{grid-template-columns:1fr 1fr}
  .admin-nav a{text-align:center}
  .admin-shell .admin-page{padding-top:0}
}


/* V5 — formulário de novo projeto recolhido */
.projects-toolbar{
  display:flex;
  justify-content:flex-start;
  margin-bottom:18px;
}

.add-project-toggle{
  width:auto;
  min-width:170px;
  padding-left:18px;
  padding-right:18px;
}

.add-project-panel[hidden]{
  display:none !important;
}


/* V6 — maior respiro lateral no gerenciador */
.admin-shell{
  width:min(100% - 80px,1180px);
}

@media(max-width:820px){
  .admin-shell{
    width:min(100% - 32px,700px);
  }
}

@media(max-width:480px){
  .admin-shell{
    width:min(100% - 24px,700px);
  }
}


/* V7 — visualização completa da imagem da Landing Page no modal */
.project-modal{
  overflow:hidden;
}

.modal-content{
  max-height:calc(100dvh - 40px);
  display:flex;
  flex-direction:column;
}

.modal-header{
  flex:0 0 auto;
}

.modal-image-wrap{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  background:#000;
  overscroll-behavior:contain;
}

.modal-image-wrap img{
  display:block;
  width:100%;
  height:auto !important;
  max-height:none !important;
  object-fit:contain !important;
  object-position:top center !important;
}

@media(max-width:620px){
  .modal-content{
    max-height:calc(100dvh - 20px);
  }
}


/* V8 — imagem completa do projeto, sem recorte */
.project-modal{
  overflow-y:auto !important;
  overflow-x:hidden !important;
  align-items:flex-start !important;
}

.modal-content{
  height:auto !important;
  max-height:none !important;
  overflow:visible !important;
  flex:none !important;
}

.modal-header{
  position:sticky !important;
  top:0;
}

.modal-image-wrap{
  height:auto !important;
  max-height:none !important;
  min-height:0 !important;
  overflow:visible !important;
}

.modal-image-wrap img{
  display:block !important;
  width:100% !important;
  height:auto !important;
  min-height:0 !important;
  max-height:none !important;
  object-fit:contain !important;
  object-position:top center !important;
}
