:root {
  --navy: #0f2240;
  --navy2: #1a3a6b;
  --orange: #085885;
  --orange2: #ff7a3d;
  --light: #f4f7fb;
  --border: #e2e8f0;
  --green: #16a34a;
  --gray: #64748b;
  --gray2: #94a3b8;
  --shadow: 0 4px 24px rgba(15, 34, 64, .10);
  --shadow2: 0 8px 40px rgba(15, 34, 64, .18)
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--light);
  color: #1e293b;
  min-height: 100vh
}

/* HEADER */
header {
  background: white;
  color: #fff;
  padding: 16px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 200;
}

.hdr-right {
  font-size: 12px;
  color: #085885 !important;
  text-align: left;
  margin-left: 20px
}

.hdr-right strong {
  color: #085885 !important;
}

.pgbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0 40px;
  position: sticky;
  top: 60px;
  z-index: 190;
}

.steps {
  display: flex;
  align-items: center;
  max-width: 1000px;
  margin: 0 auto
}

.step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 0;
  flex: 1;
  cursor: pointer
}

.snum {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--border);
  color: var(--gray);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
  transition: all .3s
}

.step.active .snum {
  background: var(--navy);
  color: #fff
}

.step.done .snum {
  background: var(--green);
  color: #fff
}

.slabel {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray);
  line-height: 1.3
}

.step.active .slabel {
  color: var(--navy)
}

.step.done .slabel {
  color: var(--green)
}

.sline {
  flex: 0 0 18px;
  height: 2px;
  background: var(--border);
  margin: 0 2px
}

.sline.done {
  background: var(--green)
}

/* HERO */
.hero {
  background: linear-gradient(135deg, var(--navy), #1e4080, var(--navy2));
  color: #fff;
  padding: 80px 40px;
  text-align: center;
  position: relative;
  overflow: hidden
}

.hero::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 400px;
  height: 400px;
  background: var(--orange);
  opacity: .07;
  border-radius: 50%
}

.hcontent {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto
}

.hbadge {
  display: inline-block;
  background: rgba(232, 92, 26, .2);
  color: #ff9060;
  border: 1px solid rgba(232, 92, 26, .4);
  padding: 5px 16px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .5px;
  margin-bottom: 22px;
  text-transform: uppercase
}

.hero h1 {
  font-size: 40px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px
}

.hero h1 span {
  color: var(--orange2)
}

.hero p {
  font-size: 16px;
  color: #94b8e0;
  line-height: 1.7;
  margin-bottom: 36px
}

.hcta {
  background: var(--orange);
  color: #fff;
  border: none;
  padding: 15px 42px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all .25s;
  box-shadow: 0 4px 20px rgba(232, 92, 26, .4)
}

.hcta:hover {
  background: var(--orange2);
  transform: translateY(-2px)
}

.hstats {
  display: flex;
  justify-content: center;
  gap: 36px;
  margin-top: 44px;
  padding-top: 36px;
  border-top: 1px solid rgba(255, 255, 255, .1)
}

.hstat strong {
  display: block;
  font-size: 26px;
  font-weight: 800
}

.hstat span {
  font-size: 11px;
  color: #94b8e0
}

/* MAIN */
.main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 36px 40px
}

.stitle {
  font-size: 24px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 4px
}

.ssub {
  font-size: 13px;
  color: var(--gray);
  margin-bottom: 28px
}

.panel {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 32px;
  margin-bottom: 22px
}

/* FORMS */
.fg2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px
}

.fg3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px
}

.fg {
  display: flex;
  flex-direction: column;
  gap: 5px
}

.fg.full {
  grid-column: 1/-1
}

label {
  font-size: 12px;
  font-weight: 600;
  color: #374151
}

.req {
  color: #ff0000 !important
}

input,
select,
textarea {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 10px 13px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #1e293b;
  transition: border-color .2s;
  background: #fff;
  width: 100%
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--navy2);
  box-shadow: 0 0 0 3px rgba(26, 58, 107, .1)
}

textarea {
  resize: vertical;
  min-height: 78px
}

/* PRODUCTS */
.fbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  align-items: center
}

.fbtn {
  padding: 6px 16px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray);
  cursor: pointer;
  transition: all .2s
}

