.kpi-ui {
    max-width: auto 480px;
    margin: auto;
    font-family: system-ui, sans-serif;
    padding: 20px;
}
.kpi-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    padding: 16px;
    margin-bottom: 20px;
}
.kpi-title {
    font-weight: bold;
    font-size: 17px;
    margin-bottom: 8px;
}
.kpi-group-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0.5rem 0;
    text-transform: uppercase;
    cursor: pointer;
}
.kpi-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0.2rem;
    border-bottom: 1px dashed #ccc;
}
.kpi-item-label {
    font-weight: 500;
}
.kpi-bar, .kpi-bar-daily {
    height: 10px;
    background: #eee;
    border-radius: 5px;
    overflow: hidden;
}
.kpi-bar-fill, .kpi-bar-fill-daily {
    height: 100%;
    background: linear-gradient(90deg, #4caf50, #81c784);
    width: 0%;
    transition: width 0.5s ease-in-out;
}
.kpi-bar {
  position: relative;
  height: 10px;
  background: #eee;
  border-radius: 5px;
  overflow: hidden;
}
.kpi-bar-gradient {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(
    90deg,
    red 0%,
    green var(--min-pct),
    #eee var(--min-pct),
    #eee 100%
  );
}

.kpi-bar-mask {
  position: absolute;
  top: 0; bottom: 0;
  background: #eee;
  transition: left 0.5s ease-in-out;
}
/* слой д минимума */
.kpi-bar-min {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  background: linear-gradient(90deg, red, green);
  transition: width 0.5s ease-in-out;
}

/* слой после минимума */
.kpi-bar-excess {
  position: absolute;
  top: 0;
  height: 100%;
  background: darkgreen;
  transition: width 0.5s ease-in-out, left 0.5s ease-in-out;
}
.kpi-line {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
}
.kpi-training-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.logout-button {
  display: inline-block;
  padding: 6px 12px;
  background: #f44336;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-size: 14px;
}
.logout-button:hover {
  opacity: 0.9;
}
    .kpi-accordion-item {
    border-bottom: 1px solid #eee;
    margin-bottom: 8px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.kpi-accordion-header {
    font-size: 16px;
    font-weight: 600;
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s;
}

.kpi-accordion-header:hover {
    background: #f9f9f9;
}

.kpi-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 16px;
}

.kpi-accordion-item.open .kpi-accordion-content {
    padding: 8px 16px 16px;
    max-height: 1000px;
}

.kpi-accordion-header .arrow {
    transform: rotate(0deg);
    transition: transform 0.3s ease;
}

.kpi-accordion-item.open .arrow {
    transform: rotate(90deg);
}

.kpi-item-row {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px dashed #ccc;
    padding: 6px 0;
}

.kpi-item-label {
    font-weight: 500;
}
