:root {
  --bg-body: #f4f4f8;
  --card: #ffffff;
  --primary: #020f57;
  --accent: #e74606;
  --accent2: #f60;
  --accent-grad: linear-gradient(135deg, #e74606 0%, #f60 45%, #020f57 100%);
  --input-bg: #eff3f6;
  --neu-dark: #cbd0d6;
  --neu-light: #ffffff;
  --shadow-card: 0 12px 24px rgba(2, 15, 87, 0.10);
  --metal-border: linear-gradient(to right, #8e9eab, #eef2f3, #8e9eab);
}

* {
  box-sizing: border-box
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-body);
  margin: 0;
  padding: 15px;
  display: flex;
  justify-content: center;
  color: #2d3436;
}

.container {
  width: 100%;
  max-width: 1050px;
}

/* HEADER FORMULARIO */
.app-header {
  background: var(--accent-grad);
  color: #fff;
  padding: 30px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 20px 40px rgba(231, 70, 6, .35), inset 0 1px 0 rgba(255, 255, 255, .12);
  margin-bottom: 22px;
  position: relative;
  overflow: hidden;
  border-bottom: 8px solid transparent;
  border-image: var(--metal-border);
  border-image-slice: 1;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 22px;
  z-index: 2;
}

.header-svg {
  width: 86px;
  height: 86px;
  flex-shrink: 0;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.35));
}

.header-titles h1 {
  font-family: 'Rajdhani', sans-serif;
  margin: 0;
  font-size: 3.1em;
  line-height: .95;
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: 1px;
  text-shadow: 0 1px 0 #d8d8d8, 0 2px 0 #c9c9c9, 0 3px 0 #bdbdbd,
    0 4px 0 #b0b0b0, 0 6px 10px rgba(0, 0, 0, .28);
}

.header-titles .subtitle {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.05em;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 3px;
  background: linear-gradient(to bottom, #ffffff 0%, #ffe0d4 25%, #ffb499 55%, #e74606 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.55));
  display: inline-block;
  margin-top: 8px;
}

.folio-box {
  background: rgba(0, 0, 0, 0.28);
  border: 2px solid rgba(255, 255, 255, 0.12);
  padding: 10px 18px;
  border-radius: 12px;
  text-align: center;
  backdrop-filter: blur(6px);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.45);
  z-index: 2;
}

.folio-label {
  display: block;
  font-size: .80em;
  letter-spacing: 2px;
  font-family: 'Rajdhani';
  color: #d7f5e5;
  font-weight: 900;
}

#folioInput {
  background: transparent;
  border: none;
  color: #fff;
  font-family: 'Rajdhani';
  font-size: 2.35em;
  width: 130px;
  text-align: center;
  font-weight: 900;
  outline: none;
  padding: 0;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.55);
}

.info-bar {
  display: flex;
  justify-content: space-between;
  padding: 0 10px 16px 10px;
  font-size: .92em;
  color: #636e72;
  font-weight: 800;
}

/* CARDS */
.card {
  background: var(--card);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-card);
  border-top: 5px solid var(--accent);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 2px solid #f1f2f6;
  padding-bottom: 14px;
  margin-bottom: 18px;
}

.card-header i {
  color: var(--accent);
  font-size: 1.5em;
  filter: drop-shadow(0 2px 4px rgba(10, 168, 79, .20));
}

.card-header h2 {
  margin: 0;
  font-family: 'Rajdhani';
  font-size: 1.6em;
  color: var(--primary);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .6px;
}

/* INPUTS */
.input-group {
  margin-bottom: 14px;
}

.input-group label {
  display: block;
  font-size: .85em;
  font-weight: 800;
  color: #57606f;
  margin-bottom: 7px;
  margin-left: 4px;
}

.neo-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--input-bg);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: inset 5px 5px 10px var(--neu-dark), inset -5px -5px 10px var(--neu-light);
  font-size: 15px;
  color: #2d3436;
  outline: none;
  transition: .25s ease;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
}

.neo-input:focus {
  background: #fffbfa;
  border-color: rgba(231, 70, 6, .30);
  box-shadow: inset 3px 3px 6px var(--neu-dark), inset -3px -3px 6px var(--neu-light);
  color: #020f57;
}

textarea.neo-input {
  resize: vertical;
  min-height: 80px;
}

/* LAYOUTS */
.split-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.split-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

.tech-layout {
  display: grid;
  grid-template-columns: 1fr 290px;
  gap: 22px;
}

/* Logo */
.logo-area {
  background: var(--input-bg);
  border: 2px dashed #b2bec3;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  cursor: pointer;
  transition: .25s;
  position: relative;
  overflow: hidden;
  box-shadow: inset 3px 3px 6px #d1d5db;
}

.logo-area:hover {
  border-color: var(--accent);
  background: #ecfff4;
}

.logo-area.has-image {
  border: none;
  background: transparent;
  box-shadow: none;
}

#uploadedLogo {
  max-width: 100%;
  max-height: 200px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: none;
  padding: 10px;
}

