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

:root{
  --bg:#f4f6fb;
  --card:#ffffff;
  --text:#0f172a;
  --muted:#64748b;
  --line:#e2e8f0;
  --brand:#2563eb;
  --brand2:#1d4ed8;
  --soft:#f8fafc;
}

body{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  background:radial-gradient(1000px 400px at 50% -150px,rgba(37,99,235,.15),transparent),var(--bg);
  padding:32px 14px;
  color:var(--text);
}

.container{
  max-width:980px;
  margin:auto;
  background:#fff;
  border-radius:20px;
  padding:26px;
  box-shadow:0 20px 50px rgba(15,23,42,.15);
}

.header{
  text-align:center;
  margin-bottom:20px;
}

h1{font-size:26px}
.subtitle{font-size:14px;color:var(--muted)}

.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:18px;
  padding:16px;
  margin-bottom:16px;
}

.card-title{
  font-size:13px;
  font-weight:700;
  color:var(--muted);
  text-transform:uppercase;
  margin-bottom:12px;
}

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

.field{display:flex;flex-direction:column}
label{font-size:13px;font-weight:600}

.piso_panel {
  margin-top: 4%;
  display: flex;
  align-items: center;      /* alinea verticalmente */
  gap: 12px;                /* espacio entre label y botones */
}

.piso_panel label {
  margin: 0;
  white-space: nowrap;      /* evita que el texto se parta */
}

input,select{
  margin-top:6px;
  padding:10px;
  border-radius:10px;
  border:1px solid #cbd5f5;
  font-size:14px;
}
input:focus,select:focus{
  outline:none;
  border-color:var(--brand);
  box-shadow:0 0 0 3px rgba(37,99,235,.15);
}

.section{margin-top:12px}
.section h3{font-size:15px;margin-bottom:8px}

.button-group{
  display:inline-flex;
  border:1px solid var(--line);
  border-radius:999px;
  padding:4px;
  background:#fff;
}

.btn-option{
  padding:8px 14px;
  border:none;
  background:transparent;
  border-radius:999px;
  cursor:pointer;
  font-weight:700;
  font-size:13px;
  color:var(--muted);
}
.btn-option.active{
  background:var(--brand);
  color:#fff;
  box-shadow:0 8px 20px rgba(37,99,235,.35);
}

.detalles{
  margin-top:10px;
  padding:12px;
  border-radius:14px;
  background:var(--soft);
  border:1px dashed #d6def0;
}

.actions{text-align:center;margin-top:16px}

.btn-primary{
  width:100%;
  padding:12px;
  border-radius:999px;
  border:none;
  background:var(--brand);
  color:#fff;
  font-size:15px;
  font-weight:700;
  cursor:pointer;
}
.btn-primary:hover{background:var(--brand2)}

.actions-hint{
  margin-top:8px;
  font-size:12px;
  color:var(--muted);
}

.resultado{
  margin-top:18px;
  padding:16px;
  border-radius:16px;
  background:linear-gradient(180deg,#fff,#f8fafc);
  border:1px solid var(--line);
}

.btn-descargar{
  display:inline-flex;
  align-items:center;
  gap:6px;
  margin-top:12px;
  padding:8px 14px;
  border-radius:999px;
  background:rgba(37,99,235,.1);
  color:var(--brand2);
  border:1px solid rgba(37,99,235,.25);
  cursor:pointer;
}
.btn-descargar::before{content:"⬇️"}

.btn-descargar[hidden] {
  display: none !important;
}


.footer{
  margin-top:20px;
  text-align:center;
  font-size:12px;
  color:var(--muted);
}

@media(max-width:720px){
  .grid,.grid-2{grid-template-columns:1fr}
}



/* =========================
   RESULTADO / COTIZACIÓN
   ========================= */

.cortes-list{
  margin: 8px 0 0;
  padding-left: 18px;
}


.totales-row.descuento span {
  color: #d32f2f; /* rojo elegante */
  font-weight: 600;
}

.dimensiones-camara {
  margin-top: 10px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #000000;
}

.dimensiones-camara::before {
  content: "Dimensiones: ";
  font-size: 12px;
  font-weight: 500;
  opacity: 0.7;
  display: block;
  margin-bottom: 2px;
}


.resultado{
  margin-top:18px;
  padding:16px 18px 18px;
  border-radius:16px;
  background:#f8fafc;
  border:1px solid #e2e8f0;
}

.result-header{
  display:flex;
  flex-wrap:wrap;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
  margin-bottom:10px;
}

/* Badges */
.badge{
  display:inline-flex;
  align-items:center;
  padding:4px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  line-height:1;
  margin:0 8px 8px 0;
}
.badge-muted{
  background:#e2e8f0;
  color:#475569;
}
.badge-blue{
  background:#dbeafe;
  color:#1d4ed8;
}

/* Totales */
.totales{
  min-width:240px;
  font-size:14px;
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:14px;
  padding:10px 12px;
  box-shadow:0 6px 16px rgba(15,23,42,.06);
}
.totales-row{
  display:flex;
  justify-content:space-between;
  gap:14px;
  margin-top:4px;
}
.totales-row strong{
  font-weight:800;
}

.linea{
  border-top:1px dashed #cbd5e1;
  margin:12px 0;
}

/* Tabla detalle */
.detalle-table{
  width:100%;
  border-collapse:collapse;
  margin-top:10px;
  font-size:13px;
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:14px;
  overflow:hidden;
}
.detalle-table thead{
  background:#e5edff;
}
.detalle-table th,
.detalle-table td{
  padding:8px 10px;
  text-align:right;
  border-bottom:1px solid #eef2f7;
}
.detalle-table th:first-child,
.detalle-table td:first-child{
  text-align:left;
}
.detalle-table tbody tr:nth-child(odd){
  background:#f8fafc;
}

/* Paneles */
.paneles{
  margin-top:14px;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.panel-card{
  background:#fff;
  border-radius:14px;
  padding:12px 14px;
  border:1px solid #e2e8f0;
  box-shadow:0 6px 16px rgba(15,23,42,.06);
}
.panel-card h4{
  margin:0 0 8px;
  font-size:14px;
  color:#0f172a;
  display:flex;
  align-items:center;
  gap:8px;
}

.panel-row{
  margin-top:10px;
  padding-top:10px;
  border-top:1px dashed #e2e8f0;
}
.panel-row-head{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  font-size:13px;
  color:#0f172a;
}
.panel-row-cortes{
  margin-top:6px;
  font-size:13px;
  color:#475569;
}

.paneles-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}

.paneles-left{
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.paneles-right{
  display: block;
}
/* Texto muted */
.muted{
  color:#64748b;
  font-size:12px;
  margin-top:10px;
}

@media(max-width:720px){
  .paneles{ grid-template-columns:1fr; }
  .totales{ width:100%; }
}