.fbtn:hover {
  border-color: var(--navy2);
  color: var(--navy2)
}

.fbtn.active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy)
}

.pgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px
}

.pcard {
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: all .25s;
  position: relative
}

.pcard:hover {
  border-color: var(--navy2);
  transform: translateY(-3px);
  box-shadow: var(--shadow2)
}

.pcard.sel {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(232, 92, 26, .15)
}

.pcard-img-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden
}

.pcard-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 12px
}

.pcard-body {
  padding: 12px 14px
}

.pcard h4 {
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.4;
  margin-bottom: 7px
}

.cbadge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px
}

.ca {
  background: #dbeafe;
  color: #1d4ed8
}

.cd {
  background: #fce7f3;
  color: #be185d
}

.cm {
  background: #dcfce7;
  color: #15803d
}

.cae {
  background: #e0f2fe;
  color: #0369a1
}

.ct {
  background: #fef3c7;
  color: #92400e
}

.cp {
  background: #f3e8ff;
  color: #7c3aed
}

.pcheck {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 26px;
  height: 26px;
  background: var(--orange);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  transition: opacity .2s
}

.pcard.sel .pcheck {
  opacity: 1
}

.selcount {
  background: var(--orange);
  color: #fff;
  border-radius: 20px;
  padding: 4px 13px;
  font-size: 12px;
  font-weight: 700;
  margin-left: auto
}

/* CONFIG */
.citem {
  border: 1.5px solid var(--border);
  border-radius: 14px;
  margin-bottom: 16px;
  overflow: hidden
}

.chdr {
  padding: 14px 18px;
  background: var(--light);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer
}

.chdr:hover {
  background: #e8eff8
}

.cthumb {
  width: 52px;
  height: 38px;
  object-fit: cover;
  border-radius: 7px;
  border: 1px solid var(--border);
  flex-shrink: 0;
  background: #e8f0fb
}

.cinfo {
  flex: 1
}

.cinfo h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy)
}

.cnum {
  width: 26px;
  height: 26px;
  background: var(--orange);
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0
}

.carr {
  color: var(--gray);
  font-size: 17px;
  transition: transform .3s
}

.carr.open {
  transform: rotate(180deg)
}

.cbody {
  display: none
}

.cbody.open {
  display: block
}

/* FORM SECTIONS */
.fsec {
  border-top: 1px solid var(--border)
}

.fshdr {
  padding: 12px 20px;
  background: #fafbfc;
  display: flex;
  align-items: center;
  gap: 8px
}

.fshdr.locked {
  background: #eff6ff
}

.fstitle {
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
  flex: 1
}

.fslock {
  font-size: 10px;
  color: #2563eb;
  background: #dbeafe;
  padding: 2px 7px;
  border-radius: 8px
}

.fsbody {
  padding: 18px 20px
}

/* CHECKBOX CHIPS */
.cbg {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 3px
}

.chip {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray);
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 5px
}

.chip::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: #fff;
  flex-shrink: 0;
  transition: background .15s, border-color .15s
}

.chip:hover {
  border-color: #1a6aaa;
  color: #1a6aaa
}

.chip:hover::before {
  border-color: #1a6aaa
}

.chip.on {
  background: #1a6aaa;
  color: #fff;
  border-color: #1a6aaa;
  box-shadow: 0 2px 8px rgba(26, 106, 170, .25)
}

.chip.on::before {
  background: #fff;
  border-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6l3 3 5-5' stroke='%231a6aaa' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 10px;
  background-repeat: no-repeat;
  background-position: center
}

/* TABLE REPEATER */
.twrap {
  overflow-x: auto;
  margin-top: 5px
}

.trep {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px
}

.trep th {
  background: #f1f5f9;
  color: var(--navy);
  font-weight: 700;
  padding: 7px 9px;
  text-align: left;
  border: 1px solid var(--border);
  white-space: nowrap
}

.trep td {
  padding: 5px 7px;
  border: 1px solid var(--border)
}

.trep td input,
.trep td select {
  border: none;
  padding: 3px 5px;
  font-size: 11px;
  background: transparent;
  width: 100%
}

.trep td input:focus,
.trep td select:focus {
  background: #fff;
  outline: 1px solid var(--navy2);
  border-radius: 3px
}

