

/* =========================================================
   HISTÓRICO · FICHA DE CULTIVO V2
   ========================================================= */
.hd-wrapper{max-width:1180px;margin:0 auto;padding:8px 4px 34px}
.hd-back-btn,.hd-print-btn{display:inline-flex;margin-bottom:14px}
.hd-back-btn{margin-right:8px}
.hd-hero{display:flex;justify-content:space-between;gap:20px;align-items:stretch;padding:24px;border:1px solid var(--line);border-radius:22px;background:linear-gradient(145deg,color-mix(in srgb,var(--panel) 94%,#0c261a),var(--panel));box-shadow:var(--shadow);overflow:hidden;position:relative}
.hd-hero:after{content:"";position:absolute;right:-90px;bottom:-120px;width:360px;height:300px;background:radial-gradient(circle,color-mix(in srgb,#33cc99 18%,transparent),transparent 68%);pointer-events:none}
.hd-hero-main{position:relative;z-index:2;min-width:0}
.hd-kicker{font-size:.68rem;letter-spacing:.16em;font-weight:800;color:#33cc99;margin-bottom:7px}
.hd-title{font-family:var(--font-display);font-size:clamp(1.55rem,3vw,2.5rem);font-weight:850;letter-spacing:-.04em}
.hd-subtitle{color:var(--muted);margin-top:7px;font-size:.92rem}
.hd-strains{display:flex;flex-wrap:wrap;gap:6px;margin-top:13px}
.hd-strains span{padding:5px 9px;border-radius:999px;background:rgba(51,204,153,.09);border:1px solid rgba(51,204,153,.22);color:#33cc99;font-size:.75rem;font-weight:700}
.hd-score{position:relative;z-index:2;min-width:180px;border-left:1px solid var(--line);padding-left:24px;display:flex;flex-direction:column;justify-content:center}
.hd-score-label{font-size:.66rem;letter-spacing:.15em;color:var(--muted);font-weight:800}
.hd-score-value{font-family:var(--font-display);font-size:2.8rem;font-weight:900;line-height:1;color:#33cc99;margin:5px 0}
.hd-score-grade{font-size:.78rem;color:var(--muted)}.hd-score-grade span{color:var(--text)}
.hd-section{margin-top:16px;padding:20px;border:1px solid var(--line);border-radius:20px;background:color-mix(in srgb,var(--panel) 96%,transparent);box-shadow:0 10px 28px rgba(0,0,0,.12)}
.hd-section-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px}
.hd-section-head h3{margin:0;font-size:1rem}.hd-section-note{font-size:.72rem;color:var(--muted)}
.hd-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}
.hd-card{min-width:0;padding:13px;border:1px solid var(--line);border-radius:13px;background:rgba(255,255,255,.018)}
.hd-card-icon{font-size:1rem}.hd-card-label{font-size:.68rem;color:var(--muted);margin-top:5px}.hd-card-value{font-weight:800;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hd-phase-track{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;position:relative}
.hd-phase{padding:12px;border-radius:13px;background:rgba(255,255,255,.018);border:1px solid var(--line);position:relative}
.hd-phase-dot{width:9px;height:9px;border-radius:50%;background:#33cc99;margin-bottom:9px;box-shadow:0 0 0 4px rgba(51,204,153,.09)}
.hd-phase.root .hd-phase-dot{background:var(--phase-root)}.hd-phase.grow .hd-phase-dot{background:var(--phase-grow)}.hd-phase.bloom .hd-phase-dot{background:var(--phase-bloom)}.hd-phase.dry .hd-phase-dot{background:var(--phase-dry)}
.hd-phase-name{font-weight:800;font-size:.82rem}.hd-phase-meta{font-size:.7rem;color:var(--muted);margin-top:4px}
.hd-metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
.hd-metric{display:flex;gap:10px;align-items:center;padding:13px;border-radius:14px;border:1px solid var(--line);background:rgba(255,255,255,.018)}
.hd-metric-icon{font-size:1.25rem}.hd-metric-label{font-size:.7rem;color:var(--muted)}.hd-metric-value{font-weight:850;font-size:1.05rem;color:#33cc99}.hd-metric-range{font-size:.66rem;color:var(--muted);margin-top:2px}
.hd-incidents{display:grid;gap:7px}.hd-incident{display:flex;gap:14px;align-items:center;padding:10px 12px;border-radius:11px;background:rgba(239,68,68,.045);border:1px solid rgba(239,68,68,.14)}
.hd-incident-week{font-size:.7rem;color:#33cc99;font-weight:800;min-width:86px}.hd-incident-text{font-size:.8rem}
.hd-notes-field{margin-top:14px!important}.hd-harvest-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
@media(max-width:800px){.hd-hero{flex-direction:column}.hd-score{border-left:0;border-top:1px solid var(--line);padding:14px 0 0;min-width:0}.hd-cards{grid-template-columns:repeat(2,1fr)}.hd-metrics{grid-template-columns:repeat(2,1fr)}.hd-phase-track{grid-template-columns:repeat(2,1fr)}}
@media(max-width:480px){.hd-wrapper{padding-left:0;padding-right:0}.hd-section{padding:14px}.hd-cards,.hd-metrics{grid-template-columns:1fr 1fr}.hd-title{font-size:1.45rem}.hd-incident{display:block}.hd-incident-week{margin-bottom:4px}}


/* =========================================================
   HISTÓRICO · UI MODERNA / PREMIUM
   ========================================================= */
.hd-wrapper{position:relative}
.hd-section{position:relative;overflow:hidden;background:
 linear-gradient(145deg,rgba(255,255,255,.035),rgba(255,255,255,.012) 58%,rgba(51,204,153,.018));
 border:1px solid rgba(255,255,255,.075);box-shadow:0 14px 38px rgba(0,0,0,.18),inset 0 1px 0 rgba(255,255,255,.025)}
.hd-section:before{content:"";position:absolute;left:0;top:18px;width:3px;height:34px;border-radius:0 4px 4px 0;background:#33cc99;box-shadow:0 0 18px rgba(51,204,153,.3)}
.hd-section-head{position:relative;padding-left:8px;margin-bottom:18px}
.hd-section-head h3{font-size:1.02rem;letter-spacing:-.015em}
.hd-section-note{padding:5px 9px;border-radius:999px;background:rgba(51,204,153,.065);border:1px solid rgba(51,204,153,.13);font-weight:700}

.hd-cards{gap:10px}
.hd-card{position:relative;overflow:hidden;min-height:92px;padding:15px 14px 13px;
 background:linear-gradient(145deg,rgba(255,255,255,.045),rgba(255,255,255,.012));
 border:1px solid rgba(255,255,255,.065);box-shadow:0 7px 18px rgba(0,0,0,.12);transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease}
.hd-card:after{content:"";position:absolute;width:70px;height:70px;right:-28px;top:-28px;border-radius:50%;background:rgba(51,204,153,.055);filter:blur(1px)}
.hd-card:hover{transform:translateY(-2px);border-color:rgba(51,204,153,.22);box-shadow:0 12px 24px rgba(0,0,0,.18)}
.hd-card-icon{position:relative;z-index:1;width:30px;height:30px;display:flex;align-items:center;justify-content:center;border-radius:9px;background:rgba(51,204,153,.075);border:1px solid rgba(51,204,153,.11)}
.hd-card-label{position:relative;z-index:1;margin-top:9px;font-size:.67rem;text-transform:uppercase;letter-spacing:.06em;font-weight:750}
.hd-card-value{position:relative;z-index:1;font-size:1.05rem;margin-top:3px}

.hd-phase-track{gap:0;padding:6px 0}
.hd-phase-track:before{content:"";position:absolute;left:7%;right:7%;top:24px;height:1px;background:linear-gradient(90deg,rgba(51,204,153,.15),rgba(51,204,153,.55),rgba(51,204,153,.15))}
.hd-phase{background:transparent;border:0;padding:9px 12px;text-align:center}
.hd-phase-dot{position:relative;margin:0 auto 13px;width:13px;height:13px;border:3px solid var(--panel);box-shadow:0 0 0 1px rgba(51,204,153,.3),0 0 16px rgba(51,204,153,.15)}
.hd-phase-name{font-size:.8rem}
.hd-phase-meta{font-size:.68rem;margin-top:5px}

.hd-metrics{gap:10px}
.hd-metric{position:relative;min-height:108px;align-items:flex-start;padding:14px;background:linear-gradient(145deg,rgba(51,204,153,.045),rgba(255,255,255,.012));border:1px solid rgba(255,255,255,.065);box-shadow:0 7px 18px rgba(0,0,0,.1)}
.hd-metric:after{content:"";position:absolute;bottom:0;left:12px;right:12px;height:2px;border-radius:4px;background:linear-gradient(90deg,rgba(51,204,153,.05),#33cc99,rgba(51,204,153,.05));opacity:.7}
.hd-metric-icon{width:36px;height:36px;display:flex;align-items:center;justify-content:center;border-radius:11px;background:rgba(51,204,153,.07);border:1px solid rgba(51,204,153,.12)}
.hd-metric-main{min-width:0}.hd-metric-label{text-transform:uppercase;letter-spacing:.06em;font-weight:750}
.hd-metric-value{font-size:1.25rem;margin-top:5px}.hd-metric-range{margin-top:4px}

.hd-incidents{gap:8px}
.hd-incident{position:relative;padding:13px 14px;background:linear-gradient(90deg,rgba(239,68,68,.055),rgba(255,255,255,.012));border:1px solid rgba(239,68,68,.12);box-shadow:0 6px 15px rgba(0,0,0,.08)}
.hd-incident:before{content:"";width:3px;position:absolute;left:0;top:9px;bottom:9px;border-radius:0 3px 3px 0;background:#ef4444}
.hd-incident-week{min-width:96px}

.hd-harvest-section .hd-harvest-grid{gap:10px}
.hd-harvest-field label{display:block;margin-bottom:6px;font-size:.68rem;text-transform:uppercase;letter-spacing:.06em;font-weight:750;color:var(--muted)}
.hd-harvest-field input,.hd-harvest-field textarea{border-radius:12px!important;border:1px solid rgba(255,255,255,.08)!important;background:rgba(0,0,0,.13)!important;box-shadow:inset 0 1px 3px rgba(0,0,0,.12)!important}
.hd-harvest-calc{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin-top:12px}
.hd-calc-item{padding:11px 12px;border-radius:11px;background:rgba(255,255,255,.025);border:1px solid rgba(255,255,255,.06)}
.hd-calc-label{display:block;font-size:.65rem;color:var(--muted);text-transform:uppercase;letter-spacing:.05em}
.hd-calc-value{display:block;margin-top:4px;font-weight:850}
.hd-calc-item.highlight{border-color:rgba(51,204,153,.2);background:rgba(51,204,153,.045)}
.hd-harvest-actions{margin-top:14px}

.hd-graphs{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.hd-graphs>h4{grid-column:1/-1;margin:10px 0 -3px;padding:10px 12px;border-radius:11px;background:rgba(255,255,255,.025);border:1px solid rgba(255,255,255,.055);font-size:.78rem}
.hd-graphs .rep-chart{width:100%;height:auto;min-height:180px;padding:10px;border-radius:13px;background:rgba(0,0,0,.1);border:1px solid rgba(255,255,255,.05)}
.hd-graphs .rep-legend{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:7px;margin-top:-6px}
.hd-graphs .rep-legend-item{padding:5px 8px;border-radius:999px;background:rgba(255,255,255,.025);border:1px solid rgba(255,255,255,.055);font-size:.67rem}
.hd-graphs .rep-flex{grid-column:1/-1;padding:14px;border-radius:14px;background:linear-gradient(145deg,rgba(255,255,255,.025),rgba(51,204,153,.018));border:1px solid rgba(255,255,255,.055)}

@media(max-width:900px){.hd-cards{grid-template-columns:repeat(3,1fr)}.hd-metrics{grid-template-columns:repeat(2,1fr)}.hd-harvest-calc{grid-template-columns:repeat(3,1fr)}}
@media(max-width:650px){.hd-cards{grid-template-columns:repeat(2,1fr)}.hd-graphs{grid-template-columns:1fr}.hd-harvest-calc{grid-template-columns:repeat(2,1fr)}.hd-phase-track{grid-template-columns:repeat(2,1fr)}.hd-phase-track:before{display:none}}
@media(max-width:420px){.hd-cards,.hd-metrics{grid-template-columns:1fr 1fr}.hd-harvest-calc{grid-template-columns:1fr 1fr}}


/* =========================================================
   HISTÓRICO · LISTA MODERNA / PREMIUM V1
   Solo presentación: no altera la lógica del histórico.
   ========================================================= */

.history-list{
  display:grid;
  gap:11px;
  margin-top:14px;
  text-align:left;
}

.history-item{
  position:relative;
  display:grid;
  grid-template-columns:34px minmax(0,1fr) 42px;
  align-items:stretch;
  gap:0;
  overflow:hidden;
  min-height:112px;
  border:1px solid rgba(255,255,255,.075);
  border-radius:18px;
  background:
    radial-gradient(circle at 100% 0%,rgba(51,204,153,.08),transparent 34%),
    linear-gradient(145deg,rgba(255,255,255,.045),rgba(255,255,255,.012));
  box-shadow:0 10px 28px rgba(0,0,0,.16),inset 0 1px 0 rgba(255,255,255,.025);
  transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease;
}

.history-item:before{
  content:"";
  position:absolute;
  left:0;
  top:13px;
  bottom:13px;
  width:3px;
  border-radius:0 4px 4px 0;
  background:linear-gradient(180deg,#33cc99,#4ade80);
  box-shadow:0 0 14px rgba(51,204,153,.25);
}

.history-item:hover{
  transform:translateY(-2px);
  border-color:rgba(51,204,153,.22);
  box-shadow:0 15px 34px rgba(0,0,0,.23),inset 0 1px 0 rgba(255,255,255,.04);
}

.hist-check-wrap{
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}

.hist-check-wrap input{
  width:17px;
  height:17px;
  accent-color:#33cc99;
  cursor:pointer;
}

.hist-open{
  min-width:0;
  padding:16px 8px 15px 4px;
  cursor:pointer;
}

.history-item-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-width:0;
}

.history-item-title{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:1rem;
  font-weight:850;
  letter-spacing:-.015em;
  color:var(--text);
}

.history-item-date{
  flex:none;
  padding:5px 9px;
  border:1px solid rgba(255,255,255,.07);
  border-radius:999px;
  background:rgba(255,255,255,.025);
  color:var(--muted);
  font-size:.66rem;
  font-weight:750;
  text-transform:capitalize;
}

.history-item-stats{
  display:grid;
  grid-template-columns:repeat(6,minmax(70px,1fr));
  gap:7px;
  margin-top:12px;
}

.history-stat{
  min-width:0;
  padding:8px 9px;
  border:1px solid rgba(255,255,255,.055);
  border-radius:10px;
  background:rgba(0,0,0,.10);
}

.history-stat-label{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:var(--muted);
  font-size:.58rem;
  font-weight:750;
  text-transform:uppercase;
  letter-spacing:.05em;
}

.history-stat-value{
  display:block;
  margin-top:3px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:.78rem;
  font-weight:850;
}

.history-stat.highlight{
  border-color:rgba(51,204,153,.16);
  background:rgba(51,204,153,.045);
}
.history-stat.highlight .history-stat-value{color:#33cc99}

.history-item-hint{
  margin-top:9px;
  color:var(--muted);
  font-size:.63rem;
  opacity:.75;
}

.hist-del{
  align-self:center;
  justify-self:center;
  width:34px;
  height:34px;
  border:1px solid rgba(239,68,68,.16);
  border-radius:10px;
  background:rgba(239,68,68,.045);
  color:#f87171;
  cursor:pointer;
  transition:background .15s,transform .15s,border-color .15s;
}
.hist-del:hover{
  transform:scale(1.06);
  background:rgba(239,68,68,.13);
  border-color:rgba(239,68,68,.35);
}

/* Toolbar */
.hist-toolbar{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin:4px 0 12px;
  padding:10px;
  border:1px solid rgba(255,255,255,.065);
  border-radius:14px;
  background:rgba(255,255,255,.018);
}
.hist-toolbar .btn-back{
  flex:0 0 auto;
  min-height:38px;
  padding:0 12px;
  border-color:rgba(255,255,255,.07);
  background:rgba(255,255,255,.025);
  font-size:.72rem;
}
.hist-toolbar .hist-goal-btn{
  color:#33cc99;
  border-color:rgba(51,204,153,.16);
  background:rgba(51,204,153,.045);
}
.hist-toolbar .hist-del-all,
.hist-toolbar .hist-del-selected{
  color:#fca5a5;
}
.hist-toolbar button:hover:not(:disabled){
  transform:translateY(-1px);
  border-color:rgba(51,204,153,.25);
}
.hist-toolbar button:disabled{
  opacity:.38;
  cursor:not-allowed;
}

.hist-goal-editor{
  display:flex;
  align-items:center;
  gap:8px;
  margin:-4px 0 12px;
  padding:11px 12px;
  border:1px solid rgba(51,204,153,.14);
  border-radius:12px;
  background:rgba(51,204,153,.035);
  font-size:.72rem;
}
.hist-goal-editor[hidden]{display:none}
.hist-goal-editor input{
  width:70px;
  height:38px;
  border:1px solid rgba(255,255,255,.09);
  border-radius:9px;
  background:rgba(0,0,0,.16);
  color:var(--text);
  text-align:center;
  font-weight:800;
}
.hist-goal-editor .btn-start-table{
  flex:0 0 auto;
  min-height:38px;
  padding:0 14px;
}

/* Ranking */
.hist-section{
  margin:0 0 14px;
  padding:15px;
  border:1px solid rgba(255,255,255,.07);
  border-radius:16px;
  background:
    linear-gradient(145deg,rgba(255,255,255,.035),rgba(51,204,153,.012));
  box-shadow:0 10px 26px rgba(0,0,0,.12);
  text-align:left;
}
.hist-section h3{
  margin:0 0 11px;
  font-size:.88rem;
  letter-spacing:-.01em;
}
.rank-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0 5px;
  font-size:.72rem;
}
.rank-table th{
  padding:3px 8px 6px;
  color:var(--muted);
  font-size:.59rem;
  text-transform:uppercase;
  letter-spacing:.06em;
  text-align:left;
}
.rank-table td{
  padding:9px 8px;
  background:rgba(255,255,255,.022);
  border-top:1px solid rgba(255,255,255,.045);
  border-bottom:1px solid rgba(255,255,255,.045);
}
.rank-table td:first-child{
  border-left:1px solid rgba(255,255,255,.045);
  border-radius:9px 0 0 9px;
}
.rank-table td:last-child{
  border-right:1px solid rgba(255,255,255,.045);
  border-radius:0 9px 9px 0;
}
.rank-pos{
  width:28px;
  font-weight:900;
  color:#33cc99;
}
.seal-badge{
  display:inline-flex;
  align-items:center;
  padding:4px 7px;
  border:1px solid rgba(51,204,153,.17);
  border-radius:999px;
  background:rgba(51,204,153,.055);
  color:#33cc99;
  font-size:.62rem;
  font-weight:850;
  white-space:nowrap;
}

.history-empty{
  display:grid;
  place-items:center;
  min-height:230px;
  padding:30px;
  border:1px dashed rgba(255,255,255,.10);
  border-radius:18px;
  background:rgba(255,255,255,.018);
  color:var(--muted);
  text-align:center;
  font-size:.82rem;
}

/* Make the history modal feel like a dedicated application panel. */
#historyModal .modal{
  width:min(96vw,980px);
  max-width:980px;
  max-height:min(92dvh,920px);
  border-color:rgba(51,204,153,.14);
  background:
    radial-gradient(circle at 90% 0%,rgba(51,204,153,.08),transparent 28%),
    linear-gradient(160deg,#102318,#0b1710 72%);
  box-shadow:0 34px 90px rgba(0,0,0,.55),0 0 0 1px rgba(255,255,255,.02);
}
#historyModal .modal-body{
  padding:24px 24px 28px;
  text-align:left;
}
#historyModal h2{
  font-size:1.65rem;
  letter-spacing:-.03em;
}
#historyModal .modal-lead{
  margin-left:0;
  margin-right:0;
  max-width:none;
}
#historyModal .modal-icon{
  width:54px;
  height:54px;
  margin:0 0 12px;
  border-radius:16px;
  font-size:1.55rem;
  background:linear-gradient(135deg,#14532d,#15803d);
  box-shadow:0 10px 25px rgba(21,128,61,.22);
}

@media(max-width:800px){
  .history-item-stats{grid-template-columns:repeat(3,minmax(70px,1fr))}
}
@media(max-width:560px){
  #historyModal .modal-body{padding:18px 14px 22px}
  .history-item{grid-template-columns:30px minmax(0,1fr) 36px}
  .history-item-header{display:block}
  .history-item-date{display:inline-flex;margin-top:6px}
  .history-item-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .history-item-hint{font-size:.58rem}
  .hist-toolbar{align-items:stretch}
  .hist-toolbar .btn-back{flex:1 1 calc(50% - 4px)}
  .rank-table{font-size:.65rem}
  .rank-table th:nth-child(6),.rank-table td:nth-child(6){display:none}
}


/* =========================================================
   HISTÓRICO · GRID HASTA 4 POR FILA
   ========================================================= */
.history-list{
  grid-template-columns:repeat(4,minmax(0,1fr));
  align-items:stretch;
}
.history-item{
  grid-template-columns:28px minmax(0,1fr) 34px;
  min-height:100%;
}
.history-item-header{display:block}
.history-item-date{display:inline-flex;margin-top:6px}
.history-item-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
.history-item-hint{margin-top:10px}

@media(max-width:1100px){
  .history-list{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:800px){
  .history-list{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:560px){
  .history-list{grid-template-columns:1fr}
}

/* GP-HISTORY-GRID-FIX-V2 */
#historyContent .history-list{
  display:grid !important;
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  grid-auto-flow:row !important;
  align-items:stretch !important;
  width:100% !important;
  max-width:none !important;
  gap:12px !important;
}
#historyContent .history-item{
  display:grid !important;
  width:auto !important;
  max-width:none !important;
  min-width:0 !important;
  box-sizing:border-box !important;
}
@media(max-width:1100px){
  #historyContent .history-list{grid-template-columns:repeat(3,minmax(0,1fr)) !important}
}
@media(max-width:800px){
  #historyContent .history-list{grid-template-columns:repeat(2,minmax(0,1fr)) !important}
}
@media(max-width:560px){
  #historyContent .history-list{grid-template-columns:1fr !important}
}

/* GP-HISTORY-CARDS-COMPACT-V1 */
#historyContent .history-list{
  gap:8px !important;
}
#historyContent .history-item{
  min-height:0 !important;
  height:auto !important;
  grid-template-columns:22px minmax(0,1fr) !important;
  border-radius:12px !important;
}
#historyContent .hist-check-wrap{
  padding:8px 0 !important;
}
#historyContent .hist-open{
  padding:10px 8px 10px 3px !important;
}
#historyContent .history-item-title{
  font-size:.82rem !important;
}
#historyContent .history-item-date{
  padding:3px 7px !important;
  font-size:.58rem !important;
  margin-top:4px !important;
}
#historyContent .history-item-stats{
  gap:5px !important;
  margin-top:7px !important;
}
#historyContent .history-stat{
  padding:6px 7px !important;
  border-radius:8px !important;
}
#historyContent .history-stat-label{
  font-size:.50rem !important;
}
#historyContent .history-stat-value{
  margin-top:2px !important;
  font-size:.67rem !important;
}
#historyContent .history-item-hint{
  margin-top:6px !important;
  font-size:.52rem !important;
}
#historyContent .history-item:before{
  top:9px !important;
  bottom:9px !important;
  width:2px !important;
}

/* GP-HISTORY-SQUARE-V1 · Tarjetas cuadradas */
#historyContent .history-list{
  align-items:start !important;
}
#historyContent .history-item{
  aspect-ratio:1 / 1 !important;
  height:auto !important;
  min-height:0 !important;
  display:grid !important;
  grid-template-columns:20px minmax(0,1fr) !important;
  overflow:hidden !important;
}
#historyContent .hist-check-wrap{
  align-self:start !important;
  padding-top:10px !important;
}
#historyContent .hist-open{
  min-width:0 !important;
  height:100% !important;
  box-sizing:border-box !important;
  padding:11px 9px 10px 2px !important;
  display:flex !important;
  flex-direction:column !important;
}
#historyContent .history-item-header{
  flex:0 0 auto !important;
}
#historyContent .history-item-title{
  font-size:.80rem !important;
  line-height:1.15 !important;
}
#historyContent .history-item-date{
  font-size:.56rem !important;
  padding:3px 6px !important;
}
#historyContent .history-item-stats{
  flex:1 1 auto !important;
  align-content:center !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:5px !important;
  margin:7px 0 !important;
}
#historyContent .history-stat{
  min-height:0 !important;
  padding:7px 6px !important;
  display:flex !important;
  flex-direction:column !important;
  justify-content:center !important;
}
#historyContent .history-stat-label{
  font-size:.48rem !important;
}
#historyContent .history-stat-value{
  font-size:.66rem !important;
  line-height:1.1 !important;
}
#historyContent .history-item-hint{
  flex:0 0 auto !important;
  margin-top:auto !important;
  padding-top:5px !important;
  font-size:.49rem !important;
  text-align:center !important;
}
#historyContent .history-item:before{
  top:8px !important;
  bottom:8px !important;
}
@media(max-width:560px){
  #historyContent .history-item{
    aspect-ratio:1 / 1 !important;
  }
}