#cancelLogo {
  position: absolute;
  top: 6px;
  right: 8px;
  color: #e74c3c;
  border: none;
  background: none;
  font-weight: 900;
  font-size: 1.6em;
  display: none;
  cursor: pointer;
  text-shadow: 0 3px 6px rgba(0, 0, 0, .25);
  z-index: 3;
}

/* Foto evidencias FORMULARIO */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.photo-box {
  background: var(--input-bg);
  border: 1px dashed #b2bec3;
  border-radius: 14px;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: inset 3px 3px 6px #d1d5db;
}

.photo-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.photo-box .ph-label {
  text-align: center;
  font-weight: 900;
  color: #8c9aa6;
  font-size: .78em;
  padding: 10px;
  line-height: 1.3;
}

.photo-box .ph-x {
  position: absolute;
  top: 6px;
  right: 8px;
  border: none;
  background: rgba(255, 255, 255, .85);
  width: 28px;
  height: 28px;
  border-radius: 10px;
  font-weight: 900;
  cursor: pointer;
  color: #e74c3c;
  display: none;
  box-shadow: 0 8px 16px rgba(0, 0, 0, .12);
}

/* CHECKLIST */
.check-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.custom-check {
  display: block;
  position: relative;
  padding-left: 35px;
  cursor: pointer;
  font-size: .9em;
  color: #444;
  font-weight: 700;
  user-select: none;
  line-height: 1.35;
  padding-top: 2px;
  padding-bottom: 2px;
}

.custom-check input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  top: -1px;
  left: 0;
  height: 22px;
  width: 22px;
  background: #eef2f5;
  border-radius: 6px;
  box-shadow: 4px 4px 8px #d1d5db, -4px -4px 8px #fff;
  transition: .18s ease;
}

.custom-check:hover input~.checkmark {
  background: #e6eef5;
}

.custom-check input:checked~.checkmark {
  background: var(--accent);
  box-shadow: inset 3px 3px 6px rgba(0, 0, 0, .28), inset -3px -3px 6px rgba(255, 255, 255, .12);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 8px;
  top: 4px;
  width: 4px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.custom-check input:checked~.checkmark:after {
  display: block;
}

/* ITEMS (rows) */
.row-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
  background: #fff;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #e1e1e1;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.06);
  margin-bottom: 10px;
}

.row-item .neo-input {
  padding: 10px 12px;
  border-radius: 10px;
}

.w-34 {
  flex: 1 1 340px;
}

.w-22 {
  flex: 1 1 220px;
}

.w-16 {
  flex: 1 1 160px;
}

.w-12 {
  flex: 1 1 120px;
}

.w-10 {
  flex: 1 1 100px;
}

.btn-del {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  color: #e74c3c;
  cursor: pointer;
  background: #eef2f5;
  box-shadow: 5px 5px 10px #d1d5db, -5px -5px 10px #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1em;
  flex-shrink: 0;
  margin-top: 2px;
  transition: .18s;
}

.btn-del:active {
  box-shadow: inset 2px 2px 5px #d1d5db, inset -2px -2px 5px #fff;
}

.btn {
  border: none;
  padding: 14px;
  border-radius: 12px;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: .90em;
  width: 100%;
  margin-top: 10px;
  background: #dfe6e9;
  color: #2d3436;
  text-transform: uppercase;
  box-shadow: 5px 5px 10px #d1d5db, -5px -5px 10px #fff;
  transition: .18s;
}

.btn:active {
  box-shadow: inset 2px 2px 5px #d1d5db, inset -2px -2px 5px #fff;
}

/* RESUMEN FINANCIERO FORMULARIO */
.summary {
  background: var(--accent-grad);
  color: #fff;
  padding: 28px;
  border-radius: 18px;
  margin-top: 10px;
  box-shadow: 0 22px 44px rgba(231, 70, 6, .28);
}

.sum-title {
  font-family: 'Rajdhani';
  font-size: 1.6em;
  border-bottom: 1px solid rgba(255, 255, 255, .22);
  padding-bottom: 14px;
  margin: 0 0 18px 0;
  letter-spacing: 1px;
  font-weight: 900;
}

.sum-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.sum-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 1em;
  opacity: .95;
}

.sum-big {
  font-size: 1.25em;
  border-bottom: 1px dashed rgba(255, 255, 255, .30);
  padding-bottom: 10px;
  margin-bottom: 12px;
}

.pill {
  background: rgba(0, 0, 0, .22);
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, .10);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.money-input {
  width: 200px;
  /* Aumentado para COP */
  text-align: right;
  font-weight: 900;
  font-size: 1.15em;
  color: #e74606 !important;
  background: #fff !important;
  box-shadow: inset 3px 3px 6px #cfcfcf, inset -3px -3px 6px #fff !important;
  border-radius: 10px;
  border: none;
  padding: 8px 10px;
  outline: none;
}