.btn-del {
  background: none;
  border: none;
  color: #ef4444;
  font-size: 14px;
  cursor: pointer;
  padding: 1px 5px;
  border-radius: 3px
}

.btn-del:hover {
  background: #fee2e2
}

.btn-add {
  margin-top: 7px;
  width: 100%;
  background: #fff;
  border: 1.5px dashed var(--border);
  border-radius: 8px;
  padding: 7px;
  font-size: 11px;
  font-weight: 600;
  color: var(--gray2);
  cursor: pointer;
  transition: all .2s
}

.btn-add:hover {
  border-color: var(--navy2);
  color: var(--navy2)
}

/* QTY */
.qsel {
  display: flex;
  align-items: center;
  gap: 10px
}

.qbtn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  font-weight: 700;
  transition: all .2s
}

.qbtn:hover {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy)
}

.qval {
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
  min-width: 28px;
  text-align: center
}

/* BUTTONS */
.brow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px
}

.bback {
  background: #fff;
  color: var(--navy);
  border: 1.5px solid var(--border);
  padding: 11px 24px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s
}

.bback:hover {
  background: var(--light);
  border-color: var(--navy)
}

.bnext {
  background: var(--navy);
  color: #fff;
  border: none;
  padding: 11px 32px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all .25s;
  box-shadow: 0 4px 14px rgba(15, 34, 64, .22)
}

.bnext:hover {
  background: var(--navy2);
  transform: translateY(-1px)
}

.bsubmit {
  background: var(--orange);
  color: #fff;
  border: none;
  padding: 12px 36px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all .25s;
  box-shadow: 0 4px 14px rgba(232, 92, 26, .32)
}

.bsubmit:hover {
  background: var(--orange2);
  transform: translateY(-1px)
}

/* REVIEW */
.ritem {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 11px;
  margin-bottom: 9px;
  background: var(--light)
}

.rthumb {
  width: 60px;
  height: 42px;
  object-fit: cover;
  border-radius: 7px;
  border: 1px solid var(--border);
  flex-shrink: 0;
  background: #e8f0fb
}

.rinfo {
  flex: 1
}

.rinfo h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy)
}

.rinfo p {
  font-size: 11px;
  color: var(--gray);
  margin-top: 2px
}

.redit {
  color: var(--orange);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer
}

.csummary {
  background: linear-gradient(135deg, var(--navy), var(--navy2));
  color: #fff;
  border-radius: 14px;
  padding: 22px;
  margin-bottom: 20px
}

.csummary h3 {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #94b8e0;
  text-transform: uppercase;
  letter-spacing: .5px
}

.cirow {
  display: flex;
  gap: 20px;
  flex-wrap: wrap
}

.ci label {
  font-size: 10px;
  color: #94b8e0;
  display: block;
  margin-bottom: 1px
}

.ci span {
  font-size: 13px;
  font-weight: 600;
  color: #fff
}

/* ── PROPOSAL (Step 5 & 6) ── */
.proposal-wrap {
  display: flex;
  gap: 24px;
  align-items: flex-start
}

.proposal-main {
  flex: 1;
  min-width: 0
}

.history-panel {
  width: 240px;
  flex-shrink: 0
}

.proposal-doc {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden
}

.prop-header {
  background: linear-gradient(135deg, var(--navy), var(--navy2));
  color: #fff;
  padding: 28px 32px
}

.prop-logo {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 4px
}

.prop-title {
  font-size: 13px;
  color: #94b8e0;
  font-weight: 500
}

.prop-num {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  margin: 10px 0 4px
}

.prop-meta {
  font-size: 12px;
  color: #94b8e0
}

.prop-meta span {
  color: #fff;
  font-weight: 600
}

.prop-body {
  padding: 28px 32px
}

.prop-section {
  margin-bottom: 24px
}

.prop-section h3 {
  font-size: 11px;
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--border)
}

.prop-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px
}

.prop-field label {
  font-size: 10px;
  color: var(--gray);
  display: block;
  margin-bottom: 2px
}

.prop-field span {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy)
}

.prop-equip-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--light);
  border-radius: 10px;
  margin-bottom: 10px;
  border: 1px solid var(--border)
}

