/* PALETA SUAVE Y MINIMALISTA (Bajo Contraste para POS) */
:root {
  --primary: #4C9F4E;    /* Verde suave/oscuro de acción */
  --primary-light: #66BB6A; /* Verde para hover/foco */
  --accent: #E57373;     /* Rojo suave para advertencia */
  --bg: #F9F9F9;        /* Fondo muy claro, menos blanco que el anterior */
  --card-bg: #FFFFFF;
  --text-dark: #333333;  /* Texto gris oscuro */
  --text-medium: #666666;
  --border: #DDDDDD;     /* Borde suave */
  --shadow: rgba(0, 0, 0, 0.08); /* Sombra muy sutil */
}

/* Base y Tipografía */
body {
  font-family: 'Roboto', sans-serif;
  margin: 0;
  padding: 10px; /* Reducimos padding para móviles */
  background: var(--bg);
  color: var(--text-dark);
  display: flex;
  justify-content: center;
  font-size: 16px;
  box-sizing: border-box;
}

#main-content {
    width: 100%;
    max-width: 700px;
}

h1 { font-size: 24px; margin: 0 0 15px; color: var(--text-dark); }
h2 { font-size: 20px; margin: 0 0 10px; padding-bottom: 5px; color: var(--text-dark); }
h3 { font-size: 16px; margin: 0 0 8px; font-weight: 600; }

/* Tarjetas (Estilo Limpio) */
.card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 15px; /* Reducimos padding para eficiencia */
  margin: 10px 0;
  background: var(--card-bg);
  box-shadow: 0 1px 3px var(--shadow);
}

/* Filas y Inputs (Ergonomía y Ajuste de Ancho) */
.row {
  display: flex;
  gap: 8px; /* Reducimos el gap */
  align-items: center;
  flex-wrap: wrap;
  margin: 8px 0;
}
.row input[type="checkbox"] { min-width: auto; }

label {
  font-size: 14px;
  min-width: 110px; /* Ajustamos para mayor flexibilidad */
  font-weight: 500;
  color: var(--text-medium);
}
input, select {
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  min-width: 120px;
  font-size: 16px;
  flex-grow: 1;
  box-sizing: border-box; /* Fundamental para evitar desbordes (Punto 5) */
}
input[type="number"] { max-width: 150px; }


/* Botones (Mejor Contraste Suave) */
button {
  padding: 10px 16px;
  border-radius: 6px;
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
  background: #F1F1F1;
  color: var(--text-dark);
}
button:active { transform: scale(0.98); }

button.primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  flex-grow: 1;
}
button.primary:hover { background: var(--primary-light); } /* Color más claro al pasar el ratón */

button.warn {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

button.small {
  padding: 6px 10px;
  font-size: 14px;
}

/* Posición del botón Check Status (Punto 3) */
#statusBtn {
    flex-grow: 0;
    min-width: 120px;
    order: 2; /* Mover el botón a la derecha, funciona con flex-wrap */
}
#memberId {
    order: 1;
    flex-grow: 1;
}


/* Resumen del Miembro (Punto 4: Datos tabulados) */
.summary {
  margin-top: 10px !important;
  font-size: 14px;
  line-height: 1.5;
  display: flex;
  flex-direction: column; /* Apilar las secciones de datos */
}
.summary > div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 15px; /* Más espacio horizontal entre pills */
    padding: 5px 0;
    border-bottom: 1px dashed #EEE;
}
.summary > div:last-child { border-bottom: none; }

.pill {
  padding: 4px 8px;
  border-radius: 4px;
  background: #E8F5E9; /* Fondo suave para datos */
  color: var(--text-dark);
  font-size: 13px;
  font-weight: 500;
}
.pill strong { font-weight: 600; color: #000; }


/* Log (Punto 6: Mejor contraste) */
pre#log {
  white-space: pre-wrap;
  background: #263238; /* Fondo azul oscuro/gris (mejor contraste con texto claro) */
  color: #CFD8DC; /* Texto gris muy claro */
  padding: 12px;
  border-radius: 8px;
  font-size: 12px;
  max-height: 150px;
  overflow-y: auto;
  border: none;
}


/* Corrección de Visibilidad (Punto 2) */
.personal-hidden {
  /* ¡Importante! Aseguramos que se oculte por completo */
  display: none !important;
}

/* Responsividad (Punto 1: Ajuste de ancho dinámico) */
@media (max-width: 480px) {
    body { padding: 10px; }
    
    /* Asegurar que las filas se apilen verticalmente en móviles */
    .row {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }
    label {
        min-width: 100%;
        text-align: left;
    }
    /* Excepción para la fila de Member ID (Mantener en línea horizontal) */
    .row:has(#memberId) {
        flex-direction: row; 
        flex-wrap: nowrap;
        align-items: center;
    }
    #memberId, #statusBtn {
        min-width: 40%;
        width: auto;
    }
    input, select, button {
        min-width: 100%;
        width: 100%;
    }
}