/* --- Variables y Estilos Globales --- */
:root {
    --msp-primary-color: #2563eb; /* Un azul moderno */
    --msp-primary-hover: #1d4ed8;
    --msp-danger-color: #dc2626;
    --msp-danger-hover: #b91c1c;
    --msp-success-color: #16a34a;
    --msp-border-color: #e5e7eb;
    --msp-text-color: #374151;
    --msp-text-light: #6b7280;
    --msp-bg-light: #f9fafb;
    --msp-bg-white: #ffffff;
}

.mi-super-plugin-user-dashboard {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--msp-text-color);
    background-color: var(--msp-bg-white);
    border: 1px solid var(--msp-border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}

/* --- Pestañas de Navegación --- */
.msp-tabs-nav {
    display: flex;
    background-color: var(--msp-bg-light);
    border-bottom: 1px solid var(--msp-border-color);
    padding: 0 20px;
}

.msp-tab-link {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px; /* Alinea el borde con el borde del contenedor */
    color: var(--msp-text-light);
    font-weight: 600;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
}

.msp-tab-link:hover {
    color: var(--msp-primary-color);
}

.msp-tab-link.active {
    color: var(--msp-primary-color);
    border-bottom-color: var(--msp-primary-color);
}

/* --- CORRECCIÓN DE ICONOS --- */
.msp-tab-link svg {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    flex-shrink: 0; /* Evita que el icono se encoja */
}

/* --- Contenido de las Pestañas --- */
.msp-tabs-content {
    padding: 30px;
}

.msp-tab-pane {
    display: none;
    animation: fadeIn 0.4s;
}

.msp-tab-pane.active {
    display: block;
}

.msp-section__title {
    font-size: 1.5em;
    margin-top: 0;
    margin-bottom: 8px;
    color: var(--msp-text-color);
}

.msp-section__description {
    margin-top: 0;
    margin-bottom: 25px;
    color: var(--msp-text-light);
    font-size: 1em;
}

/* --- Estilos de Formularios --- */
.mi-super-plugin-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-row { display: flex; flex-direction: column; }
.form-row-full { grid-column: 1 / -1; }
.form-row-submit { grid-column: 1 / -1; margin-top: 15px; }

#mi-super-plugin-profile-form label,
#mi-super-plugin-delete-form label {
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.9em;
}

#mi-super-plugin-profile-form input[type="text"],
#mi-super-plugin-profile-form input[type="email"],
#mi-super-plugin-profile-form input[type="password"],
#mi-super-plugin-profile-form select,
#mi-super-plugin-delete-form input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--msp-border-color);
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

#mi-super-plugin-profile-form input:focus,
#mi-super-plugin-profile-form select:focus,
#mi-super-plugin-delete-form input:focus {
    outline: none;
    border-color: var(--msp-primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.msp-button {
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: background-color 0.2s;
    display: inline-block;
    text-align: center;
    text-decoration: none; /* Para los botones que son enlaces */
}

.msp-button--primary {
    background-color: var(--msp-primary-color);
    color: white;
}
.msp-button--primary:hover { background-color: var(--msp-primary-hover); color: white; }
.msp-button--primary:disabled { background-color: #9ca3af; cursor: not-allowed; }

.msp-button--danger {
    background-color: var(--msp-danger-color);
    color: white;
}
.msp-button--danger:hover { background-color: var(--msp-danger-hover); }
.msp-button--danger:disabled { background-color: #9ca3af; cursor: not-allowed; }

/* --- Lista de Actividad (Notas Leídas) --- */
.msp-activity-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.msp-activity-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid var(--msp-border-color);
}
.msp-activity-item:last-child { border-bottom: none; }

.msp-activity-item__image-wrapper {
    flex-shrink: 0;
}

.msp-activity-item__image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    background-color: var(--msp-bg-light);
}

.msp-activity-item__content {
    flex-grow: 1;
}

.msp-activity-item__title {
    margin: 0 0 5px 0;
}

.msp-activity-item__title a {
    text-decoration: none;
    font-size: 1.1em;
    font-weight: 600;
    color: var(--msp-text-color);
    transition: color 0.2s;
}
.msp-activity-item__title a:hover { color: var(--msp-primary-color); }

.msp-activity-item__excerpt {
    margin: 0;
    color: var(--msp-text-light);
    font-size: 0.95em;
    line-height: 1.5;
}

/* --- CAMBIO: Estilos para la fecha de visualización --- */
.msp-activity-item__date {
    font-size: 0.8em; /* Más pequeño */
    color: var(--msp-primary-color); /* Color azul */
    font-weight: 500;
    margin-top: 8px;
    margin-bottom: 0;
}

/* --- Feedback y Modal --- */
.msp-feedback {
    margin-top: 15px; padding: 12px; border-radius: 6px; display: none; text-align: center;
}
.msp-feedback.success { background-color: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.msp-feedback.error { background-color: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }

.mi-super-plugin-delete-modal { display: none; position: fixed; z-index: 10000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.6); animation: fadeIn 0.3s; }
.mi-super-plugin-delete-modal-content { background-color: #fefefe; margin: 15% auto; padding: 20px 30px; width: 90%; max-width: 500px; border-radius: 8px; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3); }
.mi-super-plugin-delete-modal-close { color: #aaa; float: right; font-size: 28px; font-weight: bold; cursor: pointer; }

/* --- Responsive --- */
@media (max-width: 768px) {
    .msp-tabs-content { padding: 20px; }
    .mi-super-plugin-form-grid { grid-template-columns: 1fr; }
    .msp-tab-link { padding: 15px 10px; font-size: 0.9em; }
    .msp-tab-link svg { margin-right: 5px; }
    .msp-activity-item { gap: 15px; }
    .msp-activity-item__image { width: 60px; height: 60px; }
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }