/* ---------- PALETA DE COLORES ---------- */
:root {
    --purple-main: #4b2e83;     /* morado académico */
    --purple-hover: #3a2266;    /* más oscuro */
    --purple-light: #7a5ca9;    /* tono medio */
    --red-main: #c0392b;        /* rojo sobrio */
    --red-hover: #922d2d;
    --background: #ECEFF1;
    --panel-background: #f5f5f576;
    --border-color: #ddd;
    --shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* ---------- GENERAL ---------- */
body {
    background: var(--background);
    font-family: 'Segoe UI', sans-serif;
    color: #333;
    margin: 0;
    padding: 0;
}

/* ---------- CONTENEDOR DE LA GRÁFICA ---------- */
#chart-container {
    width: 100%;
    max-width: 1000px;
    margin: 20px auto;
    padding: 20px;
    background: var(--panel-background);
    border-radius: 10px;
    box-shadow: var(--shadow);
}

#myChart {
    display: block;
    width: 100% !important;
    height: 500px !important;
}

/* ---------- FORMULARIO DE NUEVOS PUNTOS ---------- */
#addUserPointForm {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px 30px;
    margin: 40px auto;
    justify-content: center;
    background: var(--panel-background);
    padding: 25px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    max-width: 950px;
}

#addUserPointForm h3 {
    grid-column: 1 / -1;
    text-align: center;
    margin-bottom: 15px;
}

#addUserPointForm div {
    display: flex;
    flex-direction: column;
}

#addUserPointForm label {
    font-weight: 600;
    margin-bottom: 5px;
}

#addUserPointForm input,
#addUserPointForm select {
    padding: 8px;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    font-size: 14px;
    width: 100%;
    background: white;
}

#addUserPointForm button {
    grid-column: 1 / -1;
    padding: 12px;
    font-size: 16px;
    background: var(--purple-main);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s;
}

#addUserPointForm button:hover {
    background: var(--purple-hover);
    transform: translateY(-1px);
}

/* ---------- TABLA DE PUNTOS ---------- */
.table-styled {
  width: 95%;
  margin: 20px auto;
  border-collapse: collapse;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #ffffff;
}

.table-styled thead {
  background: var(--purple-main);
  color: #fff;
  font-weight: 600;
}

.table-styled th,
.table-styled td {
  padding: 10px 14px;
  text-align: center;
  border-bottom: 1px solid #e0e0e0;
}

.table-styled tr:nth-child(even) { background: #f8f6fc; }

.table-styled input,
.table-styled select {
  width: 90%;
  padding: 5px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.9rem;
}

/* Botón eliminar MUY compacto */
.table-styled button {
  padding: 2px 6px;
  font-size: 0.75rem;
  min-width: 40px;
  height: 26px;
  background: var(--red-main);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s ease-in-out;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.table-styled button:hover {
  background: var(--red-hover);
}

/* ---------- BOTONES GENERALES ---------- */
#btns-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px auto;
    flex-wrap: wrap;
}

#btns-container button {
    padding: 12px 20px;
    font-size: 16px;
    background: var(--purple-main);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 220px;
    font-weight: 600;
    box-shadow: var(--shadow);
}

#btns-container button:hover {
    background: var(--purple-hover);
    transform: translateY(-1px);
}

/* ---------- ESCALAS INLINE ---------- */
.axis-inline {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    background: var(--panel-background);
    padding: 18px 25px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin: 30px auto;
    max-width: 700px;
    flex-wrap: wrap;
}

.axis-title {
    font-weight: 600;
    font-size: 15px;
    color: #333;
}

.axis-inputs {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.axis-inputs label {
    font-weight: 500;
    font-size: 13px;
    color: #444;
}

.axis-inputs input[type="number"] {
    width: 80px;
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    font-size: 13px;
    text-align: center;
    background: #fff;
}

.axis-inputs input[type="number"]:focus {
    border-color: var(--purple-main);
    box-shadow: 0 0 5px rgba(75, 46, 131, 0.5);
    outline: none;
}

/* ---------- BOTONES DE ESCALA (Apply / Reset) ---------- */
.axis-buttons button {
  padding: 6px 14px;          /* más pequeños */
  font-size: 13px;            /* texto reducido */
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: var(--purple-main);
  color: #fff;
  transition: all 0.2s ease;
  box-shadow: var(--shadow);
  min-width: 100px;           /* mucho más compacto */
}

.axis-buttons button:hover {
  background: var(--purple-hover);
  transform: translateY(-1px);
}

.axis-buttons .secondary {
  background: #666;          /* gris sobrio para "Reset" */
}

.axis-buttons .secondary:hover {
  background: #444;
}


/* ---------- SELECT SIMPLE ---------- */
select {
  appearance: auto;
  -webkit-appearance: menulist;
  -moz-appearance: menulist;
  background: #ffffff;
  color: #333;
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
}

select:hover {
  border-color: #888;
}
