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

.uncut-hc-main {
  --bg: #f7f6f3;
  --surface: #ffffff;
  --surface2: #f0ede8;
  --border: #e2ddd6;
  --border2: #ccc7be;
  --text: #1a1916;
  --text2: #6b6760;
  --text3: #a09d98;
  --accent: #1d4ed8;
  --accent-bg: #eff4ff;
  --accent-border: #bfcfff;
  --green: #15803d;
  --green-bg: #f0fdf4;
  --green-border: #bbf7d0;
  --red: #b91c1c;
  --red-bg: #fef2f2;
  --red-border: #fecaca;
  --amber: #92400e;
  --amber-bg: #fffbeb;
  --amber-border: #fde68a;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);

  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.5;
  padding: 2rem 0;
}

.uncut-hc-header {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.uncut-hc-header h1 { font-size: 18px; font-weight: 600; letter-spacing: -.01em; margin: 0; }
.uncut-hc-header p { font-size: 13px; color: var(--text2); margin: 0; }
.uncut-hc-main .logo { width: 36px; height: 36px; background: var(--accent); border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.uncut-hc-main .logo svg { width: 20px; height: 20px; fill: white; }

.uncut-hc-container { max-width: 960px; margin: 0 auto; padding: 0 1.5rem; display: grid; gap: 1.25rem; }

.uncut-hc-main .card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.uncut-hc-main .card-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 1.25rem;
}

.uncut-hc-main .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.uncut-hc-main .grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
.uncut-hc-main .grid-results { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }

.uncut-hc-main .field { display: flex; flex-direction: column; gap: .4rem; }
.uncut-hc-main .field label { font-size: 12px; color: var(--text2); font-weight: 500; margin: 0; }
.uncut-hc-main .field input[type=text], .uncut-hc-main .field input[type=number], .uncut-hc-main .field input[type=email] {
  padding: .55rem .75rem;
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color .15s;
  font-family: inherit;
  width: 100%;
}
.uncut-hc-main .field input:focus, .pdf-email-section input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(29,78,216,.1); }
.uncut-hc-main .field input.error { border-color: var(--red); }
.uncut-hc-main .field-hint { font-size: 11px; color: var(--text3); }

.uncut-hc-main .slider-group { display: flex; flex-direction: column; gap: .4rem; }
.uncut-hc-main .slider-group label { font-size: 12px; color: var(--text2); font-weight: 500; display: flex; justify-content: space-between; margin: 0; }
.uncut-hc-main .slider-group label span { font-weight: 600; color: var(--text); }
.uncut-hc-main input[type=range] {
  width: 100%; height: 4px; border-radius: 2px; cursor: pointer;
  background: linear-gradient(to right, var(--accent) var(--pct, 0%), var(--border2) var(--pct, 0%));
  border: none; outline: none; appearance: none; -webkit-appearance: none;
}
.uncut-hc-main input[type=range]::-webkit-slider-thumb {
  appearance: none; -webkit-appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: white; border: 2px solid var(--accent);
  cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.15);
}

.uncut-hc-main .tipo-btns { display: flex; gap: .5rem; flex-wrap: wrap; }
.uncut-hc-main .tipo-btn {
  padding: .45rem 1rem; font-size: 13px; font-weight: 500;
  border: 1px solid var(--border2); border-radius: 99px;
  cursor: pointer; background: transparent; color: var(--text2);
  transition: all .15s; font-family: inherit;
}
.uncut-hc-main .tipo-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-bg); }
.uncut-hc-main .tipo-btn.active { background: var(--accent); border-color: var(--accent); color: white; }

.uncut-hc-main .euribor-row {
  display: none; align-items: center; gap: .75rem;
  margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border);
  font-size: 13px; color: var(--text2);
}
.uncut-hc-main .euribor-row.visible { display: flex; }
.uncut-hc-main .euribor-row input { width: 90px; }
.uncut-hc-main .euribor-badge {
  font-size: 11px; padding: 2px 8px; border-radius: 99px;
  background: var(--accent-bg); color: var(--accent); border: 1px solid var(--accent-border);
}

/* Bonificadores */
.uncut-hc-main .bonif-table { width: 100%; border-collapse: collapse; }
.uncut-hc-main .bonif-table thead tr { border-bottom: 1px solid var(--border); }
.uncut-hc-main .bonif-table thead th { font-size: 11px; font-weight: 600; color: var(--text3); text-align: left; padding: .4rem .5rem; letter-spacing: .04em; }
.uncut-hc-main .bonif-table thead th:not(:first-child) { text-align: right; }
.uncut-hc-main .bonif-table tbody tr { border-bottom: 1px solid var(--border); }
.uncut-hc-main .bonif-table tbody tr:last-child { border-bottom: none; }
.uncut-hc-main .bonif-table td { padding: .5rem .5rem; vertical-align: middle; }
.uncut-hc-main .bonif-table td:not(:first-child) { text-align: right; }

.uncut-hc-main .toggle-wrap { display: flex; align-items: center; gap: .5rem; }
.uncut-hc-main .toggle {
  width: 32px; height: 18px; border-radius: 9px;
  background: var(--border2); cursor: pointer; position: relative;
  transition: background .2s; flex-shrink: 0; border: none; outline: none; padding: 0;
}
.uncut-hc-main .toggle.on { background: var(--green); }
.uncut-hc-main .toggle::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 14px; height: 14px; border-radius: 50%; background: white;
  transition: left .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.uncut-hc-main .toggle.on::after { left: 16px; }
