:root{
  --bg-1:#031227;
  --bg-2:#071c3e;
  --bg-3:#142542;
  --panel:#0b1e3e;
  --panel-2:#12274c;
  --line:rgba(255,255,255,.12);
  --text:#f5f7fb;
  --muted:#b7c4dc;
  --accent:#f4a548;
  --accent-2:#ffbe67;
  --blue:#1e4fa7;
  --ok-bg:rgba(33,94,64,.28);
  --ok-bd:rgba(118,232,166,.25);
  --err-bg:rgba(124,33,33,.28);
  --err-bd:rgba(255,143,143,.28);
  --shadow:0 20px 50px rgba(0,0,0,.28);
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  min-height:100vh;
  color:var(--text);
  font-family:"Inter",system-ui,-apple-system,sans-serif;
  background:
    radial-gradient(circle at top left, rgba(33,88,180,.28), transparent 28%),
    radial-gradient(circle at right center, rgba(244,165,72,.16), transparent 26%),
    linear-gradient(90deg, var(--bg-1) 0%, #00173a 45%, #09152f 100%);
}
a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}
.container{width:min(1180px, calc(100% - 48px)); margin:0 auto}

h1,h2,h3,h4{
  font-family:"Cormorant Garamond", serif;
  line-height:1;
  letter-spacing:-.02em;
  margin:0 0 14px;
}
h1{font-size:clamp(2.6rem, 5vw, 4rem)}
h2{font-size:clamp(2rem, 3vw, 2.8rem)}
h3{font-size:1.5rem}
h4{font-size:1.25rem}
p{margin:0 0 14px;color:var(--muted)}
.lead{font-size:1.08rem;color:#dbe6fb}
.muted{color:var(--muted)}
.kicker{
  display:inline-flex;
  margin-bottom:16px;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(244,165,72,.35);
  color:#ffd6a0;
  background:rgba(244,165,72,.10);
  font-size:.9rem;
  font-weight:700;
}

.topbar{
  position:sticky;
  top:0;
  z-index:20;
  backdrop-filter:blur(16px);
  background:rgba(3,12,26,.78);
  border-bottom:1px solid var(--line);
}
.nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  min-height:72px;
}
.brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:800;
}
.brand-logo{
  width:auto;
  height:38px;
  display:block;
}
.nav-links{
  display:flex;
  gap:24px;
  color:#d8e5fb;
  font-weight:600;
  flex-wrap:wrap;
}
.actions{
  display:flex;
  gap:12px;
  align-items:center;
}
.session-badge{
  padding:10px 14px;
  border-radius:999px;
  background:rgba(31,72,144,.35);
  border:1px solid rgba(140,180,255,.22);
  color:#eff5ff;
  font-size:.9rem;
  font-weight:700;
}

.btn{
  appearance:none;
  border:1px solid transparent;
  color:#fff;
  border-radius:14px;
  padding:14px 20px;
  font-weight:800;
  cursor:pointer;
  transition:.22s ease;
}
.btn:hover{transform:translateY(-1px)}
.btn:disabled{opacity:.68;cursor:default;transform:none}
.btn-primary{
  background:linear-gradient(180deg,var(--accent-2),var(--accent));
  color:#1a1308;
  box-shadow:0 12px 30px rgba(244,165,72,.28);
}
.btn-soft{
  background:linear-gradient(180deg,rgba(31,72,144,.75),rgba(20,48,93,.88));
  border-color:rgba(140,180,255,.18);
}
.btn-block{width:100%}
.btn-small{
  padding:10px 14px;
  border-radius:12px;
  font-size:.92rem;
}

.panel,.card{
  background:linear-gradient(180deg, rgba(12,29,60,.86), rgba(7,22,48,.86));
  border:1px solid var(--line);
  border-radius:22px;
  box-shadow:var(--shadow);
}
.section{padding:30px 0}
.section-intro{max-width:900px}
.section-intro.left{max-width:none}
.divider{
  border:none;
  border-top:1px solid rgba(255,255,255,.12);
  margin:16px 0;
}

