:root {
  --color-A: #0b90dd;
  --color-B: #42e41a;
  --color-C: #e9a506;
  --color-D: #595e5e;
}

* {
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  margin: 0;
  background: white;
}

/* Layout balanceado */
.container {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px;
  gap: 40px;
  align-items: center;
}

/* LEFT */
.left {
  display: flex;
  justify-content: center;
}

/* Donut (JS le mete el fondo) */
#donutChart {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  position: relative;
}

/* Centro del donut */
#donutChart::after {
  content: "";
  width: 70%;
  height: 70%;
  background: #f5f5f5;
  border-radius: 50%;
  position: absolute;
  top: 15%;
  left: 15%;
  z-index: 1;
}

.center-text {
  position: absolute;
  width: 100%;
  text-align: center;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}

/* CENTER */
.center {
  text-align: center;
}

.asset {
  color: var(--color-C);
}

.actions button {
  margin: 5px;
  padding: 10px 15px;
  border: none;
  background: var(--color-C);
  border-radius: 50px;
  cursor: pointer;
}

/* RIGHT */
.right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.bar-item {
  display: flex;
  align-items: center;
  margin: 10px 0;
}

.bar {
  width: 6px;
  height: 40px;
  margin-right: 10px;
  border-radius: 3px;
}

.seccion-A { background: var(--color-A); }
.seccion-B { background: var(--color-B); }
.seccion-C { background: var(--color-C); }
.seccion-D { background: var(--color-D); }

/* Responsive */
@media (max-width: 900px) {
  .container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  /* 🔥 Mantener barras alineadas a la izquierda */
  .right {
    align-items: flex-start; /* clave */
    width: 100%;
  }

  .bar-item {
    width: 100%;           /* ocupa todo el ancho */
    justify-content: flex-start; /* contenido pegado a la izquierda */
    text-align: left;      /* texto alineado correctamente */
  }
}