/* GP-HISTORY-SQUARE-V2 */
#historyContent .history-item-stats{
  gap:8px !important;
  margin:9px 0 !important;
}
#historyContent .history-stat{
  padding:11px 9px !important;
  border-radius:10px !important;
  min-height:0 !important;
}
#historyContent .history-stat-label{
  font-size:.56rem !important;
  letter-spacing:.045em !important;
}
#historyContent .history-stat-value{
  font-size:.82rem !important;
  line-height:1.15 !important;
}
#historyContent .history-item-title{
  font-size:.92rem !important;
  font-weight:900 !important;
}
#historyContent .history-item-date{
  display:inline-flex !important;
  max-width:100% !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
  font-size:.61rem !important;
  padding:4px 7px !important;
}
#historyContent .history-item-hint{
  font-size:.54rem !important;
  padding-top:7px !important;
}

/* GP-REPORT-ACTIONS-V1: solo queda visible Imprimir */
#copyReport,#copyText,#copyReportText,#downloadTxt,#downloadText,#downloadReportTxt,
.copy-report,.copy-text,.download-txt,.download-text{display:none !important}

/* GP-REPORT-ACTIONS-V2 */
#historyContent button:has(+ *){} /* keep selector parser grouping stable */
#historyContent button[id*="copy" i],
#historyContent button[class*="copy" i],
#historyContent button[id*="download" i],
#historyContent button[class*="download" i]{display:none!important}