/* login */
.auth-page{
  min-height:100vh;
  background:
    radial-gradient(circle at top left, rgba(255,183,77,.12), transparent 30%),
    linear-gradient(90deg, #031635 0%, #072554 45%, #1f2430 100%);
  padding:48px 0 64px;
}
.auth-shell{max-width:1200px}
.auth-hero{
  max-width:760px;
  margin:0 auto 34px;
  padding:8px 8px 0;
}
.auth-title{
  font-size:clamp(2.7rem, 5vw, 4.6rem);
  line-height:.95;
  margin:18px 0 18px;
}
.auth-hero .lead{
  max-width:760px;
  margin-bottom:18px;
}
.auth-points{
  margin:18px 0 0;
  padding-left:18px;
  color:#f4f7ff;
}
.auth-points li{margin:6px 0}
.auth-panels{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:28px;
  align-items:start;
}
.auth-box{
  background:rgba(9,31,68,.78);
  border:1px solid rgba(128,173,255,.22);
  border-radius:28px;
  padding:30px 28px;
  box-shadow:
    0 24px 60px rgba(0,0,0,.28),
    inset 0 1px 0 rgba(255,255,255,.04);
  backdrop-filter:blur(10px);
}
.auth-box h2{
  margin:0 0 18px;
  font-size:2.2rem;
  line-height:1;
}
.form-stack{
  display:flex;
  flex-direction:column;
  gap:16px;
}
.form-stack label{
  display:flex;
  flex-direction:column;
  gap:8px;
  color:#f4f7ff;
  font-weight:600;
}
.form-stack input{
  width:100%;
  min-height:50px;
  border-radius:14px;
  border:1px solid rgba(147,182,255,.24);
  background:rgba(255,255,255,.06);
  color:#fff;
  padding:0 16px;
  outline:none;
  transition:border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.form-stack input:focus{
  border-color:rgba(255,183,77,.75);
  box-shadow:0 0 0 4px rgba(255,183,77,.14);
  background:rgba(255,255,255,.09);
}
.auth-btn{
  margin-top:6px;
  width:100%;
  justify-content:center;
  min-height:52px;
  border-radius:16px;
  font-weight:800;
}
.form-msg{
  margin:0 0 16px;
  padding:12px 14px;
  border-radius:14px;
  font-weight:600;
  font-size:.95rem;
}
.form-msg.ok{
  background:rgba(33,186,117,.12);
  border:1px solid rgba(33,186,117,.32);
  color:#b8ffd7;
}
.form-msg.error{
  background:rgba(255,107,107,.10);
  border:1px solid rgba(255,107,107,.30);
  color:#ffd1d1;
}

/* panel */
.section-panel{padding:22px 0 52px}
.panel-grid{
  display:grid;
  grid-template-columns:360px minmax(0,1fr);
  gap:22px;
  align-items:start;
}
.panel{
  padding:18px;
}
.panel-form h1{font-size:3.1rem}
.panel-viewer h2{font-size:3rem}
.field-label{
  display:block;
  margin:14px 0 8px;
  color:#fff;
  font-weight:800;
}
.input{
  width:100%;
  min-height:52px;
  border-radius:14px;
  border:1px solid rgba(147,182,255,.24);
  background:rgba(255,255,255,.06);
  color:#fff;
  padding:0 14px;
  outline:none;
}
.textarea{
  min-height:72px;
  padding:14px;
  resize:vertical;
}
select{
  appearance:none;
  -webkit-appearance:none;
  -moz-appearance:none;
  color-scheme:dark;
  font-weight:700;
}
select option{
  background:#12274c;
  color:#fff;
}
select option:checked{
  background:#1e4fa7;
  color:#fff;
}

.sr-only{
  position:absolute !important;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

.upload-guide{
  margin:16px 0 18px;
  padding:14px;
  border-radius:16px;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.08);
}
.upload-guide-title{
  color:#fff;
  font-weight:900;
  margin-bottom:6px;
}
.upload-guide-text{
  color:#d8e5fb;
  font-size:.95rem;
  margin:0;
}

.view-grid{
  display:grid;
  gap:14px;
}
.view-slot{
  padding:14px;
  border-radius:18px;
  border:1px solid rgba(126,167,255,.24);
  background:linear-gradient(180deg, rgba(18,39,76,.48), rgba(11,28,58,.72));
  transition:border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.view-slot.dragging{
  border-color:rgba(255,190,103,.95);
  box-shadow:0 0 0 4px rgba(255,190,103,.12);
  transform:translateY(-1px);
}
.view-slot-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.view-slot-head strong{
  color:#fff;
  font-size:1rem;
}
.view-slot-head span{
  color:#c8d8f4;
  font-size:.8rem;
  font-weight:700;
}
.view-dropzone{
  min-height:82px;
  border-radius:16px;
  border:1px dashed rgba(126,167,255,.34);
  background:linear-gradient(180deg, rgba(18,39,76,.72), rgba(11,28,58,.92));
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:16px 14px;
  text-align:center;
  cursor:pointer;
}
.view-dropzone:hover{
  border-color:rgba(255,190,103,.72);
}
.view-icon{
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:rgba(255,255,255,.08);
  color:#fff;
  font-size:1.2rem;
  font-weight:900;
}
.view-preview{
  margin-top:12px;
  min-height:12px;
}

.upload-meta{
  display:flex;
  gap:10px;
  margin-top:10px;
}
.chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:7px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.06);
  color:#eff5ff;
  font-size:.88rem;
  font-weight:800;
}
.chip-live{
  background:rgba(31,72,144,.38);
  border-color:rgba(140,180,255,.24);
}

.thumb-card{
  overflow:hidden;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.04);
}
.thumb-card img{
  width:100%;
  aspect-ratio:16/9;
  object-fit:cover;
  display:block;
}
.thumb-meta{
  display:flex;
  flex-direction:column;
  gap:6px;
  padding:10px 12px;
}
.thumb-name{
  color:#fff;
  font-size:.92rem;
  font-weight:700;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.thumb-size{
  color:#d8e5fb;
  font-size:.86rem;
  font-weight:600;
}

.status-box{
  margin:16px 0 12px;
  padding:14px 14px;
  border-radius:16px;
  font-weight:800;
}
.status-box.info{
  background:rgba(31,72,144,.30);
  border:1px solid rgba(140,180,255,.18);
  color:#fff;
}
.status-box.success{
  background:rgba(56,157,112,.18);
  border:1px solid rgba(118,232,166,.20);
  color:#ecfff4;
}
.status-box.error{
  background:rgba(124,33,33,.28);
  border:1px solid rgba(255,143,143,.28);
  color:#ffd4d4;
}

.processing-box{
  display:flex;
  align-items:center;
  gap:14px;
  margin:0 0 14px;
  padding:14px;
  border-radius:16px;
  background:rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.08);
}
.processing-copy{
  display:flex;
  flex-direction:column;
  gap:4px;
}
.processing-copy strong{color:#fff}
.processing-copy span{color:#dce8ff;font-size:.94rem}
.processing-spinner{
  width:22px;
  height:22px;
  border-radius:50%;
  border:3px solid rgba(255,255,255,.18);
  border-top-color:#ffbe67;
  animation:spin .8s linear infinite;
}
@keyframes spin{
  to{transform:rotate(360deg)}
}

.ia-strip{
  margin-top:12px;
}
.ia-strip img{
  width:54px;
  height:54px;
  margin-top:8px;
  object-fit:cover;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.08);
}

.viewer{
  margin-top:20px;
  min-height:420px;
  border-radius:20px;
  border:1px solid rgba(66,112,196,.35);
  background:linear-gradient(180deg, rgba(4,20,52,.88), rgba(3,16,42,.98));
  position:relative;
  overflow:hidden;
}
.viewer-placeholder{
  min-height:420px;
  display:grid;
  place-items:center;
  padding:28px;
  text-align:center;
  color:var(--muted);
}
#geminiPreview,#stlViewer{
  min-height:420px;
  padding:18px;
}
.gemini-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:14px;
  margin-top:10px;
}
.gemini-grid img{
  width:100%;
  aspect-ratio:1/1;
  object-fit:cover;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.08);
  box-shadow:0 10px 24px rgba(0,0,0,.32);
}
.stl-viewer canvas{
  width:100% !important;
  height:420px !important;
  display:block;
  border-radius:14px;
}

