/* Template Corner + Shark Tank Room styles. */

/* style.css tiene body { height:100vh; overflow:hidden } para que el cockpit
   con su layout grid no tenga scroll global · pero ESO MATA el scroll en
   paginas estandar que tambien cargan style.css. Override:
   - body con clases tp-body / shark-body / .lp-body usa scroll normal de
     viewport, con min-height 100vh para que el footer no quede arriba.
*/
body.lp-body,
body.tp-body,
body.shark-body {
  height: auto !important;
  overflow-y: auto !important;
  min-height: 100vh;
}

.page-header {
  max-width: 1100px;
  margin: 40px auto 24px;
  padding: 0 24px;
}
.page-header .back-link {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--lp-muted, #9aa3b2);
  text-decoration: none;
  font-size: 13px;
}
.page-header .back-link:hover { color: var(--lp-text, #fff); }
.page-header h1 {
  font-size: 32px;
  margin: 0 0 8px;
  color: var(--lp-text, #fff);
}
.page-header p.muted {
  margin: 0;
  font-size: 15px;
  color: var(--lp-muted, #9aa3b2);
}

.templates-grid {
  max-width: 1100px;
  margin: 24px auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.template-card {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 20px;
  background: rgba(255,255,255,0.02);
  display: flex;
  flex-direction: column;
  transition: border-color .2s, transform .2s;
}
.template-card:hover {
  border-color: rgba(255,255,255,0.18);
  transform: translateY(-2px);
}
/* Badges · selector global · funcionan tanto en cards de templates
   como en el header del template-preview. */
.industry-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  background: rgba(126,217,192,0.12);
  color: #7ED9C0;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}
.template-card .industry-badge {
  margin-bottom: 12px;
}
.size-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  background: rgba(255,180,84,0.10);
  color: #FFB454;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  margin-left: 6px;
}
.template-card .size-badge {
  margin-bottom: 12px;
}
.template-card h3 {
  margin: 0 0 6px;
  font-size: 18px;
  color: var(--lp-text, #fff);
}
.template-card .tagline {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--lp-muted, #9aa3b2);
  line-height: 1.5;
}
.template-card .meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--lp-muted, #9aa3b2);
  margin-bottom: 16px;
}
.template-card .meta span strong { color: var(--lp-text, #fff); }
.template-card .actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}
.template-card .btn-use {
  flex: 1;
  padding: 10px 14px;
  border-radius: 8px;
  border: 0;
  background: linear-gradient(135deg, #7ED9C0, #5BBFA2);
  color: #0b1426;
  font-weight: 700;
  cursor: pointer;
  font-size: 14px;
}
.template-card .btn-use:hover { filter: brightness(1.08); }
.template-card .btn-use:disabled { opacity: 0.5; cursor: not-allowed; }
.template-card .btn-preview {
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  background: transparent;
  color: var(--lp-text, #fff);
  cursor: pointer;
  font-size: 13px;
}
.template-card .btn-preview:hover { border-color: rgba(255,255,255,0.32); }

.how-it-works {
  max-width: 900px;
  margin: 48px auto;
  padding: 0 24px;
}
.how-it-works h2 {
  font-size: 20px;
  margin: 0 0 16px;
  color: var(--lp-text, #fff);
}
.how-it-works ol {
  padding-left: 22px;
  color: var(--lp-muted, #9aa3b2);
  line-height: 1.7;
}
.how-it-works ol strong { color: var(--lp-text, #fff); }

.legal-foot {
  max-width: 1100px;
  margin: 80px auto 32px;
  padding: 32px 24px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* ============================================================ */
/* Template preview + full editor (/template-preview.html)      */
/* ============================================================ */

.tp-body {
  /* Reserva espacio para el action bar fixed al final */
  padding-bottom: 110px;
}

.tp-header {
  position: sticky;
  top: 0;
  z-index: 50;
  margin: 0;
  padding: 0;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  border-top: 0;
}

.tp-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 24px;
}

.tp-back {
  display: inline-block;
  color: var(--lp-text-3);
  text-decoration: none;
  font-size: 13px;
  margin-bottom: 8px;
  transition: color 0.15s;
}
.tp-back:hover { color: var(--lp-matrix); }

.tp-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.tp-title-row h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  color: var(--lp-text);
  letter-spacing: -0.3px;
}

.tp-badges {
  display: flex;
  gap: 8px;
}

.tp-tagline {
  margin: 6px 0 0;
  color: var(--lp-text-3);
  font-size: 14px;
  line-height: 1.5;
}

.tp-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 24px 0;
}

.tp-status {
  text-align: center;
  padding: 60px 24px;
  color: var(--lp-text-mute);
  font-size: 14px;
}

.tp-card {
  padding: 24px 28px;
  margin-bottom: 20px;
  border-radius: var(--lp-radius-lg);
}

.tp-section-head {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--lp-line);
}

.tp-section-head h2 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 700;
  color: var(--lp-text);
  letter-spacing: -0.2px;
}

.tp-section-sub {
  margin: 0;
  color: var(--lp-text-mute);
  font-size: 13px;
}

/* Module card · same glass treatment + accent rail */
.tp-module {
  padding: 24px 28px;
  margin-bottom: 18px;
  border-radius: var(--lp-radius-lg);
  position: relative;
}

.tp-module::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20px;
  bottom: 20px;
  width: 3px;
  background: linear-gradient(180deg, var(--lp-matrix), var(--lp-gold));
  border-radius: 0 3px 3px 0;
  opacity: 0.6;
}

.tp-module-num {
  display: inline-block;
  width: 26px;
  height: 26px;
  line-height: 26px;
  text-align: center;
  border-radius: 50%;
  background: var(--lp-matrix);
  color: var(--lp-ink);
  font-weight: 800;
  font-size: 13px;
  margin-right: 10px;
  vertical-align: middle;
}

.tp-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.tp-field {
  display: flex;
  flex-direction: column;
}

.tp-field-label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
  gap: 12px;
}

.tp-field-name {
  color: var(--lp-text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  flex: 1;
}

.tp-field-key {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-family: var(--lp-font-mono);
  color: var(--lp-text-mute);
  white-space: nowrap;
}

.tp-field input,
.tp-field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 14px;
  border-radius: var(--lp-radius-sm);
  border: 1px solid var(--lp-line);
  background: var(--lp-ink);
  color: var(--lp-text);
  font-size: 14px;
  font-family: var(--lp-font-sans);
  line-height: 1.55;
  resize: vertical;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.tp-field input:focus,
.tp-field textarea:focus {
  outline: none;
  border-color: var(--lp-matrix);
  box-shadow: 0 0 0 3px rgba(0, 212, 184, 0.15);
}

.tp-field.modified input,
.tp-field.modified textarea {
  border-color: var(--lp-gold);
  background: linear-gradient(0deg, rgba(224, 169, 95, 0.05), rgba(224, 169, 95, 0.05)), var(--lp-ink);
}

.tp-action-spacer {
  height: 20px;
}

/* Fixed action bar at the bottom of the viewport */
.tp-action-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  background: rgba(10, 22, 40, 0.92);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--lp-line);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.35);
}

.tp-action-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.tp-diff-pill {
  flex: 1;
  text-align: center;
  font-size: 12px;
  color: var(--lp-text-3);
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--lp-glass);
  border: 1px solid var(--lp-line);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tp-diff-pill.has-changes {
  color: var(--lp-gold);
  border-color: rgba(224, 169, 95, 0.35);
  background: rgba(224, 169, 95, 0.08);
}

.tp-action-bar .lp-cta,
.tp-action-bar .lp-cta-ghost {
  padding: 10px 18px;
  font-size: 13px;
  white-space: nowrap;
}

.tp-action-bar .lp-cta:disabled,
.tp-action-bar .lp-cta-ghost:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.tp-foot {
  max-width: 1100px;
  margin: 40px auto 24px;
  padding: 0 24px;
}

/* Responsive */
@media (max-width: 700px) {
  .tp-action-inner { flex-wrap: wrap; }
  .tp-diff-pill { order: 3; flex-basis: 100%; }
  .tp-action-bar .lp-cta { flex: 1; }
  .tp-title-row h1 { font-size: 22px; }
  .tp-body { padding-bottom: 160px; }
}

/* Customize modal */
.customize-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}
.customize-modal {
  background: #1a2238;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  padding: 28px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}
.customize-modal h2 {
  margin: 0 0 4px;
  font-size: 22px;
  color: #fff;
}
.customize-modal p.muted {
  margin: 0 0 20px;
  color: var(--lp-muted, #9aa3b2);
}
.customize-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}
.customize-field {
  display: block;
}
.customize-field .field-label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--lp-muted, #9aa3b2);
  margin-bottom: 4px;
  font-weight: 600;
}
.customize-field input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.25);
  color: #fff;
  font-size: 14px;
  box-sizing: border-box;
}
.customize-field input:focus {
  outline: none;
  border-color: #7ED9C0;
}
.customize-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.legal-foot a { color: var(--lp-muted, #9aa3b2); text-decoration: none; }
.legal-foot a:hover { color: var(--lp-text, #fff); }

/* ============================================================ */
/* Shark Tank Room                                              */
/* ============================================================ */

.shark-body {
  background: radial-gradient(ellipse at top, #1a1f3a 0%, #0b1426 60%);
  min-height: 100vh;
}

.shark-stage {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 24px;
}

.shark-stage h1 {
  font-size: 36px;
  font-weight: 800;
  margin: 0 0 8px;
  background: linear-gradient(135deg, #fff 0%, #FFB454 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.5px;
}

.shark-stage .stage-sub {
  color: var(--lp-muted, #9aa3b2);
  margin: 0 0 32px;
  font-size: 15px;
}

.shark-session-picker {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.shark-session-picker label {
  color: var(--lp-muted, #9aa3b2);
  font-size: 13px;
  flex: 1 1 auto;
  min-width: 240px;
}
.shark-session-picker select {
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.3);
  color: #fff;
  font-size: 14px;
}
.shark-session-picker .btn-evaluate {
  padding: 12px 22px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #FFB454, #E07F60);
  color: #0b1426;
  font-weight: 800;
  cursor: pointer;
  font-size: 15px;
  white-space: nowrap;
}
.shark-session-picker .btn-evaluate:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.shark-overall {
  background: linear-gradient(135deg, rgba(255,180,84,0.10), rgba(224,127,96,0.06));
  border: 1px solid rgba(255,180,84,0.25);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.shark-overall .verdict {
  font-size: 28px;
  font-weight: 800;
  padding: 10px 24px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.shark-overall .verdict.invest { background: rgba(126,217,192,0.18); color: #7ED9C0; }
.shark-overall .verdict.maybe  { background: rgba(255,180,84,0.18); color: #FFB454; }
.shark-overall .verdict.pass   { background: rgba(243,130,129,0.18); color: #F38281; }
.shark-overall .score-big {
  font-size: 56px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.shark-overall .score-big small {
  font-size: 18px;
  color: var(--lp-muted, #9aa3b2);
  font-weight: 400;
}
.shark-overall .narrative {
  flex: 1;
  color: #fff;
  font-size: 14px;
  line-height: 1.6;
  min-width: 240px;
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 20px;
}

.panelist-card {
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.025);
  padding: 22px;
  position: relative;
}

.panelist-card .panelist-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.panelist-card .panelist-icon {
  font-size: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.06);
}
.panelist-card .panelist-name {
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  margin: 0;
}
.panelist-card .panelist-role {
  font-size: 12px;
  color: var(--lp-muted, #9aa3b2);
  margin: 2px 0 0;
}
.panelist-card .panelist-verdict {
  position: absolute;
  top: 22px;
  right: 22px;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.panelist-card .panelist-verdict.invest { background: rgba(126,217,192,0.20); color: #7ED9C0; }
.panelist-card .panelist-verdict.maybe  { background: rgba(255,180,84,0.18); color: #FFB454; }
.panelist-card .panelist-verdict.pass   { background: rgba(243,130,129,0.18); color: #F38281; }
.panelist-card .panelist-score {
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
}
.panelist-card .panelist-score small { font-size: 14px; color: var(--lp-muted, #9aa3b2); }
.panelist-card .panelist-feedback {
  color: #d4dbe6;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 14px;
}
.panelist-card .hard-q-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #FFB454;
  font-weight: 700;
  margin-bottom: 4px;
}
.panelist-card .hard-q {
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255,180,84,0.08);
  border-left: 3px solid #FFB454;
}

.shark-empty {
  text-align: center;
  padding: 80px 24px;
  color: var(--lp-muted, #9aa3b2);
}
.shark-empty .emoji { font-size: 48px; margin-bottom: 12px; }
.shark-empty h2 { color: #fff; margin: 0 0 8px; }

/* Diff badges for re-evaluation comparison */
.diff-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.diff-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.diff-badge.up { background: rgba(126,217,192,0.18); color: #7ED9C0; }
.diff-badge.down { background: rgba(243,130,129,0.18); color: #F38281; }
.diff-badge.same { background: rgba(255,255,255,0.06); color: var(--lp-muted, #9aa3b2); }
.diff-badge.verdict-change { background: rgba(255,180,84,0.18); color: #FFB454; }
.diff-badge.inline {
  margin-left: 10px;
  font-size: 13px;
  padding: 2px 8px;
  position: relative;
  top: -8px;
}