.prop-equip-img {
  width: 56px;
  height: 40px;
  object-fit: cover;
  border-radius: 7px;
  flex-shrink: 0;
  background: #e8f0fb
}

.prop-equip-info h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy)
}

.prop-equip-info p {
  font-size: 11px;
  color: var(--gray);
  margin-top: 2px
}

.prop-obs {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 14px;
  margin-top: 8px;
  font-size: 13px;
  color: #92400e;
  line-height: 1.6
}

/* EQUIP DETALHADO NA PROPOSTA */
.prop-equip-block {
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 14px;
  overflow: hidden
}

.prop-equip-hdr {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--light)
}

.prop-equip-hdr img {
  width: 60px;
  height: 42px;
  object-fit: cover;
  border-radius: 7px;
  flex-shrink: 0;
  background: #e8f0fb
}

.prop-equip-hdr-info {
  flex: 1
}

.prop-equip-hdr-info h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy)
}

.prop-equip-hdr-info p {
  font-size: 11px;
  color: var(--gray);
  margin-top: 2px
}

.prop-tech-specs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 6px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  background: #fafcff
}

.prop-spec {
  background: #fff;
  border-radius: 7px;
  padding: 6px 9px;
  border: 1px solid #eef2f8
}

.prop-spec label {
  display: block;
  font-size: 9px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .3px;
  margin-bottom: 1px
}

.prop-spec span {
  font-size: 11px;
  font-weight: 600;
  color: var(--navy)
}

/* TOTAL DESTACADO */
.prop-total-box {
  background: linear-gradient(135deg, var(--navy), var(--navy2));
  border-radius: 14px;
  padding: 22px 28px;
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px
}

.prop-total-label {
  color: #94b8e0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px
}

.prop-total-value {
  font-size: 30px;
  font-weight: 800;
  color: #fff;
  letter-spacing: .5px
}

.prop-total-value small {
  font-size: 15px;
  font-weight: 600;
  color: #94b8e0;
  margin-right: 4px
}

.prop-total-note {
  font-size: 10px;
  color: #94b8e0;
  margin-top: 4px
}

.prop-rev-badge {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 700;
  display: inline-block;
  margin-bottom: 10px
}

.prop-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 20px 32px;
  border-top: 1px solid var(--border);
  background: #fafbfc
}

.pact-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all .2s
}

.pact-view {
  background: var(--navy);
  color: #fff
}

.pact-view:hover {
  background: var(--navy2)
}

.pact-print {
  background: #fff;
  color: var(--navy);
  border: 1.5px solid var(--border)
}

.pact-print:hover {
  border-color: var(--navy);
  background: var(--light)
}

.pact-pdf {
  background: #dc2626;
  color: #fff
}

.pact-pdf:hover {
  background: #b91c1c
}

/* REVISION REQUEST */
.rev-box {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 28px;
  margin-top: 20px
}

.rev-box h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px
}

.rev-box p {
  font-size: 13px;
  color: var(--gray);
  margin-bottom: 16px
}

.rev-textarea {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  width: 100%;
  min-height: 100px;
  resize: vertical;
  color: #1e293b
}

.rev-textarea:focus {
  outline: none;
  border-color: var(--orange)
}

.rev-actions {
  display: flex;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap
}

.btn-conclude {
  background: var(--green);
  color: #fff;
  border: none;
  padding: 11px 24px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s
}

.btn-conclude:hover {
  background: #15803d
}

.btn-revise {
  background: var(--orange);
  color: #fff;
  border: none;
  padding: 11px 24px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s
}

.btn-revise:hover {
  background: var(--orange2)
}

/* HISTORY PANEL */
.hpanel {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: sticky;
  top: 80px
}

.hpanel-header {
  background: var(--navy);
  color: #fff;
  padding: 16px 18px
}

.hpanel-header h3 {
  font-size: 13px;
  font-weight: 700
}

.hpanel-header p {
  font-size: 11px;
  color: #94b8e0;
  margin-top: 2px
}

.hversion {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .2s;
  position: relative
}

.hversion:hover {
  background: var(--light)
}

.hversion.current {
  background: #eff6ff;
  border-left: 3px solid var(--navy2)
}

