/* assets/css/history.css */

.page-history .history-wrap{
  padding: 16px;
}

.page-history .history-head{
  margin-top: 10px;
  margin-bottom: 14px;
}

.page-history .history-title{
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 10px 0;
}

.page-history .history-controls{
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: end;
}

@media (min-width: 720px){
  .page-history .history-controls{
    grid-template-columns: 1.2fr .6fr .8fr auto;
  }
}

.page-history .history-field label{
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 6px;
}

.page-history .history-field select{
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  background: #fff;
  font-size: 16px; /* iOS zoom fix */
}

html.dark .page-history .history-field select{
  background: #374151;
  border-color: #4b5563;
  color: #f3f4f6;
}

.page-history .history-single{
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  background: rgba(255,255,255,.7);
  font-weight: 800;
}

html.dark .page-history .history-single{
  background: rgba(55,65,81,.7);
  border-color: #4b5563;
}

.page-history .history-btn{
  padding: 10px 14px;
  border: 0;
  border-radius: 12px;
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
  background: #16a34a;
  color: #fff;
  height: 42px;
}

.page-history .history-error{
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fee2e2;
  color: #991b1b;
  font-weight: 700;
  font-size: 14px;
}

html.dark .page-history .history-error{
  background: #3f1d1d;
  color: #fecaca;
}

/* Grid im Dashboard-Stil */
.page-history .history-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 720px){
  .page-history .history-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Chartbox: feste Höhe, responsive */
.page-history .chart-box{
  height: 260px;
}

@media (min-width: 980px){
  .page-history .chart-box{
    height: 300px;
  }
}

.page-history canvas{
  width: 100% !important;
  height: 100% !important;
}