.account-strip{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
  margin:8px 0 22px;
}
.mini-stat{
  padding:14px;
  border-radius:16px;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.08);
}
.mini-stat span{
  display:block;
  color:#cdd9f1;
  font-size:.88rem;
  font-weight:700;
  margin-bottom:6px;
}
.mini-stat strong{
  color:#fff;
  font-size:1.5rem;
  font-weight:900;
}
.requests-section{margin:0 0 22px}
.requests-section h3{margin-bottom:12px}
.requests-list{
  display:grid;
  gap:14px;
}
.request-card{
  padding:14px;
  border-radius:18px;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.08);
}
.request-main{
  display:grid;
  grid-template-columns:minmax(0,1fr) 120px;
  gap:14px;
  align-items:start;
}
.request-card img{
  width:120px;
  height:120px;
  object-fit:cover;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.08);
}
.request-card strong{
  display:block;
  font-size:1.05rem;
  margin-bottom:6px;
}
.request-status{
  display:inline-flex;
  margin-bottom:10px;
  padding:7px 10px;
  border-radius:999px;
  background:rgba(31,72,144,.35);
  border:1px solid rgba(140,180,255,.18);
  color:#eff5ff;
  font-size:.84rem;
  font-weight:800;
}
.request-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:12px;
}

@media (max-width: 1024px){
  .auth-panels{
    grid-template-columns:1fr;
  }

  .panel-grid{
    grid-template-columns:1fr;
  }

  .account-strip{
    grid-template-columns:1fr;
  }
}