.final {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 2px dashed rgba(255, 255, 255, .40);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.final .label {
  font-size: 1.45em;
  font-family: 'Rajdhani';
  font-weight: 900;
}

.final .amount {
  font-size: 2.8em;
  font-family: 'Rajdhani';
  font-weight: 900;
  text-shadow: 0 4px 12px rgba(0, 0, 0, .28);
}

/* Toggle */
.switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #ccc;
  transition: .35s;
  border-radius: 34px;
  box-shadow: inset 2px 2px 4px rgba(0, 0, 0, .2);
}

.slider:before {
  position: absolute;
  content: "";
  height: 21px;
  width: 21px;
  left: 4px;
  bottom: 3.5px;
  background: #fff;
  transition: .35s;
  border-radius: 50%;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, .2);
}

input:checked+.slider {
  background: var(--accent);
}

input:checked+.slider:before {
  transform: translateX(24px);
}

/* Signature */
#signature-pad {
  width: 100%;
  height: 150px;
  border-radius: 12px;
  cursor: crosshair;
  background: var(--input-bg);
  box-shadow: inset 5px 5px 10px var(--neu-dark), inset -5px -5px 10px var(--neu-light);
  border: none;
}

/* Buttons */
.btn-gen {
  background: var(--accent-grad);
  color: #fff;
  padding: 22px;
  font-size: 1.28em;
  margin-top: 26px;
  box-shadow: 0 18px 36px rgba(231, 70, 6, .25);
  border-radius: 14px;
  width: 100%;
  border: none;
  font-weight: 900;
  letter-spacing: 1px;
  cursor: pointer;
  text-transform: uppercase;
  font-family: 'Rajdhani';
  transition: transform .18s;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
}

.btn-gen:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 44px rgba(231, 70, 6, .30);
}

.btn-reset {
  background: none;
  border: 2px solid #e74c3c;
  color: #e74c3c;
  padding: 14px;
  border-radius: 12px;
  width: 100%;
  margin-top: 16px;
  cursor: pointer;
  font-size: .90em;
  font-weight: 900;
  transition: .22s;
}

.btn-reset:hover {
  background: #e74c3c;
  color: #fff;
}

.footer-brand {
  text-align: center;
  margin-top: 36px;
  font-family: 'Rajdhani';
  letter-spacing: 2px;
  font-weight: 900;
  font-size: 1.1em;
  background: linear-gradient(to right, #7f8c8d 0%, #2c3e50 30%, #e74606 50%, #2c3e50 70%, #7f8c8d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% auto;
  animation: shine 4s infinite linear;
}

@keyframes shine {
  to {
    background-position: 200% center;
  }
}

/* Hidden report */
#report-wrapper {
  position: absolute;
  left: -9999px;
  top: -9999px;
}

#final-report {
  width: 960px;
  padding: 50px;
  background: #fff;
  color: #333;
  font-family: 'Inter', sans-serif;
}

/* ESTILOS ESPECÍFICOS DEL REPORTE DISEÑADOS PARA NO APLASTAR */
.r-total-box {
  background: #1e272e;
  color: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
}

.r-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.95em;
}

.r-total-row:last-child {
  border-bottom: none;
}

.r-total-row.big {
  background: rgba(231, 70, 6, 0.1);
  padding: 18px 20px;
}

.r-total-row.big span:last-child {
  font-family: 'Rajdhani';
  font-size: 2.1em;
  /* Ligeramente menor para acomodar ceros de COP */
  font-weight: 900;
  color: #f60;
  text-shadow: 0 0 10px rgba(255, 102, 0, 0.3);
}

.r-total-label {
  font-weight: 700;
  opacity: 0.8;
}

.r-total-value {
  font-weight: 800;
  font-family: 'Rajdhani';
  font-size: 1.2em;
}

.r-photo-item {
  width: 100%;
  height: 180px;
  border-radius: 10px;
  border: 1px solid #eee;
  overflow: hidden;
}

.r-photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Responsive */
@media (max-width: 900px) {
  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  body {
    padding: 10px;
  }

  .card {
    padding: 20px;
  }

  .split-2,
  .tech-layout,
  .sum-grid {
    grid-template-columns: 1fr !important;
    gap: 18px;
  }

  .split-3 {
    grid-template-columns: 1fr !important;
  }

  .check-grid {
    grid-template-columns: 1fr !important;
  }

  .app-header {
    flex-direction: column;
    text-align: center;
    gap: 18px;
    padding: 24px 14px;
  }

  .header-left {
    flex-direction: column;
    gap: 14px;
  }

  .header-titles h1 {
    font-size: 2.2em;
    line-height: 1.1;
  }

  .header-titles .subtitle {
    font-size: .92em;
    letter-spacing: 2px;
  }

  .logo-area {
    width: 100%;
    min-height: 180px;
  }

  .row-item {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .btn-del {
    align-self: flex-end;
    width: 100%;
    border-radius: 10px;
  }

  .final .amount {
    font-size: 2.2em;
  }

  .pill {
    flex-direction: column;
    align-items: flex-start;
  }

  .money-input {
    width: 100%;
  }
}