.hv-num {
  font-size: 14px;
  font-weight: 800;
  color: var(--navy)
}

.hv-tag {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 8px;
  font-weight: 700;
  display: inline-block;
  margin: 4px 0
}

.hv-original {
  background: #dcfce7;
  color: #15803d
}

.hv-revisao {
  background: #fef3c7;
  color: #92400e
}

.hv-date {
  font-size: 11px;
  color: var(--gray)
}

.hv-obs {
  font-size: 10px;
  color: var(--gray);
  margin-top: 4px;
  font-style: italic;
  border-top: 1px solid var(--border);
  padding-top: 4px
}

/* STATUS BADGE ON PROGRESS */
.step-status {
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 6px;
  margin-left: 4px
}

.ss-rev {
  background: #fef3c7;
  color: #92400e
}

/* FLOAT */
.fsum {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--navy);
  color: #fff;
  border-radius: 14px;
  padding: 14px 20px;
  box-shadow: var(--shadow2);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 150;
  transform: translateY(100px);
  opacity: 0;
  transition: all .3s;
  pointer-events: none
}

.fsum.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all
}

.fgo {
  background: var(--orange);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 7px 14px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer
}

.fgo:hover {
  background: var(--orange2)
}

.notice {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 12px;
  color: #1d4ed8;
  display: flex;
  gap: 9px;
  margin-bottom: 18px
}

.aichip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(90deg, #1a3a6b, #2d5aaa);
  color: #fff;
  border-radius: 20px;
  padding: 5px 13px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 18px
}

.aidot {
  width: 6px;
  height: 6px;
  background: #4ade80;
  border-radius: 50%;
  animation: pulse 1.4s infinite
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1
  }

  50% {
    opacity: .4
  }
}

.screen {
  display: none
}

.screen.active {
  display: block
}

/* PRINT */
@media print {

  header,
  .pgbar,
  .fsum,
  .rev-box,
  .history-panel,
  .prop-actions,
  button {
    display: none !important
  }

  body {
    background: #fff
  }

  .proposal-wrap {
    display: block
  }

  .proposal-doc {
    box-shadow: none;
    border: none
  }

  .prop-header {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact
  }

  .proposal-main {
    width: 100%
  }
}

@media(max-width:768px) {

  /* ── Header ── */
  header {
    padding: 0 16px;
    height: 54px;
    gap: 10px
  }

  .hdr-right {
    display: none
  }

  .hdr-uinfo {
    display: none
  }

  .hdr-user-wrap {
    gap: 8px
  }

  .hdr-logout {
    font-size: 11px;
    padding: 5px 10px
  }

  /* ── Step bar ── */
  .pgbar {
    padding: 0 16px
  }

  .slabel {
    display: none
  }

  .step {
    gap: 4px
  }

  .snum {
    width: 24px;
    height: 24px;
    font-size: 11px
  }

  .sline {
    flex: 0 0 12px
  }

  /* ── Main layout ── */
  .main {
    padding: 16px
  }

  /* ── Hero ── */
  .hero {
    padding: 48px 20px
  }

  .hero h1 {
    font-size: 26px
  }

  .hero p {
    font-size: 14px;
    margin-bottom: 24px
  }

  .hstats {
    gap: 16px;
    margin-top: 28px;
    padding-top: 24px
  }

  .hstat strong {
    font-size: 20px
  }

  /* ── Forms ── */
  .fg2,
  .fg3 {
    grid-template-columns: 1fr
  }

  .panel {
    padding: 18px
  }

  /* ── Products grid ── */
  .pgrid {
    grid-template-columns: 1fr 1fr;
    gap: 10px
  }

  .pcard h4 {
    font-size: 11px
  }

  .pcard-body {
    padding: 8px 10px
  }

  /* ── Config items ── */
  .citem {
    padding: 14px
  }

  .chdr {
    gap: 10px
  }

  .fshdr {
    padding: 10px 14px
  }

  /* ── Review ── */
  .proposal-wrap {
    flex-direction: column
  }

  .history-panel {
    width: 100%;
    position: static
  }

  /* ── Navigation buttons ── */
  .brow {
    flex-wrap: wrap;
    gap: 8px
  }

  .bnext,
  .bback,
  .bsubmit {
    flex: 1;
    min-width: 120px;
    font-size: 13px;
    padding: 11px 14px
  }

  /* ── Filter bar ── */
  .fbar {
    gap: 6px
  }

  .fbtn {
    padding: 5px 12px;
    font-size: 11px
  }

  .fsearch {
    font-size: 13px
  }

  /* ── Upload panel ── */
  .upload-area {
    padding: 20px 14px
  }

  /* ── sp-group (select_preview) ── */
  .sp-group {
    gap: 7px
  }

  .sp-card {
    min-width: 80px;
    max-width: 130px;
    padding: 8px 10px
  }

  .sp-card img {
    width: 64px;
    height: 48px
  }

  .sp-lbl {
    font-size: 11px
  }

  /* ── Floating summary ── */
  .fsum {
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 16px 16px 0 0;
    padding: 14px 16px
  }
}