.uncut-hc-main .bonif-name-input {
  border: 1px solid transparent; border-radius: 4px; padding: .2rem .4rem;
  font-size: 13px; color: var(--text); background: transparent;
  font-family: inherit; width: 100%; min-width: 120px;
  transition: border-color .15s, background .15s;
}
.uncut-hc-main .bonif-name-input:hover { border-color: var(--border2); background: var(--surface2); }
.uncut-hc-main .bonif-name-input:focus { outline: none; border-color: var(--accent); background: white; }
.uncut-hc-main .bonif-num-input {
  width: 72px; padding: .25rem .4rem; text-align: right;
  border: 1px solid var(--border2); border-radius: 4px;
  font-size: 13px; color: var(--text); font-family: inherit;
  background: var(--surface);
}
.uncut-hc-main .bonif-num-input:focus { outline: none; border-color: var(--accent); }
.uncut-hc-main .del-btn {
  width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid var(--border2); background: transparent;
  cursor: pointer; color: var(--text3); font-size: 16px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s; font-family: inherit; padding: 0;
}
.uncut-hc-main .del-btn:hover { background: var(--red-bg); border-color: var(--red-border); color: var(--red); }
.uncut-hc-main .add-btn {
  margin-top: .75rem; width: 100%; padding: .5rem;
  border: 1px dashed var(--border2); border-radius: var(--radius-sm);
  background: transparent; color: var(--text2); font-size: 13px;
  cursor: pointer; font-family: inherit; transition: all .15s;
}
.uncut-hc-main .add-btn:hover { background: var(--surface2); border-color: var(--accent); color: var(--accent); }

.email-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 400px;
  margin-top: 0.5rem;
}

/* Modals */
.uncut-hc-main .metric-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.125rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.uncut-hc-main .metric-label { font-size: 11px; color: var(--text2); font-weight: 500; margin-bottom: .25rem; text-transform: uppercase; letter-spacing: .04em; line-height: 1.2; }
.uncut-hc-main .metric-value { font-size: 20px; font-weight: 600; color: var(--text); letter-spacing: -.02em; }
.uncut-hc-main .metric-sub { font-size: 11px; color: var(--text3); margin-top: .2rem; }
.uncut-hc-main .metric-value.green { color: var(--green); }
.uncut-hc-main .metric-value.red { color: var(--red); }

/* Desglose */
.uncut-hc-main .desglose-row { display: flex; justify-content: space-between; align-items: center; padding: .45rem 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.uncut-hc-main .desglose-row:last-child { border-bottom: none; }
.uncut-hc-main .desglose-lbl { color: var(--text2); }
.uncut-hc-main .desglose-val { font-weight: 600; color: var(--text); }
.uncut-hc-main .desglose-sub { font-size: 12px; color: var(--text3); }

.uncut-hc-main .tag {
  display: inline-flex; align-items: center; font-size: 11px;
  padding: 2px 8px; border-radius: 99px; font-weight: 500; margin-left: 6px;
}
.uncut-hc-main .tag-green { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-border); }
.uncut-hc-main .tag-red { background: var(--red-bg); color: var(--red); border: 1px solid var(--red-border); }
.uncut-hc-main .tag-amber { background: var(--amber-bg); color: var(--amber); border: 1px solid var(--amber-border); }

.uncut-hc-main .veredicto {
  border-radius: var(--radius-sm); padding: .875rem 1rem;
  font-size: 13px; margin-top: 1rem; line-height: 1.5;
}
.uncut-hc-main .veredicto.green { background: var(--green-bg); border: 1px solid var(--green-border); color: var(--green); }
.uncut-hc-main .veredicto.red { background: var(--red-bg); border: 1px solid var(--red-border); color: var(--red); }
.uncut-hc-main .veredicto.amber { background: var(--amber-bg); border: 1px solid var(--amber-border); color: var(--amber); }
.uncut-hc-main .veredicto-title { font-weight: 600; margin-bottom: .25rem; font-size: 14px; }

/* Botón PDF */
.uncut-hc-main .pdf-btn {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .6rem 1.25rem; background: var(--text); color: white;
  border: none; border-radius: var(--radius-sm); font-size: 13px;
  font-weight: 500; cursor: pointer; font-family: inherit;
  transition: all .15s; text-decoration: none;
}
.uncut-hc-main .pdf-btn:hover { background: #333; transform: translateY(-1px); }
.uncut-hc-main .pdf-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.uncut-hc-main .results-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.uncut-hc-main .results-header .card-title { margin-bottom: 0; }

.uncut-hc-main .sep { height: 1px; background: var(--border); margin: .75rem 0; }

.uncut-hc-main .mixta-info {
  font-size: 12px; color: var(--text3); background: var(--surface2);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: .5rem .75rem; margin-top: .75rem;
}

@media (max-width: 900px) {
  .uncut-hc-main .grid-results { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .uncut-hc-main .grid2, .uncut-hc-main .grid3, .uncut-hc-main .grid-results { grid-template-columns: 1fr; }
  .uncut-hc-main .uncut-hc-container { padding: 1rem; width: 100%; overflow-x: hidden; }
  .uncut-hc-main .tabs { flex-wrap: wrap; }
  .uncut-hc-main .tabs .tipo-btn { flex: 1; text-align: center; }
  .uncut-hc-main .bonif-table thead th:nth-child(4) { display: none; }
  .uncut-hc-main .bonif-table td:nth-child(4) { display: none; }
  .email-form { max-width: 100%; }
}