@media (max-width: 720px){
  .container{width:min(100% - 28px, 1180px)}
  .nav{min-height:64px}
  .nav-links{display:none}
  .actions{gap:8px}
  .btn{padding:12px 16px;border-radius:12px}
  .auth-box{
    padding:24px 20px;
    border-radius:24px;
  }
  .request-main{
    grid-template-columns:1fr;
  }
  .request-card img{
    width:100%;
    height:auto;
    aspect-ratio:16/9;
  }
  .gemini-grid{
    grid-template-columns:1fr;
  }
}

/* ===== LANDING / MARKETING ===== */

.hero{
  padding: 28px 0 22px;
}

.hero-grid{
  display:grid;
  grid-template-columns:minmax(0, 1.45fr) minmax(320px, .85fr);
  gap:22px;
  align-items:stretch;
}

.hero-copy,
.hero-card{
  padding:28px;
}

.hero-copy h1{
  max-width: 12ch;
  line-height: .95;
  margin-bottom: 16px;
}

.hero-copy .lead{
  max-width: 900px;
}

.hero-card{
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap:18px;
}

.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.05);
  color:#eef4ff;
  font-size:.92rem;
  font-weight:800;
}

.metric-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}

.metric{
  padding:16px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.1);
  background:rgba(255,255,255,.04);
}

.metric strong{
  display:block;
  color:#fff;
  font-size:1.4rem;
  line-height:1.05;
  margin-bottom:6px;
}

.metric span{
  color:#d9e6fb;
  font-size:.95rem;
}

.cards-3{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
}

.cards-3 .card{
  padding:22px;
}

.cards-3 .card h3{
  margin-bottom:10px;
}

.pricing-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
}

.price{
  display:flex;
  align-items:baseline;
  gap:8px;
  margin:10px 0 16px;
  color:#fff;
  font-weight:900;
  font-size:2rem;
}

.price small{
  color:var(--muted);
  font-size:.95rem;
  font-weight:700;
}

.list-clean{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  gap:10px;
}

.list-clean li{
  padding-left:18px;
  position:relative;
  color:#d8e5fb;
}

.list-clean li::before{
  content:"•";
  position:absolute;
  left:0;
  top:0;
  color:var(--accent-2);
  font-weight:900;
}

.columns-2{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px;
}

.footer{
  padding:22px 0 40px;
  color:#c7d5ef;
}

.footer .container{
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:center;
  flex-wrap:wrap;
}

/* ===== PROCESO ===== */

.timeline{
  display:grid;
  gap:14px;
}

.step{
  display:grid;
  grid-template-columns:64px minmax(0,1fr);
  gap:16px;
  padding:18px;
  border-radius:20px;
  border:1px solid rgba(255,255,255,.1);
  background:linear-gradient(180deg, rgba(12,29,60,.72), rgba(7,22,48,.82));
  box-shadow:var(--shadow);
}

.step-num{
  width:48px;
  height:48px;
  border-radius:16px;
  display:grid;
  place-items:center;
  background:linear-gradient(180deg,var(--accent-2),var(--accent));
  color:#1a1308;
  font-weight:900;
  font-size:1.05rem;
  box-shadow:0 12px 26px rgba(244,165,72,.24);
}

.step h3{
  margin:0 0 8px;
}

.step p:last-child{
  margin-bottom:0;
}

.notice{
  padding:16px 18px;
  border-radius:18px;
  border:1px solid rgba(255,190,103,.22);
  background:rgba(244,165,72,.08);
  color:#fff0dc;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 1024px){
  .hero-grid,
  .pricing-grid,
  .cards-3,
  .columns-2{
    grid-template-columns:1fr;
  }

  .metric-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media (max-width: 720px){
  .hero-copy,
  .hero-card,
  .cards-3 .card,
  .step{
    padding:20px;
  }

  .metric-grid{
    grid-template-columns:1fr;
  }

  .step{
    grid-template-columns:1fr;
  }

  .step-num{
    width:42px;
    height:42px;
    border-radius:14px;
  }

  .footer .container{
    flex-direction:column;
    align-items:flex-start;
  }
}

.btn-loading {
  opacity: 0.7;
  pointer-events: none;
  position: relative;
}

.btn-loading::after {
  content: " ⏳";
  margin-left: 6px;
}