@media(max-width:480px) {

  /* Header: only logo + action buttons */
  header {
    height: 52px;
    padding: 0 12px;
    gap: 8px
  }

  /* Products: single column on very small */
  .pgrid {
    grid-template-columns: 1fr
  }

  /* Hero */
  .hero h1 {
    font-size: 22px
  }

  .hstats {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 12px
  }

  /* Stacked nav buttons */
  .brow {
    flex-direction: column
  }

  .bnext,
  .bback,
  .bsubmit {
    width: 100%
  }
}

/* DRAWING TABS */
.draw-tabs {
  display: flex;
  gap: 2px;
  padding: 5px 6px 0;
  background: #e8f0fb;
  border-bottom: 1px solid var(--border)
}

.draw-tab {
  flex: 1;
  padding: 4px 0;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--gray);
  background: #e8f0fb;
  border: none;
  cursor: pointer;
  border-radius: 5px 5px 0 0;
  transition: all .2s
}

.draw-tab.active {
  background: #fff;
  color: var(--navy);
  box-shadow: 0 -2px 6px rgba(15, 34, 64, .08)
}

.draw-pane {
  display: none;
  width: 100%;
  height: 148px;
  background: #f0f6ff
}

.draw-pane.active {
  display: block
}

.draw-pane svg {
  width: 100%;
  height: 148px
}

/* S1 DARK THEME */
#s1 {
  background: var(--light);
  min-height: 100vh
}

#s1 .main {
  max-width: 860px;
  margin: 0 auto;
  padding: 36px 40px
}

#s1 .stitle {
  color: #085885;
  font-size: 24px;
  font-weight: 800
}

#s1 .ssub {
  color: #4d6a8a;
  font-size: 13px;
  margin-bottom: 24px
}

#s1 .aichip {
  background: rgba(0, 180, 255, .1);
  border: 1px solid rgba(0, 180, 255, .25);
  color: #67e8f9
}

#s1 .aidot {
  background: #67e8f9
}

#s1 .panel {
  background: transparent;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  box-shadow: none;
  backdrop-filter: blur(12px)
}

#s1 label {
  color: #8aacc8;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px
}

#s1 input,
#s1 select,
#s1 textarea {
  background: rgba(255, 255, 255, .1);
  border: 1.5px solid #0857853a;
  color: #364b67;
  border-radius: 10px
}

#s1 input::placeholder,
#s1 textarea::placeholder {
  color: #3d5a78
}

#s1 input:focus,
#s1 select:focus,
#s1 textarea:focus {
  border-color: #2980b9;
  box-shadow: 0 0 0 3px rgba(41, 128, 185, .2);
  background: rgba(255, 255, 255, .1)
}

#s1 select option {
  background: #ffffff;
  color: #085885
}

#s1 .req {
  color: #67e8f9
}

#s1 .brow {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .08)
}

#s1 .bnext {
  background: linear-gradient(135deg, #085885, #085885);
  box-shadow: 0 4px 18px rgba(26, 106, 170, .4);
  border: none
}

#s1 .bnext:hover {
  background: linear-gradient(135deg, #1a6aaa, #2980b9)
}

#s1 .bback {
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, .15);
  color: #8aacc8
}

#s1 .bback:hover {
  background: rgba(255, 255, 255, .07);
  border-color: rgba(255, 255, 255, .25)
}

/* S1 section divider title */
.s1-section-title {
  font-size: 10px;
  font-weight: 700;
  color: #2980b9;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 20px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  grid-column: 1/-1
}

/* FILE UPLOAD */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all .2s;
  background: #fafbfc;
  margin-top: 10px
}

.upload-zone:hover {
  border-color: var(--navy2);
  background: #eff6ff
}

.upload-zone input[type=file] {
  display: none
}

.upload-icon {
  font-size: 22px;
  flex-shrink: 0
}

.upload-info {
  flex: 1
}

.upload-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--navy)
}

.upload-sub {
  font-size: 10px;
  color: var(--gray);
  margin-top: 1px
}

.upload-list {
  margin-top: 7px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px
}

.upload-chip {
  background: #dbeafe;
  color: #1d4ed8;
  border-radius: 6px;
  padding: 3px 9px;
  font-size: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px
}

.upload-chip span {
  cursor: pointer;
  color: #64748b;
  font-weight: 700
}

/* PREVIEW SCREEN */
.prev-wrap {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  flex-wrap: wrap
}

.prev-drawing {
  flex: 1;
  min-width: 280px;
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden
}

.prev-dtabs {
  display: flex;
  border-bottom: 2px solid var(--border)
}

.prev-dtab {
  flex: 1;
  padding: 11px 0;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--gray);
  background: #fff;
  border: none;
  cursor: pointer;
  transition: all .2s
}

.prev-dtab.active {
  color: var(--orange);
  border-bottom: 2px solid var(--orange);
  margin-bottom: -2px
}

.prev-canvas {
  position: relative;
  overflow: hidden;
  background: #f0f6ff;
  cursor: grab;
  user-select: none;
  height: 380px
}

.prev-canvas.grabbing {
  cursor: grabbing
}

.prev-canvas svg,
.prev-canvas img {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  transform-origin: center center;
  transition: none
}

.prev-actions {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap
}

.prev-act {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--navy);
  transition: all .2s;
  display: flex;
  align-items: center;
  gap: 5px
}

.prev-act:hover {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy)
}

.prev-act.orange {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange)
}

.prev-act.orange:hover {
  background: var(--orange2)
}

.prev-info {
  width: 240px;
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 20px
}

.prev-info h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border)
}

.prev-dim {
  display: flex;
  flex-direction: column;
  gap: 8px
}

.prev-dim-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 10px;
  background: var(--light);
  border-radius: 8px
}

.prev-dim-row label {
  font-size: 10px;
  color: var(--gray);
  font-weight: 600
}

.prev-dim-row span {
  font-size: 12px;
  font-weight: 700;
  color: var(--navy)
}

.prev-zoom {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-top: 1px solid var(--border)
}

.prev-zoom-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center
}

.prev-zoom-btn:hover {
  background: var(--navy);
  color: #fff
}

.prev-zoom span {
  font-size: 11px;
  color: var(--gray);
  font-weight: 600;
  flex: 1;
  text-align: center
}

/* REVIEW TECHNICAL */
.rev-equip-block {
  border: 1.5px solid var(--border);
  border-radius: 12px;
  margin-bottom: 14px;
  overflow: hidden
}

.rev-equip-hdr {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--light)
}

.rev-equip-hdr img {
  width: 50px;
  height: 36px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border)
}

.rev-equip-hdr h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  flex: 1
}

.rev-tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--border)
}

.rev-tech-field {
  background: #f8fafc;
  border-radius: 8px;
  padding: 7px 10px
}

.rev-tech-field label {
  display: block;
  font-size: 9px;
  font-weight: 700;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: .3px;
  margin-bottom: 2px
}

.rev-tech-field span {
  font-size: 11px;
  font-weight: 600;
  color: var(--navy)
}

.rev-attach {
  padding: 8px 14px;
  border-top: 1px solid var(--border);
  background: #fffbeb
}

.rev-attach-label {
  font-size: 10px;
  font-weight: 600;
  color: #92400e;
  margin-bottom: 4px
}

.rev-attach-files {
  display: flex;
  flex-wrap: wrap;
  gap: 5px
}

.bg-white {
  background-color: white !important;
}

.bg-blue {
  background-color: #e8f0fb !important;
}